2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20150926.
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 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
148 # Identity of this package.
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
189 cache_file=config.cache ;;
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 datadir=$ac_optarg ;;
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
224 eval "enable_$ac_feature='$ac_optarg'" ;;
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
239 -help | --help | --hel | --he | -h)
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
263 -libdir | --libdir | --libdi | --libd)
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290 # Obsolete; use --without-fp.
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
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 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 sbindir=$ac_optarg ;;
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 sharedstatedir=$ac_optarg ;;
367 -site | --site | --sit)
369 -site=* | --site=* | --sit=*)
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
392 -version | --version | --versio | --versi | --vers | -V)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
406 eval "with_$ac_package='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
418 # Obsolete; use --with-x.
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
461 if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
470 eval ac_val=$`echo $ac_var`
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
482 eval ac_val=$`echo $ac_var`
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510 test "$silent" = yes && exec 6>/dev/null
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
570 # Report the --help message.
572 if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
576 \`configure' configures this package to adapt to many kinds of systems.
578 Usage: $0 [OPTION]... [VAR=VALUE]...
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE. See below for descriptions of some of the useful variables.
583 Defaults for the options are specified in brackets.
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
599 Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
610 For better control, use the options below.
612 Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
645 if test -n "$ac_init_help"; then
650 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
654 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
655 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
658 --with-pkg-config{=path} enable/disable use of pkg-config
659 --disable-echo do not display "compiling" commands
660 Curses Version-dependent Options:
661 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662 --disable-widec disable checks for wide-character functions
663 --with-curses-dir=DIR directory in which (n)curses is installed
664 --with-screen=XXX use specified curses-libraries
665 --with-ncursesw use wide ncurses-libraries
666 --with-ncurses use ncurses-libraries
667 --with-pdcurses compile/link with pdcurses X11 library
668 --with-curses-colr compile/link with HPUX 10.x color-curses
669 --with-curses-5lib compile/link with SunOS 5lib curses
670 --with-Xaw3d link with Xaw 3d library
671 --with-Xaw3dxft link with Xaw 3d xft library
672 --with-neXtaw link with neXT Athena library
673 --with-XawPlus link with Athena-Plus library
674 --with-x use the X Window System
675 Testing/development Options:
676 --enable-warnings test: turn on gcc compiler warnings
677 --with-dmalloc test: use Gray Watson's dmalloc library
678 --with-dbmalloc test: use Conor Cahill's dbmalloc library
679 --with-valgrind test: use valgrind
680 --disable-leaks test: free permanent memory, analyze leaks
681 --disable-rpath-hack don't add rpath options for additional libraries
683 Some influential environment variables:
684 CC C compiler command
685 CFLAGS C compiler flags
686 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
687 nonstandard directory <lib dir>
688 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
689 headers in a nonstandard directory <include dir>
692 Use these variables to override the choices made by `configure' or to help
693 it to find libraries and programs with nonstandard names/locations.
698 if test "$ac_init_help" = "recursive"; then
699 # If there are subdirs, report their specific --help.
701 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
703 # A "../" for each directory in /$ac_subdir.
704 ac_dots=`echo $ac_subdir |
705 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
708 .) # No --srcdir option. We are building in place.
709 ac_sub_srcdir=$srcdir ;;
710 [\\/]* | ?:[\\/]* ) # Absolute path.
711 ac_sub_srcdir=$srcdir/$ac_subdir ;;
713 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
716 # Check for guested configure; otherwise get Cygnus style configure.
717 if test -f $ac_sub_srcdir/configure.gnu; then
719 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
720 elif test -f $ac_sub_srcdir/configure; then
722 $SHELL $ac_sub_srcdir/configure --help=recursive
723 elif test -f $ac_sub_srcdir/configure.ac ||
724 test -f $ac_sub_srcdir/configure.in; then
728 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
734 test -n "$ac_init_help" && exit 0
735 if $ac_init_version; then
738 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
739 Free Software Foundation, Inc.
740 This configure script is free software; the Free Software Foundation
741 gives unlimited permission to copy, distribute and modify it.
747 This file contains any messages produced by compilers while
748 running configure, to aid debugging if configure makes a mistake.
750 It was created by $as_me, which was
751 generated by GNU Autoconf 2.52.20150926. Invocation command line was
762 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
763 uname -m = `(uname -m) 2>/dev/null || echo unknown`
764 uname -r = `(uname -r) 2>/dev/null || echo unknown`
765 uname -s = `(uname -s) 2>/dev/null || echo unknown`
766 uname -v = `(uname -v) 2>/dev/null || echo unknown`
768 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
769 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
771 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
772 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
773 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
774 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
775 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
776 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
777 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
791 # Keep a trace of the command line.
792 # Strip out --no-create and --no-recursion so they do not pile up.
793 # Also quote any args containing shell meta-characters.
799 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
800 | --no-cr | --no-c) ;;
801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
803 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
804 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
805 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
807 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
810 # Get rid of the leading space.
813 # When interrupted or exit'd, cleanup temporary files, and complete
814 # config.log. We remove comments because anyway the quotes in there
815 # would cause problems or look ugly.
817 # Save into config.log some information that might help in debugging.
819 echo "## ----------------- ##" >&5
820 echo "## Cache variables. ##" >&5
821 echo "## ----------------- ##" >&5
823 # The following way of writing the cache mishandles newlines in values,
826 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
829 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
834 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
838 sed "/^$/d" confdefs.h >conftest.log
839 if test -s conftest.log; then
841 echo "## ------------ ##" >&5
842 echo "## confdefs.h. ##" >&5
843 echo "## ------------ ##" >&5
848 test "$ac_signal" != 0 &&
849 echo "$as_me: caught signal $ac_signal" >&5
850 echo "$as_me: exit $exit_status" >&5
851 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
854 for ac_signal in 1 2 13 15; do
855 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
859 # confdefs.h avoids OS command line length limits that DEFS can exceed.
860 rm -rf conftest* confdefs.h
861 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
864 # Let the site file select an alternate cache file if it wants to.
865 # Prefer explicitly selected file to automatically selected ones.
866 if test -z "$CONFIG_SITE"; then
867 if test "x$prefix" != xNONE; then
868 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
870 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
873 for ac_site_file in $CONFIG_SITE; do
874 if test -r "$ac_site_file"; then
875 { echo "$as_me:875: loading site script $ac_site_file" >&5
876 echo "$as_me: loading site script $ac_site_file" >&6;}
877 cat "$ac_site_file" >&5
882 if test -r "$cache_file"; then
883 # Some versions of bash will fail to source /dev/null (special
884 # files actually), so we avoid doing that.
885 if test -f "$cache_file"; then
886 { echo "$as_me:886: loading cache $cache_file" >&5
887 echo "$as_me: loading cache $cache_file" >&6;}
889 [\\/]* | ?:[\\/]* ) . $cache_file;;
894 { echo "$as_me:894: creating cache $cache_file" >&5
895 echo "$as_me: creating cache $cache_file" >&6;}
899 # Check that the precious variables saved in the cache have kept the same
901 ac_cache_corrupted=false
902 for ac_var in `(set) 2>&1 |
903 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
904 eval ac_old_set=\$ac_cv_env_${ac_var}_set
905 eval ac_new_set=\$ac_env_${ac_var}_set
906 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
907 eval ac_new_val="\$ac_env_${ac_var}_value"
908 case $ac_old_set,$ac_new_set in
910 { echo "$as_me:910: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
911 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
912 ac_cache_corrupted=: ;;
914 { echo "$as_me:914: error: \`$ac_var' was not set in the previous run" >&5
915 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
916 ac_cache_corrupted=: ;;
919 if test "x$ac_old_val" != "x$ac_new_val"; then
920 { echo "$as_me:920: error: \`$ac_var' has changed since the previous run:" >&5
921 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
922 { echo "$as_me:922: former value: $ac_old_val" >&5
923 echo "$as_me: former value: $ac_old_val" >&2;}
924 { echo "$as_me:924: current value: $ac_new_val" >&5
925 echo "$as_me: current value: $ac_new_val" >&2;}
929 # Pass precious variables to config.status. It doesn't matter if
930 # we pass some twice (in addition to the command line arguments).
931 if test "$ac_new_set" = set; then
933 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
935 ac_configure_args="$ac_configure_args '$ac_arg'"
937 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
942 if $ac_cache_corrupted; then
943 { echo "$as_me:943: error: changes in the environment can compromise the build" >&5
944 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
945 { { echo "$as_me:945: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
946 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
947 { (exit 1); exit 1; }; }
951 ac_cpp='$CPP $CPPFLAGS'
952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
955 ac_main_return=return
957 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
958 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
960 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
961 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
963 echo "#! $SHELL" >conftest.sh
964 echo "exit 0" >>conftest.sh
966 if { (echo "$as_me:966: PATH=\".;.\"; conftest.sh") >&5
967 (PATH=".;."; conftest.sh) 2>&5
969 echo "$as_me:969: \$? = $ac_status" >&5
970 (exit $ac_status); }; then
971 ac_path_separator=';'
975 PATH_SEPARATOR="$ac_path_separator"
978 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
980 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
982 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
985 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986 if test -f $ac_dir/install-sh; then
988 ac_install_sh="$ac_aux_dir/install-sh -c"
990 elif test -f $ac_dir/install.sh; then
992 ac_install_sh="$ac_aux_dir/install.sh -c"
994 elif test -f $ac_dir/shtool; then
996 ac_install_sh="$ac_aux_dir/shtool install -c"
1000 if test -z "$ac_aux_dir"; then
1001 { { echo "$as_me:1001: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1002 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1003 { (exit 1); exit 1; }; }
1005 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1006 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1007 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1009 # Make sure we can run config.sub.
1010 $ac_config_sub sun4 >/dev/null 2>&1 ||
1011 { { echo "$as_me:1011: error: cannot run $ac_config_sub" >&5
1012 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1013 { (exit 1); exit 1; }; }
1015 echo "$as_me:1015: checking build system type" >&5
1016 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1017 if test "${ac_cv_build+set}" = set; then
1018 echo $ECHO_N "(cached) $ECHO_C" >&6
1020 ac_cv_build_alias=$build_alias
1021 test -z "$ac_cv_build_alias" &&
1022 ac_cv_build_alias=`$ac_config_guess`
1023 test -z "$ac_cv_build_alias" &&
1024 { { echo "$as_me:1024: error: cannot guess build type; you must specify one" >&5
1025 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1026 { (exit 1); exit 1; }; }
1027 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1028 { { echo "$as_me:1028: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1029 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1030 { (exit 1); exit 1; }; }
1033 echo "$as_me:1033: result: $ac_cv_build" >&5
1034 echo "${ECHO_T}$ac_cv_build" >&6
1036 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1037 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1038 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1040 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1041 echo "$as_me:1041: checking host system type" >&5
1042 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1043 if test "${ac_cv_host+set}" = set; then
1044 echo $ECHO_N "(cached) $ECHO_C" >&6
1046 ac_cv_host_alias=$host_alias
1047 test -z "$ac_cv_host_alias" &&
1048 ac_cv_host_alias=$ac_cv_build_alias
1049 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1050 { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1051 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1052 { (exit 1); exit 1; }; }
1055 echo "$as_me:1055: result: $ac_cv_host" >&5
1056 echo "${ECHO_T}$ac_cv_host" >&6
1058 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1059 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1060 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1062 system_name="$host_os"
1064 system_name="`(uname -s -r) 2>/dev/null`"
1065 if test -z "$system_name" ; then
1066 system_name="`(hostname) 2>/dev/null`"
1069 test -n "$system_name" &&
1070 cat >>confdefs.h <<EOF
1071 #define SYSTEM_NAME "$system_name"
1074 if test "${cf_cv_system_name+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1077 cf_cv_system_name="$system_name"
1080 test -z "$system_name" && system_name="$cf_cv_system_name"
1081 test -n "$cf_cv_system_name" && echo "$as_me:1081: result: Configuring for $cf_cv_system_name" >&5
1082 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1084 if test ".$system_name" != ".$cf_cv_system_name" ; then
1085 echo "$as_me:1085: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1086 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1087 { { echo "$as_me:1087: error: \"Please remove config.cache and try again.\"" >&5
1088 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1089 { (exit 1); exit 1; }; }
1092 test "$program_prefix" != NONE &&
1093 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1094 # Use a double $ so make ignores it.
1095 test "$program_suffix" != NONE &&
1096 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1097 # Double any \ or $. echo might interpret backslashes.
1098 # By default was `s,x,x', remove it if useless.
1099 cat <<\_ACEOF >conftest.sed
1100 s/[\\$]/&&/g;s/;s,x,x,$//
1102 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1105 echo "$as_me:1105: checking whether ${MAKE-make} sets \${MAKE}" >&5
1106 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1107 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1108 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1109 echo $ECHO_N "(cached) $ECHO_C" >&6
1111 cat >conftest.make <<\EOF
1113 @echo 'ac_maketemp="${MAKE}"'
1115 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1116 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1117 if test -n "$ac_maketemp"; then
1118 eval ac_cv_prog_make_${ac_make}_set=yes
1120 eval ac_cv_prog_make_${ac_make}_set=no
1124 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1125 echo "$as_me:1125: result: yes" >&5
1126 echo "${ECHO_T}yes" >&6
1129 echo "$as_me:1129: result: no" >&5
1130 echo "${ECHO_T}no" >&6
1131 SET_MAKE="MAKE=${MAKE-make}"
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140 if test -n "$ac_tool_prefix"; then
1141 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1142 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1143 echo "$as_me:1143: checking for $ac_word" >&5
1144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145 if test "${ac_cv_prog_CC+set}" = set; then
1146 echo $ECHO_N "(cached) $ECHO_C" >&6
1148 if test -n "$CC"; then
1149 ac_cv_prog_CC="$CC" # Let the user override the test.
1151 ac_save_IFS=$IFS; IFS=$ac_path_separator
1153 for ac_dir in $ac_dummy; do
1155 test -z "$ac_dir" && ac_dir=.
1156 $as_executable_p "$ac_dir/$ac_word" || continue
1157 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1158 echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1165 if test -n "$CC"; then
1166 echo "$as_me:1166: result: $CC" >&5
1167 echo "${ECHO_T}$CC" >&6
1169 echo "$as_me:1169: result: no" >&5
1170 echo "${ECHO_T}no" >&6
1174 if test -z "$ac_cv_prog_CC"; then
1176 # Extract the first word of "gcc", so it can be a program name with args.
1177 set dummy gcc; ac_word=$2
1178 echo "$as_me:1178: checking for $ac_word" >&5
1179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181 echo $ECHO_N "(cached) $ECHO_C" >&6
1183 if test -n "$ac_ct_CC"; then
1184 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1186 ac_save_IFS=$IFS; IFS=$ac_path_separator
1188 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 $as_executable_p "$ac_dir/$ac_word" || continue
1192 ac_cv_prog_ac_ct_CC="gcc"
1193 echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1199 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200 if test -n "$ac_ct_CC"; then
1201 echo "$as_me:1201: result: $ac_ct_CC" >&5
1202 echo "${ECHO_T}$ac_ct_CC" >&6
1204 echo "$as_me:1204: result: no" >&5
1205 echo "${ECHO_T}no" >&6
1213 if test -z "$CC"; then
1214 if test -n "$ac_tool_prefix"; then
1215 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1216 set dummy ${ac_tool_prefix}cc; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_CC+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$CC"; then
1223 ac_cv_prog_CC="$CC" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_CC="${ac_tool_prefix}cc"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1239 if test -n "$CC"; then
1240 echo "$as_me:1240: result: $CC" >&5
1241 echo "${ECHO_T}$CC" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1248 if test -z "$ac_cv_prog_CC"; then
1250 # Extract the first word of "cc", so it can be a program name with args.
1251 set dummy cc; ac_word=$2
1252 echo "$as_me:1252: checking for $ac_word" >&5
1253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1254 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1257 if test -n "$ac_ct_CC"; then
1258 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1260 ac_save_IFS=$IFS; IFS=$ac_path_separator
1262 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 $as_executable_p "$ac_dir/$ac_word" || continue
1266 ac_cv_prog_ac_ct_CC="cc"
1267 echo "$as_me:1267: found $ac_dir/$ac_word" >&5
1273 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1274 if test -n "$ac_ct_CC"; then
1275 echo "$as_me:1275: result: $ac_ct_CC" >&5
1276 echo "${ECHO_T}$ac_ct_CC" >&6
1278 echo "$as_me:1278: result: no" >&5
1279 echo "${ECHO_T}no" >&6
1288 if test -z "$CC"; then
1289 # Extract the first word of "cc", so it can be a program name with args.
1290 set dummy cc; ac_word=$2
1291 echo "$as_me:1291: checking for $ac_word" >&5
1292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1293 if test "${ac_cv_prog_CC+set}" = set; then
1294 echo $ECHO_N "(cached) $ECHO_C" >&6
1296 if test -n "$CC"; then
1297 ac_cv_prog_CC="$CC" # Let the user override the test.
1300 ac_save_IFS=$IFS; IFS=$ac_path_separator
1302 for ac_dir in $ac_dummy; do
1304 test -z "$ac_dir" && ac_dir=.
1305 $as_executable_p "$ac_dir/$ac_word" || continue
1306 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1307 ac_prog_rejected=yes
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1315 if test $ac_prog_rejected = yes; then
1316 # We found a bogon in the path, so make sure we never use it.
1317 set dummy $ac_cv_prog_CC
1319 if test $# != 0; then
1320 # We chose a different compiler from the bogus one.
1321 # However, it has the same basename, so the bogon will be chosen
1322 # first if we set CC to just the basename; use the full file name.
1324 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1332 if test -n "$CC"; then
1333 echo "$as_me:1333: result: $CC" >&5
1334 echo "${ECHO_T}$CC" >&6
1336 echo "$as_me:1336: result: no" >&5
1337 echo "${ECHO_T}no" >&6
1341 if test -z "$CC"; then
1342 if test -n "$ac_tool_prefix"; then
1345 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1346 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1347 echo "$as_me:1347: checking for $ac_word" >&5
1348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1349 if test "${ac_cv_prog_CC+set}" = set; then
1350 echo $ECHO_N "(cached) $ECHO_C" >&6
1352 if test -n "$CC"; then
1353 ac_cv_prog_CC="$CC" # Let the user override the test.
1355 ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 for ac_dir in $ac_dummy; do
1359 test -z "$ac_dir" && ac_dir=.
1360 $as_executable_p "$ac_dir/$ac_word" || continue
1361 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1362 echo "$as_me:1362: found $ac_dir/$ac_word" >&5
1369 if test -n "$CC"; then
1370 echo "$as_me:1370: result: $CC" >&5
1371 echo "${ECHO_T}$CC" >&6
1373 echo "$as_me:1373: result: no" >&5
1374 echo "${ECHO_T}no" >&6
1377 test -n "$CC" && break
1380 if test -z "$CC"; then
1384 # Extract the first word of "$ac_prog", so it can be a program name with args.
1385 set dummy $ac_prog; ac_word=$2
1386 echo "$as_me:1386: checking for $ac_word" >&5
1387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1389 echo $ECHO_N "(cached) $ECHO_C" >&6
1391 if test -n "$ac_ct_CC"; then
1392 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1394 ac_save_IFS=$IFS; IFS=$ac_path_separator
1396 for ac_dir in $ac_dummy; do
1398 test -z "$ac_dir" && ac_dir=.
1399 $as_executable_p "$ac_dir/$ac_word" || continue
1400 ac_cv_prog_ac_ct_CC="$ac_prog"
1401 echo "$as_me:1401: found $ac_dir/$ac_word" >&5
1407 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1408 if test -n "$ac_ct_CC"; then
1409 echo "$as_me:1409: result: $ac_ct_CC" >&5
1410 echo "${ECHO_T}$ac_ct_CC" >&6
1412 echo "$as_me:1412: result: no" >&5
1413 echo "${ECHO_T}no" >&6
1416 test -n "$ac_ct_CC" && break
1424 test -z "$CC" && { { echo "$as_me:1424: error: no acceptable cc found in \$PATH" >&5
1425 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1426 { (exit 1); exit 1; }; }
1428 # Provide some information about the compiler.
1429 echo "$as_me:1429:" \
1430 "checking for C compiler version" >&5
1431 ac_compiler=`set X $ac_compile; echo $2`
1432 { (eval echo "$as_me:1432: \"$ac_compiler --version </dev/null >&5\"") >&5
1433 (eval $ac_compiler --version </dev/null >&5) 2>&5
1435 echo "$as_me:1435: \$? = $ac_status" >&5
1436 (exit $ac_status); }
1437 { (eval echo "$as_me:1437: \"$ac_compiler -v </dev/null >&5\"") >&5
1438 (eval $ac_compiler -v </dev/null >&5) 2>&5
1440 echo "$as_me:1440: \$? = $ac_status" >&5
1441 (exit $ac_status); }
1442 { (eval echo "$as_me:1442: \"$ac_compiler -V </dev/null >&5\"") >&5
1443 (eval $ac_compiler -V </dev/null >&5) 2>&5
1445 echo "$as_me:1445: \$? = $ac_status" >&5
1446 (exit $ac_status); }
1448 cat >conftest.$ac_ext <<_ACEOF
1449 #line 1449 "configure"
1450 #include "confdefs.h"
1460 ac_clean_files_save=$ac_clean_files
1461 ac_clean_files="$ac_clean_files a.out a.exe"
1462 # Try to create an executable without -o first, disregard a.out.
1463 # It will help us diagnose broken compilers, and finding out an intuition
1465 echo "$as_me:1465: checking for C compiler default output" >&5
1466 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1467 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1468 if { (eval echo "$as_me:1468: \"$ac_link_default\"") >&5
1469 (eval $ac_link_default) 2>&5
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit $ac_status); }; then
1473 # Find the output, starting from the most likely. This scheme is
1474 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1476 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1477 ls a.out conftest 2>/dev/null;
1478 ls a.* conftest.* 2>/dev/null`; do
1480 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481 a.out ) # We found the default executable, but exeext='' is most
1484 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1485 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1492 echo "$as_me: failed program was:" >&5
1493 cat conftest.$ac_ext >&5
1494 { { echo "$as_me:1494: error: C compiler cannot create executables" >&5
1495 echo "$as_me: error: C compiler cannot create executables" >&2;}
1496 { (exit 77); exit 77; }; }
1499 ac_exeext=$ac_cv_exeext
1500 echo "$as_me:1500: result: $ac_file" >&5
1501 echo "${ECHO_T}$ac_file" >&6
1503 # Check the compiler produces executables we can run. If not, either
1504 # the compiler is broken, or we cross compile.
1505 echo "$as_me:1505: checking whether the C compiler works" >&5
1506 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1507 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1508 # If not cross compiling, check that we can run a simple program.
1509 if test "$cross_compiling" != yes; then
1510 if { ac_try='./$ac_file'
1511 { (eval echo "$as_me:1511: \"$ac_try\"") >&5
1514 echo "$as_me:1514: \$? = $ac_status" >&5
1515 (exit $ac_status); }; }; then
1518 if test "$cross_compiling" = maybe; then
1521 { { echo "$as_me:1521: error: cannot run C compiled programs.
1522 If you meant to cross compile, use \`--host'." >&5
1523 echo "$as_me: error: cannot run C compiled programs.
1524 If you meant to cross compile, use \`--host'." >&2;}
1525 { (exit 1); exit 1; }; }
1529 echo "$as_me:1529: result: yes" >&5
1530 echo "${ECHO_T}yes" >&6
1532 rm -f a.out a.exe conftest$ac_cv_exeext
1533 ac_clean_files=$ac_clean_files_save
1534 # Check the compiler produces executables we can run. If not, either
1535 # the compiler is broken, or we cross compile.
1536 echo "$as_me:1536: checking whether we are cross compiling" >&5
1537 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1538 echo "$as_me:1538: result: $cross_compiling" >&5
1539 echo "${ECHO_T}$cross_compiling" >&6
1541 echo "$as_me:1541: checking for executable suffix" >&5
1542 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1543 if { (eval echo "$as_me:1543: \"$ac_link\"") >&5
1544 (eval $ac_link) 2>&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); }; then
1548 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1549 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1550 # work properly (i.e., refer to `conftest.exe'), while it won't with
1552 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1554 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1555 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1562 { { echo "$as_me:1562: error: cannot compute EXEEXT: cannot compile and link" >&5
1563 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1564 { (exit 1); exit 1; }; }
1567 rm -f conftest$ac_cv_exeext
1568 echo "$as_me:1568: result: $ac_cv_exeext" >&5
1569 echo "${ECHO_T}$ac_cv_exeext" >&6
1571 rm -f conftest.$ac_ext
1572 EXEEXT=$ac_cv_exeext
1574 echo "$as_me:1574: checking for object suffix" >&5
1575 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1576 if test "${ac_cv_objext+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1591 rm -f conftest.o conftest.obj
1592 if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); }; then
1597 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1599 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1600 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1605 echo "$as_me: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1607 { { echo "$as_me:1607: error: cannot compute OBJEXT: cannot compile" >&5
1608 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1609 { (exit 1); exit 1; }; }
1612 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1614 echo "$as_me:1614: result: $ac_cv_objext" >&5
1615 echo "${ECHO_T}$ac_cv_objext" >&6
1616 OBJEXT=$ac_cv_objext
1618 echo "$as_me:1618: checking whether we are using the GNU C compiler" >&5
1619 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1620 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1621 echo $ECHO_N "(cached) $ECHO_C" >&6
1623 cat >conftest.$ac_ext <<_ACEOF
1624 #line 1624 "configure"
1625 #include "confdefs.h"
1638 rm -f conftest.$ac_objext
1639 if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640 (eval $ac_compile) 2>&5
1642 echo "$as_me:1642: \$? = $ac_status" >&5
1643 (exit $ac_status); } &&
1644 { ac_try='test -s conftest.$ac_objext'
1645 { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); }; }; then
1652 echo "$as_me: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1656 rm -f conftest.$ac_objext conftest.$ac_ext
1657 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1660 echo "$as_me:1660: result: $ac_cv_c_compiler_gnu" >&5
1661 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1662 GCC=`test $ac_compiler_gnu = yes && echo yes`
1663 ac_test_CFLAGS=${CFLAGS+set}
1664 ac_save_CFLAGS=$CFLAGS
1666 echo "$as_me:1666: checking whether $CC accepts -g" >&5
1667 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1668 if test "${ac_cv_prog_cc_g+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1671 cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1683 rm -f conftest.$ac_objext
1684 if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5
1685 (eval $ac_compile) 2>&5
1687 echo "$as_me:1687: \$? = $ac_status" >&5
1688 (exit $ac_status); } &&
1689 { ac_try='test -s conftest.$ac_objext'
1690 { (eval echo "$as_me:1690: \"$ac_try\"") >&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); }; }; then
1697 echo "$as_me: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1701 rm -f conftest.$ac_objext conftest.$ac_ext
1703 echo "$as_me:1703: result: $ac_cv_prog_cc_g" >&5
1704 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1705 if test "$ac_test_CFLAGS" = set; then
1706 CFLAGS=$ac_save_CFLAGS
1707 elif test $ac_cv_prog_cc_g = yes; then
1708 if test "$GCC" = yes; then
1714 if test "$GCC" = yes; then
1720 # Some people use a C++ compiler to compile C. Since we use `exit',
1721 # in C++ we need to declare it. In case someone uses the same compiler
1722 # for both compiling C and C++ we need to have the C++ compiler decide
1723 # the declaration of exit, since it's the most demanding environment.
1724 cat >conftest.$ac_ext <<_ACEOF
1729 rm -f conftest.$ac_objext
1730 if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731 (eval $ac_compile) 2>&5
1733 echo "$as_me:1733: \$? = $ac_status" >&5
1734 (exit $ac_status); } &&
1735 { ac_try='test -s conftest.$ac_objext'
1736 { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); }; }; then
1741 for ac_declaration in \
1743 '#include <stdlib.h>' \
1744 'extern "C" void std::exit (int) throw (); using std::exit;' \
1745 'extern "C" void std::exit (int); using std::exit;' \
1746 'extern "C" void exit (int) throw ();' \
1747 'extern "C" void exit (int);' \
1750 cat >conftest.$ac_ext <<_ACEOF
1751 #line 1751 "configure"
1752 #include "confdefs.h"
1763 rm -f conftest.$ac_objext
1764 if { (eval echo "$as_me:1764: \"$ac_compile\"") >&5
1765 (eval $ac_compile) 2>&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); } &&
1769 { ac_try='test -s conftest.$ac_objext'
1770 { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); }; }; then
1777 echo "$as_me: failed program was:" >&5
1778 cat conftest.$ac_ext >&5
1781 rm -f conftest.$ac_objext conftest.$ac_ext
1782 cat >conftest.$ac_ext <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1794 rm -f conftest.$ac_objext
1795 if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit $ac_status); } &&
1800 { ac_try='test -s conftest.$ac_objext'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); }; }; then
1808 echo "$as_me: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
1811 rm -f conftest.$ac_objext conftest.$ac_ext
1814 if test -n "$ac_declaration"; then
1815 echo '#ifdef __cplusplus' >>confdefs.h
1816 echo $ac_declaration >>confdefs.h
1817 echo '#endif' >>confdefs.h
1821 echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1824 rm -f conftest.$ac_objext conftest.$ac_ext
1826 ac_cpp='$CPP $CPPFLAGS'
1827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830 ac_main_return=return
1833 if test "$GCC" = yes ; then
1834 echo "$as_me:1834: checking version of $CC" >&5
1835 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1836 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1837 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1838 echo "$as_me:1838: result: $GCC_VERSION" >&5
1839 echo "${ECHO_T}$GCC_VERSION" >&6
1842 echo "$as_me:1842: checking for $CC option to accept ANSI C" >&5
1843 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1844 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1845 echo $ECHO_N "(cached) $ECHO_C" >&6
1847 ac_cv_prog_cc_stdc=no
1849 cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1854 #include <sys/types.h>
1855 #include <sys/stat.h>
1856 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1857 struct buf { int x; };
1858 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1859 static char *e (p, i)
1865 static char *f (char * (*g) (char **, int), char **p, ...)
1870 s = g (p, va_arg (v,int));
1874 int test (int i, double x);
1875 struct s1 {int (*f) (int a);};
1876 struct s2 {int (*f) (double a);};
1877 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1883 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1888 # Don't try gcc -ansi; that turns off useful extensions and
1889 # breaks some systems' header files.
1890 # AIX -qlanglvl=ansi
1891 # Ultrix and OSF/1 -std1
1892 # HP-UX 10.20 and later -Ae
1893 # HP-UX older versions -Aa -D_HPUX_SOURCE
1894 # SVR4 -Xc -D__EXTENSIONS__
1895 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1897 CC="$ac_save_CC $ac_arg"
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900 (eval $ac_compile) 2>&5
1902 echo "$as_me:1902: \$? = $ac_status" >&5
1903 (exit $ac_status); } &&
1904 { ac_try='test -s conftest.$ac_objext'
1905 { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); }; }; then
1910 ac_cv_prog_cc_stdc=$ac_arg
1913 echo "$as_me: failed program was:" >&5
1914 cat conftest.$ac_ext >&5
1916 rm -f conftest.$ac_objext
1918 rm -f conftest.$ac_ext conftest.$ac_objext
1923 case "x$ac_cv_prog_cc_stdc" in
1925 echo "$as_me:1925: result: none needed" >&5
1926 echo "${ECHO_T}none needed" >&6 ;;
1928 echo "$as_me:1928: result: $ac_cv_prog_cc_stdc" >&5
1929 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1930 CC="$CC $ac_cv_prog_cc_stdc" ;;
1933 # This should have been defined by AC_PROG_CC
1936 echo "$as_me:1936: checking \$CC variable" >&5
1937 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1940 echo "$as_me:1940: result: broken" >&5
1941 echo "${ECHO_T}broken" >&6
1942 { echo "$as_me:1942: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1943 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1945 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1946 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1951 cf_new_extra_cppflags=
1953 for cf_add_cflags in $cf_flags
1955 case $cf_fix_cppflags in
1957 case $cf_add_cflags in
1958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1959 case $cf_add_cflags in
1961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1964 && test -z "${cf_tst_cflags}" \
1965 && cf_fix_cppflags=yes
1967 if test $cf_fix_cppflags = yes ; then
1968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1970 elif test "${cf_tst_cflags}" = "\"'" ; then
1971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1980 case $cf_add_cflags in
1982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1984 CPPFLAGS=`echo "$CPPFLAGS" | \
1985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2005 && test -z "${cf_tst_cflags}" \
2006 && cf_fix_cppflags=no
2011 if test -n "$cf_new_cflags" ; then
2013 CFLAGS="$CFLAGS $cf_new_cflags"
2016 if test -n "$cf_new_cppflags" ; then
2018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2021 if test -n "$cf_new_extra_cppflags" ; then
2023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2028 echo "$as_me:2028: result: ok" >&5
2029 echo "${ECHO_T}ok" >&6
2034 ac_cpp='$CPP $CPPFLAGS'
2035 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2036 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2037 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2038 ac_main_return=return
2039 echo "$as_me:2039: checking how to run the C preprocessor" >&5
2040 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2041 # On Suns, sometimes $CPP names a directory.
2042 if test -n "$CPP" && test -d "$CPP"; then
2045 if test -z "$CPP"; then
2046 if test "${ac_cv_prog_CPP+set}" = set; then
2047 echo $ECHO_N "(cached) $ECHO_C" >&6
2049 # Double quotes because CPP needs to be expanded
2050 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2053 for ac_c_preproc_warn_flag in '' yes
2055 # Use a header file that comes with gcc, so configuring glibc
2056 # with a fresh cross-compiler works.
2057 # On the NeXT, cc -E runs the code through the compiler's parser,
2058 # not just through cpp. "Syntax error" is here to catch this case.
2059 cat >conftest.$ac_ext <<_ACEOF
2060 #line 2060 "configure"
2061 #include "confdefs.h"
2065 if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
2066 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2068 egrep -v '^ *\+' conftest.er1 >conftest.err
2070 cat conftest.err >&5
2071 echo "$as_me:2071: \$? = $ac_status" >&5
2072 (exit $ac_status); } >/dev/null; then
2073 if test -s conftest.err; then
2074 ac_cpp_err=$ac_c_preproc_warn_flag
2081 if test -z "$ac_cpp_err"; then
2084 echo "$as_me: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 # Broken: fails on valid input.
2089 rm -f conftest.err conftest.$ac_ext
2091 # OK, works on sane cases. Now check whether non-existent headers
2092 # can be detected and how.
2093 cat >conftest.$ac_ext <<_ACEOF
2094 #line 2094 "configure"
2095 #include "confdefs.h"
2096 #include <ac_nonexistent.h>
2098 if { (eval echo "$as_me:2098: \"$ac_cpp conftest.$ac_ext\"") >&5
2099 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2101 egrep -v '^ *\+' conftest.er1 >conftest.err
2103 cat conftest.err >&5
2104 echo "$as_me:2104: \$? = $ac_status" >&5
2105 (exit $ac_status); } >/dev/null; then
2106 if test -s conftest.err; then
2107 ac_cpp_err=$ac_c_preproc_warn_flag
2114 if test -z "$ac_cpp_err"; then
2115 # Broken: success on invalid input.
2118 echo "$as_me: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2120 # Passes both tests.
2124 rm -f conftest.err conftest.$ac_ext
2127 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2128 rm -f conftest.err conftest.$ac_ext
2129 if $ac_preproc_ok; then
2141 echo "$as_me:2141: result: $CPP" >&5
2142 echo "${ECHO_T}$CPP" >&6
2144 for ac_c_preproc_warn_flag in '' yes
2146 # Use a header file that comes with gcc, so configuring glibc
2147 # with a fresh cross-compiler works.
2148 # On the NeXT, cc -E runs the code through the compiler's parser,
2149 # not just through cpp. "Syntax error" is here to catch this case.
2150 cat >conftest.$ac_ext <<_ACEOF
2151 #line 2151 "configure"
2152 #include "confdefs.h"
2156 if { (eval echo "$as_me:2156: \"$ac_cpp conftest.$ac_ext\"") >&5
2157 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2159 egrep -v '^ *\+' conftest.er1 >conftest.err
2161 cat conftest.err >&5
2162 echo "$as_me:2162: \$? = $ac_status" >&5
2163 (exit $ac_status); } >/dev/null; then
2164 if test -s conftest.err; then
2165 ac_cpp_err=$ac_c_preproc_warn_flag
2172 if test -z "$ac_cpp_err"; then
2175 echo "$as_me: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2177 # Broken: fails on valid input.
2180 rm -f conftest.err conftest.$ac_ext
2182 # OK, works on sane cases. Now check whether non-existent headers
2183 # can be detected and how.
2184 cat >conftest.$ac_ext <<_ACEOF
2185 #line 2185 "configure"
2186 #include "confdefs.h"
2187 #include <ac_nonexistent.h>
2189 if { (eval echo "$as_me:2189: \"$ac_cpp conftest.$ac_ext\"") >&5
2190 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2192 egrep -v '^ *\+' conftest.er1 >conftest.err
2194 cat conftest.err >&5
2195 echo "$as_me:2195: \$? = $ac_status" >&5
2196 (exit $ac_status); } >/dev/null; then
2197 if test -s conftest.err; then
2198 ac_cpp_err=$ac_c_preproc_warn_flag
2205 if test -z "$ac_cpp_err"; then
2206 # Broken: success on invalid input.
2209 echo "$as_me: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 # Passes both tests.
2215 rm -f conftest.err conftest.$ac_ext
2218 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2219 rm -f conftest.err conftest.$ac_ext
2220 if $ac_preproc_ok; then
2223 { { echo "$as_me:2223: error: C preprocessor \"$CPP\" fails sanity check" >&5
2224 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2225 { (exit 1); exit 1; }; }
2229 ac_cpp='$CPP $CPPFLAGS'
2230 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2231 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2232 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2233 ac_main_return=return
2235 for ac_prog in mawk gawk nawk awk
2237 # Extract the first word of "$ac_prog", so it can be a program name with args.
2238 set dummy $ac_prog; ac_word=$2
2239 echo "$as_me:2239: checking for $ac_word" >&5
2240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2241 if test "${ac_cv_prog_AWK+set}" = set; then
2242 echo $ECHO_N "(cached) $ECHO_C" >&6
2244 if test -n "$AWK"; then
2245 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2247 ac_save_IFS=$IFS; IFS=$ac_path_separator
2249 for ac_dir in $ac_dummy; do
2251 test -z "$ac_dir" && ac_dir=.
2252 $as_executable_p "$ac_dir/$ac_word" || continue
2253 ac_cv_prog_AWK="$ac_prog"
2254 echo "$as_me:2254: found $ac_dir/$ac_word" >&5
2261 if test -n "$AWK"; then
2262 echo "$as_me:2262: result: $AWK" >&5
2263 echo "${ECHO_T}$AWK" >&6
2265 echo "$as_me:2265: result: no" >&5
2266 echo "${ECHO_T}no" >&6
2269 test -n "$AWK" && break
2272 # Find a good install program. We prefer a C program (faster),
2273 # so one script is as good as another. But avoid the broken or
2274 # incompatible versions:
2275 # SysV /etc/install, /usr/sbin/install
2276 # SunOS /usr/etc/install
2277 # IRIX /sbin/install
2279 # AmigaOS /C/install, which installs bootblocks on floppy discs
2280 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2281 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2282 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2283 # ./install, which can be erroneously created by make from ./install.sh.
2284 echo "$as_me:2284: checking for a BSD compatible install" >&5
2285 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2286 if test -z "$INSTALL"; then
2287 if test "${ac_cv_path_install+set}" = set; then
2288 echo $ECHO_N "(cached) $ECHO_C" >&6
2290 ac_save_IFS=$IFS; IFS=$ac_path_separator
2291 for ac_dir in $PATH; do
2293 # Account for people who put trailing slashes in PATH elements.
2295 / | ./ | .// | /cC/* \
2296 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2299 # OSF1 and SCO ODT 3.0 have their own names for install.
2300 # Don't use installbsd from OSF since it installs stuff as root
2302 for ac_prog in ginstall scoinst install; do
2303 if $as_executable_p "$ac_dir/$ac_prog"; then
2304 if test $ac_prog = install &&
2305 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2306 # AIX install. It has an incompatible calling convention.
2308 elif test $ac_prog = install &&
2309 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2310 # program-specific install script used by HP pwplus--don't use.
2313 ac_cv_path_install="$ac_dir/$ac_prog -c"
2323 if test "${ac_cv_path_install+set}" = set; then
2324 INSTALL=$ac_cv_path_install
2326 # As a last resort, use the slow shell script. We don't cache a
2327 # path for INSTALL within a source directory, because that will
2328 # break other packages using the cache if that directory is
2329 # removed, or if the path is relative.
2330 INSTALL=$ac_install_sh
2333 echo "$as_me:2333: result: $INSTALL" >&5
2334 echo "${ECHO_T}$INSTALL" >&6
2336 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2337 # It thinks the first close brace ends the variable substitution.
2338 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2340 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2342 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2348 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2349 test -z "$cf_dir" && cf_dir=.
2350 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2354 for ac_prog in tdlint lint alint splint lclint
2356 # Extract the first word of "$ac_prog", so it can be a program name with args.
2357 set dummy $ac_prog; ac_word=$2
2358 echo "$as_me:2358: checking for $ac_word" >&5
2359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2360 if test "${ac_cv_prog_LINT+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2363 if test -n "$LINT"; then
2364 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2366 ac_save_IFS=$IFS; IFS=$ac_path_separator
2368 for ac_dir in $ac_dummy; do
2370 test -z "$ac_dir" && ac_dir=.
2371 $as_executable_p "$ac_dir/$ac_word" || continue
2372 ac_cv_prog_LINT="$ac_prog"
2373 echo "$as_me:2373: found $ac_dir/$ac_word" >&5
2379 LINT=$ac_cv_prog_LINT
2380 if test -n "$LINT"; then
2381 echo "$as_me:2381: result: $LINT" >&5
2382 echo "${ECHO_T}$LINT" >&6
2384 echo "$as_me:2384: result: no" >&5
2385 echo "${ECHO_T}no" >&6
2388 test -n "$LINT" && break
2391 echo "$as_me:2391: checking if filesystem supports mixed-case filenames" >&5
2392 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2393 if test "${cf_cv_mixedcase+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
2397 if test "$cross_compiling" = yes ; then
2398 case $target_alias in
2399 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2407 rm -f conftest CONFTEST
2409 if test -f CONFTEST ; then
2414 rm -f conftest CONFTEST
2418 echo "$as_me:2418: result: $cf_cv_mixedcase" >&5
2419 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2420 test "$cf_cv_mixedcase" = yes &&
2421 cat >>confdefs.h <<\EOF
2422 #define MIXEDCASE_FILENAMES 1
2425 for ac_prog in exctags ctags
2427 # Extract the first word of "$ac_prog", so it can be a program name with args.
2428 set dummy $ac_prog; ac_word=$2
2429 echo "$as_me:2429: checking for $ac_word" >&5
2430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2431 if test "${ac_cv_prog_CTAGS+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2434 if test -n "$CTAGS"; then
2435 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2437 ac_save_IFS=$IFS; IFS=$ac_path_separator
2439 for ac_dir in $ac_dummy; do
2441 test -z "$ac_dir" && ac_dir=.
2442 $as_executable_p "$ac_dir/$ac_word" || continue
2443 ac_cv_prog_CTAGS="$ac_prog"
2444 echo "$as_me:2444: found $ac_dir/$ac_word" >&5
2450 CTAGS=$ac_cv_prog_CTAGS
2451 if test -n "$CTAGS"; then
2452 echo "$as_me:2452: result: $CTAGS" >&5
2453 echo "${ECHO_T}$CTAGS" >&6
2455 echo "$as_me:2455: result: no" >&5
2456 echo "${ECHO_T}no" >&6
2459 test -n "$CTAGS" && break
2462 for ac_prog in exetags etags
2464 # Extract the first word of "$ac_prog", so it can be a program name with args.
2465 set dummy $ac_prog; ac_word=$2
2466 echo "$as_me:2466: checking for $ac_word" >&5
2467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2468 if test "${ac_cv_prog_ETAGS+set}" = set; then
2469 echo $ECHO_N "(cached) $ECHO_C" >&6
2471 if test -n "$ETAGS"; then
2472 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2474 ac_save_IFS=$IFS; IFS=$ac_path_separator
2476 for ac_dir in $ac_dummy; do
2478 test -z "$ac_dir" && ac_dir=.
2479 $as_executable_p "$ac_dir/$ac_word" || continue
2480 ac_cv_prog_ETAGS="$ac_prog"
2481 echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2487 ETAGS=$ac_cv_prog_ETAGS
2488 if test -n "$ETAGS"; then
2489 echo "$as_me:2489: result: $ETAGS" >&5
2490 echo "${ECHO_T}$ETAGS" >&6
2492 echo "$as_me:2492: result: no" >&5
2493 echo "${ECHO_T}no" >&6
2496 test -n "$ETAGS" && break
2499 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2500 set dummy ${CTAGS:-ctags}; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2504 echo $ECHO_N "(cached) $ECHO_C" >&6
2506 if test -n "$MAKE_LOWER_TAGS"; then
2507 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2509 ac_save_IFS=$IFS; IFS=$ac_path_separator
2511 for ac_dir in $ac_dummy; do
2513 test -z "$ac_dir" && ac_dir=.
2514 $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2520 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2523 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2524 if test -n "$MAKE_LOWER_TAGS"; then
2525 echo "$as_me:2525: result: $MAKE_LOWER_TAGS" >&5
2526 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2528 echo "$as_me:2528: result: no" >&5
2529 echo "${ECHO_T}no" >&6
2532 if test "$cf_cv_mixedcase" = yes ; then
2533 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2534 set dummy ${ETAGS:-etags}; ac_word=$2
2535 echo "$as_me:2535: checking for $ac_word" >&5
2536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2537 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2538 echo $ECHO_N "(cached) $ECHO_C" >&6
2540 if test -n "$MAKE_UPPER_TAGS"; then
2541 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2543 ac_save_IFS=$IFS; IFS=$ac_path_separator
2545 for ac_dir in $ac_dummy; do
2547 test -z "$ac_dir" && ac_dir=.
2548 $as_executable_p "$ac_dir/$ac_word" || continue
2549 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2550 echo "$as_me:2550: found $ac_dir/$ac_word" >&5
2554 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2557 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2558 if test -n "$MAKE_UPPER_TAGS"; then
2559 echo "$as_me:2559: result: $MAKE_UPPER_TAGS" >&5
2560 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2562 echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2570 if test "$MAKE_UPPER_TAGS" = yes ; then
2576 if test "$MAKE_LOWER_TAGS" = yes ; then
2582 echo "$as_me:2582: checking if -lm needed for math functions" >&5
2583 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2584 if test "${cf_cv_need_libm+set}" = set; then
2585 echo $ECHO_N "(cached) $ECHO_C" >&6
2588 cat >conftest.$ac_ext <<_ACEOF
2589 #line 2589 "configure"
2590 #include "confdefs.h"
2598 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2603 rm -f conftest.$ac_objext conftest$ac_exeext
2604 if { (eval echo "$as_me:2604: \"$ac_link\"") >&5
2605 (eval $ac_link) 2>&5
2607 echo "$as_me:2607: \$? = $ac_status" >&5
2608 (exit $ac_status); } &&
2609 { ac_try='test -s conftest$ac_exeext'
2610 { (eval echo "$as_me:2610: \"$ac_try\"") >&5
2613 echo "$as_me:2613: \$? = $ac_status" >&5
2614 (exit $ac_status); }; }; then
2617 echo "$as_me: failed program was:" >&5
2618 cat conftest.$ac_ext >&5
2621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2623 echo "$as_me:2623: result: $cf_cv_need_libm" >&5
2624 echo "${ECHO_T}$cf_cv_need_libm" >&6
2625 if test "$cf_cv_need_libm" = yes
2633 CC_SHARED_OPTS=unknown
2634 CPPFLAGS="$CPPFLAGS"
2636 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2637 DFT_UPR_MODEL="NORMAL"
2650 PACKAGE="ncurses-examples"
2656 TINFO_LIBS='$(LIBS_CURSES)'
2657 cf_cv_abi_version=""
2658 cf_cv_rel_version=""
2664 if test "$GCC" = yes
2666 cat > conftest.i <<EOF
2668 #define GCC_PRINTF 0
2673 #ifndef GCC_NORETURN
2674 #define GCC_NORETURN /* nothing */
2677 #define GCC_UNUSED /* nothing */
2680 if test "$GCC" = yes
2682 { echo "$as_me:2682: checking for $CC __attribute__ directives..." >&5
2683 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2684 cat > conftest.$ac_ext <<EOF
2685 #line 2685 "${as_me:-configure}"
2686 #include "confdefs.h"
2687 #include "conftest.h"
2688 #include "conftest.i"
2690 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2692 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2695 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2697 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2699 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2700 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2701 extern void foo(void) GCC_NORETURN;
2702 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2704 cf_printf_attribute=no
2705 cf_scanf_attribute=no
2706 for cf_attribute in scanf printf unused noreturn
2709 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2711 cf_directive="__attribute__(($cf_attribute))"
2712 echo "checking for $CC $cf_directive" 1>&5
2714 case $cf_attribute in
2716 cf_printf_attribute=yes
2717 cat >conftest.h <<EOF
2718 #define GCC_$cf_ATTRIBUTE 1
2722 cf_scanf_attribute=yes
2723 cat >conftest.h <<EOF
2724 #define GCC_$cf_ATTRIBUTE 1
2728 cat >conftest.h <<EOF
2729 #define GCC_$cf_ATTRIBUTE $cf_directive
2734 if { (eval echo "$as_me:2734: \"$ac_compile\"") >&5
2735 (eval $ac_compile) 2>&5
2737 echo "$as_me:2737: \$? = $ac_status" >&5
2738 (exit $ac_status); }; then
2739 test -n "$verbose" && echo "$as_me:2739: result: ... $cf_attribute" >&5
2740 echo "${ECHO_T}... $cf_attribute" >&6
2741 cat conftest.h >>confdefs.h
2742 case $cf_attribute in
2745 cat >>confdefs.h <<EOF
2746 #define GCC_NORETURN $cf_directive
2751 cf_value='/* nothing */'
2752 if test "$cf_printf_attribute" != no ; then
2753 cf_value='__attribute__((format(printf,fmt,var)))'
2755 cat >>confdefs.h <<\EOF
2756 #define GCC_PRINTF 1
2761 cat >>confdefs.h <<EOF
2762 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2767 cf_value='/* nothing */'
2768 if test "$cf_scanf_attribute" != no ; then
2769 cf_value='__attribute__((format(scanf,fmt,var)))'
2771 cat >>confdefs.h <<\EOF
2777 cat >>confdefs.h <<EOF
2778 #define GCC_SCANFLIKE(fmt,var) $cf_value
2784 cat >>confdefs.h <<EOF
2785 #define GCC_UNUSED $cf_directive
2793 fgrep define conftest.i >>confdefs.h
2799 cf_POSIX_C_SOURCE=199506L
2804 cf_xopen_source="-D_ALL_SOURCE"
2810 cf_xopen_source="-D_APPLE_C_SOURCE"
2813 cf_xopen_source="-D_DARWIN_C_SOURCE"
2816 (freebsd*|dragonfly*)
2817 # 5.x headers associate
2818 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2819 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2820 cf_POSIX_C_SOURCE=200112L
2822 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2825 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2828 cf_xopen_source="-D_HPUX_SOURCE"
2831 cf_xopen_source="-D_SGI_SOURCE"
2834 (linux*|gnu*|mint*|k*bsd*-gnu)
2836 echo "$as_me:2836: checking if we must define _GNU_SOURCE" >&5
2837 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2838 if test "${cf_cv_gnu_source+set}" = set; then
2839 echo $ECHO_N "(cached) $ECHO_C" >&6
2842 cat >conftest.$ac_ext <<_ACEOF
2843 #line 2843 "configure"
2844 #include "confdefs.h"
2845 #include <sys/types.h>
2850 #ifndef _XOPEN_SOURCE
2857 rm -f conftest.$ac_objext
2858 if { (eval echo "$as_me:2858: \"$ac_compile\"") >&5
2859 (eval $ac_compile) 2>&5
2861 echo "$as_me:2861: \$? = $ac_status" >&5
2862 (exit $ac_status); } &&
2863 { ac_try='test -s conftest.$ac_objext'
2864 { (eval echo "$as_me:2864: \"$ac_try\"") >&5
2867 echo "$as_me:2867: \$? = $ac_status" >&5
2868 (exit $ac_status); }; }; then
2871 echo "$as_me: failed program was:" >&5
2872 cat conftest.$ac_ext >&5
2874 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2875 cat >conftest.$ac_ext <<_ACEOF
2876 #line 2876 "configure"
2877 #include "confdefs.h"
2878 #include <sys/types.h>
2883 #ifdef _XOPEN_SOURCE
2890 rm -f conftest.$ac_objext
2891 if { (eval echo "$as_me:2891: \"$ac_compile\"") >&5
2892 (eval $ac_compile) 2>&5
2894 echo "$as_me:2894: \$? = $ac_status" >&5
2895 (exit $ac_status); } &&
2896 { ac_try='test -s conftest.$ac_objext'
2897 { (eval echo "$as_me:2897: \"$ac_try\"") >&5
2900 echo "$as_me:2900: \$? = $ac_status" >&5
2901 (exit $ac_status); }; }; then
2904 echo "$as_me: failed program was:" >&5
2905 cat conftest.$ac_ext >&5
2906 cf_cv_gnu_source=yes
2908 rm -f conftest.$ac_objext conftest.$ac_ext
2912 rm -f conftest.$ac_objext conftest.$ac_ext
2915 echo "$as_me:2915: result: $cf_cv_gnu_source" >&5
2916 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2917 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2921 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2924 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2927 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2929 cf_save_CFLAGS="$CFLAGS"
2930 cf_save_CPPFLAGS="$CPPFLAGS"
2932 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2933 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2934 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2936 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2937 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2938 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2940 echo "$as_me:2940: checking if we should define _POSIX_C_SOURCE" >&5
2941 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2942 if test "${cf_cv_posix_c_source+set}" = set; then
2943 echo $ECHO_N "(cached) $ECHO_C" >&6
2946 echo "${as_me:-configure}:2946: testing if the symbol is already defined go no further ..." 1>&5
2948 cat >conftest.$ac_ext <<_ACEOF
2949 #line 2949 "configure"
2950 #include "confdefs.h"
2951 #include <sys/types.h>
2956 #ifndef _POSIX_C_SOURCE
2963 rm -f conftest.$ac_objext
2964 if { (eval echo "$as_me:2964: \"$ac_compile\"") >&5
2965 (eval $ac_compile) 2>&5
2967 echo "$as_me:2967: \$? = $ac_status" >&5
2968 (exit $ac_status); } &&
2969 { ac_try='test -s conftest.$ac_objext'
2970 { (eval echo "$as_me:2970: \"$ac_try\"") >&5
2973 echo "$as_me:2973: \$? = $ac_status" >&5
2974 (exit $ac_status); }; }; then
2975 cf_cv_posix_c_source=no
2977 echo "$as_me: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 cf_want_posix_source=no
2980 case .$cf_POSIX_C_SOURCE in
2982 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2985 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2986 cf_want_posix_source=yes
2989 cf_want_posix_source=yes
2992 if test "$cf_want_posix_source" = yes ; then
2993 cat >conftest.$ac_ext <<_ACEOF
2994 #line 2994 "configure"
2995 #include "confdefs.h"
2996 #include <sys/types.h>
3001 #ifdef _POSIX_SOURCE
3008 rm -f conftest.$ac_objext
3009 if { (eval echo "$as_me:3009: \"$ac_compile\"") >&5
3010 (eval $ac_compile) 2>&5
3012 echo "$as_me:3012: \$? = $ac_status" >&5
3013 (exit $ac_status); } &&
3014 { ac_try='test -s conftest.$ac_objext'
3015 { (eval echo "$as_me:3015: \"$ac_try\"") >&5
3018 echo "$as_me:3018: \$? = $ac_status" >&5
3019 (exit $ac_status); }; }; then
3022 echo "$as_me: failed program was:" >&5
3023 cat conftest.$ac_ext >&5
3024 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3026 rm -f conftest.$ac_objext conftest.$ac_ext
3029 echo "${as_me:-configure}:3029: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3031 CFLAGS="$cf_trim_CFLAGS"
3032 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3034 echo "${as_me:-configure}:3034: testing if the second compile does not leave our definition intact error ..." 1>&5
3036 cat >conftest.$ac_ext <<_ACEOF
3037 #line 3037 "configure"
3038 #include "confdefs.h"
3039 #include <sys/types.h>
3044 #ifndef _POSIX_C_SOURCE
3051 rm -f conftest.$ac_objext
3052 if { (eval echo "$as_me:3052: \"$ac_compile\"") >&5
3053 (eval $ac_compile) 2>&5
3055 echo "$as_me:3055: \$? = $ac_status" >&5
3056 (exit $ac_status); } &&
3057 { ac_try='test -s conftest.$ac_objext'
3058 { (eval echo "$as_me:3058: \"$ac_try\"") >&5
3061 echo "$as_me:3061: \$? = $ac_status" >&5
3062 (exit $ac_status); }; }; then
3065 echo "$as_me: failed program was:" >&5
3066 cat conftest.$ac_ext >&5
3067 cf_cv_posix_c_source=no
3069 rm -f conftest.$ac_objext conftest.$ac_ext
3070 CFLAGS="$cf_save_CFLAGS"
3071 CPPFLAGS="$cf_save_CPPFLAGS"
3074 rm -f conftest.$ac_objext conftest.$ac_ext
3077 echo "$as_me:3077: result: $cf_cv_posix_c_source" >&5
3078 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3080 if test "$cf_cv_posix_c_source" != no ; then
3081 CFLAGS="$cf_trim_CFLAGS"
3082 CPPFLAGS="$cf_trim_CPPFLAGS"
3087 cf_new_extra_cppflags=
3089 for cf_add_cflags in $cf_cv_posix_c_source
3091 case $cf_fix_cppflags in
3093 case $cf_add_cflags in
3094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3095 case $cf_add_cflags in
3097 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3100 && test -z "${cf_tst_cflags}" \
3101 && cf_fix_cppflags=yes
3103 if test $cf_fix_cppflags = yes ; then
3104 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3106 elif test "${cf_tst_cflags}" = "\"'" ; then
3107 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3116 case $cf_add_cflags in
3118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3120 CPPFLAGS=`echo "$CPPFLAGS" | \
3121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3126 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3131 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3136 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3138 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3140 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3141 && test -z "${cf_tst_cflags}" \
3142 && cf_fix_cppflags=no
3147 if test -n "$cf_new_cflags" ; then
3149 CFLAGS="$CFLAGS $cf_new_cflags"
3152 if test -n "$cf_new_cppflags" ; then
3154 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3157 if test -n "$cf_new_extra_cppflags" ; then
3159 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3166 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3169 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3170 cf_xopen_source="-D_BSD_SOURCE"
3174 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3180 cf_xopen_source="-D_OSF_SOURCE"
3183 cf_xopen_source="-D_QNX_SOURCE"
3186 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3189 cf_xopen_source="-D__EXTENSIONS__"
3190 cf_cv_xopen_source=broken
3192 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3198 echo "$as_me:3198: checking if we should define _XOPEN_SOURCE" >&5
3199 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3200 if test "${cf_cv_xopen_source+set}" = set; then
3201 echo $ECHO_N "(cached) $ECHO_C" >&6
3204 cat >conftest.$ac_ext <<_ACEOF
3205 #line 3205 "configure"
3206 #include "confdefs.h"
3210 #include <sys/types.h>
3216 #ifndef _XOPEN_SOURCE
3223 rm -f conftest.$ac_objext
3224 if { (eval echo "$as_me:3224: \"$ac_compile\"") >&5
3225 (eval $ac_compile) 2>&5
3227 echo "$as_me:3227: \$? = $ac_status" >&5
3228 (exit $ac_status); } &&
3229 { ac_try='test -s conftest.$ac_objext'
3230 { (eval echo "$as_me:3230: \"$ac_try\"") >&5
3233 echo "$as_me:3233: \$? = $ac_status" >&5
3234 (exit $ac_status); }; }; then
3235 cf_cv_xopen_source=no
3237 echo "$as_me: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
3240 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3241 cat >conftest.$ac_ext <<_ACEOF
3242 #line 3242 "configure"
3243 #include "confdefs.h"
3247 #include <sys/types.h>
3253 #ifdef _XOPEN_SOURCE
3260 rm -f conftest.$ac_objext
3261 if { (eval echo "$as_me:3261: \"$ac_compile\"") >&5
3262 (eval $ac_compile) 2>&5
3264 echo "$as_me:3264: \$? = $ac_status" >&5
3265 (exit $ac_status); } &&
3266 { ac_try='test -s conftest.$ac_objext'
3267 { (eval echo "$as_me:3267: \"$ac_try\"") >&5
3270 echo "$as_me:3270: \$? = $ac_status" >&5
3271 (exit $ac_status); }; }; then
3272 cf_cv_xopen_source=no
3274 echo "$as_me: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3276 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3278 rm -f conftest.$ac_objext conftest.$ac_ext
3282 rm -f conftest.$ac_objext conftest.$ac_ext
3285 echo "$as_me:3285: result: $cf_cv_xopen_source" >&5
3286 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3288 if test "$cf_cv_xopen_source" != no ; then
3290 CFLAGS=`echo "$CFLAGS" | \
3291 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3292 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3294 CPPFLAGS=`echo "$CPPFLAGS" | \
3295 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3296 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3298 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3303 cf_new_extra_cppflags=
3305 for cf_add_cflags in $cf_temp_xopen_source
3307 case $cf_fix_cppflags in
3309 case $cf_add_cflags in
3310 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3311 case $cf_add_cflags in
3313 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3315 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3316 && test -z "${cf_tst_cflags}" \
3317 && cf_fix_cppflags=yes
3319 if test $cf_fix_cppflags = yes ; then
3320 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3322 elif test "${cf_tst_cflags}" = "\"'" ; then
3323 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3332 case $cf_add_cflags in
3334 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3336 CPPFLAGS=`echo "$CPPFLAGS" | \
3337 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3338 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3342 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3347 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3352 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3354 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3356 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3357 && test -z "${cf_tst_cflags}" \
3358 && cf_fix_cppflags=no
3363 if test -n "$cf_new_cflags" ; then
3365 CFLAGS="$CFLAGS $cf_new_cflags"
3368 if test -n "$cf_new_cppflags" ; then
3370 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3373 if test -n "$cf_new_extra_cppflags" ; then
3375 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3380 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3382 cf_save_CFLAGS="$CFLAGS"
3383 cf_save_CPPFLAGS="$CPPFLAGS"
3385 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3386 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3387 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3389 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3390 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3391 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3393 echo "$as_me:3393: checking if we should define _POSIX_C_SOURCE" >&5
3394 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3395 if test "${cf_cv_posix_c_source+set}" = set; then
3396 echo $ECHO_N "(cached) $ECHO_C" >&6
3399 echo "${as_me:-configure}:3399: testing if the symbol is already defined go no further ..." 1>&5
3401 cat >conftest.$ac_ext <<_ACEOF
3402 #line 3402 "configure"
3403 #include "confdefs.h"
3404 #include <sys/types.h>
3409 #ifndef _POSIX_C_SOURCE
3416 rm -f conftest.$ac_objext
3417 if { (eval echo "$as_me:3417: \"$ac_compile\"") >&5
3418 (eval $ac_compile) 2>&5
3420 echo "$as_me:3420: \$? = $ac_status" >&5
3421 (exit $ac_status); } &&
3422 { ac_try='test -s conftest.$ac_objext'
3423 { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3426 echo "$as_me:3426: \$? = $ac_status" >&5
3427 (exit $ac_status); }; }; then
3428 cf_cv_posix_c_source=no
3430 echo "$as_me: failed program was:" >&5
3431 cat conftest.$ac_ext >&5
3432 cf_want_posix_source=no
3433 case .$cf_POSIX_C_SOURCE in
3435 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3438 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3439 cf_want_posix_source=yes
3442 cf_want_posix_source=yes
3445 if test "$cf_want_posix_source" = yes ; then
3446 cat >conftest.$ac_ext <<_ACEOF
3447 #line 3447 "configure"
3448 #include "confdefs.h"
3449 #include <sys/types.h>
3454 #ifdef _POSIX_SOURCE
3461 rm -f conftest.$ac_objext
3462 if { (eval echo "$as_me:3462: \"$ac_compile\"") >&5
3463 (eval $ac_compile) 2>&5
3465 echo "$as_me:3465: \$? = $ac_status" >&5
3466 (exit $ac_status); } &&
3467 { ac_try='test -s conftest.$ac_objext'
3468 { (eval echo "$as_me:3468: \"$ac_try\"") >&5
3471 echo "$as_me:3471: \$? = $ac_status" >&5
3472 (exit $ac_status); }; }; then
3475 echo "$as_me: failed program was:" >&5
3476 cat conftest.$ac_ext >&5
3477 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3479 rm -f conftest.$ac_objext conftest.$ac_ext
3482 echo "${as_me:-configure}:3482: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3484 CFLAGS="$cf_trim_CFLAGS"
3485 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3487 echo "${as_me:-configure}:3487: testing if the second compile does not leave our definition intact error ..." 1>&5
3489 cat >conftest.$ac_ext <<_ACEOF
3490 #line 3490 "configure"
3491 #include "confdefs.h"
3492 #include <sys/types.h>
3497 #ifndef _POSIX_C_SOURCE
3504 rm -f conftest.$ac_objext
3505 if { (eval echo "$as_me:3505: \"$ac_compile\"") >&5
3506 (eval $ac_compile) 2>&5
3508 echo "$as_me:3508: \$? = $ac_status" >&5
3509 (exit $ac_status); } &&
3510 { ac_try='test -s conftest.$ac_objext'
3511 { (eval echo "$as_me:3511: \"$ac_try\"") >&5
3514 echo "$as_me:3514: \$? = $ac_status" >&5
3515 (exit $ac_status); }; }; then
3518 echo "$as_me: failed program was:" >&5
3519 cat conftest.$ac_ext >&5
3520 cf_cv_posix_c_source=no
3522 rm -f conftest.$ac_objext conftest.$ac_ext
3523 CFLAGS="$cf_save_CFLAGS"
3524 CPPFLAGS="$cf_save_CPPFLAGS"
3527 rm -f conftest.$ac_objext conftest.$ac_ext
3530 echo "$as_me:3530: result: $cf_cv_posix_c_source" >&5
3531 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3533 if test "$cf_cv_posix_c_source" != no ; then
3534 CFLAGS="$cf_trim_CFLAGS"
3535 CPPFLAGS="$cf_trim_CPPFLAGS"
3540 cf_new_extra_cppflags=
3542 for cf_add_cflags in $cf_cv_posix_c_source
3544 case $cf_fix_cppflags in
3546 case $cf_add_cflags in
3547 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3548 case $cf_add_cflags in
3550 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3552 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3553 && test -z "${cf_tst_cflags}" \
3554 && cf_fix_cppflags=yes
3556 if test $cf_fix_cppflags = yes ; then
3557 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3559 elif test "${cf_tst_cflags}" = "\"'" ; then
3560 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3569 case $cf_add_cflags in
3571 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3573 CPPFLAGS=`echo "$CPPFLAGS" | \
3574 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3575 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3579 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3584 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3589 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3591 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3593 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3594 && test -z "${cf_tst_cflags}" \
3595 && cf_fix_cppflags=no
3600 if test -n "$cf_new_cflags" ; then
3602 CFLAGS="$CFLAGS $cf_new_cflags"
3605 if test -n "$cf_new_cppflags" ; then
3607 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3610 if test -n "$cf_new_extra_cppflags" ; then
3612 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3620 if test -n "$cf_xopen_source" ; then
3625 cf_new_extra_cppflags=
3627 for cf_add_cflags in $cf_xopen_source
3629 case $cf_fix_cppflags in
3631 case $cf_add_cflags in
3632 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3633 case $cf_add_cflags in
3635 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3637 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3638 && test -z "${cf_tst_cflags}" \
3639 && cf_fix_cppflags=yes
3641 if test $cf_fix_cppflags = yes ; then
3642 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3644 elif test "${cf_tst_cflags}" = "\"'" ; then
3645 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3654 case $cf_add_cflags in
3656 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3658 CPPFLAGS=`echo "$CPPFLAGS" | \
3659 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3660 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3664 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3669 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3674 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3676 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3679 && test -z "${cf_tst_cflags}" \
3680 && cf_fix_cppflags=no
3685 if test -n "$cf_new_cflags" ; then
3686 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3688 echo "${as_me:-configure}:3688: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3690 CFLAGS="$CFLAGS $cf_new_cflags"
3693 if test -n "$cf_new_cppflags" ; then
3694 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3696 echo "${as_me:-configure}:3696: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3698 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3701 if test -n "$cf_new_extra_cppflags" ; then
3702 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3704 echo "${as_me:-configure}:3704: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3706 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3711 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3712 echo "$as_me:3712: checking if _XOPEN_SOURCE really is set" >&5
3713 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3714 cat >conftest.$ac_ext <<_ACEOF
3715 #line 3715 "configure"
3716 #include "confdefs.h"
3722 #ifndef _XOPEN_SOURCE
3729 rm -f conftest.$ac_objext
3730 if { (eval echo "$as_me:3730: \"$ac_compile\"") >&5
3731 (eval $ac_compile) 2>&5
3733 echo "$as_me:3733: \$? = $ac_status" >&5
3734 (exit $ac_status); } &&
3735 { ac_try='test -s conftest.$ac_objext'
3736 { (eval echo "$as_me:3736: \"$ac_try\"") >&5
3739 echo "$as_me:3739: \$? = $ac_status" >&5
3740 (exit $ac_status); }; }; then
3741 cf_XOPEN_SOURCE_set=yes
3743 echo "$as_me: failed program was:" >&5
3744 cat conftest.$ac_ext >&5
3745 cf_XOPEN_SOURCE_set=no
3747 rm -f conftest.$ac_objext conftest.$ac_ext
3748 echo "$as_me:3748: result: $cf_XOPEN_SOURCE_set" >&5
3749 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3750 if test $cf_XOPEN_SOURCE_set = yes
3752 cat >conftest.$ac_ext <<_ACEOF
3753 #line 3753 "configure"
3754 #include "confdefs.h"
3760 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3767 rm -f conftest.$ac_objext
3768 if { (eval echo "$as_me:3768: \"$ac_compile\"") >&5
3769 (eval $ac_compile) 2>&5
3771 echo "$as_me:3771: \$? = $ac_status" >&5
3772 (exit $ac_status); } &&
3773 { ac_try='test -s conftest.$ac_objext'
3774 { (eval echo "$as_me:3774: \"$ac_try\"") >&5
3777 echo "$as_me:3777: \$? = $ac_status" >&5
3778 (exit $ac_status); }; }; then
3779 cf_XOPEN_SOURCE_set_ok=yes
3781 echo "$as_me: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 cf_XOPEN_SOURCE_set_ok=no
3785 rm -f conftest.$ac_objext conftest.$ac_ext
3786 if test $cf_XOPEN_SOURCE_set_ok = no
3788 { echo "$as_me:3788: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3789 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3793 echo "$as_me:3793: checking if we should define _XOPEN_SOURCE" >&5
3794 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3795 if test "${cf_cv_xopen_source+set}" = set; then
3796 echo $ECHO_N "(cached) $ECHO_C" >&6
3799 cat >conftest.$ac_ext <<_ACEOF
3800 #line 3800 "configure"
3801 #include "confdefs.h"
3805 #include <sys/types.h>
3811 #ifndef _XOPEN_SOURCE
3818 rm -f conftest.$ac_objext
3819 if { (eval echo "$as_me:3819: \"$ac_compile\"") >&5
3820 (eval $ac_compile) 2>&5
3822 echo "$as_me:3822: \$? = $ac_status" >&5
3823 (exit $ac_status); } &&
3824 { ac_try='test -s conftest.$ac_objext'
3825 { (eval echo "$as_me:3825: \"$ac_try\"") >&5
3828 echo "$as_me:3828: \$? = $ac_status" >&5
3829 (exit $ac_status); }; }; then
3830 cf_cv_xopen_source=no
3832 echo "$as_me: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3835 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3836 cat >conftest.$ac_ext <<_ACEOF
3837 #line 3837 "configure"
3838 #include "confdefs.h"
3842 #include <sys/types.h>
3848 #ifdef _XOPEN_SOURCE
3855 rm -f conftest.$ac_objext
3856 if { (eval echo "$as_me:3856: \"$ac_compile\"") >&5
3857 (eval $ac_compile) 2>&5
3859 echo "$as_me:3859: \$? = $ac_status" >&5
3860 (exit $ac_status); } &&
3861 { ac_try='test -s conftest.$ac_objext'
3862 { (eval echo "$as_me:3862: \"$ac_try\"") >&5
3865 echo "$as_me:3865: \$? = $ac_status" >&5
3866 (exit $ac_status); }; }; then
3867 cf_cv_xopen_source=no
3869 echo "$as_me: failed program was:" >&5
3870 cat conftest.$ac_ext >&5
3871 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3873 rm -f conftest.$ac_objext conftest.$ac_ext
3877 rm -f conftest.$ac_objext conftest.$ac_ext
3880 echo "$as_me:3880: result: $cf_cv_xopen_source" >&5
3881 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3883 if test "$cf_cv_xopen_source" != no ; then
3885 CFLAGS=`echo "$CFLAGS" | \
3886 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3887 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3889 CPPFLAGS=`echo "$CPPFLAGS" | \
3890 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3891 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3893 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3898 cf_new_extra_cppflags=
3900 for cf_add_cflags in $cf_temp_xopen_source
3902 case $cf_fix_cppflags in
3904 case $cf_add_cflags in
3905 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3906 case $cf_add_cflags in
3908 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3910 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3911 && test -z "${cf_tst_cflags}" \
3912 && cf_fix_cppflags=yes
3914 if test $cf_fix_cppflags = yes ; then
3915 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3917 elif test "${cf_tst_cflags}" = "\"'" ; then
3918 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3927 case $cf_add_cflags in
3929 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3931 CPPFLAGS=`echo "$CPPFLAGS" | \
3932 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3933 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3937 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3942 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3947 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3949 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3952 && test -z "${cf_tst_cflags}" \
3953 && cf_fix_cppflags=no
3958 if test -n "$cf_new_cflags" ; then
3960 CFLAGS="$CFLAGS $cf_new_cflags"
3963 if test -n "$cf_new_cppflags" ; then
3965 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3968 if test -n "$cf_new_extra_cppflags" ; then
3970 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3978 echo "$as_me:3978: checking for signal global datatype" >&5
3979 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3980 if test "${cf_cv_sig_atomic_t+set}" = set; then
3981 echo $ECHO_N "(cached) $ECHO_C" >&6
3985 "volatile sig_atomic_t" \
3989 cat >conftest.$ac_ext <<_ACEOF
3990 #line 3990 "configure"
3991 #include "confdefs.h"
3993 #include <sys/types.h>
3999 static void handler(int sig)
4006 signal(SIGINT, handler);
4012 rm -f conftest.$ac_objext
4013 if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5
4014 (eval $ac_compile) 2>&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit $ac_status); } &&
4018 { ac_try='test -s conftest.$ac_objext'
4019 { (eval echo "$as_me:4019: \"$ac_try\"") >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit $ac_status); }; }; then
4024 cf_cv_sig_atomic_t=$cf_type
4026 echo "$as_me: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 cf_cv_sig_atomic_t=no
4030 rm -f conftest.$ac_objext conftest.$ac_ext
4031 test "$cf_cv_sig_atomic_t" != no && break
4036 echo "$as_me:4036: result: $cf_cv_sig_atomic_t" >&5
4037 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4038 test "$cf_cv_sig_atomic_t" != no &&
4039 cat >>confdefs.h <<EOF
4040 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4043 # Work around breakage on OS X
4045 echo "$as_me:4045: checking if SIGWINCH is defined" >&5
4046 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4047 if test "${cf_cv_define_sigwinch+set}" = set; then
4048 echo $ECHO_N "(cached) $ECHO_C" >&6
4051 cat >conftest.$ac_ext <<_ACEOF
4052 #line 4052 "configure"
4053 #include "confdefs.h"
4055 #include <sys/types.h>
4056 #include <sys/signal.h>
4066 rm -f conftest.$ac_objext
4067 if { (eval echo "$as_me:4067: \"$ac_compile\"") >&5
4068 (eval $ac_compile) 2>&5
4070 echo "$as_me:4070: \$? = $ac_status" >&5
4071 (exit $ac_status); } &&
4072 { ac_try='test -s conftest.$ac_objext'
4073 { (eval echo "$as_me:4073: \"$ac_try\"") >&5
4076 echo "$as_me:4076: \$? = $ac_status" >&5
4077 (exit $ac_status); }; }; then
4078 cf_cv_define_sigwinch=yes
4080 echo "$as_me: failed program was:" >&5
4081 cat conftest.$ac_ext >&5
4082 cat >conftest.$ac_ext <<_ACEOF
4083 #line 4083 "configure"
4084 #include "confdefs.h"
4086 #undef _XOPEN_SOURCE
4087 #undef _POSIX_SOURCE
4088 #undef _POSIX_C_SOURCE
4089 #include <sys/types.h>
4090 #include <sys/signal.h>
4100 rm -f conftest.$ac_objext
4101 if { (eval echo "$as_me:4101: \"$ac_compile\"") >&5
4102 (eval $ac_compile) 2>&5
4104 echo "$as_me:4104: \$? = $ac_status" >&5
4105 (exit $ac_status); } &&
4106 { ac_try='test -s conftest.$ac_objext'
4107 { (eval echo "$as_me:4107: \"$ac_try\"") >&5
4110 echo "$as_me:4110: \$? = $ac_status" >&5
4111 (exit $ac_status); }; }; then
4112 cf_cv_define_sigwinch=maybe
4114 echo "$as_me: failed program was:" >&5
4115 cat conftest.$ac_ext >&5
4116 cf_cv_define_sigwinch=no
4118 rm -f conftest.$ac_objext conftest.$ac_ext
4121 rm -f conftest.$ac_objext conftest.$ac_ext
4124 echo "$as_me:4124: result: $cf_cv_define_sigwinch" >&5
4125 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4127 if test "$cf_cv_define_sigwinch" = maybe ; then
4128 echo "$as_me:4128: checking for actual SIGWINCH definition" >&5
4129 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4130 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4131 echo $ECHO_N "(cached) $ECHO_C" >&6
4134 cf_cv_fixup_sigwinch=unknown
4136 while test $cf_sigwinch != 1
4138 cat >conftest.$ac_ext <<_ACEOF
4139 #line 4139 "configure"
4140 #include "confdefs.h"
4142 #undef _XOPEN_SOURCE
4143 #undef _POSIX_SOURCE
4144 #undef _POSIX_C_SOURCE
4145 #include <sys/types.h>
4146 #include <sys/signal.h>
4152 #if SIGWINCH != $cf_sigwinch
4160 rm -f conftest.$ac_objext
4161 if { (eval echo "$as_me:4161: \"$ac_compile\"") >&5
4162 (eval $ac_compile) 2>&5
4164 echo "$as_me:4164: \$? = $ac_status" >&5
4165 (exit $ac_status); } &&
4166 { ac_try='test -s conftest.$ac_objext'
4167 { (eval echo "$as_me:4167: \"$ac_try\"") >&5
4170 echo "$as_me:4170: \$? = $ac_status" >&5
4171 (exit $ac_status); }; }; then
4172 cf_cv_fixup_sigwinch=$cf_sigwinch
4175 echo "$as_me: failed program was:" >&5
4176 cat conftest.$ac_ext >&5
4178 rm -f conftest.$ac_objext conftest.$ac_ext
4180 cf_sigwinch=`expr $cf_sigwinch - 1`
4184 echo "$as_me:4184: result: $cf_cv_fixup_sigwinch" >&5
4185 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4187 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4188 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4192 # Checks for CODESET support.
4194 echo "$as_me:4194: checking for nl_langinfo and CODESET" >&5
4195 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4196 if test "${am_cv_langinfo_codeset+set}" = set; then
4197 echo $ECHO_N "(cached) $ECHO_C" >&6
4199 cat >conftest.$ac_ext <<_ACEOF
4200 #line 4200 "configure"
4201 #include "confdefs.h"
4202 #include <langinfo.h>
4206 char* cs = nl_langinfo(CODESET);
4211 rm -f conftest.$ac_objext conftest$ac_exeext
4212 if { (eval echo "$as_me:4212: \"$ac_link\"") >&5
4213 (eval $ac_link) 2>&5
4215 echo "$as_me:4215: \$? = $ac_status" >&5
4216 (exit $ac_status); } &&
4217 { ac_try='test -s conftest$ac_exeext'
4218 { (eval echo "$as_me:4218: \"$ac_try\"") >&5
4221 echo "$as_me:4221: \$? = $ac_status" >&5
4222 (exit $ac_status); }; }; then
4223 am_cv_langinfo_codeset=yes
4225 echo "$as_me: failed program was:" >&5
4226 cat conftest.$ac_ext >&5
4227 am_cv_langinfo_codeset=no
4229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4232 echo "$as_me:4232: result: $am_cv_langinfo_codeset" >&5
4233 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4234 if test $am_cv_langinfo_codeset = yes; then
4236 cat >>confdefs.h <<\EOF
4237 #define HAVE_LANGINFO_CODESET 1
4242 echo "$as_me:4242: checking if you want to use pkg-config" >&5
4243 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4245 # Check whether --with-pkg-config or --without-pkg-config was given.
4246 if test "${with_pkg_config+set}" = set; then
4247 withval="$with_pkg_config"
4248 cf_pkg_config=$withval
4252 echo "$as_me:4252: result: $cf_pkg_config" >&5
4253 echo "${ECHO_T}$cf_pkg_config" >&6
4255 case $cf_pkg_config in
4261 if test -n "$ac_tool_prefix"; then
4262 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4263 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4264 echo "$as_me:4264: checking for $ac_word" >&5
4265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4266 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4267 echo $ECHO_N "(cached) $ECHO_C" >&6
4271 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4274 ac_save_IFS=$IFS; IFS=$ac_path_separator
4276 for ac_dir in $ac_dummy; do
4278 test -z "$ac_dir" && ac_dir=.
4279 if $as_executable_p "$ac_dir/$ac_word"; then
4280 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4281 echo "$as_me:4281: found $ac_dir/$ac_word" >&5
4289 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4291 if test -n "$PKG_CONFIG"; then
4292 echo "$as_me:4292: result: $PKG_CONFIG" >&5
4293 echo "${ECHO_T}$PKG_CONFIG" >&6
4295 echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4300 if test -z "$ac_cv_path_PKG_CONFIG"; then
4301 ac_pt_PKG_CONFIG=$PKG_CONFIG
4302 # Extract the first word of "pkg-config", so it can be a program name with args.
4303 set dummy pkg-config; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4307 echo $ECHO_N "(cached) $ECHO_C" >&6
4309 case $ac_pt_PKG_CONFIG in
4311 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4314 ac_save_IFS=$IFS; IFS=$ac_path_separator
4316 for ac_dir in $ac_dummy; do
4318 test -z "$ac_dir" && ac_dir=.
4319 if $as_executable_p "$ac_dir/$ac_word"; then
4320 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4321 echo "$as_me:4321: found $ac_dir/$ac_word" >&5
4326 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4330 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4332 if test -n "$ac_pt_PKG_CONFIG"; then
4333 echo "$as_me:4333: result: $ac_pt_PKG_CONFIG" >&5
4334 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4336 echo "$as_me:4336: result: no" >&5
4337 echo "${ECHO_T}no" >&6
4340 PKG_CONFIG=$ac_pt_PKG_CONFIG
4342 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4351 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4352 if test "$PKG_CONFIG" != none ; then
4354 if test "x$prefix" != xNONE; then
4355 cf_path_syntax="$prefix"
4357 cf_path_syntax="$ac_default_prefix"
4360 case ".$PKG_CONFIG" in
4365 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4367 (.\${*prefix}*|.\${*dir}*)
4368 eval PKG_CONFIG="$PKG_CONFIG"
4369 case ".$PKG_CONFIG" in
4371 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4376 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4379 { { echo "$as_me:4379: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4380 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4381 { (exit 1); exit 1; }; }
4385 elif test "x$cf_pkg_config" != xno ; then
4386 { echo "$as_me:4386: WARNING: pkg-config is not installed" >&5
4387 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4390 echo "$as_me:4390: checking if you want to see long compiling messages" >&5
4391 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4393 # Check whether --enable-echo or --disable-echo was given.
4394 if test "${enable_echo+set}" = set; then
4395 enableval="$enable_echo"
4396 test "$enableval" != no && enableval=yes
4397 if test "$enableval" != "yes" ; then
4400 ECHO_LD='@echo linking $@;'
4401 RULE_CC='@echo compiling $<'
4402 SHOW_CC='@echo compiling $@'
4424 echo "$as_me:4424: result: $enableval" >&5
4425 echo "${ECHO_T}$enableval" >&6
4427 echo "$as_me:4427: checking for ncurses wrap-prefix" >&5
4428 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4430 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4431 if test "${with_ncurses_wrap_prefix+set}" = set; then
4432 withval="$with_ncurses_wrap_prefix"
4433 NCURSES_WRAP_PREFIX=$withval
4435 NCURSES_WRAP_PREFIX=_nc_
4437 echo "$as_me:4437: result: $NCURSES_WRAP_PREFIX" >&5
4438 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4440 echo "$as_me:4440: checking if you want to check for wide-character functions" >&5
4441 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4443 # Check whether --enable-widec or --disable-widec was given.
4444 if test "${enable_widec+set}" = set; then
4445 enableval="$enable_widec"
4446 test "$enableval" != no && enableval=yes
4447 if test "$enableval" != "yes" ; then
4457 echo "$as_me:4457: result: $cf_enable_widec" >&5
4458 echo "${ECHO_T}$cf_enable_widec" >&6
4460 echo "$as_me:4460: checking for specific curses-directory" >&5
4461 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4463 # Check whether --with-curses-dir or --without-curses-dir was given.
4464 if test "${with_curses_dir+set}" = set; then
4465 withval="$with_curses_dir"
4466 cf_cv_curses_dir=$withval
4470 echo "$as_me:4470: result: $cf_cv_curses_dir" >&5
4471 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4473 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4476 if test "x$prefix" != xNONE; then
4477 cf_path_syntax="$prefix"
4479 cf_path_syntax="$ac_default_prefix"
4487 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4489 (.\${*prefix}*|.\${*dir}*)
4490 eval withval="$withval"
4493 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4498 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4501 { { echo "$as_me:4501: error: expected a pathname, not \"$withval\"" >&5
4502 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4503 { (exit 1); exit 1; }; }
4507 if test -d "$cf_cv_curses_dir"
4510 if test -n "$cf_cv_curses_dir/include" ; then
4511 for cf_add_incdir in $cf_cv_curses_dir/include
4513 while test $cf_add_incdir != /usr/include
4515 if test -d $cf_add_incdir
4518 if test -n "$CFLAGS$CPPFLAGS" ; then
4519 # a loop is needed to ensure we can add subdirs of existing dirs
4520 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4521 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4522 cf_have_incdir=yes; break
4527 if test "$cf_have_incdir" = no ; then
4528 if test "$cf_add_incdir" = /usr/local/include ; then
4529 if test "$GCC" = yes
4531 cf_save_CPPFLAGS=$CPPFLAGS
4532 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4533 cat >conftest.$ac_ext <<_ACEOF
4534 #line 4534 "configure"
4535 #include "confdefs.h"
4545 rm -f conftest.$ac_objext
4546 if { (eval echo "$as_me:4546: \"$ac_compile\"") >&5
4547 (eval $ac_compile) 2>&5
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit $ac_status); } &&
4551 { ac_try='test -s conftest.$ac_objext'
4552 { (eval echo "$as_me:4552: \"$ac_try\"") >&5
4555 echo "$as_me:4555: \$? = $ac_status" >&5
4556 (exit $ac_status); }; }; then
4559 echo "$as_me: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4563 rm -f conftest.$ac_objext conftest.$ac_ext
4564 CPPFLAGS=$cf_save_CPPFLAGS
4569 if test "$cf_have_incdir" = no ; then
4570 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4572 echo "${as_me:-configure}:4572: testing adding $cf_add_incdir to include-path ..." 1>&5
4574 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4576 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4577 test "$cf_top_incdir" = "$cf_add_incdir" && break
4578 cf_add_incdir="$cf_top_incdir"
4589 if test -n "$cf_cv_curses_dir/lib" ; then
4590 for cf_add_libdir in $cf_cv_curses_dir/lib
4592 if test $cf_add_libdir = /usr/lib ; then
4594 elif test -d $cf_add_libdir
4597 if test -n "$LDFLAGS$LIBS" ; then
4598 # a loop is needed to ensure we can add subdirs of existing dirs
4599 for cf_test_libdir in $LDFLAGS $LIBS ; do
4600 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4601 cf_have_libdir=yes; break
4605 if test "$cf_have_libdir" = no ; then
4606 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4608 echo "${as_me:-configure}:4608: testing adding $cf_add_libdir to library-path ..." 1>&5
4610 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4621 echo "$as_me:4621: checking for specified curses library type" >&5
4622 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4624 # Check whether --with-screen or --without-screen was given.
4625 if test "${with_screen+set}" = set; then
4626 withval="$with_screen"
4627 cf_cv_screen=$withval
4630 # Check whether --with-ncursesw or --without-ncursesw was given.
4631 if test "${with_ncursesw+set}" = set; then
4632 withval="$with_ncursesw"
4633 cf_cv_screen=ncursesw
4636 # Check whether --with-ncurses or --without-ncurses was given.
4637 if test "${with_ncurses+set}" = set; then
4638 withval="$with_ncurses"
4639 cf_cv_screen=ncurses
4642 # Check whether --with-pdcurses or --without-pdcurses was given.
4643 if test "${with_pdcurses+set}" = set; then
4644 withval="$with_pdcurses"
4645 cf_cv_screen=pdcurses
4648 # Check whether --with-curses-colr or --without-curses-colr was given.
4649 if test "${with_curses_colr+set}" = set; then
4650 withval="$with_curses_colr"
4651 cf_cv_screen=curses_colr
4654 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4655 if test "${with_curses_5lib+set}" = set; then
4656 withval="$with_curses_5lib"
4657 cf_cv_screen=curses_5lib
4665 echo "$as_me:4665: result: $cf_cv_screen" >&5
4666 echo "${ECHO_T}$cf_cv_screen" >&6
4668 case $cf_cv_screen in
4671 echo "$as_me:4671: checking for extra include directories" >&5
4672 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4673 if test "${cf_cv_curses_incdir+set}" = set; then
4674 echo $ECHO_N "(cached) $ECHO_C" >&6
4677 cf_cv_curses_incdir=no
4680 if test "x$cf_cv_screen" = "xcurses_colr"
4682 test -d /usr/include/curses_colr && \
4683 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4687 if test "x$cf_cv_screen" = "xcurses_5lib"
4689 test -d /usr/5lib && \
4690 test -d /usr/5include && \
4691 cf_cv_curses_incdir="-I/usr/5include"
4697 echo "$as_me:4697: result: $cf_cv_curses_incdir" >&5
4698 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4699 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4701 echo "$as_me:4701: checking if we have identified curses headers" >&5
4702 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4703 if test "${cf_cv_ncurses_header+set}" = set; then
4704 echo $ECHO_N "(cached) $ECHO_C" >&6
4707 cf_cv_ncurses_header=none
4710 curses.h ncurses/ncurses.h ncurses/curses.h
4712 cat >conftest.$ac_ext <<_ACEOF
4713 #line 4713 "configure"
4714 #include "confdefs.h"
4715 #include <${cf_header}>
4719 initscr(); tgoto("?", 0,0)
4724 rm -f conftest.$ac_objext
4725 if { (eval echo "$as_me:4725: \"$ac_compile\"") >&5
4726 (eval $ac_compile) 2>&5
4728 echo "$as_me:4728: \$? = $ac_status" >&5
4729 (exit $ac_status); } &&
4730 { ac_try='test -s conftest.$ac_objext'
4731 { (eval echo "$as_me:4731: \"$ac_try\"") >&5
4734 echo "$as_me:4734: \$? = $ac_status" >&5
4735 (exit $ac_status); }; }; then
4736 cf_cv_ncurses_header=$cf_header; break
4738 echo "$as_me: failed program was:" >&5
4739 cat conftest.$ac_ext >&5
4741 rm -f conftest.$ac_objext conftest.$ac_ext
4745 echo "$as_me:4745: result: $cf_cv_ncurses_header" >&5
4746 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4748 if test "$cf_cv_ncurses_header" = none ; then
4749 { { echo "$as_me:4749: error: No curses header-files found" >&5
4750 echo "$as_me: error: No curses header-files found" >&2;}
4751 { (exit 1); exit 1; }; }
4754 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4756 for ac_header in $cf_cv_ncurses_header
4758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4759 echo "$as_me:4759: checking for $ac_header" >&5
4760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4762 echo $ECHO_N "(cached) $ECHO_C" >&6
4764 cat >conftest.$ac_ext <<_ACEOF
4765 #line 4765 "configure"
4766 #include "confdefs.h"
4767 #include <$ac_header>
4769 if { (eval echo "$as_me:4769: \"$ac_cpp conftest.$ac_ext\"") >&5
4770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4772 egrep -v '^ *\+' conftest.er1 >conftest.err
4774 cat conftest.err >&5
4775 echo "$as_me:4775: \$? = $ac_status" >&5
4776 (exit $ac_status); } >/dev/null; then
4777 if test -s conftest.err; then
4778 ac_cpp_err=$ac_c_preproc_warn_flag
4785 if test -z "$ac_cpp_err"; then
4786 eval "$as_ac_Header=yes"
4788 echo "$as_me: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 eval "$as_ac_Header=no"
4792 rm -f conftest.err conftest.$ac_ext
4794 echo "$as_me:4794: result: `eval echo '${'$as_ac_Header'}'`" >&5
4795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4797 cat >>confdefs.h <<EOF
4798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4804 echo "$as_me:4804: checking for terminfo header" >&5
4805 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4806 if test "${cf_cv_term_header+set}" = set; then
4807 echo $ECHO_N "(cached) $ECHO_C" >&6
4810 case ${cf_cv_ncurses_header} in
4811 (*/ncurses.h|*/ncursesw.h)
4812 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4815 cf_term_header=term.h
4819 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4821 cat >conftest.$ac_ext <<_ACEOF
4822 #line 4822 "configure"
4823 #include "confdefs.h"
4825 #include <${cf_cv_ncurses_header:-curses.h}>
4831 int x = auto_left_margin
4836 rm -f conftest.$ac_objext
4837 if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
4838 (eval $ac_compile) 2>&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit $ac_status); } &&
4842 { ac_try='test -s conftest.$ac_objext'
4843 { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); }; }; then
4849 cf_cv_term_header="$cf_test"
4851 echo "$as_me: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4854 cf_cv_term_header=unknown
4857 rm -f conftest.$ac_objext conftest.$ac_ext
4858 test "$cf_cv_term_header" != unknown && break
4862 echo "$as_me:4862: result: $cf_cv_term_header" >&5
4863 echo "${ECHO_T}$cf_cv_term_header" >&6
4865 # Set definitions to allow ifdef'ing to accommodate subdirectories
4867 case $cf_cv_term_header in
4870 cat >>confdefs.h <<\EOF
4871 #define HAVE_TERM_H 1
4877 case $cf_cv_term_header in
4880 cat >>confdefs.h <<\EOF
4881 #define HAVE_NCURSES_TERM_H 1
4887 cat >>confdefs.h <<\EOF
4888 #define HAVE_NCURSESW_TERM_H 1
4894 echo "$as_me:4894: checking for ncurses version" >&5
4895 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4896 if test "${cf_cv_ncurses_version+set}" = set; then
4897 echo $ECHO_N "(cached) $ECHO_C" >&6
4900 cf_cv_ncurses_version=no
4903 if test "$cross_compiling" = yes; then
4905 # This will not work if the preprocessor splits the line after the
4906 # Autoconf token. The 'unproto' program does that.
4907 cat > conftest.$ac_ext <<EOF
4908 #include <${cf_cv_ncurses_header:-curses.h}>
4910 #ifdef NCURSES_VERSION
4911 Autoconf NCURSES_VERSION
4919 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4920 { (eval echo "$as_me:4920: \"$cf_try\"") >&5
4923 echo "$as_me:4923: \$? = $ac_status" >&5
4924 (exit $ac_status); }
4925 if test -f conftest.out ; then
4926 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4927 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4932 cat >conftest.$ac_ext <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4936 #include <${cf_cv_ncurses_header:-curses.h}>
4940 FILE *fp = fopen("$cf_tempfile", "w");
4941 #ifdef NCURSES_VERSION
4942 # ifdef NCURSES_VERSION_PATCH
4943 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4945 fprintf(fp, "%s\n", NCURSES_VERSION);
4949 fprintf(fp, "old\n");
4954 ${cf_cv_main_return:-return}(0);
4957 rm -f conftest$ac_exeext
4958 if { (eval echo "$as_me:4958: \"$ac_link\"") >&5
4959 (eval $ac_link) 2>&5
4961 echo "$as_me:4961: \$? = $ac_status" >&5
4962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4963 { (eval echo "$as_me:4963: \"$ac_try\"") >&5
4966 echo "$as_me:4966: \$? = $ac_status" >&5
4967 (exit $ac_status); }; }; then
4969 cf_cv_ncurses_version=`cat $cf_tempfile`
4971 echo "$as_me: program exited with status $ac_status" >&5
4972 echo "$as_me: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4980 echo "$as_me:4980: result: $cf_cv_ncurses_version" >&5
4981 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4982 test "$cf_cv_ncurses_version" = no ||
4983 cat >>confdefs.h <<\EOF
4987 echo "$as_me:4987: checking if we have identified curses libraries" >&5
4988 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4989 cat >conftest.$ac_ext <<_ACEOF
4990 #line 4990 "configure"
4991 #include "confdefs.h"
4992 #include <${cf_cv_ncurses_header:-curses.h}>
4996 initscr(); tgoto("?", 0,0)
5001 rm -f conftest.$ac_objext conftest$ac_exeext
5002 if { (eval echo "$as_me:5002: \"$ac_link\"") >&5
5003 (eval $ac_link) 2>&5
5005 echo "$as_me:5005: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
5007 { ac_try='test -s conftest$ac_exeext'
5008 { (eval echo "$as_me:5008: \"$ac_try\"") >&5
5011 echo "$as_me:5011: \$? = $ac_status" >&5
5012 (exit $ac_status); }; }; then
5015 echo "$as_me: failed program was:" >&5
5016 cat conftest.$ac_ext >&5
5019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5020 echo "$as_me:5020: result: $cf_result" >&5
5021 echo "${ECHO_T}$cf_result" >&6
5023 if test "$cf_result" = no ; then
5026 echo "$as_me:5026: checking for tgoto in -lmytinfo" >&5
5027 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5028 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5029 echo $ECHO_N "(cached) $ECHO_C" >&6
5031 ac_check_lib_save_LIBS=$LIBS
5032 LIBS="-lmytinfo $LIBS"
5033 cat >conftest.$ac_ext <<_ACEOF
5034 #line 5034 "configure"
5035 #include "confdefs.h"
5037 /* Override any gcc2 internal prototype to avoid an error. */
5041 /* We use char because int might match the return type of a gcc2
5042 builtin and then its argument prototype would still apply. */
5052 rm -f conftest.$ac_objext conftest$ac_exeext
5053 if { (eval echo "$as_me:5053: \"$ac_link\"") >&5
5054 (eval $ac_link) 2>&5
5056 echo "$as_me:5056: \$? = $ac_status" >&5
5057 (exit $ac_status); } &&
5058 { ac_try='test -s conftest$ac_exeext'
5059 { (eval echo "$as_me:5059: \"$ac_try\"") >&5
5062 echo "$as_me:5062: \$? = $ac_status" >&5
5063 (exit $ac_status); }; }; then
5064 ac_cv_lib_mytinfo_tgoto=yes
5066 echo "$as_me: failed program was:" >&5
5067 cat conftest.$ac_ext >&5
5068 ac_cv_lib_mytinfo_tgoto=no
5070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5071 LIBS=$ac_check_lib_save_LIBS
5073 echo "$as_me:5073: result: $ac_cv_lib_mytinfo_tgoto" >&5
5074 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5075 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5077 cf_add_libs="-lmytinfo"
5078 # Filter out duplicates - this happens with badly-designed ".pc" files...
5079 for cf_add_1lib in $LIBS
5081 for cf_add_2lib in $cf_add_libs
5083 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5097 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5098 # next (1998), and xcurses "newer" (2000). There is no header file for
5099 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5100 # term.h) for cur_colr
5101 if test "x$cf_cv_screen" = "xcurses_colr"
5103 echo "$as_me:5103: checking for initscr in -lcur_colr" >&5
5104 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5105 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5106 echo $ECHO_N "(cached) $ECHO_C" >&6
5108 ac_check_lib_save_LIBS=$LIBS
5109 LIBS="-lcur_colr $LIBS"
5110 cat >conftest.$ac_ext <<_ACEOF
5111 #line 5111 "configure"
5112 #include "confdefs.h"
5114 /* Override any gcc2 internal prototype to avoid an error. */
5118 /* We use char because int might match the return type of a gcc2
5119 builtin and then its argument prototype would still apply. */
5129 rm -f conftest.$ac_objext conftest$ac_exeext
5130 if { (eval echo "$as_me:5130: \"$ac_link\"") >&5
5131 (eval $ac_link) 2>&5
5133 echo "$as_me:5133: \$? = $ac_status" >&5
5134 (exit $ac_status); } &&
5135 { ac_try='test -s conftest$ac_exeext'
5136 { (eval echo "$as_me:5136: \"$ac_try\"") >&5
5139 echo "$as_me:5139: \$? = $ac_status" >&5
5140 (exit $ac_status); }; }; then
5141 ac_cv_lib_cur_colr_initscr=yes
5143 echo "$as_me: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 ac_cv_lib_cur_colr_initscr=no
5147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5148 LIBS=$ac_check_lib_save_LIBS
5150 echo "$as_me:5150: result: $ac_cv_lib_cur_colr_initscr" >&5
5151 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5152 if test $ac_cv_lib_cur_colr_initscr = yes; then
5154 cf_add_libs="-lcur_colr"
5155 # Filter out duplicates - this happens with badly-designed ".pc" files...
5156 for cf_add_1lib in $LIBS
5158 for cf_add_2lib in $cf_add_libs
5160 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5166 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5170 ac_cv_func_initscr=yes
5174 echo "$as_me:5174: checking for initscr in -lHcurses" >&5
5175 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5176 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
5179 ac_check_lib_save_LIBS=$LIBS
5180 LIBS="-lHcurses $LIBS"
5181 cat >conftest.$ac_ext <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5185 /* Override any gcc2 internal prototype to avoid an error. */
5189 /* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5200 rm -f conftest.$ac_objext conftest$ac_exeext
5201 if { (eval echo "$as_me:5201: \"$ac_link\"") >&5
5202 (eval $ac_link) 2>&5
5204 echo "$as_me:5204: \$? = $ac_status" >&5
5205 (exit $ac_status); } &&
5206 { ac_try='test -s conftest$ac_exeext'
5207 { (eval echo "$as_me:5207: \"$ac_try\"") >&5
5210 echo "$as_me:5210: \$? = $ac_status" >&5
5211 (exit $ac_status); }; }; then
5212 ac_cv_lib_Hcurses_initscr=yes
5214 echo "$as_me: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216 ac_cv_lib_Hcurses_initscr=no
5218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5219 LIBS=$ac_check_lib_save_LIBS
5221 echo "$as_me:5221: result: $ac_cv_lib_Hcurses_initscr" >&5
5222 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5223 if test $ac_cv_lib_Hcurses_initscr = yes; then
5225 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5227 cf_add_libs="-lHcurses"
5228 # Filter out duplicates - this happens with badly-designed ".pc" files...
5229 for cf_add_1lib in $LIBS
5231 for cf_add_2lib in $cf_add_libs
5233 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5239 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5243 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5244 ac_cv_func_initscr=yes
5253 case `arch 2>/dev/null` in
5258 if test -n "/lib64" ; then
5259 for cf_add_libdir in /lib64
5261 if test $cf_add_libdir = /usr/lib ; then
5263 elif test -d $cf_add_libdir
5266 if test -n "$LDFLAGS$LIBS" ; then
5267 # a loop is needed to ensure we can add subdirs of existing dirs
5268 for cf_test_libdir in $LDFLAGS $LIBS ; do
5269 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5270 cf_have_libdir=yes; break
5274 if test "$cf_have_libdir" = no ; then
5275 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5277 echo "${as_me:-configure}:5277: testing adding $cf_add_libdir to library-path ..." 1>&5
5279 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5287 if test -n "/lib" ; then
5288 for cf_add_libdir in /lib
5290 if test $cf_add_libdir = /usr/lib ; then
5292 elif test -d $cf_add_libdir
5295 if test -n "$LDFLAGS$LIBS" ; then
5296 # a loop is needed to ensure we can add subdirs of existing dirs
5297 for cf_test_libdir in $LDFLAGS $LIBS ; do
5298 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5299 cf_have_libdir=yes; break
5303 if test "$cf_have_libdir" = no ; then
5304 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5306 echo "${as_me:-configure}:5306: testing adding $cf_add_libdir to library-path ..." 1>&5
5308 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5318 if test -n "/lib" ; then
5319 for cf_add_libdir in /lib
5321 if test $cf_add_libdir = /usr/lib ; then
5323 elif test -d $cf_add_libdir
5326 if test -n "$LDFLAGS$LIBS" ; then
5327 # a loop is needed to ensure we can add subdirs of existing dirs
5328 for cf_test_libdir in $LDFLAGS $LIBS ; do
5329 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5330 cf_have_libdir=yes; break
5334 if test "$cf_have_libdir" = no ; then
5335 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5337 echo "${as_me:-configure}:5337: testing adding $cf_add_libdir to library-path ..." 1>&5
5339 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5349 if test "x$cf_cv_screen" = "xcurses_5lib"
5351 if test -d /usr/5lib ; then
5353 if test -n "/usr/5lib" ; then
5354 for cf_add_libdir in /usr/5lib
5356 if test $cf_add_libdir = /usr/lib ; then
5358 elif test -d $cf_add_libdir
5361 if test -n "$LDFLAGS$LIBS" ; then
5362 # a loop is needed to ensure we can add subdirs of existing dirs
5363 for cf_test_libdir in $LDFLAGS $LIBS ; do
5364 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5365 cf_have_libdir=yes; break
5369 if test "$cf_have_libdir" = no ; then
5370 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5372 echo "${as_me:-configure}:5372: testing adding $cf_add_libdir to library-path ..." 1>&5
5374 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5380 cf_add_libs="-lcurses -ltermcap"
5381 # Filter out duplicates - this happens with badly-designed ".pc" files...
5382 for cf_add_1lib in $LIBS
5384 for cf_add_2lib in $cf_add_libs
5386 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5392 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5398 ac_cv_func_initscr=yes
5402 if test ".$ac_cv_func_initscr" != .yes ; then
5403 cf_save_LIBS="$LIBS"
5405 if test ".${cf_cv_ncurses_version:-no}" != .no
5407 cf_check_list="ncurses curses cursesX"
5409 cf_check_list="cursesX curses ncurses"
5412 # Check for library containing tgoto. Do this before curses library
5413 # because it may be needed to link the test-case for initscr.
5414 if test "x$cf_term_lib" = x
5416 echo "$as_me:5416: checking for tgoto" >&5
5417 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5418 if test "${ac_cv_func_tgoto+set}" = set; then
5419 echo $ECHO_N "(cached) $ECHO_C" >&6
5421 cat >conftest.$ac_ext <<_ACEOF
5422 #line 5422 "configure"
5423 #include "confdefs.h"
5424 /* System header to define __stub macros and hopefully few prototypes,
5425 which can conflict with char tgoto (); below. */
5427 /* Override any gcc2 internal prototype to avoid an error. */
5431 /* We use char because int might match the return type of a gcc2
5432 builtin and then its argument prototype would still apply. */
5439 /* The GNU C library defines this for functions which it implements
5440 to always fail with ENOSYS. Some functions are actually named
5441 something starting with __ and the normal name is an alias. */
5442 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5445 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5452 rm -f conftest.$ac_objext conftest$ac_exeext
5453 if { (eval echo "$as_me:5453: \"$ac_link\"") >&5
5454 (eval $ac_link) 2>&5
5456 echo "$as_me:5456: \$? = $ac_status" >&5
5457 (exit $ac_status); } &&
5458 { ac_try='test -s conftest$ac_exeext'
5459 { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5462 echo "$as_me:5462: \$? = $ac_status" >&5
5463 (exit $ac_status); }; }; then
5464 ac_cv_func_tgoto=yes
5466 echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5472 echo "$as_me:5472: result: $ac_cv_func_tgoto" >&5
5473 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5474 if test $ac_cv_func_tgoto = yes; then
5475 cf_term_lib=predefined
5478 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5480 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5481 echo "$as_me:5481: checking for tgoto in -l$cf_term_lib" >&5
5482 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5483 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5484 echo $ECHO_N "(cached) $ECHO_C" >&6
5486 ac_check_lib_save_LIBS=$LIBS
5487 LIBS="-l$cf_term_lib $LIBS"
5488 cat >conftest.$ac_ext <<_ACEOF
5489 #line 5489 "configure"
5490 #include "confdefs.h"
5492 /* Override any gcc2 internal prototype to avoid an error. */
5496 /* We use char because int might match the return type of a gcc2
5497 builtin and then its argument prototype would still apply. */
5507 rm -f conftest.$ac_objext conftest$ac_exeext
5508 if { (eval echo "$as_me:5508: \"$ac_link\"") >&5
5509 (eval $ac_link) 2>&5
5511 echo "$as_me:5511: \$? = $ac_status" >&5
5512 (exit $ac_status); } &&
5513 { ac_try='test -s conftest$ac_exeext'
5514 { (eval echo "$as_me:5514: \"$ac_try\"") >&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5519 eval "$as_ac_Lib=yes"
5521 echo "$as_me: failed program was:" >&5
5522 cat conftest.$ac_ext >&5
5523 eval "$as_ac_Lib=no"
5525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5526 LIBS=$ac_check_lib_save_LIBS
5528 echo "$as_me:5528: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5529 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5530 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5540 # Check for library containing initscr
5541 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5542 if test "x$cf_curs_lib" = x
5544 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5546 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5547 echo "$as_me:5547: checking for initscr in -l$cf_curs_lib" >&5
5548 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5549 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5550 echo $ECHO_N "(cached) $ECHO_C" >&6
5552 ac_check_lib_save_LIBS=$LIBS
5553 LIBS="-l$cf_curs_lib $LIBS"
5554 cat >conftest.$ac_ext <<_ACEOF
5555 #line 5555 "configure"
5556 #include "confdefs.h"
5558 /* Override any gcc2 internal prototype to avoid an error. */
5562 /* We use char because int might match the return type of a gcc2
5563 builtin and then its argument prototype would still apply. */
5573 rm -f conftest.$ac_objext conftest$ac_exeext
5574 if { (eval echo "$as_me:5574: \"$ac_link\"") >&5
5575 (eval $ac_link) 2>&5
5577 echo "$as_me:5577: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
5579 { ac_try='test -s conftest$ac_exeext'
5580 { (eval echo "$as_me:5580: \"$ac_try\"") >&5
5583 echo "$as_me:5583: \$? = $ac_status" >&5
5584 (exit $ac_status); }; }; then
5585 eval "$as_ac_Lib=yes"
5587 echo "$as_me: failed program was:" >&5
5588 cat conftest.$ac_ext >&5
5589 eval "$as_ac_Lib=no"
5591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5592 LIBS=$ac_check_lib_save_LIBS
5594 echo "$as_me:5594: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5595 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5596 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5602 test $cf_curs_lib = unknown && { { echo "$as_me:5602: error: no curses library found" >&5
5603 echo "$as_me: error: no curses library found" >&2;}
5604 { (exit 1); exit 1; }; }
5606 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5607 if test "$cf_term_lib" = unknown ; then
5608 echo "$as_me:5608: checking if we can link with $cf_curs_lib library" >&5
5609 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5610 cat >conftest.$ac_ext <<_ACEOF
5611 #line 5611 "configure"
5612 #include "confdefs.h"
5613 #include <${cf_cv_ncurses_header:-curses.h}>
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:5623: \"$ac_link\"") >&5
5624 (eval $ac_link) 2>&5
5626 echo "$as_me:5626: \$? = $ac_status" >&5
5627 (exit $ac_status); } &&
5628 { ac_try='test -s conftest$ac_exeext'
5629 { (eval echo "$as_me:5629: \"$ac_try\"") >&5
5632 echo "$as_me:5632: \$? = $ac_status" >&5
5633 (exit $ac_status); }; }; then
5636 echo "$as_me: failed program was:" >&5
5637 cat conftest.$ac_ext >&5
5640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5641 echo "$as_me:5641: result: $cf_result" >&5
5642 echo "${ECHO_T}$cf_result" >&6
5643 test $cf_result = no && { { echo "$as_me:5643: error: Cannot link curses library" >&5
5644 echo "$as_me: error: Cannot link curses library" >&2;}
5645 { (exit 1); exit 1; }; }
5646 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5648 elif test "$cf_term_lib" != predefined ; then
5649 echo "$as_me:5649: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5650 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5651 cat >conftest.$ac_ext <<_ACEOF
5652 #line 5652 "configure"
5653 #include "confdefs.h"
5654 #include <${cf_cv_ncurses_header:-curses.h}>
5658 initscr(); tgoto((char *)0, 0, 0);
5663 rm -f conftest.$ac_objext conftest$ac_exeext
5664 if { (eval echo "$as_me:5664: \"$ac_link\"") >&5
5665 (eval $ac_link) 2>&5
5667 echo "$as_me:5667: \$? = $ac_status" >&5
5668 (exit $ac_status); } &&
5669 { ac_try='test -s conftest$ac_exeext'
5670 { (eval echo "$as_me:5670: \"$ac_try\"") >&5
5673 echo "$as_me:5673: \$? = $ac_status" >&5
5674 (exit $ac_status); }; }; then
5677 echo "$as_me: failed program was:" >&5
5678 cat conftest.$ac_ext >&5
5680 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5681 cat >conftest.$ac_ext <<_ACEOF
5682 #line 5682 "configure"
5683 #include "confdefs.h"
5684 #include <${cf_cv_ncurses_header:-curses.h}>
5693 rm -f conftest.$ac_objext conftest$ac_exeext
5694 if { (eval echo "$as_me:5694: \"$ac_link\"") >&5
5695 (eval $ac_link) 2>&5
5697 echo "$as_me:5697: \$? = $ac_status" >&5
5698 (exit $ac_status); } &&
5699 { ac_try='test -s conftest$ac_exeext'
5700 { (eval echo "$as_me:5700: \"$ac_try\"") >&5
5703 echo "$as_me:5703: \$? = $ac_status" >&5
5704 (exit $ac_status); }; }; then
5707 echo "$as_me: failed program was:" >&5
5708 cat conftest.$ac_ext >&5
5711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5715 echo "$as_me:5715: result: $cf_result" >&5
5716 echo "${ECHO_T}$cf_result" >&6
5724 echo "$as_me:5724: checking for multibyte character support" >&5
5725 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5726 if test "${cf_cv_utf8_lib+set}" = set; then
5727 echo $ECHO_N "(cached) $ECHO_C" >&6
5730 cf_save_LIBS="$LIBS"
5731 cat >conftest.$ac_ext <<_ACEOF
5732 #line 5732 "configure"
5733 #include "confdefs.h"
5744 rm -f conftest.$ac_objext conftest$ac_exeext
5745 if { (eval echo "$as_me:5745: \"$ac_link\"") >&5
5746 (eval $ac_link) 2>&5
5748 echo "$as_me:5748: \$? = $ac_status" >&5
5749 (exit $ac_status); } &&
5750 { ac_try='test -s conftest$ac_exeext'
5751 { (eval echo "$as_me:5751: \"$ac_try\"") >&5
5754 echo "$as_me:5754: \$? = $ac_status" >&5
5755 (exit $ac_status); }; }; then
5758 echo "$as_me: failed program was:" >&5
5759 cat conftest.$ac_ext >&5
5761 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5762 # will be set on completion of the AC_TRY_LINK below.
5763 cf_cv_header_path_utf8=
5764 cf_cv_library_path_utf8=
5766 echo "${as_me:-configure}:5766: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5768 cf_save_LIBS="$LIBS"
5770 cat >conftest.$ac_ext <<_ACEOF
5771 #line 5771 "configure"
5772 #include "confdefs.h"
5774 #include <libutf8.h>
5783 rm -f conftest.$ac_objext conftest$ac_exeext
5784 if { (eval echo "$as_me:5784: \"$ac_link\"") >&5
5785 (eval $ac_link) 2>&5
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
5789 { ac_try='test -s conftest$ac_exeext'
5790 { (eval echo "$as_me:5790: \"$ac_try\"") >&5
5793 echo "$as_me:5793: \$? = $ac_status" >&5
5794 (exit $ac_status); }; }; then
5796 cf_cv_find_linkage_utf8=yes
5797 cf_cv_header_path_utf8=/usr/include
5798 cf_cv_library_path_utf8=/usr/lib
5801 echo "$as_me: failed program was:" >&5
5802 cat conftest.$ac_ext >&5
5804 LIBS="-lutf8 $cf_save_LIBS"
5806 cat >conftest.$ac_ext <<_ACEOF
5807 #line 5807 "configure"
5808 #include "confdefs.h"
5810 #include <libutf8.h>
5819 rm -f conftest.$ac_objext conftest$ac_exeext
5820 if { (eval echo "$as_me:5820: \"$ac_link\"") >&5
5821 (eval $ac_link) 2>&5
5823 echo "$as_me:5823: \$? = $ac_status" >&5
5824 (exit $ac_status); } &&
5825 { ac_try='test -s conftest$ac_exeext'
5826 { (eval echo "$as_me:5826: \"$ac_try\"") >&5
5829 echo "$as_me:5829: \$? = $ac_status" >&5
5830 (exit $ac_status); }; }; then
5832 cf_cv_find_linkage_utf8=yes
5833 cf_cv_header_path_utf8=/usr/include
5834 cf_cv_library_path_utf8=/usr/lib
5835 cf_cv_library_file_utf8="-lutf8"
5838 echo "$as_me: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5841 cf_cv_find_linkage_utf8=no
5842 LIBS="$cf_save_LIBS"
5844 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5846 echo "${as_me:-configure}:5846: testing find linkage for utf8 library ..." 1>&5
5848 echo "${as_me:-configure}:5848: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5850 cf_save_CPPFLAGS="$CPPFLAGS"
5851 cf_test_CPPFLAGS="$CPPFLAGS"
5855 # collect the current set of include-directories from compiler flags
5856 cf_header_path_list=""
5857 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5858 for cf_header_path in $CPPFLAGS $CFLAGS
5860 case $cf_header_path in
5862 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5864 test "x$cf_header_path" != "xNONE" && \
5865 test -d "$cf_header_path" && \
5867 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5868 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5869 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5870 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5871 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5872 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5875 cf_header_path_list="$cf_header_path_list $cf_search"
5881 # add the variations for the package we are looking for
5885 test "x$prefix" != "xNONE" && \
5886 test -d "$prefix" && \
5888 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5889 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5890 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5891 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5892 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5893 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5896 for cf_subdir_prefix in \
5905 test "x$cf_subdir_prefix" != "x$prefix" && \
5906 test -d "$cf_subdir_prefix" && \
5907 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5908 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5909 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5910 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5911 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5912 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5913 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5918 test "$includedir" != NONE && \
5919 test "$includedir" != "/usr/include" && \
5920 test -d "$includedir" && {
5921 test -d $includedir && cf_search="$cf_search $includedir"
5922 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5925 test "$oldincludedir" != NONE && \
5926 test "$oldincludedir" != "/usr/include" && \
5927 test -d "$oldincludedir" && {
5928 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5929 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5932 cf_search="$cf_search $cf_header_path_list"
5934 for cf_cv_header_path_utf8 in $cf_search
5936 if test -d $cf_cv_header_path_utf8 ; then
5937 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5939 echo "${as_me:-configure}:5939: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5941 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5942 cat >conftest.$ac_ext <<_ACEOF
5943 #line 5943 "configure"
5944 #include "confdefs.h"
5946 #include <libutf8.h>
5955 rm -f conftest.$ac_objext
5956 if { (eval echo "$as_me:5956: \"$ac_compile\"") >&5
5957 (eval $ac_compile) 2>&5
5959 echo "$as_me:5959: \$? = $ac_status" >&5
5960 (exit $ac_status); } &&
5961 { ac_try='test -s conftest.$ac_objext'
5962 { (eval echo "$as_me:5962: \"$ac_try\"") >&5
5965 echo "$as_me:5965: \$? = $ac_status" >&5
5966 (exit $ac_status); }; }; then
5968 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5970 echo "${as_me:-configure}:5970: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5972 cf_cv_find_linkage_utf8=maybe
5973 cf_test_CPPFLAGS="$CPPFLAGS"
5976 echo "$as_me: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5979 CPPFLAGS="$cf_save_CPPFLAGS"
5982 rm -f conftest.$ac_objext conftest.$ac_ext
5986 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5988 echo "${as_me:-configure}:5988: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5990 cf_save_LIBS="$LIBS"
5991 cf_save_LDFLAGS="$LDFLAGS"
5993 if test "$cf_cv_find_linkage_utf8" != yes ; then
5996 cf_library_path_list=""
5997 if test -n "${LDFLAGS}${LIBS}" ; then
5998 for cf_library_path in $LDFLAGS $LIBS
6000 case $cf_library_path in
6002 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6004 test "x$cf_library_path" != "xNONE" && \
6005 test -d "$cf_library_path" && \
6007 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6008 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6009 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6010 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6011 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6012 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6015 cf_library_path_list="$cf_library_path_list $cf_search"
6023 test "x$prefix" != "xNONE" && \
6024 test -d "$prefix" && \
6026 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6027 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6028 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6029 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6030 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6031 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6034 for cf_subdir_prefix in \
6043 test "x$cf_subdir_prefix" != "x$prefix" && \
6044 test -d "$cf_subdir_prefix" && \
6045 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6046 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6047 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6048 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6049 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6050 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6051 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6056 cf_search="$cf_library_path_list $cf_search"
6058 for cf_cv_library_path_utf8 in $cf_search
6060 if test -d $cf_cv_library_path_utf8 ; then
6061 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6063 echo "${as_me:-configure}:6063: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6065 CPPFLAGS="$cf_test_CPPFLAGS"
6066 LIBS="-lutf8 $cf_save_LIBS"
6067 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6068 cat >conftest.$ac_ext <<_ACEOF
6069 #line 6069 "configure"
6070 #include "confdefs.h"
6072 #include <libutf8.h>
6081 rm -f conftest.$ac_objext conftest$ac_exeext
6082 if { (eval echo "$as_me:6082: \"$ac_link\"") >&5
6083 (eval $ac_link) 2>&5
6085 echo "$as_me:6085: \$? = $ac_status" >&5
6086 (exit $ac_status); } &&
6087 { ac_try='test -s conftest$ac_exeext'
6088 { (eval echo "$as_me:6088: \"$ac_try\"") >&5
6091 echo "$as_me:6091: \$? = $ac_status" >&5
6092 (exit $ac_status); }; }; then
6094 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6096 echo "${as_me:-configure}:6096: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6098 cf_cv_find_linkage_utf8=yes
6099 cf_cv_library_file_utf8="-lutf8"
6102 echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6105 CPPFLAGS="$cf_save_CPPFLAGS"
6106 LIBS="$cf_save_LIBS"
6107 LDFLAGS="$cf_save_LDFLAGS"
6110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6113 CPPFLAGS="$cf_save_CPPFLAGS"
6114 LDFLAGS="$cf_save_LDFLAGS"
6118 cf_cv_find_linkage_utf8=no
6122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6127 LIBS="$cf_save_LIBS"
6129 if test "$cf_cv_find_linkage_utf8" = yes ; then
6130 cf_cv_utf8_lib=add-on
6136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6138 echo "$as_me:6138: result: $cf_cv_utf8_lib" >&5
6139 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6141 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6143 if test "$cf_cv_utf8_lib" = "add-on" ; then
6145 cat >>confdefs.h <<\EOF
6146 #define HAVE_LIBUTF8_H 1
6149 if test -n "$cf_cv_header_path_utf8" ; then
6150 for cf_add_incdir in $cf_cv_header_path_utf8
6152 while test $cf_add_incdir != /usr/include
6154 if test -d $cf_add_incdir
6157 if test -n "$CFLAGS$CPPFLAGS" ; then
6158 # a loop is needed to ensure we can add subdirs of existing dirs
6159 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6160 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6161 cf_have_incdir=yes; break
6166 if test "$cf_have_incdir" = no ; then
6167 if test "$cf_add_incdir" = /usr/local/include ; then
6168 if test "$GCC" = yes
6170 cf_save_CPPFLAGS=$CPPFLAGS
6171 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6172 cat >conftest.$ac_ext <<_ACEOF
6173 #line 6173 "configure"
6174 #include "confdefs.h"
6184 rm -f conftest.$ac_objext
6185 if { (eval echo "$as_me:6185: \"$ac_compile\"") >&5
6186 (eval $ac_compile) 2>&5
6188 echo "$as_me:6188: \$? = $ac_status" >&5
6189 (exit $ac_status); } &&
6190 { ac_try='test -s conftest.$ac_objext'
6191 { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6194 echo "$as_me:6194: \$? = $ac_status" >&5
6195 (exit $ac_status); }; }; then
6198 echo "$as_me: failed program was:" >&5
6199 cat conftest.$ac_ext >&5
6202 rm -f conftest.$ac_objext conftest.$ac_ext
6203 CPPFLAGS=$cf_save_CPPFLAGS
6208 if test "$cf_have_incdir" = no ; then
6209 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6211 echo "${as_me:-configure}:6211: testing adding $cf_add_incdir to include-path ..." 1>&5
6213 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6215 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6216 test "$cf_top_incdir" = "$cf_add_incdir" && break
6217 cf_add_incdir="$cf_top_incdir"
6228 if test -n "$cf_cv_library_path_utf8" ; then
6229 for cf_add_libdir in $cf_cv_library_path_utf8
6231 if test $cf_add_libdir = /usr/lib ; then
6233 elif test -d $cf_add_libdir
6236 if test -n "$LDFLAGS$LIBS" ; then
6237 # a loop is needed to ensure we can add subdirs of existing dirs
6238 for cf_test_libdir in $LDFLAGS $LIBS ; do
6239 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6240 cf_have_libdir=yes; break
6244 if test "$cf_have_libdir" = no ; then
6245 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6247 echo "${as_me:-configure}:6247: testing adding $cf_add_libdir to library-path ..." 1>&5
6249 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6255 cf_add_libs="$cf_cv_library_file_utf8"
6256 # Filter out duplicates - this happens with badly-designed ".pc" files...
6257 for cf_add_1lib in $LIBS
6259 for cf_add_2lib in $cf_add_libs
6261 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6267 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6273 cf_ncuconfig_root=$cf_cv_screen
6274 cf_have_ncuconfig=no
6276 if test "x${PKG_CONFIG:=none}" != xnone; then
6277 echo "$as_me:6277: checking pkg-config for $cf_ncuconfig_root" >&5
6278 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6279 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6280 echo "$as_me:6280: result: yes" >&5
6281 echo "${ECHO_T}yes" >&6
6283 echo "$as_me:6283: checking if the $cf_ncuconfig_root package files work" >&5
6284 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6285 cf_have_ncuconfig=unknown
6287 cf_save_CPPFLAGS="$CPPFLAGS"
6288 cf_save_LIBS="$LIBS"
6290 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6292 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6293 # Filter out duplicates - this happens with badly-designed ".pc" files...
6294 for cf_add_1lib in $LIBS
6296 for cf_add_2lib in $cf_add_libs
6298 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6304 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6308 cat >conftest.$ac_ext <<_ACEOF
6309 #line 6309 "configure"
6310 #include "confdefs.h"
6311 #include <${cf_cv_ncurses_header:-curses.h}>
6315 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
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 if test "$cross_compiling" = yes; then
6333 cf_have_ncuconfig=maybe
6335 cat >conftest.$ac_ext <<_ACEOF
6336 #line 6336 "configure"
6337 #include "confdefs.h"
6338 #include <${cf_cv_ncurses_header:-curses.h}>
6340 { char *xx = curses_version(); return (xx == 0); }
6342 rm -f conftest$ac_exeext
6343 if { (eval echo "$as_me:6343: \"$ac_link\"") >&5
6344 (eval $ac_link) 2>&5
6346 echo "$as_me:6346: \$? = $ac_status" >&5
6347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6348 { (eval echo "$as_me:6348: \"$ac_try\"") >&5
6351 echo "$as_me:6351: \$? = $ac_status" >&5
6352 (exit $ac_status); }; }; then
6353 cf_have_ncuconfig=yes
6355 echo "$as_me: program exited with status $ac_status" >&5
6356 echo "$as_me: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
6358 cf_have_ncuconfig=no
6360 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6363 echo "$as_me: failed program was:" >&5
6364 cat conftest.$ac_ext >&5
6365 cf_have_ncuconfig=no
6367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6368 echo "$as_me:6368: result: $cf_have_ncuconfig" >&5
6369 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6370 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6371 if test "$cf_have_ncuconfig" != "yes"
6373 CPPFLAGS="$cf_save_CPPFLAGS"
6374 LIBS="$cf_save_LIBS"
6375 NCURSES_CONFIG_PKG=none
6378 cat >>confdefs.h <<\EOF
6382 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6386 echo "$as_me:6386: result: no" >&5
6387 echo "${ECHO_T}no" >&6
6388 NCURSES_CONFIG_PKG=none
6391 NCURSES_CONFIG_PKG=none
6394 if test "x$cf_have_ncuconfig" = "xno"; then
6395 echo "Looking for ${cf_ncuconfig_root}-config"
6397 if test -n "$ac_tool_prefix"; then
6398 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6400 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6401 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6402 echo "$as_me:6402: checking for $ac_word" >&5
6403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6404 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6405 echo $ECHO_N "(cached) $ECHO_C" >&6
6407 if test -n "$NCURSES_CONFIG"; then
6408 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6410 ac_save_IFS=$IFS; IFS=$ac_path_separator
6412 for ac_dir in $ac_dummy; do
6414 test -z "$ac_dir" && ac_dir=.
6415 $as_executable_p "$ac_dir/$ac_word" || continue
6416 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6417 echo "$as_me:6417: found $ac_dir/$ac_word" >&5
6423 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6424 if test -n "$NCURSES_CONFIG"; then
6425 echo "$as_me:6425: result: $NCURSES_CONFIG" >&5
6426 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6428 echo "$as_me:6428: result: no" >&5
6429 echo "${ECHO_T}no" >&6
6432 test -n "$NCURSES_CONFIG" && break
6435 if test -z "$NCURSES_CONFIG"; then
6436 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6437 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6439 # Extract the first word of "$ac_prog", so it can be a program name with args.
6440 set dummy $ac_prog; ac_word=$2
6441 echo "$as_me:6441: checking for $ac_word" >&5
6442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6443 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6444 echo $ECHO_N "(cached) $ECHO_C" >&6
6446 if test -n "$ac_ct_NCURSES_CONFIG"; then
6447 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6449 ac_save_IFS=$IFS; IFS=$ac_path_separator
6451 for ac_dir in $ac_dummy; do
6453 test -z "$ac_dir" && ac_dir=.
6454 $as_executable_p "$ac_dir/$ac_word" || continue
6455 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6456 echo "$as_me:6456: found $ac_dir/$ac_word" >&5
6462 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6463 if test -n "$ac_ct_NCURSES_CONFIG"; then
6464 echo "$as_me:6464: result: $ac_ct_NCURSES_CONFIG" >&5
6465 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6467 echo "$as_me:6467: result: no" >&5
6468 echo "${ECHO_T}no" >&6
6471 test -n "$ac_ct_NCURSES_CONFIG" && break
6473 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6475 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6478 if test "$NCURSES_CONFIG" != none ; then
6480 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6482 cf_add_libs="`$NCURSES_CONFIG --libs`"
6483 # Filter out duplicates - this happens with badly-designed ".pc" files...
6484 for cf_add_1lib in $LIBS
6486 for cf_add_2lib in $cf_add_libs
6488 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6494 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6498 # even with config script, some packages use no-override for curses.h
6500 echo "$as_me:6500: checking if we have identified curses headers" >&5
6501 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6502 if test "${cf_cv_ncurses_header+set}" = set; then
6503 echo $ECHO_N "(cached) $ECHO_C" >&6
6506 cf_cv_ncurses_header=none
6508 ncurses.h $cf_cv_screen/ncurses.h \
6509 curses.h $cf_cv_screen/curses.h
6511 cat >conftest.$ac_ext <<_ACEOF
6512 #line 6512 "configure"
6513 #include "confdefs.h"
6514 #include <${cf_header}>
6518 initscr(); tgoto("?", 0,0)
6523 rm -f conftest.$ac_objext
6524 if { (eval echo "$as_me:6524: \"$ac_compile\"") >&5
6525 (eval $ac_compile) 2>&5
6527 echo "$as_me:6527: \$? = $ac_status" >&5
6528 (exit $ac_status); } &&
6529 { ac_try='test -s conftest.$ac_objext'
6530 { (eval echo "$as_me:6530: \"$ac_try\"") >&5
6533 echo "$as_me:6533: \$? = $ac_status" >&5
6534 (exit $ac_status); }; }; then
6535 cf_cv_ncurses_header=$cf_header; break
6537 echo "$as_me: failed program was:" >&5
6538 cat conftest.$ac_ext >&5
6540 rm -f conftest.$ac_objext conftest.$ac_ext
6544 echo "$as_me:6544: result: $cf_cv_ncurses_header" >&5
6545 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6547 if test "$cf_cv_ncurses_header" = none ; then
6548 { { echo "$as_me:6548: error: No curses header-files found" >&5
6549 echo "$as_me: error: No curses header-files found" >&2;}
6550 { (exit 1); exit 1; }; }
6553 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6555 for ac_header in $cf_cv_ncurses_header
6557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6558 echo "$as_me:6558: checking for $ac_header" >&5
6559 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6560 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6561 echo $ECHO_N "(cached) $ECHO_C" >&6
6563 cat >conftest.$ac_ext <<_ACEOF
6564 #line 6564 "configure"
6565 #include "confdefs.h"
6566 #include <$ac_header>
6568 if { (eval echo "$as_me:6568: \"$ac_cpp conftest.$ac_ext\"") >&5
6569 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6571 egrep -v '^ *\+' conftest.er1 >conftest.err
6573 cat conftest.err >&5
6574 echo "$as_me:6574: \$? = $ac_status" >&5
6575 (exit $ac_status); } >/dev/null; then
6576 if test -s conftest.err; then
6577 ac_cpp_err=$ac_c_preproc_warn_flag
6584 if test -z "$ac_cpp_err"; then
6585 eval "$as_ac_Header=yes"
6587 echo "$as_me: failed program was:" >&5
6588 cat conftest.$ac_ext >&5
6589 eval "$as_ac_Header=no"
6591 rm -f conftest.err conftest.$ac_ext
6593 echo "$as_me:6593: result: `eval echo '${'$as_ac_Header'}'`" >&5
6594 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6595 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6596 cat >>confdefs.h <<EOF
6597 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6603 cat >>confdefs.h <<\EOF
6607 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6609 cat >>confdefs.h <<EOF
6610 #define $cf_nculib_ROOT 1
6613 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6617 cf_ncuhdr_root=$cf_cv_screen
6619 test -n "$cf_cv_curses_dir" && \
6620 test "$cf_cv_curses_dir" != "no" && { \
6622 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6623 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6625 while test $cf_add_incdir != /usr/include
6627 if test -d $cf_add_incdir
6630 if test -n "$CFLAGS$CPPFLAGS" ; then
6631 # a loop is needed to ensure we can add subdirs of existing dirs
6632 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6633 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6634 cf_have_incdir=yes; break
6639 if test "$cf_have_incdir" = no ; then
6640 if test "$cf_add_incdir" = /usr/local/include ; then
6641 if test "$GCC" = yes
6643 cf_save_CPPFLAGS=$CPPFLAGS
6644 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6645 cat >conftest.$ac_ext <<_ACEOF
6646 #line 6646 "configure"
6647 #include "confdefs.h"
6657 rm -f conftest.$ac_objext
6658 if { (eval echo "$as_me:6658: \"$ac_compile\"") >&5
6659 (eval $ac_compile) 2>&5
6661 echo "$as_me:6661: \$? = $ac_status" >&5
6662 (exit $ac_status); } &&
6663 { ac_try='test -s conftest.$ac_objext'
6664 { (eval echo "$as_me:6664: \"$ac_try\"") >&5
6667 echo "$as_me:6667: \$? = $ac_status" >&5
6668 (exit $ac_status); }; }; then
6671 echo "$as_me: failed program was:" >&5
6672 cat conftest.$ac_ext >&5
6675 rm -f conftest.$ac_objext conftest.$ac_ext
6676 CPPFLAGS=$cf_save_CPPFLAGS
6681 if test "$cf_have_incdir" = no ; then
6682 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6684 echo "${as_me:-configure}:6684: testing adding $cf_add_incdir to include-path ..." 1>&5
6686 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6688 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6689 test "$cf_top_incdir" = "$cf_add_incdir" && break
6690 cf_add_incdir="$cf_top_incdir"
6703 echo "$as_me:6703: checking for $cf_ncuhdr_root header in include-path" >&5
6704 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6705 if test "${cf_cv_ncurses_h+set}" = set; then
6706 echo $ECHO_N "(cached) $ECHO_C" >&6
6709 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6710 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6711 for cf_header in $cf_header_list
6714 cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6718 #include <$cf_header>
6723 #ifdef NCURSES_VERSION
6725 printf("%s\n", NCURSES_VERSION);
6738 rm -f conftest.$ac_objext
6739 if { (eval echo "$as_me:6739: \"$ac_compile\"") >&5
6740 (eval $ac_compile) 2>&5
6742 echo "$as_me:6742: \$? = $ac_status" >&5
6743 (exit $ac_status); } &&
6744 { ac_try='test -s conftest.$ac_objext'
6745 { (eval echo "$as_me:6745: \"$ac_try\"") >&5
6748 echo "$as_me:6748: \$? = $ac_status" >&5
6749 (exit $ac_status); }; }; then
6750 cf_cv_ncurses_h=$cf_header
6753 echo "$as_me: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6757 rm -f conftest.$ac_objext conftest.$ac_ext
6759 test "$cf_cv_ncurses_h" != no && break
6763 echo "$as_me:6763: result: $cf_cv_ncurses_h" >&5
6764 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6766 if test "$cf_cv_ncurses_h" != no ; then
6767 cf_cv_ncurses_header=$cf_cv_ncurses_h
6770 echo "$as_me:6770: checking for $cf_ncuhdr_root include-path" >&5
6771 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6772 if test "${cf_cv_ncurses_h2+set}" = set; then
6773 echo $ECHO_N "(cached) $ECHO_C" >&6
6776 test -n "$verbose" && echo
6780 # collect the current set of include-directories from compiler flags
6781 cf_header_path_list=""
6782 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6783 for cf_header_path in $CPPFLAGS $CFLAGS
6785 case $cf_header_path in
6787 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6789 test "x$cf_header_path" != "xNONE" && \
6790 test -d "$cf_header_path" && \
6792 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6793 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6794 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6795 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6796 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6797 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"
6800 cf_header_path_list="$cf_header_path_list $cf_search"
6806 # add the variations for the package we are looking for
6810 test "x$prefix" != "xNONE" && \
6811 test -d "$prefix" && \
6813 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6814 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6815 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6816 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6817 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6818 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6821 for cf_subdir_prefix in \
6830 test "x$cf_subdir_prefix" != "x$prefix" && \
6831 test -d "$cf_subdir_prefix" && \
6832 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6833 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6834 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6835 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6836 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6837 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6838 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6843 test "$includedir" != NONE && \
6844 test "$includedir" != "/usr/include" && \
6845 test -d "$includedir" && {
6846 test -d $includedir && cf_search="$cf_search $includedir"
6847 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6850 test "$oldincludedir" != NONE && \
6851 test "$oldincludedir" != "/usr/include" && \
6852 test -d "$oldincludedir" && {
6853 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6854 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6857 cf_search="$cf_search $cf_header_path_list"
6859 test -n "$verbose" && echo search path $cf_search
6860 cf_save2_CPPFLAGS="$CPPFLAGS"
6861 for cf_incdir in $cf_search
6864 if test -n "$cf_incdir" ; then
6865 for cf_add_incdir in $cf_incdir
6867 while test $cf_add_incdir != /usr/include
6869 if test -d $cf_add_incdir
6872 if test -n "$CFLAGS$CPPFLAGS" ; then
6873 # a loop is needed to ensure we can add subdirs of existing dirs
6874 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6875 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6876 cf_have_incdir=yes; break
6881 if test "$cf_have_incdir" = no ; then
6882 if test "$cf_add_incdir" = /usr/local/include ; then
6883 if test "$GCC" = yes
6885 cf_save_CPPFLAGS=$CPPFLAGS
6886 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6887 cat >conftest.$ac_ext <<_ACEOF
6888 #line 6888 "configure"
6889 #include "confdefs.h"
6899 rm -f conftest.$ac_objext
6900 if { (eval echo "$as_me:6900: \"$ac_compile\"") >&5
6901 (eval $ac_compile) 2>&5
6903 echo "$as_me:6903: \$? = $ac_status" >&5
6904 (exit $ac_status); } &&
6905 { ac_try='test -s conftest.$ac_objext'
6906 { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6909 echo "$as_me:6909: \$? = $ac_status" >&5
6910 (exit $ac_status); }; }; then
6913 echo "$as_me: failed program was:" >&5
6914 cat conftest.$ac_ext >&5
6917 rm -f conftest.$ac_objext conftest.$ac_ext
6918 CPPFLAGS=$cf_save_CPPFLAGS
6923 if test "$cf_have_incdir" = no ; then
6924 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6926 echo "${as_me:-configure}:6926: testing adding $cf_add_incdir to include-path ..." 1>&5
6928 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6930 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6931 test "$cf_top_incdir" = "$cf_add_incdir" && break
6932 cf_add_incdir="$cf_top_incdir"
6948 cat >conftest.$ac_ext <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6952 #include <$cf_header>
6957 #ifdef NCURSES_VERSION
6959 printf("%s\n", NCURSES_VERSION);
6972 rm -f conftest.$ac_objext
6973 if { (eval echo "$as_me:6973: \"$ac_compile\"") >&5
6974 (eval $ac_compile) 2>&5
6976 echo "$as_me:6976: \$? = $ac_status" >&5
6977 (exit $ac_status); } &&
6978 { ac_try='test -s conftest.$ac_objext'
6979 { (eval echo "$as_me:6979: \"$ac_try\"") >&5
6982 echo "$as_me:6982: \$? = $ac_status" >&5
6983 (exit $ac_status); }; }; then
6984 cf_cv_ncurses_h2=$cf_header
6987 echo "$as_me: failed program was:" >&5
6988 cat conftest.$ac_ext >&5
6991 rm -f conftest.$ac_objext conftest.$ac_ext
6993 if test "$cf_cv_ncurses_h2" != no ; then
6994 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6995 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6998 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7000 CPPFLAGS="$cf_save2_CPPFLAGS"
7001 test "$cf_cv_ncurses_h2" != no && break
7003 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7003: error: not found" >&5
7004 echo "$as_me: error: not found" >&2;}
7005 { (exit 1); exit 1; }; }
7008 echo "$as_me:7008: result: $cf_cv_ncurses_h2" >&5
7009 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7011 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7012 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7013 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7014 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7017 if test -n "$cf_1st_incdir" ; then
7018 for cf_add_incdir in $cf_1st_incdir
7020 while test $cf_add_incdir != /usr/include
7022 if test -d $cf_add_incdir
7025 if test -n "$CFLAGS$CPPFLAGS" ; then
7026 # a loop is needed to ensure we can add subdirs of existing dirs
7027 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7028 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7029 cf_have_incdir=yes; break
7034 if test "$cf_have_incdir" = no ; then
7035 if test "$cf_add_incdir" = /usr/local/include ; then
7036 if test "$GCC" = yes
7038 cf_save_CPPFLAGS=$CPPFLAGS
7039 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7040 cat >conftest.$ac_ext <<_ACEOF
7041 #line 7041 "configure"
7042 #include "confdefs.h"
7052 rm -f conftest.$ac_objext
7053 if { (eval echo "$as_me:7053: \"$ac_compile\"") >&5
7054 (eval $ac_compile) 2>&5
7056 echo "$as_me:7056: \$? = $ac_status" >&5
7057 (exit $ac_status); } &&
7058 { ac_try='test -s conftest.$ac_objext'
7059 { (eval echo "$as_me:7059: \"$ac_try\"") >&5
7062 echo "$as_me:7062: \$? = $ac_status" >&5
7063 (exit $ac_status); }; }; then
7066 echo "$as_me: failed program was:" >&5
7067 cat conftest.$ac_ext >&5
7070 rm -f conftest.$ac_objext conftest.$ac_ext
7071 CPPFLAGS=$cf_save_CPPFLAGS
7076 if test "$cf_have_incdir" = no ; then
7077 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7079 echo "${as_me:-configure}:7079: testing adding $cf_add_incdir to include-path ..." 1>&5
7081 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7083 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7084 test "$cf_top_incdir" = "$cf_add_incdir" && break
7085 cf_add_incdir="$cf_top_incdir"
7098 # Set definitions to allow ifdef'ing for ncurses.h
7100 case $cf_cv_ncurses_header in
7103 cat >>confdefs.h <<\EOF
7104 #define HAVE_NCURSES_H 1
7110 case $cf_cv_ncurses_header in
7111 (ncurses/curses.h|ncurses/ncurses.h)
7113 cat >>confdefs.h <<\EOF
7114 #define HAVE_NCURSES_NCURSES_H 1
7118 (ncursesw/curses.h|ncursesw/ncurses.h)
7120 cat >>confdefs.h <<\EOF
7121 #define HAVE_NCURSESW_NCURSES_H 1
7127 echo "$as_me:7127: checking for terminfo header" >&5
7128 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7129 if test "${cf_cv_term_header+set}" = set; then
7130 echo $ECHO_N "(cached) $ECHO_C" >&6
7133 case ${cf_cv_ncurses_header} in
7134 (*/ncurses.h|*/ncursesw.h)
7135 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7138 cf_term_header=term.h
7142 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7144 cat >conftest.$ac_ext <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7148 #include <${cf_cv_ncurses_header:-curses.h}>
7154 int x = auto_left_margin
7159 rm -f conftest.$ac_objext
7160 if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
7161 (eval $ac_compile) 2>&5
7163 echo "$as_me:7163: \$? = $ac_status" >&5
7164 (exit $ac_status); } &&
7165 { ac_try='test -s conftest.$ac_objext'
7166 { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7169 echo "$as_me:7169: \$? = $ac_status" >&5
7170 (exit $ac_status); }; }; then
7172 cf_cv_term_header="$cf_test"
7174 echo "$as_me: failed program was:" >&5
7175 cat conftest.$ac_ext >&5
7177 cf_cv_term_header=unknown
7180 rm -f conftest.$ac_objext conftest.$ac_ext
7181 test "$cf_cv_term_header" != unknown && break
7185 echo "$as_me:7185: result: $cf_cv_term_header" >&5
7186 echo "${ECHO_T}$cf_cv_term_header" >&6
7188 # Set definitions to allow ifdef'ing to accommodate subdirectories
7190 case $cf_cv_term_header in
7193 cat >>confdefs.h <<\EOF
7194 #define HAVE_TERM_H 1
7200 case $cf_cv_term_header in
7203 cat >>confdefs.h <<\EOF
7204 #define HAVE_NCURSES_TERM_H 1
7210 cat >>confdefs.h <<\EOF
7211 #define HAVE_NCURSESW_TERM_H 1
7217 # some applications need this, but should check for NCURSES_VERSION
7219 cat >>confdefs.h <<\EOF
7223 echo "$as_me:7223: checking for ncurses version" >&5
7224 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7225 if test "${cf_cv_ncurses_version+set}" = set; then
7226 echo $ECHO_N "(cached) $ECHO_C" >&6
7229 cf_cv_ncurses_version=no
7232 if test "$cross_compiling" = yes; then
7234 # This will not work if the preprocessor splits the line after the
7235 # Autoconf token. The 'unproto' program does that.
7236 cat > conftest.$ac_ext <<EOF
7237 #include <${cf_cv_ncurses_header:-curses.h}>
7239 #ifdef NCURSES_VERSION
7240 Autoconf NCURSES_VERSION
7248 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7249 { (eval echo "$as_me:7249: \"$cf_try\"") >&5
7252 echo "$as_me:7252: \$? = $ac_status" >&5
7253 (exit $ac_status); }
7254 if test -f conftest.out ; then
7255 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7256 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7261 cat >conftest.$ac_ext <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7265 #include <${cf_cv_ncurses_header:-curses.h}>
7269 FILE *fp = fopen("$cf_tempfile", "w");
7270 #ifdef NCURSES_VERSION
7271 # ifdef NCURSES_VERSION_PATCH
7272 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7274 fprintf(fp, "%s\n", NCURSES_VERSION);
7278 fprintf(fp, "old\n");
7283 ${cf_cv_main_return:-return}(0);
7286 rm -f conftest$ac_exeext
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288 (eval $ac_link) 2>&5
7290 echo "$as_me:7290: \$? = $ac_status" >&5
7291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7292 { (eval echo "$as_me:7292: \"$ac_try\"") >&5
7295 echo "$as_me:7295: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7298 cf_cv_ncurses_version=`cat $cf_tempfile`
7300 echo "$as_me: program exited with status $ac_status" >&5
7301 echo "$as_me: failed program was:" >&5
7302 cat conftest.$ac_ext >&5
7304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7309 echo "$as_me:7309: result: $cf_cv_ncurses_version" >&5
7310 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7311 test "$cf_cv_ncurses_version" = no ||
7312 cat >>confdefs.h <<\EOF
7316 cf_nculib_root=$cf_cv_screen
7317 # This works, except for the special case where we find gpm, but
7318 # ncurses is in a nonstandard location via $LIBS, and we really want
7321 cf_ncurses_SAVE="$LIBS"
7322 echo "$as_me:7322: checking for Gpm_Open in -lgpm" >&5
7323 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7324 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7325 echo $ECHO_N "(cached) $ECHO_C" >&6
7327 ac_check_lib_save_LIBS=$LIBS
7329 cat >conftest.$ac_ext <<_ACEOF
7330 #line 7330 "configure"
7331 #include "confdefs.h"
7333 /* Override any gcc2 internal prototype to avoid an error. */
7337 /* We use char because int might match the return type of a gcc2
7338 builtin and then its argument prototype would still apply. */
7348 rm -f conftest.$ac_objext conftest$ac_exeext
7349 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350 (eval $ac_link) 2>&5
7352 echo "$as_me:7352: \$? = $ac_status" >&5
7353 (exit $ac_status); } &&
7354 { ac_try='test -s conftest$ac_exeext'
7355 { (eval echo "$as_me:7355: \"$ac_try\"") >&5
7358 echo "$as_me:7358: \$? = $ac_status" >&5
7359 (exit $ac_status); }; }; then
7360 ac_cv_lib_gpm_Gpm_Open=yes
7362 echo "$as_me: failed program was:" >&5
7363 cat conftest.$ac_ext >&5
7364 ac_cv_lib_gpm_Gpm_Open=no
7366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7367 LIBS=$ac_check_lib_save_LIBS
7369 echo "$as_me:7369: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7370 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7371 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7372 echo "$as_me:7372: checking for initscr in -lgpm" >&5
7373 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7374 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7375 echo $ECHO_N "(cached) $ECHO_C" >&6
7377 ac_check_lib_save_LIBS=$LIBS
7379 cat >conftest.$ac_ext <<_ACEOF
7380 #line 7380 "configure"
7381 #include "confdefs.h"
7383 /* Override any gcc2 internal prototype to avoid an error. */
7387 /* We use char because int might match the return type of a gcc2
7388 builtin and then its argument prototype would still apply. */
7398 rm -f conftest.$ac_objext conftest$ac_exeext
7399 if { (eval echo "$as_me:7399: \"$ac_link\"") >&5
7400 (eval $ac_link) 2>&5
7402 echo "$as_me:7402: \$? = $ac_status" >&5
7403 (exit $ac_status); } &&
7404 { ac_try='test -s conftest$ac_exeext'
7405 { (eval echo "$as_me:7405: \"$ac_try\"") >&5
7408 echo "$as_me:7408: \$? = $ac_status" >&5
7409 (exit $ac_status); }; }; then
7410 ac_cv_lib_gpm_initscr=yes
7412 echo "$as_me: failed program was:" >&5
7413 cat conftest.$ac_ext >&5
7414 ac_cv_lib_gpm_initscr=no
7416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7417 LIBS=$ac_check_lib_save_LIBS
7419 echo "$as_me:7419: result: $ac_cv_lib_gpm_initscr" >&5
7420 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7421 if test $ac_cv_lib_gpm_initscr = yes; then
7422 LIBS="$cf_ncurses_SAVE"
7424 cf_ncurses_LIBS="-lgpm"
7431 # This is only necessary if you are linking against an obsolete
7432 # version of ncurses (but it should do no harm, since it's static).
7433 if test "$cf_nculib_root" = ncurses ; then
7434 echo "$as_me:7434: checking for tgoto in -lmytinfo" >&5
7435 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7436 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7437 echo $ECHO_N "(cached) $ECHO_C" >&6
7439 ac_check_lib_save_LIBS=$LIBS
7440 LIBS="-lmytinfo $LIBS"
7441 cat >conftest.$ac_ext <<_ACEOF
7442 #line 7442 "configure"
7443 #include "confdefs.h"
7445 /* Override any gcc2 internal prototype to avoid an error. */
7449 /* We use char because int might match the return type of a gcc2
7450 builtin and then its argument prototype would still apply. */
7460 rm -f conftest.$ac_objext conftest$ac_exeext
7461 if { (eval echo "$as_me:7461: \"$ac_link\"") >&5
7462 (eval $ac_link) 2>&5
7464 echo "$as_me:7464: \$? = $ac_status" >&5
7465 (exit $ac_status); } &&
7466 { ac_try='test -s conftest$ac_exeext'
7467 { (eval echo "$as_me:7467: \"$ac_try\"") >&5
7470 echo "$as_me:7470: \$? = $ac_status" >&5
7471 (exit $ac_status); }; }; then
7472 ac_cv_lib_mytinfo_tgoto=yes
7474 echo "$as_me: failed program was:" >&5
7475 cat conftest.$ac_ext >&5
7476 ac_cv_lib_mytinfo_tgoto=no
7478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7479 LIBS=$ac_check_lib_save_LIBS
7481 echo "$as_me:7481: result: $ac_cv_lib_mytinfo_tgoto" >&5
7482 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7483 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7484 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7491 cf_add_libs="$cf_ncurses_LIBS"
7492 # Filter out duplicates - this happens with badly-designed ".pc" files...
7493 for cf_add_1lib in $LIBS
7495 for cf_add_2lib in $cf_add_libs
7497 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7503 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7507 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7510 cf_add_libs="-l$cf_nculib_root"
7511 # Filter out duplicates - this happens with badly-designed ".pc" files...
7512 for cf_add_1lib in $LIBS
7514 for cf_add_2lib in $cf_add_libs
7516 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7528 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7530 echo "$as_me:7530: checking for initscr" >&5
7531 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7532 if test "${ac_cv_func_initscr+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
7535 cat >conftest.$ac_ext <<_ACEOF
7536 #line 7536 "configure"
7537 #include "confdefs.h"
7538 /* System header to define __stub macros and hopefully few prototypes,
7539 which can conflict with char initscr (); below. */
7541 /* Override any gcc2 internal prototype to avoid an error. */
7545 /* We use char because int might match the return type of a gcc2
7546 builtin and then its argument prototype would still apply. */
7553 /* The GNU C library defines this for functions which it implements
7554 to always fail with ENOSYS. Some functions are actually named
7555 something starting with __ and the normal name is an alias. */
7556 #if defined (__stub_initscr) || defined (__stub___initscr)
7559 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7566 rm -f conftest.$ac_objext conftest$ac_exeext
7567 if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
7568 (eval $ac_link) 2>&5
7570 echo "$as_me:7570: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest$ac_exeext'
7573 { (eval echo "$as_me:7573: \"$ac_try\"") >&5
7576 echo "$as_me:7576: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578 ac_cv_func_initscr=yes
7580 echo "$as_me: failed program was:" >&5
7581 cat conftest.$ac_ext >&5
7582 ac_cv_func_initscr=no
7584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7586 echo "$as_me:7586: result: $ac_cv_func_initscr" >&5
7587 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7588 if test $ac_cv_func_initscr = yes; then
7589 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7592 cf_save_LIBS="$LIBS"
7593 echo "$as_me:7593: checking for initscr in -l$cf_nculib_root" >&5
7594 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7595 LIBS="-l$cf_nculib_root $LIBS"
7596 cat >conftest.$ac_ext <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599 #include <${cf_cv_ncurses_header:-curses.h}>
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 echo "$as_me:7620: result: yes" >&5
7621 echo "${ECHO_T}yes" >&6
7622 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7625 echo "$as_me: failed program was:" >&5
7626 cat conftest.$ac_ext >&5
7627 echo "$as_me:7627: result: no" >&5
7628 echo "${ECHO_T}no" >&6
7631 cf_library_path_list=""
7632 if test -n "${LDFLAGS}${LIBS}" ; then
7633 for cf_library_path in $LDFLAGS $LIBS
7635 case $cf_library_path in
7637 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7639 test "x$cf_library_path" != "xNONE" && \
7640 test -d "$cf_library_path" && \
7642 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7643 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7644 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7645 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7646 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7647 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"
7650 cf_library_path_list="$cf_library_path_list $cf_search"
7658 test "x$prefix" != "xNONE" && \
7659 test -d "$prefix" && \
7661 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7662 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7663 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7664 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7665 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7666 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7669 for cf_subdir_prefix in \
7678 test "x$cf_subdir_prefix" != "x$prefix" && \
7679 test -d "$cf_subdir_prefix" && \
7680 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7681 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7682 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7683 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7684 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7685 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7686 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
7691 cf_search="$cf_library_path_list $cf_search"
7693 for cf_libdir in $cf_search
7695 echo "$as_me:7695: checking for -l$cf_nculib_root in $cf_libdir" >&5
7696 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7697 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7698 cat >conftest.$ac_ext <<_ACEOF
7699 #line 7699 "configure"
7700 #include "confdefs.h"
7701 #include <${cf_cv_ncurses_header:-curses.h}>
7710 rm -f conftest.$ac_objext conftest$ac_exeext
7711 if { (eval echo "$as_me:7711: \"$ac_link\"") >&5
7712 (eval $ac_link) 2>&5
7714 echo "$as_me:7714: \$? = $ac_status" >&5
7715 (exit $ac_status); } &&
7716 { ac_try='test -s conftest$ac_exeext'
7717 { (eval echo "$as_me:7717: \"$ac_try\"") >&5
7720 echo "$as_me:7720: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 echo "$as_me:7722: result: yes" >&5
7723 echo "${ECHO_T}yes" >&6
7724 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7727 echo "$as_me: failed program was:" >&5
7728 cat conftest.$ac_ext >&5
7729 echo "$as_me:7729: result: no" >&5
7730 echo "${ECHO_T}no" >&6
7731 LIBS="$cf_save_LIBS"
7733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7741 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7743 if test $cf_found_library = no ; then
7744 { { echo "$as_me:7744: error: Cannot link $cf_nculib_root library" >&5
7745 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7746 { (exit 1); exit 1; }; }
7751 if test -n "$cf_ncurses_LIBS" ; then
7752 echo "$as_me:7752: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7753 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7754 cf_ncurses_SAVE="$LIBS"
7755 for p in $cf_ncurses_LIBS ; do
7756 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7757 if test "$q" != "$LIBS" ; then
7761 cat >conftest.$ac_ext <<_ACEOF
7762 #line 7762 "configure"
7763 #include "confdefs.h"
7764 #include <${cf_cv_ncurses_header:-curses.h}>
7768 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7773 rm -f conftest.$ac_objext conftest$ac_exeext
7774 if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
7775 (eval $ac_link) 2>&5
7777 echo "$as_me:7777: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
7779 { ac_try='test -s conftest$ac_exeext'
7780 { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7783 echo "$as_me:7783: \$? = $ac_status" >&5
7784 (exit $ac_status); }; }; then
7785 echo "$as_me:7785: result: yes" >&5
7786 echo "${ECHO_T}yes" >&6
7788 echo "$as_me: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7790 echo "$as_me:7790: result: no" >&5
7791 echo "${ECHO_T}no" >&6
7792 LIBS="$cf_ncurses_SAVE"
7794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7797 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7799 cat >>confdefs.h <<EOF
7800 #define $cf_nculib_ROOT 1
7811 cf_ncuconfig_root=$cf_cv_screen
7812 cf_have_ncuconfig=no
7814 if test "x${PKG_CONFIG:=none}" != xnone; then
7815 echo "$as_me:7815: checking pkg-config for $cf_ncuconfig_root" >&5
7816 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7817 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7818 echo "$as_me:7818: result: yes" >&5
7819 echo "${ECHO_T}yes" >&6
7821 echo "$as_me:7821: checking if the $cf_ncuconfig_root package files work" >&5
7822 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7823 cf_have_ncuconfig=unknown
7825 cf_save_CPPFLAGS="$CPPFLAGS"
7826 cf_save_LIBS="$LIBS"
7828 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7830 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7831 # Filter out duplicates - this happens with badly-designed ".pc" files...
7832 for cf_add_1lib in $LIBS
7834 for cf_add_2lib in $cf_add_libs
7836 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7842 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7846 cat >conftest.$ac_ext <<_ACEOF
7847 #line 7847 "configure"
7848 #include "confdefs.h"
7849 #include <${cf_cv_ncurses_header:-curses.h}>
7853 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7858 rm -f conftest.$ac_objext conftest$ac_exeext
7859 if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
7860 (eval $ac_link) 2>&5
7862 echo "$as_me:7862: \$? = $ac_status" >&5
7863 (exit $ac_status); } &&
7864 { ac_try='test -s conftest$ac_exeext'
7865 { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7868 echo "$as_me:7868: \$? = $ac_status" >&5
7869 (exit $ac_status); }; }; then
7870 if test "$cross_compiling" = yes; then
7871 cf_have_ncuconfig=maybe
7873 cat >conftest.$ac_ext <<_ACEOF
7874 #line 7874 "configure"
7875 #include "confdefs.h"
7876 #include <${cf_cv_ncurses_header:-curses.h}>
7878 { char *xx = curses_version(); return (xx == 0); }
7880 rm -f conftest$ac_exeext
7881 if { (eval echo "$as_me:7881: \"$ac_link\"") >&5
7882 (eval $ac_link) 2>&5
7884 echo "$as_me:7884: \$? = $ac_status" >&5
7885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7886 { (eval echo "$as_me:7886: \"$ac_try\"") >&5
7889 echo "$as_me:7889: \$? = $ac_status" >&5
7890 (exit $ac_status); }; }; then
7891 cf_have_ncuconfig=yes
7893 echo "$as_me: program exited with status $ac_status" >&5
7894 echo "$as_me: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7896 cf_have_ncuconfig=no
7898 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7901 echo "$as_me: failed program was:" >&5
7902 cat conftest.$ac_ext >&5
7903 cf_have_ncuconfig=no
7905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7906 echo "$as_me:7906: result: $cf_have_ncuconfig" >&5
7907 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7908 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7909 if test "$cf_have_ncuconfig" != "yes"
7911 CPPFLAGS="$cf_save_CPPFLAGS"
7912 LIBS="$cf_save_LIBS"
7913 NCURSES_CONFIG_PKG=none
7916 cat >>confdefs.h <<\EOF
7920 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7924 echo "$as_me:7924: result: no" >&5
7925 echo "${ECHO_T}no" >&6
7926 NCURSES_CONFIG_PKG=none
7929 NCURSES_CONFIG_PKG=none
7932 if test "x$cf_have_ncuconfig" = "xno"; then
7933 echo "Looking for ${cf_ncuconfig_root}-config"
7935 if test -n "$ac_tool_prefix"; then
7936 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7938 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7939 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7940 echo "$as_me:7940: checking for $ac_word" >&5
7941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7942 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7943 echo $ECHO_N "(cached) $ECHO_C" >&6
7945 if test -n "$NCURSES_CONFIG"; then
7946 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7948 ac_save_IFS=$IFS; IFS=$ac_path_separator
7950 for ac_dir in $ac_dummy; do
7952 test -z "$ac_dir" && ac_dir=.
7953 $as_executable_p "$ac_dir/$ac_word" || continue
7954 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7955 echo "$as_me:7955: found $ac_dir/$ac_word" >&5
7961 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7962 if test -n "$NCURSES_CONFIG"; then
7963 echo "$as_me:7963: result: $NCURSES_CONFIG" >&5
7964 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7966 echo "$as_me:7966: result: no" >&5
7967 echo "${ECHO_T}no" >&6
7970 test -n "$NCURSES_CONFIG" && break
7973 if test -z "$NCURSES_CONFIG"; then
7974 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7975 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7977 # Extract the first word of "$ac_prog", so it can be a program name with args.
7978 set dummy $ac_prog; ac_word=$2
7979 echo "$as_me:7979: checking for $ac_word" >&5
7980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7981 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7982 echo $ECHO_N "(cached) $ECHO_C" >&6
7984 if test -n "$ac_ct_NCURSES_CONFIG"; then
7985 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7987 ac_save_IFS=$IFS; IFS=$ac_path_separator
7989 for ac_dir in $ac_dummy; do
7991 test -z "$ac_dir" && ac_dir=.
7992 $as_executable_p "$ac_dir/$ac_word" || continue
7993 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7994 echo "$as_me:7994: found $ac_dir/$ac_word" >&5
8000 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8001 if test -n "$ac_ct_NCURSES_CONFIG"; then
8002 echo "$as_me:8002: result: $ac_ct_NCURSES_CONFIG" >&5
8003 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8005 echo "$as_me:8005: result: no" >&5
8006 echo "${ECHO_T}no" >&6
8009 test -n "$ac_ct_NCURSES_CONFIG" && break
8011 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8013 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8016 if test "$NCURSES_CONFIG" != none ; then
8018 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8020 cf_add_libs="`$NCURSES_CONFIG --libs`"
8021 # Filter out duplicates - this happens with badly-designed ".pc" files...
8022 for cf_add_1lib in $LIBS
8024 for cf_add_2lib in $cf_add_libs
8026 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8036 # even with config script, some packages use no-override for curses.h
8038 echo "$as_me:8038: checking if we have identified curses headers" >&5
8039 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8040 if test "${cf_cv_ncurses_header+set}" = set; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
8044 cf_cv_ncurses_header=none
8046 ncurses.h $cf_cv_screen/ncurses.h \
8047 curses.h $cf_cv_screen/curses.h
8049 cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <${cf_header}>
8056 initscr(); tgoto("?", 0,0)
8061 rm -f conftest.$ac_objext
8062 if { (eval echo "$as_me:8062: \"$ac_compile\"") >&5
8063 (eval $ac_compile) 2>&5
8065 echo "$as_me:8065: \$? = $ac_status" >&5
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest.$ac_objext'
8068 { (eval echo "$as_me:8068: \"$ac_try\"") >&5
8071 echo "$as_me:8071: \$? = $ac_status" >&5
8072 (exit $ac_status); }; }; then
8073 cf_cv_ncurses_header=$cf_header; break
8075 echo "$as_me: failed program was:" >&5
8076 cat conftest.$ac_ext >&5
8078 rm -f conftest.$ac_objext conftest.$ac_ext
8082 echo "$as_me:8082: result: $cf_cv_ncurses_header" >&5
8083 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8085 if test "$cf_cv_ncurses_header" = none ; then
8086 { { echo "$as_me:8086: error: No curses header-files found" >&5
8087 echo "$as_me: error: No curses header-files found" >&2;}
8088 { (exit 1); exit 1; }; }
8091 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8093 for ac_header in $cf_cv_ncurses_header
8095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8096 echo "$as_me:8096: checking for $ac_header" >&5
8097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8099 echo $ECHO_N "(cached) $ECHO_C" >&6
8101 cat >conftest.$ac_ext <<_ACEOF
8102 #line 8102 "configure"
8103 #include "confdefs.h"
8104 #include <$ac_header>
8106 if { (eval echo "$as_me:8106: \"$ac_cpp conftest.$ac_ext\"") >&5
8107 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8109 egrep -v '^ *\+' conftest.er1 >conftest.err
8111 cat conftest.err >&5
8112 echo "$as_me:8112: \$? = $ac_status" >&5
8113 (exit $ac_status); } >/dev/null; then
8114 if test -s conftest.err; then
8115 ac_cpp_err=$ac_c_preproc_warn_flag
8122 if test -z "$ac_cpp_err"; then
8123 eval "$as_ac_Header=yes"
8125 echo "$as_me: failed program was:" >&5
8126 cat conftest.$ac_ext >&5
8127 eval "$as_ac_Header=no"
8129 rm -f conftest.err conftest.$ac_ext
8131 echo "$as_me:8131: result: `eval echo '${'$as_ac_Header'}'`" >&5
8132 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8133 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8134 cat >>confdefs.h <<EOF
8135 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8141 cat >>confdefs.h <<\EOF
8145 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8147 cat >>confdefs.h <<EOF
8148 #define $cf_nculib_ROOT 1
8151 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8155 cf_ncuhdr_root=$cf_cv_screen
8157 test -n "$cf_cv_curses_dir" && \
8158 test "$cf_cv_curses_dir" != "no" && { \
8160 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8161 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8163 while test $cf_add_incdir != /usr/include
8165 if test -d $cf_add_incdir
8168 if test -n "$CFLAGS$CPPFLAGS" ; then
8169 # a loop is needed to ensure we can add subdirs of existing dirs
8170 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8171 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8172 cf_have_incdir=yes; break
8177 if test "$cf_have_incdir" = no ; then
8178 if test "$cf_add_incdir" = /usr/local/include ; then
8179 if test "$GCC" = yes
8181 cf_save_CPPFLAGS=$CPPFLAGS
8182 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8183 cat >conftest.$ac_ext <<_ACEOF
8184 #line 8184 "configure"
8185 #include "confdefs.h"
8195 rm -f conftest.$ac_objext
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8199 echo "$as_me:8199: \$? = $ac_status" >&5
8200 (exit $ac_status); } &&
8201 { ac_try='test -s conftest.$ac_objext'
8202 { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8205 echo "$as_me:8205: \$? = $ac_status" >&5
8206 (exit $ac_status); }; }; then
8209 echo "$as_me: failed program was:" >&5
8210 cat conftest.$ac_ext >&5
8213 rm -f conftest.$ac_objext conftest.$ac_ext
8214 CPPFLAGS=$cf_save_CPPFLAGS
8219 if test "$cf_have_incdir" = no ; then
8220 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8222 echo "${as_me:-configure}:8222: testing adding $cf_add_incdir to include-path ..." 1>&5
8224 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8226 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8227 test "$cf_top_incdir" = "$cf_add_incdir" && break
8228 cf_add_incdir="$cf_top_incdir"
8241 echo "$as_me:8241: checking for $cf_ncuhdr_root header in include-path" >&5
8242 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8243 if test "${cf_cv_ncurses_h+set}" = set; then
8244 echo $ECHO_N "(cached) $ECHO_C" >&6
8247 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8248 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8249 for cf_header in $cf_header_list
8252 cat >conftest.$ac_ext <<_ACEOF
8253 #line 8253 "configure"
8254 #include "confdefs.h"
8256 #include <$cf_header>
8261 #ifdef NCURSES_VERSION
8263 printf("%s\n", NCURSES_VERSION);
8276 rm -f conftest.$ac_objext
8277 if { (eval echo "$as_me:8277: \"$ac_compile\"") >&5
8278 (eval $ac_compile) 2>&5
8280 echo "$as_me:8280: \$? = $ac_status" >&5
8281 (exit $ac_status); } &&
8282 { ac_try='test -s conftest.$ac_objext'
8283 { (eval echo "$as_me:8283: \"$ac_try\"") >&5
8286 echo "$as_me:8286: \$? = $ac_status" >&5
8287 (exit $ac_status); }; }; then
8288 cf_cv_ncurses_h=$cf_header
8291 echo "$as_me: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
8295 rm -f conftest.$ac_objext conftest.$ac_ext
8297 test "$cf_cv_ncurses_h" != no && break
8301 echo "$as_me:8301: result: $cf_cv_ncurses_h" >&5
8302 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8304 if test "$cf_cv_ncurses_h" != no ; then
8305 cf_cv_ncurses_header=$cf_cv_ncurses_h
8308 echo "$as_me:8308: checking for $cf_ncuhdr_root include-path" >&5
8309 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8310 if test "${cf_cv_ncurses_h2+set}" = set; then
8311 echo $ECHO_N "(cached) $ECHO_C" >&6
8314 test -n "$verbose" && echo
8318 # collect the current set of include-directories from compiler flags
8319 cf_header_path_list=""
8320 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8321 for cf_header_path in $CPPFLAGS $CFLAGS
8323 case $cf_header_path in
8325 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8327 test "x$cf_header_path" != "xNONE" && \
8328 test -d "$cf_header_path" && \
8330 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8331 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8332 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8333 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8334 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8335 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"
8338 cf_header_path_list="$cf_header_path_list $cf_search"
8344 # add the variations for the package we are looking for
8348 test "x$prefix" != "xNONE" && \
8349 test -d "$prefix" && \
8351 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8352 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8353 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8354 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8355 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8356 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8359 for cf_subdir_prefix in \
8368 test "x$cf_subdir_prefix" != "x$prefix" && \
8369 test -d "$cf_subdir_prefix" && \
8370 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8371 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8372 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8373 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8374 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8375 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8376 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8381 test "$includedir" != NONE && \
8382 test "$includedir" != "/usr/include" && \
8383 test -d "$includedir" && {
8384 test -d $includedir && cf_search="$cf_search $includedir"
8385 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8388 test "$oldincludedir" != NONE && \
8389 test "$oldincludedir" != "/usr/include" && \
8390 test -d "$oldincludedir" && {
8391 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8392 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8395 cf_search="$cf_search $cf_header_path_list"
8397 test -n "$verbose" && echo search path $cf_search
8398 cf_save2_CPPFLAGS="$CPPFLAGS"
8399 for cf_incdir in $cf_search
8402 if test -n "$cf_incdir" ; then
8403 for cf_add_incdir in $cf_incdir
8405 while test $cf_add_incdir != /usr/include
8407 if test -d $cf_add_incdir
8410 if test -n "$CFLAGS$CPPFLAGS" ; then
8411 # a loop is needed to ensure we can add subdirs of existing dirs
8412 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8413 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8414 cf_have_incdir=yes; break
8419 if test "$cf_have_incdir" = no ; then
8420 if test "$cf_add_incdir" = /usr/local/include ; then
8421 if test "$GCC" = yes
8423 cf_save_CPPFLAGS=$CPPFLAGS
8424 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8425 cat >conftest.$ac_ext <<_ACEOF
8426 #line 8426 "configure"
8427 #include "confdefs.h"
8437 rm -f conftest.$ac_objext
8438 if { (eval echo "$as_me:8438: \"$ac_compile\"") >&5
8439 (eval $ac_compile) 2>&5
8441 echo "$as_me:8441: \$? = $ac_status" >&5
8442 (exit $ac_status); } &&
8443 { ac_try='test -s conftest.$ac_objext'
8444 { (eval echo "$as_me:8444: \"$ac_try\"") >&5
8447 echo "$as_me:8447: \$? = $ac_status" >&5
8448 (exit $ac_status); }; }; then
8451 echo "$as_me: failed program was:" >&5
8452 cat conftest.$ac_ext >&5
8455 rm -f conftest.$ac_objext conftest.$ac_ext
8456 CPPFLAGS=$cf_save_CPPFLAGS
8461 if test "$cf_have_incdir" = no ; then
8462 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8464 echo "${as_me:-configure}:8464: testing adding $cf_add_incdir to include-path ..." 1>&5
8466 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8468 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8469 test "$cf_top_incdir" = "$cf_add_incdir" && break
8470 cf_add_incdir="$cf_top_incdir"
8486 cat >conftest.$ac_ext <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8490 #include <$cf_header>
8495 #ifdef NCURSES_VERSION
8497 printf("%s\n", NCURSES_VERSION);
8510 rm -f conftest.$ac_objext
8511 if { (eval echo "$as_me:8511: \"$ac_compile\"") >&5
8512 (eval $ac_compile) 2>&5
8514 echo "$as_me:8514: \$? = $ac_status" >&5
8515 (exit $ac_status); } &&
8516 { ac_try='test -s conftest.$ac_objext'
8517 { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8520 echo "$as_me:8520: \$? = $ac_status" >&5
8521 (exit $ac_status); }; }; then
8522 cf_cv_ncurses_h2=$cf_header
8525 echo "$as_me: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8529 rm -f conftest.$ac_objext conftest.$ac_ext
8531 if test "$cf_cv_ncurses_h2" != no ; then
8532 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8533 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8536 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8538 CPPFLAGS="$cf_save2_CPPFLAGS"
8539 test "$cf_cv_ncurses_h2" != no && break
8541 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8541: error: not found" >&5
8542 echo "$as_me: error: not found" >&2;}
8543 { (exit 1); exit 1; }; }
8546 echo "$as_me:8546: result: $cf_cv_ncurses_h2" >&5
8547 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8549 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8550 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8551 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8552 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8555 if test -n "$cf_1st_incdir" ; then
8556 for cf_add_incdir in $cf_1st_incdir
8558 while test $cf_add_incdir != /usr/include
8560 if test -d $cf_add_incdir
8563 if test -n "$CFLAGS$CPPFLAGS" ; then
8564 # a loop is needed to ensure we can add subdirs of existing dirs
8565 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8566 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8567 cf_have_incdir=yes; break
8572 if test "$cf_have_incdir" = no ; then
8573 if test "$cf_add_incdir" = /usr/local/include ; then
8574 if test "$GCC" = yes
8576 cf_save_CPPFLAGS=$CPPFLAGS
8577 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8578 cat >conftest.$ac_ext <<_ACEOF
8579 #line 8579 "configure"
8580 #include "confdefs.h"
8590 rm -f conftest.$ac_objext
8591 if { (eval echo "$as_me:8591: \"$ac_compile\"") >&5
8592 (eval $ac_compile) 2>&5
8594 echo "$as_me:8594: \$? = $ac_status" >&5
8595 (exit $ac_status); } &&
8596 { ac_try='test -s conftest.$ac_objext'
8597 { (eval echo "$as_me:8597: \"$ac_try\"") >&5
8600 echo "$as_me:8600: \$? = $ac_status" >&5
8601 (exit $ac_status); }; }; then
8604 echo "$as_me: failed program was:" >&5
8605 cat conftest.$ac_ext >&5
8608 rm -f conftest.$ac_objext conftest.$ac_ext
8609 CPPFLAGS=$cf_save_CPPFLAGS
8614 if test "$cf_have_incdir" = no ; then
8615 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8617 echo "${as_me:-configure}:8617: testing adding $cf_add_incdir to include-path ..." 1>&5
8619 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8621 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8622 test "$cf_top_incdir" = "$cf_add_incdir" && break
8623 cf_add_incdir="$cf_top_incdir"
8636 # Set definitions to allow ifdef'ing for ncurses.h
8638 case $cf_cv_ncurses_header in
8641 cat >>confdefs.h <<\EOF
8642 #define HAVE_NCURSES_H 1
8648 case $cf_cv_ncurses_header in
8649 (ncurses/curses.h|ncurses/ncurses.h)
8651 cat >>confdefs.h <<\EOF
8652 #define HAVE_NCURSES_NCURSES_H 1
8656 (ncursesw/curses.h|ncursesw/ncurses.h)
8658 cat >>confdefs.h <<\EOF
8659 #define HAVE_NCURSESW_NCURSES_H 1
8665 echo "$as_me:8665: checking for terminfo header" >&5
8666 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8667 if test "${cf_cv_term_header+set}" = set; then
8668 echo $ECHO_N "(cached) $ECHO_C" >&6
8671 case ${cf_cv_ncurses_header} in
8672 (*/ncurses.h|*/ncursesw.h)
8673 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8676 cf_term_header=term.h
8680 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8682 cat >conftest.$ac_ext <<_ACEOF
8683 #line 8683 "configure"
8684 #include "confdefs.h"
8686 #include <${cf_cv_ncurses_header:-curses.h}>
8692 int x = auto_left_margin
8697 rm -f conftest.$ac_objext
8698 if { (eval echo "$as_me:8698: \"$ac_compile\"") >&5
8699 (eval $ac_compile) 2>&5
8701 echo "$as_me:8701: \$? = $ac_status" >&5
8702 (exit $ac_status); } &&
8703 { ac_try='test -s conftest.$ac_objext'
8704 { (eval echo "$as_me:8704: \"$ac_try\"") >&5
8707 echo "$as_me:8707: \$? = $ac_status" >&5
8708 (exit $ac_status); }; }; then
8710 cf_cv_term_header="$cf_test"
8712 echo "$as_me: failed program was:" >&5
8713 cat conftest.$ac_ext >&5
8715 cf_cv_term_header=unknown
8718 rm -f conftest.$ac_objext conftest.$ac_ext
8719 test "$cf_cv_term_header" != unknown && break
8723 echo "$as_me:8723: result: $cf_cv_term_header" >&5
8724 echo "${ECHO_T}$cf_cv_term_header" >&6
8726 # Set definitions to allow ifdef'ing to accommodate subdirectories
8728 case $cf_cv_term_header in
8731 cat >>confdefs.h <<\EOF
8732 #define HAVE_TERM_H 1
8738 case $cf_cv_term_header in
8741 cat >>confdefs.h <<\EOF
8742 #define HAVE_NCURSES_TERM_H 1
8748 cat >>confdefs.h <<\EOF
8749 #define HAVE_NCURSESW_TERM_H 1
8755 # some applications need this, but should check for NCURSES_VERSION
8757 cat >>confdefs.h <<\EOF
8761 echo "$as_me:8761: checking for ncurses version" >&5
8762 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8763 if test "${cf_cv_ncurses_version+set}" = set; then
8764 echo $ECHO_N "(cached) $ECHO_C" >&6
8767 cf_cv_ncurses_version=no
8770 if test "$cross_compiling" = yes; then
8772 # This will not work if the preprocessor splits the line after the
8773 # Autoconf token. The 'unproto' program does that.
8774 cat > conftest.$ac_ext <<EOF
8775 #include <${cf_cv_ncurses_header:-curses.h}>
8777 #ifdef NCURSES_VERSION
8778 Autoconf NCURSES_VERSION
8786 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8787 { (eval echo "$as_me:8787: \"$cf_try\"") >&5
8790 echo "$as_me:8790: \$? = $ac_status" >&5
8791 (exit $ac_status); }
8792 if test -f conftest.out ; then
8793 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8794 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8799 cat >conftest.$ac_ext <<_ACEOF
8800 #line 8800 "configure"
8801 #include "confdefs.h"
8803 #include <${cf_cv_ncurses_header:-curses.h}>
8807 FILE *fp = fopen("$cf_tempfile", "w");
8808 #ifdef NCURSES_VERSION
8809 # ifdef NCURSES_VERSION_PATCH
8810 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8812 fprintf(fp, "%s\n", NCURSES_VERSION);
8816 fprintf(fp, "old\n");
8821 ${cf_cv_main_return:-return}(0);
8824 rm -f conftest$ac_exeext
8825 if { (eval echo "$as_me:8825: \"$ac_link\"") >&5
8826 (eval $ac_link) 2>&5
8828 echo "$as_me:8828: \$? = $ac_status" >&5
8829 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8830 { (eval echo "$as_me:8830: \"$ac_try\"") >&5
8833 echo "$as_me:8833: \$? = $ac_status" >&5
8834 (exit $ac_status); }; }; then
8836 cf_cv_ncurses_version=`cat $cf_tempfile`
8838 echo "$as_me: program exited with status $ac_status" >&5
8839 echo "$as_me: failed program was:" >&5
8840 cat conftest.$ac_ext >&5
8842 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8847 echo "$as_me:8847: result: $cf_cv_ncurses_version" >&5
8848 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8849 test "$cf_cv_ncurses_version" = no ||
8850 cat >>confdefs.h <<\EOF
8854 cf_nculib_root=$cf_cv_screen
8855 # This works, except for the special case where we find gpm, but
8856 # ncurses is in a nonstandard location via $LIBS, and we really want
8859 cf_ncurses_SAVE="$LIBS"
8860 echo "$as_me:8860: checking for Gpm_Open in -lgpm" >&5
8861 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8862 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8863 echo $ECHO_N "(cached) $ECHO_C" >&6
8865 ac_check_lib_save_LIBS=$LIBS
8867 cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8871 /* Override any gcc2 internal prototype to avoid an error. */
8875 /* We use char because int might match the return type of a gcc2
8876 builtin and then its argument prototype would still apply. */
8886 rm -f conftest.$ac_objext conftest$ac_exeext
8887 if { (eval echo "$as_me:8887: \"$ac_link\"") >&5
8888 (eval $ac_link) 2>&5
8890 echo "$as_me:8890: \$? = $ac_status" >&5
8891 (exit $ac_status); } &&
8892 { ac_try='test -s conftest$ac_exeext'
8893 { (eval echo "$as_me:8893: \"$ac_try\"") >&5
8896 echo "$as_me:8896: \$? = $ac_status" >&5
8897 (exit $ac_status); }; }; then
8898 ac_cv_lib_gpm_Gpm_Open=yes
8900 echo "$as_me: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8902 ac_cv_lib_gpm_Gpm_Open=no
8904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8905 LIBS=$ac_check_lib_save_LIBS
8907 echo "$as_me:8907: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8908 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8909 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8910 echo "$as_me:8910: checking for initscr in -lgpm" >&5
8911 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8912 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8913 echo $ECHO_N "(cached) $ECHO_C" >&6
8915 ac_check_lib_save_LIBS=$LIBS
8917 cat >conftest.$ac_ext <<_ACEOF
8918 #line 8918 "configure"
8919 #include "confdefs.h"
8921 /* Override any gcc2 internal prototype to avoid an error. */
8925 /* We use char because int might match the return type of a gcc2
8926 builtin and then its argument prototype would still apply. */
8936 rm -f conftest.$ac_objext conftest$ac_exeext
8937 if { (eval echo "$as_me:8937: \"$ac_link\"") >&5
8938 (eval $ac_link) 2>&5
8940 echo "$as_me:8940: \$? = $ac_status" >&5
8941 (exit $ac_status); } &&
8942 { ac_try='test -s conftest$ac_exeext'
8943 { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8946 echo "$as_me:8946: \$? = $ac_status" >&5
8947 (exit $ac_status); }; }; then
8948 ac_cv_lib_gpm_initscr=yes
8950 echo "$as_me: failed program was:" >&5
8951 cat conftest.$ac_ext >&5
8952 ac_cv_lib_gpm_initscr=no
8954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8955 LIBS=$ac_check_lib_save_LIBS
8957 echo "$as_me:8957: result: $ac_cv_lib_gpm_initscr" >&5
8958 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8959 if test $ac_cv_lib_gpm_initscr = yes; then
8960 LIBS="$cf_ncurses_SAVE"
8962 cf_ncurses_LIBS="-lgpm"
8969 # This is only necessary if you are linking against an obsolete
8970 # version of ncurses (but it should do no harm, since it's static).
8971 if test "$cf_nculib_root" = ncurses ; then
8972 echo "$as_me:8972: checking for tgoto in -lmytinfo" >&5
8973 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8974 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8975 echo $ECHO_N "(cached) $ECHO_C" >&6
8977 ac_check_lib_save_LIBS=$LIBS
8978 LIBS="-lmytinfo $LIBS"
8979 cat >conftest.$ac_ext <<_ACEOF
8980 #line 8980 "configure"
8981 #include "confdefs.h"
8983 /* Override any gcc2 internal prototype to avoid an error. */
8987 /* We use char because int might match the return type of a gcc2
8988 builtin and then its argument prototype would still apply. */
8998 rm -f conftest.$ac_objext conftest$ac_exeext
8999 if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000 (eval $ac_link) 2>&5
9002 echo "$as_me:9002: \$? = $ac_status" >&5
9003 (exit $ac_status); } &&
9004 { ac_try='test -s conftest$ac_exeext'
9005 { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9008 echo "$as_me:9008: \$? = $ac_status" >&5
9009 (exit $ac_status); }; }; then
9010 ac_cv_lib_mytinfo_tgoto=yes
9012 echo "$as_me: failed program was:" >&5
9013 cat conftest.$ac_ext >&5
9014 ac_cv_lib_mytinfo_tgoto=no
9016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9017 LIBS=$ac_check_lib_save_LIBS
9019 echo "$as_me:9019: result: $ac_cv_lib_mytinfo_tgoto" >&5
9020 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9021 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9022 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9029 cf_add_libs="$cf_ncurses_LIBS"
9030 # Filter out duplicates - this happens with badly-designed ".pc" files...
9031 for cf_add_1lib in $LIBS
9033 for cf_add_2lib in $cf_add_libs
9035 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9041 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9045 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9048 cf_add_libs="-l$cf_nculib_root"
9049 # Filter out duplicates - this happens with badly-designed ".pc" files...
9050 for cf_add_1lib in $LIBS
9052 for cf_add_2lib in $cf_add_libs
9054 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9060 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9066 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9068 echo "$as_me:9068: checking for initscr" >&5
9069 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9070 if test "${ac_cv_func_initscr+set}" = set; then
9071 echo $ECHO_N "(cached) $ECHO_C" >&6
9073 cat >conftest.$ac_ext <<_ACEOF
9074 #line 9074 "configure"
9075 #include "confdefs.h"
9076 /* System header to define __stub macros and hopefully few prototypes,
9077 which can conflict with char initscr (); below. */
9079 /* Override any gcc2 internal prototype to avoid an error. */
9083 /* We use char because int might match the return type of a gcc2
9084 builtin and then its argument prototype would still apply. */
9091 /* The GNU C library defines this for functions which it implements
9092 to always fail with ENOSYS. Some functions are actually named
9093 something starting with __ and the normal name is an alias. */
9094 #if defined (__stub_initscr) || defined (__stub___initscr)
9097 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9104 rm -f conftest.$ac_objext conftest$ac_exeext
9105 if { (eval echo "$as_me:9105: \"$ac_link\"") >&5
9106 (eval $ac_link) 2>&5
9108 echo "$as_me:9108: \$? = $ac_status" >&5
9109 (exit $ac_status); } &&
9110 { ac_try='test -s conftest$ac_exeext'
9111 { (eval echo "$as_me:9111: \"$ac_try\"") >&5
9114 echo "$as_me:9114: \$? = $ac_status" >&5
9115 (exit $ac_status); }; }; then
9116 ac_cv_func_initscr=yes
9118 echo "$as_me: failed program was:" >&5
9119 cat conftest.$ac_ext >&5
9120 ac_cv_func_initscr=no
9122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9124 echo "$as_me:9124: result: $ac_cv_func_initscr" >&5
9125 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9126 if test $ac_cv_func_initscr = yes; then
9127 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9130 cf_save_LIBS="$LIBS"
9131 echo "$as_me:9131: checking for initscr in -l$cf_nculib_root" >&5
9132 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9133 LIBS="-l$cf_nculib_root $LIBS"
9134 cat >conftest.$ac_ext <<_ACEOF
9135 #line 9135 "configure"
9136 #include "confdefs.h"
9137 #include <${cf_cv_ncurses_header:-curses.h}>
9146 rm -f conftest.$ac_objext conftest$ac_exeext
9147 if { (eval echo "$as_me:9147: \"$ac_link\"") >&5
9148 (eval $ac_link) 2>&5
9150 echo "$as_me:9150: \$? = $ac_status" >&5
9151 (exit $ac_status); } &&
9152 { ac_try='test -s conftest$ac_exeext'
9153 { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9156 echo "$as_me:9156: \$? = $ac_status" >&5
9157 (exit $ac_status); }; }; then
9158 echo "$as_me:9158: result: yes" >&5
9159 echo "${ECHO_T}yes" >&6
9160 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9163 echo "$as_me: failed program was:" >&5
9164 cat conftest.$ac_ext >&5
9165 echo "$as_me:9165: result: no" >&5
9166 echo "${ECHO_T}no" >&6
9169 cf_library_path_list=""
9170 if test -n "${LDFLAGS}${LIBS}" ; then
9171 for cf_library_path in $LDFLAGS $LIBS
9173 case $cf_library_path in
9175 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9177 test "x$cf_library_path" != "xNONE" && \
9178 test -d "$cf_library_path" && \
9180 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9181 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9182 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9183 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9184 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9185 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"
9188 cf_library_path_list="$cf_library_path_list $cf_search"
9196 test "x$prefix" != "xNONE" && \
9197 test -d "$prefix" && \
9199 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9200 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9201 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9202 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9203 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9204 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9207 for cf_subdir_prefix in \
9216 test "x$cf_subdir_prefix" != "x$prefix" && \
9217 test -d "$cf_subdir_prefix" && \
9218 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9219 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9220 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9221 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9222 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9223 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9224 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
9229 cf_search="$cf_library_path_list $cf_search"
9231 for cf_libdir in $cf_search
9233 echo "$as_me:9233: checking for -l$cf_nculib_root in $cf_libdir" >&5
9234 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9235 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9236 cat >conftest.$ac_ext <<_ACEOF
9237 #line 9237 "configure"
9238 #include "confdefs.h"
9239 #include <${cf_cv_ncurses_header:-curses.h}>
9248 rm -f conftest.$ac_objext conftest$ac_exeext
9249 if { (eval echo "$as_me:9249: \"$ac_link\"") >&5
9250 (eval $ac_link) 2>&5
9252 echo "$as_me:9252: \$? = $ac_status" >&5
9253 (exit $ac_status); } &&
9254 { ac_try='test -s conftest$ac_exeext'
9255 { (eval echo "$as_me:9255: \"$ac_try\"") >&5
9258 echo "$as_me:9258: \$? = $ac_status" >&5
9259 (exit $ac_status); }; }; then
9260 echo "$as_me:9260: result: yes" >&5
9261 echo "${ECHO_T}yes" >&6
9262 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9265 echo "$as_me: failed program was:" >&5
9266 cat conftest.$ac_ext >&5
9267 echo "$as_me:9267: result: no" >&5
9268 echo "${ECHO_T}no" >&6
9269 LIBS="$cf_save_LIBS"
9271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9279 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9281 if test $cf_found_library = no ; then
9282 { { echo "$as_me:9282: error: Cannot link $cf_nculib_root library" >&5
9283 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9284 { (exit 1); exit 1; }; }
9289 if test -n "$cf_ncurses_LIBS" ; then
9290 echo "$as_me:9290: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9291 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9292 cf_ncurses_SAVE="$LIBS"
9293 for p in $cf_ncurses_LIBS ; do
9294 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9295 if test "$q" != "$LIBS" ; then
9299 cat >conftest.$ac_ext <<_ACEOF
9300 #line 9300 "configure"
9301 #include "confdefs.h"
9302 #include <${cf_cv_ncurses_header:-curses.h}>
9306 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9311 rm -f conftest.$ac_objext conftest$ac_exeext
9312 if { (eval echo "$as_me:9312: \"$ac_link\"") >&5
9313 (eval $ac_link) 2>&5
9315 echo "$as_me:9315: \$? = $ac_status" >&5
9316 (exit $ac_status); } &&
9317 { ac_try='test -s conftest$ac_exeext'
9318 { (eval echo "$as_me:9318: \"$ac_try\"") >&5
9321 echo "$as_me:9321: \$? = $ac_status" >&5
9322 (exit $ac_status); }; }; then
9323 echo "$as_me:9323: result: yes" >&5
9324 echo "${ECHO_T}yes" >&6
9326 echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 echo "$as_me:9328: result: no" >&5
9329 echo "${ECHO_T}no" >&6
9330 LIBS="$cf_ncurses_SAVE"
9332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9335 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9337 cat >>confdefs.h <<EOF
9338 #define $cf_nculib_ROOT 1
9348 echo "$as_me:9348: checking for X" >&5
9349 echo $ECHO_N "checking for X... $ECHO_C" >&6
9351 # Check whether --with-x or --without-x was given.
9352 if test "${with_x+set}" = set; then
9356 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9357 if test "x$with_x" = xno; then
9358 # The user explicitly disabled X.
9361 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9362 # Both variables are already set.
9365 if test "${ac_cv_have_x+set}" = set; then
9366 echo $ECHO_N "(cached) $ECHO_C" >&6
9368 # One or both of the vars are not set, and there is no cached value.
9369 ac_x_includes=no ac_x_libraries=no
9371 if mkdir conftest.dir; then
9373 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9374 cat >Imakefile <<'EOF'
9376 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9378 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9379 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9380 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9381 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9382 for ac_extension in a so sl dylib dll; do
9383 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9384 test -f $ac_im_libdir/libX11.$ac_extension; then
9385 ac_im_usrlibdir=$ac_im_libdir; break
9388 # Screen out bogus values from the imake configuration. They are
9389 # bogus both because they are the default anyway, and because
9390 # using them would break gcc on systems where it needs fixed includes.
9391 case $ac_im_incroot in
9393 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9395 case $ac_im_usrlibdir in
9397 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9404 # Standard set of common directories for X headers.
9405 # Check X11 before X11Rn because it is often a symlink to the current release.
9417 /usr/local/X11/include
9418 /usr/local/X11R6/include
9419 /usr/local/X11R5/include
9420 /usr/local/X11R4/include
9422 /usr/local/include/X11
9423 /usr/local/include/X11R6
9424 /usr/local/include/X11R5
9425 /usr/local/include/X11R4
9429 /usr/XFree86/include/X11
9433 /usr/unsupported/include
9435 /usr/local/x11r5/include
9436 /usr/lpp/Xamples/include
9438 /usr/openwin/include
9439 /usr/openwin/share/include'
9441 if test "$ac_x_includes" = no; then
9442 # Guess where to find include files, by looking for Intrinsic.h.
9443 # First, try using that file with no special directory specified.
9444 cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447 #include <X11/Intrinsic.h>
9449 if { (eval echo "$as_me:9449: \"$ac_cpp conftest.$ac_ext\"") >&5
9450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9452 egrep -v '^ *\+' conftest.er1 >conftest.err
9454 cat conftest.err >&5
9455 echo "$as_me:9455: \$? = $ac_status" >&5
9456 (exit $ac_status); } >/dev/null; then
9457 if test -s conftest.err; then
9458 ac_cpp_err=$ac_c_preproc_warn_flag
9465 if test -z "$ac_cpp_err"; then
9466 # We can compile using X headers with no special include directory.
9469 echo "$as_me: failed program was:" >&5
9470 cat conftest.$ac_ext >&5
9471 for ac_dir in $ac_x_header_dirs; do
9472 if test -r "$ac_dir/X11/Intrinsic.h"; then
9473 ac_x_includes=$ac_dir
9478 rm -f conftest.err conftest.$ac_ext
9479 fi # $ac_x_includes = no
9481 if test "$ac_x_libraries" = no; then
9482 # Check for the libraries.
9483 # See if we find them without any special options.
9484 # Don't add to $LIBS permanently.
9487 cat >conftest.$ac_ext <<_ACEOF
9488 #line 9488 "configure"
9489 #include "confdefs.h"
9490 #include <X11/Intrinsic.h>
9499 rm -f conftest.$ac_objext conftest$ac_exeext
9500 if { (eval echo "$as_me:9500: \"$ac_link\"") >&5
9501 (eval $ac_link) 2>&5
9503 echo "$as_me:9503: \$? = $ac_status" >&5
9504 (exit $ac_status); } &&
9505 { ac_try='test -s conftest$ac_exeext'
9506 { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9509 echo "$as_me:9509: \$? = $ac_status" >&5
9510 (exit $ac_status); }; }; then
9512 # We can link X programs with no special library path.
9515 echo "$as_me: failed program was:" >&5
9516 cat conftest.$ac_ext >&5
9518 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9520 # Don't even attempt the hair of trying to link an X program!
9521 for ac_extension in a so sl dylib dll; do
9522 if test -r $ac_dir/libXt.$ac_extension; then
9523 ac_x_libraries=$ac_dir
9529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9530 fi # $ac_x_libraries = no
9532 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9533 # Didn't find X anywhere. Cache the known absence of X.
9534 ac_cv_have_x="have_x=no"
9536 # Record where we found X for the cache.
9537 ac_cv_have_x="have_x=yes \
9538 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9543 eval "$ac_cv_have_x"
9546 if test "$have_x" != yes; then
9547 echo "$as_me:9547: result: $have_x" >&5
9548 echo "${ECHO_T}$have_x" >&6
9551 # If each of the values was on the command line, it overrides each guess.
9552 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9553 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9554 # Update the cache value to reflect the command line values.
9555 ac_cv_have_x="have_x=yes \
9556 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9557 echo "$as_me:9557: result: libraries $x_libraries, headers $x_includes" >&5
9558 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9561 if test "$no_x" = yes; then
9562 # Not all programs may use this symbol, but it does not hurt to define it.
9564 cat >>confdefs.h <<\EOF
9565 #define X_DISPLAY_MISSING 1
9568 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9570 if test -n "$x_includes"; then
9571 X_CFLAGS="$X_CFLAGS -I$x_includes"
9574 # It would also be nice to do this for all -L options, not just this one.
9575 if test -n "$x_libraries"; then
9576 X_LIBS="$X_LIBS -L$x_libraries"
9577 # For Solaris; some versions of Sun CC require a space after -R and
9578 # others require no space. Words are not sufficient . . . .
9579 case `(uname -sr) 2>/dev/null` in
9581 echo "$as_me:9581: checking whether -R must be followed by a space" >&5
9582 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9583 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9584 cat >conftest.$ac_ext <<_ACEOF
9585 #line 9585 "configure"
9586 #include "confdefs.h"
9596 rm -f conftest.$ac_objext conftest$ac_exeext
9597 if { (eval echo "$as_me:9597: \"$ac_link\"") >&5
9598 (eval $ac_link) 2>&5
9600 echo "$as_me:9600: \$? = $ac_status" >&5
9601 (exit $ac_status); } &&
9602 { ac_try='test -s conftest$ac_exeext'
9603 { (eval echo "$as_me:9603: \"$ac_try\"") >&5
9606 echo "$as_me:9606: \$? = $ac_status" >&5
9607 (exit $ac_status); }; }; then
9610 echo "$as_me: failed program was:" >&5
9611 cat conftest.$ac_ext >&5
9614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9615 if test $ac_R_nospace = yes; then
9616 echo "$as_me:9616: result: no" >&5
9617 echo "${ECHO_T}no" >&6
9618 X_LIBS="$X_LIBS -R$x_libraries"
9620 LIBS="$ac_xsave_LIBS -R $x_libraries"
9621 cat >conftest.$ac_ext <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9633 rm -f conftest.$ac_objext conftest$ac_exeext
9634 if { (eval echo "$as_me:9634: \"$ac_link\"") >&5
9635 (eval $ac_link) 2>&5
9637 echo "$as_me:9637: \$? = $ac_status" >&5
9638 (exit $ac_status); } &&
9639 { ac_try='test -s conftest$ac_exeext'
9640 { (eval echo "$as_me:9640: \"$ac_try\"") >&5
9643 echo "$as_me:9643: \$? = $ac_status" >&5
9644 (exit $ac_status); }; }; then
9647 echo "$as_me: failed program was:" >&5
9648 cat conftest.$ac_ext >&5
9651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9652 if test $ac_R_space = yes; then
9653 echo "$as_me:9653: result: yes" >&5
9654 echo "${ECHO_T}yes" >&6
9655 X_LIBS="$X_LIBS -R $x_libraries"
9657 echo "$as_me:9657: result: neither works" >&5
9658 echo "${ECHO_T}neither works" >&6
9665 # Check for system-dependent libraries X programs must link with.
9666 # Do this before checking for the system-independent R6 libraries
9667 # (-lICE), since we may need -lsocket or whatever for X linking.
9669 if test "$ISC" = yes; then
9670 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9672 # Martyn Johnson says this is needed for Ultrix, if the X
9673 # libraries were built with DECnet support. And Karl Berry says
9674 # the Alpha needs dnet_stub (dnet does not exist).
9675 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9676 cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9680 /* Override any gcc2 internal prototype to avoid an error. */
9684 /* We use char because int might match the return type of a gcc2
9685 builtin and then its argument prototype would still apply. */
9686 char XOpenDisplay ();
9695 rm -f conftest.$ac_objext conftest$ac_exeext
9696 if { (eval echo "$as_me:9696: \"$ac_link\"") >&5
9697 (eval $ac_link) 2>&5
9699 echo "$as_me:9699: \$? = $ac_status" >&5
9700 (exit $ac_status); } &&
9701 { ac_try='test -s conftest$ac_exeext'
9702 { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9705 echo "$as_me:9705: \$? = $ac_status" >&5
9706 (exit $ac_status); }; }; then
9709 echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 echo "$as_me:9711: checking for dnet_ntoa in -ldnet" >&5
9712 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9713 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9714 echo $ECHO_N "(cached) $ECHO_C" >&6
9716 ac_check_lib_save_LIBS=$LIBS
9718 cat >conftest.$ac_ext <<_ACEOF
9719 #line 9719 "configure"
9720 #include "confdefs.h"
9722 /* Override any gcc2 internal prototype to avoid an error. */
9726 /* We use char because int might match the return type of a gcc2
9727 builtin and then its argument prototype would still apply. */
9737 rm -f conftest.$ac_objext conftest$ac_exeext
9738 if { (eval echo "$as_me:9738: \"$ac_link\"") >&5
9739 (eval $ac_link) 2>&5
9741 echo "$as_me:9741: \$? = $ac_status" >&5
9742 (exit $ac_status); } &&
9743 { ac_try='test -s conftest$ac_exeext'
9744 { (eval echo "$as_me:9744: \"$ac_try\"") >&5
9747 echo "$as_me:9747: \$? = $ac_status" >&5
9748 (exit $ac_status); }; }; then
9749 ac_cv_lib_dnet_dnet_ntoa=yes
9751 echo "$as_me: failed program was:" >&5
9752 cat conftest.$ac_ext >&5
9753 ac_cv_lib_dnet_dnet_ntoa=no
9755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9756 LIBS=$ac_check_lib_save_LIBS
9758 echo "$as_me:9758: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9759 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9760 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9761 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9764 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9765 echo "$as_me:9765: checking for dnet_ntoa in -ldnet_stub" >&5
9766 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9767 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9768 echo $ECHO_N "(cached) $ECHO_C" >&6
9770 ac_check_lib_save_LIBS=$LIBS
9771 LIBS="-ldnet_stub $LIBS"
9772 cat >conftest.$ac_ext <<_ACEOF
9773 #line 9773 "configure"
9774 #include "confdefs.h"
9776 /* Override any gcc2 internal prototype to avoid an error. */
9780 /* We use char because int might match the return type of a gcc2
9781 builtin and then its argument prototype would still apply. */
9791 rm -f conftest.$ac_objext conftest$ac_exeext
9792 if { (eval echo "$as_me:9792: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9795 echo "$as_me:9795: \$? = $ac_status" >&5
9796 (exit $ac_status); } &&
9797 { ac_try='test -s conftest$ac_exeext'
9798 { (eval echo "$as_me:9798: \"$ac_try\"") >&5
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit $ac_status); }; }; then
9803 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9805 echo "$as_me: failed program was:" >&5
9806 cat conftest.$ac_ext >&5
9807 ac_cv_lib_dnet_stub_dnet_ntoa=no
9809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9810 LIBS=$ac_check_lib_save_LIBS
9812 echo "$as_me:9812: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9813 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9814 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9815 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9821 LIBS="$ac_xsave_LIBS"
9823 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9824 # to get the SysV transport functions.
9825 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9827 # The nsl library prevents programs from opening the X display
9828 # on Irix 5.2, according to T.E. Dickey.
9829 # The functions gethostbyname, getservbyname, and inet_addr are
9830 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9831 echo "$as_me:9831: checking for gethostbyname" >&5
9832 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9833 if test "${ac_cv_func_gethostbyname+set}" = set; then
9834 echo $ECHO_N "(cached) $ECHO_C" >&6
9836 cat >conftest.$ac_ext <<_ACEOF
9837 #line 9837 "configure"
9838 #include "confdefs.h"
9839 /* System header to define __stub macros and hopefully few prototypes,
9840 which can conflict with char gethostbyname (); below. */
9842 /* Override any gcc2 internal prototype to avoid an error. */
9846 /* We use char because int might match the return type of a gcc2
9847 builtin and then its argument prototype would still apply. */
9848 char gethostbyname ();
9854 /* The GNU C library defines this for functions which it implements
9855 to always fail with ENOSYS. Some functions are actually named
9856 something starting with __ and the normal name is an alias. */
9857 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9860 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9867 rm -f conftest.$ac_objext conftest$ac_exeext
9868 if { (eval echo "$as_me:9868: \"$ac_link\"") >&5
9869 (eval $ac_link) 2>&5
9871 echo "$as_me:9871: \$? = $ac_status" >&5
9872 (exit $ac_status); } &&
9873 { ac_try='test -s conftest$ac_exeext'
9874 { (eval echo "$as_me:9874: \"$ac_try\"") >&5
9877 echo "$as_me:9877: \$? = $ac_status" >&5
9878 (exit $ac_status); }; }; then
9879 ac_cv_func_gethostbyname=yes
9881 echo "$as_me: failed program was:" >&5
9882 cat conftest.$ac_ext >&5
9883 ac_cv_func_gethostbyname=no
9885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9887 echo "$as_me:9887: result: $ac_cv_func_gethostbyname" >&5
9888 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9890 if test $ac_cv_func_gethostbyname = no; then
9891 echo "$as_me:9891: checking for gethostbyname in -lnsl" >&5
9892 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9893 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9894 echo $ECHO_N "(cached) $ECHO_C" >&6
9896 ac_check_lib_save_LIBS=$LIBS
9898 cat >conftest.$ac_ext <<_ACEOF
9899 #line 9899 "configure"
9900 #include "confdefs.h"
9902 /* Override any gcc2 internal prototype to avoid an error. */
9906 /* We use char because int might match the return type of a gcc2
9907 builtin and then its argument prototype would still apply. */
9908 char gethostbyname ();
9917 rm -f conftest.$ac_objext conftest$ac_exeext
9918 if { (eval echo "$as_me:9918: \"$ac_link\"") >&5
9919 (eval $ac_link) 2>&5
9921 echo "$as_me:9921: \$? = $ac_status" >&5
9922 (exit $ac_status); } &&
9923 { ac_try='test -s conftest$ac_exeext'
9924 { (eval echo "$as_me:9924: \"$ac_try\"") >&5
9927 echo "$as_me:9927: \$? = $ac_status" >&5
9928 (exit $ac_status); }; }; then
9929 ac_cv_lib_nsl_gethostbyname=yes
9931 echo "$as_me: failed program was:" >&5
9932 cat conftest.$ac_ext >&5
9933 ac_cv_lib_nsl_gethostbyname=no
9935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9936 LIBS=$ac_check_lib_save_LIBS
9938 echo "$as_me:9938: result: $ac_cv_lib_nsl_gethostbyname" >&5
9939 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9940 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9941 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9944 if test $ac_cv_lib_nsl_gethostbyname = no; then
9945 echo "$as_me:9945: checking for gethostbyname in -lbsd" >&5
9946 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9947 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9948 echo $ECHO_N "(cached) $ECHO_C" >&6
9950 ac_check_lib_save_LIBS=$LIBS
9952 cat >conftest.$ac_ext <<_ACEOF
9953 #line 9953 "configure"
9954 #include "confdefs.h"
9956 /* Override any gcc2 internal prototype to avoid an error. */
9960 /* We use char because int might match the return type of a gcc2
9961 builtin and then its argument prototype would still apply. */
9962 char gethostbyname ();
9971 rm -f conftest.$ac_objext conftest$ac_exeext
9972 if { (eval echo "$as_me:9972: \"$ac_link\"") >&5
9973 (eval $ac_link) 2>&5
9975 echo "$as_me:9975: \$? = $ac_status" >&5
9976 (exit $ac_status); } &&
9977 { ac_try='test -s conftest$ac_exeext'
9978 { (eval echo "$as_me:9978: \"$ac_try\"") >&5
9981 echo "$as_me:9981: \$? = $ac_status" >&5
9982 (exit $ac_status); }; }; then
9983 ac_cv_lib_bsd_gethostbyname=yes
9985 echo "$as_me: failed program was:" >&5
9986 cat conftest.$ac_ext >&5
9987 ac_cv_lib_bsd_gethostbyname=no
9989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9990 LIBS=$ac_check_lib_save_LIBS
9992 echo "$as_me:9992: result: $ac_cv_lib_bsd_gethostbyname" >&5
9993 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9994 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9995 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10001 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10002 # socket/setsockopt and other routines are undefined under SCO ODT
10003 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10004 # on later versions), says Simon Leinen: it contains gethostby*
10005 # variants that don't use the nameserver (or something). -lsocket
10006 # must be given before -lnsl if both are needed. We assume that
10007 # if connect needs -lnsl, so does gethostbyname.
10008 echo "$as_me:10008: checking for connect" >&5
10009 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10010 if test "${ac_cv_func_connect+set}" = set; then
10011 echo $ECHO_N "(cached) $ECHO_C" >&6
10013 cat >conftest.$ac_ext <<_ACEOF
10014 #line 10014 "configure"
10015 #include "confdefs.h"
10016 /* System header to define __stub macros and hopefully few prototypes,
10017 which can conflict with char connect (); below. */
10018 #include <assert.h>
10019 /* Override any gcc2 internal prototype to avoid an error. */
10023 /* We use char because int might match the return type of a gcc2
10024 builtin and then its argument prototype would still apply. */
10031 /* The GNU C library defines this for functions which it implements
10032 to always fail with ENOSYS. Some functions are actually named
10033 something starting with __ and the normal name is an alias. */
10034 #if defined (__stub_connect) || defined (__stub___connect)
10037 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10044 rm -f conftest.$ac_objext conftest$ac_exeext
10045 if { (eval echo "$as_me:10045: \"$ac_link\"") >&5
10046 (eval $ac_link) 2>&5
10048 echo "$as_me:10048: \$? = $ac_status" >&5
10049 (exit $ac_status); } &&
10050 { ac_try='test -s conftest$ac_exeext'
10051 { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052 (eval $ac_try) 2>&5
10054 echo "$as_me:10054: \$? = $ac_status" >&5
10055 (exit $ac_status); }; }; then
10056 ac_cv_func_connect=yes
10058 echo "$as_me: failed program was:" >&5
10059 cat conftest.$ac_ext >&5
10060 ac_cv_func_connect=no
10062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10064 echo "$as_me:10064: result: $ac_cv_func_connect" >&5
10065 echo "${ECHO_T}$ac_cv_func_connect" >&6
10067 if test $ac_cv_func_connect = no; then
10068 echo "$as_me:10068: checking for connect in -lsocket" >&5
10069 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10070 if test "${ac_cv_lib_socket_connect+set}" = set; then
10071 echo $ECHO_N "(cached) $ECHO_C" >&6
10073 ac_check_lib_save_LIBS=$LIBS
10074 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10075 cat >conftest.$ac_ext <<_ACEOF
10076 #line 10076 "configure"
10077 #include "confdefs.h"
10079 /* Override any gcc2 internal prototype to avoid an error. */
10083 /* We use char because int might match the return type of a gcc2
10084 builtin and then its argument prototype would still apply. */
10094 rm -f conftest.$ac_objext conftest$ac_exeext
10095 if { (eval echo "$as_me:10095: \"$ac_link\"") >&5
10096 (eval $ac_link) 2>&5
10098 echo "$as_me:10098: \$? = $ac_status" >&5
10099 (exit $ac_status); } &&
10100 { ac_try='test -s conftest$ac_exeext'
10101 { (eval echo "$as_me:10101: \"$ac_try\"") >&5
10102 (eval $ac_try) 2>&5
10104 echo "$as_me:10104: \$? = $ac_status" >&5
10105 (exit $ac_status); }; }; then
10106 ac_cv_lib_socket_connect=yes
10108 echo "$as_me: failed program was:" >&5
10109 cat conftest.$ac_ext >&5
10110 ac_cv_lib_socket_connect=no
10112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10113 LIBS=$ac_check_lib_save_LIBS
10115 echo "$as_me:10115: result: $ac_cv_lib_socket_connect" >&5
10116 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10117 if test $ac_cv_lib_socket_connect = yes; then
10118 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10123 # Guillermo Gomez says -lposix is necessary on A/UX.
10124 echo "$as_me:10124: checking for remove" >&5
10125 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10126 if test "${ac_cv_func_remove+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
10129 cat >conftest.$ac_ext <<_ACEOF
10130 #line 10130 "configure"
10131 #include "confdefs.h"
10132 /* System header to define __stub macros and hopefully few prototypes,
10133 which can conflict with char remove (); below. */
10134 #include <assert.h>
10135 /* Override any gcc2 internal prototype to avoid an error. */
10139 /* We use char because int might match the return type of a gcc2
10140 builtin and then its argument prototype would still apply. */
10147 /* The GNU C library defines this for functions which it implements
10148 to always fail with ENOSYS. Some functions are actually named
10149 something starting with __ and the normal name is an alias. */
10150 #if defined (__stub_remove) || defined (__stub___remove)
10153 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10160 rm -f conftest.$ac_objext conftest$ac_exeext
10161 if { (eval echo "$as_me:10161: \"$ac_link\"") >&5
10162 (eval $ac_link) 2>&5
10164 echo "$as_me:10164: \$? = $ac_status" >&5
10165 (exit $ac_status); } &&
10166 { ac_try='test -s conftest$ac_exeext'
10167 { (eval echo "$as_me:10167: \"$ac_try\"") >&5
10168 (eval $ac_try) 2>&5
10170 echo "$as_me:10170: \$? = $ac_status" >&5
10171 (exit $ac_status); }; }; then
10172 ac_cv_func_remove=yes
10174 echo "$as_me: failed program was:" >&5
10175 cat conftest.$ac_ext >&5
10176 ac_cv_func_remove=no
10178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10180 echo "$as_me:10180: result: $ac_cv_func_remove" >&5
10181 echo "${ECHO_T}$ac_cv_func_remove" >&6
10183 if test $ac_cv_func_remove = no; then
10184 echo "$as_me:10184: checking for remove in -lposix" >&5
10185 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10186 if test "${ac_cv_lib_posix_remove+set}" = set; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10189 ac_check_lib_save_LIBS=$LIBS
10190 LIBS="-lposix $LIBS"
10191 cat >conftest.$ac_ext <<_ACEOF
10192 #line 10192 "configure"
10193 #include "confdefs.h"
10195 /* Override any gcc2 internal prototype to avoid an error. */
10199 /* We use char because int might match the return type of a gcc2
10200 builtin and then its argument prototype would still apply. */
10210 rm -f conftest.$ac_objext conftest$ac_exeext
10211 if { (eval echo "$as_me:10211: \"$ac_link\"") >&5
10212 (eval $ac_link) 2>&5
10214 echo "$as_me:10214: \$? = $ac_status" >&5
10215 (exit $ac_status); } &&
10216 { ac_try='test -s conftest$ac_exeext'
10217 { (eval echo "$as_me:10217: \"$ac_try\"") >&5
10218 (eval $ac_try) 2>&5
10220 echo "$as_me:10220: \$? = $ac_status" >&5
10221 (exit $ac_status); }; }; then
10222 ac_cv_lib_posix_remove=yes
10224 echo "$as_me: failed program was:" >&5
10225 cat conftest.$ac_ext >&5
10226 ac_cv_lib_posix_remove=no
10228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10229 LIBS=$ac_check_lib_save_LIBS
10231 echo "$as_me:10231: result: $ac_cv_lib_posix_remove" >&5
10232 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10233 if test $ac_cv_lib_posix_remove = yes; then
10234 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10239 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10240 echo "$as_me:10240: checking for shmat" >&5
10241 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10242 if test "${ac_cv_func_shmat+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
10245 cat >conftest.$ac_ext <<_ACEOF
10246 #line 10246 "configure"
10247 #include "confdefs.h"
10248 /* System header to define __stub macros and hopefully few prototypes,
10249 which can conflict with char shmat (); below. */
10250 #include <assert.h>
10251 /* Override any gcc2 internal prototype to avoid an error. */
10255 /* We use char because int might match the return type of a gcc2
10256 builtin and then its argument prototype would still apply. */
10263 /* The GNU C library defines this for functions which it implements
10264 to always fail with ENOSYS. Some functions are actually named
10265 something starting with __ and the normal name is an alias. */
10266 #if defined (__stub_shmat) || defined (__stub___shmat)
10269 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10276 rm -f conftest.$ac_objext conftest$ac_exeext
10277 if { (eval echo "$as_me:10277: \"$ac_link\"") >&5
10278 (eval $ac_link) 2>&5
10280 echo "$as_me:10280: \$? = $ac_status" >&5
10281 (exit $ac_status); } &&
10282 { ac_try='test -s conftest$ac_exeext'
10283 { (eval echo "$as_me:10283: \"$ac_try\"") >&5
10284 (eval $ac_try) 2>&5
10286 echo "$as_me:10286: \$? = $ac_status" >&5
10287 (exit $ac_status); }; }; then
10288 ac_cv_func_shmat=yes
10290 echo "$as_me: failed program was:" >&5
10291 cat conftest.$ac_ext >&5
10292 ac_cv_func_shmat=no
10294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10296 echo "$as_me:10296: result: $ac_cv_func_shmat" >&5
10297 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10299 if test $ac_cv_func_shmat = no; then
10300 echo "$as_me:10300: checking for shmat in -lipc" >&5
10301 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10302 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10303 echo $ECHO_N "(cached) $ECHO_C" >&6
10305 ac_check_lib_save_LIBS=$LIBS
10307 cat >conftest.$ac_ext <<_ACEOF
10308 #line 10308 "configure"
10309 #include "confdefs.h"
10311 /* Override any gcc2 internal prototype to avoid an error. */
10315 /* We use char because int might match the return type of a gcc2
10316 builtin and then its argument prototype would still apply. */
10326 rm -f conftest.$ac_objext conftest$ac_exeext
10327 if { (eval echo "$as_me:10327: \"$ac_link\"") >&5
10328 (eval $ac_link) 2>&5
10330 echo "$as_me:10330: \$? = $ac_status" >&5
10331 (exit $ac_status); } &&
10332 { ac_try='test -s conftest$ac_exeext'
10333 { (eval echo "$as_me:10333: \"$ac_try\"") >&5
10334 (eval $ac_try) 2>&5
10336 echo "$as_me:10336: \$? = $ac_status" >&5
10337 (exit $ac_status); }; }; then
10338 ac_cv_lib_ipc_shmat=yes
10340 echo "$as_me: failed program was:" >&5
10341 cat conftest.$ac_ext >&5
10342 ac_cv_lib_ipc_shmat=no
10344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10345 LIBS=$ac_check_lib_save_LIBS
10347 echo "$as_me:10347: result: $ac_cv_lib_ipc_shmat" >&5
10348 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10349 if test $ac_cv_lib_ipc_shmat = yes; then
10350 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10356 # Check for libraries that X11R6 Xt/Xaw programs need.
10357 ac_save_LDFLAGS=$LDFLAGS
10358 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10359 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10360 # check for ICE first), but we must link in the order -lSM -lICE or
10361 # we get undefined symbols. So assume we have SM if we have ICE.
10362 # These have to be linked with before -lX11, unlike the other
10363 # libraries we check for below, so use a different variable.
10364 # John Interrante, Karl Berry
10365 echo "$as_me:10365: checking for IceConnectionNumber in -lICE" >&5
10366 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10367 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10368 echo $ECHO_N "(cached) $ECHO_C" >&6
10370 ac_check_lib_save_LIBS=$LIBS
10371 LIBS="-lICE $X_EXTRA_LIBS $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. */
10382 char IceConnectionNumber ();
10386 IceConnectionNumber ();
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_ICE_IceConnectionNumber=yes
10405 echo "$as_me: failed program was:" >&5
10406 cat conftest.$ac_ext >&5
10407 ac_cv_lib_ICE_IceConnectionNumber=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_ICE_IceConnectionNumber" >&5
10413 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10414 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10415 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10418 LDFLAGS=$ac_save_LDFLAGS
10422 cf_x_athena=${cf_x_athena:-Xaw}
10424 echo "$as_me:10424: checking if you want to link with Xaw 3d library" >&5
10425 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10428 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10429 if test "${with_Xaw3d+set}" = set; then
10430 withval="$with_Xaw3d"
10433 if test "$withval" = yes ; then
10435 echo "$as_me:10435: result: yes" >&5
10436 echo "${ECHO_T}yes" >&6
10438 echo "$as_me:10438: result: no" >&5
10439 echo "${ECHO_T}no" >&6
10442 echo "$as_me:10442: checking if you want to link with Xaw 3d xft library" >&5
10443 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10446 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10447 if test "${with_Xaw3dxft+set}" = set; then
10448 withval="$with_Xaw3dxft"
10451 if test "$withval" = yes ; then
10452 cf_x_athena=Xaw3dxft
10453 echo "$as_me:10453: result: yes" >&5
10454 echo "${ECHO_T}yes" >&6
10456 echo "$as_me:10456: result: no" >&5
10457 echo "${ECHO_T}no" >&6
10460 echo "$as_me:10460: checking if you want to link with neXT Athena library" >&5
10461 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10464 # Check whether --with-neXtaw or --without-neXtaw was given.
10465 if test "${with_neXtaw+set}" = set; then
10466 withval="$with_neXtaw"
10469 if test "$withval" = yes ; then
10471 echo "$as_me:10471: result: yes" >&5
10472 echo "${ECHO_T}yes" >&6
10474 echo "$as_me:10474: result: no" >&5
10475 echo "${ECHO_T}no" >&6
10478 echo "$as_me:10478: checking if you want to link with Athena-Plus library" >&5
10479 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10482 # Check whether --with-XawPlus or --without-XawPlus was given.
10483 if test "${with_XawPlus+set}" = set; then
10484 withval="$with_XawPlus"
10487 if test "$withval" = yes ; then
10488 cf_x_athena=XawPlus
10489 echo "$as_me:10489: result: yes" >&5
10490 echo "${ECHO_T}yes" >&6
10492 echo "$as_me:10492: result: no" >&5
10493 echo "${ECHO_T}no" >&6
10498 if test "$PKG_CONFIG" != none ; then
10500 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10501 for cf_athena_pkg in \
10504 ${cf_x_athena}-devel \
10505 lib${cf_x_athena} \
10506 lib${cf_x_athena}-devel
10509 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10510 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10512 echo "${as_me:-configure}:10512: testing found package $cf_athena_pkg ..." 1>&5
10514 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10515 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10516 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10518 echo "${as_me:-configure}:10518: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10520 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10522 echo "${as_me:-configure}:10522: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10527 cf_new_extra_cppflags=
10529 for cf_add_cflags in $cf_pkgconfig_incs
10531 case $cf_fix_cppflags in
10533 case $cf_add_cflags in
10534 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10535 case $cf_add_cflags in
10537 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10539 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10540 && test -z "${cf_tst_cflags}" \
10541 && cf_fix_cppflags=yes
10543 if test $cf_fix_cppflags = yes ; then
10544 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10546 elif test "${cf_tst_cflags}" = "\"'" ; then
10547 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10552 case "$CPPFLAGS" in
10556 case $cf_add_cflags in
10558 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10560 CPPFLAGS=`echo "$CPPFLAGS" | \
10561 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10562 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10566 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10571 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10576 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10578 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10580 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10581 && test -z "${cf_tst_cflags}" \
10582 && cf_fix_cppflags=no
10587 if test -n "$cf_new_cflags" ; then
10589 CFLAGS="$CFLAGS $cf_new_cflags"
10592 if test -n "$cf_new_cppflags" ; then
10594 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10597 if test -n "$cf_new_extra_cppflags" ; then
10599 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10602 cf_add_libs="$cf_pkgconfig_libs"
10603 # Filter out duplicates - this happens with badly-designed ".pc" files...
10604 for cf_add_1lib in $LIBS
10606 for cf_add_2lib in $cf_add_libs
10608 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10614 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10616 LIBS="$cf_add_libs"
10618 cf_x_athena_lib="$cf_pkgconfig_libs"
10620 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10622 cat >>confdefs.h <<EOF
10623 #define $cf_x_athena_LIBS 1
10626 for cf_trim_lib in Xmu Xt X11
10629 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10630 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10631 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10633 echo "${as_me:-configure}:10633: testing ..trimmed $LIBS ..." 1>&5
10639 echo "$as_me:10639: checking for usable $cf_x_athena/Xmu package" >&5
10640 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10641 if test "${cf_cv_xaw_compat+set}" = set; then
10642 echo $ECHO_N "(cached) $ECHO_C" >&6
10645 cat >conftest.$ac_ext <<_ACEOF
10646 #line 10646 "configure"
10647 #include "confdefs.h"
10649 #include <X11/Xmu/CharSet.h>
10655 int check = XmuCompareISOLatin1("big", "small")
10661 rm -f conftest.$ac_objext conftest$ac_exeext
10662 if { (eval echo "$as_me:10662: \"$ac_link\"") >&5
10663 (eval $ac_link) 2>&5
10665 echo "$as_me:10665: \$? = $ac_status" >&5
10666 (exit $ac_status); } &&
10667 { ac_try='test -s conftest$ac_exeext'
10668 { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10671 echo "$as_me:10671: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 cf_cv_xaw_compat=yes
10675 echo "$as_me: failed program was:" >&5
10676 cat conftest.$ac_ext >&5
10677 cf_cv_xaw_compat=no
10679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10681 echo "$as_me:10681: result: $cf_cv_xaw_compat" >&5
10682 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10684 if test "$cf_cv_xaw_compat" = no
10686 # workaround for broken ".pc" files...
10687 case "$cf_x_athena_lib" in
10691 test -n "$verbose" && echo " work around broken package" 1>&6
10693 echo "${as_me:-configure}:10693: testing work around broken package ..." 1>&5
10695 cf_save_xmu="$LIBS"
10696 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10698 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10699 test -n "$verbose" && echo " found package xmu" 1>&6
10701 echo "${as_me:-configure}:10701: testing found package xmu ..." 1>&5
10703 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10704 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10705 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10707 echo "${as_me:-configure}:10707: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10709 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10711 echo "${as_me:-configure}:10711: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10716 cf_new_extra_cppflags=
10718 for cf_add_cflags in $cf_pkgconfig_incs
10720 case $cf_fix_cppflags in
10722 case $cf_add_cflags in
10723 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10724 case $cf_add_cflags in
10726 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10728 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10729 && test -z "${cf_tst_cflags}" \
10730 && cf_fix_cppflags=yes
10732 if test $cf_fix_cppflags = yes ; then
10733 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10735 elif test "${cf_tst_cflags}" = "\"'" ; then
10736 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10741 case "$CPPFLAGS" in
10745 case $cf_add_cflags in
10747 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10749 CPPFLAGS=`echo "$CPPFLAGS" | \
10750 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10751 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10755 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10760 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10765 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10767 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10769 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10770 && test -z "${cf_tst_cflags}" \
10771 && cf_fix_cppflags=no
10776 if test -n "$cf_new_cflags" ; then
10778 CFLAGS="$CFLAGS $cf_new_cflags"
10781 if test -n "$cf_new_cppflags" ; then
10783 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10786 if test -n "$cf_new_extra_cppflags" ; then
10788 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10791 cf_add_libs="$cf_pkgconfig_libs"
10792 # Filter out duplicates - this happens with badly-designed ".pc" files...
10793 for cf_add_1lib in $LIBS
10795 for cf_add_2lib in $cf_add_libs
10797 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10803 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10805 LIBS="$cf_add_libs"
10807 LIBS="$cf_save_xmu"
10809 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10811 echo "${as_me:-configure}:10811: testing ...before $LIBS ..." 1>&5
10813 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10814 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10816 echo "${as_me:-configure}:10816: testing ...after $LIBS ..." 1>&5
10822 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10824 echo "${as_me:-configure}:10824: testing ...before $LIBS ..." 1>&5
10826 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10827 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10829 echo "${as_me:-configure}:10829: testing ...after $LIBS ..." 1>&5
10833 for cf_trim_lib in Xmu Xt X11
10836 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10837 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10838 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10840 echo "${as_me:-configure}:10840: testing ..trimmed $LIBS ..." 1>&5
10860 if test -z "$cf_x_athena_lib" ; then
10862 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10863 test -n "$verbose" && echo " found package Xext" 1>&6
10865 echo "${as_me:-configure}:10865: testing found package Xext ..." 1>&5
10867 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10868 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10869 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10871 echo "${as_me:-configure}:10871: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10873 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10875 echo "${as_me:-configure}:10875: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10880 cf_new_extra_cppflags=
10882 for cf_add_cflags in $cf_pkgconfig_incs
10884 case $cf_fix_cppflags in
10886 case $cf_add_cflags in
10887 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10888 case $cf_add_cflags in
10890 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10892 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10893 && test -z "${cf_tst_cflags}" \
10894 && cf_fix_cppflags=yes
10896 if test $cf_fix_cppflags = yes ; then
10897 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10899 elif test "${cf_tst_cflags}" = "\"'" ; then
10900 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10905 case "$CPPFLAGS" in
10909 case $cf_add_cflags in
10911 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10913 CPPFLAGS=`echo "$CPPFLAGS" | \
10914 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10915 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10919 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10924 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10929 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10931 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10933 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10934 && test -z "${cf_tst_cflags}" \
10935 && cf_fix_cppflags=no
10940 if test -n "$cf_new_cflags" ; then
10942 CFLAGS="$CFLAGS $cf_new_cflags"
10945 if test -n "$cf_new_cppflags" ; then
10947 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10950 if test -n "$cf_new_extra_cppflags" ; then
10952 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10955 cf_add_libs="$cf_pkgconfig_libs"
10956 # Filter out duplicates - this happens with badly-designed ".pc" files...
10957 for cf_add_1lib in $LIBS
10959 for cf_add_2lib in $cf_add_libs
10961 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10967 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10969 LIBS="$cf_add_libs"
10976 echo "$as_me:10976: checking for XextCreateExtension in -lXext" >&5
10977 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10978 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10979 echo $ECHO_N "(cached) $ECHO_C" >&6
10981 ac_check_lib_save_LIBS=$LIBS
10982 LIBS="-lXext $LIBS"
10983 cat >conftest.$ac_ext <<_ACEOF
10984 #line 10984 "configure"
10985 #include "confdefs.h"
10987 /* Override any gcc2 internal prototype to avoid an error. */
10991 /* We use char because int might match the return type of a gcc2
10992 builtin and then its argument prototype would still apply. */
10993 char XextCreateExtension ();
10997 XextCreateExtension ();
11002 rm -f conftest.$ac_objext conftest$ac_exeext
11003 if { (eval echo "$as_me:11003: \"$ac_link\"") >&5
11004 (eval $ac_link) 2>&5
11006 echo "$as_me:11006: \$? = $ac_status" >&5
11007 (exit $ac_status); } &&
11008 { ac_try='test -s conftest$ac_exeext'
11009 { (eval echo "$as_me:11009: \"$ac_try\"") >&5
11010 (eval $ac_try) 2>&5
11012 echo "$as_me:11012: \$? = $ac_status" >&5
11013 (exit $ac_status); }; }; then
11014 ac_cv_lib_Xext_XextCreateExtension=yes
11016 echo "$as_me: failed program was:" >&5
11017 cat conftest.$ac_ext >&5
11018 ac_cv_lib_Xext_XextCreateExtension=no
11020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021 LIBS=$ac_check_lib_save_LIBS
11023 echo "$as_me:11023: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11024 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11025 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11027 cf_add_libs="-lXext"
11028 # Filter out duplicates - this happens with badly-designed ".pc" files...
11029 for cf_add_1lib in $LIBS
11031 for cf_add_2lib in $cf_add_libs
11033 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11039 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11041 LIBS="$cf_add_libs"
11047 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11048 # in some cases has installed dummy files in the former, other cases replaced
11049 # it with a link to the new location). This complicates the configure script.
11050 # Check for that pitfall, and recover using pkg-config
11052 # If none of these are set, the configuration is almost certainly broken.
11053 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11056 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11057 test -n "$verbose" && echo " found package x11" 1>&6
11059 echo "${as_me:-configure}:11059: testing found package x11 ..." 1>&5
11061 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11062 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11063 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11065 echo "${as_me:-configure}:11065: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11067 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11069 echo "${as_me:-configure}:11069: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11074 cf_new_extra_cppflags=
11076 for cf_add_cflags in $cf_pkgconfig_incs
11078 case $cf_fix_cppflags in
11080 case $cf_add_cflags in
11081 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11082 case $cf_add_cflags in
11084 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11086 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11087 && test -z "${cf_tst_cflags}" \
11088 && cf_fix_cppflags=yes
11090 if test $cf_fix_cppflags = yes ; then
11091 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11093 elif test "${cf_tst_cflags}" = "\"'" ; then
11094 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11099 case "$CPPFLAGS" in
11103 case $cf_add_cflags in
11105 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11107 CPPFLAGS=`echo "$CPPFLAGS" | \
11108 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11109 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11113 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11118 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11123 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11125 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11128 && test -z "${cf_tst_cflags}" \
11129 && cf_fix_cppflags=no
11134 if test -n "$cf_new_cflags" ; then
11136 CFLAGS="$CFLAGS $cf_new_cflags"
11139 if test -n "$cf_new_cppflags" ; then
11141 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11144 if test -n "$cf_new_extra_cppflags" ; then
11146 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11149 cf_add_libs="$cf_pkgconfig_libs"
11150 # Filter out duplicates - this happens with badly-designed ".pc" files...
11151 for cf_add_1lib in $LIBS
11153 for cf_add_2lib in $cf_add_libs
11155 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11161 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11163 LIBS="$cf_add_libs"
11169 { echo "$as_me:11169: WARNING: unable to find X11 library" >&5
11170 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11173 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11174 test -n "$verbose" && echo " found package ice" 1>&6
11176 echo "${as_me:-configure}:11176: testing found package ice ..." 1>&5
11178 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11179 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11180 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11182 echo "${as_me:-configure}:11182: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11184 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11186 echo "${as_me:-configure}:11186: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11191 cf_new_extra_cppflags=
11193 for cf_add_cflags in $cf_pkgconfig_incs
11195 case $cf_fix_cppflags in
11197 case $cf_add_cflags in
11198 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11199 case $cf_add_cflags in
11201 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11204 && test -z "${cf_tst_cflags}" \
11205 && cf_fix_cppflags=yes
11207 if test $cf_fix_cppflags = yes ; then
11208 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11210 elif test "${cf_tst_cflags}" = "\"'" ; then
11211 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11216 case "$CPPFLAGS" in
11220 case $cf_add_cflags in
11222 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11224 CPPFLAGS=`echo "$CPPFLAGS" | \
11225 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11226 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11230 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11235 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11240 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11242 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11245 && test -z "${cf_tst_cflags}" \
11246 && cf_fix_cppflags=no
11251 if test -n "$cf_new_cflags" ; then
11253 CFLAGS="$CFLAGS $cf_new_cflags"
11256 if test -n "$cf_new_cppflags" ; then
11258 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11261 if test -n "$cf_new_extra_cppflags" ; then
11263 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11266 cf_add_libs="$cf_pkgconfig_libs"
11267 # Filter out duplicates - this happens with badly-designed ".pc" files...
11268 for cf_add_1lib in $LIBS
11270 for cf_add_2lib in $cf_add_libs
11272 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11278 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11280 LIBS="$cf_add_libs"
11286 { echo "$as_me:11286: WARNING: unable to find ICE library" >&5
11287 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11290 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11291 test -n "$verbose" && echo " found package sm" 1>&6
11293 echo "${as_me:-configure}:11293: testing found package sm ..." 1>&5
11295 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11296 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11297 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11299 echo "${as_me:-configure}:11299: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11301 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11303 echo "${as_me:-configure}:11303: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11308 cf_new_extra_cppflags=
11310 for cf_add_cflags in $cf_pkgconfig_incs
11312 case $cf_fix_cppflags in
11314 case $cf_add_cflags in
11315 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11316 case $cf_add_cflags in
11318 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11320 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11321 && test -z "${cf_tst_cflags}" \
11322 && cf_fix_cppflags=yes
11324 if test $cf_fix_cppflags = yes ; then
11325 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11327 elif test "${cf_tst_cflags}" = "\"'" ; then
11328 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11333 case "$CPPFLAGS" in
11337 case $cf_add_cflags in
11339 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11341 CPPFLAGS=`echo "$CPPFLAGS" | \
11342 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11343 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11347 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11352 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11357 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11359 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11361 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11362 && test -z "${cf_tst_cflags}" \
11363 && cf_fix_cppflags=no
11368 if test -n "$cf_new_cflags" ; then
11370 CFLAGS="$CFLAGS $cf_new_cflags"
11373 if test -n "$cf_new_cppflags" ; then
11375 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11378 if test -n "$cf_new_extra_cppflags" ; then
11380 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11383 cf_add_libs="$cf_pkgconfig_libs"
11384 # Filter out duplicates - this happens with badly-designed ".pc" files...
11385 for cf_add_1lib in $LIBS
11387 for cf_add_2lib in $cf_add_libs
11389 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11395 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11397 LIBS="$cf_add_libs"
11403 { echo "$as_me:11403: WARNING: unable to find SM library" >&5
11404 echo "$as_me: WARNING: unable to find SM library" >&2;}
11407 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11408 test -n "$verbose" && echo " found package xt" 1>&6
11410 echo "${as_me:-configure}:11410: testing found package xt ..." 1>&5
11412 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11413 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11414 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11416 echo "${as_me:-configure}:11416: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11418 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11420 echo "${as_me:-configure}:11420: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11425 cf_new_extra_cppflags=
11427 for cf_add_cflags in $cf_pkgconfig_incs
11429 case $cf_fix_cppflags in
11431 case $cf_add_cflags in
11432 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11433 case $cf_add_cflags in
11435 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11437 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11438 && test -z "${cf_tst_cflags}" \
11439 && cf_fix_cppflags=yes
11441 if test $cf_fix_cppflags = yes ; then
11442 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11444 elif test "${cf_tst_cflags}" = "\"'" ; then
11445 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11450 case "$CPPFLAGS" in
11454 case $cf_add_cflags in
11456 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11458 CPPFLAGS=`echo "$CPPFLAGS" | \
11459 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11460 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11464 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11469 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11474 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11476 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11478 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11479 && test -z "${cf_tst_cflags}" \
11480 && cf_fix_cppflags=no
11485 if test -n "$cf_new_cflags" ; then
11487 CFLAGS="$CFLAGS $cf_new_cflags"
11490 if test -n "$cf_new_cppflags" ; then
11492 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11495 if test -n "$cf_new_extra_cppflags" ; then
11497 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11500 cf_add_libs="$cf_pkgconfig_libs"
11501 # Filter out duplicates - this happens with badly-designed ".pc" files...
11502 for cf_add_1lib in $LIBS
11504 for cf_add_2lib in $cf_add_libs
11506 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11512 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11514 LIBS="$cf_add_libs"
11520 { echo "$as_me:11520: WARNING: unable to find Xt library" >&5
11521 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11528 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11529 test -n "$verbose" && echo " found package xt" 1>&6
11531 echo "${as_me:-configure}:11531: testing found package xt ..." 1>&5
11533 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11534 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11535 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11537 echo "${as_me:-configure}:11537: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11539 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11541 echo "${as_me:-configure}:11541: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11546 cf_new_extra_cppflags=
11548 for cf_add_cflags in $cf_pkgconfig_incs
11550 case $cf_fix_cppflags in
11552 case $cf_add_cflags in
11553 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11554 case $cf_add_cflags in
11556 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11558 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11559 && test -z "${cf_tst_cflags}" \
11560 && cf_fix_cppflags=yes
11562 if test $cf_fix_cppflags = yes ; then
11563 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11565 elif test "${cf_tst_cflags}" = "\"'" ; then
11566 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11571 case "$CPPFLAGS" in
11575 case $cf_add_cflags in
11577 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11579 CPPFLAGS=`echo "$CPPFLAGS" | \
11580 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11581 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11585 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11590 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11595 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11597 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11599 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11600 && test -z "${cf_tst_cflags}" \
11601 && cf_fix_cppflags=no
11606 if test -n "$cf_new_cflags" ; then
11608 CFLAGS="$CFLAGS $cf_new_cflags"
11611 if test -n "$cf_new_cppflags" ; then
11613 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11616 if test -n "$cf_new_extra_cppflags" ; then
11618 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11621 cf_add_libs="$cf_pkgconfig_libs"
11622 # Filter out duplicates - this happens with badly-designed ".pc" files...
11623 for cf_add_1lib in $LIBS
11625 for cf_add_2lib in $cf_add_libs
11627 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11633 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11635 LIBS="$cf_add_libs"
11641 # we have an "xt" package, but it may omit Xt's dependency on X11
11642 echo "$as_me:11642: checking for usable X dependency" >&5
11643 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11644 if test "${cf_cv_xt_x11_compat+set}" = set; then
11645 echo $ECHO_N "(cached) $ECHO_C" >&6
11648 cat >conftest.$ac_ext <<_ACEOF
11649 #line 11649 "configure"
11650 #include "confdefs.h"
11652 #include <X11/Xlib.h>
11658 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11659 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11660 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11661 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11667 rm -f conftest.$ac_objext conftest$ac_exeext
11668 if { (eval echo "$as_me:11668: \"$ac_link\"") >&5
11669 (eval $ac_link) 2>&5
11671 echo "$as_me:11671: \$? = $ac_status" >&5
11672 (exit $ac_status); } &&
11673 { ac_try='test -s conftest$ac_exeext'
11674 { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675 (eval $ac_try) 2>&5
11677 echo "$as_me:11677: \$? = $ac_status" >&5
11678 (exit $ac_status); }; }; then
11679 cf_cv_xt_x11_compat=yes
11681 echo "$as_me: failed program was:" >&5
11682 cat conftest.$ac_ext >&5
11683 cf_cv_xt_x11_compat=no
11685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11687 echo "$as_me:11687: result: $cf_cv_xt_x11_compat" >&5
11688 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11689 if test "$cf_cv_xt_x11_compat" = no
11691 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11693 echo "${as_me:-configure}:11693: testing work around broken X11 dependency ..." 1>&5
11695 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11697 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11698 test -n "$verbose" && echo " found package x11" 1>&6
11700 echo "${as_me:-configure}:11700: testing found package x11 ..." 1>&5
11702 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11703 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11704 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11706 echo "${as_me:-configure}:11706: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11708 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11710 echo "${as_me:-configure}:11710: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11715 cf_new_extra_cppflags=
11717 for cf_add_cflags in $cf_pkgconfig_incs
11719 case $cf_fix_cppflags in
11721 case $cf_add_cflags in
11722 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11723 case $cf_add_cflags in
11725 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11727 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11728 && test -z "${cf_tst_cflags}" \
11729 && cf_fix_cppflags=yes
11731 if test $cf_fix_cppflags = yes ; then
11732 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11734 elif test "${cf_tst_cflags}" = "\"'" ; then
11735 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11740 case "$CPPFLAGS" in
11744 case $cf_add_cflags in
11746 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11748 CPPFLAGS=`echo "$CPPFLAGS" | \
11749 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11750 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11754 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11759 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11764 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11766 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11768 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11769 && test -z "${cf_tst_cflags}" \
11770 && cf_fix_cppflags=no
11775 if test -n "$cf_new_cflags" ; then
11777 CFLAGS="$CFLAGS $cf_new_cflags"
11780 if test -n "$cf_new_cppflags" ; then
11782 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11785 if test -n "$cf_new_extra_cppflags" ; then
11787 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11790 cf_add_libs="$cf_pkgconfig_libs"
11791 # Filter out duplicates - this happens with badly-designed ".pc" files...
11792 for cf_add_1lib in $LIBS
11794 for cf_add_2lib in $cf_add_libs
11796 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11802 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11804 LIBS="$cf_add_libs"
11811 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11813 echo "${as_me:-configure}:11813: testing ...before $LIBS ..." 1>&5
11815 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11816 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11818 echo "${as_me:-configure}:11818: testing ...after $LIBS ..." 1>&5
11826 echo "$as_me:11826: checking for usable X Toolkit package" >&5
11827 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11828 if test "${cf_cv_xt_ice_compat+set}" = set; then
11829 echo $ECHO_N "(cached) $ECHO_C" >&6
11832 cat >conftest.$ac_ext <<_ACEOF
11833 #line 11833 "configure"
11834 #include "confdefs.h"
11836 #include <X11/Shell.h>
11841 int num = IceConnectionNumber(0)
11847 rm -f conftest.$ac_objext conftest$ac_exeext
11848 if { (eval echo "$as_me:11848: \"$ac_link\"") >&5
11849 (eval $ac_link) 2>&5
11851 echo "$as_me:11851: \$? = $ac_status" >&5
11852 (exit $ac_status); } &&
11853 { ac_try='test -s conftest$ac_exeext'
11854 { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855 (eval $ac_try) 2>&5
11857 echo "$as_me:11857: \$? = $ac_status" >&5
11858 (exit $ac_status); }; }; then
11859 cf_cv_xt_ice_compat=yes
11861 echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 cf_cv_xt_ice_compat=no
11865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11867 echo "$as_me:11867: result: $cf_cv_xt_ice_compat" >&5
11868 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11870 if test "$cf_cv_xt_ice_compat" = no
11872 # workaround for broken ".pc" files used for X Toolkit.
11873 case "x$X_PRE_LIBS" in
11879 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11881 echo "${as_me:-configure}:11881: testing work around broken ICE dependency ..." 1>&5
11883 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11884 test -n "$verbose" && echo " found package ice" 1>&6
11886 echo "${as_me:-configure}:11886: testing found package ice ..." 1>&5
11888 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11889 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11890 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11892 echo "${as_me:-configure}:11892: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11894 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11896 echo "${as_me:-configure}:11896: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11901 cf_new_extra_cppflags=
11903 for cf_add_cflags in $cf_pkgconfig_incs
11905 case $cf_fix_cppflags in
11907 case $cf_add_cflags in
11908 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11909 case $cf_add_cflags in
11911 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11913 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11914 && test -z "${cf_tst_cflags}" \
11915 && cf_fix_cppflags=yes
11917 if test $cf_fix_cppflags = yes ; then
11918 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11920 elif test "${cf_tst_cflags}" = "\"'" ; then
11921 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11926 case "$CPPFLAGS" in
11930 case $cf_add_cflags in
11932 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11934 CPPFLAGS=`echo "$CPPFLAGS" | \
11935 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11936 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11940 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11945 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11950 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11952 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11954 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11955 && test -z "${cf_tst_cflags}" \
11956 && cf_fix_cppflags=no
11961 if test -n "$cf_new_cflags" ; then
11963 CFLAGS="$CFLAGS $cf_new_cflags"
11966 if test -n "$cf_new_cppflags" ; then
11968 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11971 if test -n "$cf_new_extra_cppflags" ; then
11973 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11976 cf_add_libs="$cf_pkgconfig_libs"
11977 # Filter out duplicates - this happens with badly-designed ".pc" files...
11978 for cf_add_1lib in $LIBS
11980 for cf_add_2lib in $cf_add_libs
11982 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11988 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11990 LIBS="$cf_add_libs"
11992 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11993 test -n "$verbose" && echo " found package sm" 1>&6
11995 echo "${as_me:-configure}:11995: testing found package sm ..." 1>&5
11997 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11998 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11999 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12001 echo "${as_me:-configure}:12001: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12003 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12005 echo "${as_me:-configure}:12005: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12010 cf_new_extra_cppflags=
12012 for cf_add_cflags in $cf_pkgconfig_incs
12014 case $cf_fix_cppflags in
12016 case $cf_add_cflags in
12017 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12018 case $cf_add_cflags in
12020 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12022 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12023 && test -z "${cf_tst_cflags}" \
12024 && cf_fix_cppflags=yes
12026 if test $cf_fix_cppflags = yes ; then
12027 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12029 elif test "${cf_tst_cflags}" = "\"'" ; then
12030 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12035 case "$CPPFLAGS" in
12039 case $cf_add_cflags in
12041 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12043 CPPFLAGS=`echo "$CPPFLAGS" | \
12044 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12045 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12049 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12054 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12059 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12061 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12064 && test -z "${cf_tst_cflags}" \
12065 && cf_fix_cppflags=no
12070 if test -n "$cf_new_cflags" ; then
12072 CFLAGS="$CFLAGS $cf_new_cflags"
12075 if test -n "$cf_new_cppflags" ; then
12077 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12080 if test -n "$cf_new_extra_cppflags" ; then
12082 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12085 cf_add_libs="$cf_pkgconfig_libs"
12086 # Filter out duplicates - this happens with badly-designed ".pc" files...
12087 for cf_add_1lib in $LIBS
12089 for cf_add_2lib in $cf_add_libs
12091 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12099 LIBS="$cf_add_libs"
12112 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12114 echo "${as_me:-configure}:12114: testing ...before $LIBS ..." 1>&5
12116 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12117 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12119 echo "${as_me:-configure}:12119: testing ...after $LIBS ..." 1>&5
12135 LDFLAGS="$X_LIBS $LDFLAGS"
12137 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12139 echo "${as_me:-configure}:12139: testing checking additions to CFLAGS ..." 1>&5
12141 cf_check_cflags="$CFLAGS"
12142 cf_check_cppflags="$CPPFLAGS"
12147 cf_new_extra_cppflags=
12149 for cf_add_cflags in $X_CFLAGS
12151 case $cf_fix_cppflags in
12153 case $cf_add_cflags in
12154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12155 case $cf_add_cflags in
12157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12160 && test -z "${cf_tst_cflags}" \
12161 && cf_fix_cppflags=yes
12163 if test $cf_fix_cppflags = yes ; then
12164 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12166 elif test "${cf_tst_cflags}" = "\"'" ; then
12167 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12172 case "$CPPFLAGS" in
12176 case $cf_add_cflags in
12178 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12180 CPPFLAGS=`echo "$CPPFLAGS" | \
12181 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12182 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12186 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12191 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12196 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12198 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12200 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12201 && test -z "${cf_tst_cflags}" \
12202 && cf_fix_cppflags=no
12207 if test -n "$cf_new_cflags" ; then
12208 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12210 echo "${as_me:-configure}:12210: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12212 CFLAGS="$CFLAGS $cf_new_cflags"
12215 if test -n "$cf_new_cppflags" ; then
12216 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12218 echo "${as_me:-configure}:12218: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12220 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12223 if test -n "$cf_new_extra_cppflags" ; then
12224 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12226 echo "${as_me:-configure}:12226: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12228 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12231 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12232 cat >conftest.$ac_ext <<_ACEOF
12233 #line 12233 "configure"
12234 #include "confdefs.h"
12239 printf("Hello world");
12244 rm -f conftest.$ac_objext conftest$ac_exeext
12245 if { (eval echo "$as_me:12245: \"$ac_link\"") >&5
12246 (eval $ac_link) 2>&5
12248 echo "$as_me:12248: \$? = $ac_status" >&5
12249 (exit $ac_status); } &&
12250 { ac_try='test -s conftest$ac_exeext'
12251 { (eval echo "$as_me:12251: \"$ac_try\"") >&5
12252 (eval $ac_try) 2>&5
12254 echo "$as_me:12254: \$? = $ac_status" >&5
12255 (exit $ac_status); }; }; then
12258 echo "$as_me: failed program was:" >&5
12259 cat conftest.$ac_ext >&5
12260 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12262 echo "${as_me:-configure}:12262: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12264 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12265 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12267 echo "${as_me:-configure}:12267: testing but keeping change to \$CPPFLAGS ..." 1>&5
12270 CFLAGS="$cf_check_flags"
12272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12275 echo "$as_me:12275: checking for XOpenDisplay" >&5
12276 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12277 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12278 echo $ECHO_N "(cached) $ECHO_C" >&6
12280 cat >conftest.$ac_ext <<_ACEOF
12281 #line 12281 "configure"
12282 #include "confdefs.h"
12283 /* System header to define __stub macros and hopefully few prototypes,
12284 which can conflict with char XOpenDisplay (); below. */
12285 #include <assert.h>
12286 /* Override any gcc2 internal prototype to avoid an error. */
12290 /* We use char because int might match the return type of a gcc2
12291 builtin and then its argument prototype would still apply. */
12292 char XOpenDisplay ();
12298 /* The GNU C library defines this for functions which it implements
12299 to always fail with ENOSYS. Some functions are actually named
12300 something starting with __ and the normal name is an alias. */
12301 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12304 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12311 rm -f conftest.$ac_objext conftest$ac_exeext
12312 if { (eval echo "$as_me:12312: \"$ac_link\"") >&5
12313 (eval $ac_link) 2>&5
12315 echo "$as_me:12315: \$? = $ac_status" >&5
12316 (exit $ac_status); } &&
12317 { ac_try='test -s conftest$ac_exeext'
12318 { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319 (eval $ac_try) 2>&5
12321 echo "$as_me:12321: \$? = $ac_status" >&5
12322 (exit $ac_status); }; }; then
12323 ac_cv_func_XOpenDisplay=yes
12325 echo "$as_me: failed program was:" >&5
12326 cat conftest.$ac_ext >&5
12327 ac_cv_func_XOpenDisplay=no
12329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12331 echo "$as_me:12331: result: $ac_cv_func_XOpenDisplay" >&5
12332 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12333 if test $ac_cv_func_XOpenDisplay = yes; then
12337 echo "$as_me:12337: checking for XOpenDisplay in -lX11" >&5
12338 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12339 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12340 echo $ECHO_N "(cached) $ECHO_C" >&6
12342 ac_check_lib_save_LIBS=$LIBS
12343 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12344 cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12348 /* Override any gcc2 internal prototype to avoid an error. */
12352 /* We use char because int might match the return type of a gcc2
12353 builtin and then its argument prototype would still apply. */
12354 char XOpenDisplay ();
12363 rm -f conftest.$ac_objext conftest$ac_exeext
12364 if { (eval echo "$as_me:12364: \"$ac_link\"") >&5
12365 (eval $ac_link) 2>&5
12367 echo "$as_me:12367: \$? = $ac_status" >&5
12368 (exit $ac_status); } &&
12369 { ac_try='test -s conftest$ac_exeext'
12370 { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371 (eval $ac_try) 2>&5
12373 echo "$as_me:12373: \$? = $ac_status" >&5
12374 (exit $ac_status); }; }; then
12375 ac_cv_lib_X11_XOpenDisplay=yes
12377 echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 ac_cv_lib_X11_XOpenDisplay=no
12381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12382 LIBS=$ac_check_lib_save_LIBS
12384 echo "$as_me:12384: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12385 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12386 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12388 cf_add_libs="-lX11"
12389 # Filter out duplicates - this happens with badly-designed ".pc" files...
12390 for cf_add_1lib in $LIBS
12392 for cf_add_2lib in $cf_add_libs
12394 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12400 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12402 LIBS="$cf_add_libs"
12408 echo "$as_me:12408: checking for XtAppInitialize" >&5
12409 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12410 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12411 echo $ECHO_N "(cached) $ECHO_C" >&6
12413 cat >conftest.$ac_ext <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416 /* System header to define __stub macros and hopefully few prototypes,
12417 which can conflict with char XtAppInitialize (); below. */
12418 #include <assert.h>
12419 /* Override any gcc2 internal prototype to avoid an error. */
12423 /* We use char because int might match the return type of a gcc2
12424 builtin and then its argument prototype would still apply. */
12425 char XtAppInitialize ();
12431 /* The GNU C library defines this for functions which it implements
12432 to always fail with ENOSYS. Some functions are actually named
12433 something starting with __ and the normal name is an alias. */
12434 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12437 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12444 rm -f conftest.$ac_objext conftest$ac_exeext
12445 if { (eval echo "$as_me:12445: \"$ac_link\"") >&5
12446 (eval $ac_link) 2>&5
12448 echo "$as_me:12448: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
12450 { ac_try='test -s conftest$ac_exeext'
12451 { (eval echo "$as_me:12451: \"$ac_try\"") >&5
12452 (eval $ac_try) 2>&5
12454 echo "$as_me:12454: \$? = $ac_status" >&5
12455 (exit $ac_status); }; }; then
12456 ac_cv_func_XtAppInitialize=yes
12458 echo "$as_me: failed program was:" >&5
12459 cat conftest.$ac_ext >&5
12460 ac_cv_func_XtAppInitialize=no
12462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12464 echo "$as_me:12464: result: $ac_cv_func_XtAppInitialize" >&5
12465 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12466 if test $ac_cv_func_XtAppInitialize = yes; then
12470 echo "$as_me:12470: checking for XtAppInitialize in -lXt" >&5
12471 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12472 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12473 echo $ECHO_N "(cached) $ECHO_C" >&6
12475 ac_check_lib_save_LIBS=$LIBS
12476 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12477 cat >conftest.$ac_ext <<_ACEOF
12478 #line 12478 "configure"
12479 #include "confdefs.h"
12481 /* Override any gcc2 internal prototype to avoid an error. */
12485 /* We use char because int might match the return type of a gcc2
12486 builtin and then its argument prototype would still apply. */
12487 char XtAppInitialize ();
12491 XtAppInitialize ();
12496 rm -f conftest.$ac_objext conftest$ac_exeext
12497 if { (eval echo "$as_me:12497: \"$ac_link\"") >&5
12498 (eval $ac_link) 2>&5
12500 echo "$as_me:12500: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest$ac_exeext'
12503 { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12506 echo "$as_me:12506: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12508 ac_cv_lib_Xt_XtAppInitialize=yes
12510 echo "$as_me: failed program was:" >&5
12511 cat conftest.$ac_ext >&5
12512 ac_cv_lib_Xt_XtAppInitialize=no
12514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12515 LIBS=$ac_check_lib_save_LIBS
12517 echo "$as_me:12517: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12518 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12519 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12521 cat >>confdefs.h <<\EOF
12522 #define HAVE_LIBXT 1
12526 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12533 if test $cf_have_X_LIBS = no ; then
12534 { echo "$as_me:12534: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12535 test program. You will have to check and add the proper libraries by hand
12537 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12538 test program. You will have to check and add the proper libraries by hand
12539 to makefile." >&2;}
12542 cf_x_athena_root=$cf_x_athena
12545 for cf_path in default \
12546 /usr/contrib/X11R6 \
12547 /usr/contrib/X11R5 \
12551 if test -z "$cf_x_athena_inc" ; then
12552 cf_save="$CPPFLAGS"
12553 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12554 if test $cf_path != default ; then
12555 CPPFLAGS="$cf_save -I$cf_path/include"
12556 echo "$as_me:12556: checking for $cf_test in $cf_path" >&5
12557 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12559 echo "$as_me:12559: checking for $cf_test" >&5
12560 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12562 cat >conftest.$ac_ext <<_ACEOF
12563 #line 12563 "configure"
12564 #include "confdefs.h"
12566 #include <X11/Intrinsic.h>
12567 #include <$cf_test>
12576 rm -f conftest.$ac_objext
12577 if { (eval echo "$as_me:12577: \"$ac_compile\"") >&5
12578 (eval $ac_compile) 2>&5
12580 echo "$as_me:12580: \$? = $ac_status" >&5
12581 (exit $ac_status); } &&
12582 { ac_try='test -s conftest.$ac_objext'
12583 { (eval echo "$as_me:12583: \"$ac_try\"") >&5
12584 (eval $ac_try) 2>&5
12586 echo "$as_me:12586: \$? = $ac_status" >&5
12587 (exit $ac_status); }; }; then
12590 echo "$as_me: failed program was:" >&5
12591 cat conftest.$ac_ext >&5
12594 rm -f conftest.$ac_objext conftest.$ac_ext
12595 echo "$as_me:12595: result: $cf_result" >&5
12596 echo "${ECHO_T}$cf_result" >&6
12597 if test "$cf_result" = yes ; then
12598 cf_x_athena_inc=$cf_path
12601 CPPFLAGS="$cf_save"
12606 if test -z "$cf_x_athena_inc" ; then
12607 { echo "$as_me:12607: WARNING: Unable to successfully find Athena header files with test program" >&5
12608 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12609 elif test "$cf_x_athena_inc" != default ; then
12610 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12613 cf_x_athena_root=$cf_x_athena
12616 for cf_path in default \
12617 /usr/contrib/X11R6 \
12618 /usr/contrib/X11R5 \
12623 ${cf_x_athena_root} \
12624 ${cf_x_athena_root}7 \
12625 ${cf_x_athena_root}6
12628 "-l$cf_lib -lXmu" \
12629 "-l$cf_lib -lXpm -lXmu" \
12630 "-l${cf_lib}_s -lXmu_s"
12632 if test -z "$cf_x_athena_lib" ; then
12634 cf_test=XawSimpleMenuAddGlobalActions
12635 if test $cf_path != default ; then
12637 cf_add_libs="-L$cf_path/lib $cf_libs"
12638 # Filter out duplicates - this happens with badly-designed ".pc" files...
12639 for cf_add_1lib in $LIBS
12641 for cf_add_2lib in $cf_add_libs
12643 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12649 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12651 LIBS="$cf_add_libs"
12653 echo "$as_me:12653: checking for $cf_libs in $cf_path" >&5
12654 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12657 cf_add_libs="$cf_libs"
12658 # Filter out duplicates - this happens with badly-designed ".pc" files...
12659 for cf_add_1lib in $LIBS
12661 for cf_add_2lib in $cf_add_libs
12663 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12669 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12671 LIBS="$cf_add_libs"
12673 echo "$as_me:12673: checking for $cf_test in $cf_libs" >&5
12674 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12676 cat >conftest.$ac_ext <<_ACEOF
12677 #line 12677 "configure"
12678 #include "confdefs.h"
12680 #include <X11/Intrinsic.h>
12681 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12687 $cf_test((XtAppContext) 0)
12692 rm -f conftest.$ac_objext conftest$ac_exeext
12693 if { (eval echo "$as_me:12693: \"$ac_link\"") >&5
12694 (eval $ac_link) 2>&5
12696 echo "$as_me:12696: \$? = $ac_status" >&5
12697 (exit $ac_status); } &&
12698 { ac_try='test -s conftest$ac_exeext'
12699 { (eval echo "$as_me:12699: \"$ac_try\"") >&5
12700 (eval $ac_try) 2>&5
12702 echo "$as_me:12702: \$? = $ac_status" >&5
12703 (exit $ac_status); }; }; then
12706 echo "$as_me: failed program was:" >&5
12707 cat conftest.$ac_ext >&5
12710 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12711 echo "$as_me:12711: result: $cf_result" >&5
12712 echo "${ECHO_T}$cf_result" >&6
12713 if test "$cf_result" = yes ; then
12714 cf_x_athena_lib="$cf_libs"
12720 test -n "$cf_x_athena_lib" && break
12724 if test -z "$cf_x_athena_lib" ; then
12725 { { echo "$as_me:12725: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12726 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12727 { (exit 1); exit 1; }; }
12730 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12732 cat >>confdefs.h <<EOF
12733 #define $cf_x_athena_LIBS 1
12738 if test -n "$ac_tool_prefix"; then
12739 for ac_prog in xcurses-config
12741 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12742 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12743 echo "$as_me:12743: checking for $ac_word" >&5
12744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12745 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12746 echo $ECHO_N "(cached) $ECHO_C" >&6
12748 if test -n "$XCURSES_CONFIG"; then
12749 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12751 ac_save_IFS=$IFS; IFS=$ac_path_separator
12753 for ac_dir in $ac_dummy; do
12755 test -z "$ac_dir" && ac_dir=.
12756 $as_executable_p "$ac_dir/$ac_word" || continue
12757 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12758 echo "$as_me:12758: found $ac_dir/$ac_word" >&5
12764 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12765 if test -n "$XCURSES_CONFIG"; then
12766 echo "$as_me:12766: result: $XCURSES_CONFIG" >&5
12767 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12769 echo "$as_me:12769: result: no" >&5
12770 echo "${ECHO_T}no" >&6
12773 test -n "$XCURSES_CONFIG" && break
12776 if test -z "$XCURSES_CONFIG"; then
12777 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12778 for ac_prog in xcurses-config
12780 # Extract the first word of "$ac_prog", so it can be a program name with args.
12781 set dummy $ac_prog; ac_word=$2
12782 echo "$as_me:12782: checking for $ac_word" >&5
12783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12784 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12785 echo $ECHO_N "(cached) $ECHO_C" >&6
12787 if test -n "$ac_ct_XCURSES_CONFIG"; then
12788 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12790 ac_save_IFS=$IFS; IFS=$ac_path_separator
12792 for ac_dir in $ac_dummy; do
12794 test -z "$ac_dir" && ac_dir=.
12795 $as_executable_p "$ac_dir/$ac_word" || continue
12796 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12797 echo "$as_me:12797: found $ac_dir/$ac_word" >&5
12803 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12804 if test -n "$ac_ct_XCURSES_CONFIG"; then
12805 echo "$as_me:12805: result: $ac_ct_XCURSES_CONFIG" >&5
12806 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12808 echo "$as_me:12808: result: no" >&5
12809 echo "${ECHO_T}no" >&6
12812 test -n "$ac_ct_XCURSES_CONFIG" && break
12814 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12816 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12819 if test "$XCURSES_CONFIG" != none ; then
12821 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12823 cf_add_libs="`$XCURSES_CONFIG --libs`"
12824 # Filter out duplicates - this happens with badly-designed ".pc" files...
12825 for cf_add_1lib in $LIBS
12827 for cf_add_2lib in $cf_add_libs
12829 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12835 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12837 LIBS="$cf_add_libs"
12839 cf_cv_lib_XCurses=yes
12843 LDFLAGS="$LDFLAGS $X_LIBS"
12845 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12847 echo "${as_me:-configure}:12847: testing checking additions to CFLAGS ..." 1>&5
12849 cf_check_cflags="$CFLAGS"
12850 cf_check_cppflags="$CPPFLAGS"
12855 cf_new_extra_cppflags=
12857 for cf_add_cflags in $X_CFLAGS
12859 case $cf_fix_cppflags in
12861 case $cf_add_cflags in
12862 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12863 case $cf_add_cflags in
12865 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12868 && test -z "${cf_tst_cflags}" \
12869 && cf_fix_cppflags=yes
12871 if test $cf_fix_cppflags = yes ; then
12872 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12874 elif test "${cf_tst_cflags}" = "\"'" ; then
12875 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12880 case "$CPPFLAGS" in
12884 case $cf_add_cflags in
12886 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12888 CPPFLAGS=`echo "$CPPFLAGS" | \
12889 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12890 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12894 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12899 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12904 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12906 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12909 && test -z "${cf_tst_cflags}" \
12910 && cf_fix_cppflags=no
12915 if test -n "$cf_new_cflags" ; then
12916 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12918 echo "${as_me:-configure}:12918: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12920 CFLAGS="$CFLAGS $cf_new_cflags"
12923 if test -n "$cf_new_cppflags" ; then
12924 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12926 echo "${as_me:-configure}:12926: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12928 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12931 if test -n "$cf_new_extra_cppflags" ; then
12932 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12934 echo "${as_me:-configure}:12934: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12936 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12939 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12940 cat >conftest.$ac_ext <<_ACEOF
12941 #line 12941 "configure"
12942 #include "confdefs.h"
12947 printf("Hello world");
12952 rm -f conftest.$ac_objext conftest$ac_exeext
12953 if { (eval echo "$as_me:12953: \"$ac_link\"") >&5
12954 (eval $ac_link) 2>&5
12956 echo "$as_me:12956: \$? = $ac_status" >&5
12957 (exit $ac_status); } &&
12958 { ac_try='test -s conftest$ac_exeext'
12959 { (eval echo "$as_me:12959: \"$ac_try\"") >&5
12960 (eval $ac_try) 2>&5
12962 echo "$as_me:12962: \$? = $ac_status" >&5
12963 (exit $ac_status); }; }; then
12966 echo "$as_me: failed program was:" >&5
12967 cat conftest.$ac_ext >&5
12968 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12970 echo "${as_me:-configure}:12970: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12972 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12973 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12975 echo "${as_me:-configure}:12975: testing but keeping change to \$CPPFLAGS ..." 1>&5
12978 CFLAGS="$cf_check_flags"
12980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12983 echo "$as_me:12983: checking for XOpenDisplay in -lX11" >&5
12984 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12985 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12986 echo $ECHO_N "(cached) $ECHO_C" >&6
12988 ac_check_lib_save_LIBS=$LIBS
12989 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12990 cat >conftest.$ac_ext <<_ACEOF
12991 #line 12991 "configure"
12992 #include "confdefs.h"
12994 /* Override any gcc2 internal prototype to avoid an error. */
12998 /* We use char because int might match the return type of a gcc2
12999 builtin and then its argument prototype would still apply. */
13000 char XOpenDisplay ();
13009 rm -f conftest.$ac_objext conftest$ac_exeext
13010 if { (eval echo "$as_me:13010: \"$ac_link\"") >&5
13011 (eval $ac_link) 2>&5
13013 echo "$as_me:13013: \$? = $ac_status" >&5
13014 (exit $ac_status); } &&
13015 { ac_try='test -s conftest$ac_exeext'
13016 { (eval echo "$as_me:13016: \"$ac_try\"") >&5
13017 (eval $ac_try) 2>&5
13019 echo "$as_me:13019: \$? = $ac_status" >&5
13020 (exit $ac_status); }; }; then
13021 ac_cv_lib_X11_XOpenDisplay=yes
13023 echo "$as_me: failed program was:" >&5
13024 cat conftest.$ac_ext >&5
13025 ac_cv_lib_X11_XOpenDisplay=no
13027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13028 LIBS=$ac_check_lib_save_LIBS
13030 echo "$as_me:13030: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13031 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13032 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13034 cf_add_libs="-lX11"
13035 # Filter out duplicates - this happens with badly-designed ".pc" files...
13036 for cf_add_1lib in $LIBS
13038 for cf_add_2lib in $cf_add_libs
13040 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13046 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13048 LIBS="$cf_add_libs"
13052 echo "$as_me:13052: checking for XCurses library" >&5
13053 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13054 if test "${cf_cv_lib_XCurses+set}" = set; then
13055 echo $ECHO_N "(cached) $ECHO_C" >&6
13058 cf_add_libs="-lXCurses"
13059 # Filter out duplicates - this happens with badly-designed ".pc" files...
13060 for cf_add_1lib in $LIBS
13062 for cf_add_2lib in $cf_add_libs
13064 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13070 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13072 LIBS="$cf_add_libs"
13074 cat >conftest.$ac_ext <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13078 #include <xcurses.h>
13079 char *XCursesProgramName = "test";
13089 rm -f conftest.$ac_objext conftest$ac_exeext
13090 if { (eval echo "$as_me:13090: \"$ac_link\"") >&5
13091 (eval $ac_link) 2>&5
13093 echo "$as_me:13093: \$? = $ac_status" >&5
13094 (exit $ac_status); } &&
13095 { ac_try='test -s conftest$ac_exeext'
13096 { (eval echo "$as_me:13096: \"$ac_try\"") >&5
13097 (eval $ac_try) 2>&5
13099 echo "$as_me:13099: \$? = $ac_status" >&5
13100 (exit $ac_status); }; }; then
13101 cf_cv_lib_XCurses=yes
13103 echo "$as_me: failed program was:" >&5
13104 cat conftest.$ac_ext >&5
13105 cf_cv_lib_XCurses=no
13107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13110 echo "$as_me:13110: result: $cf_cv_lib_XCurses" >&5
13111 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13115 if test $cf_cv_lib_XCurses = yes ; then
13117 cat >>confdefs.h <<\EOF
13121 cat >>confdefs.h <<\EOF
13125 echo "$as_me:13125: checking for xcurses.h" >&5
13126 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13127 if test "${ac_cv_header_xcurses_h+set}" = set; then
13128 echo $ECHO_N "(cached) $ECHO_C" >&6
13130 cat >conftest.$ac_ext <<_ACEOF
13131 #line 13131 "configure"
13132 #include "confdefs.h"
13133 #include <xcurses.h>
13135 if { (eval echo "$as_me:13135: \"$ac_cpp conftest.$ac_ext\"") >&5
13136 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13138 egrep -v '^ *\+' conftest.er1 >conftest.err
13140 cat conftest.err >&5
13141 echo "$as_me:13141: \$? = $ac_status" >&5
13142 (exit $ac_status); } >/dev/null; then
13143 if test -s conftest.err; then
13144 ac_cpp_err=$ac_c_preproc_warn_flag
13151 if test -z "$ac_cpp_err"; then
13152 ac_cv_header_xcurses_h=yes
13154 echo "$as_me: failed program was:" >&5
13155 cat conftest.$ac_ext >&5
13156 ac_cv_header_xcurses_h=no
13158 rm -f conftest.err conftest.$ac_ext
13160 echo "$as_me:13160: result: $ac_cv_header_xcurses_h" >&5
13161 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13162 if test $ac_cv_header_xcurses_h = yes; then
13164 cat >>confdefs.h <<\EOF
13165 #define HAVE_XCURSES 1
13171 { { echo "$as_me:13171: error: Cannot link with XCurses" >&5
13172 echo "$as_me: error: Cannot link with XCurses" >&2;}
13173 { (exit 1); exit 1; }; }
13178 { { echo "$as_me:13178: error: unexpected screen-value: $cf_cv_screen" >&5
13179 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13180 { (exit 1); exit 1; }; }
13184 : ${cf_nculib_root:=$cf_cv_screen}
13185 echo "$as_me:13185: checking if $cf_nculib_root uses pthreads" >&5
13186 echo $ECHO_N "checking if $cf_nculib_root uses pthreads... $ECHO_C" >&6
13187 if test "${cf_cv_ncurses_pthreads+set}" = set; then
13188 echo $ECHO_N "(cached) $ECHO_C" >&6
13191 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13192 echo "$as_me:13192: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13193 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13194 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13195 echo $ECHO_N "(cached) $ECHO_C" >&6
13197 ac_check_lib_save_LIBS=$LIBS
13198 LIBS="-l$cf_nculib_root $LIBS"
13199 cat >conftest.$ac_ext <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13203 /* Override any gcc2 internal prototype to avoid an error. */
13207 /* We use char because int might match the return type of a gcc2
13208 builtin and then its argument prototype would still apply. */
13209 char _nc_init_pthreads ();
13213 _nc_init_pthreads ();
13218 rm -f conftest.$ac_objext conftest$ac_exeext
13219 if { (eval echo "$as_me:13219: \"$ac_link\"") >&5
13220 (eval $ac_link) 2>&5
13222 echo "$as_me:13222: \$? = $ac_status" >&5
13223 (exit $ac_status); } &&
13224 { ac_try='test -s conftest$ac_exeext'
13225 { (eval echo "$as_me:13225: \"$ac_try\"") >&5
13226 (eval $ac_try) 2>&5
13228 echo "$as_me:13228: \$? = $ac_status" >&5
13229 (exit $ac_status); }; }; then
13230 eval "$as_ac_Lib=yes"
13232 echo "$as_me: failed program was:" >&5
13233 cat conftest.$ac_ext >&5
13234 eval "$as_ac_Lib=no"
13236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13237 LIBS=$ac_check_lib_save_LIBS
13239 echo "$as_me:13239: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13240 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13241 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13242 cf_cv_ncurses_pthreads=yes
13244 cf_cv_ncurses_pthreads=no
13248 echo "$as_me:13248: result: $cf_cv_ncurses_pthreads" >&5
13249 echo "${ECHO_T}$cf_cv_ncurses_pthreads" >&6
13250 if test "$cf_cv_ncurses_pthreads" = yes
13253 cf_add_libs="-lpthread"
13254 # Filter out duplicates - this happens with badly-designed ".pc" files...
13255 for cf_add_1lib in $LIBS
13257 for cf_add_2lib in $cf_add_libs
13259 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13265 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13267 LIBS="$cf_add_libs"
13271 case $cf_cv_screen in
13273 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13277 echo "$as_me:13277: checking for NetBSD form.h" >&5
13278 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13279 if test "${cf_cv_netbsd_form_h+set}" = set; then
13280 echo $ECHO_N "(cached) $ECHO_C" >&6
13283 cat >conftest.$ac_ext <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13287 #include <${cf_cv_ncurses_header:-curses.h}>
13295 int y = current_field(form)->cursor_ypos;
13296 int x = current_field(form)->cursor_xpos;
13302 rm -f conftest.$ac_objext
13303 if { (eval echo "$as_me:13303: \"$ac_compile\"") >&5
13304 (eval $ac_compile) 2>&5
13306 echo "$as_me:13306: \$? = $ac_status" >&5
13307 (exit $ac_status); } &&
13308 { ac_try='test -s conftest.$ac_objext'
13309 { (eval echo "$as_me:13309: \"$ac_try\"") >&5
13310 (eval $ac_try) 2>&5
13312 echo "$as_me:13312: \$? = $ac_status" >&5
13313 (exit $ac_status); }; }; then
13314 cf_cv_netbsd_form_h=yes
13317 echo "$as_me: failed program was:" >&5
13318 cat conftest.$ac_ext >&5
13319 cf_cv_netbsd_form_h=no
13321 rm -f conftest.$ac_objext conftest.$ac_ext
13324 echo "$as_me:13324: result: $cf_cv_netbsd_form_h" >&5
13325 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13327 test "$cf_cv_netbsd_form_h" = yes &&
13328 cat >>confdefs.h <<\EOF
13329 #define HAVE_NETBSD_FORM_H 1
13332 echo "$as_me:13332: checking for NetBSD menu.h" >&5
13333 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13334 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13335 echo $ECHO_N "(cached) $ECHO_C" >&6
13338 cat >conftest.$ac_ext <<_ACEOF
13339 #line 13339 "configure"
13340 #include "confdefs.h"
13342 #include <${cf_cv_ncurses_header:-curses.h}>
13350 int y = menu->max_item_width;
13356 rm -f conftest.$ac_objext
13357 if { (eval echo "$as_me:13357: \"$ac_compile\"") >&5
13358 (eval $ac_compile) 2>&5
13360 echo "$as_me:13360: \$? = $ac_status" >&5
13361 (exit $ac_status); } &&
13362 { ac_try='test -s conftest.$ac_objext'
13363 { (eval echo "$as_me:13363: \"$ac_try\"") >&5
13364 (eval $ac_try) 2>&5
13366 echo "$as_me:13366: \$? = $ac_status" >&5
13367 (exit $ac_status); }; }; then
13368 cf_cv_netbsd_menu_h=yes
13371 echo "$as_me: failed program was:" >&5
13372 cat conftest.$ac_ext >&5
13373 cf_cv_netbsd_menu_h=no
13375 rm -f conftest.$ac_objext conftest.$ac_ext
13378 echo "$as_me:13378: result: $cf_cv_netbsd_menu_h" >&5
13379 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13381 test "$cf_cv_netbsd_menu_h" = yes &&
13382 cat >>confdefs.h <<\EOF
13383 #define HAVE_NETBSD_MENU_H 1
13389 case $cf_cv_screen in
13393 # look for curses-related libraries
13395 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13396 echo "$as_me:13396: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13397 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13398 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13399 echo $ECHO_N "(cached) $ECHO_C" >&6
13401 ac_check_lib_save_LIBS=$LIBS
13402 LIBS="-lpanel$cf_cv_libtype $LIBS"
13403 cat >conftest.$ac_ext <<_ACEOF
13404 #line 13404 "configure"
13405 #include "confdefs.h"
13407 /* Override any gcc2 internal prototype to avoid an error. */
13411 /* We use char because int might match the return type of a gcc2
13412 builtin and then its argument prototype would still apply. */
13422 rm -f conftest.$ac_objext conftest$ac_exeext
13423 if { (eval echo "$as_me:13423: \"$ac_link\"") >&5
13424 (eval $ac_link) 2>&5
13426 echo "$as_me:13426: \$? = $ac_status" >&5
13427 (exit $ac_status); } &&
13428 { ac_try='test -s conftest$ac_exeext'
13429 { (eval echo "$as_me:13429: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13432 echo "$as_me:13432: \$? = $ac_status" >&5
13433 (exit $ac_status); }; }; then
13434 eval "$as_ac_Lib=yes"
13436 echo "$as_me: failed program was:" >&5
13437 cat conftest.$ac_ext >&5
13438 eval "$as_ac_Lib=no"
13440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13441 LIBS=$ac_check_lib_save_LIBS
13443 echo "$as_me:13443: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13444 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13445 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13447 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13449 cf_add_libs="-lpanel$cf_cv_libtype"
13450 # Filter out duplicates - this happens with badly-designed ".pc" files...
13451 for cf_add_1lib in $LIBS
13453 for cf_add_2lib in $cf_add_libs
13455 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13461 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13463 LIBS="$cf_add_libs"
13465 cat >>confdefs.h <<EOF
13466 #define $cf_upper 1
13471 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13472 echo "$as_me:13472: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13473 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13474 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13475 echo $ECHO_N "(cached) $ECHO_C" >&6
13477 ac_check_lib_save_LIBS=$LIBS
13478 LIBS="-lmenu$cf_cv_libtype $LIBS"
13479 cat >conftest.$ac_ext <<_ACEOF
13480 #line 13480 "configure"
13481 #include "confdefs.h"
13483 /* Override any gcc2 internal prototype to avoid an error. */
13487 /* We use char because int might match the return type of a gcc2
13488 builtin and then its argument prototype would still apply. */
13489 char menu_driver ();
13498 rm -f conftest.$ac_objext conftest$ac_exeext
13499 if { (eval echo "$as_me:13499: \"$ac_link\"") >&5
13500 (eval $ac_link) 2>&5
13502 echo "$as_me:13502: \$? = $ac_status" >&5
13503 (exit $ac_status); } &&
13504 { ac_try='test -s conftest$ac_exeext'
13505 { (eval echo "$as_me:13505: \"$ac_try\"") >&5
13506 (eval $ac_try) 2>&5
13508 echo "$as_me:13508: \$? = $ac_status" >&5
13509 (exit $ac_status); }; }; then
13510 eval "$as_ac_Lib=yes"
13512 echo "$as_me: failed program was:" >&5
13513 cat conftest.$ac_ext >&5
13514 eval "$as_ac_Lib=no"
13516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13517 LIBS=$ac_check_lib_save_LIBS
13519 echo "$as_me:13519: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13520 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13521 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13523 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13525 cf_add_libs="-lmenu$cf_cv_libtype"
13526 # Filter out duplicates - this happens with badly-designed ".pc" files...
13527 for cf_add_1lib in $LIBS
13529 for cf_add_2lib in $cf_add_libs
13531 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13537 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13539 LIBS="$cf_add_libs"
13541 cat >>confdefs.h <<EOF
13542 #define $cf_upper 1
13547 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13548 echo "$as_me:13548: checking for form_driver in -lform$cf_cv_libtype" >&5
13549 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13550 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13551 echo $ECHO_N "(cached) $ECHO_C" >&6
13553 ac_check_lib_save_LIBS=$LIBS
13554 LIBS="-lform$cf_cv_libtype $LIBS"
13555 cat >conftest.$ac_ext <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13559 /* Override any gcc2 internal prototype to avoid an error. */
13563 /* We use char because int might match the return type of a gcc2
13564 builtin and then its argument prototype would still apply. */
13565 char form_driver ();
13574 rm -f conftest.$ac_objext conftest$ac_exeext
13575 if { (eval echo "$as_me:13575: \"$ac_link\"") >&5
13576 (eval $ac_link) 2>&5
13578 echo "$as_me:13578: \$? = $ac_status" >&5
13579 (exit $ac_status); } &&
13580 { ac_try='test -s conftest$ac_exeext'
13581 { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582 (eval $ac_try) 2>&5
13584 echo "$as_me:13584: \$? = $ac_status" >&5
13585 (exit $ac_status); }; }; then
13586 eval "$as_ac_Lib=yes"
13588 echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 eval "$as_ac_Lib=no"
13592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13593 LIBS=$ac_check_lib_save_LIBS
13595 echo "$as_me:13595: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13596 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13597 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13599 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13601 cf_add_libs="-lform$cf_cv_libtype"
13602 # Filter out duplicates - this happens with badly-designed ".pc" files...
13603 for cf_add_1lib in $LIBS
13605 for cf_add_2lib in $cf_add_libs
13607 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13615 LIBS="$cf_add_libs"
13617 cat >>confdefs.h <<EOF
13618 #define $cf_upper 1
13623 # look for curses-related headers
13634 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13635 echo "$as_me:13635: checking for $ac_header" >&5
13636 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13637 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6
13640 cat >conftest.$ac_ext <<_ACEOF
13641 #line 13641 "configure"
13642 #include "confdefs.h"
13643 #include <$ac_header>
13645 if { (eval echo "$as_me:13645: \"$ac_cpp conftest.$ac_ext\"") >&5
13646 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13648 egrep -v '^ *\+' conftest.er1 >conftest.err
13650 cat conftest.err >&5
13651 echo "$as_me:13651: \$? = $ac_status" >&5
13652 (exit $ac_status); } >/dev/null; then
13653 if test -s conftest.err; then
13654 ac_cpp_err=$ac_c_preproc_warn_flag
13661 if test -z "$ac_cpp_err"; then
13662 eval "$as_ac_Header=yes"
13664 echo "$as_me: failed program was:" >&5
13665 cat conftest.$ac_ext >&5
13666 eval "$as_ac_Header=no"
13668 rm -f conftest.err conftest.$ac_ext
13670 echo "$as_me:13670: result: `eval echo '${'$as_ac_Header'}'`" >&5
13671 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13672 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13673 cat >>confdefs.h <<EOF
13674 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13683 echo "$as_me:13683: checking for ANSI C header files" >&5
13684 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13685 if test "${ac_cv_header_stdc+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 <stdlib.h>
13692 #include <stdarg.h>
13693 #include <string.h>
13697 if { (eval echo "$as_me:13697: \"$ac_cpp conftest.$ac_ext\"") >&5
13698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13700 egrep -v '^ *\+' conftest.er1 >conftest.err
13702 cat conftest.err >&5
13703 echo "$as_me:13703: \$? = $ac_status" >&5
13704 (exit $ac_status); } >/dev/null; then
13705 if test -s conftest.err; then
13706 ac_cpp_err=$ac_c_preproc_warn_flag
13713 if test -z "$ac_cpp_err"; then
13714 ac_cv_header_stdc=yes
13716 echo "$as_me: failed program was:" >&5
13717 cat conftest.$ac_ext >&5
13718 ac_cv_header_stdc=no
13720 rm -f conftest.err conftest.$ac_ext
13722 if test $ac_cv_header_stdc = yes; then
13723 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13724 cat >conftest.$ac_ext <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727 #include <string.h>
13730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13731 egrep "memchr" >/dev/null 2>&1; then
13734 ac_cv_header_stdc=no
13740 if test $ac_cv_header_stdc = yes; then
13741 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13742 cat >conftest.$ac_ext <<_ACEOF
13743 #line 13743 "configure"
13744 #include "confdefs.h"
13745 #include <stdlib.h>
13748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13749 egrep "free" >/dev/null 2>&1; then
13752 ac_cv_header_stdc=no
13758 if test $ac_cv_header_stdc = yes; then
13759 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13760 if test "$cross_compiling" = yes; then
13763 cat >conftest.$ac_ext <<_ACEOF
13764 #line 13764 "configure"
13765 #include "confdefs.h"
13767 #if ((' ' & 0x0FF) == 0x020)
13768 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13769 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13771 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13772 || ('j' <= (c) && (c) <= 'r') \
13773 || ('s' <= (c) && (c) <= 'z'))
13774 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13777 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13782 for (i = 0; i < 256; i++)
13783 if (XOR (islower (i), ISLOWER (i))
13784 || toupper (i) != TOUPPER (i))
13785 $ac_main_return(2);
13786 $ac_main_return (0);
13789 rm -f conftest$ac_exeext
13790 if { (eval echo "$as_me:13790: \"$ac_link\"") >&5
13791 (eval $ac_link) 2>&5
13793 echo "$as_me:13793: \$? = $ac_status" >&5
13794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13795 { (eval echo "$as_me:13795: \"$ac_try\"") >&5
13796 (eval $ac_try) 2>&5
13798 echo "$as_me:13798: \$? = $ac_status" >&5
13799 (exit $ac_status); }; }; then
13802 echo "$as_me: program exited with status $ac_status" >&5
13803 echo "$as_me: failed program was:" >&5
13804 cat conftest.$ac_ext >&5
13805 ac_cv_header_stdc=no
13807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13811 echo "$as_me:13811: result: $ac_cv_header_stdc" >&5
13812 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13813 if test $ac_cv_header_stdc = yes; then
13815 cat >>confdefs.h <<\EOF
13816 #define STDC_HEADERS 1
13821 echo "$as_me:13821: checking whether time.h and sys/time.h may both be included" >&5
13822 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13823 if test "${ac_cv_header_time+set}" = set; then
13824 echo $ECHO_N "(cached) $ECHO_C" >&6
13826 cat >conftest.$ac_ext <<_ACEOF
13827 #line 13827 "configure"
13828 #include "confdefs.h"
13829 #include <sys/types.h>
13830 #include <sys/time.h>
13836 if ((struct tm *) 0)
13842 rm -f conftest.$ac_objext
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844 (eval $ac_compile) 2>&5
13846 echo "$as_me:13846: \$? = $ac_status" >&5
13847 (exit $ac_status); } &&
13848 { ac_try='test -s conftest.$ac_objext'
13849 { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850 (eval $ac_try) 2>&5
13852 echo "$as_me:13852: \$? = $ac_status" >&5
13853 (exit $ac_status); }; }; then
13854 ac_cv_header_time=yes
13856 echo "$as_me: failed program was:" >&5
13857 cat conftest.$ac_ext >&5
13858 ac_cv_header_time=no
13860 rm -f conftest.$ac_objext conftest.$ac_ext
13862 echo "$as_me:13862: result: $ac_cv_header_time" >&5
13863 echo "${ECHO_T}$ac_cv_header_time" >&6
13864 if test $ac_cv_header_time = yes; then
13866 cat >>confdefs.h <<\EOF
13867 #define TIME_WITH_SYS_TIME 1
13884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13885 echo "$as_me:13885: checking for $ac_header" >&5
13886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13888 echo $ECHO_N "(cached) $ECHO_C" >&6
13890 cat >conftest.$ac_ext <<_ACEOF
13891 #line 13891 "configure"
13892 #include "confdefs.h"
13893 #include <$ac_header>
13895 if { (eval echo "$as_me:13895: \"$ac_cpp conftest.$ac_ext\"") >&5
13896 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13898 egrep -v '^ *\+' conftest.er1 >conftest.err
13900 cat conftest.err >&5
13901 echo "$as_me:13901: \$? = $ac_status" >&5
13902 (exit $ac_status); } >/dev/null; then
13903 if test -s conftest.err; then
13904 ac_cpp_err=$ac_c_preproc_warn_flag
13911 if test -z "$ac_cpp_err"; then
13912 eval "$as_ac_Header=yes"
13914 echo "$as_me: failed program was:" >&5
13915 cat conftest.$ac_ext >&5
13916 eval "$as_ac_Header=no"
13918 rm -f conftest.err conftest.$ac_ext
13920 echo "$as_me:13920: result: `eval echo '${'$as_ac_Header'}'`" >&5
13921 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13922 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13923 cat >>confdefs.h <<EOF
13924 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13930 for ac_header in unistd.h getopt.h
13932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13933 echo "$as_me:13933: checking for $ac_header" >&5
13934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13936 echo $ECHO_N "(cached) $ECHO_C" >&6
13938 cat >conftest.$ac_ext <<_ACEOF
13939 #line 13939 "configure"
13940 #include "confdefs.h"
13941 #include <$ac_header>
13943 if { (eval echo "$as_me:13943: \"$ac_cpp conftest.$ac_ext\"") >&5
13944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13946 egrep -v '^ *\+' conftest.er1 >conftest.err
13948 cat conftest.err >&5
13949 echo "$as_me:13949: \$? = $ac_status" >&5
13950 (exit $ac_status); } >/dev/null; then
13951 if test -s conftest.err; then
13952 ac_cpp_err=$ac_c_preproc_warn_flag
13959 if test -z "$ac_cpp_err"; then
13960 eval "$as_ac_Header=yes"
13962 echo "$as_me: failed program was:" >&5
13963 cat conftest.$ac_ext >&5
13964 eval "$as_ac_Header=no"
13966 rm -f conftest.err conftest.$ac_ext
13968 echo "$as_me:13968: result: `eval echo '${'$as_ac_Header'}'`" >&5
13969 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13970 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13971 cat >>confdefs.h <<EOF
13972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13978 echo "$as_me:13978: checking for header declaring getopt variables" >&5
13979 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13980 if test "${cf_cv_getopt_header+set}" = set; then
13981 echo $ECHO_N "(cached) $ECHO_C" >&6
13984 cf_cv_getopt_header=none
13985 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13987 cat >conftest.$ac_ext <<_ACEOF
13988 #line 13988 "configure"
13989 #include "confdefs.h"
13991 #include <$cf_header>
13995 int x = optind; char *y = optarg
14000 rm -f conftest.$ac_objext
14001 if { (eval echo "$as_me:14001: \"$ac_compile\"") >&5
14002 (eval $ac_compile) 2>&5
14004 echo "$as_me:14004: \$? = $ac_status" >&5
14005 (exit $ac_status); } &&
14006 { ac_try='test -s conftest.$ac_objext'
14007 { (eval echo "$as_me:14007: \"$ac_try\"") >&5
14008 (eval $ac_try) 2>&5
14010 echo "$as_me:14010: \$? = $ac_status" >&5
14011 (exit $ac_status); }; }; then
14012 cf_cv_getopt_header=$cf_header
14015 echo "$as_me: failed program was:" >&5
14016 cat conftest.$ac_ext >&5
14018 rm -f conftest.$ac_objext conftest.$ac_ext
14022 echo "$as_me:14022: result: $cf_cv_getopt_header" >&5
14023 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14024 if test $cf_cv_getopt_header != none ; then
14026 cat >>confdefs.h <<\EOF
14027 #define HAVE_GETOPT_HEADER 1
14031 if test $cf_cv_getopt_header = getopt.h ; then
14033 cat >>confdefs.h <<\EOF
14034 #define NEED_GETOPT_H 1
14044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14045 echo "$as_me:14045: checking for $ac_func" >&5
14046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14047 if eval "test \"\${$as_ac_var+set}\" = set"; then
14048 echo $ECHO_N "(cached) $ECHO_C" >&6
14050 cat >conftest.$ac_ext <<_ACEOF
14051 #line 14051 "configure"
14052 #include "confdefs.h"
14053 /* System header to define __stub macros and hopefully few prototypes,
14054 which can conflict with char $ac_func (); below. */
14055 #include <assert.h>
14056 /* Override any gcc2 internal prototype to avoid an error. */
14060 /* We use char because int might match the return type of a gcc2
14061 builtin and then its argument prototype would still apply. */
14068 /* The GNU C library defines this for functions which it implements
14069 to always fail with ENOSYS. Some functions are actually named
14070 something starting with __ and the normal name is an alias. */
14071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14074 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14081 rm -f conftest.$ac_objext conftest$ac_exeext
14082 if { (eval echo "$as_me:14082: \"$ac_link\"") >&5
14083 (eval $ac_link) 2>&5
14085 echo "$as_me:14085: \$? = $ac_status" >&5
14086 (exit $ac_status); } &&
14087 { ac_try='test -s conftest$ac_exeext'
14088 { (eval echo "$as_me:14088: \"$ac_try\"") >&5
14089 (eval $ac_try) 2>&5
14091 echo "$as_me:14091: \$? = $ac_status" >&5
14092 (exit $ac_status); }; }; then
14093 eval "$as_ac_var=yes"
14095 echo "$as_me: failed program was:" >&5
14096 cat conftest.$ac_ext >&5
14097 eval "$as_ac_var=no"
14099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14101 echo "$as_me:14101: result: `eval echo '${'$as_ac_var'}'`" >&5
14102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14103 if test `eval echo '${'$as_ac_var'}'` = yes; then
14104 cat >>confdefs.h <<EOF
14105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14111 if test "x$ac_cv_func_getopt" = xno; then
14112 { { echo "$as_me:14112: error: getopt is required for building programs" >&5
14113 echo "$as_me: error: getopt is required for building programs" >&2;}
14114 { (exit 1); exit 1; }; }
14117 if test "$cf_enable_widec" = yes; then
14130 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14131 echo "$as_me:14131: checking for $ac_func" >&5
14132 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14133 if eval "test \"\${$as_ac_var+set}\" = set"; then
14134 echo $ECHO_N "(cached) $ECHO_C" >&6
14136 cat >conftest.$ac_ext <<_ACEOF
14137 #line 14137 "configure"
14138 #include "confdefs.h"
14139 /* System header to define __stub macros and hopefully few prototypes,
14140 which can conflict with char $ac_func (); below. */
14141 #include <assert.h>
14142 /* Override any gcc2 internal prototype to avoid an error. */
14146 /* We use char because int might match the return type of a gcc2
14147 builtin and then its argument prototype would still apply. */
14154 /* The GNU C library defines this for functions which it implements
14155 to always fail with ENOSYS. Some functions are actually named
14156 something starting with __ and the normal name is an alias. */
14157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14160 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14167 rm -f conftest.$ac_objext conftest$ac_exeext
14168 if { (eval echo "$as_me:14168: \"$ac_link\"") >&5
14169 (eval $ac_link) 2>&5
14171 echo "$as_me:14171: \$? = $ac_status" >&5
14172 (exit $ac_status); } &&
14173 { ac_try='test -s conftest$ac_exeext'
14174 { (eval echo "$as_me:14174: \"$ac_try\"") >&5
14175 (eval $ac_try) 2>&5
14177 echo "$as_me:14177: \$? = $ac_status" >&5
14178 (exit $ac_status); }; }; then
14179 eval "$as_ac_var=yes"
14181 echo "$as_me: failed program was:" >&5
14182 cat conftest.$ac_ext >&5
14183 eval "$as_ac_var=no"
14185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14187 echo "$as_me:14187: result: `eval echo '${'$as_ac_var'}'`" >&5
14188 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14189 if test `eval echo '${'$as_ac_var'}'` = yes; then
14190 cat >>confdefs.h <<EOF
14191 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14199 echo "$as_me:14199: checking definition to turn on extended curses functions" >&5
14200 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14201 if test "${cf_cv_need_xopen_extension+set}" = set; then
14202 echo $ECHO_N "(cached) $ECHO_C" >&6
14205 cf_cv_need_xopen_extension=unknown
14206 cat >conftest.$ac_ext <<_ACEOF
14207 #line 14207 "configure"
14208 #include "confdefs.h"
14210 #include <stdlib.h>
14211 #include <${cf_cv_ncurses_header:-curses.h}>
14216 #if defined(NCURSES_VERSION_PATCH)
14217 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14221 #ifdef NCURSES_VERSION
14223 int check2 = curs_set((int)sizeof(check));
14225 long x = winnstr(stdscr, "", 0);
14227 getbegyx(stdscr, y1, x1)
14232 rm -f conftest.$ac_objext conftest$ac_exeext
14233 if { (eval echo "$as_me:14233: \"$ac_link\"") >&5
14234 (eval $ac_link) 2>&5
14236 echo "$as_me:14236: \$? = $ac_status" >&5
14237 (exit $ac_status); } &&
14238 { ac_try='test -s conftest$ac_exeext'
14239 { (eval echo "$as_me:14239: \"$ac_try\"") >&5
14240 (eval $ac_try) 2>&5
14242 echo "$as_me:14242: \$? = $ac_status" >&5
14243 (exit $ac_status); }; }; then
14244 cf_cv_need_xopen_extension=none
14246 echo "$as_me: failed program was:" >&5
14247 cat conftest.$ac_ext >&5
14249 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14251 cat >conftest.$ac_ext <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14255 #define $cf_try_xopen_extension 1
14256 #include <stdlib.h>
14257 #include <${cf_cv_ncurses_header:-curses.h}>
14262 #ifdef NCURSES_VERSION
14264 int check2 = curs_set((int)sizeof(check));
14266 long x = winnstr(stdscr, "", 0);
14268 getbegyx(stdscr, y1, x1)
14273 rm -f conftest.$ac_objext conftest$ac_exeext
14274 if { (eval echo "$as_me:14274: \"$ac_link\"") >&5
14275 (eval $ac_link) 2>&5
14277 echo "$as_me:14277: \$? = $ac_status" >&5
14278 (exit $ac_status); } &&
14279 { ac_try='test -s conftest$ac_exeext'
14280 { (eval echo "$as_me:14280: \"$ac_try\"") >&5
14281 (eval $ac_try) 2>&5
14283 echo "$as_me:14283: \$? = $ac_status" >&5
14284 (exit $ac_status); }; }; then
14285 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14287 echo "$as_me: failed program was:" >&5
14288 cat conftest.$ac_ext >&5
14290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14297 echo "$as_me:14297: result: $cf_cv_need_xopen_extension" >&5
14298 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14300 case $cf_cv_need_xopen_extension in
14302 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14306 echo "$as_me:14306: checking for term.h" >&5
14307 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14308 if test "${cf_cv_term_header+set}" = set; then
14309 echo $ECHO_N "(cached) $ECHO_C" >&6
14312 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14313 # for <term.h> if we do not find the variant.
14315 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14317 case ${cf_cv_ncurses_header:-curses.h} in
14319 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14320 cf_header_list="$cf_header_item $cf_header_list"
14324 for cf_header in $cf_header_list
14326 cat >conftest.$ac_ext <<_ACEOF
14327 #line 14327 "configure"
14328 #include "confdefs.h"
14330 #include <${cf_cv_ncurses_header:-curses.h}>
14331 #include <${cf_header}>
14340 rm -f conftest.$ac_objext
14341 if { (eval echo "$as_me:14341: \"$ac_compile\"") >&5
14342 (eval $ac_compile) 2>&5
14344 echo "$as_me:14344: \$? = $ac_status" >&5
14345 (exit $ac_status); } &&
14346 { ac_try='test -s conftest.$ac_objext'
14347 { (eval echo "$as_me:14347: \"$ac_try\"") >&5
14348 (eval $ac_try) 2>&5
14350 echo "$as_me:14350: \$? = $ac_status" >&5
14351 (exit $ac_status); }; }; then
14352 cf_cv_term_header=$cf_header
14355 echo "$as_me: failed program was:" >&5
14356 cat conftest.$ac_ext >&5
14357 cf_cv_term_header=no
14359 rm -f conftest.$ac_objext conftest.$ac_ext
14362 case $cf_cv_term_header in
14364 # If curses is ncurses, some packagers still mess it up by trying to make
14365 # us use GNU termcap. This handles the most common case.
14366 for cf_header in ncurses/term.h ncursesw/term.h
14368 cat >conftest.$ac_ext <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14372 #include <${cf_cv_ncurses_header:-curses.h}>
14373 #ifdef NCURSES_VERSION
14374 #include <${cf_header}>
14386 rm -f conftest.$ac_objext
14387 if { (eval echo "$as_me:14387: \"$ac_compile\"") >&5
14388 (eval $ac_compile) 2>&5
14390 echo "$as_me:14390: \$? = $ac_status" >&5
14391 (exit $ac_status); } &&
14392 { ac_try='test -s conftest.$ac_objext'
14393 { (eval echo "$as_me:14393: \"$ac_try\"") >&5
14394 (eval $ac_try) 2>&5
14396 echo "$as_me:14396: \$? = $ac_status" >&5
14397 (exit $ac_status); }; }; then
14398 cf_cv_term_header=$cf_header
14401 echo "$as_me: failed program was:" >&5
14402 cat conftest.$ac_ext >&5
14403 cf_cv_term_header=no
14405 rm -f conftest.$ac_objext conftest.$ac_ext
14411 echo "$as_me:14411: result: $cf_cv_term_header" >&5
14412 echo "${ECHO_T}$cf_cv_term_header" >&6
14414 case $cf_cv_term_header in
14417 cat >>confdefs.h <<\EOF
14418 #define HAVE_TERM_H 1
14424 cat >>confdefs.h <<\EOF
14425 #define HAVE_NCURSES_TERM_H 1
14431 cat >>confdefs.h <<\EOF
14432 #define HAVE_NCURSESW_TERM_H 1
14438 echo "$as_me:14438: checking for unctrl.h" >&5
14439 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14440 if test "${cf_cv_unctrl_header+set}" = set; then
14441 echo $ECHO_N "(cached) $ECHO_C" >&6
14444 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14445 # for <unctrl.h> if we do not find the variant.
14447 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14449 case ${cf_cv_ncurses_header:-curses.h} in
14451 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14452 cf_header_list="$cf_header_item $cf_header_list"
14456 for cf_header in $cf_header_list
14458 cat >conftest.$ac_ext <<_ACEOF
14459 #line 14459 "configure"
14460 #include "confdefs.h"
14462 #include <${cf_cv_ncurses_header:-curses.h}>
14463 #include <${cf_header}>
14472 rm -f conftest.$ac_objext
14473 if { (eval echo "$as_me:14473: \"$ac_compile\"") >&5
14474 (eval $ac_compile) 2>&5
14476 echo "$as_me:14476: \$? = $ac_status" >&5
14477 (exit $ac_status); } &&
14478 { ac_try='test -s conftest.$ac_objext'
14479 { (eval echo "$as_me:14479: \"$ac_try\"") >&5
14480 (eval $ac_try) 2>&5
14482 echo "$as_me:14482: \$? = $ac_status" >&5
14483 (exit $ac_status); }; }; then
14484 cf_cv_unctrl_header=$cf_header
14487 echo "$as_me: failed program was:" >&5
14488 cat conftest.$ac_ext >&5
14489 cf_cv_unctrl_header=no
14491 rm -f conftest.$ac_objext conftest.$ac_ext
14495 echo "$as_me:14495: result: $cf_cv_unctrl_header" >&5
14496 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14498 case $cf_cv_unctrl_header in
14500 { echo "$as_me:14500: WARNING: unctrl.h header not found" >&5
14501 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14505 case $cf_cv_unctrl_header in
14508 cat >>confdefs.h <<\EOF
14509 #define HAVE_UNCTRL_H 1
14515 cat >>confdefs.h <<\EOF
14516 #define HAVE_NCURSES_UNCTRL_H 1
14520 (ncursesw/unctrl.h)
14522 cat >>confdefs.h <<\EOF
14523 #define HAVE_NCURSESW_UNCTRL_H 1
14530 assume_default_colors \
14556 use_default_colors \
14558 use_extended_names \
14572 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14574 echo "$as_me:14574: checking for ${cf_func}" >&5
14575 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14577 echo "${as_me:-configure}:14577: testing ${cf_func} ..." 1>&5
14579 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14580 echo $ECHO_N "(cached) $ECHO_C" >&6
14583 eval cf_result='$ac_cv_func_'$cf_func
14584 if test ".$cf_result" != ".no"; then
14585 cat >conftest.$ac_ext <<_ACEOF
14586 #line 14586 "configure"
14587 #include "confdefs.h"
14589 #ifdef HAVE_XCURSES
14590 #include <xcurses.h>
14591 char * XCursesProgramName = "test";
14593 #include <${cf_cv_ncurses_header:-curses.h}>
14594 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14595 #include <ncursesw/term.h>
14596 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14597 #include <ncurses/term.h>
14598 #elif defined(HAVE_TERM_H)
14608 long foo = (long)(&${cf_func});
14609 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14610 if (foo + 1234 > 5678)
14611 ${cf_cv_main_return:-return}(foo);
14618 rm -f conftest.$ac_objext conftest$ac_exeext
14619 if { (eval echo "$as_me:14619: \"$ac_link\"") >&5
14620 (eval $ac_link) 2>&5
14622 echo "$as_me:14622: \$? = $ac_status" >&5
14623 (exit $ac_status); } &&
14624 { ac_try='test -s conftest$ac_exeext'
14625 { (eval echo "$as_me:14625: \"$ac_try\"") >&5
14626 (eval $ac_try) 2>&5
14628 echo "$as_me:14628: \$? = $ac_status" >&5
14629 (exit $ac_status); }; }; then
14632 echo "$as_me: failed program was:" >&5
14633 cat conftest.$ac_ext >&5
14636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14638 eval 'cf_cv_func_'$cf_func'=$cf_result'
14642 # use the computed/retrieved cache-value:
14643 eval 'cf_result=$cf_cv_func_'$cf_func
14644 echo "$as_me:14644: result: $cf_result" >&5
14645 echo "${ECHO_T}$cf_result" >&6
14646 if test $cf_result != no; then
14647 cat >>confdefs.h <<EOF
14648 #define HAVE_${cf_tr_func} 1
14654 for cf_func in tputs
14657 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14659 echo "$as_me:14659: checking for ${cf_func}" >&5
14660 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14662 echo "${as_me:-configure}:14662: testing ${cf_func} ..." 1>&5
14664 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14665 echo $ECHO_N "(cached) $ECHO_C" >&6
14668 eval cf_result='$ac_cv_func_'$cf_func
14669 if test ".$cf_result" != ".no"; then
14670 cat >conftest.$ac_ext <<_ACEOF
14671 #line 14671 "configure"
14672 #include "confdefs.h"
14674 #ifdef HAVE_XCURSES
14675 #include <xcurses.h>
14676 char * XCursesProgramName = "test";
14678 #include <${cf_cv_ncurses_header:-curses.h}>
14679 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14680 #include <ncursesw/term.h>
14681 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14682 #include <ncurses/term.h>
14683 #elif defined(HAVE_TERM_H)
14693 long foo = (long)(&${cf_func});
14694 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14695 if (foo + 1234 > 5678)
14696 ${cf_cv_main_return:-return}(foo);
14703 rm -f conftest.$ac_objext conftest$ac_exeext
14704 if { (eval echo "$as_me:14704: \"$ac_link\"") >&5
14705 (eval $ac_link) 2>&5
14707 echo "$as_me:14707: \$? = $ac_status" >&5
14708 (exit $ac_status); } &&
14709 { ac_try='test -s conftest$ac_exeext'
14710 { (eval echo "$as_me:14710: \"$ac_try\"") >&5
14711 (eval $ac_try) 2>&5
14713 echo "$as_me:14713: \$? = $ac_status" >&5
14714 (exit $ac_status); }; }; then
14717 echo "$as_me: failed program was:" >&5
14718 cat conftest.$ac_ext >&5
14721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14723 eval 'cf_cv_func_'$cf_func'=$cf_result'
14727 # use the computed/retrieved cache-value:
14728 eval 'cf_result=$cf_cv_func_'$cf_func
14729 echo "$as_me:14729: result: $cf_result" >&5
14730 echo "${ECHO_T}$cf_result" >&6
14731 if test $cf_result != no; then
14732 cat >>confdefs.h <<EOF
14733 #define HAVE_${cf_tr_func} 1
14739 if test x$cf_cv_func_tputs = xyes
14742 for cf_arg in int char
14744 for cf_ret in int void
14746 if test $cf_ret = void
14748 cf_return="/* nothing */"
14750 cf_return="return value"
14752 cat >conftest.$ac_ext <<_ACEOF
14753 #line 14753 "configure"
14754 #include "confdefs.h"
14756 #include <${cf_cv_ncurses_header:-curses.h}>
14757 #include <$cf_cv_term_header>
14759 static $cf_ret outc($cf_arg value) { $cf_return; }
14765 tputs("hello", 0, outc);
14766 ${cf_cv_main_return:-return}(0);
14772 rm -f conftest.$ac_objext
14773 if { (eval echo "$as_me:14773: \"$ac_compile\"") >&5
14774 (eval $ac_compile) 2>&5
14776 echo "$as_me:14776: \$? = $ac_status" >&5
14777 (exit $ac_status); } &&
14778 { ac_try='test -s conftest.$ac_objext'
14779 { (eval echo "$as_me:14779: \"$ac_try\"") >&5
14780 (eval $ac_try) 2>&5
14782 echo "$as_me:14782: \$? = $ac_status" >&5
14783 (exit $ac_status); }; }; then
14785 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14787 echo "${as_me:-configure}:14787: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14789 cat >>confdefs.h <<EOF
14790 #define TPUTS_ARG $cf_arg
14791 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14792 #define TPUTS_RETURN(value) $cf_return
14798 echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14801 rm -f conftest.$ac_objext conftest.$ac_ext
14803 test $cf_done = yes && break
14807 echo "$as_me:14807: checking for ncurses extended functions" >&5
14808 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14809 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14810 echo $ECHO_N "(cached) $ECHO_C" >&6
14813 cat >conftest.$ac_ext <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14817 #include <${cf_cv_ncurses_header:-curses.h}>
14822 int x = NCURSES_EXT_FUNCS
14828 rm -f conftest.$ac_objext
14829 if { (eval echo "$as_me:14829: \"$ac_compile\"") >&5
14830 (eval $ac_compile) 2>&5
14832 echo "$as_me:14832: \$? = $ac_status" >&5
14833 (exit $ac_status); } &&
14834 { ac_try='test -s conftest.$ac_objext'
14835 { (eval echo "$as_me:14835: \"$ac_try\"") >&5
14836 (eval $ac_try) 2>&5
14838 echo "$as_me:14838: \$? = $ac_status" >&5
14839 (exit $ac_status); }; }; then
14840 cf_cv_ncurses_ext_funcs=defined
14842 echo "$as_me: failed program was:" >&5
14843 cat conftest.$ac_ext >&5
14845 cat >conftest.$ac_ext <<_ACEOF
14846 #line 14846 "configure"
14847 #include "confdefs.h"
14849 #include <${cf_cv_ncurses_header:-curses.h}>
14854 (void) assume_default_colors (0, 0);
14855 (void) curses_version ();
14856 (void) define_key (0, 0);
14857 (void) is_term_resized (0, 0);
14858 (void) key_defined (0);
14859 (void) keybound (0, 0);
14860 (void) keyok (0, 0);
14861 (void) resize_term (0, 0);
14862 (void) resizeterm (0, 0);
14863 (void) use_default_colors ();
14864 (void) use_extended_names (0);
14865 (void) wresize (0, 0, 0);
14870 rm -f conftest.$ac_objext conftest$ac_exeext
14871 if { (eval echo "$as_me:14871: \"$ac_link\"") >&5
14872 (eval $ac_link) 2>&5
14874 echo "$as_me:14874: \$? = $ac_status" >&5
14875 (exit $ac_status); } &&
14876 { ac_try='test -s conftest$ac_exeext'
14877 { (eval echo "$as_me:14877: \"$ac_try\"") >&5
14878 (eval $ac_try) 2>&5
14880 echo "$as_me:14880: \$? = $ac_status" >&5
14881 (exit $ac_status); }; }; then
14882 cf_cv_ncurses_ext_funcs=yes
14884 echo "$as_me: failed program was:" >&5
14885 cat conftest.$ac_ext >&5
14886 cf_cv_ncurses_ext_funcs=no
14888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14891 rm -f conftest.$ac_objext conftest.$ac_ext
14894 echo "$as_me:14894: result: $cf_cv_ncurses_ext_funcs" >&5
14895 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14896 test "$cf_cv_ncurses_ext_funcs" = yes &&
14897 cat >>confdefs.h <<\EOF
14898 #define NCURSES_EXT_FUNCS 1
14901 if test "$cf_enable_widec" = yes
14903 # workaround for systems with ncurses before 20111029, due to change of
14904 # feature test macro from _XPG5 to _XOPEN_SOURCE
14905 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14908 echo "$as_me:14908: checking if _XPG5 should be defined to enable wide-characters" >&5
14909 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14911 cat >conftest.$ac_ext <<_ACEOF
14912 #line 14912 "configure"
14913 #include "confdefs.h"
14915 #include <${cf_cv_ncurses_header:-curses.h}>
14924 rm -f conftest.$ac_objext
14925 if { (eval echo "$as_me:14925: \"$ac_compile\"") >&5
14926 (eval $ac_compile) 2>&5
14928 echo "$as_me:14928: \$? = $ac_status" >&5
14929 (exit $ac_status); } &&
14930 { ac_try='test -s conftest.$ac_objext'
14931 { (eval echo "$as_me:14931: \"$ac_try\"") >&5
14932 (eval $ac_try) 2>&5
14934 echo "$as_me:14934: \$? = $ac_status" >&5
14935 (exit $ac_status); }; }; then
14938 echo "$as_me: failed program was:" >&5
14939 cat conftest.$ac_ext >&5
14940 cf_save_cppflags="$CPPFLAGS"
14941 CPPFLAGS="$CPPFLAGS -D_XPG5"
14942 cat >conftest.$ac_ext <<_ACEOF
14943 #line 14943 "configure"
14944 #include "confdefs.h"
14946 #include <${cf_cv_ncurses_header:-curses.h}>
14955 rm -f conftest.$ac_objext
14956 if { (eval echo "$as_me:14956: \"$ac_compile\"") >&5
14957 (eval $ac_compile) 2>&5
14959 echo "$as_me:14959: \$? = $ac_status" >&5
14960 (exit $ac_status); } &&
14961 { ac_try='test -s conftest.$ac_objext'
14962 { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963 (eval $ac_try) 2>&5
14965 echo "$as_me:14965: \$? = $ac_status" >&5
14966 (exit $ac_status); }; }; then
14969 echo "$as_me: failed program was:" >&5
14970 cat conftest.$ac_ext >&5
14972 rm -f conftest.$ac_objext conftest.$ac_ext
14973 CPPFLAGS="$cf_save_cppflags"
14975 rm -f conftest.$ac_objext conftest.$ac_ext
14976 echo "$as_me:14976: result: $cf_define_xpg5" >&5
14977 echo "${ECHO_T}$cf_define_xpg5" >&6
14979 if test "$cf_define_xpg5" = yes
14981 CPPFLAGS="$CPPFLAGS -D_XPG5"
14985 echo "$as_me:14985: checking for wide-character functions" >&5
14986 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14987 if test "${cf_cv_widechar_funcs+set}" = set; then
14988 echo $ECHO_N "(cached) $ECHO_C" >&6
14991 cat >conftest.$ac_ext <<_ACEOF
14992 #line 14992 "configure"
14993 #include "confdefs.h"
14995 #include <${cf_cv_ncurses_header:-curses.h}>
15000 static wchar_t src_wchar[2];
15001 static cchar_t dst_cchar;
15002 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15008 rm -f conftest.$ac_objext conftest$ac_exeext
15009 if { (eval echo "$as_me:15009: \"$ac_link\"") >&5
15010 (eval $ac_link) 2>&5
15012 echo "$as_me:15012: \$? = $ac_status" >&5
15013 (exit $ac_status); } &&
15014 { ac_try='test -s conftest$ac_exeext'
15015 { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016 (eval $ac_try) 2>&5
15018 echo "$as_me:15018: \$? = $ac_status" >&5
15019 (exit $ac_status); }; }; then
15020 cf_cv_widechar_funcs=yes
15022 echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15024 cf_cv_widechar_funcs=no
15026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15029 echo "$as_me:15029: result: $cf_cv_widechar_funcs" >&5
15030 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15031 if test "$cf_cv_widechar_funcs" != no ; then
15033 cat >>confdefs.h <<\EOF
15034 #define USE_WIDEC_SUPPORT 1
15038 cat >>confdefs.h <<\EOF
15039 #define USE_WIDEC_SUPPORT 0
15044 cat >>confdefs.h <<\EOF
15045 #define USE_WIDEC_SUPPORT 0
15050 echo "$as_me:15050: checking if $cf_cv_screen library uses pthreads" >&5
15051 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15052 if test "${cf_cv_use_pthreads+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
15056 cat >conftest.$ac_ext <<_ACEOF
15057 #line 15057 "configure"
15058 #include "confdefs.h"
15060 #include <${cf_cv_ncurses_header:-curses.h}>
15061 extern void _nc_init_pthreads(void);
15068 _nc_init_pthreads();
15074 rm -f conftest.$ac_objext conftest$ac_exeext
15075 if { (eval echo "$as_me:15075: \"$ac_link\"") >&5
15076 (eval $ac_link) 2>&5
15078 echo "$as_me:15078: \$? = $ac_status" >&5
15079 (exit $ac_status); } &&
15080 { ac_try='test -s conftest$ac_exeext'
15081 { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15084 echo "$as_me:15084: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
15086 cf_cv_use_pthreads=yes
15088 echo "$as_me: failed program was:" >&5
15089 cat conftest.$ac_ext >&5
15090 cf_cv_use_pthreads=no
15092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15095 echo "$as_me:15095: result: $cf_cv_use_pthreads" >&5
15096 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15097 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15098 #define USE_PTHREADS 1
15101 echo "$as_me:15101: checking if sys/time.h works with sys/select.h" >&5
15102 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15103 if test "${cf_cv_sys_time_select+set}" = set; then
15104 echo $ECHO_N "(cached) $ECHO_C" >&6
15107 cat >conftest.$ac_ext <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15111 #include <sys/types.h>
15112 #ifdef HAVE_SYS_TIME_H
15113 #include <sys/time.h>
15115 #ifdef HAVE_SYS_SELECT_H
15116 #include <sys/select.h>
15127 rm -f conftest.$ac_objext
15128 if { (eval echo "$as_me:15128: \"$ac_compile\"") >&5
15129 (eval $ac_compile) 2>&5
15131 echo "$as_me:15131: \$? = $ac_status" >&5
15132 (exit $ac_status); } &&
15133 { ac_try='test -s conftest.$ac_objext'
15134 { (eval echo "$as_me:15134: \"$ac_try\"") >&5
15135 (eval $ac_try) 2>&5
15137 echo "$as_me:15137: \$? = $ac_status" >&5
15138 (exit $ac_status); }; }; then
15139 cf_cv_sys_time_select=yes
15141 echo "$as_me: failed program was:" >&5
15142 cat conftest.$ac_ext >&5
15143 cf_cv_sys_time_select=no
15145 rm -f conftest.$ac_objext conftest.$ac_ext
15149 echo "$as_me:15149: result: $cf_cv_sys_time_select" >&5
15150 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15151 test "$cf_cv_sys_time_select" = yes &&
15152 cat >>confdefs.h <<\EOF
15153 #define HAVE_SYS_TIME_SELECT 1
15156 # special check for test/ditto.c
15158 echo "$as_me:15158: checking for openpty in -lutil" >&5
15159 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15160 if test "${ac_cv_lib_util_openpty+set}" = set; then
15161 echo $ECHO_N "(cached) $ECHO_C" >&6
15163 ac_check_lib_save_LIBS=$LIBS
15164 LIBS="-lutil $LIBS"
15165 cat >conftest.$ac_ext <<_ACEOF
15166 #line 15166 "configure"
15167 #include "confdefs.h"
15169 /* Override any gcc2 internal prototype to avoid an error. */
15173 /* We use char because int might match the return type of a gcc2
15174 builtin and then its argument prototype would still apply. */
15184 rm -f conftest.$ac_objext conftest$ac_exeext
15185 if { (eval echo "$as_me:15185: \"$ac_link\"") >&5
15186 (eval $ac_link) 2>&5
15188 echo "$as_me:15188: \$? = $ac_status" >&5
15189 (exit $ac_status); } &&
15190 { ac_try='test -s conftest$ac_exeext'
15191 { (eval echo "$as_me:15191: \"$ac_try\"") >&5
15192 (eval $ac_try) 2>&5
15194 echo "$as_me:15194: \$? = $ac_status" >&5
15195 (exit $ac_status); }; }; then
15196 ac_cv_lib_util_openpty=yes
15198 echo "$as_me: failed program was:" >&5
15199 cat conftest.$ac_ext >&5
15200 ac_cv_lib_util_openpty=no
15202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15203 LIBS=$ac_check_lib_save_LIBS
15205 echo "$as_me:15205: result: $ac_cv_lib_util_openpty" >&5
15206 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15207 if test $ac_cv_lib_util_openpty = yes; then
15213 echo "$as_me:15213: checking for openpty header" >&5
15214 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15215 if test "${cf_cv_func_openpty+set}" = set; then
15216 echo $ECHO_N "(cached) $ECHO_C" >&6
15219 cf_save_LIBS="$LIBS"
15220 test $cf_cv_lib_util = yes && {
15221 cf_add_libs="-lutil"
15222 # Filter out duplicates - this happens with badly-designed ".pc" files...
15223 for cf_add_1lib in $LIBS
15225 for cf_add_2lib in $cf_add_libs
15227 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15235 LIBS="$cf_add_libs"
15237 for cf_header in pty.h libutil.h util.h
15239 cat >conftest.$ac_ext <<_ACEOF
15240 #line 15240 "configure"
15241 #include "confdefs.h"
15243 #include <$cf_header>
15249 int x = openpty((int *)0, (int *)0, (char *)0,
15250 (struct termios *)0, (struct winsize *)0);
15256 rm -f conftest.$ac_objext conftest$ac_exeext
15257 if { (eval echo "$as_me:15257: \"$ac_link\"") >&5
15258 (eval $ac_link) 2>&5
15260 echo "$as_me:15260: \$? = $ac_status" >&5
15261 (exit $ac_status); } &&
15262 { ac_try='test -s conftest$ac_exeext'
15263 { (eval echo "$as_me:15263: \"$ac_try\"") >&5
15264 (eval $ac_try) 2>&5
15266 echo "$as_me:15266: \$? = $ac_status" >&5
15267 (exit $ac_status); }; }; then
15269 cf_cv_func_openpty=$cf_header
15273 echo "$as_me: failed program was:" >&5
15274 cat conftest.$ac_ext >&5
15276 cf_cv_func_openpty=no
15279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15281 LIBS="$cf_save_LIBS"
15284 echo "$as_me:15284: result: $cf_cv_func_openpty" >&5
15285 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15287 if test "$cf_cv_func_openpty" != no ; then
15289 cat >>confdefs.h <<EOF
15290 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15293 cat >>confdefs.h <<\EOF
15294 #define USE_XTERM_PTY 1
15297 if test "x$cf_cv_lib_util" = xyes ; then
15299 cf_add_libs="-lutil"
15300 # Filter out duplicates - this happens with badly-designed ".pc" files...
15301 for cf_add_1lib in $TEST_LIBS
15303 for cf_add_2lib in $cf_add_libs
15305 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15311 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15313 TEST_LIBS="$cf_add_libs"
15318 echo "$as_me:15318: checking for function curses_version" >&5
15319 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15320 if test "${cf_cv_func_curses_version+set}" = set; then
15321 echo $ECHO_N "(cached) $ECHO_C" >&6
15324 if test "$cross_compiling" = yes; then
15325 cf_cv_func_curses_version=unknown
15327 cat >conftest.$ac_ext <<_ACEOF
15328 #line 15328 "configure"
15329 #include "confdefs.h"
15331 #include <${cf_cv_ncurses_header:-curses.h}>
15335 sprintf(temp, "%s\n", curses_version());
15336 ${cf_cv_main_return:-return}(0);
15340 rm -f conftest$ac_exeext
15341 if { (eval echo "$as_me:15341: \"$ac_link\"") >&5
15342 (eval $ac_link) 2>&5
15344 echo "$as_me:15344: \$? = $ac_status" >&5
15345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15346 { (eval echo "$as_me:15346: \"$ac_try\"") >&5
15347 (eval $ac_try) 2>&5
15349 echo "$as_me:15349: \$? = $ac_status" >&5
15350 (exit $ac_status); }; }; then
15351 cf_cv_func_curses_version=yes
15354 echo "$as_me: program exited with status $ac_status" >&5
15355 echo "$as_me: failed program was:" >&5
15356 cat conftest.$ac_ext >&5
15357 cf_cv_func_curses_version=no
15360 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15364 echo "$as_me:15364: result: $cf_cv_func_curses_version" >&5
15365 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15366 test "$cf_cv_func_curses_version" = yes &&
15367 cat >>confdefs.h <<\EOF
15368 #define HAVE_CURSES_VERSION 1
15371 echo "$as_me:15371: checking for alternate character set array" >&5
15372 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15373 if test "${cf_cv_curses_acs_map+set}" = set; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15377 cf_cv_curses_acs_map=unknown
15378 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15380 cat >conftest.$ac_ext <<_ACEOF
15381 #line 15381 "configure"
15382 #include "confdefs.h"
15384 #include <${cf_cv_ncurses_header:-curses.h}>
15390 $name['k'] = ACS_PLUS
15396 rm -f conftest.$ac_objext conftest$ac_exeext
15397 if { (eval echo "$as_me:15397: \"$ac_link\"") >&5
15398 (eval $ac_link) 2>&5
15400 echo "$as_me:15400: \$? = $ac_status" >&5
15401 (exit $ac_status); } &&
15402 { ac_try='test -s conftest$ac_exeext'
15403 { (eval echo "$as_me:15403: \"$ac_try\"") >&5
15404 (eval $ac_try) 2>&5
15406 echo "$as_me:15406: \$? = $ac_status" >&5
15407 (exit $ac_status); }; }; then
15408 cf_cv_curses_acs_map=$name; break
15410 echo "$as_me: failed program was:" >&5
15411 cat conftest.$ac_ext >&5
15413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15417 echo "$as_me:15417: result: $cf_cv_curses_acs_map" >&5
15418 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15420 test "$cf_cv_curses_acs_map" != unknown &&
15421 cat >>confdefs.h <<EOF
15422 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15425 if test "$cf_enable_widec" = yes; then
15427 echo "$as_me:15427: checking for wide alternate character set array" >&5
15428 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15429 if test "${cf_cv_curses_wacs_map+set}" = set; then
15430 echo $ECHO_N "(cached) $ECHO_C" >&6
15433 cf_cv_curses_wacs_map=unknown
15434 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15436 cat >conftest.$ac_ext <<_ACEOF
15437 #line 15437 "configure"
15438 #include "confdefs.h"
15440 #ifndef _XOPEN_SOURCE_EXTENDED
15441 #define _XOPEN_SOURCE_EXTENDED
15443 #include <${cf_cv_ncurses_header:-curses.h}>
15447 void *foo = &($name['k'])
15452 rm -f conftest.$ac_objext conftest$ac_exeext
15453 if { (eval echo "$as_me:15453: \"$ac_link\"") >&5
15454 (eval $ac_link) 2>&5
15456 echo "$as_me:15456: \$? = $ac_status" >&5
15457 (exit $ac_status); } &&
15458 { ac_try='test -s conftest$ac_exeext'
15459 { (eval echo "$as_me:15459: \"$ac_try\"") >&5
15460 (eval $ac_try) 2>&5
15462 echo "$as_me:15462: \$? = $ac_status" >&5
15463 (exit $ac_status); }; }; then
15464 cf_cv_curses_wacs_map=$name
15467 echo "$as_me: failed program was:" >&5
15468 cat conftest.$ac_ext >&5
15470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15473 echo "$as_me:15473: result: $cf_cv_curses_wacs_map" >&5
15474 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15476 test "$cf_cv_curses_wacs_map" != unknown &&
15477 cat >>confdefs.h <<EOF
15478 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15481 echo "$as_me:15481: checking for wide alternate character constants" >&5
15482 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15483 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15484 echo $ECHO_N "(cached) $ECHO_C" >&6
15487 cf_cv_curses_wacs_symbols=no
15488 if test "$cf_cv_curses_wacs_map" != unknown
15490 cat >conftest.$ac_ext <<_ACEOF
15491 #line 15491 "configure"
15492 #include "confdefs.h"
15494 #ifndef _XOPEN_SOURCE_EXTENDED
15495 #define _XOPEN_SOURCE_EXTENDED
15497 #include <${cf_cv_ncurses_header:-curses.h}>
15501 cchar_t *foo = WACS_PLUS;
15502 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15507 rm -f conftest.$ac_objext conftest$ac_exeext
15508 if { (eval echo "$as_me:15508: \"$ac_link\"") >&5
15509 (eval $ac_link) 2>&5
15511 echo "$as_me:15511: \$? = $ac_status" >&5
15512 (exit $ac_status); } &&
15513 { ac_try='test -s conftest$ac_exeext'
15514 { (eval echo "$as_me:15514: \"$ac_try\"") >&5
15515 (eval $ac_try) 2>&5
15517 echo "$as_me:15517: \$? = $ac_status" >&5
15518 (exit $ac_status); }; }; then
15519 cf_cv_curses_wacs_symbols=yes
15521 echo "$as_me: failed program was:" >&5
15522 cat conftest.$ac_ext >&5
15524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15526 cat >conftest.$ac_ext <<_ACEOF
15527 #line 15527 "configure"
15528 #include "confdefs.h"
15530 #ifndef _XOPEN_SOURCE_EXTENDED
15531 #define _XOPEN_SOURCE_EXTENDED
15533 #include <${cf_cv_ncurses_header:-curses.h}>
15537 cchar_t *foo = WACS_PLUS
15542 rm -f conftest.$ac_objext conftest$ac_exeext
15543 if { (eval echo "$as_me:15543: \"$ac_link\"") >&5
15544 (eval $ac_link) 2>&5
15546 echo "$as_me:15546: \$? = $ac_status" >&5
15547 (exit $ac_status); } &&
15548 { ac_try='test -s conftest$ac_exeext'
15549 { (eval echo "$as_me:15549: \"$ac_try\"") >&5
15550 (eval $ac_try) 2>&5
15552 echo "$as_me:15552: \$? = $ac_status" >&5
15553 (exit $ac_status); }; }; then
15554 cf_cv_curses_wacs_symbols=yes
15556 echo "$as_me: failed program was:" >&5
15557 cat conftest.$ac_ext >&5
15559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15563 echo "$as_me:15563: result: $cf_cv_curses_wacs_symbols" >&5
15564 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15566 test "$cf_cv_curses_wacs_symbols" != no &&
15567 cat >>confdefs.h <<\EOF
15568 #define CURSES_WACS_SYMBOLS 1
15573 echo "$as_me:15573: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15574 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15575 cat >conftest.$ac_ext <<_ACEOF
15576 #line 15576 "configure"
15577 #include "confdefs.h"
15579 #ifndef _XOPEN_SOURCE_EXTENDED
15580 #define _XOPEN_SOURCE_EXTENDED
15582 #include <${cf_cv_ncurses_header:-curses.h}>
15593 rm -f conftest.$ac_objext
15594 if { (eval echo "$as_me:15594: \"$ac_compile\"") >&5
15595 (eval $ac_compile) 2>&5
15597 echo "$as_me:15597: \$? = $ac_status" >&5
15598 (exit $ac_status); } &&
15599 { ac_try='test -s conftest.$ac_objext'
15600 { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit $ac_status); }; }; then
15607 echo "$as_me: failed program was:" >&5
15608 cat conftest.$ac_ext >&5
15611 rm -f conftest.$ac_objext conftest.$ac_ext
15612 echo "$as_me:15612: result: $cf_result" >&5
15613 echo "${ECHO_T}$cf_result" >&6
15614 if test $cf_result = yes ; then
15616 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15618 cat >>confdefs.h <<EOF
15619 #define $cf_result 1
15624 cat >>confdefs.h <<EOF
15625 #define attr_t long
15630 if test "$cf_enable_widec" = yes; then
15632 # This is needed on Tru64 5.0 to declare mbstate_t
15633 echo "$as_me:15633: checking if we must include wchar.h to declare mbstate_t" >&5
15634 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15635 if test "${cf_cv_mbstate_t+set}" = set; then
15636 echo $ECHO_N "(cached) $ECHO_C" >&6
15639 cat >conftest.$ac_ext <<_ACEOF
15640 #line 15640 "configure"
15641 #include "confdefs.h"
15643 #include <stdlib.h>
15644 #include <stdarg.h>
15646 #ifdef HAVE_LIBUTF8_H
15647 #include <libutf8.h>
15657 rm -f conftest.$ac_objext
15658 if { (eval echo "$as_me:15658: \"$ac_compile\"") >&5
15659 (eval $ac_compile) 2>&5
15661 echo "$as_me:15661: \$? = $ac_status" >&5
15662 (exit $ac_status); } &&
15663 { ac_try='test -s conftest.$ac_objext'
15664 { (eval echo "$as_me:15664: \"$ac_try\"") >&5
15665 (eval $ac_try) 2>&5
15667 echo "$as_me:15667: \$? = $ac_status" >&5
15668 (exit $ac_status); }; }; then
15671 echo "$as_me: failed program was:" >&5
15672 cat conftest.$ac_ext >&5
15673 cat >conftest.$ac_ext <<_ACEOF
15674 #line 15674 "configure"
15675 #include "confdefs.h"
15677 #include <stdlib.h>
15678 #include <stdarg.h>
15681 #ifdef HAVE_LIBUTF8_H
15682 #include <libutf8.h>
15692 rm -f conftest.$ac_objext
15693 if { (eval echo "$as_me:15693: \"$ac_compile\"") >&5
15694 (eval $ac_compile) 2>&5
15696 echo "$as_me:15696: \$? = $ac_status" >&5
15697 (exit $ac_status); } &&
15698 { ac_try='test -s conftest.$ac_objext'
15699 { (eval echo "$as_me:15699: \"$ac_try\"") >&5
15700 (eval $ac_try) 2>&5
15702 echo "$as_me:15702: \$? = $ac_status" >&5
15703 (exit $ac_status); }; }; then
15704 cf_cv_mbstate_t=yes
15706 echo "$as_me: failed program was:" >&5
15707 cat conftest.$ac_ext >&5
15708 cf_cv_mbstate_t=unknown
15710 rm -f conftest.$ac_objext conftest.$ac_ext
15712 rm -f conftest.$ac_objext conftest.$ac_ext
15714 echo "$as_me:15714: result: $cf_cv_mbstate_t" >&5
15715 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15717 if test "$cf_cv_mbstate_t" = yes ; then
15719 cat >>confdefs.h <<\EOF
15720 #define NEED_WCHAR_H 1
15726 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15727 if test "$cf_cv_mbstate_t" = unknown ; then
15728 NCURSES_MBSTATE_T=1
15731 # if we find mbstate_t in either place, use substitution to provide a fallback.
15732 if test "$cf_cv_mbstate_t" != unknown ; then
15733 NCURSES_OK_MBSTATE_T=1
15736 # This is needed on Tru64 5.0 to declare wchar_t
15737 echo "$as_me:15737: checking if we must include wchar.h to declare wchar_t" >&5
15738 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15739 if test "${cf_cv_wchar_t+set}" = set; then
15740 echo $ECHO_N "(cached) $ECHO_C" >&6
15743 cat >conftest.$ac_ext <<_ACEOF
15744 #line 15744 "configure"
15745 #include "confdefs.h"
15747 #include <stdlib.h>
15748 #include <stdarg.h>
15750 #ifdef HAVE_LIBUTF8_H
15751 #include <libutf8.h>
15761 rm -f conftest.$ac_objext
15762 if { (eval echo "$as_me:15762: \"$ac_compile\"") >&5
15763 (eval $ac_compile) 2>&5
15765 echo "$as_me:15765: \$? = $ac_status" >&5
15766 (exit $ac_status); } &&
15767 { ac_try='test -s conftest.$ac_objext'
15768 { (eval echo "$as_me:15768: \"$ac_try\"") >&5
15769 (eval $ac_try) 2>&5
15771 echo "$as_me:15771: \$? = $ac_status" >&5
15772 (exit $ac_status); }; }; then
15775 echo "$as_me: failed program was:" >&5
15776 cat conftest.$ac_ext >&5
15777 cat >conftest.$ac_ext <<_ACEOF
15778 #line 15778 "configure"
15779 #include "confdefs.h"
15781 #include <stdlib.h>
15782 #include <stdarg.h>
15785 #ifdef HAVE_LIBUTF8_H
15786 #include <libutf8.h>
15796 rm -f conftest.$ac_objext
15797 if { (eval echo "$as_me:15797: \"$ac_compile\"") >&5
15798 (eval $ac_compile) 2>&5
15800 echo "$as_me:15800: \$? = $ac_status" >&5
15801 (exit $ac_status); } &&
15802 { ac_try='test -s conftest.$ac_objext'
15803 { (eval echo "$as_me:15803: \"$ac_try\"") >&5
15804 (eval $ac_try) 2>&5
15806 echo "$as_me:15806: \$? = $ac_status" >&5
15807 (exit $ac_status); }; }; then
15810 echo "$as_me: failed program was:" >&5
15811 cat conftest.$ac_ext >&5
15812 cf_cv_wchar_t=unknown
15814 rm -f conftest.$ac_objext conftest.$ac_ext
15816 rm -f conftest.$ac_objext conftest.$ac_ext
15818 echo "$as_me:15818: result: $cf_cv_wchar_t" >&5
15819 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15821 if test "$cf_cv_wchar_t" = yes ; then
15823 cat >>confdefs.h <<\EOF
15824 #define NEED_WCHAR_H 1
15830 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15831 if test "$cf_cv_wchar_t" = unknown ; then
15835 # if we find wchar_t in either place, use substitution to provide a fallback.
15836 if test "$cf_cv_wchar_t" != unknown ; then
15837 NCURSES_OK_WCHAR_T=1
15840 # This is needed on Tru64 5.0 to declare wint_t
15841 echo "$as_me:15841: checking if we must include wchar.h to declare wint_t" >&5
15842 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15843 if test "${cf_cv_wint_t+set}" = set; then
15844 echo $ECHO_N "(cached) $ECHO_C" >&6
15847 cat >conftest.$ac_ext <<_ACEOF
15848 #line 15848 "configure"
15849 #include "confdefs.h"
15851 #include <stdlib.h>
15852 #include <stdarg.h>
15854 #ifdef HAVE_LIBUTF8_H
15855 #include <libutf8.h>
15865 rm -f conftest.$ac_objext
15866 if { (eval echo "$as_me:15866: \"$ac_compile\"") >&5
15867 (eval $ac_compile) 2>&5
15869 echo "$as_me:15869: \$? = $ac_status" >&5
15870 (exit $ac_status); } &&
15871 { ac_try='test -s conftest.$ac_objext'
15872 { (eval echo "$as_me:15872: \"$ac_try\"") >&5
15873 (eval $ac_try) 2>&5
15875 echo "$as_me:15875: \$? = $ac_status" >&5
15876 (exit $ac_status); }; }; then
15879 echo "$as_me: failed program was:" >&5
15880 cat conftest.$ac_ext >&5
15881 cat >conftest.$ac_ext <<_ACEOF
15882 #line 15882 "configure"
15883 #include "confdefs.h"
15885 #include <stdlib.h>
15886 #include <stdarg.h>
15889 #ifdef HAVE_LIBUTF8_H
15890 #include <libutf8.h>
15900 rm -f conftest.$ac_objext
15901 if { (eval echo "$as_me:15901: \"$ac_compile\"") >&5
15902 (eval $ac_compile) 2>&5
15904 echo "$as_me:15904: \$? = $ac_status" >&5
15905 (exit $ac_status); } &&
15906 { ac_try='test -s conftest.$ac_objext'
15907 { (eval echo "$as_me:15907: \"$ac_try\"") >&5
15908 (eval $ac_try) 2>&5
15910 echo "$as_me:15910: \$? = $ac_status" >&5
15911 (exit $ac_status); }; }; then
15914 echo "$as_me: failed program was:" >&5
15915 cat conftest.$ac_ext >&5
15916 cf_cv_wint_t=unknown
15918 rm -f conftest.$ac_objext conftest.$ac_ext
15920 rm -f conftest.$ac_objext conftest.$ac_ext
15922 echo "$as_me:15922: result: $cf_cv_wint_t" >&5
15923 echo "${ECHO_T}$cf_cv_wint_t" >&6
15925 if test "$cf_cv_wint_t" = yes ; then
15927 cat >>confdefs.h <<\EOF
15928 #define NEED_WCHAR_H 1
15934 # if we do not find wint_t in either place, use substitution to provide a fallback.
15935 if test "$cf_cv_wint_t" = unknown ; then
15939 # if we find wint_t in either place, use substitution to provide a fallback.
15940 if test "$cf_cv_wint_t" != unknown ; then
15941 NCURSES_OK_WINT_T=1
15944 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15946 echo "$as_me:15946: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15947 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15948 cat >conftest.$ac_ext <<_ACEOF
15949 #line 15949 "configure"
15950 #include "confdefs.h"
15952 #ifndef _XOPEN_SOURCE_EXTENDED
15953 #define _XOPEN_SOURCE_EXTENDED
15955 #include <${cf_cv_ncurses_header:-curses.h}>
15966 rm -f conftest.$ac_objext
15967 if { (eval echo "$as_me:15967: \"$ac_compile\"") >&5
15968 (eval $ac_compile) 2>&5
15970 echo "$as_me:15970: \$? = $ac_status" >&5
15971 (exit $ac_status); } &&
15972 { ac_try='test -s conftest.$ac_objext'
15973 { (eval echo "$as_me:15973: \"$ac_try\"") >&5
15974 (eval $ac_try) 2>&5
15976 echo "$as_me:15976: \$? = $ac_status" >&5
15977 (exit $ac_status); }; }; then
15980 echo "$as_me: failed program was:" >&5
15981 cat conftest.$ac_ext >&5
15984 rm -f conftest.$ac_objext conftest.$ac_ext
15985 echo "$as_me:15985: result: $cf_result" >&5
15986 echo "${ECHO_T}$cf_result" >&6
15987 if test $cf_result = yes ; then
15989 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15991 cat >>confdefs.h <<EOF
15992 #define $cf_result 1
15997 cat >>confdefs.h <<EOF
15998 #define mbstate_t long
16005 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16007 echo "$as_me:16007: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16008 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16009 cat >conftest.$ac_ext <<_ACEOF
16010 #line 16010 "configure"
16011 #include "confdefs.h"
16013 #ifndef _XOPEN_SOURCE_EXTENDED
16014 #define _XOPEN_SOURCE_EXTENDED
16016 #include <${cf_cv_ncurses_header:-curses.h}>
16027 rm -f conftest.$ac_objext
16028 if { (eval echo "$as_me:16028: \"$ac_compile\"") >&5
16029 (eval $ac_compile) 2>&5
16031 echo "$as_me:16031: \$? = $ac_status" >&5
16032 (exit $ac_status); } &&
16033 { ac_try='test -s conftest.$ac_objext'
16034 { (eval echo "$as_me:16034: \"$ac_try\"") >&5
16035 (eval $ac_try) 2>&5
16037 echo "$as_me:16037: \$? = $ac_status" >&5
16038 (exit $ac_status); }; }; then
16041 echo "$as_me: failed program was:" >&5
16042 cat conftest.$ac_ext >&5
16045 rm -f conftest.$ac_objext conftest.$ac_ext
16046 echo "$as_me:16046: result: $cf_result" >&5
16047 echo "${ECHO_T}$cf_result" >&6
16048 if test $cf_result = yes ; then
16050 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16052 cat >>confdefs.h <<EOF
16053 #define $cf_result 1
16058 cat >>confdefs.h <<EOF
16059 #define wchar_t long
16066 if test "$NCURSES_OK_WINT_T" = 0 ; then
16068 echo "$as_me:16068: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16069 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16070 cat >conftest.$ac_ext <<_ACEOF
16071 #line 16071 "configure"
16072 #include "confdefs.h"
16074 #ifndef _XOPEN_SOURCE_EXTENDED
16075 #define _XOPEN_SOURCE_EXTENDED
16077 #include <${cf_cv_ncurses_header:-curses.h}>
16088 rm -f conftest.$ac_objext
16089 if { (eval echo "$as_me:16089: \"$ac_compile\"") >&5
16090 (eval $ac_compile) 2>&5
16092 echo "$as_me:16092: \$? = $ac_status" >&5
16093 (exit $ac_status); } &&
16094 { ac_try='test -s conftest.$ac_objext'
16095 { (eval echo "$as_me:16095: \"$ac_try\"") >&5
16096 (eval $ac_try) 2>&5
16098 echo "$as_me:16098: \$? = $ac_status" >&5
16099 (exit $ac_status); }; }; then
16102 echo "$as_me: failed program was:" >&5
16103 cat conftest.$ac_ext >&5
16106 rm -f conftest.$ac_objext conftest.$ac_ext
16107 echo "$as_me:16107: result: $cf_result" >&5
16108 echo "${ECHO_T}$cf_result" >&6
16109 if test $cf_result = yes ; then
16111 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16113 cat >>confdefs.h <<EOF
16114 #define $cf_result 1
16119 cat >>confdefs.h <<EOF
16120 #define wint_t long
16128 echo "$as_me:16128: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16129 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16131 cat >conftest.$ac_ext <<_ACEOF
16132 #line 16132 "configure"
16133 #include "confdefs.h"
16135 #ifdef HAVE_XCURSES
16136 #include <xcurses.h>
16137 char * XCursesProgramName = "test";
16139 #include <${cf_cv_ncurses_header:-curses.h}>
16140 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16141 #include <ncursesw/term.h>
16142 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16143 #include <ncurses/term.h>
16144 #elif defined(HAVE_TERM_H)
16153 void *foo = &(ospeed)
16159 rm -f conftest.$ac_objext
16160 if { (eval echo "$as_me:16160: \"$ac_compile\"") >&5
16161 (eval $ac_compile) 2>&5
16163 echo "$as_me:16163: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
16165 { ac_try='test -s conftest.$ac_objext'
16166 { (eval echo "$as_me:16166: \"$ac_try\"") >&5
16167 (eval $ac_try) 2>&5
16169 echo "$as_me:16169: \$? = $ac_status" >&5
16170 (exit $ac_status); }; }; then
16173 echo "$as_me: failed program was:" >&5
16174 cat conftest.$ac_ext >&5
16177 rm -f conftest.$ac_objext conftest.$ac_ext
16178 echo "$as_me:16178: result: $cf_result" >&5
16179 echo "${ECHO_T}$cf_result" >&6
16181 if test $cf_result = yes ; then
16183 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16185 cat >>confdefs.h <<EOF
16186 #define $cf_result 1
16190 echo "$as_me:16190: checking for data ospeed in library" >&5
16191 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16192 # BSD linkers insist on making weak linkage, but resolve at runtime.
16193 if test "$cross_compiling" = yes; then
16196 cat >conftest.$ac_ext <<_ACEOF
16197 #line 16197 "configure"
16198 #include "confdefs.h"
16200 #ifdef HAVE_XCURSES
16201 #include <xcurses.h>
16202 char * XCursesProgramName = "test";
16204 #include <${cf_cv_ncurses_header:-curses.h}>
16205 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16206 #include <ncursesw/term.h>
16207 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16208 #include <ncurses/term.h>
16209 #elif defined(HAVE_TERM_H)
16214 extern char ospeed;
16220 void *foo = &(ospeed);
16221 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16222 ${cf_cv_main_return:-return}(foo == 0);
16229 rm -f conftest.$ac_objext conftest$ac_exeext
16230 if { (eval echo "$as_me:16230: \"$ac_link\"") >&5
16231 (eval $ac_link) 2>&5
16233 echo "$as_me:16233: \$? = $ac_status" >&5
16234 (exit $ac_status); } &&
16235 { ac_try='test -s conftest$ac_exeext'
16236 { (eval echo "$as_me:16236: \"$ac_try\"") >&5
16237 (eval $ac_try) 2>&5
16239 echo "$as_me:16239: \$? = $ac_status" >&5
16240 (exit $ac_status); }; }; then
16243 echo "$as_me: failed program was:" >&5
16244 cat conftest.$ac_ext >&5
16247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16250 cat >conftest.$ac_ext <<_ACEOF
16251 #line 16251 "configure"
16252 #include "confdefs.h"
16254 #ifdef HAVE_XCURSES
16255 #include <xcurses.h>
16256 char * XCursesProgramName = "test";
16258 #include <${cf_cv_ncurses_header:-curses.h}>
16259 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16260 #include <ncursesw/term.h>
16261 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16262 #include <ncurses/term.h>
16263 #elif defined(HAVE_TERM_H)
16268 extern char ospeed;
16271 void *foo = &(ospeed);
16272 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16273 ${cf_cv_main_return:-return}(foo == 0);
16276 rm -f conftest$ac_exeext
16277 if { (eval echo "$as_me:16277: \"$ac_link\"") >&5
16278 (eval $ac_link) 2>&5
16280 echo "$as_me:16280: \$? = $ac_status" >&5
16281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16282 { (eval echo "$as_me:16282: \"$ac_try\"") >&5
16283 (eval $ac_try) 2>&5
16285 echo "$as_me:16285: \$? = $ac_status" >&5
16286 (exit $ac_status); }; }; then
16289 echo "$as_me: program exited with status $ac_status" >&5
16290 echo "$as_me: failed program was:" >&5
16291 cat conftest.$ac_ext >&5
16294 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16296 echo "$as_me:16296: result: $cf_result" >&5
16297 echo "${ECHO_T}$cf_result" >&6
16298 if test $cf_result = yes ; then
16300 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16302 cat >>confdefs.h <<EOF
16303 #define $cf_result 1
16309 echo "$as_me:16309: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16310 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16312 cat >conftest.$ac_ext <<_ACEOF
16313 #line 16313 "configure"
16314 #include "confdefs.h"
16316 #ifdef HAVE_XCURSES
16317 #include <xcurses.h>
16318 char * XCursesProgramName = "test";
16320 #include <${cf_cv_ncurses_header:-curses.h}>
16321 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16322 #include <ncursesw/term.h>
16323 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16324 #include <ncurses/term.h>
16325 #elif defined(HAVE_TERM_H)
16334 void *foo = &(boolnames)
16340 rm -f conftest.$ac_objext
16341 if { (eval echo "$as_me:16341: \"$ac_compile\"") >&5
16342 (eval $ac_compile) 2>&5
16344 echo "$as_me:16344: \$? = $ac_status" >&5
16345 (exit $ac_status); } &&
16346 { ac_try='test -s conftest.$ac_objext'
16347 { (eval echo "$as_me:16347: \"$ac_try\"") >&5
16348 (eval $ac_try) 2>&5
16350 echo "$as_me:16350: \$? = $ac_status" >&5
16351 (exit $ac_status); }; }; then
16354 echo "$as_me: failed program was:" >&5
16355 cat conftest.$ac_ext >&5
16358 rm -f conftest.$ac_objext conftest.$ac_ext
16359 echo "$as_me:16359: result: $cf_result" >&5
16360 echo "${ECHO_T}$cf_result" >&6
16362 if test $cf_result = yes ; then
16364 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16366 cat >>confdefs.h <<EOF
16367 #define $cf_result 1
16371 echo "$as_me:16371: checking for data boolnames in library" >&5
16372 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16373 # BSD linkers insist on making weak linkage, but resolve at runtime.
16374 if test "$cross_compiling" = yes; then
16377 cat >conftest.$ac_ext <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16381 #ifdef HAVE_XCURSES
16382 #include <xcurses.h>
16383 char * XCursesProgramName = "test";
16385 #include <${cf_cv_ncurses_header:-curses.h}>
16386 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16387 #include <ncursesw/term.h>
16388 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16389 #include <ncurses/term.h>
16390 #elif defined(HAVE_TERM_H)
16395 extern char boolnames;
16401 void *foo = &(boolnames);
16402 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16403 ${cf_cv_main_return:-return}(foo == 0);
16410 rm -f conftest.$ac_objext conftest$ac_exeext
16411 if { (eval echo "$as_me:16411: \"$ac_link\"") >&5
16412 (eval $ac_link) 2>&5
16414 echo "$as_me:16414: \$? = $ac_status" >&5
16415 (exit $ac_status); } &&
16416 { ac_try='test -s conftest$ac_exeext'
16417 { (eval echo "$as_me:16417: \"$ac_try\"") >&5
16418 (eval $ac_try) 2>&5
16420 echo "$as_me:16420: \$? = $ac_status" >&5
16421 (exit $ac_status); }; }; then
16424 echo "$as_me: failed program was:" >&5
16425 cat conftest.$ac_ext >&5
16428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16431 cat >conftest.$ac_ext <<_ACEOF
16432 #line 16432 "configure"
16433 #include "confdefs.h"
16435 #ifdef HAVE_XCURSES
16436 #include <xcurses.h>
16437 char * XCursesProgramName = "test";
16439 #include <${cf_cv_ncurses_header:-curses.h}>
16440 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16441 #include <ncursesw/term.h>
16442 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16443 #include <ncurses/term.h>
16444 #elif defined(HAVE_TERM_H)
16449 extern char boolnames;
16452 void *foo = &(boolnames);
16453 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16454 ${cf_cv_main_return:-return}(foo == 0);
16457 rm -f conftest$ac_exeext
16458 if { (eval echo "$as_me:16458: \"$ac_link\"") >&5
16459 (eval $ac_link) 2>&5
16461 echo "$as_me:16461: \$? = $ac_status" >&5
16462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16463 { (eval echo "$as_me:16463: \"$ac_try\"") >&5
16464 (eval $ac_try) 2>&5
16466 echo "$as_me:16466: \$? = $ac_status" >&5
16467 (exit $ac_status); }; }; then
16470 echo "$as_me: program exited with status $ac_status" >&5
16471 echo "$as_me: failed program was:" >&5
16472 cat conftest.$ac_ext >&5
16475 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16477 echo "$as_me:16477: result: $cf_result" >&5
16478 echo "${ECHO_T}$cf_result" >&6
16479 if test $cf_result = yes ; then
16481 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16483 cat >>confdefs.h <<EOF
16484 #define $cf_result 1
16490 echo "$as_me:16490: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16491 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16493 cat >conftest.$ac_ext <<_ACEOF
16494 #line 16494 "configure"
16495 #include "confdefs.h"
16497 #ifdef HAVE_XCURSES
16498 #include <xcurses.h>
16499 char * XCursesProgramName = "test";
16501 #include <${cf_cv_ncurses_header:-curses.h}>
16502 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16503 #include <ncursesw/term.h>
16504 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16505 #include <ncurses/term.h>
16506 #elif defined(HAVE_TERM_H)
16515 void *foo = &(boolfnames)
16521 rm -f conftest.$ac_objext
16522 if { (eval echo "$as_me:16522: \"$ac_compile\"") >&5
16523 (eval $ac_compile) 2>&5
16525 echo "$as_me:16525: \$? = $ac_status" >&5
16526 (exit $ac_status); } &&
16527 { ac_try='test -s conftest.$ac_objext'
16528 { (eval echo "$as_me:16528: \"$ac_try\"") >&5
16529 (eval $ac_try) 2>&5
16531 echo "$as_me:16531: \$? = $ac_status" >&5
16532 (exit $ac_status); }; }; then
16535 echo "$as_me: failed program was:" >&5
16536 cat conftest.$ac_ext >&5
16539 rm -f conftest.$ac_objext conftest.$ac_ext
16540 echo "$as_me:16540: result: $cf_result" >&5
16541 echo "${ECHO_T}$cf_result" >&6
16543 if test $cf_result = yes ; then
16545 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16547 cat >>confdefs.h <<EOF
16548 #define $cf_result 1
16552 echo "$as_me:16552: checking for data boolfnames in library" >&5
16553 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16554 # BSD linkers insist on making weak linkage, but resolve at runtime.
16555 if test "$cross_compiling" = yes; then
16558 cat >conftest.$ac_ext <<_ACEOF
16559 #line 16559 "configure"
16560 #include "confdefs.h"
16562 #ifdef HAVE_XCURSES
16563 #include <xcurses.h>
16564 char * XCursesProgramName = "test";
16566 #include <${cf_cv_ncurses_header:-curses.h}>
16567 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16568 #include <ncursesw/term.h>
16569 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16570 #include <ncurses/term.h>
16571 #elif defined(HAVE_TERM_H)
16576 extern char boolfnames;
16582 void *foo = &(boolfnames);
16583 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16584 ${cf_cv_main_return:-return}(foo == 0);
16591 rm -f conftest.$ac_objext conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593 (eval $ac_link) 2>&5
16595 echo "$as_me:16595: \$? = $ac_status" >&5
16596 (exit $ac_status); } &&
16597 { ac_try='test -s conftest$ac_exeext'
16598 { (eval echo "$as_me:16598: \"$ac_try\"") >&5
16599 (eval $ac_try) 2>&5
16601 echo "$as_me:16601: \$? = $ac_status" >&5
16602 (exit $ac_status); }; }; then
16605 echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16612 cat >conftest.$ac_ext <<_ACEOF
16613 #line 16613 "configure"
16614 #include "confdefs.h"
16616 #ifdef HAVE_XCURSES
16617 #include <xcurses.h>
16618 char * XCursesProgramName = "test";
16620 #include <${cf_cv_ncurses_header:-curses.h}>
16621 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16622 #include <ncursesw/term.h>
16623 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16624 #include <ncurses/term.h>
16625 #elif defined(HAVE_TERM_H)
16630 extern char boolfnames;
16633 void *foo = &(boolfnames);
16634 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16635 ${cf_cv_main_return:-return}(foo == 0);
16638 rm -f conftest$ac_exeext
16639 if { (eval echo "$as_me:16639: \"$ac_link\"") >&5
16640 (eval $ac_link) 2>&5
16642 echo "$as_me:16642: \$? = $ac_status" >&5
16643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16644 { (eval echo "$as_me:16644: \"$ac_try\"") >&5
16645 (eval $ac_try) 2>&5
16647 echo "$as_me:16647: \$? = $ac_status" >&5
16648 (exit $ac_status); }; }; then
16651 echo "$as_me: program exited with status $ac_status" >&5
16652 echo "$as_me: failed program was:" >&5
16653 cat conftest.$ac_ext >&5
16656 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16658 echo "$as_me:16658: result: $cf_result" >&5
16659 echo "${ECHO_T}$cf_result" >&6
16660 if test $cf_result = yes ; then
16662 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16664 cat >>confdefs.h <<EOF
16665 #define $cf_result 1
16671 if ( test "$GCC" = yes || test "$GXX" = yes )
16673 echo "$as_me:16673: checking if you want to turn on gcc warnings" >&5
16674 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16676 # Check whether --enable-warnings or --disable-warnings was given.
16677 if test "${enable_warnings+set}" = set; then
16678 enableval="$enable_warnings"
16679 test "$enableval" != yes && enableval=no
16680 if test "$enableval" != "no" ; then
16690 echo "$as_me:16690: result: $with_warnings" >&5
16691 echo "${ECHO_T}$with_warnings" >&6
16692 if test "$with_warnings" = "yes"
16695 if test "$GCC" = yes
16697 cat > conftest.i <<EOF
16699 #define GCC_PRINTF 0
16702 #define GCC_SCANF 0
16704 #ifndef GCC_NORETURN
16705 #define GCC_NORETURN /* nothing */
16708 #define GCC_UNUSED /* nothing */
16711 if test "$GCC" = yes
16713 { echo "$as_me:16713: checking for $CC __attribute__ directives..." >&5
16714 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16715 cat > conftest.$ac_ext <<EOF
16716 #line 16716 "${as_me:-configure}"
16717 #include "confdefs.h"
16718 #include "conftest.h"
16719 #include "conftest.i"
16721 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16723 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16726 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16728 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16730 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16731 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16732 extern void foo(void) GCC_NORETURN;
16733 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16735 cf_printf_attribute=no
16736 cf_scanf_attribute=no
16737 for cf_attribute in scanf printf unused noreturn
16740 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16742 cf_directive="__attribute__(($cf_attribute))"
16743 echo "checking for $CC $cf_directive" 1>&5
16745 case $cf_attribute in
16747 cf_printf_attribute=yes
16748 cat >conftest.h <<EOF
16749 #define GCC_$cf_ATTRIBUTE 1
16753 cf_scanf_attribute=yes
16754 cat >conftest.h <<EOF
16755 #define GCC_$cf_ATTRIBUTE 1
16759 cat >conftest.h <<EOF
16760 #define GCC_$cf_ATTRIBUTE $cf_directive
16765 if { (eval echo "$as_me:16765: \"$ac_compile\"") >&5
16766 (eval $ac_compile) 2>&5
16768 echo "$as_me:16768: \$? = $ac_status" >&5
16769 (exit $ac_status); }; then
16770 test -n "$verbose" && echo "$as_me:16770: result: ... $cf_attribute" >&5
16771 echo "${ECHO_T}... $cf_attribute" >&6
16772 cat conftest.h >>confdefs.h
16773 case $cf_attribute in
16776 cat >>confdefs.h <<EOF
16777 #define GCC_NORETURN $cf_directive
16782 cf_value='/* nothing */'
16783 if test "$cf_printf_attribute" != no ; then
16784 cf_value='__attribute__((format(printf,fmt,var)))'
16786 cat >>confdefs.h <<\EOF
16787 #define GCC_PRINTF 1
16792 cat >>confdefs.h <<EOF
16793 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16798 cf_value='/* nothing */'
16799 if test "$cf_scanf_attribute" != no ; then
16800 cf_value='__attribute__((format(scanf,fmt,var)))'
16802 cat >>confdefs.h <<\EOF
16803 #define GCC_SCANF 1
16808 cat >>confdefs.h <<EOF
16809 #define GCC_SCANFLIKE(fmt,var) $cf_value
16815 cat >>confdefs.h <<EOF
16816 #define GCC_UNUSED $cf_directive
16824 fgrep define conftest.i >>confdefs.h
16831 if test "$GCC" = yes ; then
16834 echo "$as_me:16834: checking if this is really Intel C compiler" >&5
16835 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
16836 cf_save_CFLAGS="$CFLAGS"
16837 CFLAGS="$CFLAGS -no-gcc"
16838 cat >conftest.$ac_ext <<_ACEOF
16839 #line 16839 "configure"
16840 #include "confdefs.h"
16846 #ifdef __INTEL_COMPILER
16855 rm -f conftest.$ac_objext
16856 if { (eval echo "$as_me:16856: \"$ac_compile\"") >&5
16857 (eval $ac_compile) 2>&5
16859 echo "$as_me:16859: \$? = $ac_status" >&5
16860 (exit $ac_status); } &&
16861 { ac_try='test -s conftest.$ac_objext'
16862 { (eval echo "$as_me:16862: \"$ac_try\"") >&5
16863 (eval $ac_try) 2>&5
16865 echo "$as_me:16865: \$? = $ac_status" >&5
16866 (exit $ac_status); }; }; then
16868 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16871 echo "$as_me: failed program was:" >&5
16872 cat conftest.$ac_ext >&5
16874 rm -f conftest.$ac_objext conftest.$ac_ext
16875 CFLAGS="$cf_save_CFLAGS"
16876 echo "$as_me:16876: result: $INTEL_COMPILER" >&5
16877 echo "${ECHO_T}$INTEL_COMPILER" >&6
16884 if test "$GCC" = yes ; then
16885 echo "$as_me:16885: checking if this is really Clang C compiler" >&5
16886 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
16887 cf_save_CFLAGS="$CFLAGS"
16888 CFLAGS="$CFLAGS -Qunused-arguments"
16889 cat >conftest.$ac_ext <<_ACEOF
16890 #line 16890 "configure"
16891 #include "confdefs.h"
16906 rm -f conftest.$ac_objext
16907 if { (eval echo "$as_me:16907: \"$ac_compile\"") >&5
16908 (eval $ac_compile) 2>&5
16910 echo "$as_me:16910: \$? = $ac_status" >&5
16911 (exit $ac_status); } &&
16912 { ac_try='test -s conftest.$ac_objext'
16913 { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914 (eval $ac_try) 2>&5
16916 echo "$as_me:16916: \$? = $ac_status" >&5
16917 (exit $ac_status); }; }; then
16919 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16922 echo "$as_me: failed program was:" >&5
16923 cat conftest.$ac_ext >&5
16925 rm -f conftest.$ac_objext conftest.$ac_ext
16926 CFLAGS="$cf_save_CFLAGS"
16927 echo "$as_me:16927: result: $CLANG_COMPILER" >&5
16928 echo "${ECHO_T}$CLANG_COMPILER" >&6
16931 cat > conftest.$ac_ext <<EOF
16932 #line 16932 "${as_me:-configure}"
16933 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16936 if test "$INTEL_COMPILER" = yes
16938 # The "-wdXXX" options suppress warnings:
16939 # remark #1419: external declaration in primary source file
16940 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16941 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16942 # remark #193: zero used for undefined preprocessing identifier
16943 # remark #593: variable "curs_sb_left_arrow" was set but never used
16944 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16945 # remark #869: parameter "tw" was never referenced
16946 # remark #981: operands are evaluated in unspecified order
16947 # warning #279: controlling expression is constant
16949 { echo "$as_me:16949: checking for $CC warning options..." >&5
16950 echo "$as_me: checking for $CC warning options..." >&6;}
16951 cf_save_CFLAGS="$CFLAGS"
16952 EXTRA_CFLAGS="-Wall"
16964 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16965 if { (eval echo "$as_me:16965: \"$ac_compile\"") >&5
16966 (eval $ac_compile) 2>&5
16968 echo "$as_me:16968: \$? = $ac_status" >&5
16969 (exit $ac_status); }; then
16970 test -n "$verbose" && echo "$as_me:16970: result: ... -$cf_opt" >&5
16971 echo "${ECHO_T}... -$cf_opt" >&6
16972 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16975 CFLAGS="$cf_save_CFLAGS"
16977 elif test "$GCC" = yes
16979 { echo "$as_me:16979: checking for $CC warning options..." >&5
16980 echo "$as_me: checking for $CC warning options..." >&6;}
16981 cf_save_CFLAGS="$CFLAGS"
16984 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16985 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16986 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16987 for cf_opt in W Wall \
16988 Wbad-function-cast \
16991 Wdeclaration-after-statement \
16994 Wmissing-declarations \
16995 Wmissing-prototypes \
16999 Wstrict-prototypes \
17000 Wundef $cf_gcc_warnings $cf_warn_CONST
17002 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17003 if { (eval echo "$as_me:17003: \"$ac_compile\"") >&5
17004 (eval $ac_compile) 2>&5
17006 echo "$as_me:17006: \$? = $ac_status" >&5
17007 (exit $ac_status); }; then
17008 test -n "$verbose" && echo "$as_me:17008: result: ... -$cf_opt" >&5
17009 echo "${ECHO_T}... -$cf_opt" >&6
17012 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17015 case $GCC_VERSION in
17017 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17019 echo "${as_me:-configure}:17019: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17025 case $GCC_VERSION in
17027 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17029 echo "${as_me:-configure}:17029: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17035 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17038 CFLAGS="$cf_save_CFLAGS"
17045 echo "$as_me:17045: checking if you want to use dmalloc for testing" >&5
17046 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17048 # Check whether --with-dmalloc or --without-dmalloc was given.
17049 if test "${with_dmalloc+set}" = set; then
17050 withval="$with_dmalloc"
17052 cat >>confdefs.h <<EOF
17053 #define USE_DMALLOC 1
17056 : ${with_cflags:=-g}
17057 : ${with_no_leaks:=yes}
17062 echo "$as_me:17062: result: ${with_dmalloc:-no}" >&5
17063 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17065 case .$with_cflags in
17075 cf_new_extra_cppflags=
17077 for cf_add_cflags in -g
17079 case $cf_fix_cppflags in
17081 case $cf_add_cflags in
17082 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17083 case $cf_add_cflags in
17085 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17087 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17088 && test -z "${cf_tst_cflags}" \
17089 && cf_fix_cppflags=yes
17091 if test $cf_fix_cppflags = yes ; then
17092 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17094 elif test "${cf_tst_cflags}" = "\"'" ; then
17095 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17100 case "$CPPFLAGS" in
17104 case $cf_add_cflags in
17106 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17108 CPPFLAGS=`echo "$CPPFLAGS" | \
17109 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17110 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17114 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17119 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17124 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17126 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17128 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17129 && test -z "${cf_tst_cflags}" \
17130 && cf_fix_cppflags=no
17135 if test -n "$cf_new_cflags" ; then
17137 CFLAGS="$CFLAGS $cf_new_cflags"
17140 if test -n "$cf_new_cppflags" ; then
17142 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17145 if test -n "$cf_new_extra_cppflags" ; then
17147 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17155 if test "$with_dmalloc" = yes ; then
17156 echo "$as_me:17156: checking for dmalloc.h" >&5
17157 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17158 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17159 echo $ECHO_N "(cached) $ECHO_C" >&6
17161 cat >conftest.$ac_ext <<_ACEOF
17162 #line 17162 "configure"
17163 #include "confdefs.h"
17164 #include <dmalloc.h>
17166 if { (eval echo "$as_me:17166: \"$ac_cpp conftest.$ac_ext\"") >&5
17167 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17169 egrep -v '^ *\+' conftest.er1 >conftest.err
17171 cat conftest.err >&5
17172 echo "$as_me:17172: \$? = $ac_status" >&5
17173 (exit $ac_status); } >/dev/null; then
17174 if test -s conftest.err; then
17175 ac_cpp_err=$ac_c_preproc_warn_flag
17182 if test -z "$ac_cpp_err"; then
17183 ac_cv_header_dmalloc_h=yes
17185 echo "$as_me: failed program was:" >&5
17186 cat conftest.$ac_ext >&5
17187 ac_cv_header_dmalloc_h=no
17189 rm -f conftest.err conftest.$ac_ext
17191 echo "$as_me:17191: result: $ac_cv_header_dmalloc_h" >&5
17192 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17193 if test $ac_cv_header_dmalloc_h = yes; then
17195 echo "$as_me:17195: checking for dmalloc_debug in -ldmalloc" >&5
17196 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17197 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17198 echo $ECHO_N "(cached) $ECHO_C" >&6
17200 ac_check_lib_save_LIBS=$LIBS
17201 LIBS="-ldmalloc $LIBS"
17202 cat >conftest.$ac_ext <<_ACEOF
17203 #line 17203 "configure"
17204 #include "confdefs.h"
17206 /* Override any gcc2 internal prototype to avoid an error. */
17210 /* We use char because int might match the return type of a gcc2
17211 builtin and then its argument prototype would still apply. */
17212 char dmalloc_debug ();
17221 rm -f conftest.$ac_objext conftest$ac_exeext
17222 if { (eval echo "$as_me:17222: \"$ac_link\"") >&5
17223 (eval $ac_link) 2>&5
17225 echo "$as_me:17225: \$? = $ac_status" >&5
17226 (exit $ac_status); } &&
17227 { ac_try='test -s conftest$ac_exeext'
17228 { (eval echo "$as_me:17228: \"$ac_try\"") >&5
17229 (eval $ac_try) 2>&5
17231 echo "$as_me:17231: \$? = $ac_status" >&5
17232 (exit $ac_status); }; }; then
17233 ac_cv_lib_dmalloc_dmalloc_debug=yes
17235 echo "$as_me: failed program was:" >&5
17236 cat conftest.$ac_ext >&5
17237 ac_cv_lib_dmalloc_dmalloc_debug=no
17239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17240 LIBS=$ac_check_lib_save_LIBS
17242 echo "$as_me:17242: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17243 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17244 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17245 cat >>confdefs.h <<EOF
17246 #define HAVE_LIBDMALLOC 1
17249 LIBS="-ldmalloc $LIBS"
17257 echo "$as_me:17257: checking if you want to use dbmalloc for testing" >&5
17258 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17260 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17261 if test "${with_dbmalloc+set}" = set; then
17262 withval="$with_dbmalloc"
17264 cat >>confdefs.h <<EOF
17265 #define USE_DBMALLOC 1
17268 : ${with_cflags:=-g}
17269 : ${with_no_leaks:=yes}
17274 echo "$as_me:17274: result: ${with_dbmalloc:-no}" >&5
17275 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17277 case .$with_cflags in
17287 cf_new_extra_cppflags=
17289 for cf_add_cflags in -g
17291 case $cf_fix_cppflags in
17293 case $cf_add_cflags in
17294 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17295 case $cf_add_cflags in
17297 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17300 && test -z "${cf_tst_cflags}" \
17301 && cf_fix_cppflags=yes
17303 if test $cf_fix_cppflags = yes ; then
17304 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17306 elif test "${cf_tst_cflags}" = "\"'" ; then
17307 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17312 case "$CPPFLAGS" in
17316 case $cf_add_cflags in
17318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17320 CPPFLAGS=`echo "$CPPFLAGS" | \
17321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17326 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17331 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17336 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17338 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17340 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17341 && test -z "${cf_tst_cflags}" \
17342 && cf_fix_cppflags=no
17347 if test -n "$cf_new_cflags" ; then
17349 CFLAGS="$CFLAGS $cf_new_cflags"
17352 if test -n "$cf_new_cppflags" ; then
17354 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17357 if test -n "$cf_new_extra_cppflags" ; then
17359 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17367 if test "$with_dbmalloc" = yes ; then
17368 echo "$as_me:17368: checking for dbmalloc.h" >&5
17369 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17370 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17371 echo $ECHO_N "(cached) $ECHO_C" >&6
17373 cat >conftest.$ac_ext <<_ACEOF
17374 #line 17374 "configure"
17375 #include "confdefs.h"
17376 #include <dbmalloc.h>
17378 if { (eval echo "$as_me:17378: \"$ac_cpp conftest.$ac_ext\"") >&5
17379 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17381 egrep -v '^ *\+' conftest.er1 >conftest.err
17383 cat conftest.err >&5
17384 echo "$as_me:17384: \$? = $ac_status" >&5
17385 (exit $ac_status); } >/dev/null; then
17386 if test -s conftest.err; then
17387 ac_cpp_err=$ac_c_preproc_warn_flag
17394 if test -z "$ac_cpp_err"; then
17395 ac_cv_header_dbmalloc_h=yes
17397 echo "$as_me: failed program was:" >&5
17398 cat conftest.$ac_ext >&5
17399 ac_cv_header_dbmalloc_h=no
17401 rm -f conftest.err conftest.$ac_ext
17403 echo "$as_me:17403: result: $ac_cv_header_dbmalloc_h" >&5
17404 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17405 if test $ac_cv_header_dbmalloc_h = yes; then
17407 echo "$as_me:17407: checking for debug_malloc in -ldbmalloc" >&5
17408 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17409 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17410 echo $ECHO_N "(cached) $ECHO_C" >&6
17412 ac_check_lib_save_LIBS=$LIBS
17413 LIBS="-ldbmalloc $LIBS"
17414 cat >conftest.$ac_ext <<_ACEOF
17415 #line 17415 "configure"
17416 #include "confdefs.h"
17418 /* Override any gcc2 internal prototype to avoid an error. */
17422 /* We use char because int might match the return type of a gcc2
17423 builtin and then its argument prototype would still apply. */
17424 char debug_malloc ();
17433 rm -f conftest.$ac_objext conftest$ac_exeext
17434 if { (eval echo "$as_me:17434: \"$ac_link\"") >&5
17435 (eval $ac_link) 2>&5
17437 echo "$as_me:17437: \$? = $ac_status" >&5
17438 (exit $ac_status); } &&
17439 { ac_try='test -s conftest$ac_exeext'
17440 { (eval echo "$as_me:17440: \"$ac_try\"") >&5
17441 (eval $ac_try) 2>&5
17443 echo "$as_me:17443: \$? = $ac_status" >&5
17444 (exit $ac_status); }; }; then
17445 ac_cv_lib_dbmalloc_debug_malloc=yes
17447 echo "$as_me: failed program was:" >&5
17448 cat conftest.$ac_ext >&5
17449 ac_cv_lib_dbmalloc_debug_malloc=no
17451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17452 LIBS=$ac_check_lib_save_LIBS
17454 echo "$as_me:17454: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17455 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17456 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17457 cat >>confdefs.h <<EOF
17458 #define HAVE_LIBDBMALLOC 1
17461 LIBS="-ldbmalloc $LIBS"
17469 echo "$as_me:17469: checking if you want to use valgrind for testing" >&5
17470 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17472 # Check whether --with-valgrind or --without-valgrind was given.
17473 if test "${with_valgrind+set}" = set; then
17474 withval="$with_valgrind"
17476 cat >>confdefs.h <<EOF
17477 #define USE_VALGRIND 1
17480 : ${with_cflags:=-g}
17481 : ${with_no_leaks:=yes}
17486 echo "$as_me:17486: result: ${with_valgrind:-no}" >&5
17487 echo "${ECHO_T}${with_valgrind:-no}" >&6
17489 case .$with_cflags in
17499 cf_new_extra_cppflags=
17501 for cf_add_cflags in -g
17503 case $cf_fix_cppflags in
17505 case $cf_add_cflags in
17506 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17507 case $cf_add_cflags in
17509 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17511 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17512 && test -z "${cf_tst_cflags}" \
17513 && cf_fix_cppflags=yes
17515 if test $cf_fix_cppflags = yes ; then
17516 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17518 elif test "${cf_tst_cflags}" = "\"'" ; then
17519 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17524 case "$CPPFLAGS" in
17528 case $cf_add_cflags in
17530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17532 CPPFLAGS=`echo "$CPPFLAGS" | \
17533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17538 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17543 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17548 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17550 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17552 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17553 && test -z "${cf_tst_cflags}" \
17554 && cf_fix_cppflags=no
17559 if test -n "$cf_new_cflags" ; then
17561 CFLAGS="$CFLAGS $cf_new_cflags"
17564 if test -n "$cf_new_cppflags" ; then
17566 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17569 if test -n "$cf_new_extra_cppflags" ; then
17571 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17579 echo "$as_me:17579: checking if you want to perform memory-leak testing" >&5
17580 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17582 # Check whether --enable-leaks or --disable-leaks was given.
17583 if test "${enable_leaks+set}" = set; then
17584 enableval="$enable_leaks"
17585 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17587 : ${with_no_leaks:=no}
17589 echo "$as_me:17589: result: $with_no_leaks" >&5
17590 echo "${ECHO_T}$with_no_leaks" >&6
17592 if test "$with_no_leaks" = yes ; then
17594 cat >>confdefs.h <<\EOF
17598 cat >>confdefs.h <<\EOF
17599 #define YY_NO_LEAKS 1
17605 echo "$as_me:17605: checking for an rpath option" >&5
17606 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17607 case $cf_cv_system_name in
17609 if test "$GCC" = yes; then
17610 LD_RPATH_OPT="-Wl,-rpath,"
17612 LD_RPATH_OPT="-rpath "
17615 (linux*|gnu*|k*bsd*-gnu|freebsd*)
17616 LD_RPATH_OPT="-Wl,-rpath,"
17618 (openbsd[2-9].*|mirbsd*)
17619 LD_RPATH_OPT="-Wl,-rpath,"
17622 LD_RPATH_OPT="-rpath "
17625 LD_RPATH_OPT="-Wl,-rpath,"
17628 LD_RPATH_OPT="-rpath "
17636 echo "$as_me:17636: result: $LD_RPATH_OPT" >&5
17637 echo "${ECHO_T}$LD_RPATH_OPT" >&6
17639 case "x$LD_RPATH_OPT" in
17641 echo "$as_me:17641: checking if we need a space after rpath option" >&5
17642 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17643 cf_save_LIBS="$LIBS"
17645 cf_add_libs="${LD_RPATH_OPT}$libdir"
17646 # Filter out duplicates - this happens with badly-designed ".pc" files...
17647 for cf_add_1lib in $LIBS
17649 for cf_add_2lib in $cf_add_libs
17651 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17657 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17659 LIBS="$cf_add_libs"
17661 cat >conftest.$ac_ext <<_ACEOF
17662 #line 17662 "configure"
17663 #include "confdefs.h"
17673 rm -f conftest.$ac_objext conftest$ac_exeext
17674 if { (eval echo "$as_me:17674: \"$ac_link\"") >&5
17675 (eval $ac_link) 2>&5
17677 echo "$as_me:17677: \$? = $ac_status" >&5
17678 (exit $ac_status); } &&
17679 { ac_try='test -s conftest$ac_exeext'
17680 { (eval echo "$as_me:17680: \"$ac_try\"") >&5
17681 (eval $ac_try) 2>&5
17683 echo "$as_me:17683: \$? = $ac_status" >&5
17684 (exit $ac_status); }; }; then
17687 echo "$as_me: failed program was:" >&5
17688 cat conftest.$ac_ext >&5
17691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17692 LIBS="$cf_save_LIBS"
17693 echo "$as_me:17693: result: $cf_rpath_space" >&5
17694 echo "${ECHO_T}$cf_rpath_space" >&6
17695 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17699 echo "$as_me:17699: checking if rpath-hack should be disabled" >&5
17700 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17702 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17703 if test "${enable_rpath_hack+set}" = set; then
17704 enableval="$enable_rpath_hack"
17705 test "$enableval" != no && enableval=yes
17706 if test "$enableval" != "yes" ; then
17707 cf_disable_rpath_hack=yes
17709 cf_disable_rpath_hack=no
17713 cf_disable_rpath_hack=no
17716 echo "$as_me:17716: result: $cf_disable_rpath_hack" >&5
17717 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17718 if test "$cf_disable_rpath_hack" = no ; then
17720 echo "$as_me:17720: checking for updated LDFLAGS" >&5
17721 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17722 if test -n "$LD_RPATH_OPT" ; then
17723 echo "$as_me:17723: result: maybe" >&5
17724 echo "${ECHO_T}maybe" >&6
17728 # Extract the first word of "$ac_prog", so it can be a program name with args.
17729 set dummy $ac_prog; ac_word=$2
17730 echo "$as_me:17730: checking for $ac_word" >&5
17731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17732 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17733 echo $ECHO_N "(cached) $ECHO_C" >&6
17735 if test -n "$cf_ldd_prog"; then
17736 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17738 ac_save_IFS=$IFS; IFS=$ac_path_separator
17740 for ac_dir in $ac_dummy; do
17742 test -z "$ac_dir" && ac_dir=.
17743 $as_executable_p "$ac_dir/$ac_word" || continue
17744 ac_cv_prog_cf_ldd_prog="$ac_prog"
17745 echo "$as_me:17745: found $ac_dir/$ac_word" >&5
17751 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17752 if test -n "$cf_ldd_prog"; then
17753 echo "$as_me:17753: result: $cf_ldd_prog" >&5
17754 echo "${ECHO_T}$cf_ldd_prog" >&6
17756 echo "$as_me:17756: result: no" >&5
17757 echo "${ECHO_T}no" >&6
17760 test -n "$cf_ldd_prog" && break
17762 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
17764 cf_rpath_list="/usr/lib /lib"
17765 if test "$cf_ldd_prog" != no
17769 cat >conftest.$ac_ext <<_ACEOF
17770 #line 17770 "configure"
17771 #include "confdefs.h"
17781 rm -f conftest.$ac_objext conftest$ac_exeext
17782 if { (eval echo "$as_me:17782: \"$ac_link\"") >&5
17783 (eval $ac_link) 2>&5
17785 echo "$as_me:17785: \$? = $ac_status" >&5
17786 (exit $ac_status); } &&
17787 { ac_try='test -s conftest$ac_exeext'
17788 { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789 (eval $ac_try) 2>&5
17791 echo "$as_me:17791: \$? = $ac_status" >&5
17792 (exit $ac_status); }; }; then
17793 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
17794 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
17796 echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17801 # If we passed the link-test, but get a "not found" on a given library,
17802 # this could be due to inept reconfiguration of gcc to make it only
17803 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
17804 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
17805 # /usr/local libraries.
17806 if test -n "$cf_rpath_oops"
17808 for cf_rpath_src in $cf_rpath_oops
17810 for cf_rpath_dir in \
17815 if test -f $cf_rpath_dir/lib/$cf_rpath_src
17817 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
17819 echo "${as_me:-configure}:17819: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
17821 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
17829 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17831 echo "${as_me:-configure}:17831: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17833 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
17835 echo "${as_me:-configure}:17835: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17838 for cf_rpath_src in $LDFLAGS
17840 case $cf_rpath_src in
17843 # check if this refers to a directory which we will ignore
17845 if test -n "$cf_rpath_list"
17847 for cf_rpath_item in $cf_rpath_list
17849 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17857 if test "$cf_rpath_skip" = no
17859 # transform the option
17860 if test "$LD_RPATH_OPT" = "-R " ; then
17861 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17863 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17866 # if we have not already added this, add it now
17867 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17868 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17870 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17872 echo "${as_me:-configure}:17872: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17874 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17879 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17881 LDFLAGS=$cf_rpath_dst
17883 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
17885 echo "${as_me:-configure}:17885: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17887 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
17889 echo "${as_me:-configure}:17889: testing ...checking LIBS $LIBS ..." 1>&5
17892 for cf_rpath_src in $LIBS
17894 case $cf_rpath_src in
17897 # check if this refers to a directory which we will ignore
17899 if test -n "$cf_rpath_list"
17901 for cf_rpath_item in $cf_rpath_list
17903 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17911 if test "$cf_rpath_skip" = no
17913 # transform the option
17914 if test "$LD_RPATH_OPT" = "-R " ; then
17915 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17917 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17920 # if we have not already added this, add it now
17921 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17922 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17924 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17926 echo "${as_me:-configure}:17926: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17928 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17933 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17937 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
17939 echo "${as_me:-configure}:17939: testing ...checked LIBS $LIBS ..." 1>&5
17941 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17943 echo "${as_me:-configure}:17943: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17946 echo "$as_me:17946: result: no" >&5
17947 echo "${ECHO_T}no" >&6
17955 ac_config_files="$ac_config_files Makefile"
17956 ac_config_commands="$ac_config_commands default"
17957 cat >confcache <<\_ACEOF
17958 # This file is a shell script that caches the results of configure
17959 # tests run on this system so they can be shared between configure
17960 # scripts and configure runs, see configure's option --config-cache.
17961 # It is not useful on other systems. If it contains results you don't
17962 # want to keep, you may remove or edit it.
17964 # config.status only pays attention to the cache file if you give it
17965 # the --recheck option to rerun configure.
17967 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17968 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17969 # following values.
17973 # The following way of writing the cache mishandles newlines in values,
17974 # but we know of no workaround that is simple, portable, and efficient.
17975 # So, don't put newlines in cache variables' values.
17976 # Ultrix sh set writes to stderr and can't be redirected directly,
17977 # and sets the high bit in the cache file unless we assign to the vars.
17980 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17982 # `set' does not quote correctly, so add quotes (double-quote
17983 # substitution turns \\\\ into \\, and sed turns \\ into \).
17986 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17989 # `set' quotes correctly as required by POSIX, so do not add quotes.
17991 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17998 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18000 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18002 if cmp -s $cache_file confcache; then :; else
18003 if test -w $cache_file; then
18004 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18005 cat confcache >$cache_file
18007 echo "not updating unwritable cache $cache_file"
18012 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18013 # Let make expand exec_prefix.
18014 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18016 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18017 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18018 # trailing colons and then remove the whole line if VPATH becomes empty
18019 # (actually we leave an empty line to preserve line numbers).
18020 if test "x$srcdir" = x.; then
18021 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18022 s/:*\$(srcdir):*/:/;
18023 s/:*\${srcdir}:*/:/;
18025 s/^\([^=]*=[ ]*\):*/\1/;
18031 DEFS=-DHAVE_CONFIG_H
18033 : ${CONFIG_STATUS=./config.status}
18034 ac_clean_files_save=$ac_clean_files
18035 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18036 { echo "$as_me:18036: creating $CONFIG_STATUS" >&5
18037 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18038 cat >$CONFIG_STATUS <<_ACEOF
18040 # Generated automatically by configure.
18041 # Run this file to recreate the current configuration.
18042 # Compiler output produced by configure, useful for debugging
18043 # configure, is in config.log if it exists.
18046 SHELL=\${CONFIG_SHELL-$SHELL}
18047 ac_cs_invocation="\$0 \$@"
18051 cat >>$CONFIG_STATUS <<\_ACEOF
18052 # Be Bourne compatible
18053 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18056 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18060 # Name of the executable.
18061 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18063 if expr a : '\(a\)' >/dev/null 2>&1; then
18069 rm -f conf$$ conf$$.exe conf$$.file
18071 if ln -s conf$$.file conf$$ 2>/dev/null; then
18072 # We could just check for DJGPP; but this test a) works b) is more generic
18073 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18074 if test -f conf$$.exe; then
18075 # Don't use ln at all; we don't have any links
18080 elif ln conf$$.file conf$$ 2>/dev/null; then
18085 rm -f conf$$ conf$$.exe conf$$.file
18087 as_executable_p="test -f"
18089 # Support unset when possible.
18090 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18097 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18098 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18099 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18100 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18101 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18102 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18103 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18104 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18107 # We need space, tab and new line, in precisely that order.
18113 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18119 # Files that config.status was made for.
18120 if test -n "$ac_config_files"; then
18121 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18124 if test -n "$ac_config_headers"; then
18125 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18128 if test -n "$ac_config_links"; then
18129 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18132 if test -n "$ac_config_commands"; then
18133 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18136 cat >>$CONFIG_STATUS <<\EOF
18139 \`$as_me' instantiates files from templates according to the
18140 current configuration.
18142 Usage: $0 [OPTIONS] [FILE]...
18144 -h, --help print this help, then exit
18145 -V, --version print version number, then exit
18146 -d, --debug don't remove temporary files
18147 --recheck update $as_me by reconfiguring in the same conditions
18148 --file=FILE[:TEMPLATE]
18149 instantiate the configuration file FILE
18150 --header=FILE[:TEMPLATE]
18151 instantiate the configuration header FILE
18153 Configuration files:
18156 Configuration headers:
18159 Configuration commands:
18162 Report bugs to <dickey@invisible-island.net>."
18165 cat >>$CONFIG_STATUS <<EOF
18168 configured by $0, generated by GNU Autoconf 2.52.20150926,
18169 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18171 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18172 Free Software Foundation, Inc.
18173 This config.status script is free software; the Free Software Foundation
18174 gives unlimited permission to copy, distribute and modify it."
18179 cat >>$CONFIG_STATUS <<\EOF
18180 # If no file are specified by the user, then we need to provide default
18181 # value. By we need to know if files were specified by the user.
18187 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18188 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18190 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18194 *) # This is not an option, so the user has probably given explicit
18196 ac_need_defaults=false;;
18200 # Handling of the options.
18202 cat >>$CONFIG_STATUS <<EOF
18203 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18204 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18205 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18207 cat >>$CONFIG_STATUS <<\EOF
18208 --version | --vers* | -V )
18209 echo "$ac_cs_version"; exit 0 ;;
18211 # Conflict between --help and --header
18212 { { echo "$as_me:18212: error: ambiguous option: $1
18213 Try \`$0 --help' for more information." >&5
18214 echo "$as_me: error: ambiguous option: $1
18215 Try \`$0 --help' for more information." >&2;}
18216 { (exit 1); exit 1; }; };;
18217 --help | --hel | -h )
18218 echo "$ac_cs_usage"; exit 0 ;;
18219 --debug | --d* | -d )
18221 --file | --fil | --fi | --f )
18223 CONFIG_FILES="$CONFIG_FILES $1"
18224 ac_need_defaults=false;;
18225 --header | --heade | --head | --hea )
18227 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18228 ac_need_defaults=false;;
18230 # This is an error.
18231 -*) { { echo "$as_me:18231: error: unrecognized option: $1
18232 Try \`$0 --help' for more information." >&5
18233 echo "$as_me: error: unrecognized option: $1
18234 Try \`$0 --help' for more information." >&2;}
18235 { (exit 1); exit 1; }; } ;;
18237 *) ac_config_targets="$ac_config_targets $1" ;;
18246 ## ----------------------- ##
18247 ## Running config.status. ##
18248 ## ----------------------- ##
18250 This file was extended by $as_me 2.52.20150926, executed with
18251 CONFIG_FILES = $CONFIG_FILES
18252 CONFIG_HEADERS = $CONFIG_HEADERS
18253 CONFIG_LINKS = $CONFIG_LINKS
18254 CONFIG_COMMANDS = $CONFIG_COMMANDS
18255 > $ac_cs_invocation
18256 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18261 cat >>$CONFIG_STATUS <<EOF
18263 # INIT-COMMANDS section.
18273 cat >>$CONFIG_STATUS <<\EOF
18274 for ac_config_target in $ac_config_targets
18276 case "$ac_config_target" in
18277 # Handling of arguments.
18278 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18279 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18280 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18281 *) { { echo "$as_me:18281: error: invalid argument: $ac_config_target" >&5
18282 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18283 { (exit 1); exit 1; }; };;
18287 # If the user did not use the arguments to specify the items to instantiate,
18288 # then the envvar interface is used. Set only those that are not.
18289 # We use the long form for the default assignment because of an extremely
18290 # bizarre bug on SunOS 4.1.3.
18291 if $ac_need_defaults; then
18292 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18293 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18294 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18297 # Create a temporary directory, and hook for its removal unless debugging.
18300 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18301 trap '{ (exit 1); exit 1; }' 1 2 13 15
18304 # Create a (secure) tmp directory for tmp files.
18307 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18308 test -n "$tmp" && test -d "$tmp"
18311 tmp=$TMPDIR/cs$$-$RANDOM
18312 (umask 077 && mkdir $tmp)
18315 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18316 { (exit 1); exit 1; }
18321 cat >>$CONFIG_STATUS <<EOF
18324 # CONFIG_FILES section.
18327 # No need to generate the scripts if there are no CONFIG_FILES.
18328 # This happens for instance when ./config.status config.h
18329 if test -n "\$CONFIG_FILES"; then
18330 # Protect against being on the right side of a sed subst in config.status.
18331 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18332 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18333 s,@SHELL@,$SHELL,;t t
18334 s,@exec_prefix@,$exec_prefix,;t t
18335 s,@prefix@,$prefix,;t t
18336 s,@program_transform_name@,$program_transform_name,;t t
18337 s,@bindir@,$bindir,;t t
18338 s,@sbindir@,$sbindir,;t t
18339 s,@libexecdir@,$libexecdir,;t t
18340 s,@datarootdir@,$datarootdir,;t t
18341 s,@datadir@,$datadir,;t t
18342 s,@sysconfdir@,$sysconfdir,;t t
18343 s,@sharedstatedir@,$sharedstatedir,;t t
18344 s,@localstatedir@,$localstatedir,;t t
18345 s,@libdir@,$libdir,;t t
18346 s,@includedir@,$includedir,;t t
18347 s,@oldincludedir@,$oldincludedir,;t t
18348 s,@infodir@,$infodir,;t t
18349 s,@mandir@,$mandir,;t t
18350 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18351 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18352 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18353 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18354 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18355 s,@build_alias@,$build_alias,;t t
18356 s,@host_alias@,$host_alias,;t t
18357 s,@target_alias@,$target_alias,;t t
18358 s,@ECHO_C@,$ECHO_C,;t t
18359 s,@ECHO_N@,$ECHO_N,;t t
18360 s,@ECHO_T@,$ECHO_T,;t t
18361 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18362 s,@DEFS@,$DEFS,;t t
18363 s,@LIBS@,$LIBS,;t t
18364 s,@build@,$build,;t t
18365 s,@build_cpu@,$build_cpu,;t t
18366 s,@build_vendor@,$build_vendor,;t t
18367 s,@build_os@,$build_os,;t t
18368 s,@host@,$host,;t t
18369 s,@host_cpu@,$host_cpu,;t t
18370 s,@host_vendor@,$host_vendor,;t t
18371 s,@host_os@,$host_os,;t t
18372 s,@SET_MAKE@,$SET_MAKE,;t t
18374 s,@CFLAGS@,$CFLAGS,;t t
18375 s,@LDFLAGS@,$LDFLAGS,;t t
18376 s,@CPPFLAGS@,$CPPFLAGS,;t t
18377 s,@ac_ct_CC@,$ac_ct_CC,;t t
18378 s,@EXEEXT@,$EXEEXT,;t t
18379 s,@OBJEXT@,$OBJEXT,;t t
18380 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18383 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18384 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18385 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18386 s,@LINT@,$LINT,;t t
18387 s,@LINT_OPTS@,$LINT_OPTS,;t t
18388 s,@CTAGS@,$CTAGS,;t t
18389 s,@ETAGS@,$ETAGS,;t t
18390 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18391 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18392 s,@MATH_LIB@,$MATH_LIB,;t t
18393 s,@top_builddir@,$top_builddir,;t t
18394 s,@CC_G_OPT@,$CC_G_OPT,;t t
18395 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18396 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18397 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18398 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18400 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18401 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18402 s,@LD_MODEL@,$LD_MODEL,;t t
18403 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18404 s,@LIBTOOL@,$LIBTOOL,;t t
18405 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18406 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18407 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18408 s,@LIB_LINK@,$LIB_LINK,;t t
18409 s,@LINK_TESTS@,$LINK_TESTS,;t t
18410 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18411 s,@PACKAGE@,$PACKAGE,;t t
18412 s,@PTHREAD@,$PTHREAD,;t t
18413 s,@TEST_ARGS@,$TEST_ARGS,;t t
18414 s,@TEST_DEPS@,$TEST_DEPS,;t t
18415 s,@TEST_LIBS@,$TEST_LIBS,;t t
18416 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18417 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18418 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18419 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18420 s,@includesubdir@,$includesubdir,;t t
18421 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18422 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18423 s,@ECHO_LT@,$ECHO_LT,;t t
18424 s,@ECHO_LD@,$ECHO_LD,;t t
18425 s,@RULE_CC@,$RULE_CC,;t t
18426 s,@SHOW_CC@,$SHOW_CC,;t t
18427 s,@ECHO_CC@,$ECHO_CC,;t t
18428 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18429 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18430 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18431 s,@X_CFLAGS@,$X_CFLAGS,;t t
18432 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18433 s,@X_LIBS@,$X_LIBS,;t t
18434 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18435 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18436 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18437 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18438 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18439 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18444 cat >>$CONFIG_STATUS <<\EOF
18445 # Split the substitutions into bite-sized pieces for seds with
18446 # small command number limits, like on Digital OSF/1 and HP-UX.
18447 ac_max_sed_lines=48
18448 ac_sed_frag=1 # Number of current file.
18449 ac_beg=1 # First line for current file.
18450 ac_end=$ac_max_sed_lines # Line after last line for current file.
18453 while $ac_more_lines; do
18454 if test $ac_beg -gt 1; then
18455 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18457 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18459 if test ! -s $tmp/subs.frag; then
18460 ac_more_lines=false
18462 # The purpose of the label and of the branching condition is to
18463 # speed up the sed processing (if there are no `@' at all, there
18464 # is no need to browse any of the substitutions).
18465 # These are the two extra sed commands mentioned above.
18467 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18468 # It is possible to make a multiline substitution using escaped newlines.
18469 # Ensure that we do not split the substitution between script fragments.
18471 ac_END=`expr $ac_end + $ac_max_sed_lines`
18472 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18473 if test -s $tmp/subs.next; then
18474 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18475 if test ! -s $tmp/subs.edit; then
18476 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18477 if test ! -s $tmp/subs.edit; then
18478 if test $ac_beg -gt 1; then
18479 ac_end=`expr $ac_end - 1`
18486 if test -z "$ac_sed_cmds"; then
18487 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18489 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18491 ac_sed_frag=`expr $ac_sed_frag + 1`
18493 ac_end=`expr $ac_end + $ac_max_sed_lines`
18496 if test -z "$ac_sed_cmds"; then
18499 fi # test -n "$CONFIG_FILES"
18502 cat >>$CONFIG_STATUS <<\EOF
18503 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18504 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18506 - | *:- | *:-:* ) # input from stdin
18508 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18509 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18510 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18511 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18512 * ) ac_file_in=$ac_file.in ;;
18515 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18516 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18517 X"$ac_file" : 'X\(//\)[^/]' \| \
18518 X"$ac_file" : 'X\(//\)$' \| \
18519 X"$ac_file" : 'X\(/\)' \| \
18520 . : '\(.\)' 2>/dev/null ||
18522 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18523 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18524 /^X\(\/\/\)$/{ s//\1/; q; }
18525 /^X\(\/\).*/{ s//\1/; q; }
18527 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18528 { case "$ac_dir" in
18529 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18533 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18534 case $as_mkdir_dir in
18535 # Skip DOS drivespec
18536 ?:) as_incr_dir=$as_mkdir_dir ;;
18538 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18539 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18544 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18545 # A "../" for each directory in $ac_dir_suffix.
18546 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18548 ac_dir_suffix= ac_dots=
18553 if test -z "$ac_dots"; then
18556 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18558 [\\/]* | ?:[\\/]* )
18559 ac_srcdir=$srcdir$ac_dir_suffix;
18560 ac_top_srcdir=$srcdir ;;
18561 *) # Relative path.
18562 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18563 ac_top_srcdir=$ac_dots$srcdir ;;
18567 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18568 *) ac_INSTALL=$ac_dots$INSTALL ;;
18571 if test x"$ac_file" != x-; then
18572 { echo "$as_me:18572: creating $ac_file" >&5
18573 echo "$as_me: creating $ac_file" >&6;}
18576 # Let's still pretend it is `configure' which instantiates (i.e., don't
18577 # use $as_me), people would be surprised to read:
18578 # /* config.h. Generated automatically by config.status. */
18579 configure_input="Generated automatically from `echo $ac_file_in |
18580 sed 's,.*/,,'` by configure."
18582 # First look for the input files in the build tree, otherwise in the
18584 ac_file_inputs=`IFS=:
18585 for f in $ac_file_in; do
18587 -) echo $tmp/stdin ;;
18589 # Absolute (can't be DOS-style, as IFS=:)
18590 test -f "$f" || { { echo "$as_me:18590: error: cannot find input file: $f" >&5
18591 echo "$as_me: error: cannot find input file: $f" >&2;}
18592 { (exit 1); exit 1; }; }
18595 if test -f "$f"; then
18598 elif test -f "$srcdir/$f"; then
18603 { { echo "$as_me:18603: error: cannot find input file: $f" >&5
18604 echo "$as_me: error: cannot find input file: $f" >&2;}
18605 { (exit 1); exit 1; }; }
18608 done` || { (exit 1); exit 1; }
18610 cat >>$CONFIG_STATUS <<\EOF
18611 ac_warn_datarootdir=no
18612 if test x"$ac_file" != x-; then
18613 for ac_item in $ac_file_inputs
18615 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18616 if test -n "$ac_seen"; then
18617 ac_used=`grep '@datarootdir@' $ac_item`
18618 if test -z "$ac_used"; then
18619 { echo "$as_me:18619: WARNING: datarootdir was used implicitly but not set:
18621 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18623 ac_warn_datarootdir=yes
18626 ac_seen=`grep '${datarootdir}' $ac_item`
18627 if test -n "$ac_seen"; then
18628 { echo "$as_me:18628: WARNING: datarootdir was used explicitly but not set:
18630 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18632 ac_warn_datarootdir=yes
18637 if test "x$ac_warn_datarootdir" = xyes; then
18638 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18642 cat >>$CONFIG_STATUS <<EOF
18646 cat >>$CONFIG_STATUS <<\EOF
18648 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18649 s,@configure_input@,$configure_input,;t t
18650 s,@srcdir@,$ac_srcdir,;t t
18651 s,@top_srcdir@,$ac_top_srcdir,;t t
18652 s,@INSTALL@,$ac_INSTALL,;t t
18653 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18655 if test x"$ac_file" != x-; then
18656 cp $tmp/out $ac_file
18658 for ac_name in prefix exec_prefix datarootdir
18660 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18661 if test -n "$ac_seen"; then
18662 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18663 if test -z "$ac_init"; then
18664 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18665 { echo "$as_me:18665: WARNING: Variable $ac_name is used but was not set:
18667 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18672 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18673 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18674 if test -s $tmp/out; then
18675 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18676 { echo "$as_me:18676: WARNING: Some variables may not be substituted:
18678 echo "$as_me: WARNING: Some variables may not be substituted:
18688 cat >>$CONFIG_STATUS <<\EOF
18691 # CONFIG_HEADER section.
18694 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18695 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18697 # ac_d sets the value in "#define NAME VALUE" lines.
18698 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18699 ac_dB='[ ].*$,\1#\2'
18702 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18703 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18704 ac_iB='\([ ]\),\1#\2define\3'
18707 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18708 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18709 ac_uB='$,\1#\2define\3'
18713 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18714 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18716 - | *:- | *:-:* ) # input from stdin
18718 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18719 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18720 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18721 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18722 * ) ac_file_in=$ac_file.in ;;
18725 test x"$ac_file" != x- && { echo "$as_me:18725: creating $ac_file" >&5
18726 echo "$as_me: creating $ac_file" >&6;}
18728 # First look for the input files in the build tree, otherwise in the
18730 ac_file_inputs=`IFS=:
18731 for f in $ac_file_in; do
18733 -) echo $tmp/stdin ;;
18735 # Absolute (can't be DOS-style, as IFS=:)
18736 test -f "$f" || { { echo "$as_me:18736: error: cannot find input file: $f" >&5
18737 echo "$as_me: error: cannot find input file: $f" >&2;}
18738 { (exit 1); exit 1; }; }
18741 if test -f "$f"; then
18744 elif test -f "$srcdir/$f"; then
18749 { { echo "$as_me:18749: error: cannot find input file: $f" >&5
18750 echo "$as_me: error: cannot find input file: $f" >&2;}
18751 { (exit 1); exit 1; }; }
18754 done` || { (exit 1); exit 1; }
18755 # Remove the trailing spaces.
18756 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18760 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18761 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18762 # be either 'cat' or 'sort'.
18763 cat confdefs.h | uniq >conftest.vals
18765 # Break up conftest.vals because some shells have a limit on
18766 # the size of here documents, and old seds have small limits too.
18768 rm -f conftest.tail
18769 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18770 while grep . conftest.vals >/dev/null
18772 # Write chunks of a limited-size here document to conftest.frag.
18773 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18774 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18775 echo 'CEOF' >> $CONFIG_STATUS
18776 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18777 rm -f conftest.vals
18778 mv conftest.tail conftest.vals
18780 rm -f conftest.vals
18782 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18784 echo ' cat >> conftest.edit <<CEOF
18785 /@DEFS@/r conftest.frag
18788 sed -f conftest.edit $tmp/in > $tmp/out
18790 mv $tmp/out $tmp/in
18791 rm -f conftest.edit conftest.frag
18792 ' >> $CONFIG_STATUS
18794 cat >>$CONFIG_STATUS <<\EOF
18795 # Let's still pretend it is `configure' which instantiates (i.e., don't
18796 # use $as_me), people would be surprised to read:
18797 # /* config.h. Generated automatically by config.status. */
18798 if test x"$ac_file" = x-; then
18799 echo "/* Generated automatically by configure. */" >$tmp/config.h
18801 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18803 cat $tmp/in >>$tmp/config.h
18805 if test x"$ac_file" != x-; then
18806 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18807 { echo "$as_me:18807: $ac_file is unchanged" >&5
18808 echo "$as_me: $ac_file is unchanged" >&6;}
18810 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18811 X"$ac_file" : 'X\(//\)[^/]' \| \
18812 X"$ac_file" : 'X\(//\)$' \| \
18813 X"$ac_file" : 'X\(/\)' \| \
18814 . : '\(.\)' 2>/dev/null ||
18816 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18817 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18818 /^X\(\/\/\)$/{ s//\1/; q; }
18819 /^X\(\/\).*/{ s//\1/; q; }
18821 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18822 { case "$ac_dir" in
18823 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18827 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18828 case $as_mkdir_dir in
18829 # Skip DOS drivespec
18830 ?:) as_incr_dir=$as_mkdir_dir ;;
18832 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18833 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18840 mv $tmp/config.h $ac_file
18844 rm -f $tmp/config.h
18848 cat >>$CONFIG_STATUS <<\EOF
18850 # CONFIG_COMMANDS section.
18852 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18853 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18854 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18861 if test ! -d $srcdir/$cf_dir; then
18863 elif test -f $srcdir/$cf_dir/programs; then
18864 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18868 cat >>Makefile <<TEST_EOF
18870 # These rules are generated so we do not rely on suffix rules, which do not
18871 # work consistently for different make-programs (the '\$(MODEL)/' confuses
18872 # some, and the '\$x' confuses others).
18875 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
18878 cat >>Makefile <<TEST_EOF
18880 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
18881 \$(srcdir)/test.priv.h \\
18884 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
18888 if test -f ../config.guess && test -f ../config.sub
18890 cat >>Makefile <<TEST_EOF
18892 # if we used CF_INHERIT for getting these files, we can remove them
18894 rm -f config.guess config.sub
18902 cat >>$CONFIG_STATUS <<\EOF
18904 { (exit 0); exit 0; }
18906 chmod +x $CONFIG_STATUS
18907 ac_clean_files=$ac_clean_files_save
18909 # configure is writing to config.log, and then calls config.status.
18910 # config.status does its own redirection, appending to config.log.
18911 # Unfortunately, on DOS this fails, as config.log is still kept open
18912 # by configure, so config.status won't be able to write to it; its
18913 # output is simply discarded. So we exec the FD to /dev/null,
18914 # effectively closing config.log, so it can be properly (re)opened and
18915 # appended to by config.status. When coming back to configure, we
18916 # need to make the FD available again.
18917 if test "$no_create" != yes; then
18920 $SHELL $CONFIG_STATUS || ac_cs_success=false
18922 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18923 # would make configure fail if this is the last instruction.
18924 $ac_cs_success || { (exit 1); exit 1; }