2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20170501.
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 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
651 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
654 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
655 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
658 --disable-stripping do not strip installed executables
659 --enable-string-hacks work around bogus compiler/loader warnings
660 --with-pkg-config{=path} enable/disable use of pkg-config
661 --disable-echo do not display "compiling" commands
662 Curses Version-dependent Options:
663 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
664 --disable-widec disable checks for wide-character functions
665 --with-curses-dir=DIR directory in which (n)curses is installed
666 --with-screen=XXX use specified curses-libraries
667 --with-ncursesw use wide ncurses-libraries
668 --with-ncurses use ncurses-libraries
669 --with-pdcurses compile/link with pdcurses X11 library
670 --with-curses-colr compile/link with HPUX 10.x color-curses
671 --with-curses-5lib compile/link with SunOS 5lib curses
672 --with-Xaw3d link with Xaw 3d library
673 --with-Xaw3dxft link with Xaw 3d xft library
674 --with-neXtaw link with neXT Athena library
675 --with-XawPlus link with Athena-Plus library
676 --with-x use the X Window System
677 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
678 --disable-panel disable checks for panel functions
679 --disable-menu disable checks for menu functions
680 --disable-form disable checks for form functions
681 Testing/development Options:
682 --enable-warnings test: turn on gcc compiler warnings
683 --with-dmalloc test: use Gray Watson's dmalloc library
684 --with-dbmalloc test: use Conor Cahill's dbmalloc library
685 --with-valgrind test: use valgrind
686 --disable-leaks test: free permanent memory, analyze leaks
687 --disable-rpath-hack don't add rpath options for additional libraries
689 Some influential environment variables:
690 CC C compiler command
691 CFLAGS C compiler flags
692 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
693 nonstandard directory <lib dir>
694 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
695 headers in a nonstandard directory <include dir>
698 Use these variables to override the choices made by `configure' or to help
699 it to find libraries and programs with nonstandard names/locations.
704 if test "$ac_init_help" = "recursive"; then
705 # If there are subdirs, report their specific --help.
707 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
709 # A "../" for each directory in /$ac_subdir.
710 ac_dots=`echo $ac_subdir |
711 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
714 .) # No --srcdir option. We are building in place.
715 ac_sub_srcdir=$srcdir ;;
716 [\\/]* | ?:[\\/]* ) # Absolute path.
717 ac_sub_srcdir=$srcdir/$ac_subdir ;;
719 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
722 # Check for guested configure; otherwise get Cygnus style configure.
723 if test -f $ac_sub_srcdir/configure.gnu; then
725 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
726 elif test -f $ac_sub_srcdir/configure; then
728 $SHELL $ac_sub_srcdir/configure --help=recursive
729 elif test -f $ac_sub_srcdir/configure.ac ||
730 test -f $ac_sub_srcdir/configure.in; then
734 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
740 test -n "$ac_init_help" && exit 0
741 if $ac_init_version; then
744 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
745 Free Software Foundation, Inc.
746 This configure script is free software; the Free Software Foundation
747 gives unlimited permission to copy, distribute and modify it.
753 This file contains any messages produced by compilers while
754 running configure, to aid debugging if configure makes a mistake.
756 It was created by $as_me, which was
757 generated by GNU Autoconf 2.52.20170501. Invocation command line was
768 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
769 uname -m = `(uname -m) 2>/dev/null || echo unknown`
770 uname -r = `(uname -r) 2>/dev/null || echo unknown`
771 uname -s = `(uname -s) 2>/dev/null || echo unknown`
772 uname -v = `(uname -v) 2>/dev/null || echo unknown`
774 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
775 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
777 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
778 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
779 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
780 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
781 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
782 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
783 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
797 # Keep a trace of the command line.
798 # Strip out --no-create and --no-recursion so they do not pile up.
799 # Also quote any args containing shell meta-characters.
805 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
806 | --no-cr | --no-c) ;;
807 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
808 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
809 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
810 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
811 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
813 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
816 # Get rid of the leading space.
819 # When interrupted or exit'd, cleanup temporary files, and complete
820 # config.log. We remove comments because anyway the quotes in there
821 # would cause problems or look ugly.
823 # Save into config.log some information that might help in debugging.
825 echo "## ----------------- ##" >&5
826 echo "## Cache variables. ##" >&5
827 echo "## ----------------- ##" >&5
829 # The following way of writing the cache mishandles newlines in values,
832 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
835 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
836 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844 sed "/^$/d" confdefs.h >conftest.log
845 if test -s conftest.log; then
847 echo "## ------------ ##" >&5
848 echo "## confdefs.h. ##" >&5
849 echo "## ------------ ##" >&5
854 test "$ac_signal" != 0 &&
855 echo "$as_me: caught signal $ac_signal" >&5
856 echo "$as_me: exit $exit_status" >&5
857 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
860 for ac_signal in 1 2 13 15; do
861 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 # confdefs.h avoids OS command line length limits that DEFS can exceed.
866 rm -rf conftest* confdefs.h
867 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
870 # Let the site file select an alternate cache file if it wants to.
871 # Prefer explicitly selected file to automatically selected ones.
872 if test -z "$CONFIG_SITE"; then
873 if test "x$prefix" != xNONE; then
874 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
876 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
879 for ac_site_file in $CONFIG_SITE; do
880 if test -r "$ac_site_file"; then
881 { echo "$as_me:881: loading site script $ac_site_file" >&5
882 echo "$as_me: loading site script $ac_site_file" >&6;}
883 cat "$ac_site_file" >&5
888 if test -r "$cache_file"; then
889 # Some versions of bash will fail to source /dev/null (special
890 # files actually), so we avoid doing that.
891 if test -f "$cache_file"; then
892 { echo "$as_me:892: loading cache $cache_file" >&5
893 echo "$as_me: loading cache $cache_file" >&6;}
895 [\\/]* | ?:[\\/]* ) . $cache_file;;
900 { echo "$as_me:900: creating cache $cache_file" >&5
901 echo "$as_me: creating cache $cache_file" >&6;}
905 # Check that the precious variables saved in the cache have kept the same
907 ac_cache_corrupted=false
908 for ac_var in `(set) 2>&1 |
909 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
910 eval ac_old_set=\$ac_cv_env_${ac_var}_set
911 eval ac_new_set=\$ac_env_${ac_var}_set
912 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
913 eval ac_new_val="\$ac_env_${ac_var}_value"
914 case $ac_old_set,$ac_new_set in
916 { echo "$as_me:916: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
917 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
918 ac_cache_corrupted=: ;;
920 { echo "$as_me:920: error: \`$ac_var' was not set in the previous run" >&5
921 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
922 ac_cache_corrupted=: ;;
925 if test "x$ac_old_val" != "x$ac_new_val"; then
926 { echo "$as_me:926: error: \`$ac_var' has changed since the previous run:" >&5
927 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
928 { echo "$as_me:928: former value: $ac_old_val" >&5
929 echo "$as_me: former value: $ac_old_val" >&2;}
930 { echo "$as_me:930: current value: $ac_new_val" >&5
931 echo "$as_me: current value: $ac_new_val" >&2;}
935 # Pass precious variables to config.status. It doesn't matter if
936 # we pass some twice (in addition to the command line arguments).
937 if test "$ac_new_set" = set; then
939 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
940 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
941 ac_configure_args="$ac_configure_args '$ac_arg'"
943 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
948 if $ac_cache_corrupted; then
949 { echo "$as_me:949: error: changes in the environment can compromise the build" >&5
950 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
951 { { echo "$as_me:951: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
952 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
953 { (exit 1); exit 1; }; }
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
961 ac_main_return=return
963 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
964 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
966 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
967 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
969 echo "#! $SHELL" >conftest.sh
970 echo "exit 0" >>conftest.sh
972 if { (echo "$as_me:972: PATH=\".;.\"; conftest.sh") >&5
973 (PATH=".;."; conftest.sh) 2>&5
975 echo "$as_me:975: \$? = $ac_status" >&5
976 (exit $ac_status); }; then
977 ac_path_separator=';'
981 PATH_SEPARATOR="$ac_path_separator"
984 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
986 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
988 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
991 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
992 if test -f $ac_dir/install-sh; then
994 ac_install_sh="$ac_aux_dir/install-sh -c"
996 elif test -f $ac_dir/install.sh; then
998 ac_install_sh="$ac_aux_dir/install.sh -c"
1000 elif test -f $ac_dir/shtool; then
1002 ac_install_sh="$ac_aux_dir/shtool install -c"
1006 if test -z "$ac_aux_dir"; then
1007 { { echo "$as_me:1007: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1008 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1009 { (exit 1); exit 1; }; }
1011 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1012 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1013 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015 # Make sure we can run config.sub.
1016 $ac_config_sub sun4 >/dev/null 2>&1 ||
1017 { { echo "$as_me:1017: error: cannot run $ac_config_sub" >&5
1018 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1019 { (exit 1); exit 1; }; }
1021 echo "$as_me:1021: checking build system type" >&5
1022 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1023 if test "${ac_cv_build+set}" = set; then
1024 echo $ECHO_N "(cached) $ECHO_C" >&6
1026 ac_cv_build_alias=$build_alias
1027 test -z "$ac_cv_build_alias" &&
1028 ac_cv_build_alias=`$ac_config_guess`
1029 test -z "$ac_cv_build_alias" &&
1030 { { echo "$as_me:1030: error: cannot guess build type; you must specify one" >&5
1031 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1032 { (exit 1); exit 1; }; }
1033 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1034 { { echo "$as_me:1034: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1035 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1036 { (exit 1); exit 1; }; }
1039 echo "$as_me:1039: result: $ac_cv_build" >&5
1040 echo "${ECHO_T}$ac_cv_build" >&6
1042 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1043 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1044 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054 ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056 { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058 { (exit 1); exit 1; }; }
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1068 system_name="$host_os"
1070 system_name="`(uname -s -r) 2>/dev/null`"
1071 if test -z "$system_name" ; then
1072 system_name="`(hostname) 2>/dev/null`"
1075 test -n "$system_name" &&
1076 cat >>confdefs.h <<EOF
1077 #define SYSTEM_NAME "$system_name"
1080 if test "${cf_cv_system_name+set}" = set; then
1081 echo $ECHO_N "(cached) $ECHO_C" >&6
1083 cf_cv_system_name="$system_name"
1086 test -z "$system_name" && system_name="$cf_cv_system_name"
1087 test -n "$cf_cv_system_name" && echo "$as_me:1087: result: Configuring for $cf_cv_system_name" >&5
1088 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1090 if test ".$system_name" != ".$cf_cv_system_name" ; then
1091 echo "$as_me:1091: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1092 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1093 { { echo "$as_me:1093: error: \"Please remove config.cache and try again.\"" >&5
1094 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1095 { (exit 1); exit 1; }; }
1098 test "$program_prefix" != NONE &&
1099 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1100 # Use a double $ so make ignores it.
1101 test "$program_suffix" != NONE &&
1102 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1103 # Double any \ or $. echo might interpret backslashes.
1104 # By default was `s,x,x', remove it if useless.
1105 cat <<\_ACEOF >conftest.sed
1106 s/[\\$]/&&/g;s/;s,x,x,$//
1108 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1111 echo "$as_me:1111: checking whether ${MAKE-make} sets \${MAKE}" >&5
1112 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1113 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1114 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1115 echo $ECHO_N "(cached) $ECHO_C" >&6
1117 cat >conftest.make <<\EOF
1119 @echo 'ac_maketemp="${MAKE}"'
1121 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1122 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1123 if test -n "$ac_maketemp"; then
1124 eval ac_cv_prog_make_${ac_make}_set=yes
1126 eval ac_cv_prog_make_${ac_make}_set=no
1130 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1131 echo "$as_me:1131: result: yes" >&5
1132 echo "${ECHO_T}yes" >&6
1135 echo "$as_me:1135: result: no" >&5
1136 echo "${ECHO_T}no" >&6
1137 SET_MAKE="MAKE=${MAKE-make}"
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146 if test -n "$ac_tool_prefix"; then
1147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1148 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1149 echo "$as_me:1149: checking for $ac_word" >&5
1150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1151 if test "${ac_cv_prog_CC+set}" = set; then
1152 echo $ECHO_N "(cached) $ECHO_C" >&6
1154 if test -n "$CC"; then
1155 ac_cv_prog_CC="$CC" # Let the user override the test.
1157 ac_save_IFS=$IFS; IFS=$ac_path_separator
1159 for ac_dir in $ac_dummy; do
1161 test -z "$ac_dir" && ac_dir=.
1162 $as_executable_p "$ac_dir/$ac_word" || continue
1163 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1164 echo "$as_me:1164: found $ac_dir/$ac_word" >&5
1171 if test -n "$CC"; then
1172 echo "$as_me:1172: result: $CC" >&5
1173 echo "${ECHO_T}$CC" >&6
1175 echo "$as_me:1175: result: no" >&5
1176 echo "${ECHO_T}no" >&6
1180 if test -z "$ac_cv_prog_CC"; then
1182 # Extract the first word of "gcc", so it can be a program name with args.
1183 set dummy gcc; ac_word=$2
1184 echo "$as_me:1184: checking for $ac_word" >&5
1185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1186 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1187 echo $ECHO_N "(cached) $ECHO_C" >&6
1189 if test -n "$ac_ct_CC"; then
1190 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1192 ac_save_IFS=$IFS; IFS=$ac_path_separator
1194 for ac_dir in $ac_dummy; do
1196 test -z "$ac_dir" && ac_dir=.
1197 $as_executable_p "$ac_dir/$ac_word" || continue
1198 ac_cv_prog_ac_ct_CC="gcc"
1199 echo "$as_me:1199: found $ac_dir/$ac_word" >&5
1205 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1206 if test -n "$ac_ct_CC"; then
1207 echo "$as_me:1207: result: $ac_ct_CC" >&5
1208 echo "${ECHO_T}$ac_ct_CC" >&6
1210 echo "$as_me:1210: result: no" >&5
1211 echo "${ECHO_T}no" >&6
1219 if test -z "$CC"; then
1220 if test -n "$ac_tool_prefix"; then
1221 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1222 set dummy ${ac_tool_prefix}cc; ac_word=$2
1223 echo "$as_me:1223: checking for $ac_word" >&5
1224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1225 if test "${ac_cv_prog_CC+set}" = set; then
1226 echo $ECHO_N "(cached) $ECHO_C" >&6
1228 if test -n "$CC"; then
1229 ac_cv_prog_CC="$CC" # Let the user override the test.
1231 ac_save_IFS=$IFS; IFS=$ac_path_separator
1233 for ac_dir in $ac_dummy; do
1235 test -z "$ac_dir" && ac_dir=.
1236 $as_executable_p "$ac_dir/$ac_word" || continue
1237 ac_cv_prog_CC="${ac_tool_prefix}cc"
1238 echo "$as_me:1238: found $ac_dir/$ac_word" >&5
1245 if test -n "$CC"; then
1246 echo "$as_me:1246: result: $CC" >&5
1247 echo "${ECHO_T}$CC" >&6
1249 echo "$as_me:1249: result: no" >&5
1250 echo "${ECHO_T}no" >&6
1254 if test -z "$ac_cv_prog_CC"; then
1256 # Extract the first word of "cc", so it can be a program name with args.
1257 set dummy cc; ac_word=$2
1258 echo "$as_me:1258: checking for $ac_word" >&5
1259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1260 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1261 echo $ECHO_N "(cached) $ECHO_C" >&6
1263 if test -n "$ac_ct_CC"; then
1264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1266 ac_save_IFS=$IFS; IFS=$ac_path_separator
1268 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 $as_executable_p "$ac_dir/$ac_word" || continue
1272 ac_cv_prog_ac_ct_CC="cc"
1273 echo "$as_me:1273: found $ac_dir/$ac_word" >&5
1279 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1280 if test -n "$ac_ct_CC"; then
1281 echo "$as_me:1281: result: $ac_ct_CC" >&5
1282 echo "${ECHO_T}$ac_ct_CC" >&6
1284 echo "$as_me:1284: result: no" >&5
1285 echo "${ECHO_T}no" >&6
1294 if test -z "$CC"; then
1295 # Extract the first word of "cc", so it can be a program name with args.
1296 set dummy cc; ac_word=$2
1297 echo "$as_me:1297: checking for $ac_word" >&5
1298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1299 if test "${ac_cv_prog_CC+set}" = set; then
1300 echo $ECHO_N "(cached) $ECHO_C" >&6
1302 if test -n "$CC"; then
1303 ac_cv_prog_CC="$CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1313 ac_prog_rejected=yes
1317 echo "$as_me:1317: found $ac_dir/$ac_word" >&5
1321 if test $ac_prog_rejected = yes; then
1322 # We found a bogon in the path, so make sure we never use it.
1323 set dummy $ac_cv_prog_CC
1325 if test $# != 0; then
1326 # We chose a different compiler from the bogus one.
1327 # However, it has the same basename, so the bogon will be chosen
1328 # first if we set CC to just the basename; use the full file name.
1330 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1338 if test -n "$CC"; then
1339 echo "$as_me:1339: result: $CC" >&5
1340 echo "${ECHO_T}$CC" >&6
1342 echo "$as_me:1342: result: no" >&5
1343 echo "${ECHO_T}no" >&6
1347 if test -z "$CC"; then
1348 if test -n "$ac_tool_prefix"; then
1351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1353 echo "$as_me:1353: checking for $ac_word" >&5
1354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1355 if test "${ac_cv_prog_CC+set}" = set; then
1356 echo $ECHO_N "(cached) $ECHO_C" >&6
1358 if test -n "$CC"; then
1359 ac_cv_prog_CC="$CC" # Let the user override the test.
1361 ac_save_IFS=$IFS; IFS=$ac_path_separator
1363 for ac_dir in $ac_dummy; do
1365 test -z "$ac_dir" && ac_dir=.
1366 $as_executable_p "$ac_dir/$ac_word" || continue
1367 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1368 echo "$as_me:1368: found $ac_dir/$ac_word" >&5
1375 if test -n "$CC"; then
1376 echo "$as_me:1376: result: $CC" >&5
1377 echo "${ECHO_T}$CC" >&6
1379 echo "$as_me:1379: result: no" >&5
1380 echo "${ECHO_T}no" >&6
1383 test -n "$CC" && break
1386 if test -z "$CC"; then
1390 # Extract the first word of "$ac_prog", so it can be a program name with args.
1391 set dummy $ac_prog; ac_word=$2
1392 echo "$as_me:1392: checking for $ac_word" >&5
1393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1394 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1395 echo $ECHO_N "(cached) $ECHO_C" >&6
1397 if test -n "$ac_ct_CC"; then
1398 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1400 ac_save_IFS=$IFS; IFS=$ac_path_separator
1402 for ac_dir in $ac_dummy; do
1404 test -z "$ac_dir" && ac_dir=.
1405 $as_executable_p "$ac_dir/$ac_word" || continue
1406 ac_cv_prog_ac_ct_CC="$ac_prog"
1407 echo "$as_me:1407: found $ac_dir/$ac_word" >&5
1413 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1414 if test -n "$ac_ct_CC"; then
1415 echo "$as_me:1415: result: $ac_ct_CC" >&5
1416 echo "${ECHO_T}$ac_ct_CC" >&6
1418 echo "$as_me:1418: result: no" >&5
1419 echo "${ECHO_T}no" >&6
1422 test -n "$ac_ct_CC" && break
1430 test -z "$CC" && { { echo "$as_me:1430: error: no acceptable cc found in \$PATH" >&5
1431 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1432 { (exit 1); exit 1; }; }
1434 # Provide some information about the compiler.
1435 echo "$as_me:1435:" \
1436 "checking for C compiler version" >&5
1437 ac_compiler=`set X $ac_compile; echo $2`
1438 { (eval echo "$as_me:1438: \"$ac_compiler --version </dev/null >&5\"") >&5
1439 (eval $ac_compiler --version </dev/null >&5) 2>&5
1441 echo "$as_me:1441: \$? = $ac_status" >&5
1442 (exit $ac_status); }
1443 { (eval echo "$as_me:1443: \"$ac_compiler -v </dev/null >&5\"") >&5
1444 (eval $ac_compiler -v </dev/null >&5) 2>&5
1446 echo "$as_me:1446: \$? = $ac_status" >&5
1447 (exit $ac_status); }
1448 { (eval echo "$as_me:1448: \"$ac_compiler -V </dev/null >&5\"") >&5
1449 (eval $ac_compiler -V </dev/null >&5) 2>&5
1451 echo "$as_me:1451: \$? = $ac_status" >&5
1452 (exit $ac_status); }
1454 cat >conftest.$ac_ext <<_ACEOF
1455 #line 1455 "configure"
1456 #include "confdefs.h"
1466 ac_clean_files_save=$ac_clean_files
1467 ac_clean_files="$ac_clean_files a.out a.exe"
1468 # Try to create an executable without -o first, disregard a.out.
1469 # It will help us diagnose broken compilers, and finding out an intuition
1471 echo "$as_me:1471: checking for C compiler default output" >&5
1472 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1473 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1474 if { (eval echo "$as_me:1474: \"$ac_link_default\"") >&5
1475 (eval $ac_link_default) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit $ac_status); }; then
1479 # Find the output, starting from the most likely. This scheme is
1480 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1482 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1483 ls a.out conftest 2>/dev/null;
1484 ls a.* conftest.* 2>/dev/null`; do
1486 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1487 a.out ) # We found the default executable, but exeext='' is most
1490 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1491 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1498 echo "$as_me: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1500 { { echo "$as_me:1500: error: C compiler cannot create executables" >&5
1501 echo "$as_me: error: C compiler cannot create executables" >&2;}
1502 { (exit 77); exit 77; }; }
1505 ac_exeext=$ac_cv_exeext
1506 echo "$as_me:1506: result: $ac_file" >&5
1507 echo "${ECHO_T}$ac_file" >&6
1509 # Check the compiler produces executables we can run. If not, either
1510 # the compiler is broken, or we cross compile.
1511 echo "$as_me:1511: checking whether the C compiler works" >&5
1512 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1513 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1514 # If not cross compiling, check that we can run a simple program.
1515 if test "$cross_compiling" != yes; then
1516 if { ac_try='./$ac_file'
1517 { (eval echo "$as_me:1517: \"$ac_try\"") >&5
1520 echo "$as_me:1520: \$? = $ac_status" >&5
1521 (exit $ac_status); }; }; then
1524 if test "$cross_compiling" = maybe; then
1527 { { echo "$as_me:1527: error: cannot run C compiled programs.
1528 If you meant to cross compile, use \`--host'." >&5
1529 echo "$as_me: error: cannot run C compiled programs.
1530 If you meant to cross compile, use \`--host'." >&2;}
1531 { (exit 1); exit 1; }; }
1535 echo "$as_me:1535: result: yes" >&5
1536 echo "${ECHO_T}yes" >&6
1538 rm -f a.out a.exe conftest$ac_cv_exeext
1539 ac_clean_files=$ac_clean_files_save
1540 # Check the compiler produces executables we can run. If not, either
1541 # the compiler is broken, or we cross compile.
1542 echo "$as_me:1542: checking whether we are cross compiling" >&5
1543 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1544 echo "$as_me:1544: result: $cross_compiling" >&5
1545 echo "${ECHO_T}$cross_compiling" >&6
1547 echo "$as_me:1547: checking for executable suffix" >&5
1548 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1549 if { (eval echo "$as_me:1549: \"$ac_link\"") >&5
1550 (eval $ac_link) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; then
1554 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1555 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1556 # work properly (i.e., refer to `conftest.exe'), while it won't with
1558 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1560 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1568 { { echo "$as_me:1568: error: cannot compute EXEEXT: cannot compile and link" >&5
1569 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1570 { (exit 1); exit 1; }; }
1573 rm -f conftest$ac_cv_exeext
1574 echo "$as_me:1574: result: $ac_cv_exeext" >&5
1575 echo "${ECHO_T}$ac_cv_exeext" >&6
1577 rm -f conftest.$ac_ext
1578 EXEEXT=$ac_cv_exeext
1580 echo "$as_me:1580: checking for object suffix" >&5
1581 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1582 if test "${ac_cv_objext+set}" = set; then
1583 echo $ECHO_N "(cached) $ECHO_C" >&6
1585 cat >conftest.$ac_ext <<_ACEOF
1586 #line 1586 "configure"
1587 #include "confdefs.h"
1597 rm -f conftest.o conftest.obj
1598 if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5
1599 (eval $ac_compile) 2>&5
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); }; then
1603 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1605 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1606 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1611 echo "$as_me: failed program was:" >&5
1612 cat conftest.$ac_ext >&5
1613 { { echo "$as_me:1613: error: cannot compute OBJEXT: cannot compile" >&5
1614 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1615 { (exit 1); exit 1; }; }
1618 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1620 echo "$as_me:1620: result: $ac_cv_objext" >&5
1621 echo "${ECHO_T}$ac_cv_objext" >&6
1622 OBJEXT=$ac_cv_objext
1624 echo "$as_me:1624: checking whether we are using the GNU C compiler" >&5
1625 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1626 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1627 echo $ECHO_N "(cached) $ECHO_C" >&6
1629 cat >conftest.$ac_ext <<_ACEOF
1630 #line 1630 "configure"
1631 #include "confdefs.h"
1644 rm -f conftest.$ac_objext
1645 if { (eval echo "$as_me:1645: \"$ac_compile\"") >&5
1646 (eval $ac_compile) 2>&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); } &&
1650 { ac_try='test -s conftest.$ac_objext'
1651 { (eval echo "$as_me:1651: \"$ac_try\"") >&5
1654 echo "$as_me:1654: \$? = $ac_status" >&5
1655 (exit $ac_status); }; }; then
1658 echo "$as_me: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1662 rm -f conftest.$ac_objext conftest.$ac_ext
1663 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1666 echo "$as_me:1666: result: $ac_cv_c_compiler_gnu" >&5
1667 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1668 GCC=`test $ac_compiler_gnu = yes && echo yes`
1669 ac_test_CFLAGS=${CFLAGS+set}
1670 ac_save_CFLAGS=$CFLAGS
1672 echo "$as_me:1672: checking whether $CC accepts -g" >&5
1673 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1674 if test "${ac_cv_prog_cc_g+set}" = set; then
1675 echo $ECHO_N "(cached) $ECHO_C" >&6
1677 cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1689 rm -f conftest.$ac_objext
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691 (eval $ac_compile) 2>&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); } &&
1695 { ac_try='test -s conftest.$ac_objext'
1696 { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1699 echo "$as_me:1699: \$? = $ac_status" >&5
1700 (exit $ac_status); }; }; then
1703 echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1707 rm -f conftest.$ac_objext conftest.$ac_ext
1709 echo "$as_me:1709: result: $ac_cv_prog_cc_g" >&5
1710 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1711 if test "$ac_test_CFLAGS" = set; then
1712 CFLAGS=$ac_save_CFLAGS
1713 elif test $ac_cv_prog_cc_g = yes; then
1714 if test "$GCC" = yes; then
1720 if test "$GCC" = yes; then
1726 # Some people use a C++ compiler to compile C. Since we use `exit',
1727 # in C++ we need to declare it. In case someone uses the same compiler
1728 # for both compiling C and C++ we need to have the C++ compiler decide
1729 # the declaration of exit, since it's the most demanding environment.
1730 cat >conftest.$ac_ext <<_ACEOF
1735 rm -f conftest.$ac_objext
1736 if { (eval echo "$as_me:1736: \"$ac_compile\"") >&5
1737 (eval $ac_compile) 2>&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); } &&
1741 { ac_try='test -s conftest.$ac_objext'
1742 { (eval echo "$as_me:1742: \"$ac_try\"") >&5
1745 echo "$as_me:1745: \$? = $ac_status" >&5
1746 (exit $ac_status); }; }; then
1747 for ac_declaration in \
1749 '#include <stdlib.h>' \
1750 'extern "C" void std::exit (int) throw (); using std::exit;' \
1751 'extern "C" void std::exit (int); using std::exit;' \
1752 'extern "C" void exit (int) throw ();' \
1753 'extern "C" void exit (int);' \
1756 cat >conftest.$ac_ext <<_ACEOF
1757 #line 1757 "configure"
1758 #include "confdefs.h"
1769 rm -f conftest.$ac_objext
1770 if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
1771 (eval $ac_compile) 2>&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); } &&
1775 { ac_try='test -s conftest.$ac_objext'
1776 { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1779 echo "$as_me:1779: \$? = $ac_status" >&5
1780 (exit $ac_status); }; }; then
1783 echo "$as_me: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1787 rm -f conftest.$ac_objext conftest.$ac_ext
1788 cat >conftest.$ac_ext <<_ACEOF
1789 #line 1789 "configure"
1790 #include "confdefs.h"
1800 rm -f conftest.$ac_objext
1801 if { (eval echo "$as_me:1801: \"$ac_compile\"") >&5
1802 (eval $ac_compile) 2>&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); } &&
1806 { ac_try='test -s conftest.$ac_objext'
1807 { (eval echo "$as_me:1807: \"$ac_try\"") >&5
1810 echo "$as_me:1810: \$? = $ac_status" >&5
1811 (exit $ac_status); }; }; then
1814 echo "$as_me: failed program was:" >&5
1815 cat conftest.$ac_ext >&5
1817 rm -f conftest.$ac_objext conftest.$ac_ext
1820 if test -n "$ac_declaration"; then
1821 echo '#ifdef __cplusplus' >>confdefs.h
1822 echo $ac_declaration >>confdefs.h
1823 echo '#endif' >>confdefs.h
1827 echo "$as_me: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 rm -f conftest.$ac_objext conftest.$ac_ext
1832 ac_cpp='$CPP $CPPFLAGS'
1833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1836 ac_main_return=return
1839 if test "$GCC" = yes ; then
1840 echo "$as_me:1840: checking version of $CC" >&5
1841 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1842 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.].*//'`"
1843 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1844 echo "$as_me:1844: result: $GCC_VERSION" >&5
1845 echo "${ECHO_T}$GCC_VERSION" >&6
1848 echo "$as_me:1848: checking for $CC option to accept ANSI C" >&5
1849 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1850 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1851 echo $ECHO_N "(cached) $ECHO_C" >&6
1853 ac_cv_prog_cc_stdc=no
1855 cat >conftest.$ac_ext <<_ACEOF
1856 #line 1856 "configure"
1857 #include "confdefs.h"
1860 #include <sys/types.h>
1861 #include <sys/stat.h>
1862 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1863 struct buf { int x; };
1864 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1865 static char *e (p, i)
1871 static char *f (char * (*g) (char **, int), char **p, ...)
1876 s = g (p, va_arg (v,int));
1880 int test (int i, double x);
1881 struct s1 {int (*f) (int a);};
1882 struct s2 {int (*f) (double a);};
1883 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1889 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1894 # Don't try gcc -ansi; that turns off useful extensions and
1895 # breaks some systems' header files.
1896 # AIX -qlanglvl=ansi
1897 # Ultrix and OSF/1 -std1
1898 # HP-UX 10.20 and later -Ae
1899 # HP-UX older versions -Aa -D_HPUX_SOURCE
1900 # SVR4 -Xc -D__EXTENSIONS__
1901 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1903 CC="$ac_save_CC $ac_arg"
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906 (eval $ac_compile) 2>&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); } &&
1910 { ac_try='test -s conftest.$ac_objext'
1911 { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1914 echo "$as_me:1914: \$? = $ac_status" >&5
1915 (exit $ac_status); }; }; then
1916 ac_cv_prog_cc_stdc=$ac_arg
1919 echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1922 rm -f conftest.$ac_objext
1924 rm -f conftest.$ac_ext conftest.$ac_objext
1929 case "x$ac_cv_prog_cc_stdc" in
1931 echo "$as_me:1931: result: none needed" >&5
1932 echo "${ECHO_T}none needed" >&6 ;;
1934 echo "$as_me:1934: result: $ac_cv_prog_cc_stdc" >&5
1935 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1936 CC="$CC $ac_cv_prog_cc_stdc" ;;
1939 # This should have been defined by AC_PROG_CC
1942 echo "$as_me:1942: checking \$CC variable" >&5
1943 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1946 echo "$as_me:1946: result: broken" >&5
1947 echo "${ECHO_T}broken" >&6
1948 { echo "$as_me:1948: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1949 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1951 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1952 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1954 for cf_arg in $cf_flags
1962 cf_new_extra_cppflags=
1964 for cf_add_cflags in $cf_arg
1966 case $cf_fix_cppflags in
1968 case $cf_add_cflags in
1969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1970 case $cf_add_cflags in
1972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1975 && test -z "${cf_tst_cflags}" \
1976 && cf_fix_cppflags=yes
1978 if test $cf_fix_cppflags = yes ; then
1980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1984 elif test "${cf_tst_cflags}" = "\"'" ; then
1986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1997 case $cf_add_cflags in
1999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2001 CPPFLAGS=`echo "$CPPFLAGS" | \
2002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2027 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2030 && test -z "${cf_tst_cflags}" \
2031 && cf_fix_cppflags=no
2036 if test -n "$cf_new_cflags" ; then
2038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2039 CFLAGS="${CFLAGS}$cf_new_cflags"
2043 if test -n "$cf_new_cppflags" ; then
2045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2050 if test -n "$cf_new_extra_cppflags" ; then
2052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2063 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2065 echo "${as_me:-configure}:2065: testing resulting CC: '$CC' ..." 1>&5
2067 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2069 echo "${as_me:-configure}:2069: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2071 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2073 echo "${as_me:-configure}:2073: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2077 echo "$as_me:2077: result: ok" >&5
2078 echo "${ECHO_T}ok" >&6
2082 echo "$as_me:2082: checking for inline" >&5
2083 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2084 if test "${ac_cv_c_inline+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
2088 for ac_kw in inline __inline__ __inline; do
2089 cat >conftest.$ac_ext <<_ACEOF
2090 #line 2090 "configure"
2091 #include "confdefs.h"
2093 static $ac_kw int static_foo () {return 0; }
2094 $ac_kw int foo () {return 0; }
2098 rm -f conftest.$ac_objext
2099 if { (eval echo "$as_me:2099: \"$ac_compile\"") >&5
2100 (eval $ac_compile) 2>&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } &&
2104 { ac_try='test -s conftest.$ac_objext'
2105 { (eval echo "$as_me:2105: \"$ac_try\"") >&5
2108 echo "$as_me:2108: \$? = $ac_status" >&5
2109 (exit $ac_status); }; }; then
2110 ac_cv_c_inline=$ac_kw; break
2112 echo "$as_me: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2115 rm -f conftest.$ac_objext conftest.$ac_ext
2119 echo "$as_me:2119: result: $ac_cv_c_inline" >&5
2120 echo "${ECHO_T}$ac_cv_c_inline" >&6
2121 case $ac_cv_c_inline in
2124 cat >>confdefs.h <<\EOF
2128 *) cat >>confdefs.h <<EOF
2129 #define inline $ac_cv_c_inline
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2146 if test -z "$CPP"; then
2147 if test "${ac_cv_prog_CPP+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2150 # Double quotes because CPP needs to be expanded
2151 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2154 for ac_c_preproc_warn_flag in '' yes
2156 # Use a header file that comes with gcc, so configuring glibc
2157 # with a fresh cross-compiler works.
2158 # On the NeXT, cc -E runs the code through the compiler's parser,
2159 # not just through cpp. "Syntax error" is here to catch this case.
2160 cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169 egrep -v '^ *\+' conftest.er1 >conftest.err
2171 cat conftest.err >&5
2172 echo "$as_me:2172: \$? = $ac_status" >&5
2173 (exit $ac_status); } >/dev/null; then
2174 if test -s conftest.err; then
2175 ac_cpp_err=$ac_c_preproc_warn_flag
2182 if test -z "$ac_cpp_err"; then
2185 echo "$as_me: failed program was:" >&5
2186 cat conftest.$ac_ext >&5
2187 # Broken: fails on valid input.
2190 rm -f conftest.err conftest.$ac_ext
2192 # OK, works on sane cases. Now check whether non-existent headers
2193 # can be detected and how.
2194 cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202 egrep -v '^ *\+' conftest.er1 >conftest.err
2204 cat conftest.err >&5
2205 echo "$as_me:2205: \$? = $ac_status" >&5
2206 (exit $ac_status); } >/dev/null; then
2207 if test -s conftest.err; then
2208 ac_cpp_err=$ac_c_preproc_warn_flag
2215 if test -z "$ac_cpp_err"; then
2216 # Broken: success on invalid input.
2219 echo "$as_me: failed program was:" >&5
2220 cat conftest.$ac_ext >&5
2221 # Passes both tests.
2225 rm -f conftest.err conftest.$ac_ext
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2245 for ac_c_preproc_warn_flag in '' yes
2247 # Use a header file that comes with gcc, so configuring glibc
2248 # with a fresh cross-compiler works.
2249 # On the NeXT, cc -E runs the code through the compiler's parser,
2250 # not just through cpp. "Syntax error" is here to catch this case.
2251 cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260 egrep -v '^ *\+' conftest.er1 >conftest.err
2262 cat conftest.err >&5
2263 echo "$as_me:2263: \$? = $ac_status" >&5
2264 (exit $ac_status); } >/dev/null; then
2265 if test -s conftest.err; then
2266 ac_cpp_err=$ac_c_preproc_warn_flag
2273 if test -z "$ac_cpp_err"; then
2276 echo "$as_me: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2278 # Broken: fails on valid input.
2281 rm -f conftest.err conftest.$ac_ext
2283 # OK, works on sane cases. Now check whether non-existent headers
2284 # can be detected and how.
2285 cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293 egrep -v '^ *\+' conftest.er1 >conftest.err
2295 cat conftest.err >&5
2296 echo "$as_me:2296: \$? = $ac_status" >&5
2297 (exit $ac_status); } >/dev/null; then
2298 if test -s conftest.err; then
2299 ac_cpp_err=$ac_c_preproc_warn_flag
2306 if test -z "$ac_cpp_err"; then
2307 # Broken: success on invalid input.
2310 echo "$as_me: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2312 # Passes both tests.
2316 rm -f conftest.err conftest.$ac_ext
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2324 { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326 { (exit 1); exit 1; }; }
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2336 for ac_prog in mawk gawk nawk awk
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo "$as_me:2340: checking for $ac_word" >&5
2341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2342 if test "${ac_cv_prog_AWK+set}" = set; then
2343 echo $ECHO_N "(cached) $ECHO_C" >&6
2345 if test -n "$AWK"; then
2346 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2348 ac_save_IFS=$IFS; IFS=$ac_path_separator
2350 for ac_dir in $ac_dummy; do
2352 test -z "$ac_dir" && ac_dir=.
2353 $as_executable_p "$ac_dir/$ac_word" || continue
2354 ac_cv_prog_AWK="$ac_prog"
2355 echo "$as_me:2355: found $ac_dir/$ac_word" >&5
2362 if test -n "$AWK"; then
2363 echo "$as_me:2363: result: $AWK" >&5
2364 echo "${ECHO_T}$AWK" >&6
2366 echo "$as_me:2366: result: no" >&5
2367 echo "${ECHO_T}no" >&6
2370 test -n "$AWK" && break
2373 # Find a good install program. We prefer a C program (faster),
2374 # so one script is as good as another. But avoid the broken or
2375 # incompatible versions:
2376 # SysV /etc/install, /usr/sbin/install
2377 # SunOS /usr/etc/install
2378 # IRIX /sbin/install
2380 # AmigaOS /C/install, which installs bootblocks on floppy discs
2381 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2382 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2383 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2384 # ./install, which can be erroneously created by make from ./install.sh.
2385 echo "$as_me:2385: checking for a BSD compatible install" >&5
2386 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2387 if test -z "$INSTALL"; then
2388 if test "${ac_cv_path_install+set}" = set; then
2389 echo $ECHO_N "(cached) $ECHO_C" >&6
2391 ac_save_IFS=$IFS; IFS=$ac_path_separator
2392 for ac_dir in $PATH; do
2394 # Account for people who put trailing slashes in PATH elements.
2396 / | ./ | .// | /cC/* \
2397 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2400 # OSF1 and SCO ODT 3.0 have their own names for install.
2401 # Don't use installbsd from OSF since it installs stuff as root
2403 for ac_prog in ginstall scoinst install; do
2404 if $as_executable_p "$ac_dir/$ac_prog"; then
2405 if test $ac_prog = install &&
2406 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2407 # AIX install. It has an incompatible calling convention.
2409 elif test $ac_prog = install &&
2410 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2411 # program-specific install script used by HP pwplus--don't use.
2414 ac_cv_path_install="$ac_dir/$ac_prog -c"
2424 if test "${ac_cv_path_install+set}" = set; then
2425 INSTALL=$ac_cv_path_install
2427 # As a last resort, use the slow shell script. We don't cache a
2428 # path for INSTALL within a source directory, because that will
2429 # break other packages using the cache if that directory is
2430 # removed, or if the path is relative.
2431 INSTALL=$ac_install_sh
2434 echo "$as_me:2434: result: $INSTALL" >&5
2435 echo "${ECHO_T}$INSTALL" >&6
2437 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2438 # It thinks the first close brace ends the variable substitution.
2439 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2441 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2443 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2449 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2450 test -z "$cf_dir" && cf_dir=.
2451 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2455 echo "$as_me:2455: checking if you want to install stripped executables" >&5
2456 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2458 # Check whether --enable-stripping or --disable-stripping was given.
2459 if test "${enable_stripping+set}" = set; then
2460 enableval="$enable_stripping"
2461 test "$enableval" != no && enableval=yes
2462 if test "$enableval" != "yes" ; then
2472 echo "$as_me:2472: result: $with_stripping" >&5
2473 echo "${ECHO_T}$with_stripping" >&6
2475 if test "$with_stripping" = yes
2482 echo "$as_me:2482: checking if install needs to be told about ownership" >&5
2483 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2484 case `$ac_config_guess` in
2493 echo "$as_me:2493: result: $with_install_o" >&5
2494 echo "${ECHO_T}$with_install_o" >&6
2495 if test "x$with_install_o" = xyes
2497 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2502 for ac_prog in lint cppcheck splint
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_prog_LINT+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2511 if test -n "$LINT"; then
2512 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2514 ac_save_IFS=$IFS; IFS=$ac_path_separator
2516 for ac_dir in $ac_dummy; do
2518 test -z "$ac_dir" && ac_dir=.
2519 $as_executable_p "$ac_dir/$ac_word" || continue
2520 ac_cv_prog_LINT="$ac_prog"
2521 echo "$as_me:2521: found $ac_dir/$ac_word" >&5
2527 LINT=$ac_cv_prog_LINT
2528 if test -n "$LINT"; then
2529 echo "$as_me:2529: result: $LINT" >&5
2530 echo "${ECHO_T}$LINT" >&6
2532 echo "$as_me:2532: result: no" >&5
2533 echo "${ECHO_T}no" >&6
2536 test -n "$LINT" && break
2539 echo "$as_me:2539: checking if filesystem supports mixed-case filenames" >&5
2540 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2541 if test "${cf_cv_mixedcase+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2545 if test "$cross_compiling" = yes ; then
2546 case $target_alias in
2547 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2555 rm -f conftest CONFTEST
2557 if test -f CONFTEST ; then
2562 rm -f conftest CONFTEST
2566 echo "$as_me:2566: result: $cf_cv_mixedcase" >&5
2567 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2568 test "$cf_cv_mixedcase" = yes &&
2569 cat >>confdefs.h <<\EOF
2570 #define MIXEDCASE_FILENAMES 1
2573 for ac_prog in exctags ctags
2575 # Extract the first word of "$ac_prog", so it can be a program name with args.
2576 set dummy $ac_prog; ac_word=$2
2577 echo "$as_me:2577: checking for $ac_word" >&5
2578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2579 if test "${ac_cv_prog_CTAGS+set}" = set; then
2580 echo $ECHO_N "(cached) $ECHO_C" >&6
2582 if test -n "$CTAGS"; then
2583 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2585 ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 for ac_dir in $ac_dummy; do
2589 test -z "$ac_dir" && ac_dir=.
2590 $as_executable_p "$ac_dir/$ac_word" || continue
2591 ac_cv_prog_CTAGS="$ac_prog"
2592 echo "$as_me:2592: found $ac_dir/$ac_word" >&5
2598 CTAGS=$ac_cv_prog_CTAGS
2599 if test -n "$CTAGS"; then
2600 echo "$as_me:2600: result: $CTAGS" >&5
2601 echo "${ECHO_T}$CTAGS" >&6
2603 echo "$as_me:2603: result: no" >&5
2604 echo "${ECHO_T}no" >&6
2607 test -n "$CTAGS" && break
2610 for ac_prog in exetags etags
2612 # Extract the first word of "$ac_prog", so it can be a program name with args.
2613 set dummy $ac_prog; ac_word=$2
2614 echo "$as_me:2614: checking for $ac_word" >&5
2615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2616 if test "${ac_cv_prog_ETAGS+set}" = set; then
2617 echo $ECHO_N "(cached) $ECHO_C" >&6
2619 if test -n "$ETAGS"; then
2620 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2622 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $ac_dummy; do
2626 test -z "$ac_dir" && ac_dir=.
2627 $as_executable_p "$ac_dir/$ac_word" || continue
2628 ac_cv_prog_ETAGS="$ac_prog"
2629 echo "$as_me:2629: found $ac_dir/$ac_word" >&5
2635 ETAGS=$ac_cv_prog_ETAGS
2636 if test -n "$ETAGS"; then
2637 echo "$as_me:2637: result: $ETAGS" >&5
2638 echo "${ECHO_T}$ETAGS" >&6
2640 echo "$as_me:2640: result: no" >&5
2641 echo "${ECHO_T}no" >&6
2644 test -n "$ETAGS" && break
2647 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2648 set dummy ${CTAGS:-ctags}; ac_word=$2
2649 echo "$as_me:2649: checking for $ac_word" >&5
2650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2651 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2652 echo $ECHO_N "(cached) $ECHO_C" >&6
2654 if test -n "$MAKE_LOWER_TAGS"; then
2655 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2657 ac_save_IFS=$IFS; IFS=$ac_path_separator
2659 for ac_dir in $ac_dummy; do
2661 test -z "$ac_dir" && ac_dir=.
2662 $as_executable_p "$ac_dir/$ac_word" || continue
2663 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2664 echo "$as_me:2664: found $ac_dir/$ac_word" >&5
2668 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2671 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2672 if test -n "$MAKE_LOWER_TAGS"; then
2673 echo "$as_me:2673: result: $MAKE_LOWER_TAGS" >&5
2674 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2676 echo "$as_me:2676: result: no" >&5
2677 echo "${ECHO_T}no" >&6
2680 if test "$cf_cv_mixedcase" = yes ; then
2681 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2682 set dummy ${ETAGS:-etags}; ac_word=$2
2683 echo "$as_me:2683: checking for $ac_word" >&5
2684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2685 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2686 echo $ECHO_N "(cached) $ECHO_C" >&6
2688 if test -n "$MAKE_UPPER_TAGS"; then
2689 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2691 ac_save_IFS=$IFS; IFS=$ac_path_separator
2693 for ac_dir in $ac_dummy; do
2695 test -z "$ac_dir" && ac_dir=.
2696 $as_executable_p "$ac_dir/$ac_word" || continue
2697 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2698 echo "$as_me:2698: found $ac_dir/$ac_word" >&5
2702 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2705 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2706 if test -n "$MAKE_UPPER_TAGS"; then
2707 echo "$as_me:2707: result: $MAKE_UPPER_TAGS" >&5
2708 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2710 echo "$as_me:2710: result: no" >&5
2711 echo "${ECHO_T}no" >&6
2718 if test "$MAKE_UPPER_TAGS" = yes ; then
2724 if test "$MAKE_LOWER_TAGS" = yes ; then
2730 echo "$as_me:2730: checking if -lm needed for math functions" >&5
2731 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2732 if test "${cf_cv_need_libm+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
2736 cat >conftest.$ac_ext <<_ACEOF
2737 #line 2737 "configure"
2738 #include "confdefs.h"
2747 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2752 rm -f conftest.$ac_objext conftest$ac_exeext
2753 if { (eval echo "$as_me:2753: \"$ac_link\"") >&5
2754 (eval $ac_link) 2>&5
2756 echo "$as_me:2756: \$? = $ac_status" >&5
2757 (exit $ac_status); } &&
2758 { ac_try='test -s conftest$ac_exeext'
2759 { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2762 echo "$as_me:2762: \$? = $ac_status" >&5
2763 (exit $ac_status); }; }; then
2766 echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2772 echo "$as_me:2772: result: $cf_cv_need_libm" >&5
2773 echo "${ECHO_T}$cf_cv_need_libm" >&6
2774 if test "$cf_cv_need_libm" = yes
2782 CC_SHARED_OPTS=unknown
2783 CPPFLAGS="$CPPFLAGS"
2785 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2786 DFT_UPR_MODEL="NORMAL"
2799 PACKAGE="ncurses-examples"
2805 TINFO_LIBS='$(LIBS_CURSES)'
2806 cf_cv_abi_version=""
2807 cf_cv_rel_version=""
2813 if test "$GCC" = yes
2815 cat > conftest.i <<EOF
2817 #define GCC_PRINTF 0
2822 #ifndef GCC_NORETURN
2823 #define GCC_NORETURN /* nothing */
2826 #define GCC_UNUSED /* nothing */
2829 if test "$GCC" = yes
2831 { echo "$as_me:2831: checking for $CC __attribute__ directives..." >&5
2832 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2834 "${as_me:-configure}"
2835 #include "confdefs.h"
2836 #include "conftest.h"
2837 #include "conftest.i"
2839 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2841 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2844 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2846 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2848 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2849 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2850 extern void foo(void) GCC_NORETURN;
2851 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2853 cf_printf_attribute=no
2854 cf_scanf_attribute=no
2855 for cf_attribute in scanf printf unused noreturn
2858 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2860 cf_directive="__attribute__(($cf_attribute))"
2861 echo "checking for $CC $cf_directive" 1>&5
2863 case $cf_attribute in
2865 cf_printf_attribute=yes
2866 cat >conftest.h <<EOF
2867 #define GCC_$cf_ATTRIBUTE 1
2871 cf_scanf_attribute=yes
2872 cat >conftest.h <<EOF
2873 #define GCC_$cf_ATTRIBUTE 1
2877 cat >conftest.h <<EOF
2878 #define GCC_$cf_ATTRIBUTE $cf_directive
2883 if { (eval echo "$as_me:2883: \"$ac_compile\"") >&5
2884 (eval $ac_compile) 2>&5
2886 echo "$as_me:2886: \$? = $ac_status" >&5
2887 (exit $ac_status); }; then
2888 test -n "$verbose" && echo "$as_me:2888: result: ... $cf_attribute" >&5
2889 echo "${ECHO_T}... $cf_attribute" >&6
2890 cat conftest.h >>confdefs.h
2891 case $cf_attribute in
2894 cat >>confdefs.h <<EOF
2895 #define GCC_NORETURN $cf_directive
2900 cf_value='/* nothing */'
2901 if test "$cf_printf_attribute" != no ; then
2902 cf_value='__attribute__((format(printf,fmt,var)))'
2904 cat >>confdefs.h <<\EOF
2905 #define GCC_PRINTF 1
2910 cat >>confdefs.h <<EOF
2911 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2916 cf_value='/* nothing */'
2917 if test "$cf_scanf_attribute" != no ; then
2918 cf_value='__attribute__((format(scanf,fmt,var)))'
2920 cat >>confdefs.h <<\EOF
2926 cat >>confdefs.h <<EOF
2927 #define GCC_SCANFLIKE(fmt,var) $cf_value
2933 cat >>confdefs.h <<EOF
2934 #define GCC_UNUSED $cf_directive
2942 fgrep define conftest.i >>confdefs.h
2947 echo "$as_me:2947: checking if you want to work around bogus compiler/loader warnings" >&5
2948 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2950 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2951 if test "${enable_string_hacks+set}" = set; then
2952 enableval="$enable_string_hacks"
2953 with_string_hacks=$enableval
2955 with_string_hacks=no
2957 echo "$as_me:2957: result: $with_string_hacks" >&5
2958 echo "${ECHO_T}$with_string_hacks" >&6
2960 if test "x$with_string_hacks" = "xyes"; then
2962 cat >>confdefs.h <<\EOF
2963 #define USE_STRING_HACKS 1
2966 { echo "$as_me:2966: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2967 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2968 echo "$as_me:2968: checking for strlcat" >&5
2969 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2970 if test "${ac_cv_func_strlcat+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2973 cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 /* System header to define __stub macros and hopefully few prototypes,
2977 which can conflict with char strlcat (); below. */
2979 /* Override any gcc2 internal prototype to avoid an error. */
2983 /* We use char because int might match the return type of a gcc2
2984 builtin and then its argument prototype would still apply. */
2991 /* The GNU C library defines this for functions which it implements
2992 to always fail with ENOSYS. Some functions are actually named
2993 something starting with __ and the normal name is an alias. */
2994 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2997 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3004 rm -f conftest.$ac_objext conftest$ac_exeext
3005 if { (eval echo "$as_me:3005: \"$ac_link\"") >&5
3006 (eval $ac_link) 2>&5
3008 echo "$as_me:3008: \$? = $ac_status" >&5
3009 (exit $ac_status); } &&
3010 { ac_try='test -s conftest$ac_exeext'
3011 { (eval echo "$as_me:3011: \"$ac_try\"") >&5
3014 echo "$as_me:3014: \$? = $ac_status" >&5
3015 (exit $ac_status); }; }; then
3016 ac_cv_func_strlcat=yes
3018 echo "$as_me: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3020 ac_cv_func_strlcat=no
3022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3024 echo "$as_me:3024: result: $ac_cv_func_strlcat" >&5
3025 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3026 if test $ac_cv_func_strlcat = yes; then
3028 cat >>confdefs.h <<\EOF
3029 #define HAVE_STRLCAT 1
3034 echo "$as_me:3034: checking for strlcat in -lbsd" >&5
3035 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3036 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3037 echo $ECHO_N "(cached) $ECHO_C" >&6
3039 ac_check_lib_save_LIBS=$LIBS
3041 cat >conftest.$ac_ext <<_ACEOF
3042 #line 3042 "configure"
3043 #include "confdefs.h"
3045 /* Override any gcc2 internal prototype to avoid an error. */
3049 /* We use char because int might match the return type of a gcc2
3050 builtin and then its argument prototype would still apply. */
3060 rm -f conftest.$ac_objext conftest$ac_exeext
3061 if { (eval echo "$as_me:3061: \"$ac_link\"") >&5
3062 (eval $ac_link) 2>&5
3064 echo "$as_me:3064: \$? = $ac_status" >&5
3065 (exit $ac_status); } &&
3066 { ac_try='test -s conftest$ac_exeext'
3067 { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3070 echo "$as_me:3070: \$? = $ac_status" >&5
3071 (exit $ac_status); }; }; then
3072 ac_cv_lib_bsd_strlcat=yes
3074 echo "$as_me: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3076 ac_cv_lib_bsd_strlcat=no
3078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3079 LIBS=$ac_check_lib_save_LIBS
3081 echo "$as_me:3081: result: $ac_cv_lib_bsd_strlcat" >&5
3082 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3083 if test $ac_cv_lib_bsd_strlcat = yes; then
3086 # Filter out duplicates - this happens with badly-designed ".pc" files...
3087 for cf_add_1lib in $LIBS
3089 for cf_add_2lib in $cf_add_libs
3091 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3101 for ac_header in bsd/string.h
3103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3104 echo "$as_me:3104: checking for $ac_header" >&5
3105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3109 cat >conftest.$ac_ext <<_ACEOF
3110 #line 3110 "configure"
3111 #include "confdefs.h"
3112 #include <$ac_header>
3114 if { (eval echo "$as_me:3114: \"$ac_cpp conftest.$ac_ext\"") >&5
3115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3117 egrep -v '^ *\+' conftest.er1 >conftest.err
3119 cat conftest.err >&5
3120 echo "$as_me:3120: \$? = $ac_status" >&5
3121 (exit $ac_status); } >/dev/null; then
3122 if test -s conftest.err; then
3123 ac_cpp_err=$ac_c_preproc_warn_flag
3130 if test -z "$ac_cpp_err"; then
3131 eval "$as_ac_Header=yes"
3133 echo "$as_me: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3135 eval "$as_ac_Header=no"
3137 rm -f conftest.err conftest.$ac_ext
3139 echo "$as_me:3139: result: `eval echo '${'$as_ac_Header'}'`" >&5
3140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3141 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3142 cat >>confdefs.h <<EOF
3143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3149 cat >>confdefs.h <<\EOF
3150 #define HAVE_STRLCAT 1
3157 for ac_func in strlcpy snprintf
3159 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3160 echo "$as_me:3160: checking for $ac_func" >&5
3161 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3162 if eval "test \"\${$as_ac_var+set}\" = set"; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3165 cat >conftest.$ac_ext <<_ACEOF
3166 #line 3166 "configure"
3167 #include "confdefs.h"
3168 /* System header to define __stub macros and hopefully few prototypes,
3169 which can conflict with char $ac_func (); below. */
3171 /* Override any gcc2 internal prototype to avoid an error. */
3175 /* We use char because int might match the return type of a gcc2
3176 builtin and then its argument prototype would still apply. */
3183 /* The GNU C library defines this for functions which it implements
3184 to always fail with ENOSYS. Some functions are actually named
3185 something starting with __ and the normal name is an alias. */
3186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3189 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3196 rm -f conftest.$ac_objext conftest$ac_exeext
3197 if { (eval echo "$as_me:3197: \"$ac_link\"") >&5
3198 (eval $ac_link) 2>&5
3200 echo "$as_me:3200: \$? = $ac_status" >&5
3201 (exit $ac_status); } &&
3202 { ac_try='test -s conftest$ac_exeext'
3203 { (eval echo "$as_me:3203: \"$ac_try\"") >&5
3206 echo "$as_me:3206: \$? = $ac_status" >&5
3207 (exit $ac_status); }; }; then
3208 eval "$as_ac_var=yes"
3210 echo "$as_me: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 eval "$as_ac_var=no"
3214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3216 echo "$as_me:3216: result: `eval echo '${'$as_ac_var'}'`" >&5
3217 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3218 if test `eval echo '${'$as_ac_var'}'` = yes; then
3219 cat >>confdefs.h <<EOF
3220 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3229 cf_POSIX_C_SOURCE=199506L
3234 cf_xopen_source="-D_ALL_SOURCE"
3240 cf_xopen_source="-D_APPLE_C_SOURCE"
3243 cf_xopen_source="-D_DARWIN_C_SOURCE"
3246 (freebsd*|dragonfly*)
3247 # 5.x headers associate
3248 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3249 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3250 cf_POSIX_C_SOURCE=200112L
3252 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3255 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3258 cf_xopen_source="-D_HPUX_SOURCE"
3261 cf_xopen_source="-D_SGI_SOURCE"
3264 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3266 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3268 echo "$as_me:3268: checking if this is the GNU C library" >&5
3269 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3270 if test "${cf_cv_gnu_library+set}" = set; then
3271 echo $ECHO_N "(cached) $ECHO_C" >&6
3274 cat >conftest.$ac_ext <<_ACEOF
3275 #line 3275 "configure"
3276 #include "confdefs.h"
3277 #include <sys/types.h>
3282 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3285 # error not GNU C library
3291 rm -f conftest.$ac_objext
3292 if { (eval echo "$as_me:3292: \"$ac_compile\"") >&5
3293 (eval $ac_compile) 2>&5
3295 echo "$as_me:3295: \$? = $ac_status" >&5
3296 (exit $ac_status); } &&
3297 { ac_try='test -s conftest.$ac_objext'
3298 { (eval echo "$as_me:3298: \"$ac_try\"") >&5
3301 echo "$as_me:3301: \$? = $ac_status" >&5
3302 (exit $ac_status); }; }; then
3303 cf_cv_gnu_library=yes
3305 echo "$as_me: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3307 cf_cv_gnu_library=no
3309 rm -f conftest.$ac_objext conftest.$ac_ext
3312 echo "$as_me:3312: result: $cf_cv_gnu_library" >&5
3313 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3315 if test x$cf_cv_gnu_library = xyes; then
3317 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3318 # was changed to help a little...
3319 echo "$as_me:3319: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3320 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3321 if test "${cf_cv_gnu_library_219+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3326 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3327 cat >conftest.$ac_ext <<_ACEOF
3328 #line 3328 "configure"
3329 #include "confdefs.h"
3330 #include <sys/types.h>
3335 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3338 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3344 rm -f conftest.$ac_objext
3345 if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346 (eval $ac_compile) 2>&5
3348 echo "$as_me:3348: \$? = $ac_status" >&5
3349 (exit $ac_status); } &&
3350 { ac_try='test -s conftest.$ac_objext'
3351 { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3354 echo "$as_me:3354: \$? = $ac_status" >&5
3355 (exit $ac_status); }; }; then
3356 cf_cv_gnu_library_219=yes
3358 echo "$as_me: failed program was:" >&5
3359 cat conftest.$ac_ext >&5
3360 cf_cv_gnu_library_219=no
3362 rm -f conftest.$ac_objext conftest.$ac_ext
3366 echo "$as_me:3366: result: $cf_cv_gnu_library_219" >&5
3367 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3369 if test "x$cf_cv_gnu_library_219" = xyes; then
3370 echo "$as_me:3370: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3371 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3372 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3373 echo $ECHO_N "(cached) $ECHO_C" >&6
3377 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source"
3378 cat >conftest.$ac_ext <<_ACEOF
3379 #line 3379 "configure"
3380 #include "confdefs.h"
3383 #include <sys/types.h>
3389 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3392 # error GNU C library is too old
3398 rm -f conftest.$ac_objext
3399 if { (eval echo "$as_me:3399: \"$ac_compile\"") >&5
3400 (eval $ac_compile) 2>&5
3402 echo "$as_me:3402: \$? = $ac_status" >&5
3403 (exit $ac_status); } &&
3404 { ac_try='test -s conftest.$ac_objext'
3405 { (eval echo "$as_me:3405: \"$ac_try\"") >&5
3408 echo "$as_me:3408: \$? = $ac_status" >&5
3409 (exit $ac_status); }; }; then
3410 cf_cv_gnu_dftsrc_219=yes
3412 echo "$as_me: failed program was:" >&5
3413 cat conftest.$ac_ext >&5
3414 cf_cv_gnu_dftsrc_219=no
3416 rm -f conftest.$ac_objext conftest.$ac_ext
3419 echo "$as_me:3419: result: $cf_cv_gnu_dftsrc_219" >&5
3420 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3421 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3423 cf_cv_gnu_dftsrc_219=maybe
3426 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3428 echo "$as_me:3428: checking if we must define _GNU_SOURCE" >&5
3429 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3430 if test "${cf_cv_gnu_source+set}" = set; then
3431 echo $ECHO_N "(cached) $ECHO_C" >&6
3434 cat >conftest.$ac_ext <<_ACEOF
3435 #line 3435 "configure"
3436 #include "confdefs.h"
3437 #include <sys/types.h>
3442 #ifndef _XOPEN_SOURCE
3443 #error expected _XOPEN_SOURCE to be defined
3449 rm -f conftest.$ac_objext
3450 if { (eval echo "$as_me:3450: \"$ac_compile\"") >&5
3451 (eval $ac_compile) 2>&5
3453 echo "$as_me:3453: \$? = $ac_status" >&5
3454 (exit $ac_status); } &&
3455 { ac_try='test -s conftest.$ac_objext'
3456 { (eval echo "$as_me:3456: \"$ac_try\"") >&5
3459 echo "$as_me:3459: \$? = $ac_status" >&5
3460 (exit $ac_status); }; }; then
3463 echo "$as_me: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
3466 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3467 cat >conftest.$ac_ext <<_ACEOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470 #include <sys/types.h>
3475 #ifdef _XOPEN_SOURCE
3476 #error expected _XOPEN_SOURCE to be undefined
3482 rm -f conftest.$ac_objext
3483 if { (eval echo "$as_me:3483: \"$ac_compile\"") >&5
3484 (eval $ac_compile) 2>&5
3486 echo "$as_me:3486: \$? = $ac_status" >&5
3487 (exit $ac_status); } &&
3488 { ac_try='test -s conftest.$ac_objext'
3489 { (eval echo "$as_me:3489: \"$ac_try\"") >&5
3492 echo "$as_me:3492: \$? = $ac_status" >&5
3493 (exit $ac_status); }; }; then
3496 echo "$as_me: failed program was:" >&5
3497 cat conftest.$ac_ext >&5
3498 cf_cv_gnu_source=yes
3500 rm -f conftest.$ac_objext conftest.$ac_ext
3504 rm -f conftest.$ac_objext conftest.$ac_ext
3507 echo "$as_me:3507: result: $cf_cv_gnu_source" >&5
3508 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3510 if test "$cf_cv_gnu_source" = yes
3512 echo "$as_me:3512: checking if we should also define _DEFAULT_SOURCE" >&5
3513 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3514 if test "${cf_cv_default_source+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
3518 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3519 cat >conftest.$ac_ext <<_ACEOF
3520 #line 3520 "configure"
3521 #include "confdefs.h"
3522 #include <sys/types.h>
3527 #ifdef _DEFAULT_SOURCE
3528 #error expected _DEFAULT_SOURCE to be undefined
3534 rm -f conftest.$ac_objext
3535 if { (eval echo "$as_me:3535: \"$ac_compile\"") >&5
3536 (eval $ac_compile) 2>&5
3538 echo "$as_me:3538: \$? = $ac_status" >&5
3539 (exit $ac_status); } &&
3540 { ac_try='test -s conftest.$ac_objext'
3541 { (eval echo "$as_me:3541: \"$ac_try\"") >&5
3544 echo "$as_me:3544: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
3546 cf_cv_default_source=no
3548 echo "$as_me: failed program was:" >&5
3549 cat conftest.$ac_ext >&5
3550 cf_cv_default_source=yes
3552 rm -f conftest.$ac_objext conftest.$ac_ext
3555 echo "$as_me:3555: result: $cf_cv_default_source" >&5
3556 echo "${ECHO_T}$cf_cv_default_source" >&6
3557 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3565 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3568 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3571 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3573 cf_save_CFLAGS="$CFLAGS"
3574 cf_save_CPPFLAGS="$CPPFLAGS"
3576 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3577 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3578 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3580 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3581 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3582 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3584 echo "$as_me:3584: checking if we should define _POSIX_C_SOURCE" >&5
3585 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3586 if test "${cf_cv_posix_c_source+set}" = set; then
3587 echo $ECHO_N "(cached) $ECHO_C" >&6
3590 echo "${as_me:-configure}:3590: testing if the symbol is already defined go no further ..." 1>&5
3592 cat >conftest.$ac_ext <<_ACEOF
3593 #line 3593 "configure"
3594 #include "confdefs.h"
3595 #include <sys/types.h>
3600 #ifndef _POSIX_C_SOURCE
3607 rm -f conftest.$ac_objext
3608 if { (eval echo "$as_me:3608: \"$ac_compile\"") >&5
3609 (eval $ac_compile) 2>&5
3611 echo "$as_me:3611: \$? = $ac_status" >&5
3612 (exit $ac_status); } &&
3613 { ac_try='test -s conftest.$ac_objext'
3614 { (eval echo "$as_me:3614: \"$ac_try\"") >&5
3617 echo "$as_me:3617: \$? = $ac_status" >&5
3618 (exit $ac_status); }; }; then
3619 cf_cv_posix_c_source=no
3621 echo "$as_me: failed program was:" >&5
3622 cat conftest.$ac_ext >&5
3623 cf_want_posix_source=no
3624 case .$cf_POSIX_C_SOURCE in
3626 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3629 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3630 cf_want_posix_source=yes
3633 cf_want_posix_source=yes
3636 if test "$cf_want_posix_source" = yes ; then
3637 cat >conftest.$ac_ext <<_ACEOF
3638 #line 3638 "configure"
3639 #include "confdefs.h"
3640 #include <sys/types.h>
3645 #ifdef _POSIX_SOURCE
3652 rm -f conftest.$ac_objext
3653 if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5
3654 (eval $ac_compile) 2>&5
3656 echo "$as_me:3656: \$? = $ac_status" >&5
3657 (exit $ac_status); } &&
3658 { ac_try='test -s conftest.$ac_objext'
3659 { (eval echo "$as_me:3659: \"$ac_try\"") >&5
3662 echo "$as_me:3662: \$? = $ac_status" >&5
3663 (exit $ac_status); }; }; then
3666 echo "$as_me: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3670 rm -f conftest.$ac_objext conftest.$ac_ext
3673 echo "${as_me:-configure}:3673: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3675 CFLAGS="$cf_trim_CFLAGS"
3676 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3678 echo "${as_me:-configure}:3678: testing if the second compile does not leave our definition intact error ..." 1>&5
3680 cat >conftest.$ac_ext <<_ACEOF
3681 #line 3681 "configure"
3682 #include "confdefs.h"
3683 #include <sys/types.h>
3688 #ifndef _POSIX_C_SOURCE
3695 rm -f conftest.$ac_objext
3696 if { (eval echo "$as_me:3696: \"$ac_compile\"") >&5
3697 (eval $ac_compile) 2>&5
3699 echo "$as_me:3699: \$? = $ac_status" >&5
3700 (exit $ac_status); } &&
3701 { ac_try='test -s conftest.$ac_objext'
3702 { (eval echo "$as_me:3702: \"$ac_try\"") >&5
3705 echo "$as_me:3705: \$? = $ac_status" >&5
3706 (exit $ac_status); }; }; then
3709 echo "$as_me: failed program was:" >&5
3710 cat conftest.$ac_ext >&5
3711 cf_cv_posix_c_source=no
3713 rm -f conftest.$ac_objext conftest.$ac_ext
3714 CFLAGS="$cf_save_CFLAGS"
3715 CPPFLAGS="$cf_save_CPPFLAGS"
3718 rm -f conftest.$ac_objext conftest.$ac_ext
3721 echo "$as_me:3721: result: $cf_cv_posix_c_source" >&5
3722 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3724 if test "$cf_cv_posix_c_source" != no ; then
3725 CFLAGS="$cf_trim_CFLAGS"
3726 CPPFLAGS="$cf_trim_CPPFLAGS"
3731 cf_new_extra_cppflags=
3733 for cf_add_cflags in $cf_cv_posix_c_source
3735 case $cf_fix_cppflags in
3737 case $cf_add_cflags in
3738 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3739 case $cf_add_cflags in
3741 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3743 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3744 && test -z "${cf_tst_cflags}" \
3745 && cf_fix_cppflags=yes
3747 if test $cf_fix_cppflags = yes ; then
3749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3753 elif test "${cf_tst_cflags}" = "\"'" ; then
3755 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3756 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3766 case $cf_add_cflags in
3768 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3770 CPPFLAGS=`echo "$CPPFLAGS" | \
3771 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3772 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3777 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3778 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3785 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3786 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3796 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3799 && test -z "${cf_tst_cflags}" \
3800 && cf_fix_cppflags=no
3805 if test -n "$cf_new_cflags" ; then
3807 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3808 CFLAGS="${CFLAGS}$cf_new_cflags"
3812 if test -n "$cf_new_cppflags" ; then
3814 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3815 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3819 if test -n "$cf_new_extra_cppflags" ; then
3821 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3822 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3830 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3833 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3834 cf_xopen_source="-D_BSD_SOURCE"
3838 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3841 cf_xopen_source="-D_OSF_SOURCE"
3844 cf_xopen_source="-D_QNX_SOURCE"
3847 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3850 cf_xopen_source="-D__EXTENSIONS__"
3851 cf_cv_xopen_source=broken
3853 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3859 echo "$as_me:3859: checking if we should define _XOPEN_SOURCE" >&5
3860 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3861 if test "${cf_cv_xopen_source+set}" = set; then
3862 echo $ECHO_N "(cached) $ECHO_C" >&6
3865 cat >conftest.$ac_ext <<_ACEOF
3866 #line 3866 "configure"
3867 #include "confdefs.h"
3871 #include <sys/types.h>
3877 #ifndef _XOPEN_SOURCE
3884 rm -f conftest.$ac_objext
3885 if { (eval echo "$as_me:3885: \"$ac_compile\"") >&5
3886 (eval $ac_compile) 2>&5
3888 echo "$as_me:3888: \$? = $ac_status" >&5
3889 (exit $ac_status); } &&
3890 { ac_try='test -s conftest.$ac_objext'
3891 { (eval echo "$as_me:3891: \"$ac_try\"") >&5
3894 echo "$as_me:3894: \$? = $ac_status" >&5
3895 (exit $ac_status); }; }; then
3896 cf_cv_xopen_source=no
3898 echo "$as_me: failed program was:" >&5
3899 cat conftest.$ac_ext >&5
3901 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3902 cat >conftest.$ac_ext <<_ACEOF
3903 #line 3903 "configure"
3904 #include "confdefs.h"
3908 #include <sys/types.h>
3914 #ifdef _XOPEN_SOURCE
3921 rm -f conftest.$ac_objext
3922 if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
3923 (eval $ac_compile) 2>&5
3925 echo "$as_me:3925: \$? = $ac_status" >&5
3926 (exit $ac_status); } &&
3927 { ac_try='test -s conftest.$ac_objext'
3928 { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3931 echo "$as_me:3931: \$? = $ac_status" >&5
3932 (exit $ac_status); }; }; then
3933 cf_cv_xopen_source=no
3935 echo "$as_me: failed program was:" >&5
3936 cat conftest.$ac_ext >&5
3937 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3939 rm -f conftest.$ac_objext conftest.$ac_ext
3943 rm -f conftest.$ac_objext conftest.$ac_ext
3946 echo "$as_me:3946: result: $cf_cv_xopen_source" >&5
3947 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3949 if test "$cf_cv_xopen_source" != no ; then
3951 CFLAGS=`echo "$CFLAGS" | \
3952 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3953 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3955 CPPFLAGS=`echo "$CPPFLAGS" | \
3956 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3957 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3959 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3964 cf_new_extra_cppflags=
3966 for cf_add_cflags in $cf_temp_xopen_source
3968 case $cf_fix_cppflags in
3970 case $cf_add_cflags in
3971 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3972 case $cf_add_cflags in
3974 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3976 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3977 && test -z "${cf_tst_cflags}" \
3978 && cf_fix_cppflags=yes
3980 if test $cf_fix_cppflags = yes ; then
3982 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3983 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3986 elif test "${cf_tst_cflags}" = "\"'" ; then
3988 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3989 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3999 case $cf_add_cflags in
4001 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4003 CPPFLAGS=`echo "$CPPFLAGS" | \
4004 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4005 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4010 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4011 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4018 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4019 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4026 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4027 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4029 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4031 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4032 && test -z "${cf_tst_cflags}" \
4033 && cf_fix_cppflags=no
4038 if test -n "$cf_new_cflags" ; then
4040 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4041 CFLAGS="${CFLAGS}$cf_new_cflags"
4045 if test -n "$cf_new_cppflags" ; then
4047 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4048 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4052 if test -n "$cf_new_extra_cppflags" ; then
4054 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4055 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4061 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4063 cf_save_CFLAGS="$CFLAGS"
4064 cf_save_CPPFLAGS="$CPPFLAGS"
4066 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4067 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4068 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4070 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4071 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4072 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4074 echo "$as_me:4074: checking if we should define _POSIX_C_SOURCE" >&5
4075 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4076 if test "${cf_cv_posix_c_source+set}" = set; then
4077 echo $ECHO_N "(cached) $ECHO_C" >&6
4080 echo "${as_me:-configure}:4080: testing if the symbol is already defined go no further ..." 1>&5
4082 cat >conftest.$ac_ext <<_ACEOF
4083 #line 4083 "configure"
4084 #include "confdefs.h"
4085 #include <sys/types.h>
4090 #ifndef _POSIX_C_SOURCE
4097 rm -f conftest.$ac_objext
4098 if { (eval echo "$as_me:4098: \"$ac_compile\"") >&5
4099 (eval $ac_compile) 2>&5
4101 echo "$as_me:4101: \$? = $ac_status" >&5
4102 (exit $ac_status); } &&
4103 { ac_try='test -s conftest.$ac_objext'
4104 { (eval echo "$as_me:4104: \"$ac_try\"") >&5
4107 echo "$as_me:4107: \$? = $ac_status" >&5
4108 (exit $ac_status); }; }; then
4109 cf_cv_posix_c_source=no
4111 echo "$as_me: failed program was:" >&5
4112 cat conftest.$ac_ext >&5
4113 cf_want_posix_source=no
4114 case .$cf_POSIX_C_SOURCE in
4116 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4119 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4120 cf_want_posix_source=yes
4123 cf_want_posix_source=yes
4126 if test "$cf_want_posix_source" = yes ; then
4127 cat >conftest.$ac_ext <<_ACEOF
4128 #line 4128 "configure"
4129 #include "confdefs.h"
4130 #include <sys/types.h>
4135 #ifdef _POSIX_SOURCE
4142 rm -f conftest.$ac_objext
4143 if { (eval echo "$as_me:4143: \"$ac_compile\"") >&5
4144 (eval $ac_compile) 2>&5
4146 echo "$as_me:4146: \$? = $ac_status" >&5
4147 (exit $ac_status); } &&
4148 { ac_try='test -s conftest.$ac_objext'
4149 { (eval echo "$as_me:4149: \"$ac_try\"") >&5
4152 echo "$as_me:4152: \$? = $ac_status" >&5
4153 (exit $ac_status); }; }; then
4156 echo "$as_me: failed program was:" >&5
4157 cat conftest.$ac_ext >&5
4158 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4160 rm -f conftest.$ac_objext conftest.$ac_ext
4163 echo "${as_me:-configure}:4163: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4165 CFLAGS="$cf_trim_CFLAGS"
4166 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
4168 echo "${as_me:-configure}:4168: testing if the second compile does not leave our definition intact error ..." 1>&5
4170 cat >conftest.$ac_ext <<_ACEOF
4171 #line 4171 "configure"
4172 #include "confdefs.h"
4173 #include <sys/types.h>
4178 #ifndef _POSIX_C_SOURCE
4185 rm -f conftest.$ac_objext
4186 if { (eval echo "$as_me:4186: \"$ac_compile\"") >&5
4187 (eval $ac_compile) 2>&5
4189 echo "$as_me:4189: \$? = $ac_status" >&5
4190 (exit $ac_status); } &&
4191 { ac_try='test -s conftest.$ac_objext'
4192 { (eval echo "$as_me:4192: \"$ac_try\"") >&5
4195 echo "$as_me:4195: \$? = $ac_status" >&5
4196 (exit $ac_status); }; }; then
4199 echo "$as_me: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
4201 cf_cv_posix_c_source=no
4203 rm -f conftest.$ac_objext conftest.$ac_ext
4204 CFLAGS="$cf_save_CFLAGS"
4205 CPPFLAGS="$cf_save_CPPFLAGS"
4208 rm -f conftest.$ac_objext conftest.$ac_ext
4211 echo "$as_me:4211: result: $cf_cv_posix_c_source" >&5
4212 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4214 if test "$cf_cv_posix_c_source" != no ; then
4215 CFLAGS="$cf_trim_CFLAGS"
4216 CPPFLAGS="$cf_trim_CPPFLAGS"
4221 cf_new_extra_cppflags=
4223 for cf_add_cflags in $cf_cv_posix_c_source
4225 case $cf_fix_cppflags in
4227 case $cf_add_cflags in
4228 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4229 case $cf_add_cflags in
4231 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4233 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4234 && test -z "${cf_tst_cflags}" \
4235 && cf_fix_cppflags=yes
4237 if test $cf_fix_cppflags = yes ; then
4239 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4240 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4243 elif test "${cf_tst_cflags}" = "\"'" ; then
4245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4256 case $cf_add_cflags in
4258 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4260 CPPFLAGS=`echo "$CPPFLAGS" | \
4261 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4262 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4267 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4268 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4275 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4276 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4286 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4288 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4289 && test -z "${cf_tst_cflags}" \
4290 && cf_fix_cppflags=no
4295 if test -n "$cf_new_cflags" ; then
4297 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4298 CFLAGS="${CFLAGS}$cf_new_cflags"
4302 if test -n "$cf_new_cppflags" ; then
4304 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4305 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4309 if test -n "$cf_new_extra_cppflags" ; then
4311 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4312 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4321 if test -n "$cf_xopen_source" ; then
4326 cf_new_extra_cppflags=
4328 for cf_add_cflags in $cf_xopen_source
4330 case $cf_fix_cppflags in
4332 case $cf_add_cflags in
4333 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4334 case $cf_add_cflags in
4336 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4339 && test -z "${cf_tst_cflags}" \
4340 && cf_fix_cppflags=yes
4342 if test $cf_fix_cppflags = yes ; then
4344 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4345 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4348 elif test "${cf_tst_cflags}" = "\"'" ; then
4350 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4351 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4361 case $cf_add_cflags in
4363 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4365 CPPFLAGS=`echo "$CPPFLAGS" | \
4366 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4367 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4372 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4373 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4380 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4381 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4388 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4389 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4391 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4393 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4394 && test -z "${cf_tst_cflags}" \
4395 && cf_fix_cppflags=no
4400 if test -n "$cf_new_cflags" ; then
4401 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4403 echo "${as_me:-configure}:4403: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4405 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4406 CFLAGS="${CFLAGS}$cf_new_cflags"
4410 if test -n "$cf_new_cppflags" ; then
4411 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4413 echo "${as_me:-configure}:4413: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4415 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4416 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4420 if test -n "$cf_new_extra_cppflags" ; then
4421 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4423 echo "${as_me:-configure}:4423: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4425 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4426 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4432 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4433 echo "$as_me:4433: checking if _XOPEN_SOURCE really is set" >&5
4434 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4435 cat >conftest.$ac_ext <<_ACEOF
4436 #line 4436 "configure"
4437 #include "confdefs.h"
4443 #ifndef _XOPEN_SOURCE
4450 rm -f conftest.$ac_objext
4451 if { (eval echo "$as_me:4451: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>&5
4454 echo "$as_me:4454: \$? = $ac_status" >&5
4455 (exit $ac_status); } &&
4456 { ac_try='test -s conftest.$ac_objext'
4457 { (eval echo "$as_me:4457: \"$ac_try\"") >&5
4460 echo "$as_me:4460: \$? = $ac_status" >&5
4461 (exit $ac_status); }; }; then
4462 cf_XOPEN_SOURCE_set=yes
4464 echo "$as_me: failed program was:" >&5
4465 cat conftest.$ac_ext >&5
4466 cf_XOPEN_SOURCE_set=no
4468 rm -f conftest.$ac_objext conftest.$ac_ext
4469 echo "$as_me:4469: result: $cf_XOPEN_SOURCE_set" >&5
4470 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4471 if test $cf_XOPEN_SOURCE_set = yes
4473 cat >conftest.$ac_ext <<_ACEOF
4474 #line 4474 "configure"
4475 #include "confdefs.h"
4481 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4488 rm -f conftest.$ac_objext
4489 if { (eval echo "$as_me:4489: \"$ac_compile\"") >&5
4490 (eval $ac_compile) 2>&5
4492 echo "$as_me:4492: \$? = $ac_status" >&5
4493 (exit $ac_status); } &&
4494 { ac_try='test -s conftest.$ac_objext'
4495 { (eval echo "$as_me:4495: \"$ac_try\"") >&5
4498 echo "$as_me:4498: \$? = $ac_status" >&5
4499 (exit $ac_status); }; }; then
4500 cf_XOPEN_SOURCE_set_ok=yes
4502 echo "$as_me: failed program was:" >&5
4503 cat conftest.$ac_ext >&5
4504 cf_XOPEN_SOURCE_set_ok=no
4506 rm -f conftest.$ac_objext conftest.$ac_ext
4507 if test $cf_XOPEN_SOURCE_set_ok = no
4509 { echo "$as_me:4509: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4510 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4514 echo "$as_me:4514: checking if we should define _XOPEN_SOURCE" >&5
4515 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4516 if test "${cf_cv_xopen_source+set}" = set; then
4517 echo $ECHO_N "(cached) $ECHO_C" >&6
4520 cat >conftest.$ac_ext <<_ACEOF
4521 #line 4521 "configure"
4522 #include "confdefs.h"
4526 #include <sys/types.h>
4532 #ifndef _XOPEN_SOURCE
4539 rm -f conftest.$ac_objext
4540 if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541 (eval $ac_compile) 2>&5
4543 echo "$as_me:4543: \$? = $ac_status" >&5
4544 (exit $ac_status); } &&
4545 { ac_try='test -s conftest.$ac_objext'
4546 { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit $ac_status); }; }; then
4551 cf_cv_xopen_source=no
4553 echo "$as_me: failed program was:" >&5
4554 cat conftest.$ac_ext >&5
4556 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4557 cat >conftest.$ac_ext <<_ACEOF
4558 #line 4558 "configure"
4559 #include "confdefs.h"
4563 #include <sys/types.h>
4569 #ifdef _XOPEN_SOURCE
4576 rm -f conftest.$ac_objext
4577 if { (eval echo "$as_me:4577: \"$ac_compile\"") >&5
4578 (eval $ac_compile) 2>&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit $ac_status); } &&
4582 { ac_try='test -s conftest.$ac_objext'
4583 { (eval echo "$as_me:4583: \"$ac_try\"") >&5
4586 echo "$as_me:4586: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4588 cf_cv_xopen_source=no
4590 echo "$as_me: failed program was:" >&5
4591 cat conftest.$ac_ext >&5
4592 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4594 rm -f conftest.$ac_objext conftest.$ac_ext
4598 rm -f conftest.$ac_objext conftest.$ac_ext
4601 echo "$as_me:4601: result: $cf_cv_xopen_source" >&5
4602 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4604 if test "$cf_cv_xopen_source" != no ; then
4606 CFLAGS=`echo "$CFLAGS" | \
4607 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4608 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4610 CPPFLAGS=`echo "$CPPFLAGS" | \
4611 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4612 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4614 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4619 cf_new_extra_cppflags=
4621 for cf_add_cflags in $cf_temp_xopen_source
4623 case $cf_fix_cppflags in
4625 case $cf_add_cflags in
4626 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4627 case $cf_add_cflags in
4629 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4631 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4632 && test -z "${cf_tst_cflags}" \
4633 && cf_fix_cppflags=yes
4635 if test $cf_fix_cppflags = yes ; then
4637 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4638 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4641 elif test "${cf_tst_cflags}" = "\"'" ; then
4643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4654 case $cf_add_cflags in
4656 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4658 CPPFLAGS=`echo "$CPPFLAGS" | \
4659 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4660 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4665 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4666 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4673 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4674 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4684 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4686 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4687 && test -z "${cf_tst_cflags}" \
4688 && cf_fix_cppflags=no
4693 if test -n "$cf_new_cflags" ; then
4695 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4696 CFLAGS="${CFLAGS}$cf_new_cflags"
4700 if test -n "$cf_new_cppflags" ; then
4702 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4703 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4707 if test -n "$cf_new_extra_cppflags" ; then
4709 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4710 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4719 echo "$as_me:4719: checking for signal global datatype" >&5
4720 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4721 if test "${cf_cv_sig_atomic_t+set}" = set; then
4722 echo $ECHO_N "(cached) $ECHO_C" >&6
4726 "volatile sig_atomic_t" \
4730 cat >conftest.$ac_ext <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4734 #include <sys/types.h>
4740 static void handler(int sig)
4747 signal(SIGINT, handler);
4753 rm -f conftest.$ac_objext
4754 if { (eval echo "$as_me:4754: \"$ac_compile\"") >&5
4755 (eval $ac_compile) 2>&5
4757 echo "$as_me:4757: \$? = $ac_status" >&5
4758 (exit $ac_status); } &&
4759 { ac_try='test -s conftest.$ac_objext'
4760 { (eval echo "$as_me:4760: \"$ac_try\"") >&5
4763 echo "$as_me:4763: \$? = $ac_status" >&5
4764 (exit $ac_status); }; }; then
4765 cf_cv_sig_atomic_t=$cf_type
4767 echo "$as_me: failed program was:" >&5
4768 cat conftest.$ac_ext >&5
4769 cf_cv_sig_atomic_t=no
4771 rm -f conftest.$ac_objext conftest.$ac_ext
4772 test "$cf_cv_sig_atomic_t" != no && break
4777 echo "$as_me:4777: result: $cf_cv_sig_atomic_t" >&5
4778 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4779 test "$cf_cv_sig_atomic_t" != no &&
4780 cat >>confdefs.h <<EOF
4781 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4784 # Work around breakage on OS X
4786 echo "$as_me:4786: checking if SIGWINCH is defined" >&5
4787 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4788 if test "${cf_cv_define_sigwinch+set}" = set; then
4789 echo $ECHO_N "(cached) $ECHO_C" >&6
4792 cat >conftest.$ac_ext <<_ACEOF
4793 #line 4793 "configure"
4794 #include "confdefs.h"
4796 #include <sys/types.h>
4797 #include <sys/signal.h>
4807 rm -f conftest.$ac_objext
4808 if { (eval echo "$as_me:4808: \"$ac_compile\"") >&5
4809 (eval $ac_compile) 2>&5
4811 echo "$as_me:4811: \$? = $ac_status" >&5
4812 (exit $ac_status); } &&
4813 { ac_try='test -s conftest.$ac_objext'
4814 { (eval echo "$as_me:4814: \"$ac_try\"") >&5
4817 echo "$as_me:4817: \$? = $ac_status" >&5
4818 (exit $ac_status); }; }; then
4819 cf_cv_define_sigwinch=yes
4821 echo "$as_me: failed program was:" >&5
4822 cat conftest.$ac_ext >&5
4823 cat >conftest.$ac_ext <<_ACEOF
4824 #line 4824 "configure"
4825 #include "confdefs.h"
4827 #undef _XOPEN_SOURCE
4828 #undef _POSIX_SOURCE
4829 #undef _POSIX_C_SOURCE
4830 #include <sys/types.h>
4831 #include <sys/signal.h>
4841 rm -f conftest.$ac_objext
4842 if { (eval echo "$as_me:4842: \"$ac_compile\"") >&5
4843 (eval $ac_compile) 2>&5
4845 echo "$as_me:4845: \$? = $ac_status" >&5
4846 (exit $ac_status); } &&
4847 { ac_try='test -s conftest.$ac_objext'
4848 { (eval echo "$as_me:4848: \"$ac_try\"") >&5
4851 echo "$as_me:4851: \$? = $ac_status" >&5
4852 (exit $ac_status); }; }; then
4853 cf_cv_define_sigwinch=maybe
4855 echo "$as_me: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 cf_cv_define_sigwinch=no
4859 rm -f conftest.$ac_objext conftest.$ac_ext
4862 rm -f conftest.$ac_objext conftest.$ac_ext
4865 echo "$as_me:4865: result: $cf_cv_define_sigwinch" >&5
4866 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4868 if test "$cf_cv_define_sigwinch" = maybe ; then
4869 echo "$as_me:4869: checking for actual SIGWINCH definition" >&5
4870 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4871 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4872 echo $ECHO_N "(cached) $ECHO_C" >&6
4875 cf_cv_fixup_sigwinch=unknown
4877 while test $cf_sigwinch != 1
4879 cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4883 #undef _XOPEN_SOURCE
4884 #undef _POSIX_SOURCE
4885 #undef _POSIX_C_SOURCE
4886 #include <sys/types.h>
4887 #include <sys/signal.h>
4893 #if SIGWINCH != $cf_sigwinch
4901 rm -f conftest.$ac_objext
4902 if { (eval echo "$as_me:4902: \"$ac_compile\"") >&5
4903 (eval $ac_compile) 2>&5
4905 echo "$as_me:4905: \$? = $ac_status" >&5
4906 (exit $ac_status); } &&
4907 { ac_try='test -s conftest.$ac_objext'
4908 { (eval echo "$as_me:4908: \"$ac_try\"") >&5
4911 echo "$as_me:4911: \$? = $ac_status" >&5
4912 (exit $ac_status); }; }; then
4913 cf_cv_fixup_sigwinch=$cf_sigwinch
4916 echo "$as_me: failed program was:" >&5
4917 cat conftest.$ac_ext >&5
4919 rm -f conftest.$ac_objext conftest.$ac_ext
4921 cf_sigwinch=`expr $cf_sigwinch - 1`
4925 echo "$as_me:4925: result: $cf_cv_fixup_sigwinch" >&5
4926 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4928 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4929 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4933 # Checks for CODESET support.
4935 echo "$as_me:4935: checking for nl_langinfo and CODESET" >&5
4936 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4937 if test "${am_cv_langinfo_codeset+set}" = set; then
4938 echo $ECHO_N "(cached) $ECHO_C" >&6
4940 cat >conftest.$ac_ext <<_ACEOF
4941 #line 4941 "configure"
4942 #include "confdefs.h"
4943 #include <langinfo.h>
4947 char* cs = nl_langinfo(CODESET);
4952 rm -f conftest.$ac_objext conftest$ac_exeext
4953 if { (eval echo "$as_me:4953: \"$ac_link\"") >&5
4954 (eval $ac_link) 2>&5
4956 echo "$as_me:4956: \$? = $ac_status" >&5
4957 (exit $ac_status); } &&
4958 { ac_try='test -s conftest$ac_exeext'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit $ac_status); }; }; then
4964 am_cv_langinfo_codeset=yes
4966 echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 am_cv_langinfo_codeset=no
4970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4973 echo "$as_me:4973: result: $am_cv_langinfo_codeset" >&5
4974 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4975 if test $am_cv_langinfo_codeset = yes; then
4977 cat >>confdefs.h <<\EOF
4978 #define HAVE_LANGINFO_CODESET 1
4983 echo "$as_me:4983: checking if you want to use pkg-config" >&5
4984 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4986 # Check whether --with-pkg-config or --without-pkg-config was given.
4987 if test "${with_pkg_config+set}" = set; then
4988 withval="$with_pkg_config"
4989 cf_pkg_config=$withval
4993 echo "$as_me:4993: result: $cf_pkg_config" >&5
4994 echo "${ECHO_T}$cf_pkg_config" >&6
4996 case $cf_pkg_config in
5002 if test -n "$ac_tool_prefix"; then
5003 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5004 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5005 echo "$as_me:5005: checking for $ac_word" >&5
5006 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5007 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5008 echo $ECHO_N "(cached) $ECHO_C" >&6
5012 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5015 ac_save_IFS=$IFS; IFS=$ac_path_separator
5017 for ac_dir in $ac_dummy; do
5019 test -z "$ac_dir" && ac_dir=.
5020 if $as_executable_p "$ac_dir/$ac_word"; then
5021 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5022 echo "$as_me:5022: found $ac_dir/$ac_word" >&5
5030 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5032 if test -n "$PKG_CONFIG"; then
5033 echo "$as_me:5033: result: $PKG_CONFIG" >&5
5034 echo "${ECHO_T}$PKG_CONFIG" >&6
5036 echo "$as_me:5036: result: no" >&5
5037 echo "${ECHO_T}no" >&6
5041 if test -z "$ac_cv_path_PKG_CONFIG"; then
5042 ac_pt_PKG_CONFIG=$PKG_CONFIG
5043 # Extract the first word of "pkg-config", so it can be a program name with args.
5044 set dummy pkg-config; ac_word=$2
5045 echo "$as_me:5045: checking for $ac_word" >&5
5046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5047 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5048 echo $ECHO_N "(cached) $ECHO_C" >&6
5050 case $ac_pt_PKG_CONFIG in
5052 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5055 ac_save_IFS=$IFS; IFS=$ac_path_separator
5057 for ac_dir in $ac_dummy; do
5059 test -z "$ac_dir" && ac_dir=.
5060 if $as_executable_p "$ac_dir/$ac_word"; then
5061 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5062 echo "$as_me:5062: found $ac_dir/$ac_word" >&5
5067 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5071 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5073 if test -n "$ac_pt_PKG_CONFIG"; then
5074 echo "$as_me:5074: result: $ac_pt_PKG_CONFIG" >&5
5075 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5077 echo "$as_me:5077: result: no" >&5
5078 echo "${ECHO_T}no" >&6
5081 PKG_CONFIG=$ac_pt_PKG_CONFIG
5083 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5092 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5093 if test "$PKG_CONFIG" != none ; then
5095 if test "x$prefix" != xNONE; then
5096 cf_path_syntax="$prefix"
5098 cf_path_syntax="$ac_default_prefix"
5101 case ".$PKG_CONFIG" in
5106 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5108 (.\${*prefix}*|.\${*dir}*)
5109 eval PKG_CONFIG="$PKG_CONFIG"
5110 case ".$PKG_CONFIG" in
5112 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5117 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5120 { { echo "$as_me:5120: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5121 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5122 { (exit 1); exit 1; }; }
5126 elif test "x$cf_pkg_config" != xno ; then
5127 { echo "$as_me:5127: WARNING: pkg-config is not installed" >&5
5128 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5131 echo "$as_me:5131: checking if you want to see long compiling messages" >&5
5132 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5134 # Check whether --enable-echo or --disable-echo was given.
5135 if test "${enable_echo+set}" = set; then
5136 enableval="$enable_echo"
5137 test "$enableval" != no && enableval=yes
5138 if test "$enableval" != "yes" ; then
5141 ECHO_LD='@echo linking $@;'
5142 RULE_CC='@echo compiling $<'
5143 SHOW_CC='@echo compiling $@'
5165 echo "$as_me:5165: result: $enableval" >&5
5166 echo "${ECHO_T}$enableval" >&6
5168 echo "$as_me:5168: checking for ncurses wrap-prefix" >&5
5169 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5171 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5172 if test "${with_ncurses_wrap_prefix+set}" = set; then
5173 withval="$with_ncurses_wrap_prefix"
5174 NCURSES_WRAP_PREFIX=$withval
5176 NCURSES_WRAP_PREFIX=_nc_
5178 echo "$as_me:5178: result: $NCURSES_WRAP_PREFIX" >&5
5179 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5181 echo "$as_me:5181: checking if you want to check for wide-character functions" >&5
5182 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5184 # Check whether --enable-widec or --disable-widec was given.
5185 if test "${enable_widec+set}" = set; then
5186 enableval="$enable_widec"
5187 test "$enableval" != no && enableval=yes
5188 if test "$enableval" != "yes" ; then
5198 echo "$as_me:5198: result: $cf_enable_widec" >&5
5199 echo "${ECHO_T}$cf_enable_widec" >&6
5201 echo "$as_me:5201: checking for specific curses-directory" >&5
5202 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5204 # Check whether --with-curses-dir or --without-curses-dir was given.
5205 if test "${with_curses_dir+set}" = set; then
5206 withval="$with_curses_dir"
5207 cf_cv_curses_dir=$withval
5211 echo "$as_me:5211: result: $cf_cv_curses_dir" >&5
5212 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5214 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5217 if test "x$prefix" != xNONE; then
5218 cf_path_syntax="$prefix"
5220 cf_path_syntax="$ac_default_prefix"
5228 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5230 (.\${*prefix}*|.\${*dir}*)
5231 eval withval="$withval"
5234 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5239 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5242 { { echo "$as_me:5242: error: expected a pathname, not \"$withval\"" >&5
5243 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5244 { (exit 1); exit 1; }; }
5248 if test -d "$cf_cv_curses_dir"
5251 if test -n "$cf_cv_curses_dir/include" ; then
5252 for cf_add_incdir in $cf_cv_curses_dir/include
5254 while test $cf_add_incdir != /usr/include
5256 if test -d $cf_add_incdir
5259 if test -n "$CFLAGS$CPPFLAGS" ; then
5260 # a loop is needed to ensure we can add subdirs of existing dirs
5261 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5262 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5263 cf_have_incdir=yes; break
5268 if test "$cf_have_incdir" = no ; then
5269 if test "$cf_add_incdir" = /usr/local/include ; then
5270 if test "$GCC" = yes
5272 cf_save_CPPFLAGS=$CPPFLAGS
5273 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5274 cat >conftest.$ac_ext <<_ACEOF
5275 #line 5275 "configure"
5276 #include "confdefs.h"
5286 rm -f conftest.$ac_objext
5287 if { (eval echo "$as_me:5287: \"$ac_compile\"") >&5
5288 (eval $ac_compile) 2>&5
5290 echo "$as_me:5290: \$? = $ac_status" >&5
5291 (exit $ac_status); } &&
5292 { ac_try='test -s conftest.$ac_objext'
5293 { (eval echo "$as_me:5293: \"$ac_try\"") >&5
5296 echo "$as_me:5296: \$? = $ac_status" >&5
5297 (exit $ac_status); }; }; then
5300 echo "$as_me: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5304 rm -f conftest.$ac_objext conftest.$ac_ext
5305 CPPFLAGS=$cf_save_CPPFLAGS
5310 if test "$cf_have_incdir" = no ; then
5311 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5313 echo "${as_me:-configure}:5313: testing adding $cf_add_incdir to include-path ..." 1>&5
5315 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5317 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5318 test "$cf_top_incdir" = "$cf_add_incdir" && break
5319 cf_add_incdir="$cf_top_incdir"
5330 if test -n "$cf_cv_curses_dir/lib" ; then
5331 for cf_add_libdir in $cf_cv_curses_dir/lib
5333 if test $cf_add_libdir = /usr/lib ; then
5335 elif test -d $cf_add_libdir
5338 if test -n "$LDFLAGS$LIBS" ; then
5339 # a loop is needed to ensure we can add subdirs of existing dirs
5340 for cf_test_libdir in $LDFLAGS $LIBS ; do
5341 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5342 cf_have_libdir=yes; break
5346 if test "$cf_have_libdir" = no ; then
5347 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5349 echo "${as_me:-configure}:5349: testing adding $cf_add_libdir to library-path ..." 1>&5
5351 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5362 echo "$as_me:5362: checking for specified curses library type" >&5
5363 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5365 # Check whether --with-screen or --without-screen was given.
5366 if test "${with_screen+set}" = set; then
5367 withval="$with_screen"
5368 cf_cv_screen=$withval
5371 # Check whether --with-ncursesw or --without-ncursesw was given.
5372 if test "${with_ncursesw+set}" = set; then
5373 withval="$with_ncursesw"
5374 cf_cv_screen=ncursesw
5377 # Check whether --with-ncurses or --without-ncurses was given.
5378 if test "${with_ncurses+set}" = set; then
5379 withval="$with_ncurses"
5380 cf_cv_screen=ncurses
5383 # Check whether --with-pdcurses or --without-pdcurses was given.
5384 if test "${with_pdcurses+set}" = set; then
5385 withval="$with_pdcurses"
5386 cf_cv_screen=pdcurses
5389 # Check whether --with-curses-colr or --without-curses-colr was given.
5390 if test "${with_curses_colr+set}" = set; then
5391 withval="$with_curses_colr"
5392 cf_cv_screen=curses_colr
5395 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5396 if test "${with_curses_5lib+set}" = set; then
5397 withval="$with_curses_5lib"
5398 cf_cv_screen=curses_5lib
5406 echo "$as_me:5406: result: $cf_cv_screen" >&5
5407 echo "${ECHO_T}$cf_cv_screen" >&6
5409 case $cf_cv_screen in
5412 echo "$as_me:5412: checking for extra include directories" >&5
5413 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5414 if test "${cf_cv_curses_incdir+set}" = set; then
5415 echo $ECHO_N "(cached) $ECHO_C" >&6
5418 cf_cv_curses_incdir=no
5421 if test "x$cf_cv_screen" = "xcurses_colr"
5423 test -d /usr/include/curses_colr && \
5424 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5428 if test "x$cf_cv_screen" = "xcurses_5lib"
5430 test -d /usr/5lib && \
5431 test -d /usr/5include && \
5432 cf_cv_curses_incdir="-I/usr/5include"
5438 echo "$as_me:5438: result: $cf_cv_curses_incdir" >&5
5439 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5440 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5442 echo "$as_me:5442: checking if we have identified curses headers" >&5
5443 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5444 if test "${cf_cv_ncurses_header+set}" = set; then
5445 echo $ECHO_N "(cached) $ECHO_C" >&6
5448 cf_cv_ncurses_header=none
5451 curses.h ncurses/ncurses.h ncurses/curses.h
5453 cat >conftest.$ac_ext <<_ACEOF
5454 #line 5454 "configure"
5455 #include "confdefs.h"
5456 #include <${cf_header}>
5460 initscr(); tgoto("?", 0,0)
5465 rm -f conftest.$ac_objext
5466 if { (eval echo "$as_me:5466: \"$ac_compile\"") >&5
5467 (eval $ac_compile) 2>&5
5469 echo "$as_me:5469: \$? = $ac_status" >&5
5470 (exit $ac_status); } &&
5471 { ac_try='test -s conftest.$ac_objext'
5472 { (eval echo "$as_me:5472: \"$ac_try\"") >&5
5475 echo "$as_me:5475: \$? = $ac_status" >&5
5476 (exit $ac_status); }; }; then
5477 cf_cv_ncurses_header=$cf_header; break
5479 echo "$as_me: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5482 rm -f conftest.$ac_objext conftest.$ac_ext
5486 echo "$as_me:5486: result: $cf_cv_ncurses_header" >&5
5487 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5489 if test "$cf_cv_ncurses_header" = none ; then
5490 { { echo "$as_me:5490: error: No curses header-files found" >&5
5491 echo "$as_me: error: No curses header-files found" >&2;}
5492 { (exit 1); exit 1; }; }
5495 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5497 for ac_header in $cf_cv_ncurses_header
5499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5500 echo "$as_me:5500: checking for $ac_header" >&5
5501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5503 echo $ECHO_N "(cached) $ECHO_C" >&6
5505 cat >conftest.$ac_ext <<_ACEOF
5506 #line 5506 "configure"
5507 #include "confdefs.h"
5508 #include <$ac_header>
5510 if { (eval echo "$as_me:5510: \"$ac_cpp conftest.$ac_ext\"") >&5
5511 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5513 egrep -v '^ *\+' conftest.er1 >conftest.err
5515 cat conftest.err >&5
5516 echo "$as_me:5516: \$? = $ac_status" >&5
5517 (exit $ac_status); } >/dev/null; then
5518 if test -s conftest.err; then
5519 ac_cpp_err=$ac_c_preproc_warn_flag
5526 if test -z "$ac_cpp_err"; then
5527 eval "$as_ac_Header=yes"
5529 echo "$as_me: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5531 eval "$as_ac_Header=no"
5533 rm -f conftest.err conftest.$ac_ext
5535 echo "$as_me:5535: result: `eval echo '${'$as_ac_Header'}'`" >&5
5536 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5537 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5538 cat >>confdefs.h <<EOF
5539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5545 echo "$as_me:5545: checking for terminfo header" >&5
5546 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5547 if test "${cf_cv_term_header+set}" = set; then
5548 echo $ECHO_N "(cached) $ECHO_C" >&6
5551 case ${cf_cv_ncurses_header} in
5552 (*/ncurses.h|*/ncursesw.h)
5553 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5556 cf_term_header=term.h
5560 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5562 cat >conftest.$ac_ext <<_ACEOF
5563 #line 5563 "configure"
5564 #include "confdefs.h"
5566 #include <${cf_cv_ncurses_header:-curses.h}>
5572 int x = auto_left_margin
5577 rm -f conftest.$ac_objext
5578 if { (eval echo "$as_me:5578: \"$ac_compile\"") >&5
5579 (eval $ac_compile) 2>&5
5581 echo "$as_me:5581: \$? = $ac_status" >&5
5582 (exit $ac_status); } &&
5583 { ac_try='test -s conftest.$ac_objext'
5584 { (eval echo "$as_me:5584: \"$ac_try\"") >&5
5587 echo "$as_me:5587: \$? = $ac_status" >&5
5588 (exit $ac_status); }; }; then
5590 cf_cv_term_header="$cf_test"
5592 echo "$as_me: failed program was:" >&5
5593 cat conftest.$ac_ext >&5
5595 cf_cv_term_header=unknown
5598 rm -f conftest.$ac_objext conftest.$ac_ext
5599 test "$cf_cv_term_header" != unknown && break
5603 echo "$as_me:5603: result: $cf_cv_term_header" >&5
5604 echo "${ECHO_T}$cf_cv_term_header" >&6
5606 # Set definitions to allow ifdef'ing to accommodate subdirectories
5608 case $cf_cv_term_header in
5611 cat >>confdefs.h <<\EOF
5612 #define HAVE_TERM_H 1
5618 case $cf_cv_term_header in
5621 cat >>confdefs.h <<\EOF
5622 #define HAVE_NCURSES_TERM_H 1
5628 cat >>confdefs.h <<\EOF
5629 #define HAVE_NCURSESW_TERM_H 1
5635 echo "$as_me:5635: checking for ncurses version" >&5
5636 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5637 if test "${cf_cv_ncurses_version+set}" = set; then
5638 echo $ECHO_N "(cached) $ECHO_C" >&6
5641 cf_cv_ncurses_version=no
5644 if test "$cross_compiling" = yes; then
5646 # This will not work if the preprocessor splits the line after the
5647 # Autoconf token. The 'unproto' program does that.
5648 cat > conftest.$ac_ext <<EOF
5649 #include <${cf_cv_ncurses_header:-curses.h}>
5651 #ifdef NCURSES_VERSION
5652 Autoconf NCURSES_VERSION
5660 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5661 { (eval echo "$as_me:5661: \"$cf_try\"") >&5
5664 echo "$as_me:5664: \$? = $ac_status" >&5
5665 (exit $ac_status); }
5666 if test -f conftest.out ; then
5667 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5668 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5673 cat >conftest.$ac_ext <<_ACEOF
5674 #line 5674 "configure"
5675 #include "confdefs.h"
5677 #include <${cf_cv_ncurses_header:-curses.h}>
5681 FILE *fp = fopen("$cf_tempfile", "w");
5682 #ifdef NCURSES_VERSION
5683 # ifdef NCURSES_VERSION_PATCH
5684 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5686 fprintf(fp, "%s\n", NCURSES_VERSION);
5690 fprintf(fp, "old\n");
5695 ${cf_cv_main_return:-return}(0);
5698 rm -f conftest$ac_exeext
5699 if { (eval echo "$as_me:5699: \"$ac_link\"") >&5
5700 (eval $ac_link) 2>&5
5702 echo "$as_me:5702: \$? = $ac_status" >&5
5703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5704 { (eval echo "$as_me:5704: \"$ac_try\"") >&5
5707 echo "$as_me:5707: \$? = $ac_status" >&5
5708 (exit $ac_status); }; }; then
5710 cf_cv_ncurses_version=`cat $cf_tempfile`
5712 echo "$as_me: program exited with status $ac_status" >&5
5713 echo "$as_me: failed program was:" >&5
5714 cat conftest.$ac_ext >&5
5716 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5721 echo "$as_me:5721: result: $cf_cv_ncurses_version" >&5
5722 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5723 test "$cf_cv_ncurses_version" = no ||
5724 cat >>confdefs.h <<\EOF
5728 echo "$as_me:5728: checking if we have identified curses libraries" >&5
5729 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5730 cat >conftest.$ac_ext <<_ACEOF
5731 #line 5731 "configure"
5732 #include "confdefs.h"
5733 #include <${cf_cv_ncurses_header:-curses.h}>
5737 initscr(); tgoto("?", 0,0)
5742 rm -f conftest.$ac_objext conftest$ac_exeext
5743 if { (eval echo "$as_me:5743: \"$ac_link\"") >&5
5744 (eval $ac_link) 2>&5
5746 echo "$as_me:5746: \$? = $ac_status" >&5
5747 (exit $ac_status); } &&
5748 { ac_try='test -s conftest$ac_exeext'
5749 { (eval echo "$as_me:5749: \"$ac_try\"") >&5
5752 echo "$as_me:5752: \$? = $ac_status" >&5
5753 (exit $ac_status); }; }; then
5756 echo "$as_me: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5761 echo "$as_me:5761: result: $cf_result" >&5
5762 echo "${ECHO_T}$cf_result" >&6
5764 if test "$cf_result" = no ; then
5767 echo "$as_me:5767: checking for tgoto in -lmytinfo" >&5
5768 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5769 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5770 echo $ECHO_N "(cached) $ECHO_C" >&6
5772 ac_check_lib_save_LIBS=$LIBS
5773 LIBS="-lmytinfo $LIBS"
5774 cat >conftest.$ac_ext <<_ACEOF
5775 #line 5775 "configure"
5776 #include "confdefs.h"
5778 /* Override any gcc2 internal prototype to avoid an error. */
5782 /* We use char because int might match the return type of a gcc2
5783 builtin and then its argument prototype would still apply. */
5793 rm -f conftest.$ac_objext conftest$ac_exeext
5794 if { (eval echo "$as_me:5794: \"$ac_link\"") >&5
5795 (eval $ac_link) 2>&5
5797 echo "$as_me:5797: \$? = $ac_status" >&5
5798 (exit $ac_status); } &&
5799 { ac_try='test -s conftest$ac_exeext'
5800 { (eval echo "$as_me:5800: \"$ac_try\"") >&5
5803 echo "$as_me:5803: \$? = $ac_status" >&5
5804 (exit $ac_status); }; }; then
5805 ac_cv_lib_mytinfo_tgoto=yes
5807 echo "$as_me: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5809 ac_cv_lib_mytinfo_tgoto=no
5811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5812 LIBS=$ac_check_lib_save_LIBS
5814 echo "$as_me:5814: result: $ac_cv_lib_mytinfo_tgoto" >&5
5815 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5816 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5818 cf_add_libs="-lmytinfo"
5819 # Filter out duplicates - this happens with badly-designed ".pc" files...
5820 for cf_add_1lib in $LIBS
5822 for cf_add_2lib in $cf_add_libs
5824 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5830 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5838 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5839 # next (1998), and xcurses "newer" (2000). There is no header file for
5840 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5841 # term.h) for cur_colr
5842 if test "x$cf_cv_screen" = "xcurses_colr"
5844 echo "$as_me:5844: checking for initscr in -lcur_colr" >&5
5845 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5846 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5847 echo $ECHO_N "(cached) $ECHO_C" >&6
5849 ac_check_lib_save_LIBS=$LIBS
5850 LIBS="-lcur_colr $LIBS"
5851 cat >conftest.$ac_ext <<_ACEOF
5852 #line 5852 "configure"
5853 #include "confdefs.h"
5855 /* Override any gcc2 internal prototype to avoid an error. */
5859 /* We use char because int might match the return type of a gcc2
5860 builtin and then its argument prototype would still apply. */
5870 rm -f conftest.$ac_objext conftest$ac_exeext
5871 if { (eval echo "$as_me:5871: \"$ac_link\"") >&5
5872 (eval $ac_link) 2>&5
5874 echo "$as_me:5874: \$? = $ac_status" >&5
5875 (exit $ac_status); } &&
5876 { ac_try='test -s conftest$ac_exeext'
5877 { (eval echo "$as_me:5877: \"$ac_try\"") >&5
5880 echo "$as_me:5880: \$? = $ac_status" >&5
5881 (exit $ac_status); }; }; then
5882 ac_cv_lib_cur_colr_initscr=yes
5884 echo "$as_me: failed program was:" >&5
5885 cat conftest.$ac_ext >&5
5886 ac_cv_lib_cur_colr_initscr=no
5888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5889 LIBS=$ac_check_lib_save_LIBS
5891 echo "$as_me:5891: result: $ac_cv_lib_cur_colr_initscr" >&5
5892 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5893 if test $ac_cv_lib_cur_colr_initscr = yes; then
5895 cf_add_libs="-lcur_colr"
5896 # Filter out duplicates - this happens with badly-designed ".pc" files...
5897 for cf_add_1lib in $LIBS
5899 for cf_add_2lib in $cf_add_libs
5901 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5907 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5911 ac_cv_func_initscr=yes
5915 echo "$as_me:5915: checking for initscr in -lHcurses" >&5
5916 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5917 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5918 echo $ECHO_N "(cached) $ECHO_C" >&6
5920 ac_check_lib_save_LIBS=$LIBS
5921 LIBS="-lHcurses $LIBS"
5922 cat >conftest.$ac_ext <<_ACEOF
5923 #line 5923 "configure"
5924 #include "confdefs.h"
5926 /* Override any gcc2 internal prototype to avoid an error. */
5930 /* We use char because int might match the return type of a gcc2
5931 builtin and then its argument prototype would still apply. */
5941 rm -f conftest.$ac_objext conftest$ac_exeext
5942 if { (eval echo "$as_me:5942: \"$ac_link\"") >&5
5943 (eval $ac_link) 2>&5
5945 echo "$as_me:5945: \$? = $ac_status" >&5
5946 (exit $ac_status); } &&
5947 { ac_try='test -s conftest$ac_exeext'
5948 { (eval echo "$as_me:5948: \"$ac_try\"") >&5
5951 echo "$as_me:5951: \$? = $ac_status" >&5
5952 (exit $ac_status); }; }; then
5953 ac_cv_lib_Hcurses_initscr=yes
5955 echo "$as_me: failed program was:" >&5
5956 cat conftest.$ac_ext >&5
5957 ac_cv_lib_Hcurses_initscr=no
5959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5960 LIBS=$ac_check_lib_save_LIBS
5962 echo "$as_me:5962: result: $ac_cv_lib_Hcurses_initscr" >&5
5963 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5964 if test $ac_cv_lib_Hcurses_initscr = yes; then
5966 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5968 cf_add_libs="-lHcurses"
5969 # Filter out duplicates - this happens with badly-designed ".pc" files...
5970 for cf_add_1lib in $LIBS
5972 for cf_add_2lib in $cf_add_libs
5974 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5980 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5984 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5985 ac_cv_func_initscr=yes
5994 case `arch 2>/dev/null` in
5999 if test -n "/lib64" ; then
6000 for cf_add_libdir in /lib64
6002 if test $cf_add_libdir = /usr/lib ; then
6004 elif test -d $cf_add_libdir
6007 if test -n "$LDFLAGS$LIBS" ; then
6008 # a loop is needed to ensure we can add subdirs of existing dirs
6009 for cf_test_libdir in $LDFLAGS $LIBS ; do
6010 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6011 cf_have_libdir=yes; break
6015 if test "$cf_have_libdir" = no ; then
6016 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6018 echo "${as_me:-configure}:6018: testing adding $cf_add_libdir to library-path ..." 1>&5
6020 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6028 if test -n "/lib" ; then
6029 for cf_add_libdir in /lib
6031 if test $cf_add_libdir = /usr/lib ; then
6033 elif test -d $cf_add_libdir
6036 if test -n "$LDFLAGS$LIBS" ; then
6037 # a loop is needed to ensure we can add subdirs of existing dirs
6038 for cf_test_libdir in $LDFLAGS $LIBS ; do
6039 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6040 cf_have_libdir=yes; break
6044 if test "$cf_have_libdir" = no ; then
6045 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6047 echo "${as_me:-configure}:6047: testing adding $cf_add_libdir to library-path ..." 1>&5
6049 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6059 if test -n "/lib" ; then
6060 for cf_add_libdir in /lib
6062 if test $cf_add_libdir = /usr/lib ; then
6064 elif test -d $cf_add_libdir
6067 if test -n "$LDFLAGS$LIBS" ; then
6068 # a loop is needed to ensure we can add subdirs of existing dirs
6069 for cf_test_libdir in $LDFLAGS $LIBS ; do
6070 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6071 cf_have_libdir=yes; break
6075 if test "$cf_have_libdir" = no ; then
6076 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6078 echo "${as_me:-configure}:6078: testing adding $cf_add_libdir to library-path ..." 1>&5
6080 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6090 if test "x$cf_cv_screen" = "xcurses_5lib"
6092 if test -d /usr/5lib ; then
6094 if test -n "/usr/5lib" ; then
6095 for cf_add_libdir in /usr/5lib
6097 if test $cf_add_libdir = /usr/lib ; then
6099 elif test -d $cf_add_libdir
6102 if test -n "$LDFLAGS$LIBS" ; then
6103 # a loop is needed to ensure we can add subdirs of existing dirs
6104 for cf_test_libdir in $LDFLAGS $LIBS ; do
6105 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6106 cf_have_libdir=yes; break
6110 if test "$cf_have_libdir" = no ; then
6111 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6113 echo "${as_me:-configure}:6113: testing adding $cf_add_libdir to library-path ..." 1>&5
6115 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6121 cf_add_libs="-lcurses -ltermcap"
6122 # Filter out duplicates - this happens with badly-designed ".pc" files...
6123 for cf_add_1lib in $LIBS
6125 for cf_add_2lib in $cf_add_libs
6127 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6133 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6139 ac_cv_func_initscr=yes
6143 if test ".$ac_cv_func_initscr" != .yes ; then
6144 cf_save_LIBS="$LIBS"
6146 if test ".${cf_cv_ncurses_version:-no}" != .no
6148 cf_check_list="ncurses curses cursesX"
6150 cf_check_list="cursesX curses ncurses"
6153 # Check for library containing tgoto. Do this before curses library
6154 # because it may be needed to link the test-case for initscr.
6155 if test "x$cf_term_lib" = x
6157 echo "$as_me:6157: checking for tgoto" >&5
6158 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6159 if test "${ac_cv_func_tgoto+set}" = set; then
6160 echo $ECHO_N "(cached) $ECHO_C" >&6
6162 cat >conftest.$ac_ext <<_ACEOF
6163 #line 6163 "configure"
6164 #include "confdefs.h"
6165 /* System header to define __stub macros and hopefully few prototypes,
6166 which can conflict with char tgoto (); below. */
6168 /* Override any gcc2 internal prototype to avoid an error. */
6172 /* We use char because int might match the return type of a gcc2
6173 builtin and then its argument prototype would still apply. */
6180 /* The GNU C library defines this for functions which it implements
6181 to always fail with ENOSYS. Some functions are actually named
6182 something starting with __ and the normal name is an alias. */
6183 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6186 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6193 rm -f conftest.$ac_objext conftest$ac_exeext
6194 if { (eval echo "$as_me:6194: \"$ac_link\"") >&5
6195 (eval $ac_link) 2>&5
6197 echo "$as_me:6197: \$? = $ac_status" >&5
6198 (exit $ac_status); } &&
6199 { ac_try='test -s conftest$ac_exeext'
6200 { (eval echo "$as_me:6200: \"$ac_try\"") >&5
6203 echo "$as_me:6203: \$? = $ac_status" >&5
6204 (exit $ac_status); }; }; then
6205 ac_cv_func_tgoto=yes
6207 echo "$as_me: failed program was:" >&5
6208 cat conftest.$ac_ext >&5
6211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6213 echo "$as_me:6213: result: $ac_cv_func_tgoto" >&5
6214 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6215 if test $ac_cv_func_tgoto = yes; then
6216 cf_term_lib=predefined
6219 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6221 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6222 echo "$as_me:6222: checking for tgoto in -l$cf_term_lib" >&5
6223 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6224 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6225 echo $ECHO_N "(cached) $ECHO_C" >&6
6227 ac_check_lib_save_LIBS=$LIBS
6228 LIBS="-l$cf_term_lib $LIBS"
6229 cat >conftest.$ac_ext <<_ACEOF
6230 #line 6230 "configure"
6231 #include "confdefs.h"
6233 /* Override any gcc2 internal prototype to avoid an error. */
6237 /* We use char because int might match the return type of a gcc2
6238 builtin and then its argument prototype would still apply. */
6248 rm -f conftest.$ac_objext conftest$ac_exeext
6249 if { (eval echo "$as_me:6249: \"$ac_link\"") >&5
6250 (eval $ac_link) 2>&5
6252 echo "$as_me:6252: \$? = $ac_status" >&5
6253 (exit $ac_status); } &&
6254 { ac_try='test -s conftest$ac_exeext'
6255 { (eval echo "$as_me:6255: \"$ac_try\"") >&5
6258 echo "$as_me:6258: \$? = $ac_status" >&5
6259 (exit $ac_status); }; }; then
6260 eval "$as_ac_Lib=yes"
6262 echo "$as_me: failed program was:" >&5
6263 cat conftest.$ac_ext >&5
6264 eval "$as_ac_Lib=no"
6266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6267 LIBS=$ac_check_lib_save_LIBS
6269 echo "$as_me:6269: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6270 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6271 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6273 : ${cf_nculib_root:=$cf_term_lib}
6284 # Check for library containing initscr
6285 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6286 if test "x$cf_curs_lib" = x
6288 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6290 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6291 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6292 echo "$as_me:6292: checking if we can link with $cf_curs_lib library" >&5
6293 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6294 cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <${cf_cv_ncurses_header:-curses.h}>
6306 rm -f conftest.$ac_objext conftest$ac_exeext
6307 if { (eval echo "$as_me:6307: \"$ac_link\"") >&5
6308 (eval $ac_link) 2>&5
6310 echo "$as_me:6310: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
6312 { ac_try='test -s conftest$ac_exeext'
6313 { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6316 echo "$as_me:6316: \$? = $ac_status" >&5
6317 (exit $ac_status); }; }; then
6320 echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6325 echo "$as_me:6325: result: $cf_result" >&5
6326 echo "${ECHO_T}$cf_result" >&6
6327 test $cf_result = yes && break
6328 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6330 elif test "$cf_term_lib" != predefined ; then
6331 echo "$as_me:6331: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6332 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6336 #include <${cf_cv_ncurses_header:-curses.h}>
6340 initscr(); tgoto((char *)0, 0, 0);
6345 rm -f conftest.$ac_objext conftest$ac_exeext
6346 if { (eval echo "$as_me:6346: \"$ac_link\"") >&5
6347 (eval $ac_link) 2>&5
6349 echo "$as_me:6349: \$? = $ac_status" >&5
6350 (exit $ac_status); } &&
6351 { ac_try='test -s conftest$ac_exeext'
6352 { (eval echo "$as_me:6352: \"$ac_try\"") >&5
6355 echo "$as_me:6355: \$? = $ac_status" >&5
6356 (exit $ac_status); }; }; then
6359 echo "$as_me: failed program was:" >&5
6360 cat conftest.$ac_ext >&5
6362 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6363 cat >conftest.$ac_ext <<_ACEOF
6364 #line 6364 "configure"
6365 #include "confdefs.h"
6366 #include <${cf_cv_ncurses_header:-curses.h}>
6375 rm -f conftest.$ac_objext conftest$ac_exeext
6376 if { (eval echo "$as_me:6376: \"$ac_link\"") >&5
6377 (eval $ac_link) 2>&5
6379 echo "$as_me:6379: \$? = $ac_status" >&5
6380 (exit $ac_status); } &&
6381 { ac_try='test -s conftest$ac_exeext'
6382 { (eval echo "$as_me:6382: \"$ac_try\"") >&5
6385 echo "$as_me:6385: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
6389 echo "$as_me: failed program was:" >&5
6390 cat conftest.$ac_ext >&5
6393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6397 echo "$as_me:6397: result: $cf_result" >&5
6398 echo "${ECHO_T}$cf_result" >&6
6399 test $cf_result != error && break
6403 test $cf_curs_lib = unknown && { { echo "$as_me:6403: error: no curses library found" >&5
6404 echo "$as_me: error: no curses library found" >&2;}
6405 { (exit 1); exit 1; }; }
6412 echo "$as_me:6412: checking for multibyte character support" >&5
6413 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6414 if test "${cf_cv_utf8_lib+set}" = set; then
6415 echo $ECHO_N "(cached) $ECHO_C" >&6
6418 cf_save_LIBS="$LIBS"
6419 cat >conftest.$ac_ext <<_ACEOF
6420 #line 6420 "configure"
6421 #include "confdefs.h"
6432 rm -f conftest.$ac_objext conftest$ac_exeext
6433 if { (eval echo "$as_me:6433: \"$ac_link\"") >&5
6434 (eval $ac_link) 2>&5
6436 echo "$as_me:6436: \$? = $ac_status" >&5
6437 (exit $ac_status); } &&
6438 { ac_try='test -s conftest$ac_exeext'
6439 { (eval echo "$as_me:6439: \"$ac_try\"") >&5
6442 echo "$as_me:6442: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
6446 echo "$as_me: failed program was:" >&5
6447 cat conftest.$ac_ext >&5
6449 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6450 # will be set on completion of the AC_TRY_LINK below.
6451 cf_cv_header_path_utf8=
6452 cf_cv_library_path_utf8=
6454 echo "${as_me:-configure}:6454: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6456 cf_save_LIBS="$LIBS"
6458 cat >conftest.$ac_ext <<_ACEOF
6459 #line 6459 "configure"
6460 #include "confdefs.h"
6462 #include <libutf8.h>
6471 rm -f conftest.$ac_objext conftest$ac_exeext
6472 if { (eval echo "$as_me:6472: \"$ac_link\"") >&5
6473 (eval $ac_link) 2>&5
6475 echo "$as_me:6475: \$? = $ac_status" >&5
6476 (exit $ac_status); } &&
6477 { ac_try='test -s conftest$ac_exeext'
6478 { (eval echo "$as_me:6478: \"$ac_try\"") >&5
6481 echo "$as_me:6481: \$? = $ac_status" >&5
6482 (exit $ac_status); }; }; then
6484 cf_cv_find_linkage_utf8=yes
6485 cf_cv_header_path_utf8=/usr/include
6486 cf_cv_library_path_utf8=/usr/lib
6489 echo "$as_me: failed program was:" >&5
6490 cat conftest.$ac_ext >&5
6492 LIBS="-lutf8 $cf_save_LIBS"
6494 cat >conftest.$ac_ext <<_ACEOF
6495 #line 6495 "configure"
6496 #include "confdefs.h"
6498 #include <libutf8.h>
6507 rm -f conftest.$ac_objext conftest$ac_exeext
6508 if { (eval echo "$as_me:6508: \"$ac_link\"") >&5
6509 (eval $ac_link) 2>&5
6511 echo "$as_me:6511: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest$ac_exeext'
6514 { (eval echo "$as_me:6514: \"$ac_try\"") >&5
6517 echo "$as_me:6517: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6520 cf_cv_find_linkage_utf8=yes
6521 cf_cv_header_path_utf8=/usr/include
6522 cf_cv_library_path_utf8=/usr/lib
6523 cf_cv_library_file_utf8="-lutf8"
6526 echo "$as_me: failed program was:" >&5
6527 cat conftest.$ac_ext >&5
6529 cf_cv_find_linkage_utf8=no
6530 LIBS="$cf_save_LIBS"
6532 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6534 echo "${as_me:-configure}:6534: testing find linkage for utf8 library ..." 1>&5
6536 echo "${as_me:-configure}:6536: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6538 cf_save_CPPFLAGS="$CPPFLAGS"
6539 cf_test_CPPFLAGS="$CPPFLAGS"
6543 # collect the current set of include-directories from compiler flags
6544 cf_header_path_list=""
6545 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6546 for cf_header_path in $CPPFLAGS $CFLAGS
6548 case $cf_header_path in
6550 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6552 test "x$cf_header_path" != "xNONE" && \
6553 test -d "$cf_header_path" && \
6555 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6556 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6557 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6558 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6559 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6560 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6563 cf_header_path_list="$cf_header_path_list $cf_search"
6569 # add the variations for the package we are looking for
6573 test "x$prefix" != "xNONE" && \
6574 test -d "$prefix" && \
6576 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6577 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6578 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6579 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6580 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6581 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6584 for cf_subdir_prefix in \
6593 test "x$cf_subdir_prefix" != "x$prefix" && \
6594 test -d "$cf_subdir_prefix" && \
6595 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6596 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6597 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6598 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6599 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6600 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6601 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6606 test "$includedir" != NONE && \
6607 test "$includedir" != "/usr/include" && \
6608 test -d "$includedir" && {
6609 test -d $includedir && cf_search="$cf_search $includedir"
6610 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6613 test "$oldincludedir" != NONE && \
6614 test "$oldincludedir" != "/usr/include" && \
6615 test -d "$oldincludedir" && {
6616 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6617 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6620 cf_search="$cf_search $cf_header_path_list"
6622 for cf_cv_header_path_utf8 in $cf_search
6624 if test -d $cf_cv_header_path_utf8 ; then
6625 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6627 echo "${as_me:-configure}:6627: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6629 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6630 cat >conftest.$ac_ext <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6634 #include <libutf8.h>
6643 rm -f conftest.$ac_objext
6644 if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
6645 (eval $ac_compile) 2>&5
6647 echo "$as_me:6647: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
6649 { ac_try='test -s conftest.$ac_objext'
6650 { (eval echo "$as_me:6650: \"$ac_try\"") >&5
6653 echo "$as_me:6653: \$? = $ac_status" >&5
6654 (exit $ac_status); }; }; then
6656 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6658 echo "${as_me:-configure}:6658: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6660 cf_cv_find_linkage_utf8=maybe
6661 cf_test_CPPFLAGS="$CPPFLAGS"
6664 echo "$as_me: failed program was:" >&5
6665 cat conftest.$ac_ext >&5
6667 CPPFLAGS="$cf_save_CPPFLAGS"
6670 rm -f conftest.$ac_objext conftest.$ac_ext
6674 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6676 echo "${as_me:-configure}:6676: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6678 cf_save_LIBS="$LIBS"
6679 cf_save_LDFLAGS="$LDFLAGS"
6681 if test "$cf_cv_find_linkage_utf8" != yes ; then
6684 cf_library_path_list=""
6685 if test -n "${LDFLAGS}${LIBS}" ; then
6686 for cf_library_path in $LDFLAGS $LIBS
6688 case $cf_library_path in
6690 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6692 test "x$cf_library_path" != "xNONE" && \
6693 test -d "$cf_library_path" && \
6695 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6696 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6697 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6698 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6699 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6700 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6703 cf_library_path_list="$cf_library_path_list $cf_search"
6711 test "x$prefix" != "xNONE" && \
6712 test -d "$prefix" && \
6714 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6715 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6716 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6717 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6718 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6719 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6722 for cf_subdir_prefix in \
6731 test "x$cf_subdir_prefix" != "x$prefix" && \
6732 test -d "$cf_subdir_prefix" && \
6733 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6734 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6735 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6736 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6737 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6738 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6739 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6744 cf_search="$cf_library_path_list $cf_search"
6746 for cf_cv_library_path_utf8 in $cf_search
6748 if test -d $cf_cv_library_path_utf8 ; then
6749 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6751 echo "${as_me:-configure}:6751: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6753 CPPFLAGS="$cf_test_CPPFLAGS"
6754 LIBS="-lutf8 $cf_save_LIBS"
6755 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6756 cat >conftest.$ac_ext <<_ACEOF
6757 #line 6757 "configure"
6758 #include "confdefs.h"
6760 #include <libutf8.h>
6769 rm -f conftest.$ac_objext conftest$ac_exeext
6770 if { (eval echo "$as_me:6770: \"$ac_link\"") >&5
6771 (eval $ac_link) 2>&5
6773 echo "$as_me:6773: \$? = $ac_status" >&5
6774 (exit $ac_status); } &&
6775 { ac_try='test -s conftest$ac_exeext'
6776 { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6779 echo "$as_me:6779: \$? = $ac_status" >&5
6780 (exit $ac_status); }; }; then
6782 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6784 echo "${as_me:-configure}:6784: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6786 cf_cv_find_linkage_utf8=yes
6787 cf_cv_library_file_utf8="-lutf8"
6790 echo "$as_me: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6793 CPPFLAGS="$cf_save_CPPFLAGS"
6794 LIBS="$cf_save_LIBS"
6795 LDFLAGS="$cf_save_LDFLAGS"
6798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6801 CPPFLAGS="$cf_save_CPPFLAGS"
6802 LDFLAGS="$cf_save_LDFLAGS"
6806 cf_cv_find_linkage_utf8=no
6810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6815 LIBS="$cf_save_LIBS"
6817 if test "$cf_cv_find_linkage_utf8" = yes ; then
6818 cf_cv_utf8_lib=add-on
6824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6826 echo "$as_me:6826: result: $cf_cv_utf8_lib" >&5
6827 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6829 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6831 if test "$cf_cv_utf8_lib" = "add-on" ; then
6833 cat >>confdefs.h <<\EOF
6834 #define HAVE_LIBUTF8_H 1
6837 if test -n "$cf_cv_header_path_utf8" ; then
6838 for cf_add_incdir in $cf_cv_header_path_utf8
6840 while test $cf_add_incdir != /usr/include
6842 if test -d $cf_add_incdir
6845 if test -n "$CFLAGS$CPPFLAGS" ; then
6846 # a loop is needed to ensure we can add subdirs of existing dirs
6847 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6848 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6849 cf_have_incdir=yes; break
6854 if test "$cf_have_incdir" = no ; then
6855 if test "$cf_add_incdir" = /usr/local/include ; then
6856 if test "$GCC" = yes
6858 cf_save_CPPFLAGS=$CPPFLAGS
6859 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6860 cat >conftest.$ac_ext <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6872 rm -f conftest.$ac_objext
6873 if { (eval echo "$as_me:6873: \"$ac_compile\"") >&5
6874 (eval $ac_compile) 2>&5
6876 echo "$as_me:6876: \$? = $ac_status" >&5
6877 (exit $ac_status); } &&
6878 { ac_try='test -s conftest.$ac_objext'
6879 { (eval echo "$as_me:6879: \"$ac_try\"") >&5
6882 echo "$as_me:6882: \$? = $ac_status" >&5
6883 (exit $ac_status); }; }; then
6886 echo "$as_me: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6890 rm -f conftest.$ac_objext conftest.$ac_ext
6891 CPPFLAGS=$cf_save_CPPFLAGS
6896 if test "$cf_have_incdir" = no ; then
6897 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6899 echo "${as_me:-configure}:6899: testing adding $cf_add_incdir to include-path ..." 1>&5
6901 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6903 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6904 test "$cf_top_incdir" = "$cf_add_incdir" && break
6905 cf_add_incdir="$cf_top_incdir"
6916 if test -n "$cf_cv_library_path_utf8" ; then
6917 for cf_add_libdir in $cf_cv_library_path_utf8
6919 if test $cf_add_libdir = /usr/lib ; then
6921 elif test -d $cf_add_libdir
6924 if test -n "$LDFLAGS$LIBS" ; then
6925 # a loop is needed to ensure we can add subdirs of existing dirs
6926 for cf_test_libdir in $LDFLAGS $LIBS ; do
6927 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6928 cf_have_libdir=yes; break
6932 if test "$cf_have_libdir" = no ; then
6933 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6935 echo "${as_me:-configure}:6935: testing adding $cf_add_libdir to library-path ..." 1>&5
6937 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6943 cf_add_libs="$cf_cv_library_file_utf8"
6944 # Filter out duplicates - this happens with badly-designed ".pc" files...
6945 for cf_add_1lib in $LIBS
6947 for cf_add_2lib in $cf_add_libs
6949 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6955 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6961 cf_ncuconfig_root=$cf_cv_screen
6962 cf_have_ncuconfig=no
6964 if test "x${PKG_CONFIG:=none}" != xnone; then
6965 echo "$as_me:6965: checking pkg-config for $cf_ncuconfig_root" >&5
6966 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6967 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6968 echo "$as_me:6968: result: yes" >&5
6969 echo "${ECHO_T}yes" >&6
6971 echo "$as_me:6971: checking if the $cf_ncuconfig_root package files work" >&5
6972 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6973 cf_have_ncuconfig=unknown
6975 cf_save_CPPFLAGS="$CPPFLAGS"
6976 cf_save_LIBS="$LIBS"
6978 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6980 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6981 # Filter out duplicates - this happens with badly-designed ".pc" files...
6982 for cf_add_1lib in $LIBS
6984 for cf_add_2lib in $cf_add_libs
6986 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6992 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
6999 #include <${cf_cv_ncurses_header:-curses.h}>
7003 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7008 rm -f conftest.$ac_objext conftest$ac_exeext
7009 if { (eval echo "$as_me:7009: \"$ac_link\"") >&5
7010 (eval $ac_link) 2>&5
7012 echo "$as_me:7012: \$? = $ac_status" >&5
7013 (exit $ac_status); } &&
7014 { ac_try='test -s conftest$ac_exeext'
7015 { (eval echo "$as_me:7015: \"$ac_try\"") >&5
7018 echo "$as_me:7018: \$? = $ac_status" >&5
7019 (exit $ac_status); }; }; then
7020 if test "$cross_compiling" = yes; then
7021 cf_have_ncuconfig=maybe
7023 cat >conftest.$ac_ext <<_ACEOF
7024 #line 7024 "configure"
7025 #include "confdefs.h"
7026 #include <${cf_cv_ncurses_header:-curses.h}>
7028 { char *xx = curses_version(); return (xx == 0); }
7030 rm -f conftest$ac_exeext
7031 if { (eval echo "$as_me:7031: \"$ac_link\"") >&5
7032 (eval $ac_link) 2>&5
7034 echo "$as_me:7034: \$? = $ac_status" >&5
7035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7036 { (eval echo "$as_me:7036: \"$ac_try\"") >&5
7039 echo "$as_me:7039: \$? = $ac_status" >&5
7040 (exit $ac_status); }; }; then
7041 cf_have_ncuconfig=yes
7043 echo "$as_me: program exited with status $ac_status" >&5
7044 echo "$as_me: failed program was:" >&5
7045 cat conftest.$ac_ext >&5
7046 cf_have_ncuconfig=no
7048 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7051 echo "$as_me: failed program was:" >&5
7052 cat conftest.$ac_ext >&5
7053 cf_have_ncuconfig=no
7055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7056 echo "$as_me:7056: result: $cf_have_ncuconfig" >&5
7057 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7058 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7059 if test "$cf_have_ncuconfig" != "yes"
7061 CPPFLAGS="$cf_save_CPPFLAGS"
7062 LIBS="$cf_save_LIBS"
7063 NCURSES_CONFIG_PKG=none
7066 cat >>confdefs.h <<\EOF
7070 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7072 echo "$as_me:7072: checking for terminfo header" >&5
7073 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7074 if test "${cf_cv_term_header+set}" = set; then
7075 echo $ECHO_N "(cached) $ECHO_C" >&6
7078 case ${cf_cv_ncurses_header} in
7079 (*/ncurses.h|*/ncursesw.h)
7080 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7083 cf_term_header=term.h
7087 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7089 cat >conftest.$ac_ext <<_ACEOF
7090 #line 7090 "configure"
7091 #include "confdefs.h"
7093 #include <${cf_cv_ncurses_header:-curses.h}>
7099 int x = auto_left_margin
7104 rm -f conftest.$ac_objext
7105 if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
7106 (eval $ac_compile) 2>&5
7108 echo "$as_me:7108: \$? = $ac_status" >&5
7109 (exit $ac_status); } &&
7110 { ac_try='test -s conftest.$ac_objext'
7111 { (eval echo "$as_me:7111: \"$ac_try\"") >&5
7114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit $ac_status); }; }; then
7117 cf_cv_term_header="$cf_test"
7119 echo "$as_me: failed program was:" >&5
7120 cat conftest.$ac_ext >&5
7122 cf_cv_term_header=unknown
7125 rm -f conftest.$ac_objext conftest.$ac_ext
7126 test "$cf_cv_term_header" != unknown && break
7130 echo "$as_me:7130: result: $cf_cv_term_header" >&5
7131 echo "${ECHO_T}$cf_cv_term_header" >&6
7133 # Set definitions to allow ifdef'ing to accommodate subdirectories
7135 case $cf_cv_term_header in
7138 cat >>confdefs.h <<\EOF
7139 #define HAVE_TERM_H 1
7145 case $cf_cv_term_header in
7148 cat >>confdefs.h <<\EOF
7149 #define HAVE_NCURSES_TERM_H 1
7155 cat >>confdefs.h <<\EOF
7156 #define HAVE_NCURSESW_TERM_H 1
7165 echo "$as_me:7165: result: no" >&5
7166 echo "${ECHO_T}no" >&6
7167 NCURSES_CONFIG_PKG=none
7170 NCURSES_CONFIG_PKG=none
7173 if test "x$cf_have_ncuconfig" = "xno"; then
7174 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7176 if test -n "$ac_tool_prefix"; then
7177 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7179 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7180 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7181 echo "$as_me:7181: checking for $ac_word" >&5
7182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7183 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7184 echo $ECHO_N "(cached) $ECHO_C" >&6
7186 if test -n "$NCURSES_CONFIG"; then
7187 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7189 ac_save_IFS=$IFS; IFS=$ac_path_separator
7191 for ac_dir in $ac_dummy; do
7193 test -z "$ac_dir" && ac_dir=.
7194 $as_executable_p "$ac_dir/$ac_word" || continue
7195 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7196 echo "$as_me:7196: found $ac_dir/$ac_word" >&5
7202 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7203 if test -n "$NCURSES_CONFIG"; then
7204 echo "$as_me:7204: result: $NCURSES_CONFIG" >&5
7205 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7207 echo "$as_me:7207: result: no" >&5
7208 echo "${ECHO_T}no" >&6
7211 test -n "$NCURSES_CONFIG" && break
7214 if test -z "$NCURSES_CONFIG"; then
7215 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7216 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7218 # Extract the first word of "$ac_prog", so it can be a program name with args.
7219 set dummy $ac_prog; ac_word=$2
7220 echo "$as_me:7220: checking for $ac_word" >&5
7221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7222 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7223 echo $ECHO_N "(cached) $ECHO_C" >&6
7225 if test -n "$ac_ct_NCURSES_CONFIG"; then
7226 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7228 ac_save_IFS=$IFS; IFS=$ac_path_separator
7230 for ac_dir in $ac_dummy; do
7232 test -z "$ac_dir" && ac_dir=.
7233 $as_executable_p "$ac_dir/$ac_word" || continue
7234 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7235 echo "$as_me:7235: found $ac_dir/$ac_word" >&5
7241 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7242 if test -n "$ac_ct_NCURSES_CONFIG"; then
7243 echo "$as_me:7243: result: $ac_ct_NCURSES_CONFIG" >&5
7244 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7246 echo "$as_me:7246: result: no" >&5
7247 echo "${ECHO_T}no" >&6
7250 test -n "$ac_ct_NCURSES_CONFIG" && break
7252 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7254 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7257 if test "$NCURSES_CONFIG" != none ; then
7259 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7261 cf_add_libs="`$NCURSES_CONFIG --libs`"
7262 # Filter out duplicates - this happens with badly-designed ".pc" files...
7263 for cf_add_1lib in $LIBS
7265 for cf_add_2lib in $cf_add_libs
7267 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7273 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7277 # even with config script, some packages use no-override for curses.h
7279 echo "$as_me:7279: checking if we have identified curses headers" >&5
7280 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7281 if test "${cf_cv_ncurses_header+set}" = set; then
7282 echo $ECHO_N "(cached) $ECHO_C" >&6
7285 cf_cv_ncurses_header=none
7287 ncurses.h $cf_cv_screen/ncurses.h \
7288 curses.h $cf_cv_screen/curses.h
7290 cat >conftest.$ac_ext <<_ACEOF
7291 #line 7291 "configure"
7292 #include "confdefs.h"
7293 #include <${cf_header}>
7297 initscr(); tgoto("?", 0,0)
7302 rm -f conftest.$ac_objext
7303 if { (eval echo "$as_me:7303: \"$ac_compile\"") >&5
7304 (eval $ac_compile) 2>&5
7306 echo "$as_me:7306: \$? = $ac_status" >&5
7307 (exit $ac_status); } &&
7308 { ac_try='test -s conftest.$ac_objext'
7309 { (eval echo "$as_me:7309: \"$ac_try\"") >&5
7312 echo "$as_me:7312: \$? = $ac_status" >&5
7313 (exit $ac_status); }; }; then
7314 cf_cv_ncurses_header=$cf_header; break
7316 echo "$as_me: failed program was:" >&5
7317 cat conftest.$ac_ext >&5
7319 rm -f conftest.$ac_objext conftest.$ac_ext
7323 echo "$as_me:7323: result: $cf_cv_ncurses_header" >&5
7324 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7326 if test "$cf_cv_ncurses_header" = none ; then
7327 { { echo "$as_me:7327: error: No curses header-files found" >&5
7328 echo "$as_me: error: No curses header-files found" >&2;}
7329 { (exit 1); exit 1; }; }
7332 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7334 for ac_header in $cf_cv_ncurses_header
7336 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7337 echo "$as_me:7337: checking for $ac_header" >&5
7338 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7339 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7340 echo $ECHO_N "(cached) $ECHO_C" >&6
7342 cat >conftest.$ac_ext <<_ACEOF
7343 #line 7343 "configure"
7344 #include "confdefs.h"
7345 #include <$ac_header>
7347 if { (eval echo "$as_me:7347: \"$ac_cpp conftest.$ac_ext\"") >&5
7348 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7350 egrep -v '^ *\+' conftest.er1 >conftest.err
7352 cat conftest.err >&5
7353 echo "$as_me:7353: \$? = $ac_status" >&5
7354 (exit $ac_status); } >/dev/null; then
7355 if test -s conftest.err; then
7356 ac_cpp_err=$ac_c_preproc_warn_flag
7363 if test -z "$ac_cpp_err"; then
7364 eval "$as_ac_Header=yes"
7366 echo "$as_me: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7368 eval "$as_ac_Header=no"
7370 rm -f conftest.err conftest.$ac_ext
7372 echo "$as_me:7372: result: `eval echo '${'$as_ac_Header'}'`" >&5
7373 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7374 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7375 cat >>confdefs.h <<EOF
7376 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7382 cat >>confdefs.h <<\EOF
7386 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7388 cat >>confdefs.h <<EOF
7389 #define $cf_nculib_ROOT 1
7392 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7396 cf_ncuhdr_root=$cf_cv_screen
7398 test -n "$cf_cv_curses_dir" && \
7399 test "$cf_cv_curses_dir" != "no" && { \
7401 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7402 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7404 while test $cf_add_incdir != /usr/include
7406 if test -d $cf_add_incdir
7409 if test -n "$CFLAGS$CPPFLAGS" ; then
7410 # a loop is needed to ensure we can add subdirs of existing dirs
7411 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7412 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7413 cf_have_incdir=yes; break
7418 if test "$cf_have_incdir" = no ; then
7419 if test "$cf_add_incdir" = /usr/local/include ; then
7420 if test "$GCC" = yes
7422 cf_save_CPPFLAGS=$CPPFLAGS
7423 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7424 cat >conftest.$ac_ext <<_ACEOF
7425 #line 7425 "configure"
7426 #include "confdefs.h"
7436 rm -f conftest.$ac_objext
7437 if { (eval echo "$as_me:7437: \"$ac_compile\"") >&5
7438 (eval $ac_compile) 2>&5
7440 echo "$as_me:7440: \$? = $ac_status" >&5
7441 (exit $ac_status); } &&
7442 { ac_try='test -s conftest.$ac_objext'
7443 { (eval echo "$as_me:7443: \"$ac_try\"") >&5
7446 echo "$as_me:7446: \$? = $ac_status" >&5
7447 (exit $ac_status); }; }; then
7450 echo "$as_me: failed program was:" >&5
7451 cat conftest.$ac_ext >&5
7454 rm -f conftest.$ac_objext conftest.$ac_ext
7455 CPPFLAGS=$cf_save_CPPFLAGS
7460 if test "$cf_have_incdir" = no ; then
7461 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7463 echo "${as_me:-configure}:7463: testing adding $cf_add_incdir to include-path ..." 1>&5
7465 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7467 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7468 test "$cf_top_incdir" = "$cf_add_incdir" && break
7469 cf_add_incdir="$cf_top_incdir"
7482 echo "$as_me:7482: checking for $cf_ncuhdr_root header in include-path" >&5
7483 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7484 if test "${cf_cv_ncurses_h+set}" = set; then
7485 echo $ECHO_N "(cached) $ECHO_C" >&6
7488 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7489 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7490 for cf_header in $cf_header_list
7493 cat >conftest.$ac_ext <<_ACEOF
7494 #line 7494 "configure"
7495 #include "confdefs.h"
7497 #include <$cf_header>
7502 #ifdef NCURSES_VERSION
7504 printf("%s\n", NCURSES_VERSION);
7517 rm -f conftest.$ac_objext
7518 if { (eval echo "$as_me:7518: \"$ac_compile\"") >&5
7519 (eval $ac_compile) 2>&5
7521 echo "$as_me:7521: \$? = $ac_status" >&5
7522 (exit $ac_status); } &&
7523 { ac_try='test -s conftest.$ac_objext'
7524 { (eval echo "$as_me:7524: \"$ac_try\"") >&5
7527 echo "$as_me:7527: \$? = $ac_status" >&5
7528 (exit $ac_status); }; }; then
7529 cf_cv_ncurses_h=$cf_header
7532 echo "$as_me: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7536 rm -f conftest.$ac_objext conftest.$ac_ext
7538 test "$cf_cv_ncurses_h" != no && break
7542 echo "$as_me:7542: result: $cf_cv_ncurses_h" >&5
7543 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7545 if test "$cf_cv_ncurses_h" != no ; then
7546 cf_cv_ncurses_header=$cf_cv_ncurses_h
7549 echo "$as_me:7549: checking for $cf_ncuhdr_root include-path" >&5
7550 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7551 if test "${cf_cv_ncurses_h2+set}" = set; then
7552 echo $ECHO_N "(cached) $ECHO_C" >&6
7555 test -n "$verbose" && echo
7559 # collect the current set of include-directories from compiler flags
7560 cf_header_path_list=""
7561 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7562 for cf_header_path in $CPPFLAGS $CFLAGS
7564 case $cf_header_path in
7566 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7568 test "x$cf_header_path" != "xNONE" && \
7569 test -d "$cf_header_path" && \
7571 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7572 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7573 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7574 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7575 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7576 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"
7579 cf_header_path_list="$cf_header_path_list $cf_search"
7585 # add the variations for the package we are looking for
7589 test "x$prefix" != "xNONE" && \
7590 test -d "$prefix" && \
7592 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7593 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7594 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7595 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7596 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7597 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7600 for cf_subdir_prefix in \
7609 test "x$cf_subdir_prefix" != "x$prefix" && \
7610 test -d "$cf_subdir_prefix" && \
7611 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7612 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7613 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7614 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7615 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7616 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7617 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"
7622 test "$includedir" != NONE && \
7623 test "$includedir" != "/usr/include" && \
7624 test -d "$includedir" && {
7625 test -d $includedir && cf_search="$cf_search $includedir"
7626 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7629 test "$oldincludedir" != NONE && \
7630 test "$oldincludedir" != "/usr/include" && \
7631 test -d "$oldincludedir" && {
7632 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7633 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7636 cf_search="$cf_search $cf_header_path_list"
7638 test -n "$verbose" && echo search path $cf_search
7639 cf_save2_CPPFLAGS="$CPPFLAGS"
7640 for cf_incdir in $cf_search
7643 if test -n "$cf_incdir" ; then
7644 for cf_add_incdir in $cf_incdir
7646 while test $cf_add_incdir != /usr/include
7648 if test -d $cf_add_incdir
7651 if test -n "$CFLAGS$CPPFLAGS" ; then
7652 # a loop is needed to ensure we can add subdirs of existing dirs
7653 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7654 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7655 cf_have_incdir=yes; break
7660 if test "$cf_have_incdir" = no ; then
7661 if test "$cf_add_incdir" = /usr/local/include ; then
7662 if test "$GCC" = yes
7664 cf_save_CPPFLAGS=$CPPFLAGS
7665 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7666 cat >conftest.$ac_ext <<_ACEOF
7667 #line 7667 "configure"
7668 #include "confdefs.h"
7678 rm -f conftest.$ac_objext
7679 if { (eval echo "$as_me:7679: \"$ac_compile\"") >&5
7680 (eval $ac_compile) 2>&5
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit $ac_status); } &&
7684 { ac_try='test -s conftest.$ac_objext'
7685 { (eval echo "$as_me:7685: \"$ac_try\"") >&5
7688 echo "$as_me:7688: \$? = $ac_status" >&5
7689 (exit $ac_status); }; }; then
7692 echo "$as_me: failed program was:" >&5
7693 cat conftest.$ac_ext >&5
7696 rm -f conftest.$ac_objext conftest.$ac_ext
7697 CPPFLAGS=$cf_save_CPPFLAGS
7702 if test "$cf_have_incdir" = no ; then
7703 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7705 echo "${as_me:-configure}:7705: testing adding $cf_add_incdir to include-path ..." 1>&5
7707 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7709 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7710 test "$cf_top_incdir" = "$cf_add_incdir" && break
7711 cf_add_incdir="$cf_top_incdir"
7727 cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7731 #include <$cf_header>
7736 #ifdef NCURSES_VERSION
7738 printf("%s\n", NCURSES_VERSION);
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753 (eval $ac_compile) 2>&5
7755 echo "$as_me:7755: \$? = $ac_status" >&5
7756 (exit $ac_status); } &&
7757 { ac_try='test -s conftest.$ac_objext'
7758 { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7761 echo "$as_me:7761: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 cf_cv_ncurses_h2=$cf_header
7766 echo "$as_me: failed program was:" >&5
7767 cat conftest.$ac_ext >&5
7770 rm -f conftest.$ac_objext conftest.$ac_ext
7772 if test "$cf_cv_ncurses_h2" != no ; then
7773 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7774 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7777 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7779 CPPFLAGS="$cf_save2_CPPFLAGS"
7780 test "$cf_cv_ncurses_h2" != no && break
7782 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7782: error: not found" >&5
7783 echo "$as_me: error: not found" >&2;}
7784 { (exit 1); exit 1; }; }
7787 echo "$as_me:7787: result: $cf_cv_ncurses_h2" >&5
7788 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7790 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7791 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7792 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7793 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7796 if test -n "$cf_1st_incdir" ; then
7797 for cf_add_incdir in $cf_1st_incdir
7799 while test $cf_add_incdir != /usr/include
7801 if test -d $cf_add_incdir
7804 if test -n "$CFLAGS$CPPFLAGS" ; then
7805 # a loop is needed to ensure we can add subdirs of existing dirs
7806 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7807 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7808 cf_have_incdir=yes; break
7813 if test "$cf_have_incdir" = no ; then
7814 if test "$cf_add_incdir" = /usr/local/include ; then
7815 if test "$GCC" = yes
7817 cf_save_CPPFLAGS=$CPPFLAGS
7818 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7819 cat >conftest.$ac_ext <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7831 rm -f conftest.$ac_objext
7832 if { (eval echo "$as_me:7832: \"$ac_compile\"") >&5
7833 (eval $ac_compile) 2>&5
7835 echo "$as_me:7835: \$? = $ac_status" >&5
7836 (exit $ac_status); } &&
7837 { ac_try='test -s conftest.$ac_objext'
7838 { (eval echo "$as_me:7838: \"$ac_try\"") >&5
7841 echo "$as_me:7841: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7845 echo "$as_me: failed program was:" >&5
7846 cat conftest.$ac_ext >&5
7849 rm -f conftest.$ac_objext conftest.$ac_ext
7850 CPPFLAGS=$cf_save_CPPFLAGS
7855 if test "$cf_have_incdir" = no ; then
7856 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7858 echo "${as_me:-configure}:7858: testing adding $cf_add_incdir to include-path ..." 1>&5
7860 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7862 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7863 test "$cf_top_incdir" = "$cf_add_incdir" && break
7864 cf_add_incdir="$cf_top_incdir"
7877 # Set definitions to allow ifdef'ing for ncurses.h
7879 case $cf_cv_ncurses_header in
7882 cat >>confdefs.h <<\EOF
7883 #define HAVE_NCURSES_H 1
7889 case $cf_cv_ncurses_header in
7890 (ncurses/curses.h|ncurses/ncurses.h)
7892 cat >>confdefs.h <<\EOF
7893 #define HAVE_NCURSES_NCURSES_H 1
7897 (ncursesw/curses.h|ncursesw/ncurses.h)
7899 cat >>confdefs.h <<\EOF
7900 #define HAVE_NCURSESW_NCURSES_H 1
7906 echo "$as_me:7906: checking for terminfo header" >&5
7907 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7908 if test "${cf_cv_term_header+set}" = set; then
7909 echo $ECHO_N "(cached) $ECHO_C" >&6
7912 case ${cf_cv_ncurses_header} in
7913 (*/ncurses.h|*/ncursesw.h)
7914 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7917 cf_term_header=term.h
7921 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7923 cat >conftest.$ac_ext <<_ACEOF
7924 #line 7924 "configure"
7925 #include "confdefs.h"
7927 #include <${cf_cv_ncurses_header:-curses.h}>
7933 int x = auto_left_margin
7938 rm -f conftest.$ac_objext
7939 if { (eval echo "$as_me:7939: \"$ac_compile\"") >&5
7940 (eval $ac_compile) 2>&5
7942 echo "$as_me:7942: \$? = $ac_status" >&5
7943 (exit $ac_status); } &&
7944 { ac_try='test -s conftest.$ac_objext'
7945 { (eval echo "$as_me:7945: \"$ac_try\"") >&5
7948 echo "$as_me:7948: \$? = $ac_status" >&5
7949 (exit $ac_status); }; }; then
7951 cf_cv_term_header="$cf_test"
7953 echo "$as_me: failed program was:" >&5
7954 cat conftest.$ac_ext >&5
7956 cf_cv_term_header=unknown
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960 test "$cf_cv_term_header" != unknown && break
7964 echo "$as_me:7964: result: $cf_cv_term_header" >&5
7965 echo "${ECHO_T}$cf_cv_term_header" >&6
7967 # Set definitions to allow ifdef'ing to accommodate subdirectories
7969 case $cf_cv_term_header in
7972 cat >>confdefs.h <<\EOF
7973 #define HAVE_TERM_H 1
7979 case $cf_cv_term_header in
7982 cat >>confdefs.h <<\EOF
7983 #define HAVE_NCURSES_TERM_H 1
7989 cat >>confdefs.h <<\EOF
7990 #define HAVE_NCURSESW_TERM_H 1
7996 # some applications need this, but should check for NCURSES_VERSION
7998 cat >>confdefs.h <<\EOF
8002 echo "$as_me:8002: checking for ncurses version" >&5
8003 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8004 if test "${cf_cv_ncurses_version+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8008 cf_cv_ncurses_version=no
8011 if test "$cross_compiling" = yes; then
8013 # This will not work if the preprocessor splits the line after the
8014 # Autoconf token. The 'unproto' program does that.
8015 cat > conftest.$ac_ext <<EOF
8016 #include <${cf_cv_ncurses_header:-curses.h}>
8018 #ifdef NCURSES_VERSION
8019 Autoconf NCURSES_VERSION
8027 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8028 { (eval echo "$as_me:8028: \"$cf_try\"") >&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit $ac_status); }
8033 if test -f conftest.out ; then
8034 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8035 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8040 cat >conftest.$ac_ext <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8044 #include <${cf_cv_ncurses_header:-curses.h}>
8048 FILE *fp = fopen("$cf_tempfile", "w");
8049 #ifdef NCURSES_VERSION
8050 # ifdef NCURSES_VERSION_PATCH
8051 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8053 fprintf(fp, "%s\n", NCURSES_VERSION);
8057 fprintf(fp, "old\n");
8062 ${cf_cv_main_return:-return}(0);
8065 rm -f conftest$ac_exeext
8066 if { (eval echo "$as_me:8066: \"$ac_link\"") >&5
8067 (eval $ac_link) 2>&5
8069 echo "$as_me:8069: \$? = $ac_status" >&5
8070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8071 { (eval echo "$as_me:8071: \"$ac_try\"") >&5
8074 echo "$as_me:8074: \$? = $ac_status" >&5
8075 (exit $ac_status); }; }; then
8077 cf_cv_ncurses_version=`cat $cf_tempfile`
8079 echo "$as_me: program exited with status $ac_status" >&5
8080 echo "$as_me: failed program was:" >&5
8081 cat conftest.$ac_ext >&5
8083 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8088 echo "$as_me:8088: result: $cf_cv_ncurses_version" >&5
8089 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8090 test "$cf_cv_ncurses_version" = no ||
8091 cat >>confdefs.h <<\EOF
8095 cf_nculib_root=$cf_cv_screen
8096 # This works, except for the special case where we find gpm, but
8097 # ncurses is in a nonstandard location via $LIBS, and we really want
8100 cf_ncurses_SAVE="$LIBS"
8101 echo "$as_me:8101: checking for Gpm_Open in -lgpm" >&5
8102 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8103 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8104 echo $ECHO_N "(cached) $ECHO_C" >&6
8106 ac_check_lib_save_LIBS=$LIBS
8108 cat >conftest.$ac_ext <<_ACEOF
8109 #line 8109 "configure"
8110 #include "confdefs.h"
8112 /* Override any gcc2 internal prototype to avoid an error. */
8116 /* We use char because int might match the return type of a gcc2
8117 builtin and then its argument prototype would still apply. */
8127 rm -f conftest.$ac_objext conftest$ac_exeext
8128 if { (eval echo "$as_me:8128: \"$ac_link\"") >&5
8129 (eval $ac_link) 2>&5
8131 echo "$as_me:8131: \$? = $ac_status" >&5
8132 (exit $ac_status); } &&
8133 { ac_try='test -s conftest$ac_exeext'
8134 { (eval echo "$as_me:8134: \"$ac_try\"") >&5
8137 echo "$as_me:8137: \$? = $ac_status" >&5
8138 (exit $ac_status); }; }; then
8139 ac_cv_lib_gpm_Gpm_Open=yes
8141 echo "$as_me: failed program was:" >&5
8142 cat conftest.$ac_ext >&5
8143 ac_cv_lib_gpm_Gpm_Open=no
8145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8146 LIBS=$ac_check_lib_save_LIBS
8148 echo "$as_me:8148: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8149 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8150 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8151 echo "$as_me:8151: checking for initscr in -lgpm" >&5
8152 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8153 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8154 echo $ECHO_N "(cached) $ECHO_C" >&6
8156 ac_check_lib_save_LIBS=$LIBS
8158 cat >conftest.$ac_ext <<_ACEOF
8159 #line 8159 "configure"
8160 #include "confdefs.h"
8162 /* Override any gcc2 internal prototype to avoid an error. */
8166 /* We use char because int might match the return type of a gcc2
8167 builtin and then its argument prototype would still apply. */
8177 rm -f conftest.$ac_objext conftest$ac_exeext
8178 if { (eval echo "$as_me:8178: \"$ac_link\"") >&5
8179 (eval $ac_link) 2>&5
8181 echo "$as_me:8181: \$? = $ac_status" >&5
8182 (exit $ac_status); } &&
8183 { ac_try='test -s conftest$ac_exeext'
8184 { (eval echo "$as_me:8184: \"$ac_try\"") >&5
8187 echo "$as_me:8187: \$? = $ac_status" >&5
8188 (exit $ac_status); }; }; then
8189 ac_cv_lib_gpm_initscr=yes
8191 echo "$as_me: failed program was:" >&5
8192 cat conftest.$ac_ext >&5
8193 ac_cv_lib_gpm_initscr=no
8195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8196 LIBS=$ac_check_lib_save_LIBS
8198 echo "$as_me:8198: result: $ac_cv_lib_gpm_initscr" >&5
8199 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8200 if test $ac_cv_lib_gpm_initscr = yes; then
8201 LIBS="$cf_ncurses_SAVE"
8203 cf_ncurses_LIBS="-lgpm"
8210 # This is only necessary if you are linking against an obsolete
8211 # version of ncurses (but it should do no harm, since it's static).
8212 if test "$cf_nculib_root" = ncurses ; then
8213 echo "$as_me:8213: checking for tgoto in -lmytinfo" >&5
8214 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8215 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8216 echo $ECHO_N "(cached) $ECHO_C" >&6
8218 ac_check_lib_save_LIBS=$LIBS
8219 LIBS="-lmytinfo $LIBS"
8220 cat >conftest.$ac_ext <<_ACEOF
8221 #line 8221 "configure"
8222 #include "confdefs.h"
8224 /* Override any gcc2 internal prototype to avoid an error. */
8228 /* We use char because int might match the return type of a gcc2
8229 builtin and then its argument prototype would still apply. */
8239 rm -f conftest.$ac_objext conftest$ac_exeext
8240 if { (eval echo "$as_me:8240: \"$ac_link\"") >&5
8241 (eval $ac_link) 2>&5
8243 echo "$as_me:8243: \$? = $ac_status" >&5
8244 (exit $ac_status); } &&
8245 { ac_try='test -s conftest$ac_exeext'
8246 { (eval echo "$as_me:8246: \"$ac_try\"") >&5
8249 echo "$as_me:8249: \$? = $ac_status" >&5
8250 (exit $ac_status); }; }; then
8251 ac_cv_lib_mytinfo_tgoto=yes
8253 echo "$as_me: failed program was:" >&5
8254 cat conftest.$ac_ext >&5
8255 ac_cv_lib_mytinfo_tgoto=no
8257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8258 LIBS=$ac_check_lib_save_LIBS
8260 echo "$as_me:8260: result: $ac_cv_lib_mytinfo_tgoto" >&5
8261 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8262 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8263 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8270 cf_add_libs="$cf_ncurses_LIBS"
8271 # Filter out duplicates - this happens with badly-designed ".pc" files...
8272 for cf_add_1lib in $LIBS
8274 for cf_add_2lib in $cf_add_libs
8276 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8282 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8286 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8289 cf_add_libs="-l$cf_nculib_root"
8290 # Filter out duplicates - this happens with badly-designed ".pc" files...
8291 for cf_add_1lib in $LIBS
8293 for cf_add_2lib in $cf_add_libs
8295 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8301 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8307 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8309 echo "$as_me:8309: checking for initscr" >&5
8310 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8311 if test "${ac_cv_func_initscr+set}" = set; then
8312 echo $ECHO_N "(cached) $ECHO_C" >&6
8314 cat >conftest.$ac_ext <<_ACEOF
8315 #line 8315 "configure"
8316 #include "confdefs.h"
8317 /* System header to define __stub macros and hopefully few prototypes,
8318 which can conflict with char initscr (); below. */
8320 /* Override any gcc2 internal prototype to avoid an error. */
8324 /* We use char because int might match the return type of a gcc2
8325 builtin and then its argument prototype would still apply. */
8332 /* The GNU C library defines this for functions which it implements
8333 to always fail with ENOSYS. Some functions are actually named
8334 something starting with __ and the normal name is an alias. */
8335 #if defined (__stub_initscr) || defined (__stub___initscr)
8338 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8345 rm -f conftest.$ac_objext conftest$ac_exeext
8346 if { (eval echo "$as_me:8346: \"$ac_link\"") >&5
8347 (eval $ac_link) 2>&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest$ac_exeext'
8352 { (eval echo "$as_me:8352: \"$ac_try\"") >&5
8355 echo "$as_me:8355: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8357 ac_cv_func_initscr=yes
8359 echo "$as_me: failed program was:" >&5
8360 cat conftest.$ac_ext >&5
8361 ac_cv_func_initscr=no
8363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8365 echo "$as_me:8365: result: $ac_cv_func_initscr" >&5
8366 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8367 if test $ac_cv_func_initscr = yes; then
8368 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8371 cf_save_LIBS="$LIBS"
8372 echo "$as_me:8372: checking for initscr in -l$cf_nculib_root" >&5
8373 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8374 LIBS="-l$cf_nculib_root $LIBS"
8375 cat >conftest.$ac_ext <<_ACEOF
8376 #line 8376 "configure"
8377 #include "confdefs.h"
8378 #include <${cf_cv_ncurses_header:-curses.h}>
8387 rm -f conftest.$ac_objext conftest$ac_exeext
8388 if { (eval echo "$as_me:8388: \"$ac_link\"") >&5
8389 (eval $ac_link) 2>&5
8391 echo "$as_me:8391: \$? = $ac_status" >&5
8392 (exit $ac_status); } &&
8393 { ac_try='test -s conftest$ac_exeext'
8394 { (eval echo "$as_me:8394: \"$ac_try\"") >&5
8397 echo "$as_me:8397: \$? = $ac_status" >&5
8398 (exit $ac_status); }; }; then
8399 echo "$as_me:8399: result: yes" >&5
8400 echo "${ECHO_T}yes" >&6
8401 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8404 echo "$as_me: failed program was:" >&5
8405 cat conftest.$ac_ext >&5
8406 echo "$as_me:8406: result: no" >&5
8407 echo "${ECHO_T}no" >&6
8410 cf_library_path_list=""
8411 if test -n "${LDFLAGS}${LIBS}" ; then
8412 for cf_library_path in $LDFLAGS $LIBS
8414 case $cf_library_path in
8416 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8418 test "x$cf_library_path" != "xNONE" && \
8419 test -d "$cf_library_path" && \
8421 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8422 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8423 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8424 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8425 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8426 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"
8429 cf_library_path_list="$cf_library_path_list $cf_search"
8437 test "x$prefix" != "xNONE" && \
8438 test -d "$prefix" && \
8440 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8441 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8442 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8443 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8444 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8445 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8448 for cf_subdir_prefix in \
8457 test "x$cf_subdir_prefix" != "x$prefix" && \
8458 test -d "$cf_subdir_prefix" && \
8459 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8460 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8461 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8462 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8463 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8464 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8465 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"
8470 cf_search="$cf_library_path_list $cf_search"
8472 for cf_libdir in $cf_search
8474 echo "$as_me:8474: checking for -l$cf_nculib_root in $cf_libdir" >&5
8475 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8476 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8477 cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480 #include <${cf_cv_ncurses_header:-curses.h}>
8489 rm -f conftest.$ac_objext conftest$ac_exeext
8490 if { (eval echo "$as_me:8490: \"$ac_link\"") >&5
8491 (eval $ac_link) 2>&5
8493 echo "$as_me:8493: \$? = $ac_status" >&5
8494 (exit $ac_status); } &&
8495 { ac_try='test -s conftest$ac_exeext'
8496 { (eval echo "$as_me:8496: \"$ac_try\"") >&5
8499 echo "$as_me:8499: \$? = $ac_status" >&5
8500 (exit $ac_status); }; }; then
8501 echo "$as_me:8501: result: yes" >&5
8502 echo "${ECHO_T}yes" >&6
8503 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8506 echo "$as_me: failed program was:" >&5
8507 cat conftest.$ac_ext >&5
8508 echo "$as_me:8508: result: no" >&5
8509 echo "${ECHO_T}no" >&6
8510 LIBS="$cf_save_LIBS"
8512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8520 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8522 if test $cf_found_library = no ; then
8523 { { echo "$as_me:8523: error: Cannot link $cf_nculib_root library" >&5
8524 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8525 { (exit 1); exit 1; }; }
8530 if test -n "$cf_ncurses_LIBS" ; then
8531 echo "$as_me:8531: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8532 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8533 cf_ncurses_SAVE="$LIBS"
8534 for p in $cf_ncurses_LIBS ; do
8535 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8536 if test "$q" != "$LIBS" ; then
8540 cat >conftest.$ac_ext <<_ACEOF
8541 #line 8541 "configure"
8542 #include "confdefs.h"
8543 #include <${cf_cv_ncurses_header:-curses.h}>
8547 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8552 rm -f conftest.$ac_objext conftest$ac_exeext
8553 if { (eval echo "$as_me:8553: \"$ac_link\"") >&5
8554 (eval $ac_link) 2>&5
8556 echo "$as_me:8556: \$? = $ac_status" >&5
8557 (exit $ac_status); } &&
8558 { ac_try='test -s conftest$ac_exeext'
8559 { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8562 echo "$as_me:8562: \$? = $ac_status" >&5
8563 (exit $ac_status); }; }; then
8564 echo "$as_me:8564: result: yes" >&5
8565 echo "${ECHO_T}yes" >&6
8567 echo "$as_me: failed program was:" >&5
8568 cat conftest.$ac_ext >&5
8569 echo "$as_me:8569: result: no" >&5
8570 echo "${ECHO_T}no" >&6
8571 LIBS="$cf_ncurses_SAVE"
8573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8576 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8578 cat >>confdefs.h <<EOF
8579 #define $cf_nculib_ROOT 1
8590 cf_ncuconfig_root=$cf_cv_screen
8591 cf_have_ncuconfig=no
8593 if test "x${PKG_CONFIG:=none}" != xnone; then
8594 echo "$as_me:8594: checking pkg-config for $cf_ncuconfig_root" >&5
8595 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8596 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8597 echo "$as_me:8597: result: yes" >&5
8598 echo "${ECHO_T}yes" >&6
8600 echo "$as_me:8600: checking if the $cf_ncuconfig_root package files work" >&5
8601 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8602 cf_have_ncuconfig=unknown
8604 cf_save_CPPFLAGS="$CPPFLAGS"
8605 cf_save_LIBS="$LIBS"
8607 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8609 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8610 # Filter out duplicates - this happens with badly-designed ".pc" files...
8611 for cf_add_1lib in $LIBS
8613 for cf_add_2lib in $cf_add_libs
8615 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8621 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8625 cat >conftest.$ac_ext <<_ACEOF
8626 #line 8626 "configure"
8627 #include "confdefs.h"
8628 #include <${cf_cv_ncurses_header:-curses.h}>
8632 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8637 rm -f conftest.$ac_objext conftest$ac_exeext
8638 if { (eval echo "$as_me:8638: \"$ac_link\"") >&5
8639 (eval $ac_link) 2>&5
8641 echo "$as_me:8641: \$? = $ac_status" >&5
8642 (exit $ac_status); } &&
8643 { ac_try='test -s conftest$ac_exeext'
8644 { (eval echo "$as_me:8644: \"$ac_try\"") >&5
8647 echo "$as_me:8647: \$? = $ac_status" >&5
8648 (exit $ac_status); }; }; then
8649 if test "$cross_compiling" = yes; then
8650 cf_have_ncuconfig=maybe
8652 cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8655 #include <${cf_cv_ncurses_header:-curses.h}>
8657 { char *xx = curses_version(); return (xx == 0); }
8659 rm -f conftest$ac_exeext
8660 if { (eval echo "$as_me:8660: \"$ac_link\"") >&5
8661 (eval $ac_link) 2>&5
8663 echo "$as_me:8663: \$? = $ac_status" >&5
8664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8665 { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8668 echo "$as_me:8668: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 cf_have_ncuconfig=yes
8672 echo "$as_me: program exited with status $ac_status" >&5
8673 echo "$as_me: failed program was:" >&5
8674 cat conftest.$ac_ext >&5
8675 cf_have_ncuconfig=no
8677 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8680 echo "$as_me: failed program was:" >&5
8681 cat conftest.$ac_ext >&5
8682 cf_have_ncuconfig=no
8684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8685 echo "$as_me:8685: result: $cf_have_ncuconfig" >&5
8686 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8687 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8688 if test "$cf_have_ncuconfig" != "yes"
8690 CPPFLAGS="$cf_save_CPPFLAGS"
8691 LIBS="$cf_save_LIBS"
8692 NCURSES_CONFIG_PKG=none
8695 cat >>confdefs.h <<\EOF
8699 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8701 echo "$as_me:8701: checking for terminfo header" >&5
8702 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8703 if test "${cf_cv_term_header+set}" = set; then
8704 echo $ECHO_N "(cached) $ECHO_C" >&6
8707 case ${cf_cv_ncurses_header} in
8708 (*/ncurses.h|*/ncursesw.h)
8709 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8712 cf_term_header=term.h
8716 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8718 cat >conftest.$ac_ext <<_ACEOF
8719 #line 8719 "configure"
8720 #include "confdefs.h"
8722 #include <${cf_cv_ncurses_header:-curses.h}>
8728 int x = auto_left_margin
8733 rm -f conftest.$ac_objext
8734 if { (eval echo "$as_me:8734: \"$ac_compile\"") >&5
8735 (eval $ac_compile) 2>&5
8737 echo "$as_me:8737: \$? = $ac_status" >&5
8738 (exit $ac_status); } &&
8739 { ac_try='test -s conftest.$ac_objext'
8740 { (eval echo "$as_me:8740: \"$ac_try\"") >&5
8743 echo "$as_me:8743: \$? = $ac_status" >&5
8744 (exit $ac_status); }; }; then
8746 cf_cv_term_header="$cf_test"
8748 echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8751 cf_cv_term_header=unknown
8754 rm -f conftest.$ac_objext conftest.$ac_ext
8755 test "$cf_cv_term_header" != unknown && break
8759 echo "$as_me:8759: result: $cf_cv_term_header" >&5
8760 echo "${ECHO_T}$cf_cv_term_header" >&6
8762 # Set definitions to allow ifdef'ing to accommodate subdirectories
8764 case $cf_cv_term_header in
8767 cat >>confdefs.h <<\EOF
8768 #define HAVE_TERM_H 1
8774 case $cf_cv_term_header in
8777 cat >>confdefs.h <<\EOF
8778 #define HAVE_NCURSES_TERM_H 1
8784 cat >>confdefs.h <<\EOF
8785 #define HAVE_NCURSESW_TERM_H 1
8794 echo "$as_me:8794: result: no" >&5
8795 echo "${ECHO_T}no" >&6
8796 NCURSES_CONFIG_PKG=none
8799 NCURSES_CONFIG_PKG=none
8802 if test "x$cf_have_ncuconfig" = "xno"; then
8803 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8805 if test -n "$ac_tool_prefix"; then
8806 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8809 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8810 echo "$as_me:8810: checking for $ac_word" >&5
8811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8812 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8813 echo $ECHO_N "(cached) $ECHO_C" >&6
8815 if test -n "$NCURSES_CONFIG"; then
8816 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8818 ac_save_IFS=$IFS; IFS=$ac_path_separator
8820 for ac_dir in $ac_dummy; do
8822 test -z "$ac_dir" && ac_dir=.
8823 $as_executable_p "$ac_dir/$ac_word" || continue
8824 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8825 echo "$as_me:8825: found $ac_dir/$ac_word" >&5
8831 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8832 if test -n "$NCURSES_CONFIG"; then
8833 echo "$as_me:8833: result: $NCURSES_CONFIG" >&5
8834 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8836 echo "$as_me:8836: result: no" >&5
8837 echo "${ECHO_T}no" >&6
8840 test -n "$NCURSES_CONFIG" && break
8843 if test -z "$NCURSES_CONFIG"; then
8844 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8845 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8847 # Extract the first word of "$ac_prog", so it can be a program name with args.
8848 set dummy $ac_prog; ac_word=$2
8849 echo "$as_me:8849: checking for $ac_word" >&5
8850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8851 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8852 echo $ECHO_N "(cached) $ECHO_C" >&6
8854 if test -n "$ac_ct_NCURSES_CONFIG"; then
8855 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8857 ac_save_IFS=$IFS; IFS=$ac_path_separator
8859 for ac_dir in $ac_dummy; do
8861 test -z "$ac_dir" && ac_dir=.
8862 $as_executable_p "$ac_dir/$ac_word" || continue
8863 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8864 echo "$as_me:8864: found $ac_dir/$ac_word" >&5
8870 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8871 if test -n "$ac_ct_NCURSES_CONFIG"; then
8872 echo "$as_me:8872: result: $ac_ct_NCURSES_CONFIG" >&5
8873 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8875 echo "$as_me:8875: result: no" >&5
8876 echo "${ECHO_T}no" >&6
8879 test -n "$ac_ct_NCURSES_CONFIG" && break
8881 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8883 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8886 if test "$NCURSES_CONFIG" != none ; then
8888 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8890 cf_add_libs="`$NCURSES_CONFIG --libs`"
8891 # Filter out duplicates - this happens with badly-designed ".pc" files...
8892 for cf_add_1lib in $LIBS
8894 for cf_add_2lib in $cf_add_libs
8896 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8902 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8906 # even with config script, some packages use no-override for curses.h
8908 echo "$as_me:8908: checking if we have identified curses headers" >&5
8909 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8910 if test "${cf_cv_ncurses_header+set}" = set; then
8911 echo $ECHO_N "(cached) $ECHO_C" >&6
8914 cf_cv_ncurses_header=none
8916 ncurses.h $cf_cv_screen/ncurses.h \
8917 curses.h $cf_cv_screen/curses.h
8919 cat >conftest.$ac_ext <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8922 #include <${cf_header}>
8926 initscr(); tgoto("?", 0,0)
8931 rm -f conftest.$ac_objext
8932 if { (eval echo "$as_me:8932: \"$ac_compile\"") >&5
8933 (eval $ac_compile) 2>&5
8935 echo "$as_me:8935: \$? = $ac_status" >&5
8936 (exit $ac_status); } &&
8937 { ac_try='test -s conftest.$ac_objext'
8938 { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8941 echo "$as_me:8941: \$? = $ac_status" >&5
8942 (exit $ac_status); }; }; then
8943 cf_cv_ncurses_header=$cf_header; break
8945 echo "$as_me: failed program was:" >&5
8946 cat conftest.$ac_ext >&5
8948 rm -f conftest.$ac_objext conftest.$ac_ext
8952 echo "$as_me:8952: result: $cf_cv_ncurses_header" >&5
8953 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8955 if test "$cf_cv_ncurses_header" = none ; then
8956 { { echo "$as_me:8956: error: No curses header-files found" >&5
8957 echo "$as_me: error: No curses header-files found" >&2;}
8958 { (exit 1); exit 1; }; }
8961 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8963 for ac_header in $cf_cv_ncurses_header
8965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8966 echo "$as_me:8966: checking for $ac_header" >&5
8967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8969 echo $ECHO_N "(cached) $ECHO_C" >&6
8971 cat >conftest.$ac_ext <<_ACEOF
8972 #line 8972 "configure"
8973 #include "confdefs.h"
8974 #include <$ac_header>
8976 if { (eval echo "$as_me:8976: \"$ac_cpp conftest.$ac_ext\"") >&5
8977 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8979 egrep -v '^ *\+' conftest.er1 >conftest.err
8981 cat conftest.err >&5
8982 echo "$as_me:8982: \$? = $ac_status" >&5
8983 (exit $ac_status); } >/dev/null; then
8984 if test -s conftest.err; then
8985 ac_cpp_err=$ac_c_preproc_warn_flag
8992 if test -z "$ac_cpp_err"; then
8993 eval "$as_ac_Header=yes"
8995 echo "$as_me: failed program was:" >&5
8996 cat conftest.$ac_ext >&5
8997 eval "$as_ac_Header=no"
8999 rm -f conftest.err conftest.$ac_ext
9001 echo "$as_me:9001: result: `eval echo '${'$as_ac_Header'}'`" >&5
9002 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9003 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9004 cat >>confdefs.h <<EOF
9005 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9011 cat >>confdefs.h <<\EOF
9015 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9017 cat >>confdefs.h <<EOF
9018 #define $cf_nculib_ROOT 1
9021 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9025 cf_ncuhdr_root=$cf_cv_screen
9027 test -n "$cf_cv_curses_dir" && \
9028 test "$cf_cv_curses_dir" != "no" && { \
9030 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9031 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9033 while test $cf_add_incdir != /usr/include
9035 if test -d $cf_add_incdir
9038 if test -n "$CFLAGS$CPPFLAGS" ; then
9039 # a loop is needed to ensure we can add subdirs of existing dirs
9040 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9041 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9042 cf_have_incdir=yes; break
9047 if test "$cf_have_incdir" = no ; then
9048 if test "$cf_add_incdir" = /usr/local/include ; then
9049 if test "$GCC" = yes
9051 cf_save_CPPFLAGS=$CPPFLAGS
9052 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9053 cat >conftest.$ac_ext <<_ACEOF
9054 #line 9054 "configure"
9055 #include "confdefs.h"
9065 rm -f conftest.$ac_objext
9066 if { (eval echo "$as_me:9066: \"$ac_compile\"") >&5
9067 (eval $ac_compile) 2>&5
9069 echo "$as_me:9069: \$? = $ac_status" >&5
9070 (exit $ac_status); } &&
9071 { ac_try='test -s conftest.$ac_objext'
9072 { (eval echo "$as_me:9072: \"$ac_try\"") >&5
9075 echo "$as_me:9075: \$? = $ac_status" >&5
9076 (exit $ac_status); }; }; then
9079 echo "$as_me: failed program was:" >&5
9080 cat conftest.$ac_ext >&5
9083 rm -f conftest.$ac_objext conftest.$ac_ext
9084 CPPFLAGS=$cf_save_CPPFLAGS
9089 if test "$cf_have_incdir" = no ; then
9090 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9092 echo "${as_me:-configure}:9092: testing adding $cf_add_incdir to include-path ..." 1>&5
9094 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9096 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9097 test "$cf_top_incdir" = "$cf_add_incdir" && break
9098 cf_add_incdir="$cf_top_incdir"
9111 echo "$as_me:9111: checking for $cf_ncuhdr_root header in include-path" >&5
9112 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9113 if test "${cf_cv_ncurses_h+set}" = set; then
9114 echo $ECHO_N "(cached) $ECHO_C" >&6
9117 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9118 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9119 for cf_header in $cf_header_list
9122 cat >conftest.$ac_ext <<_ACEOF
9123 #line 9123 "configure"
9124 #include "confdefs.h"
9126 #include <$cf_header>
9131 #ifdef NCURSES_VERSION
9133 printf("%s\n", NCURSES_VERSION);
9146 rm -f conftest.$ac_objext
9147 if { (eval echo "$as_me:9147: \"$ac_compile\"") >&5
9148 (eval $ac_compile) 2>&5
9150 echo "$as_me:9150: \$? = $ac_status" >&5
9151 (exit $ac_status); } &&
9152 { ac_try='test -s conftest.$ac_objext'
9153 { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9156 echo "$as_me:9156: \$? = $ac_status" >&5
9157 (exit $ac_status); }; }; then
9158 cf_cv_ncurses_h=$cf_header
9161 echo "$as_me: failed program was:" >&5
9162 cat conftest.$ac_ext >&5
9165 rm -f conftest.$ac_objext conftest.$ac_ext
9167 test "$cf_cv_ncurses_h" != no && break
9171 echo "$as_me:9171: result: $cf_cv_ncurses_h" >&5
9172 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9174 if test "$cf_cv_ncurses_h" != no ; then
9175 cf_cv_ncurses_header=$cf_cv_ncurses_h
9178 echo "$as_me:9178: checking for $cf_ncuhdr_root include-path" >&5
9179 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9180 if test "${cf_cv_ncurses_h2+set}" = set; then
9181 echo $ECHO_N "(cached) $ECHO_C" >&6
9184 test -n "$verbose" && echo
9188 # collect the current set of include-directories from compiler flags
9189 cf_header_path_list=""
9190 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9191 for cf_header_path in $CPPFLAGS $CFLAGS
9193 case $cf_header_path in
9195 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9197 test "x$cf_header_path" != "xNONE" && \
9198 test -d "$cf_header_path" && \
9200 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9201 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9202 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9203 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9204 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9205 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"
9208 cf_header_path_list="$cf_header_path_list $cf_search"
9214 # add the variations for the package we are looking for
9218 test "x$prefix" != "xNONE" && \
9219 test -d "$prefix" && \
9221 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9222 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9223 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9224 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9225 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9226 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9229 for cf_subdir_prefix in \
9238 test "x$cf_subdir_prefix" != "x$prefix" && \
9239 test -d "$cf_subdir_prefix" && \
9240 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9241 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9242 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9243 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9244 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9245 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9246 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"
9251 test "$includedir" != NONE && \
9252 test "$includedir" != "/usr/include" && \
9253 test -d "$includedir" && {
9254 test -d $includedir && cf_search="$cf_search $includedir"
9255 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9258 test "$oldincludedir" != NONE && \
9259 test "$oldincludedir" != "/usr/include" && \
9260 test -d "$oldincludedir" && {
9261 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9262 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9265 cf_search="$cf_search $cf_header_path_list"
9267 test -n "$verbose" && echo search path $cf_search
9268 cf_save2_CPPFLAGS="$CPPFLAGS"
9269 for cf_incdir in $cf_search
9272 if test -n "$cf_incdir" ; then
9273 for cf_add_incdir in $cf_incdir
9275 while test $cf_add_incdir != /usr/include
9277 if test -d $cf_add_incdir
9280 if test -n "$CFLAGS$CPPFLAGS" ; then
9281 # a loop is needed to ensure we can add subdirs of existing dirs
9282 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9283 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9284 cf_have_incdir=yes; break
9289 if test "$cf_have_incdir" = no ; then
9290 if test "$cf_add_incdir" = /usr/local/include ; then
9291 if test "$GCC" = yes
9293 cf_save_CPPFLAGS=$CPPFLAGS
9294 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9295 cat >conftest.$ac_ext <<_ACEOF
9296 #line 9296 "configure"
9297 #include "confdefs.h"
9307 rm -f conftest.$ac_objext
9308 if { (eval echo "$as_me:9308: \"$ac_compile\"") >&5
9309 (eval $ac_compile) 2>&5
9311 echo "$as_me:9311: \$? = $ac_status" >&5
9312 (exit $ac_status); } &&
9313 { ac_try='test -s conftest.$ac_objext'
9314 { (eval echo "$as_me:9314: \"$ac_try\"") >&5
9317 echo "$as_me:9317: \$? = $ac_status" >&5
9318 (exit $ac_status); }; }; then
9321 echo "$as_me: failed program was:" >&5
9322 cat conftest.$ac_ext >&5
9325 rm -f conftest.$ac_objext conftest.$ac_ext
9326 CPPFLAGS=$cf_save_CPPFLAGS
9331 if test "$cf_have_incdir" = no ; then
9332 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9334 echo "${as_me:-configure}:9334: testing adding $cf_add_incdir to include-path ..." 1>&5
9336 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9338 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9339 test "$cf_top_incdir" = "$cf_add_incdir" && break
9340 cf_add_incdir="$cf_top_incdir"
9356 cat >conftest.$ac_ext <<_ACEOF
9357 #line 9357 "configure"
9358 #include "confdefs.h"
9360 #include <$cf_header>
9365 #ifdef NCURSES_VERSION
9367 printf("%s\n", NCURSES_VERSION);
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382 (eval $ac_compile) 2>&5
9384 echo "$as_me:9384: \$? = $ac_status" >&5
9385 (exit $ac_status); } &&
9386 { ac_try='test -s conftest.$ac_objext'
9387 { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9390 echo "$as_me:9390: \$? = $ac_status" >&5
9391 (exit $ac_status); }; }; then
9392 cf_cv_ncurses_h2=$cf_header
9395 echo "$as_me: failed program was:" >&5
9396 cat conftest.$ac_ext >&5
9399 rm -f conftest.$ac_objext conftest.$ac_ext
9401 if test "$cf_cv_ncurses_h2" != no ; then
9402 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9403 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9406 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9408 CPPFLAGS="$cf_save2_CPPFLAGS"
9409 test "$cf_cv_ncurses_h2" != no && break
9411 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9411: error: not found" >&5
9412 echo "$as_me: error: not found" >&2;}
9413 { (exit 1); exit 1; }; }
9416 echo "$as_me:9416: result: $cf_cv_ncurses_h2" >&5
9417 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9419 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9420 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9421 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9422 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9425 if test -n "$cf_1st_incdir" ; then
9426 for cf_add_incdir in $cf_1st_incdir
9428 while test $cf_add_incdir != /usr/include
9430 if test -d $cf_add_incdir
9433 if test -n "$CFLAGS$CPPFLAGS" ; then
9434 # a loop is needed to ensure we can add subdirs of existing dirs
9435 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9436 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9437 cf_have_incdir=yes; break
9442 if test "$cf_have_incdir" = no ; then
9443 if test "$cf_add_incdir" = /usr/local/include ; then
9444 if test "$GCC" = yes
9446 cf_save_CPPFLAGS=$CPPFLAGS
9447 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9448 cat >conftest.$ac_ext <<_ACEOF
9449 #line 9449 "configure"
9450 #include "confdefs.h"
9460 rm -f conftest.$ac_objext
9461 if { (eval echo "$as_me:9461: \"$ac_compile\"") >&5
9462 (eval $ac_compile) 2>&5
9464 echo "$as_me:9464: \$? = $ac_status" >&5
9465 (exit $ac_status); } &&
9466 { ac_try='test -s conftest.$ac_objext'
9467 { (eval echo "$as_me:9467: \"$ac_try\"") >&5
9470 echo "$as_me:9470: \$? = $ac_status" >&5
9471 (exit $ac_status); }; }; then
9474 echo "$as_me: failed program was:" >&5
9475 cat conftest.$ac_ext >&5
9478 rm -f conftest.$ac_objext conftest.$ac_ext
9479 CPPFLAGS=$cf_save_CPPFLAGS
9484 if test "$cf_have_incdir" = no ; then
9485 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9487 echo "${as_me:-configure}:9487: testing adding $cf_add_incdir to include-path ..." 1>&5
9489 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9491 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9492 test "$cf_top_incdir" = "$cf_add_incdir" && break
9493 cf_add_incdir="$cf_top_incdir"
9506 # Set definitions to allow ifdef'ing for ncurses.h
9508 case $cf_cv_ncurses_header in
9511 cat >>confdefs.h <<\EOF
9512 #define HAVE_NCURSES_H 1
9518 case $cf_cv_ncurses_header in
9519 (ncurses/curses.h|ncurses/ncurses.h)
9521 cat >>confdefs.h <<\EOF
9522 #define HAVE_NCURSES_NCURSES_H 1
9526 (ncursesw/curses.h|ncursesw/ncurses.h)
9528 cat >>confdefs.h <<\EOF
9529 #define HAVE_NCURSESW_NCURSES_H 1
9535 echo "$as_me:9535: checking for terminfo header" >&5
9536 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9537 if test "${cf_cv_term_header+set}" = set; then
9538 echo $ECHO_N "(cached) $ECHO_C" >&6
9541 case ${cf_cv_ncurses_header} in
9542 (*/ncurses.h|*/ncursesw.h)
9543 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9546 cf_term_header=term.h
9550 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9552 cat >conftest.$ac_ext <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9556 #include <${cf_cv_ncurses_header:-curses.h}>
9562 int x = auto_left_margin
9567 rm -f conftest.$ac_objext
9568 if { (eval echo "$as_me:9568: \"$ac_compile\"") >&5
9569 (eval $ac_compile) 2>&5
9571 echo "$as_me:9571: \$? = $ac_status" >&5
9572 (exit $ac_status); } &&
9573 { ac_try='test -s conftest.$ac_objext'
9574 { (eval echo "$as_me:9574: \"$ac_try\"") >&5
9577 echo "$as_me:9577: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
9580 cf_cv_term_header="$cf_test"
9582 echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9585 cf_cv_term_header=unknown
9588 rm -f conftest.$ac_objext conftest.$ac_ext
9589 test "$cf_cv_term_header" != unknown && break
9593 echo "$as_me:9593: result: $cf_cv_term_header" >&5
9594 echo "${ECHO_T}$cf_cv_term_header" >&6
9596 # Set definitions to allow ifdef'ing to accommodate subdirectories
9598 case $cf_cv_term_header in
9601 cat >>confdefs.h <<\EOF
9602 #define HAVE_TERM_H 1
9608 case $cf_cv_term_header in
9611 cat >>confdefs.h <<\EOF
9612 #define HAVE_NCURSES_TERM_H 1
9618 cat >>confdefs.h <<\EOF
9619 #define HAVE_NCURSESW_TERM_H 1
9625 # some applications need this, but should check for NCURSES_VERSION
9627 cat >>confdefs.h <<\EOF
9631 echo "$as_me:9631: checking for ncurses version" >&5
9632 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9633 if test "${cf_cv_ncurses_version+set}" = set; then
9634 echo $ECHO_N "(cached) $ECHO_C" >&6
9637 cf_cv_ncurses_version=no
9640 if test "$cross_compiling" = yes; then
9642 # This will not work if the preprocessor splits the line after the
9643 # Autoconf token. The 'unproto' program does that.
9644 cat > conftest.$ac_ext <<EOF
9645 #include <${cf_cv_ncurses_header:-curses.h}>
9647 #ifdef NCURSES_VERSION
9648 Autoconf NCURSES_VERSION
9656 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9657 { (eval echo "$as_me:9657: \"$cf_try\"") >&5
9660 echo "$as_me:9660: \$? = $ac_status" >&5
9661 (exit $ac_status); }
9662 if test -f conftest.out ; then
9663 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9664 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9669 cat >conftest.$ac_ext <<_ACEOF
9670 #line 9670 "configure"
9671 #include "confdefs.h"
9673 #include <${cf_cv_ncurses_header:-curses.h}>
9677 FILE *fp = fopen("$cf_tempfile", "w");
9678 #ifdef NCURSES_VERSION
9679 # ifdef NCURSES_VERSION_PATCH
9680 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9682 fprintf(fp, "%s\n", NCURSES_VERSION);
9686 fprintf(fp, "old\n");
9691 ${cf_cv_main_return:-return}(0);
9694 rm -f conftest$ac_exeext
9695 if { (eval echo "$as_me:9695: \"$ac_link\"") >&5
9696 (eval $ac_link) 2>&5
9698 echo "$as_me:9698: \$? = $ac_status" >&5
9699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9700 { (eval echo "$as_me:9700: \"$ac_try\"") >&5
9703 echo "$as_me:9703: \$? = $ac_status" >&5
9704 (exit $ac_status); }; }; then
9706 cf_cv_ncurses_version=`cat $cf_tempfile`
9708 echo "$as_me: program exited with status $ac_status" >&5
9709 echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9712 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9717 echo "$as_me:9717: result: $cf_cv_ncurses_version" >&5
9718 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9719 test "$cf_cv_ncurses_version" = no ||
9720 cat >>confdefs.h <<\EOF
9724 cf_nculib_root=$cf_cv_screen
9725 # This works, except for the special case where we find gpm, but
9726 # ncurses is in a nonstandard location via $LIBS, and we really want
9729 cf_ncurses_SAVE="$LIBS"
9730 echo "$as_me:9730: checking for Gpm_Open in -lgpm" >&5
9731 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9732 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9733 echo $ECHO_N "(cached) $ECHO_C" >&6
9735 ac_check_lib_save_LIBS=$LIBS
9737 cat >conftest.$ac_ext <<_ACEOF
9738 #line 9738 "configure"
9739 #include "confdefs.h"
9741 /* Override any gcc2 internal prototype to avoid an error. */
9745 /* We use char because int might match the return type of a gcc2
9746 builtin and then its argument prototype would still apply. */
9756 rm -f conftest.$ac_objext conftest$ac_exeext
9757 if { (eval echo "$as_me:9757: \"$ac_link\"") >&5
9758 (eval $ac_link) 2>&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); } &&
9762 { ac_try='test -s conftest$ac_exeext'
9763 { (eval echo "$as_me:9763: \"$ac_try\"") >&5
9766 echo "$as_me:9766: \$? = $ac_status" >&5
9767 (exit $ac_status); }; }; then
9768 ac_cv_lib_gpm_Gpm_Open=yes
9770 echo "$as_me: failed program was:" >&5
9771 cat conftest.$ac_ext >&5
9772 ac_cv_lib_gpm_Gpm_Open=no
9774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9775 LIBS=$ac_check_lib_save_LIBS
9777 echo "$as_me:9777: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9778 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9779 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9780 echo "$as_me:9780: checking for initscr in -lgpm" >&5
9781 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9782 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9783 echo $ECHO_N "(cached) $ECHO_C" >&6
9785 ac_check_lib_save_LIBS=$LIBS
9787 cat >conftest.$ac_ext <<_ACEOF
9788 #line 9788 "configure"
9789 #include "confdefs.h"
9791 /* Override any gcc2 internal prototype to avoid an error. */
9795 /* We use char because int might match the return type of a gcc2
9796 builtin and then its argument prototype would still apply. */
9806 rm -f conftest.$ac_objext conftest$ac_exeext
9807 if { (eval echo "$as_me:9807: \"$ac_link\"") >&5
9808 (eval $ac_link) 2>&5
9810 echo "$as_me:9810: \$? = $ac_status" >&5
9811 (exit $ac_status); } &&
9812 { ac_try='test -s conftest$ac_exeext'
9813 { (eval echo "$as_me:9813: \"$ac_try\"") >&5
9816 echo "$as_me:9816: \$? = $ac_status" >&5
9817 (exit $ac_status); }; }; then
9818 ac_cv_lib_gpm_initscr=yes
9820 echo "$as_me: failed program was:" >&5
9821 cat conftest.$ac_ext >&5
9822 ac_cv_lib_gpm_initscr=no
9824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9825 LIBS=$ac_check_lib_save_LIBS
9827 echo "$as_me:9827: result: $ac_cv_lib_gpm_initscr" >&5
9828 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9829 if test $ac_cv_lib_gpm_initscr = yes; then
9830 LIBS="$cf_ncurses_SAVE"
9832 cf_ncurses_LIBS="-lgpm"
9839 # This is only necessary if you are linking against an obsolete
9840 # version of ncurses (but it should do no harm, since it's static).
9841 if test "$cf_nculib_root" = ncurses ; then
9842 echo "$as_me:9842: checking for tgoto in -lmytinfo" >&5
9843 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9844 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9845 echo $ECHO_N "(cached) $ECHO_C" >&6
9847 ac_check_lib_save_LIBS=$LIBS
9848 LIBS="-lmytinfo $LIBS"
9849 cat >conftest.$ac_ext <<_ACEOF
9850 #line 9850 "configure"
9851 #include "confdefs.h"
9853 /* Override any gcc2 internal prototype to avoid an error. */
9857 /* We use char because int might match the return type of a gcc2
9858 builtin and then its argument prototype would still apply. */
9868 rm -f conftest.$ac_objext conftest$ac_exeext
9869 if { (eval echo "$as_me:9869: \"$ac_link\"") >&5
9870 (eval $ac_link) 2>&5
9872 echo "$as_me:9872: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
9874 { ac_try='test -s conftest$ac_exeext'
9875 { (eval echo "$as_me:9875: \"$ac_try\"") >&5
9878 echo "$as_me:9878: \$? = $ac_status" >&5
9879 (exit $ac_status); }; }; then
9880 ac_cv_lib_mytinfo_tgoto=yes
9882 echo "$as_me: failed program was:" >&5
9883 cat conftest.$ac_ext >&5
9884 ac_cv_lib_mytinfo_tgoto=no
9886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9887 LIBS=$ac_check_lib_save_LIBS
9889 echo "$as_me:9889: result: $ac_cv_lib_mytinfo_tgoto" >&5
9890 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9891 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9892 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9899 cf_add_libs="$cf_ncurses_LIBS"
9900 # Filter out duplicates - this happens with badly-designed ".pc" files...
9901 for cf_add_1lib in $LIBS
9903 for cf_add_2lib in $cf_add_libs
9905 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9911 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9915 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9918 cf_add_libs="-l$cf_nculib_root"
9919 # Filter out duplicates - this happens with badly-designed ".pc" files...
9920 for cf_add_1lib in $LIBS
9922 for cf_add_2lib in $cf_add_libs
9924 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9930 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9936 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9938 echo "$as_me:9938: checking for initscr" >&5
9939 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9940 if test "${ac_cv_func_initscr+set}" = set; then
9941 echo $ECHO_N "(cached) $ECHO_C" >&6
9943 cat >conftest.$ac_ext <<_ACEOF
9944 #line 9944 "configure"
9945 #include "confdefs.h"
9946 /* System header to define __stub macros and hopefully few prototypes,
9947 which can conflict with char initscr (); below. */
9949 /* Override any gcc2 internal prototype to avoid an error. */
9953 /* We use char because int might match the return type of a gcc2
9954 builtin and then its argument prototype would still apply. */
9961 /* The GNU C library defines this for functions which it implements
9962 to always fail with ENOSYS. Some functions are actually named
9963 something starting with __ and the normal name is an alias. */
9964 #if defined (__stub_initscr) || defined (__stub___initscr)
9967 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9974 rm -f conftest.$ac_objext conftest$ac_exeext
9975 if { (eval echo "$as_me:9975: \"$ac_link\"") >&5
9976 (eval $ac_link) 2>&5
9978 echo "$as_me:9978: \$? = $ac_status" >&5
9979 (exit $ac_status); } &&
9980 { ac_try='test -s conftest$ac_exeext'
9981 { (eval echo "$as_me:9981: \"$ac_try\"") >&5
9984 echo "$as_me:9984: \$? = $ac_status" >&5
9985 (exit $ac_status); }; }; then
9986 ac_cv_func_initscr=yes
9988 echo "$as_me: failed program was:" >&5
9989 cat conftest.$ac_ext >&5
9990 ac_cv_func_initscr=no
9992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9994 echo "$as_me:9994: result: $ac_cv_func_initscr" >&5
9995 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9996 if test $ac_cv_func_initscr = yes; then
9997 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10000 cf_save_LIBS="$LIBS"
10001 echo "$as_me:10001: checking for initscr in -l$cf_nculib_root" >&5
10002 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10003 LIBS="-l$cf_nculib_root $LIBS"
10004 cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007 #include <${cf_cv_ncurses_header:-curses.h}>
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018 (eval $ac_link) 2>&5
10020 echo "$as_me:10020: \$? = $ac_status" >&5
10021 (exit $ac_status); } &&
10022 { ac_try='test -s conftest$ac_exeext'
10023 { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024 (eval $ac_try) 2>&5
10026 echo "$as_me:10026: \$? = $ac_status" >&5
10027 (exit $ac_status); }; }; then
10028 echo "$as_me:10028: result: yes" >&5
10029 echo "${ECHO_T}yes" >&6
10030 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10033 echo "$as_me: failed program was:" >&5
10034 cat conftest.$ac_ext >&5
10035 echo "$as_me:10035: result: no" >&5
10036 echo "${ECHO_T}no" >&6
10039 cf_library_path_list=""
10040 if test -n "${LDFLAGS}${LIBS}" ; then
10041 for cf_library_path in $LDFLAGS $LIBS
10043 case $cf_library_path in
10045 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10047 test "x$cf_library_path" != "xNONE" && \
10048 test -d "$cf_library_path" && \
10050 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10051 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10052 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10053 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10054 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10055 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"
10058 cf_library_path_list="$cf_library_path_list $cf_search"
10066 test "x$prefix" != "xNONE" && \
10067 test -d "$prefix" && \
10069 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10070 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10071 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10072 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10073 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10074 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10077 for cf_subdir_prefix in \
10086 test "x$cf_subdir_prefix" != "x$prefix" && \
10087 test -d "$cf_subdir_prefix" && \
10088 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10089 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10090 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10091 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10092 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10093 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10094 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"
10099 cf_search="$cf_library_path_list $cf_search"
10101 for cf_libdir in $cf_search
10103 echo "$as_me:10103: checking for -l$cf_nculib_root in $cf_libdir" >&5
10104 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10105 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10106 cat >conftest.$ac_ext <<_ACEOF
10107 #line 10107 "configure"
10108 #include "confdefs.h"
10109 #include <${cf_cv_ncurses_header:-curses.h}>
10118 rm -f conftest.$ac_objext conftest$ac_exeext
10119 if { (eval echo "$as_me:10119: \"$ac_link\"") >&5
10120 (eval $ac_link) 2>&5
10122 echo "$as_me:10122: \$? = $ac_status" >&5
10123 (exit $ac_status); } &&
10124 { ac_try='test -s conftest$ac_exeext'
10125 { (eval echo "$as_me:10125: \"$ac_try\"") >&5
10126 (eval $ac_try) 2>&5
10128 echo "$as_me:10128: \$? = $ac_status" >&5
10129 (exit $ac_status); }; }; then
10130 echo "$as_me:10130: result: yes" >&5
10131 echo "${ECHO_T}yes" >&6
10132 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10135 echo "$as_me: failed program was:" >&5
10136 cat conftest.$ac_ext >&5
10137 echo "$as_me:10137: result: no" >&5
10138 echo "${ECHO_T}no" >&6
10139 LIBS="$cf_save_LIBS"
10141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10149 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10151 if test $cf_found_library = no ; then
10152 { { echo "$as_me:10152: error: Cannot link $cf_nculib_root library" >&5
10153 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10154 { (exit 1); exit 1; }; }
10159 if test -n "$cf_ncurses_LIBS" ; then
10160 echo "$as_me:10160: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10161 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10162 cf_ncurses_SAVE="$LIBS"
10163 for p in $cf_ncurses_LIBS ; do
10164 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10165 if test "$q" != "$LIBS" ; then
10169 cat >conftest.$ac_ext <<_ACEOF
10170 #line 10170 "configure"
10171 #include "confdefs.h"
10172 #include <${cf_cv_ncurses_header:-curses.h}>
10176 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10181 rm -f conftest.$ac_objext conftest$ac_exeext
10182 if { (eval echo "$as_me:10182: \"$ac_link\"") >&5
10183 (eval $ac_link) 2>&5
10185 echo "$as_me:10185: \$? = $ac_status" >&5
10186 (exit $ac_status); } &&
10187 { ac_try='test -s conftest$ac_exeext'
10188 { (eval echo "$as_me:10188: \"$ac_try\"") >&5
10189 (eval $ac_try) 2>&5
10191 echo "$as_me:10191: \$? = $ac_status" >&5
10192 (exit $ac_status); }; }; then
10193 echo "$as_me:10193: result: yes" >&5
10194 echo "${ECHO_T}yes" >&6
10196 echo "$as_me: failed program was:" >&5
10197 cat conftest.$ac_ext >&5
10198 echo "$as_me:10198: result: no" >&5
10199 echo "${ECHO_T}no" >&6
10200 LIBS="$cf_ncurses_SAVE"
10202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10205 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10207 cat >>confdefs.h <<EOF
10208 #define $cf_nculib_ROOT 1
10213 NCURSES_CONFIG=none
10218 echo "$as_me:10218: checking for X" >&5
10219 echo $ECHO_N "checking for X... $ECHO_C" >&6
10221 # Check whether --with-x or --without-x was given.
10222 if test "${with_x+set}" = set; then
10226 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10227 if test "x$with_x" = xno; then
10228 # The user explicitly disabled X.
10231 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10232 # Both variables are already set.
10235 if test "${ac_cv_have_x+set}" = set; then
10236 echo $ECHO_N "(cached) $ECHO_C" >&6
10238 # One or both of the vars are not set, and there is no cached value.
10239 ac_x_includes=no ac_x_libraries=no
10240 rm -fr conftest.dir
10241 if mkdir conftest.dir; then
10243 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10244 cat >Imakefile <<'EOF'
10246 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10248 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10249 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10250 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10251 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10252 for ac_extension in a so sl dylib dll; do
10253 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10254 test -f $ac_im_libdir/libX11.$ac_extension; then
10255 ac_im_usrlibdir=$ac_im_libdir; break
10258 # Screen out bogus values from the imake configuration. They are
10259 # bogus both because they are the default anyway, and because
10260 # using them would break gcc on systems where it needs fixed includes.
10261 case $ac_im_incroot in
10263 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10265 case $ac_im_usrlibdir in
10266 /usr/lib | /lib) ;;
10267 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10271 rm -fr conftest.dir
10274 # Standard set of common directories for X headers.
10275 # Check X11 before X11Rn because it is often a symlink to the current release.
10287 /usr/local/X11/include
10288 /usr/local/X11R6/include
10289 /usr/local/X11R5/include
10290 /usr/local/X11R4/include
10292 /usr/local/include/X11
10293 /usr/local/include/X11R6
10294 /usr/local/include/X11R5
10295 /usr/local/include/X11R4
10299 /usr/XFree86/include/X11
10303 /usr/unsupported/include
10304 /usr/athena/include
10305 /usr/local/x11r5/include
10306 /usr/lpp/Xamples/include
10308 /usr/openwin/include
10309 /usr/openwin/share/include'
10311 if test "$ac_x_includes" = no; then
10312 # Guess where to find include files, by looking for Intrinsic.h.
10313 # First, try using that file with no special directory specified.
10314 cat >conftest.$ac_ext <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317 #include <X11/Intrinsic.h>
10319 if { (eval echo "$as_me:10319: \"$ac_cpp conftest.$ac_ext\"") >&5
10320 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10322 egrep -v '^ *\+' conftest.er1 >conftest.err
10324 cat conftest.err >&5
10325 echo "$as_me:10325: \$? = $ac_status" >&5
10326 (exit $ac_status); } >/dev/null; then
10327 if test -s conftest.err; then
10328 ac_cpp_err=$ac_c_preproc_warn_flag
10335 if test -z "$ac_cpp_err"; then
10336 # We can compile using X headers with no special include directory.
10339 echo "$as_me: failed program was:" >&5
10340 cat conftest.$ac_ext >&5
10341 for ac_dir in $ac_x_header_dirs; do
10342 if test -r "$ac_dir/X11/Intrinsic.h"; then
10343 ac_x_includes=$ac_dir
10348 rm -f conftest.err conftest.$ac_ext
10349 fi # $ac_x_includes = no
10351 if test "$ac_x_libraries" = no; then
10352 # Check for the libraries.
10353 # See if we find them without any special options.
10354 # Don't add to $LIBS permanently.
10357 cat >conftest.$ac_ext <<_ACEOF
10358 #line 10358 "configure"
10359 #include "confdefs.h"
10360 #include <X11/Intrinsic.h>
10369 rm -f conftest.$ac_objext conftest$ac_exeext
10370 if { (eval echo "$as_me:10370: \"$ac_link\"") >&5
10371 (eval $ac_link) 2>&5
10373 echo "$as_me:10373: \$? = $ac_status" >&5
10374 (exit $ac_status); } &&
10375 { ac_try='test -s conftest$ac_exeext'
10376 { (eval echo "$as_me:10376: \"$ac_try\"") >&5
10377 (eval $ac_try) 2>&5
10379 echo "$as_me:10379: \$? = $ac_status" >&5
10380 (exit $ac_status); }; }; then
10382 # We can link X programs with no special library path.
10385 echo "$as_me: failed program was:" >&5
10386 cat conftest.$ac_ext >&5
10388 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10390 # Don't even attempt the hair of trying to link an X program!
10391 for ac_extension in a so sl dylib dll; do
10392 if test -r $ac_dir/libXt.$ac_extension; then
10393 ac_x_libraries=$ac_dir
10399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10400 fi # $ac_x_libraries = no
10402 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10403 # Didn't find X anywhere. Cache the known absence of X.
10404 ac_cv_have_x="have_x=no"
10406 # Record where we found X for the cache.
10407 ac_cv_have_x="have_x=yes \
10408 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10413 eval "$ac_cv_have_x"
10416 if test "$have_x" != yes; then
10417 echo "$as_me:10417: result: $have_x" >&5
10418 echo "${ECHO_T}$have_x" >&6
10421 # If each of the values was on the command line, it overrides each guess.
10422 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10423 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10424 # Update the cache value to reflect the command line values.
10425 ac_cv_have_x="have_x=yes \
10426 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10427 echo "$as_me:10427: result: libraries $x_libraries, headers $x_includes" >&5
10428 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10431 if test "$no_x" = yes; then
10432 # Not all programs may use this symbol, but it does not hurt to define it.
10434 cat >>confdefs.h <<\EOF
10435 #define X_DISPLAY_MISSING 1
10438 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10440 if test -n "$x_includes"; then
10441 X_CFLAGS="$X_CFLAGS -I$x_includes"
10444 # It would also be nice to do this for all -L options, not just this one.
10445 if test -n "$x_libraries"; then
10446 X_LIBS="$X_LIBS -L$x_libraries"
10447 # For Solaris; some versions of Sun CC require a space after -R and
10448 # others require no space. Words are not sufficient . . . .
10449 case `(uname -sr) 2>/dev/null` in
10451 echo "$as_me:10451: checking whether -R must be followed by a space" >&5
10452 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10453 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10454 cat >conftest.$ac_ext <<_ACEOF
10455 #line 10455 "configure"
10456 #include "confdefs.h"
10466 rm -f conftest.$ac_objext conftest$ac_exeext
10467 if { (eval echo "$as_me:10467: \"$ac_link\"") >&5
10468 (eval $ac_link) 2>&5
10470 echo "$as_me:10470: \$? = $ac_status" >&5
10471 (exit $ac_status); } &&
10472 { ac_try='test -s conftest$ac_exeext'
10473 { (eval echo "$as_me:10473: \"$ac_try\"") >&5
10474 (eval $ac_try) 2>&5
10476 echo "$as_me:10476: \$? = $ac_status" >&5
10477 (exit $ac_status); }; }; then
10480 echo "$as_me: failed program was:" >&5
10481 cat conftest.$ac_ext >&5
10484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10485 if test $ac_R_nospace = yes; then
10486 echo "$as_me:10486: result: no" >&5
10487 echo "${ECHO_T}no" >&6
10488 X_LIBS="$X_LIBS -R$x_libraries"
10490 LIBS="$ac_xsave_LIBS -R $x_libraries"
10491 cat >conftest.$ac_ext <<_ACEOF
10492 #line 10492 "configure"
10493 #include "confdefs.h"
10503 rm -f conftest.$ac_objext conftest$ac_exeext
10504 if { (eval echo "$as_me:10504: \"$ac_link\"") >&5
10505 (eval $ac_link) 2>&5
10507 echo "$as_me:10507: \$? = $ac_status" >&5
10508 (exit $ac_status); } &&
10509 { ac_try='test -s conftest$ac_exeext'
10510 { (eval echo "$as_me:10510: \"$ac_try\"") >&5
10511 (eval $ac_try) 2>&5
10513 echo "$as_me:10513: \$? = $ac_status" >&5
10514 (exit $ac_status); }; }; then
10517 echo "$as_me: failed program was:" >&5
10518 cat conftest.$ac_ext >&5
10521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10522 if test $ac_R_space = yes; then
10523 echo "$as_me:10523: result: yes" >&5
10524 echo "${ECHO_T}yes" >&6
10525 X_LIBS="$X_LIBS -R $x_libraries"
10527 echo "$as_me:10527: result: neither works" >&5
10528 echo "${ECHO_T}neither works" >&6
10531 LIBS=$ac_xsave_LIBS
10535 # Check for system-dependent libraries X programs must link with.
10536 # Do this before checking for the system-independent R6 libraries
10537 # (-lICE), since we may need -lsocket or whatever for X linking.
10539 if test "$ISC" = yes; then
10540 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10542 # Martyn Johnson says this is needed for Ultrix, if the X
10543 # libraries were built with DECnet support. And Karl Berry says
10544 # the Alpha needs dnet_stub (dnet does not exist).
10545 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10546 cat >conftest.$ac_ext <<_ACEOF
10547 #line 10547 "configure"
10548 #include "confdefs.h"
10550 /* Override any gcc2 internal prototype to avoid an error. */
10554 /* We use char because int might match the return type of a gcc2
10555 builtin and then its argument prototype would still apply. */
10556 char XOpenDisplay ();
10565 rm -f conftest.$ac_objext conftest$ac_exeext
10566 if { (eval echo "$as_me:10566: \"$ac_link\"") >&5
10567 (eval $ac_link) 2>&5
10569 echo "$as_me:10569: \$? = $ac_status" >&5
10570 (exit $ac_status); } &&
10571 { ac_try='test -s conftest$ac_exeext'
10572 { (eval echo "$as_me:10572: \"$ac_try\"") >&5
10573 (eval $ac_try) 2>&5
10575 echo "$as_me:10575: \$? = $ac_status" >&5
10576 (exit $ac_status); }; }; then
10579 echo "$as_me: failed program was:" >&5
10580 cat conftest.$ac_ext >&5
10581 echo "$as_me:10581: checking for dnet_ntoa in -ldnet" >&5
10582 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10583 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10584 echo $ECHO_N "(cached) $ECHO_C" >&6
10586 ac_check_lib_save_LIBS=$LIBS
10587 LIBS="-ldnet $LIBS"
10588 cat >conftest.$ac_ext <<_ACEOF
10589 #line 10589 "configure"
10590 #include "confdefs.h"
10592 /* Override any gcc2 internal prototype to avoid an error. */
10596 /* We use char because int might match the return type of a gcc2
10597 builtin and then its argument prototype would still apply. */
10607 rm -f conftest.$ac_objext conftest$ac_exeext
10608 if { (eval echo "$as_me:10608: \"$ac_link\"") >&5
10609 (eval $ac_link) 2>&5
10611 echo "$as_me:10611: \$? = $ac_status" >&5
10612 (exit $ac_status); } &&
10613 { ac_try='test -s conftest$ac_exeext'
10614 { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615 (eval $ac_try) 2>&5
10617 echo "$as_me:10617: \$? = $ac_status" >&5
10618 (exit $ac_status); }; }; then
10619 ac_cv_lib_dnet_dnet_ntoa=yes
10621 echo "$as_me: failed program was:" >&5
10622 cat conftest.$ac_ext >&5
10623 ac_cv_lib_dnet_dnet_ntoa=no
10625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10626 LIBS=$ac_check_lib_save_LIBS
10628 echo "$as_me:10628: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10629 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10630 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10631 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10634 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10635 echo "$as_me:10635: checking for dnet_ntoa in -ldnet_stub" >&5
10636 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10637 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10638 echo $ECHO_N "(cached) $ECHO_C" >&6
10640 ac_check_lib_save_LIBS=$LIBS
10641 LIBS="-ldnet_stub $LIBS"
10642 cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10646 /* Override any gcc2 internal prototype to avoid an error. */
10650 /* We use char because int might match the return type of a gcc2
10651 builtin and then its argument prototype would still apply. */
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 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10675 echo "$as_me: failed program was:" >&5
10676 cat conftest.$ac_ext >&5
10677 ac_cv_lib_dnet_stub_dnet_ntoa=no
10679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10680 LIBS=$ac_check_lib_save_LIBS
10682 echo "$as_me:10682: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10683 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10684 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10685 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10691 LIBS="$ac_xsave_LIBS"
10693 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10694 # to get the SysV transport functions.
10695 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10697 # The nsl library prevents programs from opening the X display
10698 # on Irix 5.2, according to T.E. Dickey.
10699 # The functions gethostbyname, getservbyname, and inet_addr are
10700 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10701 echo "$as_me:10701: checking for gethostbyname" >&5
10702 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10703 if test "${ac_cv_func_gethostbyname+set}" = set; then
10704 echo $ECHO_N "(cached) $ECHO_C" >&6
10706 cat >conftest.$ac_ext <<_ACEOF
10707 #line 10707 "configure"
10708 #include "confdefs.h"
10709 /* System header to define __stub macros and hopefully few prototypes,
10710 which can conflict with char gethostbyname (); below. */
10711 #include <assert.h>
10712 /* Override any gcc2 internal prototype to avoid an error. */
10716 /* We use char because int might match the return type of a gcc2
10717 builtin and then its argument prototype would still apply. */
10718 char gethostbyname ();
10724 /* The GNU C library defines this for functions which it implements
10725 to always fail with ENOSYS. Some functions are actually named
10726 something starting with __ and the normal name is an alias. */
10727 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10730 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10737 rm -f conftest.$ac_objext conftest$ac_exeext
10738 if { (eval echo "$as_me:10738: \"$ac_link\"") >&5
10739 (eval $ac_link) 2>&5
10741 echo "$as_me:10741: \$? = $ac_status" >&5
10742 (exit $ac_status); } &&
10743 { ac_try='test -s conftest$ac_exeext'
10744 { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745 (eval $ac_try) 2>&5
10747 echo "$as_me:10747: \$? = $ac_status" >&5
10748 (exit $ac_status); }; }; then
10749 ac_cv_func_gethostbyname=yes
10751 echo "$as_me: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 ac_cv_func_gethostbyname=no
10755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10757 echo "$as_me:10757: result: $ac_cv_func_gethostbyname" >&5
10758 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10760 if test $ac_cv_func_gethostbyname = no; then
10761 echo "$as_me:10761: checking for gethostbyname in -lnsl" >&5
10762 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10763 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10764 echo $ECHO_N "(cached) $ECHO_C" >&6
10766 ac_check_lib_save_LIBS=$LIBS
10768 cat >conftest.$ac_ext <<_ACEOF
10769 #line 10769 "configure"
10770 #include "confdefs.h"
10772 /* Override any gcc2 internal prototype to avoid an error. */
10776 /* We use char because int might match the return type of a gcc2
10777 builtin and then its argument prototype would still apply. */
10778 char gethostbyname ();
10787 rm -f conftest.$ac_objext conftest$ac_exeext
10788 if { (eval echo "$as_me:10788: \"$ac_link\"") >&5
10789 (eval $ac_link) 2>&5
10791 echo "$as_me:10791: \$? = $ac_status" >&5
10792 (exit $ac_status); } &&
10793 { ac_try='test -s conftest$ac_exeext'
10794 { (eval echo "$as_me:10794: \"$ac_try\"") >&5
10795 (eval $ac_try) 2>&5
10797 echo "$as_me:10797: \$? = $ac_status" >&5
10798 (exit $ac_status); }; }; then
10799 ac_cv_lib_nsl_gethostbyname=yes
10801 echo "$as_me: failed program was:" >&5
10802 cat conftest.$ac_ext >&5
10803 ac_cv_lib_nsl_gethostbyname=no
10805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10806 LIBS=$ac_check_lib_save_LIBS
10808 echo "$as_me:10808: result: $ac_cv_lib_nsl_gethostbyname" >&5
10809 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10810 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10811 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10814 if test $ac_cv_lib_nsl_gethostbyname = no; then
10815 echo "$as_me:10815: checking for gethostbyname in -lbsd" >&5
10816 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10817 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10818 echo $ECHO_N "(cached) $ECHO_C" >&6
10820 ac_check_lib_save_LIBS=$LIBS
10822 cat >conftest.$ac_ext <<_ACEOF
10823 #line 10823 "configure"
10824 #include "confdefs.h"
10826 /* Override any gcc2 internal prototype to avoid an error. */
10830 /* We use char because int might match the return type of a gcc2
10831 builtin and then its argument prototype would still apply. */
10832 char gethostbyname ();
10841 rm -f conftest.$ac_objext conftest$ac_exeext
10842 if { (eval echo "$as_me:10842: \"$ac_link\"") >&5
10843 (eval $ac_link) 2>&5
10845 echo "$as_me:10845: \$? = $ac_status" >&5
10846 (exit $ac_status); } &&
10847 { ac_try='test -s conftest$ac_exeext'
10848 { (eval echo "$as_me:10848: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10851 echo "$as_me:10851: \$? = $ac_status" >&5
10852 (exit $ac_status); }; }; then
10853 ac_cv_lib_bsd_gethostbyname=yes
10855 echo "$as_me: failed program was:" >&5
10856 cat conftest.$ac_ext >&5
10857 ac_cv_lib_bsd_gethostbyname=no
10859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10860 LIBS=$ac_check_lib_save_LIBS
10862 echo "$as_me:10862: result: $ac_cv_lib_bsd_gethostbyname" >&5
10863 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10864 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10865 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10871 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10872 # socket/setsockopt and other routines are undefined under SCO ODT
10873 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10874 # on later versions), says Simon Leinen: it contains gethostby*
10875 # variants that don't use the nameserver (or something). -lsocket
10876 # must be given before -lnsl if both are needed. We assume that
10877 # if connect needs -lnsl, so does gethostbyname.
10878 echo "$as_me:10878: checking for connect" >&5
10879 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10880 if test "${ac_cv_func_connect+set}" = set; then
10881 echo $ECHO_N "(cached) $ECHO_C" >&6
10883 cat >conftest.$ac_ext <<_ACEOF
10884 #line 10884 "configure"
10885 #include "confdefs.h"
10886 /* System header to define __stub macros and hopefully few prototypes,
10887 which can conflict with char connect (); below. */
10888 #include <assert.h>
10889 /* Override any gcc2 internal prototype to avoid an error. */
10893 /* We use char because int might match the return type of a gcc2
10894 builtin and then its argument prototype would still apply. */
10901 /* The GNU C library defines this for functions which it implements
10902 to always fail with ENOSYS. Some functions are actually named
10903 something starting with __ and the normal name is an alias. */
10904 #if defined (__stub_connect) || defined (__stub___connect)
10907 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10914 rm -f conftest.$ac_objext conftest$ac_exeext
10915 if { (eval echo "$as_me:10915: \"$ac_link\"") >&5
10916 (eval $ac_link) 2>&5
10918 echo "$as_me:10918: \$? = $ac_status" >&5
10919 (exit $ac_status); } &&
10920 { ac_try='test -s conftest$ac_exeext'
10921 { (eval echo "$as_me:10921: \"$ac_try\"") >&5
10922 (eval $ac_try) 2>&5
10924 echo "$as_me:10924: \$? = $ac_status" >&5
10925 (exit $ac_status); }; }; then
10926 ac_cv_func_connect=yes
10928 echo "$as_me: failed program was:" >&5
10929 cat conftest.$ac_ext >&5
10930 ac_cv_func_connect=no
10932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10934 echo "$as_me:10934: result: $ac_cv_func_connect" >&5
10935 echo "${ECHO_T}$ac_cv_func_connect" >&6
10937 if test $ac_cv_func_connect = no; then
10938 echo "$as_me:10938: checking for connect in -lsocket" >&5
10939 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10940 if test "${ac_cv_lib_socket_connect+set}" = set; then
10941 echo $ECHO_N "(cached) $ECHO_C" >&6
10943 ac_check_lib_save_LIBS=$LIBS
10944 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10945 cat >conftest.$ac_ext <<_ACEOF
10946 #line 10946 "configure"
10947 #include "confdefs.h"
10949 /* Override any gcc2 internal prototype to avoid an error. */
10953 /* We use char because int might match the return type of a gcc2
10954 builtin and then its argument prototype would still apply. */
10964 rm -f conftest.$ac_objext conftest$ac_exeext
10965 if { (eval echo "$as_me:10965: \"$ac_link\"") >&5
10966 (eval $ac_link) 2>&5
10968 echo "$as_me:10968: \$? = $ac_status" >&5
10969 (exit $ac_status); } &&
10970 { ac_try='test -s conftest$ac_exeext'
10971 { (eval echo "$as_me:10971: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10974 echo "$as_me:10974: \$? = $ac_status" >&5
10975 (exit $ac_status); }; }; then
10976 ac_cv_lib_socket_connect=yes
10978 echo "$as_me: failed program was:" >&5
10979 cat conftest.$ac_ext >&5
10980 ac_cv_lib_socket_connect=no
10982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10983 LIBS=$ac_check_lib_save_LIBS
10985 echo "$as_me:10985: result: $ac_cv_lib_socket_connect" >&5
10986 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10987 if test $ac_cv_lib_socket_connect = yes; then
10988 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10993 # Guillermo Gomez says -lposix is necessary on A/UX.
10994 echo "$as_me:10994: checking for remove" >&5
10995 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10996 if test "${ac_cv_func_remove+set}" = set; then
10997 echo $ECHO_N "(cached) $ECHO_C" >&6
10999 cat >conftest.$ac_ext <<_ACEOF
11000 #line 11000 "configure"
11001 #include "confdefs.h"
11002 /* System header to define __stub macros and hopefully few prototypes,
11003 which can conflict with char remove (); below. */
11004 #include <assert.h>
11005 /* Override any gcc2 internal prototype to avoid an error. */
11009 /* We use char because int might match the return type of a gcc2
11010 builtin and then its argument prototype would still apply. */
11017 /* The GNU C library defines this for functions which it implements
11018 to always fail with ENOSYS. Some functions are actually named
11019 something starting with __ and the normal name is an alias. */
11020 #if defined (__stub_remove) || defined (__stub___remove)
11023 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11030 rm -f conftest.$ac_objext conftest$ac_exeext
11031 if { (eval echo "$as_me:11031: \"$ac_link\"") >&5
11032 (eval $ac_link) 2>&5
11034 echo "$as_me:11034: \$? = $ac_status" >&5
11035 (exit $ac_status); } &&
11036 { ac_try='test -s conftest$ac_exeext'
11037 { (eval echo "$as_me:11037: \"$ac_try\"") >&5
11038 (eval $ac_try) 2>&5
11040 echo "$as_me:11040: \$? = $ac_status" >&5
11041 (exit $ac_status); }; }; then
11042 ac_cv_func_remove=yes
11044 echo "$as_me: failed program was:" >&5
11045 cat conftest.$ac_ext >&5
11046 ac_cv_func_remove=no
11048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11050 echo "$as_me:11050: result: $ac_cv_func_remove" >&5
11051 echo "${ECHO_T}$ac_cv_func_remove" >&6
11053 if test $ac_cv_func_remove = no; then
11054 echo "$as_me:11054: checking for remove in -lposix" >&5
11055 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11056 if test "${ac_cv_lib_posix_remove+set}" = set; then
11057 echo $ECHO_N "(cached) $ECHO_C" >&6
11059 ac_check_lib_save_LIBS=$LIBS
11060 LIBS="-lposix $LIBS"
11061 cat >conftest.$ac_ext <<_ACEOF
11062 #line 11062 "configure"
11063 #include "confdefs.h"
11065 /* Override any gcc2 internal prototype to avoid an error. */
11069 /* We use char because int might match the return type of a gcc2
11070 builtin and then its argument prototype would still apply. */
11080 rm -f conftest.$ac_objext conftest$ac_exeext
11081 if { (eval echo "$as_me:11081: \"$ac_link\"") >&5
11082 (eval $ac_link) 2>&5
11084 echo "$as_me:11084: \$? = $ac_status" >&5
11085 (exit $ac_status); } &&
11086 { ac_try='test -s conftest$ac_exeext'
11087 { (eval echo "$as_me:11087: \"$ac_try\"") >&5
11088 (eval $ac_try) 2>&5
11090 echo "$as_me:11090: \$? = $ac_status" >&5
11091 (exit $ac_status); }; }; then
11092 ac_cv_lib_posix_remove=yes
11094 echo "$as_me: failed program was:" >&5
11095 cat conftest.$ac_ext >&5
11096 ac_cv_lib_posix_remove=no
11098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11099 LIBS=$ac_check_lib_save_LIBS
11101 echo "$as_me:11101: result: $ac_cv_lib_posix_remove" >&5
11102 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11103 if test $ac_cv_lib_posix_remove = yes; then
11104 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11109 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11110 echo "$as_me:11110: checking for shmat" >&5
11111 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11112 if test "${ac_cv_func_shmat+set}" = set; then
11113 echo $ECHO_N "(cached) $ECHO_C" >&6
11115 cat >conftest.$ac_ext <<_ACEOF
11116 #line 11116 "configure"
11117 #include "confdefs.h"
11118 /* System header to define __stub macros and hopefully few prototypes,
11119 which can conflict with char shmat (); below. */
11120 #include <assert.h>
11121 /* Override any gcc2 internal prototype to avoid an error. */
11125 /* We use char because int might match the return type of a gcc2
11126 builtin and then its argument prototype would still apply. */
11133 /* The GNU C library defines this for functions which it implements
11134 to always fail with ENOSYS. Some functions are actually named
11135 something starting with __ and the normal name is an alias. */
11136 #if defined (__stub_shmat) || defined (__stub___shmat)
11139 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11146 rm -f conftest.$ac_objext conftest$ac_exeext
11147 if { (eval echo "$as_me:11147: \"$ac_link\"") >&5
11148 (eval $ac_link) 2>&5
11150 echo "$as_me:11150: \$? = $ac_status" >&5
11151 (exit $ac_status); } &&
11152 { ac_try='test -s conftest$ac_exeext'
11153 { (eval echo "$as_me:11153: \"$ac_try\"") >&5
11154 (eval $ac_try) 2>&5
11156 echo "$as_me:11156: \$? = $ac_status" >&5
11157 (exit $ac_status); }; }; then
11158 ac_cv_func_shmat=yes
11160 echo "$as_me: failed program was:" >&5
11161 cat conftest.$ac_ext >&5
11162 ac_cv_func_shmat=no
11164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11166 echo "$as_me:11166: result: $ac_cv_func_shmat" >&5
11167 echo "${ECHO_T}$ac_cv_func_shmat" >&6
11169 if test $ac_cv_func_shmat = no; then
11170 echo "$as_me:11170: checking for shmat in -lipc" >&5
11171 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
11172 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
11173 echo $ECHO_N "(cached) $ECHO_C" >&6
11175 ac_check_lib_save_LIBS=$LIBS
11177 cat >conftest.$ac_ext <<_ACEOF
11178 #line 11178 "configure"
11179 #include "confdefs.h"
11181 /* Override any gcc2 internal prototype to avoid an error. */
11185 /* We use char because int might match the return type of a gcc2
11186 builtin and then its argument prototype would still apply. */
11196 rm -f conftest.$ac_objext conftest$ac_exeext
11197 if { (eval echo "$as_me:11197: \"$ac_link\"") >&5
11198 (eval $ac_link) 2>&5
11200 echo "$as_me:11200: \$? = $ac_status" >&5
11201 (exit $ac_status); } &&
11202 { ac_try='test -s conftest$ac_exeext'
11203 { (eval echo "$as_me:11203: \"$ac_try\"") >&5
11204 (eval $ac_try) 2>&5
11206 echo "$as_me:11206: \$? = $ac_status" >&5
11207 (exit $ac_status); }; }; then
11208 ac_cv_lib_ipc_shmat=yes
11210 echo "$as_me: failed program was:" >&5
11211 cat conftest.$ac_ext >&5
11212 ac_cv_lib_ipc_shmat=no
11214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11215 LIBS=$ac_check_lib_save_LIBS
11217 echo "$as_me:11217: result: $ac_cv_lib_ipc_shmat" >&5
11218 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
11219 if test $ac_cv_lib_ipc_shmat = yes; then
11220 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11226 # Check for libraries that X11R6 Xt/Xaw programs need.
11227 ac_save_LDFLAGS=$LDFLAGS
11228 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11229 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11230 # check for ICE first), but we must link in the order -lSM -lICE or
11231 # we get undefined symbols. So assume we have SM if we have ICE.
11232 # These have to be linked with before -lX11, unlike the other
11233 # libraries we check for below, so use a different variable.
11234 # John Interrante, Karl Berry
11235 echo "$as_me:11235: checking for IceConnectionNumber in -lICE" >&5
11236 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
11237 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
11238 echo $ECHO_N "(cached) $ECHO_C" >&6
11240 ac_check_lib_save_LIBS=$LIBS
11241 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11242 cat >conftest.$ac_ext <<_ACEOF
11243 #line 11243 "configure"
11244 #include "confdefs.h"
11246 /* Override any gcc2 internal prototype to avoid an error. */
11250 /* We use char because int might match the return type of a gcc2
11251 builtin and then its argument prototype would still apply. */
11252 char IceConnectionNumber ();
11256 IceConnectionNumber ();
11261 rm -f conftest.$ac_objext conftest$ac_exeext
11262 if { (eval echo "$as_me:11262: \"$ac_link\"") >&5
11263 (eval $ac_link) 2>&5
11265 echo "$as_me:11265: \$? = $ac_status" >&5
11266 (exit $ac_status); } &&
11267 { ac_try='test -s conftest$ac_exeext'
11268 { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269 (eval $ac_try) 2>&5
11271 echo "$as_me:11271: \$? = $ac_status" >&5
11272 (exit $ac_status); }; }; then
11273 ac_cv_lib_ICE_IceConnectionNumber=yes
11275 echo "$as_me: failed program was:" >&5
11276 cat conftest.$ac_ext >&5
11277 ac_cv_lib_ICE_IceConnectionNumber=no
11279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11280 LIBS=$ac_check_lib_save_LIBS
11282 echo "$as_me:11282: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11283 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11284 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11285 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11288 LDFLAGS=$ac_save_LDFLAGS
11292 cf_x_athena=${cf_x_athena:-Xaw}
11294 echo "$as_me:11294: checking if you want to link with Xaw 3d library" >&5
11295 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11298 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11299 if test "${with_Xaw3d+set}" = set; then
11300 withval="$with_Xaw3d"
11303 if test "$withval" = yes ; then
11305 echo "$as_me:11305: result: yes" >&5
11306 echo "${ECHO_T}yes" >&6
11308 echo "$as_me:11308: result: no" >&5
11309 echo "${ECHO_T}no" >&6
11312 echo "$as_me:11312: checking if you want to link with Xaw 3d xft library" >&5
11313 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11316 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11317 if test "${with_Xaw3dxft+set}" = set; then
11318 withval="$with_Xaw3dxft"
11321 if test "$withval" = yes ; then
11322 cf_x_athena=Xaw3dxft
11323 echo "$as_me:11323: result: yes" >&5
11324 echo "${ECHO_T}yes" >&6
11326 echo "$as_me:11326: result: no" >&5
11327 echo "${ECHO_T}no" >&6
11330 echo "$as_me:11330: checking if you want to link with neXT Athena library" >&5
11331 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11334 # Check whether --with-neXtaw or --without-neXtaw was given.
11335 if test "${with_neXtaw+set}" = set; then
11336 withval="$with_neXtaw"
11339 if test "$withval" = yes ; then
11341 echo "$as_me:11341: result: yes" >&5
11342 echo "${ECHO_T}yes" >&6
11344 echo "$as_me:11344: result: no" >&5
11345 echo "${ECHO_T}no" >&6
11348 echo "$as_me:11348: checking if you want to link with Athena-Plus library" >&5
11349 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11352 # Check whether --with-XawPlus or --without-XawPlus was given.
11353 if test "${with_XawPlus+set}" = set; then
11354 withval="$with_XawPlus"
11357 if test "$withval" = yes ; then
11358 cf_x_athena=XawPlus
11359 echo "$as_me:11359: result: yes" >&5
11360 echo "${ECHO_T}yes" >&6
11362 echo "$as_me:11362: result: no" >&5
11363 echo "${ECHO_T}no" >&6
11368 if test "$PKG_CONFIG" != none ; then
11370 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11371 for cf_athena_pkg in \
11374 ${cf_x_athena}-devel \
11375 lib${cf_x_athena} \
11376 lib${cf_x_athena}-devel
11379 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11380 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11382 echo "${as_me:-configure}:11382: testing found package $cf_athena_pkg ..." 1>&5
11384 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11385 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11386 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11388 echo "${as_me:-configure}:11388: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11390 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11392 echo "${as_me:-configure}:11392: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11397 cf_new_extra_cppflags=
11399 for cf_add_cflags in $cf_pkgconfig_incs
11401 case $cf_fix_cppflags in
11403 case $cf_add_cflags in
11404 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11405 case $cf_add_cflags in
11407 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11409 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11410 && test -z "${cf_tst_cflags}" \
11411 && cf_fix_cppflags=yes
11413 if test $cf_fix_cppflags = yes ; then
11415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11419 elif test "${cf_tst_cflags}" = "\"'" ; then
11421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11428 case "$CPPFLAGS" in
11432 case $cf_add_cflags in
11434 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11436 CPPFLAGS=`echo "$CPPFLAGS" | \
11437 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11438 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11443 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11444 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11451 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11452 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11462 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11464 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11465 && test -z "${cf_tst_cflags}" \
11466 && cf_fix_cppflags=no
11471 if test -n "$cf_new_cflags" ; then
11473 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11474 CFLAGS="${CFLAGS}$cf_new_cflags"
11478 if test -n "$cf_new_cppflags" ; then
11480 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11481 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11485 if test -n "$cf_new_extra_cppflags" ; then
11487 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11488 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11492 cf_add_libs="$cf_pkgconfig_libs"
11493 # Filter out duplicates - this happens with badly-designed ".pc" files...
11494 for cf_add_1lib in $LIBS
11496 for cf_add_2lib in $cf_add_libs
11498 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11504 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11506 LIBS="$cf_add_libs"
11508 cf_x_athena_lib="$cf_pkgconfig_libs"
11510 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11512 cat >>confdefs.h <<EOF
11513 #define $cf_x_athena_LIBS 1
11516 for cf_trim_lib in Xmu Xt X11
11519 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11520 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11521 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11523 echo "${as_me:-configure}:11523: testing ..trimmed $LIBS ..." 1>&5
11529 echo "$as_me:11529: checking for usable $cf_x_athena/Xmu package" >&5
11530 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11531 if test "${cf_cv_xaw_compat+set}" = set; then
11532 echo $ECHO_N "(cached) $ECHO_C" >&6
11535 cat >conftest.$ac_ext <<_ACEOF
11536 #line 11536 "configure"
11537 #include "confdefs.h"
11539 #include <X11/Xmu/CharSet.h>
11545 int check = XmuCompareISOLatin1("big", "small")
11551 rm -f conftest.$ac_objext conftest$ac_exeext
11552 if { (eval echo "$as_me:11552: \"$ac_link\"") >&5
11553 (eval $ac_link) 2>&5
11555 echo "$as_me:11555: \$? = $ac_status" >&5
11556 (exit $ac_status); } &&
11557 { ac_try='test -s conftest$ac_exeext'
11558 { (eval echo "$as_me:11558: \"$ac_try\"") >&5
11559 (eval $ac_try) 2>&5
11561 echo "$as_me:11561: \$? = $ac_status" >&5
11562 (exit $ac_status); }; }; then
11563 cf_cv_xaw_compat=yes
11565 echo "$as_me: failed program was:" >&5
11566 cat conftest.$ac_ext >&5
11567 cf_cv_xaw_compat=no
11569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11571 echo "$as_me:11571: result: $cf_cv_xaw_compat" >&5
11572 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11574 if test "$cf_cv_xaw_compat" = no
11576 # workaround for broken ".pc" files...
11577 case "$cf_x_athena_lib" in
11581 test -n "$verbose" && echo " work around broken package" 1>&6
11583 echo "${as_me:-configure}:11583: testing work around broken package ..." 1>&5
11585 cf_save_xmu="$LIBS"
11586 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
11588 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11589 test -n "$verbose" && echo " found package xmu" 1>&6
11591 echo "${as_me:-configure}:11591: testing found package xmu ..." 1>&5
11593 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11594 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11595 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11597 echo "${as_me:-configure}:11597: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11599 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11601 echo "${as_me:-configure}:11601: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11606 cf_new_extra_cppflags=
11608 for cf_add_cflags in $cf_pkgconfig_incs
11610 case $cf_fix_cppflags in
11612 case $cf_add_cflags in
11613 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11614 case $cf_add_cflags in
11616 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11618 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11619 && test -z "${cf_tst_cflags}" \
11620 && cf_fix_cppflags=yes
11622 if test $cf_fix_cppflags = yes ; then
11624 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11625 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11628 elif test "${cf_tst_cflags}" = "\"'" ; then
11630 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11631 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11637 case "$CPPFLAGS" in
11641 case $cf_add_cflags in
11643 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11645 CPPFLAGS=`echo "$CPPFLAGS" | \
11646 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11647 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11652 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11653 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11660 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11661 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11668 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11669 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11671 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11673 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11674 && test -z "${cf_tst_cflags}" \
11675 && cf_fix_cppflags=no
11680 if test -n "$cf_new_cflags" ; then
11682 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11683 CFLAGS="${CFLAGS}$cf_new_cflags"
11687 if test -n "$cf_new_cppflags" ; then
11689 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11690 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11694 if test -n "$cf_new_extra_cppflags" ; then
11696 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11697 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11701 cf_add_libs="$cf_pkgconfig_libs"
11702 # Filter out duplicates - this happens with badly-designed ".pc" files...
11703 for cf_add_1lib in $LIBS
11705 for cf_add_2lib in $cf_add_libs
11707 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11713 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11715 LIBS="$cf_add_libs"
11717 LIBS="$cf_save_xmu"
11719 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11721 echo "${as_me:-configure}:11721: testing ...before $LIBS ..." 1>&5
11723 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
11724 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11726 echo "${as_me:-configure}:11726: testing ...after $LIBS ..." 1>&5
11732 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11734 echo "${as_me:-configure}:11734: testing ...before $LIBS ..." 1>&5
11736 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
11737 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11739 echo "${as_me:-configure}:11739: testing ...after $LIBS ..." 1>&5
11743 for cf_trim_lib in Xmu Xt X11
11746 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11747 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11748 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11750 echo "${as_me:-configure}:11750: testing ..trimmed $LIBS ..." 1>&5
11770 if test -z "$cf_x_athena_lib" ; then
11772 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11773 test -n "$verbose" && echo " found package Xext" 1>&6
11775 echo "${as_me:-configure}:11775: testing found package Xext ..." 1>&5
11777 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11778 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11779 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11781 echo "${as_me:-configure}:11781: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11783 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11785 echo "${as_me:-configure}:11785: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11790 cf_new_extra_cppflags=
11792 for cf_add_cflags in $cf_pkgconfig_incs
11794 case $cf_fix_cppflags in
11796 case $cf_add_cflags in
11797 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11798 case $cf_add_cflags in
11800 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11802 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11803 && test -z "${cf_tst_cflags}" \
11804 && cf_fix_cppflags=yes
11806 if test $cf_fix_cppflags = yes ; then
11808 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11809 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11812 elif test "${cf_tst_cflags}" = "\"'" ; then
11814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11821 case "$CPPFLAGS" in
11825 case $cf_add_cflags in
11827 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11829 CPPFLAGS=`echo "$CPPFLAGS" | \
11830 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11831 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11836 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11837 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11844 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11845 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11855 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11857 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11858 && test -z "${cf_tst_cflags}" \
11859 && cf_fix_cppflags=no
11864 if test -n "$cf_new_cflags" ; then
11866 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11867 CFLAGS="${CFLAGS}$cf_new_cflags"
11871 if test -n "$cf_new_cppflags" ; then
11873 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11874 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11878 if test -n "$cf_new_extra_cppflags" ; then
11880 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11881 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11885 cf_add_libs="$cf_pkgconfig_libs"
11886 # Filter out duplicates - this happens with badly-designed ".pc" files...
11887 for cf_add_1lib in $LIBS
11889 for cf_add_2lib in $cf_add_libs
11891 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11897 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11899 LIBS="$cf_add_libs"
11906 echo "$as_me:11906: checking for XextCreateExtension in -lXext" >&5
11907 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11908 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11909 echo $ECHO_N "(cached) $ECHO_C" >&6
11911 ac_check_lib_save_LIBS=$LIBS
11912 LIBS="-lXext $LIBS"
11913 cat >conftest.$ac_ext <<_ACEOF
11914 #line 11914 "configure"
11915 #include "confdefs.h"
11917 /* Override any gcc2 internal prototype to avoid an error. */
11921 /* We use char because int might match the return type of a gcc2
11922 builtin and then its argument prototype would still apply. */
11923 char XextCreateExtension ();
11927 XextCreateExtension ();
11932 rm -f conftest.$ac_objext conftest$ac_exeext
11933 if { (eval echo "$as_me:11933: \"$ac_link\"") >&5
11934 (eval $ac_link) 2>&5
11936 echo "$as_me:11936: \$? = $ac_status" >&5
11937 (exit $ac_status); } &&
11938 { ac_try='test -s conftest$ac_exeext'
11939 { (eval echo "$as_me:11939: \"$ac_try\"") >&5
11940 (eval $ac_try) 2>&5
11942 echo "$as_me:11942: \$? = $ac_status" >&5
11943 (exit $ac_status); }; }; then
11944 ac_cv_lib_Xext_XextCreateExtension=yes
11946 echo "$as_me: failed program was:" >&5
11947 cat conftest.$ac_ext >&5
11948 ac_cv_lib_Xext_XextCreateExtension=no
11950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11951 LIBS=$ac_check_lib_save_LIBS
11953 echo "$as_me:11953: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11954 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11955 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11957 cf_add_libs="-lXext"
11958 # Filter out duplicates - this happens with badly-designed ".pc" files...
11959 for cf_add_1lib in $LIBS
11961 for cf_add_2lib in $cf_add_libs
11963 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11969 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11971 LIBS="$cf_add_libs"
11977 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11978 # in some cases has installed dummy files in the former, other cases replaced
11979 # it with a link to the new location). This complicates the configure script.
11980 # Check for that pitfall, and recover using pkg-config
11982 # If none of these are set, the configuration is almost certainly broken.
11983 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11986 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11987 test -n "$verbose" && echo " found package x11" 1>&6
11989 echo "${as_me:-configure}:11989: testing found package x11 ..." 1>&5
11991 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11992 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11993 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11995 echo "${as_me:-configure}:11995: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11997 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11999 echo "${as_me:-configure}:11999: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12004 cf_new_extra_cppflags=
12006 for cf_add_cflags in $cf_pkgconfig_incs
12008 case $cf_fix_cppflags in
12010 case $cf_add_cflags in
12011 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12012 case $cf_add_cflags in
12014 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12016 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12017 && test -z "${cf_tst_cflags}" \
12018 && cf_fix_cppflags=yes
12020 if test $cf_fix_cppflags = yes ; then
12022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12026 elif test "${cf_tst_cflags}" = "\"'" ; then
12028 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12029 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'`
12050 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12051 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12058 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12059 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12069 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12072 && test -z "${cf_tst_cflags}" \
12073 && cf_fix_cppflags=no
12078 if test -n "$cf_new_cflags" ; then
12080 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12081 CFLAGS="${CFLAGS}$cf_new_cflags"
12085 if test -n "$cf_new_cppflags" ; then
12087 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12088 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12092 if test -n "$cf_new_extra_cppflags" ; then
12094 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12095 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12099 cf_add_libs="$cf_pkgconfig_libs"
12100 # Filter out duplicates - this happens with badly-designed ".pc" files...
12101 for cf_add_1lib in $LIBS
12103 for cf_add_2lib in $cf_add_libs
12105 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12111 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12113 LIBS="$cf_add_libs"
12119 { echo "$as_me:12119: WARNING: unable to find X11 library" >&5
12120 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12123 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12124 test -n "$verbose" && echo " found package ice" 1>&6
12126 echo "${as_me:-configure}:12126: testing found package ice ..." 1>&5
12128 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12129 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12130 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12132 echo "${as_me:-configure}:12132: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12134 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12136 echo "${as_me:-configure}:12136: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12141 cf_new_extra_cppflags=
12143 for cf_add_cflags in $cf_pkgconfig_incs
12145 case $cf_fix_cppflags in
12147 case $cf_add_cflags in
12148 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12149 case $cf_add_cflags in
12151 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12153 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12154 && test -z "${cf_tst_cflags}" \
12155 && cf_fix_cppflags=yes
12157 if test $cf_fix_cppflags = yes ; then
12159 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12160 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12163 elif test "${cf_tst_cflags}" = "\"'" ; then
12165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12166 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'`
12187 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12188 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12195 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12196 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12203 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12204 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12206 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12208 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12209 && test -z "${cf_tst_cflags}" \
12210 && cf_fix_cppflags=no
12215 if test -n "$cf_new_cflags" ; then
12217 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12218 CFLAGS="${CFLAGS}$cf_new_cflags"
12222 if test -n "$cf_new_cppflags" ; then
12224 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12225 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12229 if test -n "$cf_new_extra_cppflags" ; then
12231 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12232 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12236 cf_add_libs="$cf_pkgconfig_libs"
12237 # Filter out duplicates - this happens with badly-designed ".pc" files...
12238 for cf_add_1lib in $LIBS
12240 for cf_add_2lib in $cf_add_libs
12242 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12248 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12250 LIBS="$cf_add_libs"
12256 { echo "$as_me:12256: WARNING: unable to find ICE library" >&5
12257 echo "$as_me: WARNING: unable to find ICE library" >&2;}
12260 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12261 test -n "$verbose" && echo " found package sm" 1>&6
12263 echo "${as_me:-configure}:12263: testing found package sm ..." 1>&5
12265 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12266 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12267 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12269 echo "${as_me:-configure}:12269: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12271 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12273 echo "${as_me:-configure}:12273: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12278 cf_new_extra_cppflags=
12280 for cf_add_cflags in $cf_pkgconfig_incs
12282 case $cf_fix_cppflags in
12284 case $cf_add_cflags in
12285 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12286 case $cf_add_cflags in
12288 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12290 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12291 && test -z "${cf_tst_cflags}" \
12292 && cf_fix_cppflags=yes
12294 if test $cf_fix_cppflags = yes ; then
12296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12300 elif test "${cf_tst_cflags}" = "\"'" ; then
12302 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12303 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12309 case "$CPPFLAGS" in
12313 case $cf_add_cflags in
12315 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12317 CPPFLAGS=`echo "$CPPFLAGS" | \
12318 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12319 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12324 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12325 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12332 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12333 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12340 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12341 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12343 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12345 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12346 && test -z "${cf_tst_cflags}" \
12347 && cf_fix_cppflags=no
12352 if test -n "$cf_new_cflags" ; then
12354 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12355 CFLAGS="${CFLAGS}$cf_new_cflags"
12359 if test -n "$cf_new_cppflags" ; then
12361 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12362 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12366 if test -n "$cf_new_extra_cppflags" ; then
12368 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12369 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12373 cf_add_libs="$cf_pkgconfig_libs"
12374 # Filter out duplicates - this happens with badly-designed ".pc" files...
12375 for cf_add_1lib in $LIBS
12377 for cf_add_2lib in $cf_add_libs
12379 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12385 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12387 LIBS="$cf_add_libs"
12393 { echo "$as_me:12393: WARNING: unable to find SM library" >&5
12394 echo "$as_me: WARNING: unable to find SM library" >&2;}
12397 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12398 test -n "$verbose" && echo " found package xt" 1>&6
12400 echo "${as_me:-configure}:12400: testing found package xt ..." 1>&5
12402 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12403 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12404 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12406 echo "${as_me:-configure}:12406: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12408 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12410 echo "${as_me:-configure}:12410: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12415 cf_new_extra_cppflags=
12417 for cf_add_cflags in $cf_pkgconfig_incs
12419 case $cf_fix_cppflags in
12421 case $cf_add_cflags in
12422 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12423 case $cf_add_cflags in
12425 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12427 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12428 && test -z "${cf_tst_cflags}" \
12429 && cf_fix_cppflags=yes
12431 if test $cf_fix_cppflags = yes ; then
12433 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12434 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12437 elif test "${cf_tst_cflags}" = "\"'" ; then
12439 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12440 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12446 case "$CPPFLAGS" in
12450 case $cf_add_cflags in
12452 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12454 CPPFLAGS=`echo "$CPPFLAGS" | \
12455 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12456 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12461 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12462 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12469 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12470 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12477 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12478 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12480 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12482 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12483 && test -z "${cf_tst_cflags}" \
12484 && cf_fix_cppflags=no
12489 if test -n "$cf_new_cflags" ; then
12491 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12492 CFLAGS="${CFLAGS}$cf_new_cflags"
12496 if test -n "$cf_new_cppflags" ; then
12498 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12499 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12503 if test -n "$cf_new_extra_cppflags" ; then
12505 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12506 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12510 cf_add_libs="$cf_pkgconfig_libs"
12511 # Filter out duplicates - this happens with badly-designed ".pc" files...
12512 for cf_add_1lib in $LIBS
12514 for cf_add_2lib in $cf_add_libs
12516 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12524 LIBS="$cf_add_libs"
12530 { echo "$as_me:12530: WARNING: unable to find Xt library" >&5
12531 echo "$as_me: WARNING: unable to find Xt library" >&2;}
12538 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12539 test -n "$verbose" && echo " found package xt" 1>&6
12541 echo "${as_me:-configure}:12541: testing found package xt ..." 1>&5
12543 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12544 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12545 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12547 echo "${as_me:-configure}:12547: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12549 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12551 echo "${as_me:-configure}:12551: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12556 cf_new_extra_cppflags=
12558 for cf_add_cflags in $cf_pkgconfig_incs
12560 case $cf_fix_cppflags in
12562 case $cf_add_cflags in
12563 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12564 case $cf_add_cflags in
12566 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12568 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12569 && test -z "${cf_tst_cflags}" \
12570 && cf_fix_cppflags=yes
12572 if test $cf_fix_cppflags = yes ; then
12574 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12575 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12578 elif test "${cf_tst_cflags}" = "\"'" ; then
12580 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12581 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12587 case "$CPPFLAGS" in
12591 case $cf_add_cflags in
12593 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12595 CPPFLAGS=`echo "$CPPFLAGS" | \
12596 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12597 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12602 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12603 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12610 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12611 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12618 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12619 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12621 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12623 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12624 && test -z "${cf_tst_cflags}" \
12625 && cf_fix_cppflags=no
12630 if test -n "$cf_new_cflags" ; then
12632 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12633 CFLAGS="${CFLAGS}$cf_new_cflags"
12637 if test -n "$cf_new_cppflags" ; then
12639 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12640 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12644 if test -n "$cf_new_extra_cppflags" ; then
12646 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12647 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12651 cf_add_libs="$cf_pkgconfig_libs"
12652 # Filter out duplicates - this happens with badly-designed ".pc" files...
12653 for cf_add_1lib in $LIBS
12655 for cf_add_2lib in $cf_add_libs
12657 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12663 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12665 LIBS="$cf_add_libs"
12671 # we have an "xt" package, but it may omit Xt's dependency on X11
12672 echo "$as_me:12672: checking for usable X dependency" >&5
12673 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
12674 if test "${cf_cv_xt_x11_compat+set}" = set; then
12675 echo $ECHO_N "(cached) $ECHO_C" >&6
12678 cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12682 #include <X11/Xlib.h>
12688 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12689 int rc2 = XClearWindow((Display*) 0, (Window) 0);
12690 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12691 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12697 rm -f conftest.$ac_objext conftest$ac_exeext
12698 if { (eval echo "$as_me:12698: \"$ac_link\"") >&5
12699 (eval $ac_link) 2>&5
12701 echo "$as_me:12701: \$? = $ac_status" >&5
12702 (exit $ac_status); } &&
12703 { ac_try='test -s conftest$ac_exeext'
12704 { (eval echo "$as_me:12704: \"$ac_try\"") >&5
12705 (eval $ac_try) 2>&5
12707 echo "$as_me:12707: \$? = $ac_status" >&5
12708 (exit $ac_status); }; }; then
12709 cf_cv_xt_x11_compat=yes
12711 echo "$as_me: failed program was:" >&5
12712 cat conftest.$ac_ext >&5
12713 cf_cv_xt_x11_compat=no
12715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12717 echo "$as_me:12717: result: $cf_cv_xt_x11_compat" >&5
12718 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12719 if test "$cf_cv_xt_x11_compat" = no
12721 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
12723 echo "${as_me:-configure}:12723: testing work around broken X11 dependency ..." 1>&5
12725 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12727 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12728 test -n "$verbose" && echo " found package x11" 1>&6
12730 echo "${as_me:-configure}:12730: testing found package x11 ..." 1>&5
12732 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12733 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12734 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12736 echo "${as_me:-configure}:12736: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12738 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12740 echo "${as_me:-configure}:12740: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12745 cf_new_extra_cppflags=
12747 for cf_add_cflags in $cf_pkgconfig_incs
12749 case $cf_fix_cppflags in
12751 case $cf_add_cflags in
12752 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12753 case $cf_add_cflags in
12755 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12757 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12758 && test -z "${cf_tst_cflags}" \
12759 && cf_fix_cppflags=yes
12761 if test $cf_fix_cppflags = yes ; then
12763 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12764 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12767 elif test "${cf_tst_cflags}" = "\"'" ; then
12769 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12770 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12776 case "$CPPFLAGS" in
12780 case $cf_add_cflags in
12782 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12784 CPPFLAGS=`echo "$CPPFLAGS" | \
12785 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12786 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12791 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12792 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12799 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12800 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12810 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12813 && test -z "${cf_tst_cflags}" \
12814 && cf_fix_cppflags=no
12819 if test -n "$cf_new_cflags" ; then
12821 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12822 CFLAGS="${CFLAGS}$cf_new_cflags"
12826 if test -n "$cf_new_cppflags" ; then
12828 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12829 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12833 if test -n "$cf_new_extra_cppflags" ; then
12835 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12836 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12840 cf_add_libs="$cf_pkgconfig_libs"
12841 # Filter out duplicates - this happens with badly-designed ".pc" files...
12842 for cf_add_1lib in $LIBS
12844 for cf_add_2lib in $cf_add_libs
12846 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12852 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12854 LIBS="$cf_add_libs"
12861 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12863 echo "${as_me:-configure}:12863: testing ...before $LIBS ..." 1>&5
12865 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12866 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12868 echo "${as_me:-configure}:12868: testing ...after $LIBS ..." 1>&5
12876 echo "$as_me:12876: checking for usable X Toolkit package" >&5
12877 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12878 if test "${cf_cv_xt_ice_compat+set}" = set; then
12879 echo $ECHO_N "(cached) $ECHO_C" >&6
12882 cat >conftest.$ac_ext <<_ACEOF
12883 #line 12883 "configure"
12884 #include "confdefs.h"
12886 #include <X11/Shell.h>
12891 int num = IceConnectionNumber(0)
12897 rm -f conftest.$ac_objext conftest$ac_exeext
12898 if { (eval echo "$as_me:12898: \"$ac_link\"") >&5
12899 (eval $ac_link) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest$ac_exeext'
12904 { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12907 echo "$as_me:12907: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12909 cf_cv_xt_ice_compat=yes
12911 echo "$as_me: failed program was:" >&5
12912 cat conftest.$ac_ext >&5
12913 cf_cv_xt_ice_compat=no
12915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12917 echo "$as_me:12917: result: $cf_cv_xt_ice_compat" >&5
12918 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12920 if test "$cf_cv_xt_ice_compat" = no
12922 # workaround for broken ".pc" files used for X Toolkit.
12923 case "x$X_PRE_LIBS" in
12929 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12931 echo "${as_me:-configure}:12931: testing work around broken ICE dependency ..." 1>&5
12933 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12934 test -n "$verbose" && echo " found package ice" 1>&6
12936 echo "${as_me:-configure}:12936: testing found package ice ..." 1>&5
12938 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12939 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12940 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12942 echo "${as_me:-configure}:12942: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12944 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12946 echo "${as_me:-configure}:12946: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12951 cf_new_extra_cppflags=
12953 for cf_add_cflags in $cf_pkgconfig_incs
12955 case $cf_fix_cppflags in
12957 case $cf_add_cflags in
12958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12959 case $cf_add_cflags in
12961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12964 && test -z "${cf_tst_cflags}" \
12965 && cf_fix_cppflags=yes
12967 if test $cf_fix_cppflags = yes ; then
12969 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12970 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12973 elif test "${cf_tst_cflags}" = "\"'" ; then
12975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12982 case "$CPPFLAGS" in
12986 case $cf_add_cflags in
12988 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12990 CPPFLAGS=`echo "$CPPFLAGS" | \
12991 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12992 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12997 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12998 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13005 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13006 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13013 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13014 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13016 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13019 && test -z "${cf_tst_cflags}" \
13020 && cf_fix_cppflags=no
13025 if test -n "$cf_new_cflags" ; then
13027 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13028 CFLAGS="${CFLAGS}$cf_new_cflags"
13032 if test -n "$cf_new_cppflags" ; then
13034 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13035 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13039 if test -n "$cf_new_extra_cppflags" ; then
13041 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13042 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13046 cf_add_libs="$cf_pkgconfig_libs"
13047 # Filter out duplicates - this happens with badly-designed ".pc" files...
13048 for cf_add_1lib in $LIBS
13050 for cf_add_2lib in $cf_add_libs
13052 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13058 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13060 LIBS="$cf_add_libs"
13062 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13063 test -n "$verbose" && echo " found package sm" 1>&6
13065 echo "${as_me:-configure}:13065: testing found package sm ..." 1>&5
13067 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13068 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13069 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13071 echo "${as_me:-configure}:13071: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13073 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13075 echo "${as_me:-configure}:13075: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13080 cf_new_extra_cppflags=
13082 for cf_add_cflags in $cf_pkgconfig_incs
13084 case $cf_fix_cppflags in
13086 case $cf_add_cflags in
13087 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13088 case $cf_add_cflags in
13090 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13093 && test -z "${cf_tst_cflags}" \
13094 && cf_fix_cppflags=yes
13096 if test $cf_fix_cppflags = yes ; then
13098 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13099 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13102 elif test "${cf_tst_cflags}" = "\"'" ; then
13104 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13105 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13111 case "$CPPFLAGS" in
13115 case $cf_add_cflags in
13117 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13119 CPPFLAGS=`echo "$CPPFLAGS" | \
13120 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13121 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13126 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13127 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13134 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13135 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13145 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13147 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13148 && test -z "${cf_tst_cflags}" \
13149 && cf_fix_cppflags=no
13154 if test -n "$cf_new_cflags" ; then
13156 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13157 CFLAGS="${CFLAGS}$cf_new_cflags"
13161 if test -n "$cf_new_cppflags" ; then
13163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13164 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13168 if test -n "$cf_new_extra_cppflags" ; then
13170 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13171 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13175 cf_add_libs="$cf_pkgconfig_libs"
13176 # Filter out duplicates - this happens with badly-designed ".pc" files...
13177 for cf_add_1lib in $LIBS
13179 for cf_add_2lib in $cf_add_libs
13181 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13187 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13189 LIBS="$cf_add_libs"
13202 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13204 echo "${as_me:-configure}:13204: testing ...before $LIBS ..." 1>&5
13206 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
13207 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13209 echo "${as_me:-configure}:13209: testing ...after $LIBS ..." 1>&5
13225 LDFLAGS="$X_LIBS $LDFLAGS"
13227 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13229 echo "${as_me:-configure}:13229: testing checking additions to CFLAGS ..." 1>&5
13231 cf_check_cflags="$CFLAGS"
13232 cf_check_cppflags="$CPPFLAGS"
13237 cf_new_extra_cppflags=
13239 for cf_add_cflags in $X_CFLAGS
13241 case $cf_fix_cppflags in
13243 case $cf_add_cflags in
13244 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13245 case $cf_add_cflags in
13247 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13249 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13250 && test -z "${cf_tst_cflags}" \
13251 && cf_fix_cppflags=yes
13253 if test $cf_fix_cppflags = yes ; then
13255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13259 elif test "${cf_tst_cflags}" = "\"'" ; then
13261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13268 case "$CPPFLAGS" in
13272 case $cf_add_cflags in
13274 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13276 CPPFLAGS=`echo "$CPPFLAGS" | \
13277 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13278 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13283 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13284 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13291 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13292 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13302 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13304 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13305 && test -z "${cf_tst_cflags}" \
13306 && cf_fix_cppflags=no
13311 if test -n "$cf_new_cflags" ; then
13312 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13314 echo "${as_me:-configure}:13314: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13316 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13317 CFLAGS="${CFLAGS}$cf_new_cflags"
13321 if test -n "$cf_new_cppflags" ; then
13322 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13324 echo "${as_me:-configure}:13324: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13326 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13327 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13331 if test -n "$cf_new_extra_cppflags" ; then
13332 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13334 echo "${as_me:-configure}:13334: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13336 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13337 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13341 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13342 cat >conftest.$ac_ext <<_ACEOF
13343 #line 13343 "configure"
13344 #include "confdefs.h"
13349 printf("Hello world");
13354 rm -f conftest.$ac_objext conftest$ac_exeext
13355 if { (eval echo "$as_me:13355: \"$ac_link\"") >&5
13356 (eval $ac_link) 2>&5
13358 echo "$as_me:13358: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
13360 { ac_try='test -s conftest$ac_exeext'
13361 { (eval echo "$as_me:13361: \"$ac_try\"") >&5
13362 (eval $ac_try) 2>&5
13364 echo "$as_me:13364: \$? = $ac_status" >&5
13365 (exit $ac_status); }; }; then
13368 echo "$as_me: failed program was:" >&5
13369 cat conftest.$ac_ext >&5
13370 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13372 echo "${as_me:-configure}:13372: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13374 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13375 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13377 echo "${as_me:-configure}:13377: testing but keeping change to \$CPPFLAGS ..." 1>&5
13380 CFLAGS="$cf_check_flags"
13382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13385 echo "$as_me:13385: checking for XOpenDisplay" >&5
13386 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
13387 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
13388 echo $ECHO_N "(cached) $ECHO_C" >&6
13390 cat >conftest.$ac_ext <<_ACEOF
13391 #line 13391 "configure"
13392 #include "confdefs.h"
13393 /* System header to define __stub macros and hopefully few prototypes,
13394 which can conflict with char XOpenDisplay (); below. */
13395 #include <assert.h>
13396 /* Override any gcc2 internal prototype to avoid an error. */
13400 /* We use char because int might match the return type of a gcc2
13401 builtin and then its argument prototype would still apply. */
13402 char XOpenDisplay ();
13408 /* The GNU C library defines this for functions which it implements
13409 to always fail with ENOSYS. Some functions are actually named
13410 something starting with __ and the normal name is an alias. */
13411 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
13414 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13421 rm -f conftest.$ac_objext conftest$ac_exeext
13422 if { (eval echo "$as_me:13422: \"$ac_link\"") >&5
13423 (eval $ac_link) 2>&5
13425 echo "$as_me:13425: \$? = $ac_status" >&5
13426 (exit $ac_status); } &&
13427 { ac_try='test -s conftest$ac_exeext'
13428 { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429 (eval $ac_try) 2>&5
13431 echo "$as_me:13431: \$? = $ac_status" >&5
13432 (exit $ac_status); }; }; then
13433 ac_cv_func_XOpenDisplay=yes
13435 echo "$as_me: failed program was:" >&5
13436 cat conftest.$ac_ext >&5
13437 ac_cv_func_XOpenDisplay=no
13439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13441 echo "$as_me:13441: result: $ac_cv_func_XOpenDisplay" >&5
13442 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
13443 if test $ac_cv_func_XOpenDisplay = yes; then
13447 echo "$as_me:13447: checking for XOpenDisplay in -lX11" >&5
13448 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13449 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13450 echo $ECHO_N "(cached) $ECHO_C" >&6
13452 ac_check_lib_save_LIBS=$LIBS
13453 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13454 cat >conftest.$ac_ext <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13458 /* Override any gcc2 internal prototype to avoid an error. */
13462 /* We use char because int might match the return type of a gcc2
13463 builtin and then its argument prototype would still apply. */
13464 char XOpenDisplay ();
13473 rm -f conftest.$ac_objext conftest$ac_exeext
13474 if { (eval echo "$as_me:13474: \"$ac_link\"") >&5
13475 (eval $ac_link) 2>&5
13477 echo "$as_me:13477: \$? = $ac_status" >&5
13478 (exit $ac_status); } &&
13479 { ac_try='test -s conftest$ac_exeext'
13480 { (eval echo "$as_me:13480: \"$ac_try\"") >&5
13481 (eval $ac_try) 2>&5
13483 echo "$as_me:13483: \$? = $ac_status" >&5
13484 (exit $ac_status); }; }; then
13485 ac_cv_lib_X11_XOpenDisplay=yes
13487 echo "$as_me: failed program was:" >&5
13488 cat conftest.$ac_ext >&5
13489 ac_cv_lib_X11_XOpenDisplay=no
13491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13492 LIBS=$ac_check_lib_save_LIBS
13494 echo "$as_me:13494: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13495 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13496 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13498 cf_add_libs="-lX11"
13499 # Filter out duplicates - this happens with badly-designed ".pc" files...
13500 for cf_add_1lib in $LIBS
13502 for cf_add_2lib in $cf_add_libs
13504 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13510 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13512 LIBS="$cf_add_libs"
13518 echo "$as_me:13518: checking for XtAppInitialize" >&5
13519 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
13520 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
13521 echo $ECHO_N "(cached) $ECHO_C" >&6
13523 cat >conftest.$ac_ext <<_ACEOF
13524 #line 13524 "configure"
13525 #include "confdefs.h"
13526 /* System header to define __stub macros and hopefully few prototypes,
13527 which can conflict with char XtAppInitialize (); below. */
13528 #include <assert.h>
13529 /* Override any gcc2 internal prototype to avoid an error. */
13533 /* We use char because int might match the return type of a gcc2
13534 builtin and then its argument prototype would still apply. */
13535 char XtAppInitialize ();
13541 /* The GNU C library defines this for functions which it implements
13542 to always fail with ENOSYS. Some functions are actually named
13543 something starting with __ and the normal name is an alias. */
13544 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
13547 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13554 rm -f conftest.$ac_objext conftest$ac_exeext
13555 if { (eval echo "$as_me:13555: \"$ac_link\"") >&5
13556 (eval $ac_link) 2>&5
13558 echo "$as_me:13558: \$? = $ac_status" >&5
13559 (exit $ac_status); } &&
13560 { ac_try='test -s conftest$ac_exeext'
13561 { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562 (eval $ac_try) 2>&5
13564 echo "$as_me:13564: \$? = $ac_status" >&5
13565 (exit $ac_status); }; }; then
13566 ac_cv_func_XtAppInitialize=yes
13568 echo "$as_me: failed program was:" >&5
13569 cat conftest.$ac_ext >&5
13570 ac_cv_func_XtAppInitialize=no
13572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13574 echo "$as_me:13574: result: $ac_cv_func_XtAppInitialize" >&5
13575 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
13576 if test $ac_cv_func_XtAppInitialize = yes; then
13580 echo "$as_me:13580: checking for XtAppInitialize in -lXt" >&5
13581 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
13582 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
13583 echo $ECHO_N "(cached) $ECHO_C" >&6
13585 ac_check_lib_save_LIBS=$LIBS
13586 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13587 cat >conftest.$ac_ext <<_ACEOF
13588 #line 13588 "configure"
13589 #include "confdefs.h"
13591 /* Override any gcc2 internal prototype to avoid an error. */
13595 /* We use char because int might match the return type of a gcc2
13596 builtin and then its argument prototype would still apply. */
13597 char XtAppInitialize ();
13601 XtAppInitialize ();
13606 rm -f conftest.$ac_objext conftest$ac_exeext
13607 if { (eval echo "$as_me:13607: \"$ac_link\"") >&5
13608 (eval $ac_link) 2>&5
13610 echo "$as_me:13610: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest$ac_exeext'
13613 { (eval echo "$as_me:13613: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13616 echo "$as_me:13616: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618 ac_cv_lib_Xt_XtAppInitialize=yes
13620 echo "$as_me: failed program was:" >&5
13621 cat conftest.$ac_ext >&5
13622 ac_cv_lib_Xt_XtAppInitialize=no
13624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13625 LIBS=$ac_check_lib_save_LIBS
13627 echo "$as_me:13627: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
13628 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
13629 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
13631 cat >>confdefs.h <<\EOF
13632 #define HAVE_LIBXT 1
13636 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13643 if test $cf_have_X_LIBS = no ; then
13644 { echo "$as_me:13644: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13645 test program. You will have to check and add the proper libraries by hand
13647 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13648 test program. You will have to check and add the proper libraries by hand
13649 to makefile." >&2;}
13652 cf_x_athena_root=$cf_x_athena
13655 for cf_path in default \
13656 /usr/contrib/X11R6 \
13657 /usr/contrib/X11R5 \
13661 if test -z "$cf_x_athena_inc" ; then
13662 cf_save="$CPPFLAGS"
13663 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
13664 if test $cf_path != default ; then
13665 CPPFLAGS="$cf_save -I$cf_path/include"
13666 echo "$as_me:13666: checking for $cf_test in $cf_path" >&5
13667 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
13669 echo "$as_me:13669: checking for $cf_test" >&5
13670 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
13672 cat >conftest.$ac_ext <<_ACEOF
13673 #line 13673 "configure"
13674 #include "confdefs.h"
13676 #include <X11/Intrinsic.h>
13677 #include <$cf_test>
13686 rm -f conftest.$ac_objext
13687 if { (eval echo "$as_me:13687: \"$ac_compile\"") >&5
13688 (eval $ac_compile) 2>&5
13690 echo "$as_me:13690: \$? = $ac_status" >&5
13691 (exit $ac_status); } &&
13692 { ac_try='test -s conftest.$ac_objext'
13693 { (eval echo "$as_me:13693: \"$ac_try\"") >&5
13694 (eval $ac_try) 2>&5
13696 echo "$as_me:13696: \$? = $ac_status" >&5
13697 (exit $ac_status); }; }; then
13700 echo "$as_me: failed program was:" >&5
13701 cat conftest.$ac_ext >&5
13704 rm -f conftest.$ac_objext conftest.$ac_ext
13705 echo "$as_me:13705: result: $cf_result" >&5
13706 echo "${ECHO_T}$cf_result" >&6
13707 if test "$cf_result" = yes ; then
13708 cf_x_athena_inc=$cf_path
13711 CPPFLAGS="$cf_save"
13716 if test -z "$cf_x_athena_inc" ; then
13717 { echo "$as_me:13717: WARNING: Unable to successfully find Athena header files with test program" >&5
13718 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
13719 elif test "$cf_x_athena_inc" != default ; then
13720 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
13723 cf_x_athena_root=$cf_x_athena
13726 for cf_path in default \
13727 /usr/contrib/X11R6 \
13728 /usr/contrib/X11R5 \
13733 ${cf_x_athena_root} \
13734 ${cf_x_athena_root}7 \
13735 ${cf_x_athena_root}6
13738 "-l$cf_lib -lXmu" \
13739 "-l$cf_lib -lXpm -lXmu" \
13740 "-l${cf_lib}_s -lXmu_s"
13742 if test -z "$cf_x_athena_lib" ; then
13744 cf_test=XawSimpleMenuAddGlobalActions
13745 if test $cf_path != default ; then
13747 cf_add_libs="-L$cf_path/lib $cf_libs"
13748 # Filter out duplicates - this happens with badly-designed ".pc" files...
13749 for cf_add_1lib in $LIBS
13751 for cf_add_2lib in $cf_add_libs
13753 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13759 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13761 LIBS="$cf_add_libs"
13763 echo "$as_me:13763: checking for $cf_libs in $cf_path" >&5
13764 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13767 cf_add_libs="$cf_libs"
13768 # Filter out duplicates - this happens with badly-designed ".pc" files...
13769 for cf_add_1lib in $LIBS
13771 for cf_add_2lib in $cf_add_libs
13773 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13779 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13781 LIBS="$cf_add_libs"
13783 echo "$as_me:13783: checking for $cf_test in $cf_libs" >&5
13784 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13786 cat >conftest.$ac_ext <<_ACEOF
13787 #line 13787 "configure"
13788 #include "confdefs.h"
13790 #include <X11/Intrinsic.h>
13791 #include <X11/$cf_x_athena_root/SimpleMenu.h>
13797 $cf_test((XtAppContext) 0)
13802 rm -f conftest.$ac_objext conftest$ac_exeext
13803 if { (eval echo "$as_me:13803: \"$ac_link\"") >&5
13804 (eval $ac_link) 2>&5
13806 echo "$as_me:13806: \$? = $ac_status" >&5
13807 (exit $ac_status); } &&
13808 { ac_try='test -s conftest$ac_exeext'
13809 { (eval echo "$as_me:13809: \"$ac_try\"") >&5
13810 (eval $ac_try) 2>&5
13812 echo "$as_me:13812: \$? = $ac_status" >&5
13813 (exit $ac_status); }; }; then
13816 echo "$as_me: failed program was:" >&5
13817 cat conftest.$ac_ext >&5
13820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13821 echo "$as_me:13821: result: $cf_result" >&5
13822 echo "${ECHO_T}$cf_result" >&6
13823 if test "$cf_result" = yes ; then
13824 cf_x_athena_lib="$cf_libs"
13830 test -n "$cf_x_athena_lib" && break
13834 if test -z "$cf_x_athena_lib" ; then
13835 { { echo "$as_me:13835: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13836 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13837 { (exit 1); exit 1; }; }
13840 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13842 cat >>confdefs.h <<EOF
13843 #define $cf_x_athena_LIBS 1
13848 if test -n "$ac_tool_prefix"; then
13849 for ac_prog in xcurses-config
13851 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13852 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13853 echo "$as_me:13853: checking for $ac_word" >&5
13854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13855 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
13856 echo $ECHO_N "(cached) $ECHO_C" >&6
13858 if test -n "$XCURSES_CONFIG"; then
13859 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
13861 ac_save_IFS=$IFS; IFS=$ac_path_separator
13863 for ac_dir in $ac_dummy; do
13865 test -z "$ac_dir" && ac_dir=.
13866 $as_executable_p "$ac_dir/$ac_word" || continue
13867 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
13868 echo "$as_me:13868: found $ac_dir/$ac_word" >&5
13874 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
13875 if test -n "$XCURSES_CONFIG"; then
13876 echo "$as_me:13876: result: $XCURSES_CONFIG" >&5
13877 echo "${ECHO_T}$XCURSES_CONFIG" >&6
13879 echo "$as_me:13879: result: no" >&5
13880 echo "${ECHO_T}no" >&6
13883 test -n "$XCURSES_CONFIG" && break
13886 if test -z "$XCURSES_CONFIG"; then
13887 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
13888 for ac_prog in xcurses-config
13890 # Extract the first word of "$ac_prog", so it can be a program name with args.
13891 set dummy $ac_prog; ac_word=$2
13892 echo "$as_me:13892: checking for $ac_word" >&5
13893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13894 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
13895 echo $ECHO_N "(cached) $ECHO_C" >&6
13897 if test -n "$ac_ct_XCURSES_CONFIG"; then
13898 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
13900 ac_save_IFS=$IFS; IFS=$ac_path_separator
13902 for ac_dir in $ac_dummy; do
13904 test -z "$ac_dir" && ac_dir=.
13905 $as_executable_p "$ac_dir/$ac_word" || continue
13906 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
13907 echo "$as_me:13907: found $ac_dir/$ac_word" >&5
13913 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
13914 if test -n "$ac_ct_XCURSES_CONFIG"; then
13915 echo "$as_me:13915: result: $ac_ct_XCURSES_CONFIG" >&5
13916 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
13918 echo "$as_me:13918: result: no" >&5
13919 echo "${ECHO_T}no" >&6
13922 test -n "$ac_ct_XCURSES_CONFIG" && break
13924 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
13926 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
13929 if test "$XCURSES_CONFIG" != none ; then
13931 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
13933 cf_add_libs="`$XCURSES_CONFIG --libs`"
13934 # Filter out duplicates - this happens with badly-designed ".pc" files...
13935 for cf_add_1lib in $LIBS
13937 for cf_add_2lib in $cf_add_libs
13939 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13945 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13947 LIBS="$cf_add_libs"
13949 cf_cv_lib_XCurses=yes
13953 LDFLAGS="$LDFLAGS $X_LIBS"
13955 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13957 echo "${as_me:-configure}:13957: testing checking additions to CFLAGS ..." 1>&5
13959 cf_check_cflags="$CFLAGS"
13960 cf_check_cppflags="$CPPFLAGS"
13965 cf_new_extra_cppflags=
13967 for cf_add_cflags in $X_CFLAGS
13969 case $cf_fix_cppflags in
13971 case $cf_add_cflags in
13972 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13973 case $cf_add_cflags in
13975 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13977 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13978 && test -z "${cf_tst_cflags}" \
13979 && cf_fix_cppflags=yes
13981 if test $cf_fix_cppflags = yes ; then
13983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13987 elif test "${cf_tst_cflags}" = "\"'" ; then
13989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13996 case "$CPPFLAGS" in
14000 case $cf_add_cflags in
14002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14004 CPPFLAGS=`echo "$CPPFLAGS" | \
14005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14011 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14012 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14019 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14020 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14027 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14028 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14030 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14033 && test -z "${cf_tst_cflags}" \
14034 && cf_fix_cppflags=no
14039 if test -n "$cf_new_cflags" ; then
14040 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14042 echo "${as_me:-configure}:14042: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14045 CFLAGS="${CFLAGS}$cf_new_cflags"
14049 if test -n "$cf_new_cppflags" ; then
14050 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14052 echo "${as_me:-configure}:14052: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14054 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14055 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14059 if test -n "$cf_new_extra_cppflags" ; then
14060 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14062 echo "${as_me:-configure}:14062: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14064 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14065 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14069 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14070 cat >conftest.$ac_ext <<_ACEOF
14071 #line 14071 "configure"
14072 #include "confdefs.h"
14077 printf("Hello world");
14082 rm -f conftest.$ac_objext conftest$ac_exeext
14083 if { (eval echo "$as_me:14083: \"$ac_link\"") >&5
14084 (eval $ac_link) 2>&5
14086 echo "$as_me:14086: \$? = $ac_status" >&5
14087 (exit $ac_status); } &&
14088 { ac_try='test -s conftest$ac_exeext'
14089 { (eval echo "$as_me:14089: \"$ac_try\"") >&5
14090 (eval $ac_try) 2>&5
14092 echo "$as_me:14092: \$? = $ac_status" >&5
14093 (exit $ac_status); }; }; then
14096 echo "$as_me: failed program was:" >&5
14097 cat conftest.$ac_ext >&5
14098 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14100 echo "${as_me:-configure}:14100: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14102 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14103 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14105 echo "${as_me:-configure}:14105: testing but keeping change to \$CPPFLAGS ..." 1>&5
14108 CFLAGS="$cf_check_flags"
14110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14113 echo "$as_me:14113: checking for XOpenDisplay in -lX11" >&5
14114 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14115 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14116 echo $ECHO_N "(cached) $ECHO_C" >&6
14118 ac_check_lib_save_LIBS=$LIBS
14119 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14120 cat >conftest.$ac_ext <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14124 /* Override any gcc2 internal prototype to avoid an error. */
14128 /* We use char because int might match the return type of a gcc2
14129 builtin and then its argument prototype would still apply. */
14130 char XOpenDisplay ();
14139 rm -f conftest.$ac_objext conftest$ac_exeext
14140 if { (eval echo "$as_me:14140: \"$ac_link\"") >&5
14141 (eval $ac_link) 2>&5
14143 echo "$as_me:14143: \$? = $ac_status" >&5
14144 (exit $ac_status); } &&
14145 { ac_try='test -s conftest$ac_exeext'
14146 { (eval echo "$as_me:14146: \"$ac_try\"") >&5
14147 (eval $ac_try) 2>&5
14149 echo "$as_me:14149: \$? = $ac_status" >&5
14150 (exit $ac_status); }; }; then
14151 ac_cv_lib_X11_XOpenDisplay=yes
14153 echo "$as_me: failed program was:" >&5
14154 cat conftest.$ac_ext >&5
14155 ac_cv_lib_X11_XOpenDisplay=no
14157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14158 LIBS=$ac_check_lib_save_LIBS
14160 echo "$as_me:14160: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14161 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14162 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14164 cf_add_libs="-lX11"
14165 # Filter out duplicates - this happens with badly-designed ".pc" files...
14166 for cf_add_1lib in $LIBS
14168 for cf_add_2lib in $cf_add_libs
14170 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14176 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14178 LIBS="$cf_add_libs"
14182 echo "$as_me:14182: checking for XCurses library" >&5
14183 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
14184 if test "${cf_cv_lib_XCurses+set}" = set; then
14185 echo $ECHO_N "(cached) $ECHO_C" >&6
14188 cf_add_libs="-lXCurses"
14189 # Filter out duplicates - this happens with badly-designed ".pc" files...
14190 for cf_add_1lib in $LIBS
14192 for cf_add_2lib in $cf_add_libs
14194 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14200 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14202 LIBS="$cf_add_libs"
14204 cat >conftest.$ac_ext <<_ACEOF
14205 #line 14205 "configure"
14206 #include "confdefs.h"
14208 #include <xcurses.h>
14209 char *XCursesProgramName = "test";
14219 rm -f conftest.$ac_objext conftest$ac_exeext
14220 if { (eval echo "$as_me:14220: \"$ac_link\"") >&5
14221 (eval $ac_link) 2>&5
14223 echo "$as_me:14223: \$? = $ac_status" >&5
14224 (exit $ac_status); } &&
14225 { ac_try='test -s conftest$ac_exeext'
14226 { (eval echo "$as_me:14226: \"$ac_try\"") >&5
14227 (eval $ac_try) 2>&5
14229 echo "$as_me:14229: \$? = $ac_status" >&5
14230 (exit $ac_status); }; }; then
14231 cf_cv_lib_XCurses=yes
14233 echo "$as_me: failed program was:" >&5
14234 cat conftest.$ac_ext >&5
14235 cf_cv_lib_XCurses=no
14237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14240 echo "$as_me:14240: result: $cf_cv_lib_XCurses" >&5
14241 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
14245 if test $cf_cv_lib_XCurses = yes ; then
14247 cat >>confdefs.h <<\EOF
14251 cat >>confdefs.h <<\EOF
14255 echo "$as_me:14255: checking for xcurses.h" >&5
14256 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
14257 if test "${ac_cv_header_xcurses_h+set}" = set; then
14258 echo $ECHO_N "(cached) $ECHO_C" >&6
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263 #include <xcurses.h>
14265 if { (eval echo "$as_me:14265: \"$ac_cpp conftest.$ac_ext\"") >&5
14266 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14268 egrep -v '^ *\+' conftest.er1 >conftest.err
14270 cat conftest.err >&5
14271 echo "$as_me:14271: \$? = $ac_status" >&5
14272 (exit $ac_status); } >/dev/null; then
14273 if test -s conftest.err; then
14274 ac_cpp_err=$ac_c_preproc_warn_flag
14281 if test -z "$ac_cpp_err"; then
14282 ac_cv_header_xcurses_h=yes
14284 echo "$as_me: failed program was:" >&5
14285 cat conftest.$ac_ext >&5
14286 ac_cv_header_xcurses_h=no
14288 rm -f conftest.err conftest.$ac_ext
14290 echo "$as_me:14290: result: $ac_cv_header_xcurses_h" >&5
14291 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
14292 if test $ac_cv_header_xcurses_h = yes; then
14294 cat >>confdefs.h <<\EOF
14295 #define HAVE_XCURSES 1
14301 { { echo "$as_me:14301: error: Cannot link with XCurses" >&5
14302 echo "$as_me: error: Cannot link with XCurses" >&2;}
14303 { (exit 1); exit 1; }; }
14308 { { echo "$as_me:14308: error: unexpected screen-value: $cf_cv_screen" >&5
14309 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
14310 { (exit 1); exit 1; }; }
14314 : ${cf_nculib_root:=$cf_cv_screen}
14315 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
14316 echo "$as_me:14316: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
14317 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
14318 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14319 echo $ECHO_N "(cached) $ECHO_C" >&6
14321 ac_check_lib_save_LIBS=$LIBS
14322 LIBS="-l$cf_nculib_root $LIBS"
14323 cat >conftest.$ac_ext <<_ACEOF
14324 #line 14324 "configure"
14325 #include "confdefs.h"
14327 /* Override any gcc2 internal prototype to avoid an error. */
14331 /* We use char because int might match the return type of a gcc2
14332 builtin and then its argument prototype would still apply. */
14333 char _nc_init_pthreads ();
14337 _nc_init_pthreads ();
14342 rm -f conftest.$ac_objext conftest$ac_exeext
14343 if { (eval echo "$as_me:14343: \"$ac_link\"") >&5
14344 (eval $ac_link) 2>&5
14346 echo "$as_me:14346: \$? = $ac_status" >&5
14347 (exit $ac_status); } &&
14348 { ac_try='test -s conftest$ac_exeext'
14349 { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350 (eval $ac_try) 2>&5
14352 echo "$as_me:14352: \$? = $ac_status" >&5
14353 (exit $ac_status); }; }; then
14354 eval "$as_ac_Lib=yes"
14356 echo "$as_me: failed program was:" >&5
14357 cat conftest.$ac_ext >&5
14358 eval "$as_ac_Lib=no"
14360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14361 LIBS=$ac_check_lib_save_LIBS
14363 echo "$as_me:14363: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14364 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14365 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14366 cf_cv_ncurses_pthreads=yes
14368 cf_cv_ncurses_pthreads=no
14371 if test "$cf_cv_ncurses_pthreads" = yes
14374 cf_add_libs="-lpthread"
14375 # Filter out duplicates - this happens with badly-designed ".pc" files...
14376 for cf_add_1lib in $LIBS
14378 for cf_add_2lib in $cf_add_libs
14380 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14386 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14388 LIBS="$cf_add_libs"
14392 case $cf_cv_screen in
14394 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
14398 echo "$as_me:14398: checking for X11 rgb file" >&5
14399 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14401 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14402 if test "${with_x11_rgb+set}" = set; then
14403 withval="$with_x11_rgb"
14409 if test "x$RGB_PATH" = xauto
14411 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14413 /opt/local/share/X11/rgb.txt \
14414 /opt/X11/share/X11/rgb.txt \
14415 /usr/share/X11/rgb.txt \
14416 /usr/X11/share/X11/rgb.txt \
14417 /usr/X11/lib/X11/rgb.txt \
14418 /usr/lib/X11/rgb.txt \
14420 /usr/pkg/lib/X11/rgb.txt \
14421 /usr/X11R7/lib/X11/rgb.txt \
14422 /usr/X11R6/lib/X11/rgb.txt \
14423 /usr/X11R5/lib/X11/rgb.txt \
14424 /usr/X11R4/lib/X11/rgb.txt \
14425 /usr/local/lib/X11/rgb.txt \
14426 /usr/local/share/X11/rgb.txt \
14427 /usr/lib64/X11/rgb.txt
14429 if test -f "$cf_path" ; then
14430 RGB_PATH="$cf_path"
14437 if test "x$prefix" != xNONE; then
14438 cf_path_syntax="$prefix"
14440 cf_path_syntax="$ac_default_prefix"
14443 case ".$cf_path" in
14444 (.\$\(*\)*|.\'*\'*)
14448 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14450 (.\${*prefix}*|.\${*dir}*)
14451 eval cf_path="$cf_path"
14452 case ".$cf_path" in
14454 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
14459 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
14462 { { echo "$as_me:14462: error: expected a pathname, not \"$cf_path\"" >&5
14463 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14464 { (exit 1); exit 1; }; }
14470 echo "$as_me:14470: result: $RGB_PATH" >&5
14471 echo "${ECHO_T}$RGB_PATH" >&6
14473 cat >>confdefs.h <<EOF
14474 #define RGB_PATH "$cf_path"
14478 if test "$RGB_PATH" = no
14485 case $cf_cv_screen in
14487 cf_default_panel=no
14490 cf_default_tinfo=no
14492 (xcurses|bsdcurses)
14493 cf_default_panel=no
14496 cf_default_tinfo=yes
14499 cf_default_panel=yes
14500 cf_default_form=yes
14501 cf_default_menu=yes
14502 cf_default_tinfo=yes
14503 case $cf_cv_screen in
14505 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
14511 echo "$as_me:14511: checking if you want to check for panel functions" >&5
14512 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
14514 # Check whether --enable-panel or --disable-panel was given.
14515 if test "${enable_panel+set}" = set; then
14516 enableval="$enable_panel"
14517 test "$enableval" != no && enableval=yes
14518 if test "$enableval" != "yes" ; then
14521 cf_enable_panel=$cf_default_panel
14525 cf_enable_panel=$cf_default_panel
14528 echo "$as_me:14528: result: $cf_enable_panel" >&5
14529 echo "${ECHO_T}$cf_enable_panel" >&6
14530 if test $cf_enable_panel = yes
14533 cf_have_curses_lib=no
14535 : ${NCURSES_CONFIG_PKG:=none}
14536 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
14538 elif test "x${PKG_CONFIG:=none}" != xnone; then
14539 echo "$as_me:14539: checking pkg-config for panel$cf_cv_libtype" >&5
14540 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
14541 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
14542 echo "$as_me:14542: result: yes" >&5
14543 echo "${ECHO_T}yes" >&6
14545 echo "$as_me:14545: checking if the panel$cf_cv_libtype package files work" >&5
14546 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
14548 cf_save_CPPFLAGS="$CPPFLAGS"
14549 cf_save_LIBS="$LIBS"
14554 cf_new_extra_cppflags=
14556 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
14558 case $cf_fix_cppflags in
14560 case $cf_add_cflags in
14561 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14562 case $cf_add_cflags in
14564 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14566 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14567 && test -z "${cf_tst_cflags}" \
14568 && cf_fix_cppflags=yes
14570 if test $cf_fix_cppflags = yes ; then
14572 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14573 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14576 elif test "${cf_tst_cflags}" = "\"'" ; then
14578 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14579 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14585 case "$CPPFLAGS" in
14589 case $cf_add_cflags in
14591 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14593 CPPFLAGS=`echo "$CPPFLAGS" | \
14594 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14595 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14600 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14601 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14608 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14609 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14619 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14622 && test -z "${cf_tst_cflags}" \
14623 && cf_fix_cppflags=no
14628 if test -n "$cf_new_cflags" ; then
14630 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14631 CFLAGS="${CFLAGS}$cf_new_cflags"
14635 if test -n "$cf_new_cppflags" ; then
14637 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14638 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14642 if test -n "$cf_new_extra_cppflags" ; then
14644 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14645 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14649 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
14650 # Filter out duplicates - this happens with badly-designed ".pc" files...
14651 for cf_add_1lib in $LIBS
14653 for cf_add_2lib in $cf_add_libs
14655 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14661 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14663 LIBS="$cf_add_libs"
14665 cat >conftest.$ac_ext <<_ACEOF
14666 #line 14666 "configure"
14667 #include "confdefs.h"
14672 (void) new_panel ( 0 );
14677 rm -f conftest.$ac_objext conftest$ac_exeext
14678 if { (eval echo "$as_me:14678: \"$ac_link\"") >&5
14679 (eval $ac_link) 2>&5
14681 echo "$as_me:14681: \$? = $ac_status" >&5
14682 (exit $ac_status); } &&
14683 { ac_try='test -s conftest$ac_exeext'
14684 { (eval echo "$as_me:14684: \"$ac_try\"") >&5
14685 (eval $ac_try) 2>&5
14687 echo "$as_me:14687: \$? = $ac_status" >&5
14688 (exit $ac_status); }; }; then
14689 if test "$cross_compiling" = yes; then
14690 cf_have_curses_lib=maybe
14692 cat >conftest.$ac_ext <<_ACEOF
14693 #line 14693 "configure"
14694 #include "confdefs.h"
14697 { (void) new_panel ( 0 ); return 0; }
14699 rm -f conftest$ac_exeext
14700 if { (eval echo "$as_me:14700: \"$ac_link\"") >&5
14701 (eval $ac_link) 2>&5
14703 echo "$as_me:14703: \$? = $ac_status" >&5
14704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14705 { (eval echo "$as_me:14705: \"$ac_try\"") >&5
14706 (eval $ac_try) 2>&5
14708 echo "$as_me:14708: \$? = $ac_status" >&5
14709 (exit $ac_status); }; }; then
14710 cf_have_curses_lib=yes
14712 echo "$as_me: program exited with status $ac_status" >&5
14713 echo "$as_me: failed program was:" >&5
14714 cat conftest.$ac_ext >&5
14715 cf_have_curses_lib=no
14717 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14720 echo "$as_me: failed program was:" >&5
14721 cat conftest.$ac_ext >&5
14722 cf_have_curses_lib=no
14724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14725 echo "$as_me:14725: result: $cf_have_curses_lib" >&5
14726 echo "${ECHO_T}$cf_have_curses_lib" >&6
14727 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
14728 if test "$cf_have_curses_lib" != "yes"
14730 CPPFLAGS="$cf_save_CPPFLAGS"
14731 LIBS="$cf_save_LIBS"
14734 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14736 cat >>confdefs.h <<EOF
14737 #define $cf_upper 1
14743 if test "$cf_have_curses_lib" = no; then
14744 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
14745 echo "$as_me:14745: checking for new_panel in -lpanel$cf_cv_libtype" >&5
14746 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
14747 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
14750 ac_check_lib_save_LIBS=$LIBS
14751 LIBS="-lpanel$cf_cv_libtype $LIBS"
14752 cat >conftest.$ac_ext <<_ACEOF
14753 #line 14753 "configure"
14754 #include "confdefs.h"
14756 /* Override any gcc2 internal prototype to avoid an error. */
14760 /* We use char because int might match the return type of a gcc2
14761 builtin and then its argument prototype would still apply. */
14771 rm -f conftest.$ac_objext conftest$ac_exeext
14772 if { (eval echo "$as_me:14772: \"$ac_link\"") >&5
14773 (eval $ac_link) 2>&5
14775 echo "$as_me:14775: \$? = $ac_status" >&5
14776 (exit $ac_status); } &&
14777 { ac_try='test -s conftest$ac_exeext'
14778 { (eval echo "$as_me:14778: \"$ac_try\"") >&5
14779 (eval $ac_try) 2>&5
14781 echo "$as_me:14781: \$? = $ac_status" >&5
14782 (exit $ac_status); }; }; then
14783 eval "$as_ac_Lib=yes"
14785 echo "$as_me: failed program was:" >&5
14786 cat conftest.$ac_ext >&5
14787 eval "$as_ac_Lib=no"
14789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14790 LIBS=$ac_check_lib_save_LIBS
14792 echo "$as_me:14792: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14793 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14794 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14796 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14798 cf_add_libs="-lpanel$cf_cv_libtype"
14799 # Filter out duplicates - this happens with badly-designed ".pc" files...
14800 for cf_add_1lib in $LIBS
14802 for cf_add_2lib in $cf_add_libs
14804 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14810 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14812 LIBS="$cf_add_libs"
14814 cat >>confdefs.h <<EOF
14815 #define $cf_upper 1
14822 cf_curses_headers="$cf_curses_headers panel.h"
14825 echo "$as_me:14825: checking if you want to check for menu functions" >&5
14826 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
14828 # Check whether --enable-menu or --disable-menu was given.
14829 if test "${enable_menu+set}" = set; then
14830 enableval="$enable_menu"
14831 test "$enableval" != no && enableval=yes
14832 if test "$enableval" != "yes" ; then
14835 cf_enable_menu=$cf_default_menu
14839 cf_enable_menu=$cf_default_menu
14842 echo "$as_me:14842: result: $cf_enable_menu" >&5
14843 echo "${ECHO_T}$cf_enable_menu" >&6
14844 if test $cf_enable_menu = yes
14846 case $cf_cv_screen in
14851 echo "$as_me:14851: checking for NetBSD menu.h" >&5
14852 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
14853 if test "${cf_cv_netbsd_menu_h+set}" = set; then
14854 echo $ECHO_N "(cached) $ECHO_C" >&6
14857 cat >conftest.$ac_ext <<_ACEOF
14858 #line 14858 "configure"
14859 #include "confdefs.h"
14861 #include <${cf_cv_ncurses_header:-curses.h}>
14869 int y = menu->max_item_width;
14875 rm -f conftest.$ac_objext
14876 if { (eval echo "$as_me:14876: \"$ac_compile\"") >&5
14877 (eval $ac_compile) 2>&5
14879 echo "$as_me:14879: \$? = $ac_status" >&5
14880 (exit $ac_status); } &&
14881 { ac_try='test -s conftest.$ac_objext'
14882 { (eval echo "$as_me:14882: \"$ac_try\"") >&5
14883 (eval $ac_try) 2>&5
14885 echo "$as_me:14885: \$? = $ac_status" >&5
14886 (exit $ac_status); }; }; then
14887 cf_cv_netbsd_menu_h=yes
14890 echo "$as_me: failed program was:" >&5
14891 cat conftest.$ac_ext >&5
14892 cf_cv_netbsd_menu_h=no
14894 rm -f conftest.$ac_objext conftest.$ac_ext
14897 echo "$as_me:14897: result: $cf_cv_netbsd_menu_h" >&5
14898 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
14900 test "$cf_cv_netbsd_menu_h" = yes &&
14901 cat >>confdefs.h <<\EOF
14902 #define HAVE_NETBSD_MENU_H 1
14908 cf_have_curses_lib=no
14910 : ${NCURSES_CONFIG_PKG:=none}
14911 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
14913 elif test "x${PKG_CONFIG:=none}" != xnone; then
14914 echo "$as_me:14914: checking pkg-config for menu$cf_cv_libtype" >&5
14915 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
14916 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
14917 echo "$as_me:14917: result: yes" >&5
14918 echo "${ECHO_T}yes" >&6
14920 echo "$as_me:14920: checking if the menu$cf_cv_libtype package files work" >&5
14921 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
14923 cf_save_CPPFLAGS="$CPPFLAGS"
14924 cf_save_LIBS="$LIBS"
14929 cf_new_extra_cppflags=
14931 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
14933 case $cf_fix_cppflags in
14935 case $cf_add_cflags in
14936 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14937 case $cf_add_cflags in
14939 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14942 && test -z "${cf_tst_cflags}" \
14943 && cf_fix_cppflags=yes
14945 if test $cf_fix_cppflags = yes ; then
14947 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14948 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14951 elif test "${cf_tst_cflags}" = "\"'" ; then
14953 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14954 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14960 case "$CPPFLAGS" in
14964 case $cf_add_cflags in
14966 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14968 CPPFLAGS=`echo "$CPPFLAGS" | \
14969 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14970 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14975 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14976 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14983 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14984 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14991 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14992 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14994 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14996 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14997 && test -z "${cf_tst_cflags}" \
14998 && cf_fix_cppflags=no
15003 if test -n "$cf_new_cflags" ; then
15005 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15006 CFLAGS="${CFLAGS}$cf_new_cflags"
15010 if test -n "$cf_new_cppflags" ; then
15012 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15013 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15017 if test -n "$cf_new_extra_cppflags" ; then
15019 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15020 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15024 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
15025 # Filter out duplicates - this happens with badly-designed ".pc" files...
15026 for cf_add_1lib in $LIBS
15028 for cf_add_2lib in $cf_add_libs
15030 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15036 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15038 LIBS="$cf_add_libs"
15040 cat >conftest.$ac_ext <<_ACEOF
15041 #line 15041 "configure"
15042 #include "confdefs.h"
15047 (void) menu_driver ( 0,0 );
15052 rm -f conftest.$ac_objext conftest$ac_exeext
15053 if { (eval echo "$as_me:15053: \"$ac_link\"") >&5
15054 (eval $ac_link) 2>&5
15056 echo "$as_me:15056: \$? = $ac_status" >&5
15057 (exit $ac_status); } &&
15058 { ac_try='test -s conftest$ac_exeext'
15059 { (eval echo "$as_me:15059: \"$ac_try\"") >&5
15060 (eval $ac_try) 2>&5
15062 echo "$as_me:15062: \$? = $ac_status" >&5
15063 (exit $ac_status); }; }; then
15064 if test "$cross_compiling" = yes; then
15065 cf_have_curses_lib=maybe
15067 cat >conftest.$ac_ext <<_ACEOF
15068 #line 15068 "configure"
15069 #include "confdefs.h"
15072 { (void) menu_driver ( 0,0 ); return 0; }
15074 rm -f 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); } && { ac_try='./conftest$ac_exeext'
15080 { (eval echo "$as_me:15080: \"$ac_try\"") >&5
15081 (eval $ac_try) 2>&5
15083 echo "$as_me:15083: \$? = $ac_status" >&5
15084 (exit $ac_status); }; }; then
15085 cf_have_curses_lib=yes
15087 echo "$as_me: program exited with status $ac_status" >&5
15088 echo "$as_me: failed program was:" >&5
15089 cat conftest.$ac_ext >&5
15090 cf_have_curses_lib=no
15092 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15095 echo "$as_me: failed program was:" >&5
15096 cat conftest.$ac_ext >&5
15097 cf_have_curses_lib=no
15099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15100 echo "$as_me:15100: result: $cf_have_curses_lib" >&5
15101 echo "${ECHO_T}$cf_have_curses_lib" >&6
15102 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15103 if test "$cf_have_curses_lib" != "yes"
15105 CPPFLAGS="$cf_save_CPPFLAGS"
15106 LIBS="$cf_save_LIBS"
15109 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15111 cat >>confdefs.h <<EOF
15112 #define $cf_upper 1
15118 if test "$cf_have_curses_lib" = no; then
15119 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
15120 echo "$as_me:15120: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
15121 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
15122 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15123 echo $ECHO_N "(cached) $ECHO_C" >&6
15125 ac_check_lib_save_LIBS=$LIBS
15126 LIBS="-lmenu$cf_cv_libtype $LIBS"
15127 cat >conftest.$ac_ext <<_ACEOF
15128 #line 15128 "configure"
15129 #include "confdefs.h"
15131 /* Override any gcc2 internal prototype to avoid an error. */
15135 /* We use char because int might match the return type of a gcc2
15136 builtin and then its argument prototype would still apply. */
15137 char menu_driver ();
15146 rm -f conftest.$ac_objext conftest$ac_exeext
15147 if { (eval echo "$as_me:15147: \"$ac_link\"") >&5
15148 (eval $ac_link) 2>&5
15150 echo "$as_me:15150: \$? = $ac_status" >&5
15151 (exit $ac_status); } &&
15152 { ac_try='test -s conftest$ac_exeext'
15153 { (eval echo "$as_me:15153: \"$ac_try\"") >&5
15154 (eval $ac_try) 2>&5
15156 echo "$as_me:15156: \$? = $ac_status" >&5
15157 (exit $ac_status); }; }; then
15158 eval "$as_ac_Lib=yes"
15160 echo "$as_me: failed program was:" >&5
15161 cat conftest.$ac_ext >&5
15162 eval "$as_ac_Lib=no"
15164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15165 LIBS=$ac_check_lib_save_LIBS
15167 echo "$as_me:15167: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15168 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15169 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15171 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15173 cf_add_libs="-lmenu$cf_cv_libtype"
15174 # Filter out duplicates - this happens with badly-designed ".pc" files...
15175 for cf_add_1lib in $LIBS
15177 for cf_add_2lib in $cf_add_libs
15179 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15185 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15187 LIBS="$cf_add_libs"
15189 cat >>confdefs.h <<EOF
15190 #define $cf_upper 1
15197 cf_curses_headers="$cf_curses_headers menu.h"
15200 echo "$as_me:15200: checking if you want to check for form functions" >&5
15201 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
15203 # Check whether --enable-form or --disable-form was given.
15204 if test "${enable_form+set}" = set; then
15205 enableval="$enable_form"
15206 test "$enableval" != no && enableval=yes
15207 if test "$enableval" != "yes" ; then
15210 cf_enable_form=$cf_default_form
15214 cf_enable_form=$cf_default_form
15217 echo "$as_me:15217: result: $cf_enable_form" >&5
15218 echo "${ECHO_T}$cf_enable_form" >&6
15219 if test $cf_enable_form = yes
15221 case $cf_cv_screen in
15226 echo "$as_me:15226: checking for NetBSD form.h" >&5
15227 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
15228 if test "${cf_cv_netbsd_form_h+set}" = set; then
15229 echo $ECHO_N "(cached) $ECHO_C" >&6
15232 cat >conftest.$ac_ext <<_ACEOF
15233 #line 15233 "configure"
15234 #include "confdefs.h"
15236 #include <${cf_cv_ncurses_header:-curses.h}>
15244 int y = current_field(form)->cursor_ypos;
15245 int x = current_field(form)->cursor_xpos;
15251 rm -f conftest.$ac_objext
15252 if { (eval echo "$as_me:15252: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15255 echo "$as_me:15255: \$? = $ac_status" >&5
15256 (exit $ac_status); } &&
15257 { ac_try='test -s conftest.$ac_objext'
15258 { (eval echo "$as_me:15258: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15261 echo "$as_me:15261: \$? = $ac_status" >&5
15262 (exit $ac_status); }; }; then
15263 cf_cv_netbsd_form_h=yes
15266 echo "$as_me: failed program was:" >&5
15267 cat conftest.$ac_ext >&5
15268 cf_cv_netbsd_form_h=no
15270 rm -f conftest.$ac_objext conftest.$ac_ext
15273 echo "$as_me:15273: result: $cf_cv_netbsd_form_h" >&5
15274 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
15276 test "$cf_cv_netbsd_form_h" = yes &&
15277 cat >>confdefs.h <<\EOF
15278 #define HAVE_NETBSD_FORM_H 1
15284 cf_have_curses_lib=no
15286 : ${NCURSES_CONFIG_PKG:=none}
15287 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15289 elif test "x${PKG_CONFIG:=none}" != xnone; then
15290 echo "$as_me:15290: checking pkg-config for form$cf_cv_libtype" >&5
15291 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
15292 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
15293 echo "$as_me:15293: result: yes" >&5
15294 echo "${ECHO_T}yes" >&6
15296 echo "$as_me:15296: checking if the form$cf_cv_libtype package files work" >&5
15297 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
15299 cf_save_CPPFLAGS="$CPPFLAGS"
15300 cf_save_LIBS="$LIBS"
15305 cf_new_extra_cppflags=
15307 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
15309 case $cf_fix_cppflags in
15311 case $cf_add_cflags in
15312 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15313 case $cf_add_cflags in
15315 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15317 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15318 && test -z "${cf_tst_cflags}" \
15319 && cf_fix_cppflags=yes
15321 if test $cf_fix_cppflags = yes ; then
15323 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15324 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15327 elif test "${cf_tst_cflags}" = "\"'" ; then
15329 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15330 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15336 case "$CPPFLAGS" in
15340 case $cf_add_cflags in
15342 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15344 CPPFLAGS=`echo "$CPPFLAGS" | \
15345 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15346 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15351 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15352 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15359 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15360 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15367 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15368 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15370 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15372 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15373 && test -z "${cf_tst_cflags}" \
15374 && cf_fix_cppflags=no
15379 if test -n "$cf_new_cflags" ; then
15381 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15382 CFLAGS="${CFLAGS}$cf_new_cflags"
15386 if test -n "$cf_new_cppflags" ; then
15388 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15389 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15393 if test -n "$cf_new_extra_cppflags" ; then
15395 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15396 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15400 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
15401 # Filter out duplicates - this happens with badly-designed ".pc" files...
15402 for cf_add_1lib in $LIBS
15404 for cf_add_2lib in $cf_add_libs
15406 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15412 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15414 LIBS="$cf_add_libs"
15416 cat >conftest.$ac_ext <<_ACEOF
15417 #line 15417 "configure"
15418 #include "confdefs.h"
15423 (void) form_driver ( 0,0 );
15428 rm -f conftest.$ac_objext conftest$ac_exeext
15429 if { (eval echo "$as_me:15429: \"$ac_link\"") >&5
15430 (eval $ac_link) 2>&5
15432 echo "$as_me:15432: \$? = $ac_status" >&5
15433 (exit $ac_status); } &&
15434 { ac_try='test -s conftest$ac_exeext'
15435 { (eval echo "$as_me:15435: \"$ac_try\"") >&5
15436 (eval $ac_try) 2>&5
15438 echo "$as_me:15438: \$? = $ac_status" >&5
15439 (exit $ac_status); }; }; then
15440 if test "$cross_compiling" = yes; then
15441 cf_have_curses_lib=maybe
15443 cat >conftest.$ac_ext <<_ACEOF
15444 #line 15444 "configure"
15445 #include "confdefs.h"
15448 { (void) form_driver ( 0,0 ); return 0; }
15450 rm -f conftest$ac_exeext
15451 if { (eval echo "$as_me:15451: \"$ac_link\"") >&5
15452 (eval $ac_link) 2>&5
15454 echo "$as_me:15454: \$? = $ac_status" >&5
15455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15456 { (eval echo "$as_me:15456: \"$ac_try\"") >&5
15457 (eval $ac_try) 2>&5
15459 echo "$as_me:15459: \$? = $ac_status" >&5
15460 (exit $ac_status); }; }; then
15461 cf_have_curses_lib=yes
15463 echo "$as_me: program exited with status $ac_status" >&5
15464 echo "$as_me: failed program was:" >&5
15465 cat conftest.$ac_ext >&5
15466 cf_have_curses_lib=no
15468 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15471 echo "$as_me: failed program was:" >&5
15472 cat conftest.$ac_ext >&5
15473 cf_have_curses_lib=no
15475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15476 echo "$as_me:15476: result: $cf_have_curses_lib" >&5
15477 echo "${ECHO_T}$cf_have_curses_lib" >&6
15478 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15479 if test "$cf_have_curses_lib" != "yes"
15481 CPPFLAGS="$cf_save_CPPFLAGS"
15482 LIBS="$cf_save_LIBS"
15485 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15487 cat >>confdefs.h <<EOF
15488 #define $cf_upper 1
15494 if test "$cf_have_curses_lib" = no; then
15495 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
15496 echo "$as_me:15496: checking for form_driver in -lform$cf_cv_libtype" >&5
15497 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
15498 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15499 echo $ECHO_N "(cached) $ECHO_C" >&6
15501 ac_check_lib_save_LIBS=$LIBS
15502 LIBS="-lform$cf_cv_libtype $LIBS"
15503 cat >conftest.$ac_ext <<_ACEOF
15504 #line 15504 "configure"
15505 #include "confdefs.h"
15507 /* Override any gcc2 internal prototype to avoid an error. */
15511 /* We use char because int might match the return type of a gcc2
15512 builtin and then its argument prototype would still apply. */
15513 char form_driver ();
15522 rm -f conftest.$ac_objext conftest$ac_exeext
15523 if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
15524 (eval $ac_link) 2>&5
15526 echo "$as_me:15526: \$? = $ac_status" >&5
15527 (exit $ac_status); } &&
15528 { ac_try='test -s conftest$ac_exeext'
15529 { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530 (eval $ac_try) 2>&5
15532 echo "$as_me:15532: \$? = $ac_status" >&5
15533 (exit $ac_status); }; }; then
15534 eval "$as_ac_Lib=yes"
15536 echo "$as_me: failed program was:" >&5
15537 cat conftest.$ac_ext >&5
15538 eval "$as_ac_Lib=no"
15540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15541 LIBS=$ac_check_lib_save_LIBS
15543 echo "$as_me:15543: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15544 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15545 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15547 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15549 cf_add_libs="-lform$cf_cv_libtype"
15550 # Filter out duplicates - this happens with badly-designed ".pc" files...
15551 for cf_add_1lib in $LIBS
15553 for cf_add_2lib in $cf_add_libs
15555 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15561 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15563 LIBS="$cf_add_libs"
15565 cat >>confdefs.h <<EOF
15566 #define $cf_upper 1
15573 cf_curses_headers="$cf_curses_headers form.h"
15576 # look for curses-related headers
15578 for ac_header in $cf_curses_headers
15580 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15581 echo "$as_me:15581: checking for $ac_header" >&5
15582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15584 echo $ECHO_N "(cached) $ECHO_C" >&6
15586 cat >conftest.$ac_ext <<_ACEOF
15587 #line 15587 "configure"
15588 #include "confdefs.h"
15589 #include <$ac_header>
15591 if { (eval echo "$as_me:15591: \"$ac_cpp conftest.$ac_ext\"") >&5
15592 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15594 egrep -v '^ *\+' conftest.er1 >conftest.err
15596 cat conftest.err >&5
15597 echo "$as_me:15597: \$? = $ac_status" >&5
15598 (exit $ac_status); } >/dev/null; then
15599 if test -s conftest.err; then
15600 ac_cpp_err=$ac_c_preproc_warn_flag
15607 if test -z "$ac_cpp_err"; then
15608 eval "$as_ac_Header=yes"
15610 echo "$as_me: failed program was:" >&5
15611 cat conftest.$ac_ext >&5
15612 eval "$as_ac_Header=no"
15614 rm -f conftest.err conftest.$ac_ext
15616 echo "$as_me:15616: result: `eval echo '${'$as_ac_Header'}'`" >&5
15617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15618 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15619 cat >>confdefs.h <<EOF
15620 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15626 echo "$as_me:15626: checking for ANSI C header files" >&5
15627 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15628 if test "${ac_cv_header_stdc+set}" = set; then
15629 echo $ECHO_N "(cached) $ECHO_C" >&6
15631 cat >conftest.$ac_ext <<_ACEOF
15632 #line 15632 "configure"
15633 #include "confdefs.h"
15634 #include <stdlib.h>
15635 #include <stdarg.h>
15636 #include <string.h>
15640 if { (eval echo "$as_me:15640: \"$ac_cpp conftest.$ac_ext\"") >&5
15641 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15643 egrep -v '^ *\+' conftest.er1 >conftest.err
15645 cat conftest.err >&5
15646 echo "$as_me:15646: \$? = $ac_status" >&5
15647 (exit $ac_status); } >/dev/null; then
15648 if test -s conftest.err; then
15649 ac_cpp_err=$ac_c_preproc_warn_flag
15656 if test -z "$ac_cpp_err"; then
15657 ac_cv_header_stdc=yes
15659 echo "$as_me: failed program was:" >&5
15660 cat conftest.$ac_ext >&5
15661 ac_cv_header_stdc=no
15663 rm -f conftest.err conftest.$ac_ext
15665 if test $ac_cv_header_stdc = yes; then
15666 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15667 cat >conftest.$ac_ext <<_ACEOF
15668 #line 15668 "configure"
15669 #include "confdefs.h"
15670 #include <string.h>
15673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15674 egrep "memchr" >/dev/null 2>&1; then
15677 ac_cv_header_stdc=no
15683 if test $ac_cv_header_stdc = yes; then
15684 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15685 cat >conftest.$ac_ext <<_ACEOF
15686 #line 15686 "configure"
15687 #include "confdefs.h"
15688 #include <stdlib.h>
15691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15692 egrep "free" >/dev/null 2>&1; then
15695 ac_cv_header_stdc=no
15701 if test $ac_cv_header_stdc = yes; then
15702 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15703 if test "$cross_compiling" = yes; then
15706 cat >conftest.$ac_ext <<_ACEOF
15707 #line 15707 "configure"
15708 #include "confdefs.h"
15710 #if ((' ' & 0x0FF) == 0x020)
15711 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15712 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15714 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15715 || ('j' <= (c) && (c) <= 'r') \
15716 || ('s' <= (c) && (c) <= 'z'))
15717 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15720 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15725 for (i = 0; i < 256; i++)
15726 if (XOR (islower (i), ISLOWER (i))
15727 || toupper (i) != TOUPPER (i))
15728 $ac_main_return(2);
15729 $ac_main_return (0);
15732 rm -f conftest$ac_exeext
15733 if { (eval echo "$as_me:15733: \"$ac_link\"") >&5
15734 (eval $ac_link) 2>&5
15736 echo "$as_me:15736: \$? = $ac_status" >&5
15737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15738 { (eval echo "$as_me:15738: \"$ac_try\"") >&5
15739 (eval $ac_try) 2>&5
15741 echo "$as_me:15741: \$? = $ac_status" >&5
15742 (exit $ac_status); }; }; then
15745 echo "$as_me: program exited with status $ac_status" >&5
15746 echo "$as_me: failed program was:" >&5
15747 cat conftest.$ac_ext >&5
15748 ac_cv_header_stdc=no
15750 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15754 echo "$as_me:15754: result: $ac_cv_header_stdc" >&5
15755 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15756 if test $ac_cv_header_stdc = yes; then
15758 cat >>confdefs.h <<\EOF
15759 #define STDC_HEADERS 1
15764 echo "$as_me:15764: checking whether time.h and sys/time.h may both be included" >&5
15765 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15766 if test "${ac_cv_header_time+set}" = set; then
15767 echo $ECHO_N "(cached) $ECHO_C" >&6
15769 cat >conftest.$ac_ext <<_ACEOF
15770 #line 15770 "configure"
15771 #include "confdefs.h"
15772 #include <sys/types.h>
15773 #include <sys/time.h>
15779 if ((struct tm *) 0)
15785 rm -f conftest.$ac_objext
15786 if { (eval echo "$as_me:15786: \"$ac_compile\"") >&5
15787 (eval $ac_compile) 2>&5
15789 echo "$as_me:15789: \$? = $ac_status" >&5
15790 (exit $ac_status); } &&
15791 { ac_try='test -s conftest.$ac_objext'
15792 { (eval echo "$as_me:15792: \"$ac_try\"") >&5
15793 (eval $ac_try) 2>&5
15795 echo "$as_me:15795: \$? = $ac_status" >&5
15796 (exit $ac_status); }; }; then
15797 ac_cv_header_time=yes
15799 echo "$as_me: failed program was:" >&5
15800 cat conftest.$ac_ext >&5
15801 ac_cv_header_time=no
15803 rm -f conftest.$ac_objext conftest.$ac_ext
15805 echo "$as_me:15805: result: $ac_cv_header_time" >&5
15806 echo "${ECHO_T}$ac_cv_header_time" >&6
15807 if test $ac_cv_header_time = yes; then
15809 cat >>confdefs.h <<\EOF
15810 #define TIME_WITH_SYS_TIME 1
15828 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15829 echo "$as_me:15829: checking for $ac_header" >&5
15830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15831 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15832 echo $ECHO_N "(cached) $ECHO_C" >&6
15834 cat >conftest.$ac_ext <<_ACEOF
15835 #line 15835 "configure"
15836 #include "confdefs.h"
15837 #include <$ac_header>
15839 if { (eval echo "$as_me:15839: \"$ac_cpp conftest.$ac_ext\"") >&5
15840 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15842 egrep -v '^ *\+' conftest.er1 >conftest.err
15844 cat conftest.err >&5
15845 echo "$as_me:15845: \$? = $ac_status" >&5
15846 (exit $ac_status); } >/dev/null; then
15847 if test -s conftest.err; then
15848 ac_cpp_err=$ac_c_preproc_warn_flag
15855 if test -z "$ac_cpp_err"; then
15856 eval "$as_ac_Header=yes"
15858 echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 eval "$as_ac_Header=no"
15862 rm -f conftest.err conftest.$ac_ext
15864 echo "$as_me:15864: result: `eval echo '${'$as_ac_Header'}'`" >&5
15865 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15866 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15867 cat >>confdefs.h <<EOF
15868 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15874 for ac_header in unistd.h getopt.h
15876 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15877 echo "$as_me:15877: checking for $ac_header" >&5
15878 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15879 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15880 echo $ECHO_N "(cached) $ECHO_C" >&6
15882 cat >conftest.$ac_ext <<_ACEOF
15883 #line 15883 "configure"
15884 #include "confdefs.h"
15885 #include <$ac_header>
15887 if { (eval echo "$as_me:15887: \"$ac_cpp conftest.$ac_ext\"") >&5
15888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15890 egrep -v '^ *\+' conftest.er1 >conftest.err
15892 cat conftest.err >&5
15893 echo "$as_me:15893: \$? = $ac_status" >&5
15894 (exit $ac_status); } >/dev/null; then
15895 if test -s conftest.err; then
15896 ac_cpp_err=$ac_c_preproc_warn_flag
15903 if test -z "$ac_cpp_err"; then
15904 eval "$as_ac_Header=yes"
15906 echo "$as_me: failed program was:" >&5
15907 cat conftest.$ac_ext >&5
15908 eval "$as_ac_Header=no"
15910 rm -f conftest.err conftest.$ac_ext
15912 echo "$as_me:15912: result: `eval echo '${'$as_ac_Header'}'`" >&5
15913 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15914 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15915 cat >>confdefs.h <<EOF
15916 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15922 echo "$as_me:15922: checking for header declaring getopt variables" >&5
15923 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15924 if test "${cf_cv_getopt_header+set}" = set; then
15925 echo $ECHO_N "(cached) $ECHO_C" >&6
15928 cf_cv_getopt_header=none
15929 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15931 cat >conftest.$ac_ext <<_ACEOF
15932 #line 15932 "configure"
15933 #include "confdefs.h"
15935 #include <$cf_header>
15939 int x = optind; char *y = optarg
15944 rm -f conftest.$ac_objext
15945 if { (eval echo "$as_me:15945: \"$ac_compile\"") >&5
15946 (eval $ac_compile) 2>&5
15948 echo "$as_me:15948: \$? = $ac_status" >&5
15949 (exit $ac_status); } &&
15950 { ac_try='test -s conftest.$ac_objext'
15951 { (eval echo "$as_me:15951: \"$ac_try\"") >&5
15952 (eval $ac_try) 2>&5
15954 echo "$as_me:15954: \$? = $ac_status" >&5
15955 (exit $ac_status); }; }; then
15956 cf_cv_getopt_header=$cf_header
15959 echo "$as_me: failed program was:" >&5
15960 cat conftest.$ac_ext >&5
15962 rm -f conftest.$ac_objext conftest.$ac_ext
15966 echo "$as_me:15966: result: $cf_cv_getopt_header" >&5
15967 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15968 if test $cf_cv_getopt_header != none ; then
15970 cat >>confdefs.h <<\EOF
15971 #define HAVE_GETOPT_HEADER 1
15975 if test $cf_cv_getopt_header = getopt.h ; then
15977 cat >>confdefs.h <<\EOF
15978 #define NEED_GETOPT_H 1
15990 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15991 echo "$as_me:15991: checking for $ac_func" >&5
15992 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15993 if eval "test \"\${$as_ac_var+set}\" = set"; then
15994 echo $ECHO_N "(cached) $ECHO_C" >&6
15996 cat >conftest.$ac_ext <<_ACEOF
15997 #line 15997 "configure"
15998 #include "confdefs.h"
15999 /* System header to define __stub macros and hopefully few prototypes,
16000 which can conflict with char $ac_func (); below. */
16001 #include <assert.h>
16002 /* Override any gcc2 internal prototype to avoid an error. */
16006 /* We use char because int might match the return type of a gcc2
16007 builtin and then its argument prototype would still apply. */
16014 /* The GNU C library defines this for functions which it implements
16015 to always fail with ENOSYS. Some functions are actually named
16016 something starting with __ and the normal name is an alias. */
16017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16020 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16027 rm -f conftest.$ac_objext conftest$ac_exeext
16028 if { (eval echo "$as_me:16028: \"$ac_link\"") >&5
16029 (eval $ac_link) 2>&5
16031 echo "$as_me:16031: \$? = $ac_status" >&5
16032 (exit $ac_status); } &&
16033 { ac_try='test -s conftest$ac_exeext'
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
16039 eval "$as_ac_var=yes"
16041 echo "$as_me: failed program was:" >&5
16042 cat conftest.$ac_ext >&5
16043 eval "$as_ac_var=no"
16045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16047 echo "$as_me:16047: result: `eval echo '${'$as_ac_var'}'`" >&5
16048 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16049 if test `eval echo '${'$as_ac_var'}'` = yes; then
16050 cat >>confdefs.h <<EOF
16051 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16057 # use a compile-check to work with ncurses*-config and subdirectory includes
16058 echo "$as_me:16058: checking if we can use termcap.h" >&5
16059 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
16060 if test "${cf_cv_have_termcap_h+set}" = set; then
16061 echo $ECHO_N "(cached) $ECHO_C" >&6
16064 cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16068 #include <curses.h>
16069 #include <termcap.h>
16079 rm -f conftest.$ac_objext
16080 if { (eval echo "$as_me:16080: \"$ac_compile\"") >&5
16081 (eval $ac_compile) 2>&5
16083 echo "$as_me:16083: \$? = $ac_status" >&5
16084 (exit $ac_status); } &&
16085 { ac_try='test -s conftest.$ac_objext'
16086 { (eval echo "$as_me:16086: \"$ac_try\"") >&5
16087 (eval $ac_try) 2>&5
16089 echo "$as_me:16089: \$? = $ac_status" >&5
16090 (exit $ac_status); }; }; then
16091 cf_cv_have_termcap_h=yes
16093 echo "$as_me: failed program was:" >&5
16094 cat conftest.$ac_ext >&5
16095 cf_cv_have_termcap_h=no
16097 rm -f conftest.$ac_objext conftest.$ac_ext
16099 echo "$as_me:16099: result: $cf_cv_have_termcap_h" >&5
16100 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
16101 test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
16102 #define HAVE_TERMCAP_H 1
16105 if test "x$ac_cv_func_getopt" = xno; then
16106 { { echo "$as_me:16106: error: getopt is required for building programs" >&5
16107 echo "$as_me: error: getopt is required for building programs" >&2;}
16108 { (exit 1); exit 1; }; }
16111 if test "$cf_enable_widec" = yes; then
16124 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16125 echo "$as_me:16125: checking for $ac_func" >&5
16126 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16127 if eval "test \"\${$as_ac_var+set}\" = set"; then
16128 echo $ECHO_N "(cached) $ECHO_C" >&6
16130 cat >conftest.$ac_ext <<_ACEOF
16131 #line 16131 "configure"
16132 #include "confdefs.h"
16133 /* System header to define __stub macros and hopefully few prototypes,
16134 which can conflict with char $ac_func (); below. */
16135 #include <assert.h>
16136 /* Override any gcc2 internal prototype to avoid an error. */
16140 /* We use char because int might match the return type of a gcc2
16141 builtin and then its argument prototype would still apply. */
16148 /* The GNU C library defines this for functions which it implements
16149 to always fail with ENOSYS. Some functions are actually named
16150 something starting with __ and the normal name is an alias. */
16151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16154 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16161 rm -f conftest.$ac_objext conftest$ac_exeext
16162 if { (eval echo "$as_me:16162: \"$ac_link\"") >&5
16163 (eval $ac_link) 2>&5
16165 echo "$as_me:16165: \$? = $ac_status" >&5
16166 (exit $ac_status); } &&
16167 { ac_try='test -s conftest$ac_exeext'
16168 { (eval echo "$as_me:16168: \"$ac_try\"") >&5
16169 (eval $ac_try) 2>&5
16171 echo "$as_me:16171: \$? = $ac_status" >&5
16172 (exit $ac_status); }; }; then
16173 eval "$as_ac_var=yes"
16175 echo "$as_me: failed program was:" >&5
16176 cat conftest.$ac_ext >&5
16177 eval "$as_ac_var=no"
16179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16181 echo "$as_me:16181: result: `eval echo '${'$as_ac_var'}'`" >&5
16182 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16183 if test `eval echo '${'$as_ac_var'}'` = yes; then
16184 cat >>confdefs.h <<EOF
16185 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16193 echo "$as_me:16193: checking definition to turn on extended curses functions" >&5
16194 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
16195 if test "${cf_cv_need_xopen_extension+set}" = set; then
16196 echo $ECHO_N "(cached) $ECHO_C" >&6
16199 cf_cv_need_xopen_extension=unknown
16200 cat >conftest.$ac_ext <<_ACEOF
16201 #line 16201 "configure"
16202 #include "confdefs.h"
16204 #include <stdlib.h>
16205 #include <${cf_cv_ncurses_header:-curses.h}>
16210 #if defined(NCURSES_VERSION_PATCH)
16211 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
16215 #ifdef NCURSES_VERSION
16217 int check2 = curs_set((int)sizeof(check));
16219 long x = winnstr(stdscr, "", 0);
16221 getbegyx(stdscr, y1, x1)
16226 rm -f conftest.$ac_objext conftest$ac_exeext
16227 if { (eval echo "$as_me:16227: \"$ac_link\"") >&5
16228 (eval $ac_link) 2>&5
16230 echo "$as_me:16230: \$? = $ac_status" >&5
16231 (exit $ac_status); } &&
16232 { ac_try='test -s conftest$ac_exeext'
16233 { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234 (eval $ac_try) 2>&5
16236 echo "$as_me:16236: \$? = $ac_status" >&5
16237 (exit $ac_status); }; }; then
16238 cf_cv_need_xopen_extension=none
16240 echo "$as_me: failed program was:" >&5
16241 cat conftest.$ac_ext >&5
16243 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
16245 cat >conftest.$ac_ext <<_ACEOF
16246 #line 16246 "configure"
16247 #include "confdefs.h"
16249 #define $cf_try_xopen_extension 1
16250 #include <stdlib.h>
16251 #include <${cf_cv_ncurses_header:-curses.h}>
16256 #ifdef NCURSES_VERSION
16258 int check2 = curs_set((int)sizeof(check));
16260 long x = winnstr(stdscr, "", 0);
16262 getbegyx(stdscr, y1, x1)
16267 rm -f conftest.$ac_objext conftest$ac_exeext
16268 if { (eval echo "$as_me:16268: \"$ac_link\"") >&5
16269 (eval $ac_link) 2>&5
16271 echo "$as_me:16271: \$? = $ac_status" >&5
16272 (exit $ac_status); } &&
16273 { ac_try='test -s conftest$ac_exeext'
16274 { (eval echo "$as_me:16274: \"$ac_try\"") >&5
16275 (eval $ac_try) 2>&5
16277 echo "$as_me:16277: \$? = $ac_status" >&5
16278 (exit $ac_status); }; }; then
16279 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
16281 echo "$as_me: failed program was:" >&5
16282 cat conftest.$ac_ext >&5
16284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16291 echo "$as_me:16291: result: $cf_cv_need_xopen_extension" >&5
16292 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
16294 case $cf_cv_need_xopen_extension in
16296 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
16300 echo "$as_me:16300: checking for term.h" >&5
16301 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
16302 if test "${cf_cv_term_header+set}" = set; then
16303 echo $ECHO_N "(cached) $ECHO_C" >&6
16306 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
16307 # for <term.h> if we do not find the variant.
16309 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
16311 case ${cf_cv_ncurses_header:-curses.h} in
16313 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
16314 cf_header_list="$cf_header_item $cf_header_list"
16318 for cf_header in $cf_header_list
16320 cat >conftest.$ac_ext <<_ACEOF
16321 #line 16321 "configure"
16322 #include "confdefs.h"
16324 #include <${cf_cv_ncurses_header:-curses.h}>
16325 #include <${cf_header}>
16334 rm -f conftest.$ac_objext
16335 if { (eval echo "$as_me:16335: \"$ac_compile\"") >&5
16336 (eval $ac_compile) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); } &&
16340 { ac_try='test -s conftest.$ac_objext'
16341 { (eval echo "$as_me:16341: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16344 echo "$as_me:16344: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
16346 cf_cv_term_header=$cf_header
16349 echo "$as_me: failed program was:" >&5
16350 cat conftest.$ac_ext >&5
16351 cf_cv_term_header=no
16353 rm -f conftest.$ac_objext conftest.$ac_ext
16356 case $cf_cv_term_header in
16358 # If curses is ncurses, some packagers still mess it up by trying to make
16359 # us use GNU termcap. This handles the most common case.
16360 for cf_header in ncurses/term.h ncursesw/term.h
16362 cat >conftest.$ac_ext <<_ACEOF
16363 #line 16363 "configure"
16364 #include "confdefs.h"
16366 #include <${cf_cv_ncurses_header:-curses.h}>
16367 #ifdef NCURSES_VERSION
16368 #include <${cf_header}>
16380 rm -f conftest.$ac_objext
16381 if { (eval echo "$as_me:16381: \"$ac_compile\"") >&5
16382 (eval $ac_compile) 2>&5
16384 echo "$as_me:16384: \$? = $ac_status" >&5
16385 (exit $ac_status); } &&
16386 { ac_try='test -s conftest.$ac_objext'
16387 { (eval echo "$as_me:16387: \"$ac_try\"") >&5
16388 (eval $ac_try) 2>&5
16390 echo "$as_me:16390: \$? = $ac_status" >&5
16391 (exit $ac_status); }; }; then
16392 cf_cv_term_header=$cf_header
16395 echo "$as_me: failed program was:" >&5
16396 cat conftest.$ac_ext >&5
16397 cf_cv_term_header=no
16399 rm -f conftest.$ac_objext conftest.$ac_ext
16405 echo "$as_me:16405: result: $cf_cv_term_header" >&5
16406 echo "${ECHO_T}$cf_cv_term_header" >&6
16408 case $cf_cv_term_header in
16411 cat >>confdefs.h <<\EOF
16412 #define HAVE_TERM_H 1
16418 cat >>confdefs.h <<\EOF
16419 #define HAVE_NCURSES_TERM_H 1
16425 cat >>confdefs.h <<\EOF
16426 #define HAVE_NCURSESW_TERM_H 1
16432 echo "$as_me:16432: checking for unctrl.h" >&5
16433 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
16434 if test "${cf_cv_unctrl_header+set}" = set; then
16435 echo $ECHO_N "(cached) $ECHO_C" >&6
16438 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
16439 # for <unctrl.h> if we do not find the variant.
16441 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
16443 case ${cf_cv_ncurses_header:-curses.h} in
16445 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
16446 cf_header_list="$cf_header_item $cf_header_list"
16450 for cf_header in $cf_header_list
16452 cat >conftest.$ac_ext <<_ACEOF
16453 #line 16453 "configure"
16454 #include "confdefs.h"
16456 #include <${cf_cv_ncurses_header:-curses.h}>
16457 #include <${cf_header}>
16466 rm -f conftest.$ac_objext
16467 if { (eval echo "$as_me:16467: \"$ac_compile\"") >&5
16468 (eval $ac_compile) 2>&5
16470 echo "$as_me:16470: \$? = $ac_status" >&5
16471 (exit $ac_status); } &&
16472 { ac_try='test -s conftest.$ac_objext'
16473 { (eval echo "$as_me:16473: \"$ac_try\"") >&5
16474 (eval $ac_try) 2>&5
16476 echo "$as_me:16476: \$? = $ac_status" >&5
16477 (exit $ac_status); }; }; then
16478 cf_cv_unctrl_header=$cf_header
16481 echo "$as_me: failed program was:" >&5
16482 cat conftest.$ac_ext >&5
16483 cf_cv_unctrl_header=no
16485 rm -f conftest.$ac_objext conftest.$ac_ext
16489 echo "$as_me:16489: result: $cf_cv_unctrl_header" >&5
16490 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
16492 case $cf_cv_unctrl_header in
16494 { echo "$as_me:16494: WARNING: unctrl.h header not found" >&5
16495 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
16499 case $cf_cv_unctrl_header in
16502 cat >>confdefs.h <<\EOF
16503 #define HAVE_UNCTRL_H 1
16509 cat >>confdefs.h <<\EOF
16510 #define HAVE_NCURSES_UNCTRL_H 1
16514 (ncursesw/unctrl.h)
16516 cat >>confdefs.h <<\EOF
16517 #define HAVE_NCURSESW_UNCTRL_H 1
16525 assume_default_colors \
16540 init_extended_color \
16548 reset_color_pairs \
16563 use_default_colors \
16565 use_extended_names \
16581 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16583 echo "$as_me:16583: checking for ${cf_func}" >&5
16584 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
16586 echo "${as_me:-configure}:16586: testing ${cf_func} ..." 1>&5
16588 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
16589 echo $ECHO_N "(cached) $ECHO_C" >&6
16592 eval cf_result='$ac_cv_func_'$cf_func
16593 if test ".$cf_result" != ".no"; then
16594 cat >conftest.$ac_ext <<_ACEOF
16595 #line 16595 "configure"
16596 #include "confdefs.h"
16598 #ifdef HAVE_XCURSES
16599 #include <xcurses.h>
16600 char * XCursesProgramName = "test";
16602 #include <${cf_cv_ncurses_header:-curses.h}>
16603 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16604 #include <ncursesw/term.h>
16605 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16606 #include <ncurses/term.h>
16607 #elif defined(HAVE_TERM_H)
16617 long foo = (long)(&${cf_func});
16618 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
16619 if (foo + 1234L > 5678L)
16620 ${cf_cv_main_return:-return}(foo != 0);
16627 rm -f conftest.$ac_objext conftest$ac_exeext
16628 if { (eval echo "$as_me:16628: \"$ac_link\"") >&5
16629 (eval $ac_link) 2>&5
16631 echo "$as_me:16631: \$? = $ac_status" >&5
16632 (exit $ac_status); } &&
16633 { ac_try='test -s conftest$ac_exeext'
16634 { (eval echo "$as_me:16634: \"$ac_try\"") >&5
16635 (eval $ac_try) 2>&5
16637 echo "$as_me:16637: \$? = $ac_status" >&5
16638 (exit $ac_status); }; }; then
16641 echo "$as_me: failed program was:" >&5
16642 cat conftest.$ac_ext >&5
16645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16647 eval 'cf_cv_func_'$cf_func'=$cf_result'
16651 # use the computed/retrieved cache-value:
16652 eval 'cf_result=$cf_cv_func_'$cf_func
16653 echo "$as_me:16653: result: $cf_result" >&5
16654 echo "${ECHO_T}$cf_result" >&6
16655 if test $cf_result != no; then
16656 cat >>confdefs.h <<EOF
16657 #define HAVE_${cf_tr_func} 1
16663 for cf_func in tputs
16666 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16668 echo "$as_me:16668: checking for ${cf_func}" >&5
16669 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
16671 echo "${as_me:-configure}:16671: testing ${cf_func} ..." 1>&5
16673 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
16674 echo $ECHO_N "(cached) $ECHO_C" >&6
16677 eval cf_result='$ac_cv_func_'$cf_func
16678 if test ".$cf_result" != ".no"; then
16679 cat >conftest.$ac_ext <<_ACEOF
16680 #line 16680 "configure"
16681 #include "confdefs.h"
16683 #ifdef HAVE_XCURSES
16684 #include <xcurses.h>
16685 char * XCursesProgramName = "test";
16687 #include <${cf_cv_ncurses_header:-curses.h}>
16688 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16689 #include <ncursesw/term.h>
16690 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16691 #include <ncurses/term.h>
16692 #elif defined(HAVE_TERM_H)
16702 long foo = (long)(&${cf_func});
16703 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
16704 if (foo + 1234L > 5678L)
16705 ${cf_cv_main_return:-return}(foo != 0);
16712 rm -f conftest.$ac_objext conftest$ac_exeext
16713 if { (eval echo "$as_me:16713: \"$ac_link\"") >&5
16714 (eval $ac_link) 2>&5
16716 echo "$as_me:16716: \$? = $ac_status" >&5
16717 (exit $ac_status); } &&
16718 { ac_try='test -s conftest$ac_exeext'
16719 { (eval echo "$as_me:16719: \"$ac_try\"") >&5
16720 (eval $ac_try) 2>&5
16722 echo "$as_me:16722: \$? = $ac_status" >&5
16723 (exit $ac_status); }; }; then
16726 echo "$as_me: failed program was:" >&5
16727 cat conftest.$ac_ext >&5
16730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16732 eval 'cf_cv_func_'$cf_func'=$cf_result'
16736 # use the computed/retrieved cache-value:
16737 eval 'cf_result=$cf_cv_func_'$cf_func
16738 echo "$as_me:16738: result: $cf_result" >&5
16739 echo "${ECHO_T}$cf_result" >&6
16740 if test $cf_result != no; then
16741 cat >>confdefs.h <<EOF
16742 #define HAVE_${cf_tr_func} 1
16748 if test x$cf_cv_func_tputs = xyes
16751 for cf_arg in int char
16753 for cf_ret in int void
16755 if test $cf_ret = void
16757 cf_return="/* nothing */"
16759 cf_return="return value"
16761 cat >conftest.$ac_ext <<_ACEOF
16762 #line 16762 "configure"
16763 #include "confdefs.h"
16765 #include <${cf_cv_ncurses_header:-curses.h}>
16766 #include <$cf_cv_term_header>
16768 static $cf_ret outc($cf_arg value) { $cf_return; }
16774 tputs("hello", 0, outc);
16775 ${cf_cv_main_return:-return}(0);
16781 rm -f conftest.$ac_objext
16782 if { (eval echo "$as_me:16782: \"$ac_compile\"") >&5
16783 (eval $ac_compile) 2>&5
16785 echo "$as_me:16785: \$? = $ac_status" >&5
16786 (exit $ac_status); } &&
16787 { ac_try='test -s conftest.$ac_objext'
16788 { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789 (eval $ac_try) 2>&5
16791 echo "$as_me:16791: \$? = $ac_status" >&5
16792 (exit $ac_status); }; }; then
16794 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
16796 echo "${as_me:-configure}:16796: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
16798 cat >>confdefs.h <<EOF
16799 #define TPUTS_ARG $cf_arg
16800 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
16801 #define TPUTS_RETURN(value) $cf_return
16807 echo "$as_me: failed program was:" >&5
16808 cat conftest.$ac_ext >&5
16810 rm -f conftest.$ac_objext conftest.$ac_ext
16812 test $cf_done = yes && break
16816 echo "$as_me:16816: checking for ncurses extended functions" >&5
16817 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
16818 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
16819 echo $ECHO_N "(cached) $ECHO_C" >&6
16822 cat >conftest.$ac_ext <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16826 #include <${cf_cv_ncurses_header:-curses.h}>
16831 int x = NCURSES_EXT_FUNCS
16837 rm -f conftest.$ac_objext
16838 if { (eval echo "$as_me:16838: \"$ac_compile\"") >&5
16839 (eval $ac_compile) 2>&5
16841 echo "$as_me:16841: \$? = $ac_status" >&5
16842 (exit $ac_status); } &&
16843 { ac_try='test -s conftest.$ac_objext'
16844 { (eval echo "$as_me:16844: \"$ac_try\"") >&5
16845 (eval $ac_try) 2>&5
16847 echo "$as_me:16847: \$? = $ac_status" >&5
16848 (exit $ac_status); }; }; then
16849 cf_cv_ncurses_ext_funcs=defined
16851 echo "$as_me: failed program was:" >&5
16852 cat conftest.$ac_ext >&5
16854 cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16858 #include <${cf_cv_ncurses_header:-curses.h}>
16863 (void) assume_default_colors (0, 0);
16864 (void) curses_version ();
16865 (void) define_key (0, 0);
16866 (void) is_term_resized (0, 0);
16867 (void) key_defined (0);
16868 (void) keybound (0, 0);
16869 (void) keyok (0, 0);
16870 (void) resize_term (0, 0);
16871 (void) resizeterm (0, 0);
16872 (void) use_default_colors ();
16873 (void) use_extended_names (0);
16874 (void) wresize (0, 0, 0);
16879 rm -f conftest.$ac_objext conftest$ac_exeext
16880 if { (eval echo "$as_me:16880: \"$ac_link\"") >&5
16881 (eval $ac_link) 2>&5
16883 echo "$as_me:16883: \$? = $ac_status" >&5
16884 (exit $ac_status); } &&
16885 { ac_try='test -s conftest$ac_exeext'
16886 { (eval echo "$as_me:16886: \"$ac_try\"") >&5
16887 (eval $ac_try) 2>&5
16889 echo "$as_me:16889: \$? = $ac_status" >&5
16890 (exit $ac_status); }; }; then
16891 cf_cv_ncurses_ext_funcs=yes
16893 echo "$as_me: failed program was:" >&5
16894 cat conftest.$ac_ext >&5
16895 cf_cv_ncurses_ext_funcs=no
16897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16900 rm -f conftest.$ac_objext conftest.$ac_ext
16903 echo "$as_me:16903: result: $cf_cv_ncurses_ext_funcs" >&5
16904 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
16905 test "$cf_cv_ncurses_ext_funcs" = yes &&
16906 cat >>confdefs.h <<\EOF
16907 #define NCURSES_EXT_FUNCS 1
16910 if test "$cf_enable_widec" = yes
16912 # workaround for systems with ncurses before 20111029, due to change of
16913 # feature test macro from _XPG5 to _XOPEN_SOURCE
16914 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
16917 echo "$as_me:16917: checking if _XPG5 should be defined to enable wide-characters" >&5
16918 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
16920 cat >conftest.$ac_ext <<_ACEOF
16921 #line 16921 "configure"
16922 #include "confdefs.h"
16924 #include <${cf_cv_ncurses_header:-curses.h}>
16933 rm -f conftest.$ac_objext
16934 if { (eval echo "$as_me:16934: \"$ac_compile\"") >&5
16935 (eval $ac_compile) 2>&5
16937 echo "$as_me:16937: \$? = $ac_status" >&5
16938 (exit $ac_status); } &&
16939 { ac_try='test -s conftest.$ac_objext'
16940 { (eval echo "$as_me:16940: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16943 echo "$as_me:16943: \$? = $ac_status" >&5
16944 (exit $ac_status); }; }; then
16947 echo "$as_me: failed program was:" >&5
16948 cat conftest.$ac_ext >&5
16949 cf_save_cppflags="$CPPFLAGS"
16950 CPPFLAGS="$CPPFLAGS -D_XPG5"
16951 cat >conftest.$ac_ext <<_ACEOF
16952 #line 16952 "configure"
16953 #include "confdefs.h"
16955 #include <${cf_cv_ncurses_header:-curses.h}>
16964 rm -f conftest.$ac_objext
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); } &&
16970 { ac_try='test -s conftest.$ac_objext'
16971 { (eval echo "$as_me:16971: \"$ac_try\"") >&5
16972 (eval $ac_try) 2>&5
16974 echo "$as_me:16974: \$? = $ac_status" >&5
16975 (exit $ac_status); }; }; then
16978 echo "$as_me: failed program was:" >&5
16979 cat conftest.$ac_ext >&5
16981 rm -f conftest.$ac_objext conftest.$ac_ext
16982 CPPFLAGS="$cf_save_cppflags"
16984 rm -f conftest.$ac_objext conftest.$ac_ext
16985 echo "$as_me:16985: result: $cf_define_xpg5" >&5
16986 echo "${ECHO_T}$cf_define_xpg5" >&6
16988 if test "$cf_define_xpg5" = yes
16990 CPPFLAGS="$CPPFLAGS -D_XPG5"
16994 echo "$as_me:16994: checking for wide-character functions" >&5
16995 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
16996 if test "${cf_cv_widechar_funcs+set}" = set; then
16997 echo $ECHO_N "(cached) $ECHO_C" >&6
17000 cat >conftest.$ac_ext <<_ACEOF
17001 #line 17001 "configure"
17002 #include "confdefs.h"
17004 #include <${cf_cv_ncurses_header:-curses.h}>
17009 static wchar_t src_wchar[2];
17010 static cchar_t dst_cchar;
17011 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
17017 rm -f conftest.$ac_objext conftest$ac_exeext
17018 if { (eval echo "$as_me:17018: \"$ac_link\"") >&5
17019 (eval $ac_link) 2>&5
17021 echo "$as_me:17021: \$? = $ac_status" >&5
17022 (exit $ac_status); } &&
17023 { ac_try='test -s conftest$ac_exeext'
17024 { (eval echo "$as_me:17024: \"$ac_try\"") >&5
17025 (eval $ac_try) 2>&5
17027 echo "$as_me:17027: \$? = $ac_status" >&5
17028 (exit $ac_status); }; }; then
17029 cf_cv_widechar_funcs=yes
17031 echo "$as_me: failed program was:" >&5
17032 cat conftest.$ac_ext >&5
17033 cf_cv_widechar_funcs=no
17035 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17038 echo "$as_me:17038: result: $cf_cv_widechar_funcs" >&5
17039 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
17040 if test "$cf_cv_widechar_funcs" != no ; then
17042 cat >>confdefs.h <<\EOF
17043 #define USE_WIDEC_SUPPORT 1
17047 cat >>confdefs.h <<\EOF
17048 #define USE_WIDEC_SUPPORT 0
17053 cat >>confdefs.h <<\EOF
17054 #define USE_WIDEC_SUPPORT 0
17059 echo "$as_me:17059: checking if $cf_cv_screen library uses pthreads" >&5
17060 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
17061 if test "${cf_cv_use_pthreads+set}" = set; then
17062 echo $ECHO_N "(cached) $ECHO_C" >&6
17065 cat >conftest.$ac_ext <<_ACEOF
17066 #line 17066 "configure"
17067 #include "confdefs.h"
17069 #include <${cf_cv_ncurses_header:-curses.h}>
17070 extern void _nc_init_pthreads(void);
17077 _nc_init_pthreads();
17083 rm -f conftest.$ac_objext conftest$ac_exeext
17084 if { (eval echo "$as_me:17084: \"$ac_link\"") >&5
17085 (eval $ac_link) 2>&5
17087 echo "$as_me:17087: \$? = $ac_status" >&5
17088 (exit $ac_status); } &&
17089 { ac_try='test -s conftest$ac_exeext'
17090 { (eval echo "$as_me:17090: \"$ac_try\"") >&5
17091 (eval $ac_try) 2>&5
17093 echo "$as_me:17093: \$? = $ac_status" >&5
17094 (exit $ac_status); }; }; then
17095 cf_cv_use_pthreads=yes
17097 echo "$as_me: failed program was:" >&5
17098 cat conftest.$ac_ext >&5
17099 cf_cv_use_pthreads=no
17101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17104 echo "$as_me:17104: result: $cf_cv_use_pthreads" >&5
17105 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
17106 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
17107 #define USE_PTHREADS 1
17110 echo "$as_me:17110: checking if sys/time.h works with sys/select.h" >&5
17111 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17112 if test "${cf_cv_sys_time_select+set}" = set; then
17113 echo $ECHO_N "(cached) $ECHO_C" >&6
17116 cat >conftest.$ac_ext <<_ACEOF
17117 #line 17117 "configure"
17118 #include "confdefs.h"
17120 #include <sys/types.h>
17121 #ifdef HAVE_SYS_TIME_H
17122 #include <sys/time.h>
17124 #ifdef HAVE_SYS_SELECT_H
17125 #include <sys/select.h>
17136 rm -f conftest.$ac_objext
17137 if { (eval echo "$as_me:17137: \"$ac_compile\"") >&5
17138 (eval $ac_compile) 2>&5
17140 echo "$as_me:17140: \$? = $ac_status" >&5
17141 (exit $ac_status); } &&
17142 { ac_try='test -s conftest.$ac_objext'
17143 { (eval echo "$as_me:17143: \"$ac_try\"") >&5
17144 (eval $ac_try) 2>&5
17146 echo "$as_me:17146: \$? = $ac_status" >&5
17147 (exit $ac_status); }; }; then
17148 cf_cv_sys_time_select=yes
17150 echo "$as_me: failed program was:" >&5
17151 cat conftest.$ac_ext >&5
17152 cf_cv_sys_time_select=no
17154 rm -f conftest.$ac_objext conftest.$ac_ext
17158 echo "$as_me:17158: result: $cf_cv_sys_time_select" >&5
17159 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17160 test "$cf_cv_sys_time_select" = yes &&
17161 cat >>confdefs.h <<\EOF
17162 #define HAVE_SYS_TIME_SELECT 1
17165 # special check for test/ditto.c
17167 echo "$as_me:17167: checking for openpty in -lutil" >&5
17168 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17169 if test "${ac_cv_lib_util_openpty+set}" = set; then
17170 echo $ECHO_N "(cached) $ECHO_C" >&6
17172 ac_check_lib_save_LIBS=$LIBS
17173 LIBS="-lutil $LIBS"
17174 cat >conftest.$ac_ext <<_ACEOF
17175 #line 17175 "configure"
17176 #include "confdefs.h"
17178 /* Override any gcc2 internal prototype to avoid an error. */
17182 /* We use char because int might match the return type of a gcc2
17183 builtin and then its argument prototype would still apply. */
17193 rm -f conftest.$ac_objext conftest$ac_exeext
17194 if { (eval echo "$as_me:17194: \"$ac_link\"") >&5
17195 (eval $ac_link) 2>&5
17197 echo "$as_me:17197: \$? = $ac_status" >&5
17198 (exit $ac_status); } &&
17199 { ac_try='test -s conftest$ac_exeext'
17200 { (eval echo "$as_me:17200: \"$ac_try\"") >&5
17201 (eval $ac_try) 2>&5
17203 echo "$as_me:17203: \$? = $ac_status" >&5
17204 (exit $ac_status); }; }; then
17205 ac_cv_lib_util_openpty=yes
17207 echo "$as_me: failed program was:" >&5
17208 cat conftest.$ac_ext >&5
17209 ac_cv_lib_util_openpty=no
17211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17212 LIBS=$ac_check_lib_save_LIBS
17214 echo "$as_me:17214: result: $ac_cv_lib_util_openpty" >&5
17215 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17216 if test $ac_cv_lib_util_openpty = yes; then
17222 echo "$as_me:17222: checking for openpty header" >&5
17223 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17224 if test "${cf_cv_func_openpty+set}" = set; then
17225 echo $ECHO_N "(cached) $ECHO_C" >&6
17228 cf_save_LIBS="$LIBS"
17229 test $cf_cv_lib_util = yes && {
17230 cf_add_libs="-lutil"
17231 # Filter out duplicates - this happens with badly-designed ".pc" files...
17232 for cf_add_1lib in $LIBS
17234 for cf_add_2lib in $cf_add_libs
17236 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17242 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17244 LIBS="$cf_add_libs"
17246 for cf_header in pty.h libutil.h util.h
17248 cat >conftest.$ac_ext <<_ACEOF
17249 #line 17249 "configure"
17250 #include "confdefs.h"
17252 #include <$cf_header>
17258 int x = openpty((int *)0, (int *)0, (char *)0,
17259 (struct termios *)0, (struct winsize *)0);
17265 rm -f conftest.$ac_objext conftest$ac_exeext
17266 if { (eval echo "$as_me:17266: \"$ac_link\"") >&5
17267 (eval $ac_link) 2>&5
17269 echo "$as_me:17269: \$? = $ac_status" >&5
17270 (exit $ac_status); } &&
17271 { ac_try='test -s conftest$ac_exeext'
17272 { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273 (eval $ac_try) 2>&5
17275 echo "$as_me:17275: \$? = $ac_status" >&5
17276 (exit $ac_status); }; }; then
17278 cf_cv_func_openpty=$cf_header
17282 echo "$as_me: failed program was:" >&5
17283 cat conftest.$ac_ext >&5
17285 cf_cv_func_openpty=no
17288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17290 LIBS="$cf_save_LIBS"
17293 echo "$as_me:17293: result: $cf_cv_func_openpty" >&5
17294 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17296 if test "$cf_cv_func_openpty" != no ; then
17298 cat >>confdefs.h <<EOF
17299 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17302 cat >>confdefs.h <<\EOF
17303 #define USE_XTERM_PTY 1
17306 if test "x$cf_cv_lib_util" = xyes ; then
17308 cf_add_libs="-lutil"
17309 # Filter out duplicates - this happens with badly-designed ".pc" files...
17310 for cf_add_1lib in $TEST_LIBS
17312 for cf_add_2lib in $cf_add_libs
17314 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17320 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17322 TEST_LIBS="$cf_add_libs"
17327 echo "$as_me:17327: checking for function curses_version" >&5
17328 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
17329 if test "${cf_cv_func_curses_version+set}" = set; then
17330 echo $ECHO_N "(cached) $ECHO_C" >&6
17333 if test "$cross_compiling" = yes; then
17334 cf_cv_func_curses_version=unknown
17336 cat >conftest.$ac_ext <<_ACEOF
17337 #line 17337 "configure"
17338 #include "confdefs.h"
17340 #include <${cf_cv_ncurses_header:-curses.h}>
17344 sprintf(temp, "%s\n", curses_version());
17345 ${cf_cv_main_return:-return}(0);
17349 rm -f conftest$ac_exeext
17350 if { (eval echo "$as_me:17350: \"$ac_link\"") >&5
17351 (eval $ac_link) 2>&5
17353 echo "$as_me:17353: \$? = $ac_status" >&5
17354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17355 { (eval echo "$as_me:17355: \"$ac_try\"") >&5
17356 (eval $ac_try) 2>&5
17358 echo "$as_me:17358: \$? = $ac_status" >&5
17359 (exit $ac_status); }; }; then
17360 cf_cv_func_curses_version=yes
17363 echo "$as_me: program exited with status $ac_status" >&5
17364 echo "$as_me: failed program was:" >&5
17365 cat conftest.$ac_ext >&5
17366 cf_cv_func_curses_version=no
17369 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17373 echo "$as_me:17373: result: $cf_cv_func_curses_version" >&5
17374 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
17375 test "$cf_cv_func_curses_version" = yes &&
17376 cat >>confdefs.h <<\EOF
17377 #define HAVE_CURSES_VERSION 1
17380 echo "$as_me:17380: checking for alternate character set array" >&5
17381 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
17382 if test "${cf_cv_curses_acs_map+set}" = set; then
17383 echo $ECHO_N "(cached) $ECHO_C" >&6
17386 cf_cv_curses_acs_map=unknown
17387 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
17389 cat >conftest.$ac_ext <<_ACEOF
17390 #line 17390 "configure"
17391 #include "confdefs.h"
17393 #include <${cf_cv_ncurses_header:-curses.h}>
17399 $name['k'] = ACS_PLUS
17405 rm -f conftest.$ac_objext conftest$ac_exeext
17406 if { (eval echo "$as_me:17406: \"$ac_link\"") >&5
17407 (eval $ac_link) 2>&5
17409 echo "$as_me:17409: \$? = $ac_status" >&5
17410 (exit $ac_status); } &&
17411 { ac_try='test -s conftest$ac_exeext'
17412 { (eval echo "$as_me:17412: \"$ac_try\"") >&5
17413 (eval $ac_try) 2>&5
17415 echo "$as_me:17415: \$? = $ac_status" >&5
17416 (exit $ac_status); }; }; then
17417 cf_cv_curses_acs_map=$name; break
17419 echo "$as_me: failed program was:" >&5
17420 cat conftest.$ac_ext >&5
17422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17426 echo "$as_me:17426: result: $cf_cv_curses_acs_map" >&5
17427 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
17429 test "$cf_cv_curses_acs_map" != unknown &&
17430 cat >>confdefs.h <<EOF
17431 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
17434 if test "$cf_enable_widec" = yes; then
17436 echo "$as_me:17436: checking for wide alternate character set array" >&5
17437 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
17438 if test "${cf_cv_curses_wacs_map+set}" = set; then
17439 echo $ECHO_N "(cached) $ECHO_C" >&6
17442 cf_cv_curses_wacs_map=unknown
17443 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
17445 cat >conftest.$ac_ext <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17449 #ifndef _XOPEN_SOURCE_EXTENDED
17450 #define _XOPEN_SOURCE_EXTENDED
17452 #include <${cf_cv_ncurses_header:-curses.h}>
17456 void *foo = &($name['k'])
17461 rm -f conftest.$ac_objext conftest$ac_exeext
17462 if { (eval echo "$as_me:17462: \"$ac_link\"") >&5
17463 (eval $ac_link) 2>&5
17465 echo "$as_me:17465: \$? = $ac_status" >&5
17466 (exit $ac_status); } &&
17467 { ac_try='test -s conftest$ac_exeext'
17468 { (eval echo "$as_me:17468: \"$ac_try\"") >&5
17469 (eval $ac_try) 2>&5
17471 echo "$as_me:17471: \$? = $ac_status" >&5
17472 (exit $ac_status); }; }; then
17473 cf_cv_curses_wacs_map=$name
17476 echo "$as_me: failed program was:" >&5
17477 cat conftest.$ac_ext >&5
17479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17482 echo "$as_me:17482: result: $cf_cv_curses_wacs_map" >&5
17483 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
17485 test "$cf_cv_curses_wacs_map" != unknown &&
17486 cat >>confdefs.h <<EOF
17487 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
17490 echo "$as_me:17490: checking for wide alternate character constants" >&5
17491 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
17492 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
17493 echo $ECHO_N "(cached) $ECHO_C" >&6
17496 cf_cv_curses_wacs_symbols=no
17497 if test "$cf_cv_curses_wacs_map" != unknown
17499 cat >conftest.$ac_ext <<_ACEOF
17500 #line 17500 "configure"
17501 #include "confdefs.h"
17503 #ifndef _XOPEN_SOURCE_EXTENDED
17504 #define _XOPEN_SOURCE_EXTENDED
17506 #include <${cf_cv_ncurses_header:-curses.h}>
17510 cchar_t *foo = WACS_PLUS;
17511 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
17516 rm -f conftest.$ac_objext conftest$ac_exeext
17517 if { (eval echo "$as_me:17517: \"$ac_link\"") >&5
17518 (eval $ac_link) 2>&5
17520 echo "$as_me:17520: \$? = $ac_status" >&5
17521 (exit $ac_status); } &&
17522 { ac_try='test -s conftest$ac_exeext'
17523 { (eval echo "$as_me:17523: \"$ac_try\"") >&5
17524 (eval $ac_try) 2>&5
17526 echo "$as_me:17526: \$? = $ac_status" >&5
17527 (exit $ac_status); }; }; then
17528 cf_cv_curses_wacs_symbols=yes
17530 echo "$as_me: failed program was:" >&5
17531 cat conftest.$ac_ext >&5
17533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17535 cat >conftest.$ac_ext <<_ACEOF
17536 #line 17536 "configure"
17537 #include "confdefs.h"
17539 #ifndef _XOPEN_SOURCE_EXTENDED
17540 #define _XOPEN_SOURCE_EXTENDED
17542 #include <${cf_cv_ncurses_header:-curses.h}>
17546 cchar_t *foo = WACS_PLUS
17551 rm -f conftest.$ac_objext conftest$ac_exeext
17552 if { (eval echo "$as_me:17552: \"$ac_link\"") >&5
17553 (eval $ac_link) 2>&5
17555 echo "$as_me:17555: \$? = $ac_status" >&5
17556 (exit $ac_status); } &&
17557 { ac_try='test -s conftest$ac_exeext'
17558 { (eval echo "$as_me:17558: \"$ac_try\"") >&5
17559 (eval $ac_try) 2>&5
17561 echo "$as_me:17561: \$? = $ac_status" >&5
17562 (exit $ac_status); }; }; then
17563 cf_cv_curses_wacs_symbols=yes
17565 echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17572 echo "$as_me:17572: result: $cf_cv_curses_wacs_symbols" >&5
17573 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
17575 test "$cf_cv_curses_wacs_symbols" != no &&
17576 cat >>confdefs.h <<\EOF
17577 #define CURSES_WACS_SYMBOLS 1
17582 echo "$as_me:17582: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17583 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17584 cat >conftest.$ac_ext <<_ACEOF
17585 #line 17585 "configure"
17586 #include "confdefs.h"
17588 #ifndef _XOPEN_SOURCE_EXTENDED
17589 #define _XOPEN_SOURCE_EXTENDED
17591 #include <${cf_cv_ncurses_header:-curses.h}>
17602 rm -f conftest.$ac_objext
17603 if { (eval echo "$as_me:17603: \"$ac_compile\"") >&5
17604 (eval $ac_compile) 2>&5
17606 echo "$as_me:17606: \$? = $ac_status" >&5
17607 (exit $ac_status); } &&
17608 { ac_try='test -s conftest.$ac_objext'
17609 { (eval echo "$as_me:17609: \"$ac_try\"") >&5
17610 (eval $ac_try) 2>&5
17612 echo "$as_me:17612: \$? = $ac_status" >&5
17613 (exit $ac_status); }; }; then
17616 echo "$as_me: failed program was:" >&5
17617 cat conftest.$ac_ext >&5
17620 rm -f conftest.$ac_objext conftest.$ac_ext
17621 echo "$as_me:17621: result: $cf_result" >&5
17622 echo "${ECHO_T}$cf_result" >&6
17623 if test $cf_result = yes ; then
17625 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17627 cat >>confdefs.h <<EOF
17628 #define $cf_result 1
17633 cat >>confdefs.h <<EOF
17634 #define attr_t long
17639 if test "$cf_enable_widec" = yes; then
17641 # This is needed on Tru64 5.0 to declare mbstate_t
17642 echo "$as_me:17642: checking if we must include wchar.h to declare mbstate_t" >&5
17643 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
17644 if test "${cf_cv_mbstate_t+set}" = set; then
17645 echo $ECHO_N "(cached) $ECHO_C" >&6
17648 cat >conftest.$ac_ext <<_ACEOF
17649 #line 17649 "configure"
17650 #include "confdefs.h"
17652 #include <stdlib.h>
17653 #include <stdarg.h>
17655 #ifdef HAVE_LIBUTF8_H
17656 #include <libutf8.h>
17666 rm -f conftest.$ac_objext
17667 if { (eval echo "$as_me:17667: \"$ac_compile\"") >&5
17668 (eval $ac_compile) 2>&5
17670 echo "$as_me:17670: \$? = $ac_status" >&5
17671 (exit $ac_status); } &&
17672 { ac_try='test -s conftest.$ac_objext'
17673 { (eval echo "$as_me:17673: \"$ac_try\"") >&5
17674 (eval $ac_try) 2>&5
17676 echo "$as_me:17676: \$? = $ac_status" >&5
17677 (exit $ac_status); }; }; then
17680 echo "$as_me: failed program was:" >&5
17681 cat conftest.$ac_ext >&5
17682 cat >conftest.$ac_ext <<_ACEOF
17683 #line 17683 "configure"
17684 #include "confdefs.h"
17686 #include <stdlib.h>
17687 #include <stdarg.h>
17690 #ifdef HAVE_LIBUTF8_H
17691 #include <libutf8.h>
17701 rm -f conftest.$ac_objext
17702 if { (eval echo "$as_me:17702: \"$ac_compile\"") >&5
17703 (eval $ac_compile) 2>&5
17705 echo "$as_me:17705: \$? = $ac_status" >&5
17706 (exit $ac_status); } &&
17707 { ac_try='test -s conftest.$ac_objext'
17708 { (eval echo "$as_me:17708: \"$ac_try\"") >&5
17709 (eval $ac_try) 2>&5
17711 echo "$as_me:17711: \$? = $ac_status" >&5
17712 (exit $ac_status); }; }; then
17713 cf_cv_mbstate_t=yes
17715 echo "$as_me: failed program was:" >&5
17716 cat conftest.$ac_ext >&5
17717 cf_cv_mbstate_t=unknown
17719 rm -f conftest.$ac_objext conftest.$ac_ext
17721 rm -f conftest.$ac_objext conftest.$ac_ext
17723 echo "$as_me:17723: result: $cf_cv_mbstate_t" >&5
17724 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
17726 if test "$cf_cv_mbstate_t" = yes ; then
17728 cat >>confdefs.h <<\EOF
17729 #define NEED_WCHAR_H 1
17735 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
17736 if test "$cf_cv_mbstate_t" = unknown ; then
17737 NCURSES_MBSTATE_T=1
17740 # if we find mbstate_t in either place, use substitution to provide a fallback.
17741 if test "$cf_cv_mbstate_t" != unknown ; then
17742 NCURSES_OK_MBSTATE_T=1
17745 # This is needed on Tru64 5.0 to declare wchar_t
17746 echo "$as_me:17746: checking if we must include wchar.h to declare wchar_t" >&5
17747 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
17748 if test "${cf_cv_wchar_t+set}" = set; then
17749 echo $ECHO_N "(cached) $ECHO_C" >&6
17752 cat >conftest.$ac_ext <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17756 #include <stdlib.h>
17757 #include <stdarg.h>
17759 #ifdef HAVE_LIBUTF8_H
17760 #include <libutf8.h>
17770 rm -f conftest.$ac_objext
17771 if { (eval echo "$as_me:17771: \"$ac_compile\"") >&5
17772 (eval $ac_compile) 2>&5
17774 echo "$as_me:17774: \$? = $ac_status" >&5
17775 (exit $ac_status); } &&
17776 { ac_try='test -s conftest.$ac_objext'
17777 { (eval echo "$as_me:17777: \"$ac_try\"") >&5
17778 (eval $ac_try) 2>&5
17780 echo "$as_me:17780: \$? = $ac_status" >&5
17781 (exit $ac_status); }; }; then
17784 echo "$as_me: failed program was:" >&5
17785 cat conftest.$ac_ext >&5
17786 cat >conftest.$ac_ext <<_ACEOF
17787 #line 17787 "configure"
17788 #include "confdefs.h"
17790 #include <stdlib.h>
17791 #include <stdarg.h>
17794 #ifdef HAVE_LIBUTF8_H
17795 #include <libutf8.h>
17805 rm -f conftest.$ac_objext
17806 if { (eval echo "$as_me:17806: \"$ac_compile\"") >&5
17807 (eval $ac_compile) 2>&5
17809 echo "$as_me:17809: \$? = $ac_status" >&5
17810 (exit $ac_status); } &&
17811 { ac_try='test -s conftest.$ac_objext'
17812 { (eval echo "$as_me:17812: \"$ac_try\"") >&5
17813 (eval $ac_try) 2>&5
17815 echo "$as_me:17815: \$? = $ac_status" >&5
17816 (exit $ac_status); }; }; then
17819 echo "$as_me: failed program was:" >&5
17820 cat conftest.$ac_ext >&5
17821 cf_cv_wchar_t=unknown
17823 rm -f conftest.$ac_objext conftest.$ac_ext
17825 rm -f conftest.$ac_objext conftest.$ac_ext
17827 echo "$as_me:17827: result: $cf_cv_wchar_t" >&5
17828 echo "${ECHO_T}$cf_cv_wchar_t" >&6
17830 if test "$cf_cv_wchar_t" = yes ; then
17832 cat >>confdefs.h <<\EOF
17833 #define NEED_WCHAR_H 1
17839 # if we do not find wchar_t in either place, use substitution to provide a fallback.
17840 if test "$cf_cv_wchar_t" = unknown ; then
17844 # if we find wchar_t in either place, use substitution to provide a fallback.
17845 if test "$cf_cv_wchar_t" != unknown ; then
17846 NCURSES_OK_WCHAR_T=1
17849 # This is needed on Tru64 5.0 to declare wint_t
17850 echo "$as_me:17850: checking if we must include wchar.h to declare wint_t" >&5
17851 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
17852 if test "${cf_cv_wint_t+set}" = set; then
17853 echo $ECHO_N "(cached) $ECHO_C" >&6
17856 cat >conftest.$ac_ext <<_ACEOF
17857 #line 17857 "configure"
17858 #include "confdefs.h"
17860 #include <stdlib.h>
17861 #include <stdarg.h>
17863 #ifdef HAVE_LIBUTF8_H
17864 #include <libutf8.h>
17874 rm -f conftest.$ac_objext
17875 if { (eval echo "$as_me:17875: \"$ac_compile\"") >&5
17876 (eval $ac_compile) 2>&5
17878 echo "$as_me:17878: \$? = $ac_status" >&5
17879 (exit $ac_status); } &&
17880 { ac_try='test -s conftest.$ac_objext'
17881 { (eval echo "$as_me:17881: \"$ac_try\"") >&5
17882 (eval $ac_try) 2>&5
17884 echo "$as_me:17884: \$? = $ac_status" >&5
17885 (exit $ac_status); }; }; then
17888 echo "$as_me: failed program was:" >&5
17889 cat conftest.$ac_ext >&5
17890 cat >conftest.$ac_ext <<_ACEOF
17891 #line 17891 "configure"
17892 #include "confdefs.h"
17894 #include <stdlib.h>
17895 #include <stdarg.h>
17898 #ifdef HAVE_LIBUTF8_H
17899 #include <libutf8.h>
17909 rm -f conftest.$ac_objext
17910 if { (eval echo "$as_me:17910: \"$ac_compile\"") >&5
17911 (eval $ac_compile) 2>&5
17913 echo "$as_me:17913: \$? = $ac_status" >&5
17914 (exit $ac_status); } &&
17915 { ac_try='test -s conftest.$ac_objext'
17916 { (eval echo "$as_me:17916: \"$ac_try\"") >&5
17917 (eval $ac_try) 2>&5
17919 echo "$as_me:17919: \$? = $ac_status" >&5
17920 (exit $ac_status); }; }; then
17923 echo "$as_me: failed program was:" >&5
17924 cat conftest.$ac_ext >&5
17925 cf_cv_wint_t=unknown
17927 rm -f conftest.$ac_objext conftest.$ac_ext
17929 rm -f conftest.$ac_objext conftest.$ac_ext
17931 echo "$as_me:17931: result: $cf_cv_wint_t" >&5
17932 echo "${ECHO_T}$cf_cv_wint_t" >&6
17934 if test "$cf_cv_wint_t" = yes ; then
17936 cat >>confdefs.h <<\EOF
17937 #define NEED_WCHAR_H 1
17943 # if we do not find wint_t in either place, use substitution to provide a fallback.
17944 if test "$cf_cv_wint_t" = unknown ; then
17948 # if we find wint_t in either place, use substitution to provide a fallback.
17949 if test "$cf_cv_wint_t" != unknown ; then
17950 NCURSES_OK_WINT_T=1
17953 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
17955 echo "$as_me:17955: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17956 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17957 cat >conftest.$ac_ext <<_ACEOF
17958 #line 17958 "configure"
17959 #include "confdefs.h"
17961 #ifndef _XOPEN_SOURCE_EXTENDED
17962 #define _XOPEN_SOURCE_EXTENDED
17964 #include <${cf_cv_ncurses_header:-curses.h}>
17975 rm -f conftest.$ac_objext
17976 if { (eval echo "$as_me:17976: \"$ac_compile\"") >&5
17977 (eval $ac_compile) 2>&5
17979 echo "$as_me:17979: \$? = $ac_status" >&5
17980 (exit $ac_status); } &&
17981 { ac_try='test -s conftest.$ac_objext'
17982 { (eval echo "$as_me:17982: \"$ac_try\"") >&5
17983 (eval $ac_try) 2>&5
17985 echo "$as_me:17985: \$? = $ac_status" >&5
17986 (exit $ac_status); }; }; then
17989 echo "$as_me: failed program was:" >&5
17990 cat conftest.$ac_ext >&5
17993 rm -f conftest.$ac_objext conftest.$ac_ext
17994 echo "$as_me:17994: result: $cf_result" >&5
17995 echo "${ECHO_T}$cf_result" >&6
17996 if test $cf_result = yes ; then
17998 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18000 cat >>confdefs.h <<EOF
18001 #define $cf_result 1
18006 cat >>confdefs.h <<EOF
18007 #define mbstate_t long
18014 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
18016 echo "$as_me:18016: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18017 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18018 cat >conftest.$ac_ext <<_ACEOF
18019 #line 18019 "configure"
18020 #include "confdefs.h"
18022 #ifndef _XOPEN_SOURCE_EXTENDED
18023 #define _XOPEN_SOURCE_EXTENDED
18025 #include <${cf_cv_ncurses_header:-curses.h}>
18036 rm -f conftest.$ac_objext
18037 if { (eval echo "$as_me:18037: \"$ac_compile\"") >&5
18038 (eval $ac_compile) 2>&5
18040 echo "$as_me:18040: \$? = $ac_status" >&5
18041 (exit $ac_status); } &&
18042 { ac_try='test -s conftest.$ac_objext'
18043 { (eval echo "$as_me:18043: \"$ac_try\"") >&5
18044 (eval $ac_try) 2>&5
18046 echo "$as_me:18046: \$? = $ac_status" >&5
18047 (exit $ac_status); }; }; then
18050 echo "$as_me: failed program was:" >&5
18051 cat conftest.$ac_ext >&5
18054 rm -f conftest.$ac_objext conftest.$ac_ext
18055 echo "$as_me:18055: result: $cf_result" >&5
18056 echo "${ECHO_T}$cf_result" >&6
18057 if test $cf_result = yes ; then
18059 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18061 cat >>confdefs.h <<EOF
18062 #define $cf_result 1
18067 cat >>confdefs.h <<EOF
18068 #define wchar_t long
18075 if test "$NCURSES_OK_WINT_T" = 0 ; then
18077 echo "$as_me:18077: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18078 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18079 cat >conftest.$ac_ext <<_ACEOF
18080 #line 18080 "configure"
18081 #include "confdefs.h"
18083 #ifndef _XOPEN_SOURCE_EXTENDED
18084 #define _XOPEN_SOURCE_EXTENDED
18086 #include <${cf_cv_ncurses_header:-curses.h}>
18097 rm -f conftest.$ac_objext
18098 if { (eval echo "$as_me:18098: \"$ac_compile\"") >&5
18099 (eval $ac_compile) 2>&5
18101 echo "$as_me:18101: \$? = $ac_status" >&5
18102 (exit $ac_status); } &&
18103 { ac_try='test -s conftest.$ac_objext'
18104 { (eval echo "$as_me:18104: \"$ac_try\"") >&5
18105 (eval $ac_try) 2>&5
18107 echo "$as_me:18107: \$? = $ac_status" >&5
18108 (exit $ac_status); }; }; then
18111 echo "$as_me: failed program was:" >&5
18112 cat conftest.$ac_ext >&5
18115 rm -f conftest.$ac_objext conftest.$ac_ext
18116 echo "$as_me:18116: result: $cf_result" >&5
18117 echo "${ECHO_T}$cf_result" >&6
18118 if test $cf_result = yes ; then
18120 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18122 cat >>confdefs.h <<EOF
18123 #define $cf_result 1
18128 cat >>confdefs.h <<EOF
18129 #define wint_t long
18144 echo "$as_me:18144: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
18145 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18147 cat >conftest.$ac_ext <<_ACEOF
18148 #line 18148 "configure"
18149 #include "confdefs.h"
18151 #ifdef HAVE_XCURSES
18152 #include <xcurses.h>
18153 char * XCursesProgramName = "test";
18155 #include <${cf_cv_ncurses_header:-curses.h}>
18156 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18157 #include <ncursesw/term.h>
18158 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18159 #include <ncurses/term.h>
18160 #elif defined(HAVE_TERM_H)
18169 void *foo = &($cf_data)
18175 rm -f conftest.$ac_objext
18176 if { (eval echo "$as_me:18176: \"$ac_compile\"") >&5
18177 (eval $ac_compile) 2>&5
18179 echo "$as_me:18179: \$? = $ac_status" >&5
18180 (exit $ac_status); } &&
18181 { ac_try='test -s conftest.$ac_objext'
18182 { (eval echo "$as_me:18182: \"$ac_try\"") >&5
18183 (eval $ac_try) 2>&5
18185 echo "$as_me:18185: \$? = $ac_status" >&5
18186 (exit $ac_status); }; }; then
18190 echo "$as_me: failed program was:" >&5
18191 cat conftest.$ac_ext >&5
18194 rm -f conftest.$ac_objext conftest.$ac_ext
18195 echo "$as_me:18195: result: $cf_result" >&5
18196 echo "${ECHO_T}$cf_result" >&6
18198 if test $cf_result = yes ; then
18200 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18202 cat >>confdefs.h <<EOF
18203 #define $cf_result 1
18207 echo "$as_me:18207: checking for data $cf_data in library" >&5
18208 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
18209 # BSD linkers insist on making weak linkage, but resolve at runtime.
18210 if test "$cross_compiling" = yes; then
18213 cat >conftest.$ac_ext <<_ACEOF
18214 #line 18214 "configure"
18215 #include "confdefs.h"
18217 #ifdef HAVE_XCURSES
18218 #include <xcurses.h>
18219 char * XCursesProgramName = "test";
18221 #include <${cf_cv_ncurses_header:-curses.h}>
18222 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18223 #include <ncursesw/term.h>
18224 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18225 #include <ncurses/term.h>
18226 #elif defined(HAVE_TERM_H)
18231 extern char $cf_data;
18237 void *foo = &($cf_data);
18238 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
18239 ${cf_cv_main_return:-return}(foo == 0);
18246 rm -f conftest.$ac_objext conftest$ac_exeext
18247 if { (eval echo "$as_me:18247: \"$ac_link\"") >&5
18248 (eval $ac_link) 2>&5
18250 echo "$as_me:18250: \$? = $ac_status" >&5
18251 (exit $ac_status); } &&
18252 { ac_try='test -s conftest$ac_exeext'
18253 { (eval echo "$as_me:18253: \"$ac_try\"") >&5
18254 (eval $ac_try) 2>&5
18256 echo "$as_me:18256: \$? = $ac_status" >&5
18257 (exit $ac_status); }; }; then
18260 echo "$as_me: failed program was:" >&5
18261 cat conftest.$ac_ext >&5
18264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18267 cat >conftest.$ac_ext <<_ACEOF
18268 #line 18268 "configure"
18269 #include "confdefs.h"
18271 #ifdef HAVE_XCURSES
18272 #include <xcurses.h>
18273 char * XCursesProgramName = "test";
18275 #include <${cf_cv_ncurses_header:-curses.h}>
18276 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18277 #include <ncursesw/term.h>
18278 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18279 #include <ncurses/term.h>
18280 #elif defined(HAVE_TERM_H)
18285 extern char $cf_data;
18288 void *foo = &($cf_data);
18289 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
18290 ${cf_cv_main_return:-return}(foo == 0);
18293 rm -f conftest$ac_exeext
18294 if { (eval echo "$as_me:18294: \"$ac_link\"") >&5
18295 (eval $ac_link) 2>&5
18297 echo "$as_me:18297: \$? = $ac_status" >&5
18298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18299 { (eval echo "$as_me:18299: \"$ac_try\"") >&5
18300 (eval $ac_try) 2>&5
18302 echo "$as_me:18302: \$? = $ac_status" >&5
18303 (exit $ac_status); }; }; then
18307 echo "$as_me: program exited with status $ac_status" >&5
18308 echo "$as_me: failed program was:" >&5
18309 cat conftest.$ac_ext >&5
18312 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18314 echo "$as_me:18314: result: $cf_result" >&5
18315 echo "${ECHO_T}$cf_result" >&6
18316 if test $cf_result = yes ; then
18318 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18320 cat >>confdefs.h <<EOF
18321 #define $cf_result 1
18324 # do not exit loop here, since we prefer system's declarations
18329 if ( test "$GCC" = yes || test "$GXX" = yes )
18331 echo "$as_me:18331: checking if you want to turn on gcc warnings" >&5
18332 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
18334 # Check whether --enable-warnings or --disable-warnings was given.
18335 if test "${enable_warnings+set}" = set; then
18336 enableval="$enable_warnings"
18337 test "$enableval" != yes && enableval=no
18338 if test "$enableval" != "no" ; then
18348 echo "$as_me:18348: result: $with_warnings" >&5
18349 echo "${ECHO_T}$with_warnings" >&6
18350 if test "$with_warnings" = "yes"
18353 if test "$GCC" = yes
18355 cat > conftest.i <<EOF
18357 #define GCC_PRINTF 0
18360 #define GCC_SCANF 0
18362 #ifndef GCC_NORETURN
18363 #define GCC_NORETURN /* nothing */
18366 #define GCC_UNUSED /* nothing */
18369 if test "$GCC" = yes
18371 { echo "$as_me:18371: checking for $CC __attribute__ directives..." >&5
18372 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
18373 cat > conftest.$ac_ext <<EOF
18374 #line 18374 "${as_me:-configure}"
18375 #include "confdefs.h"
18376 #include "conftest.h"
18377 #include "conftest.i"
18379 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
18381 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
18384 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
18386 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
18388 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
18389 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
18390 extern void foo(void) GCC_NORETURN;
18391 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
18393 cf_printf_attribute=no
18394 cf_scanf_attribute=no
18395 for cf_attribute in scanf printf unused noreturn
18398 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18400 cf_directive="__attribute__(($cf_attribute))"
18401 echo "checking for $CC $cf_directive" 1>&5
18403 case $cf_attribute in
18405 cf_printf_attribute=yes
18406 cat >conftest.h <<EOF
18407 #define GCC_$cf_ATTRIBUTE 1
18411 cf_scanf_attribute=yes
18412 cat >conftest.h <<EOF
18413 #define GCC_$cf_ATTRIBUTE 1
18417 cat >conftest.h <<EOF
18418 #define GCC_$cf_ATTRIBUTE $cf_directive
18423 if { (eval echo "$as_me:18423: \"$ac_compile\"") >&5
18424 (eval $ac_compile) 2>&5
18426 echo "$as_me:18426: \$? = $ac_status" >&5
18427 (exit $ac_status); }; then
18428 test -n "$verbose" && echo "$as_me:18428: result: ... $cf_attribute" >&5
18429 echo "${ECHO_T}... $cf_attribute" >&6
18430 cat conftest.h >>confdefs.h
18431 case $cf_attribute in
18434 cat >>confdefs.h <<EOF
18435 #define GCC_NORETURN $cf_directive
18440 cf_value='/* nothing */'
18441 if test "$cf_printf_attribute" != no ; then
18442 cf_value='__attribute__((format(printf,fmt,var)))'
18444 cat >>confdefs.h <<\EOF
18445 #define GCC_PRINTF 1
18450 cat >>confdefs.h <<EOF
18451 #define GCC_PRINTFLIKE(fmt,var) $cf_value
18456 cf_value='/* nothing */'
18457 if test "$cf_scanf_attribute" != no ; then
18458 cf_value='__attribute__((format(scanf,fmt,var)))'
18460 cat >>confdefs.h <<\EOF
18461 #define GCC_SCANF 1
18466 cat >>confdefs.h <<EOF
18467 #define GCC_SCANFLIKE(fmt,var) $cf_value
18473 cat >>confdefs.h <<EOF
18474 #define GCC_UNUSED $cf_directive
18482 fgrep define conftest.i >>confdefs.h
18489 if test "$GCC" = yes ; then
18492 echo "$as_me:18492: checking if this is really Intel C compiler" >&5
18493 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
18494 cf_save_CFLAGS="$CFLAGS"
18495 CFLAGS="$CFLAGS -no-gcc"
18496 cat >conftest.$ac_ext <<_ACEOF
18497 #line 18497 "configure"
18498 #include "confdefs.h"
18504 #ifdef __INTEL_COMPILER
18513 rm -f conftest.$ac_objext
18514 if { (eval echo "$as_me:18514: \"$ac_compile\"") >&5
18515 (eval $ac_compile) 2>&5
18517 echo "$as_me:18517: \$? = $ac_status" >&5
18518 (exit $ac_status); } &&
18519 { ac_try='test -s conftest.$ac_objext'
18520 { (eval echo "$as_me:18520: \"$ac_try\"") >&5
18521 (eval $ac_try) 2>&5
18523 echo "$as_me:18523: \$? = $ac_status" >&5
18524 (exit $ac_status); }; }; then
18526 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
18529 echo "$as_me: failed program was:" >&5
18530 cat conftest.$ac_ext >&5
18532 rm -f conftest.$ac_objext conftest.$ac_ext
18533 CFLAGS="$cf_save_CFLAGS"
18534 echo "$as_me:18534: result: $INTEL_COMPILER" >&5
18535 echo "${ECHO_T}$INTEL_COMPILER" >&6
18542 if test "$GCC" = yes ; then
18543 echo "$as_me:18543: checking if this is really Clang C compiler" >&5
18544 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
18545 cf_save_CFLAGS="$CFLAGS"
18546 CFLAGS="$CFLAGS -Qunused-arguments"
18547 cat >conftest.$ac_ext <<_ACEOF
18548 #line 18548 "configure"
18549 #include "confdefs.h"
18564 rm -f conftest.$ac_objext
18565 if { (eval echo "$as_me:18565: \"$ac_compile\"") >&5
18566 (eval $ac_compile) 2>&5
18568 echo "$as_me:18568: \$? = $ac_status" >&5
18569 (exit $ac_status); } &&
18570 { ac_try='test -s conftest.$ac_objext'
18571 { (eval echo "$as_me:18571: \"$ac_try\"") >&5
18572 (eval $ac_try) 2>&5
18574 echo "$as_me:18574: \$? = $ac_status" >&5
18575 (exit $ac_status); }; }; then
18577 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
18580 echo "$as_me: failed program was:" >&5
18581 cat conftest.$ac_ext >&5
18583 rm -f conftest.$ac_objext conftest.$ac_ext
18584 CFLAGS="$cf_save_CFLAGS"
18585 echo "$as_me:18585: result: $CLANG_COMPILER" >&5
18586 echo "${ECHO_T}$CLANG_COMPILER" >&6
18589 cat > conftest.$ac_ext <<EOF
18590 #line 18590 "${as_me:-configure}"
18591 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18594 if test "$INTEL_COMPILER" = yes
18596 # The "-wdXXX" options suppress warnings:
18597 # remark #1419: external declaration in primary source file
18598 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18599 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18600 # remark #193: zero used for undefined preprocessing identifier
18601 # remark #593: variable "curs_sb_left_arrow" was set but never used
18602 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18603 # remark #869: parameter "tw" was never referenced
18604 # remark #981: operands are evaluated in unspecified order
18605 # warning #279: controlling expression is constant
18607 { echo "$as_me:18607: checking for $CC warning options..." >&5
18608 echo "$as_me: checking for $CC warning options..." >&6;}
18609 cf_save_CFLAGS="$CFLAGS"
18610 EXTRA_CFLAGS="-Wall"
18622 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18623 if { (eval echo "$as_me:18623: \"$ac_compile\"") >&5
18624 (eval $ac_compile) 2>&5
18626 echo "$as_me:18626: \$? = $ac_status" >&5
18627 (exit $ac_status); }; then
18628 test -n "$verbose" && echo "$as_me:18628: result: ... -$cf_opt" >&5
18629 echo "${ECHO_T}... -$cf_opt" >&6
18630 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18633 CFLAGS="$cf_save_CFLAGS"
18635 elif test "$GCC" = yes
18637 { echo "$as_me:18637: checking for $CC warning options..." >&5
18638 echo "$as_me: checking for $CC warning options..." >&6;}
18639 cf_save_CFLAGS="$CFLAGS"
18642 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
18643 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
18644 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
18645 for cf_opt in W Wall \
18646 Wbad-function-cast \
18649 Wdeclaration-after-statement \
18652 Wmissing-declarations \
18653 Wmissing-prototypes \
18657 Wstrict-prototypes \
18658 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
18660 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18661 if { (eval echo "$as_me:18661: \"$ac_compile\"") >&5
18662 (eval $ac_compile) 2>&5
18664 echo "$as_me:18664: \$? = $ac_status" >&5
18665 (exit $ac_status); }; then
18666 test -n "$verbose" && echo "$as_me:18666: result: ... -$cf_opt" >&5
18667 echo "${ECHO_T}... -$cf_opt" >&6
18670 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
18673 case $GCC_VERSION in
18675 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18677 echo "${as_me:-configure}:18677: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18683 case $GCC_VERSION in
18685 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18687 echo "${as_me:-configure}:18687: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18693 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18696 CFLAGS="$cf_save_CFLAGS"
18703 echo "$as_me:18703: checking if you want to use dmalloc for testing" >&5
18704 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18706 # Check whether --with-dmalloc or --without-dmalloc was given.
18707 if test "${with_dmalloc+set}" = set; then
18708 withval="$with_dmalloc"
18710 cat >>confdefs.h <<EOF
18711 #define USE_DMALLOC 1
18714 : ${with_cflags:=-g}
18715 : ${with_no_leaks:=yes}
18720 echo "$as_me:18720: result: ${with_dmalloc:-no}" >&5
18721 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18723 case .$with_cflags in
18733 cf_new_extra_cppflags=
18735 for cf_add_cflags in -g
18737 case $cf_fix_cppflags in
18739 case $cf_add_cflags in
18740 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18741 case $cf_add_cflags in
18743 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18746 && test -z "${cf_tst_cflags}" \
18747 && cf_fix_cppflags=yes
18749 if test $cf_fix_cppflags = yes ; then
18751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18755 elif test "${cf_tst_cflags}" = "\"'" ; then
18757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18764 case "$CPPFLAGS" in
18768 case $cf_add_cflags in
18770 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18772 CPPFLAGS=`echo "$CPPFLAGS" | \
18773 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18774 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18779 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18780 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18787 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18788 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18798 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18800 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18801 && test -z "${cf_tst_cflags}" \
18802 && cf_fix_cppflags=no
18807 if test -n "$cf_new_cflags" ; then
18809 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18810 CFLAGS="${CFLAGS}$cf_new_cflags"
18814 if test -n "$cf_new_cppflags" ; then
18816 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18817 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18821 if test -n "$cf_new_extra_cppflags" ; then
18823 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18824 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18833 if test "$with_dmalloc" = yes ; then
18834 echo "$as_me:18834: checking for dmalloc.h" >&5
18835 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18836 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18837 echo $ECHO_N "(cached) $ECHO_C" >&6
18839 cat >conftest.$ac_ext <<_ACEOF
18840 #line 18840 "configure"
18841 #include "confdefs.h"
18842 #include <dmalloc.h>
18844 if { (eval echo "$as_me:18844: \"$ac_cpp conftest.$ac_ext\"") >&5
18845 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18847 egrep -v '^ *\+' conftest.er1 >conftest.err
18849 cat conftest.err >&5
18850 echo "$as_me:18850: \$? = $ac_status" >&5
18851 (exit $ac_status); } >/dev/null; then
18852 if test -s conftest.err; then
18853 ac_cpp_err=$ac_c_preproc_warn_flag
18860 if test -z "$ac_cpp_err"; then
18861 ac_cv_header_dmalloc_h=yes
18863 echo "$as_me: failed program was:" >&5
18864 cat conftest.$ac_ext >&5
18865 ac_cv_header_dmalloc_h=no
18867 rm -f conftest.err conftest.$ac_ext
18869 echo "$as_me:18869: result: $ac_cv_header_dmalloc_h" >&5
18870 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18871 if test $ac_cv_header_dmalloc_h = yes; then
18873 echo "$as_me:18873: checking for dmalloc_debug in -ldmalloc" >&5
18874 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18875 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18876 echo $ECHO_N "(cached) $ECHO_C" >&6
18878 ac_check_lib_save_LIBS=$LIBS
18879 LIBS="-ldmalloc $LIBS"
18880 cat >conftest.$ac_ext <<_ACEOF
18881 #line 18881 "configure"
18882 #include "confdefs.h"
18884 /* Override any gcc2 internal prototype to avoid an error. */
18888 /* We use char because int might match the return type of a gcc2
18889 builtin and then its argument prototype would still apply. */
18890 char dmalloc_debug ();
18899 rm -f conftest.$ac_objext conftest$ac_exeext
18900 if { (eval echo "$as_me:18900: \"$ac_link\"") >&5
18901 (eval $ac_link) 2>&5
18903 echo "$as_me:18903: \$? = $ac_status" >&5
18904 (exit $ac_status); } &&
18905 { ac_try='test -s conftest$ac_exeext'
18906 { (eval echo "$as_me:18906: \"$ac_try\"") >&5
18907 (eval $ac_try) 2>&5
18909 echo "$as_me:18909: \$? = $ac_status" >&5
18910 (exit $ac_status); }; }; then
18911 ac_cv_lib_dmalloc_dmalloc_debug=yes
18913 echo "$as_me: failed program was:" >&5
18914 cat conftest.$ac_ext >&5
18915 ac_cv_lib_dmalloc_dmalloc_debug=no
18917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18918 LIBS=$ac_check_lib_save_LIBS
18920 echo "$as_me:18920: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18921 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18922 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
18923 cat >>confdefs.h <<EOF
18924 #define HAVE_LIBDMALLOC 1
18927 LIBS="-ldmalloc $LIBS"
18935 echo "$as_me:18935: checking if you want to use dbmalloc for testing" >&5
18936 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18938 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18939 if test "${with_dbmalloc+set}" = set; then
18940 withval="$with_dbmalloc"
18942 cat >>confdefs.h <<EOF
18943 #define USE_DBMALLOC 1
18946 : ${with_cflags:=-g}
18947 : ${with_no_leaks:=yes}
18952 echo "$as_me:18952: result: ${with_dbmalloc:-no}" >&5
18953 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18955 case .$with_cflags in
18965 cf_new_extra_cppflags=
18967 for cf_add_cflags in -g
18969 case $cf_fix_cppflags in
18971 case $cf_add_cflags in
18972 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18973 case $cf_add_cflags in
18975 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18977 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18978 && test -z "${cf_tst_cflags}" \
18979 && cf_fix_cppflags=yes
18981 if test $cf_fix_cppflags = yes ; then
18983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18987 elif test "${cf_tst_cflags}" = "\"'" ; then
18989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18996 case "$CPPFLAGS" in
19000 case $cf_add_cflags in
19002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19004 CPPFLAGS=`echo "$CPPFLAGS" | \
19005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19011 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19012 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19019 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19020 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19027 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19028 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19030 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19033 && test -z "${cf_tst_cflags}" \
19034 && cf_fix_cppflags=no
19039 if test -n "$cf_new_cflags" ; then
19041 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19042 CFLAGS="${CFLAGS}$cf_new_cflags"
19046 if test -n "$cf_new_cppflags" ; then
19048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19049 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19053 if test -n "$cf_new_extra_cppflags" ; then
19055 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19056 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19065 if test "$with_dbmalloc" = yes ; then
19066 echo "$as_me:19066: checking for dbmalloc.h" >&5
19067 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19068 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19069 echo $ECHO_N "(cached) $ECHO_C" >&6
19071 cat >conftest.$ac_ext <<_ACEOF
19072 #line 19072 "configure"
19073 #include "confdefs.h"
19074 #include <dbmalloc.h>
19076 if { (eval echo "$as_me:19076: \"$ac_cpp conftest.$ac_ext\"") >&5
19077 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19079 egrep -v '^ *\+' conftest.er1 >conftest.err
19081 cat conftest.err >&5
19082 echo "$as_me:19082: \$? = $ac_status" >&5
19083 (exit $ac_status); } >/dev/null; then
19084 if test -s conftest.err; then
19085 ac_cpp_err=$ac_c_preproc_warn_flag
19092 if test -z "$ac_cpp_err"; then
19093 ac_cv_header_dbmalloc_h=yes
19095 echo "$as_me: failed program was:" >&5
19096 cat conftest.$ac_ext >&5
19097 ac_cv_header_dbmalloc_h=no
19099 rm -f conftest.err conftest.$ac_ext
19101 echo "$as_me:19101: result: $ac_cv_header_dbmalloc_h" >&5
19102 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
19103 if test $ac_cv_header_dbmalloc_h = yes; then
19105 echo "$as_me:19105: checking for debug_malloc in -ldbmalloc" >&5
19106 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
19107 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
19108 echo $ECHO_N "(cached) $ECHO_C" >&6
19110 ac_check_lib_save_LIBS=$LIBS
19111 LIBS="-ldbmalloc $LIBS"
19112 cat >conftest.$ac_ext <<_ACEOF
19113 #line 19113 "configure"
19114 #include "confdefs.h"
19116 /* Override any gcc2 internal prototype to avoid an error. */
19120 /* We use char because int might match the return type of a gcc2
19121 builtin and then its argument prototype would still apply. */
19122 char debug_malloc ();
19131 rm -f conftest.$ac_objext conftest$ac_exeext
19132 if { (eval echo "$as_me:19132: \"$ac_link\"") >&5
19133 (eval $ac_link) 2>&5
19135 echo "$as_me:19135: \$? = $ac_status" >&5
19136 (exit $ac_status); } &&
19137 { ac_try='test -s conftest$ac_exeext'
19138 { (eval echo "$as_me:19138: \"$ac_try\"") >&5
19139 (eval $ac_try) 2>&5
19141 echo "$as_me:19141: \$? = $ac_status" >&5
19142 (exit $ac_status); }; }; then
19143 ac_cv_lib_dbmalloc_debug_malloc=yes
19145 echo "$as_me: failed program was:" >&5
19146 cat conftest.$ac_ext >&5
19147 ac_cv_lib_dbmalloc_debug_malloc=no
19149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19150 LIBS=$ac_check_lib_save_LIBS
19152 echo "$as_me:19152: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
19153 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
19154 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
19155 cat >>confdefs.h <<EOF
19156 #define HAVE_LIBDBMALLOC 1
19159 LIBS="-ldbmalloc $LIBS"
19167 echo "$as_me:19167: checking if you want to use valgrind for testing" >&5
19168 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19170 # Check whether --with-valgrind or --without-valgrind was given.
19171 if test "${with_valgrind+set}" = set; then
19172 withval="$with_valgrind"
19174 cat >>confdefs.h <<EOF
19175 #define USE_VALGRIND 1
19178 : ${with_cflags:=-g}
19179 : ${with_no_leaks:=yes}
19184 echo "$as_me:19184: result: ${with_valgrind:-no}" >&5
19185 echo "${ECHO_T}${with_valgrind:-no}" >&6
19187 case .$with_cflags in
19197 cf_new_extra_cppflags=
19199 for cf_add_cflags in -g
19201 case $cf_fix_cppflags in
19203 case $cf_add_cflags in
19204 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19205 case $cf_add_cflags in
19207 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19210 && test -z "${cf_tst_cflags}" \
19211 && cf_fix_cppflags=yes
19213 if test $cf_fix_cppflags = yes ; then
19215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19219 elif test "${cf_tst_cflags}" = "\"'" ; then
19221 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19222 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19228 case "$CPPFLAGS" in
19232 case $cf_add_cflags in
19234 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19236 CPPFLAGS=`echo "$CPPFLAGS" | \
19237 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19238 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19243 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19244 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19251 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19252 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19259 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19260 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19262 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19264 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19265 && test -z "${cf_tst_cflags}" \
19266 && cf_fix_cppflags=no
19271 if test -n "$cf_new_cflags" ; then
19273 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19274 CFLAGS="${CFLAGS}$cf_new_cflags"
19278 if test -n "$cf_new_cppflags" ; then
19280 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19281 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19285 if test -n "$cf_new_extra_cppflags" ; then
19287 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19288 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19297 echo "$as_me:19297: checking if you want to perform memory-leak testing" >&5
19298 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19300 # Check whether --enable-leaks or --disable-leaks was given.
19301 if test "${enable_leaks+set}" = set; then
19302 enableval="$enable_leaks"
19303 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19305 : ${with_no_leaks:=no}
19307 echo "$as_me:19307: result: $with_no_leaks" >&5
19308 echo "${ECHO_T}$with_no_leaks" >&6
19310 if test "$with_no_leaks" = yes ; then
19312 cat >>confdefs.h <<\EOF
19316 cat >>confdefs.h <<\EOF
19317 #define YY_NO_LEAKS 1
19323 echo "$as_me:19323: checking for an rpath option" >&5
19324 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
19325 case $cf_cv_system_name in
19327 if test "$GCC" = yes; then
19328 LD_RPATH_OPT="-Wl,-rpath,"
19330 LD_RPATH_OPT="-rpath "
19333 (linux*|gnu*|k*bsd*-gnu|freebsd*)
19334 LD_RPATH_OPT="-Wl,-rpath,"
19336 (openbsd[2-9].*|mirbsd*)
19337 LD_RPATH_OPT="-Wl,-rpath,"
19340 LD_RPATH_OPT="-rpath "
19343 LD_RPATH_OPT="-Wl,-rpath,"
19346 LD_RPATH_OPT="-rpath "
19354 echo "$as_me:19354: result: $LD_RPATH_OPT" >&5
19355 echo "${ECHO_T}$LD_RPATH_OPT" >&6
19357 case "x$LD_RPATH_OPT" in
19359 echo "$as_me:19359: checking if we need a space after rpath option" >&5
19360 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
19361 cf_save_LIBS="$LIBS"
19363 cf_add_libs="${LD_RPATH_OPT}$libdir"
19364 # Filter out duplicates - this happens with badly-designed ".pc" files...
19365 for cf_add_1lib in $LIBS
19367 for cf_add_2lib in $cf_add_libs
19369 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19375 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19377 LIBS="$cf_add_libs"
19379 cat >conftest.$ac_ext <<_ACEOF
19380 #line 19380 "configure"
19381 #include "confdefs.h"
19391 rm -f conftest.$ac_objext conftest$ac_exeext
19392 if { (eval echo "$as_me:19392: \"$ac_link\"") >&5
19393 (eval $ac_link) 2>&5
19395 echo "$as_me:19395: \$? = $ac_status" >&5
19396 (exit $ac_status); } &&
19397 { ac_try='test -s conftest$ac_exeext'
19398 { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399 (eval $ac_try) 2>&5
19401 echo "$as_me:19401: \$? = $ac_status" >&5
19402 (exit $ac_status); }; }; then
19405 echo "$as_me: failed program was:" >&5
19406 cat conftest.$ac_ext >&5
19409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19410 LIBS="$cf_save_LIBS"
19411 echo "$as_me:19411: result: $cf_rpath_space" >&5
19412 echo "${ECHO_T}$cf_rpath_space" >&6
19413 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
19417 echo "$as_me:19417: checking if rpath-hack should be disabled" >&5
19418 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
19420 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
19421 if test "${enable_rpath_hack+set}" = set; then
19422 enableval="$enable_rpath_hack"
19423 test "$enableval" != no && enableval=yes
19424 if test "$enableval" != "yes" ; then
19425 cf_disable_rpath_hack=yes
19427 cf_disable_rpath_hack=no
19431 cf_disable_rpath_hack=no
19434 echo "$as_me:19434: result: $cf_disable_rpath_hack" >&5
19435 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
19436 if test "$cf_disable_rpath_hack" = no ; then
19438 echo "$as_me:19438: checking for updated LDFLAGS" >&5
19439 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
19440 if test -n "$LD_RPATH_OPT" ; then
19441 echo "$as_me:19441: result: maybe" >&5
19442 echo "${ECHO_T}maybe" >&6
19446 # Extract the first word of "$ac_prog", so it can be a program name with args.
19447 set dummy $ac_prog; ac_word=$2
19448 echo "$as_me:19448: checking for $ac_word" >&5
19449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19450 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
19451 echo $ECHO_N "(cached) $ECHO_C" >&6
19453 if test -n "$cf_ldd_prog"; then
19454 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
19456 ac_save_IFS=$IFS; IFS=$ac_path_separator
19458 for ac_dir in $ac_dummy; do
19460 test -z "$ac_dir" && ac_dir=.
19461 $as_executable_p "$ac_dir/$ac_word" || continue
19462 ac_cv_prog_cf_ldd_prog="$ac_prog"
19463 echo "$as_me:19463: found $ac_dir/$ac_word" >&5
19469 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
19470 if test -n "$cf_ldd_prog"; then
19471 echo "$as_me:19471: result: $cf_ldd_prog" >&5
19472 echo "${ECHO_T}$cf_ldd_prog" >&6
19474 echo "$as_me:19474: result: no" >&5
19475 echo "${ECHO_T}no" >&6
19478 test -n "$cf_ldd_prog" && break
19480 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
19482 cf_rpath_list="/usr/lib /lib"
19483 if test "$cf_ldd_prog" != no
19487 cat >conftest.$ac_ext <<_ACEOF
19488 #line 19488 "configure"
19489 #include "confdefs.h"
19499 rm -f conftest.$ac_objext conftest$ac_exeext
19500 if { (eval echo "$as_me:19500: \"$ac_link\"") >&5
19501 (eval $ac_link) 2>&5
19503 echo "$as_me:19503: \$? = $ac_status" >&5
19504 (exit $ac_status); } &&
19505 { ac_try='test -s conftest$ac_exeext'
19506 { (eval echo "$as_me:19506: \"$ac_try\"") >&5
19507 (eval $ac_try) 2>&5
19509 echo "$as_me:19509: \$? = $ac_status" >&5
19510 (exit $ac_status); }; }; then
19511 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
19512 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
19514 echo "$as_me: failed program was:" >&5
19515 cat conftest.$ac_ext >&5
19517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19519 # If we passed the link-test, but get a "not found" on a given library,
19520 # this could be due to inept reconfiguration of gcc to make it only
19521 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
19522 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
19523 # /usr/local libraries.
19524 if test -n "$cf_rpath_oops"
19526 for cf_rpath_src in $cf_rpath_oops
19528 for cf_rpath_dir in \
19533 if test -f $cf_rpath_dir/lib/$cf_rpath_src
19535 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
19537 echo "${as_me:-configure}:19537: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
19539 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
19547 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19549 echo "${as_me:-configure}:19549: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19551 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
19553 echo "${as_me:-configure}:19553: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
19556 for cf_rpath_src in $LDFLAGS
19558 case $cf_rpath_src in
19561 # check if this refers to a directory which we will ignore
19563 if test -n "$cf_rpath_list"
19565 for cf_rpath_item in $cf_rpath_list
19567 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19575 if test "$cf_rpath_skip" = no
19577 # transform the option
19578 if test "$LD_RPATH_OPT" = "-R " ; then
19579 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19581 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19584 # if we have not already added this, add it now
19585 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19586 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19588 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19590 echo "${as_me:-configure}:19590: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19592 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19597 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19599 LDFLAGS=$cf_rpath_dst
19601 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
19603 echo "${as_me:-configure}:19603: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
19605 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
19607 echo "${as_me:-configure}:19607: testing ...checking LIBS $LIBS ..." 1>&5
19610 for cf_rpath_src in $LIBS
19612 case $cf_rpath_src in
19615 # check if this refers to a directory which we will ignore
19617 if test -n "$cf_rpath_list"
19619 for cf_rpath_item in $cf_rpath_list
19621 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19629 if test "$cf_rpath_skip" = no
19631 # transform the option
19632 if test "$LD_RPATH_OPT" = "-R " ; then
19633 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19635 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19638 # if we have not already added this, add it now
19639 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19640 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19642 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19644 echo "${as_me:-configure}:19644: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19646 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19651 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19655 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
19657 echo "${as_me:-configure}:19657: testing ...checked LIBS $LIBS ..." 1>&5
19659 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19661 echo "${as_me:-configure}:19661: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19664 echo "$as_me:19664: result: no" >&5
19665 echo "${ECHO_T}no" >&6
19673 ac_config_files="$ac_config_files Makefile"
19674 ac_config_commands="$ac_config_commands default"
19675 cat >confcache <<\_ACEOF
19676 # This file is a shell script that caches the results of configure
19677 # tests run on this system so they can be shared between configure
19678 # scripts and configure runs, see configure's option --config-cache.
19679 # It is not useful on other systems. If it contains results you don't
19680 # want to keep, you may remove or edit it.
19682 # config.status only pays attention to the cache file if you give it
19683 # the --recheck option to rerun configure.
19685 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19686 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19687 # following values.
19691 # The following way of writing the cache mishandles newlines in values,
19692 # but we know of no workaround that is simple, portable, and efficient.
19693 # So, don't put newlines in cache variables' values.
19694 # Ultrix sh set writes to stderr and can't be redirected directly,
19695 # and sets the high bit in the cache file unless we assign to the vars.
19698 case `(ac_space=' '; set | grep ac_space) 2>&1` in
19700 # `set' does not quote correctly, so add quotes (double-quote
19701 # substitution turns \\\\ into \\, and sed turns \\ into \).
19704 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19707 # `set' quotes correctly as required by POSIX, so do not add quotes.
19709 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19716 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19718 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19720 if cmp -s $cache_file confcache; then :; else
19721 if test -w $cache_file; then
19722 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19723 cat confcache >$cache_file
19725 echo "not updating unwritable cache $cache_file"
19730 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19731 # Let make expand exec_prefix.
19732 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19734 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19735 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19736 # trailing colons and then remove the whole line if VPATH becomes empty
19737 # (actually we leave an empty line to preserve line numbers).
19738 if test "x$srcdir" = x.; then
19739 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19740 s/:*\$(srcdir):*/:/;
19741 s/:*\${srcdir}:*/:/;
19743 s/^\([^=]*=[ ]*\):*/\1/;
19749 DEFS=-DHAVE_CONFIG_H
19751 : ${CONFIG_STATUS=./config.status}
19752 ac_clean_files_save=$ac_clean_files
19753 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19754 { echo "$as_me:19754: creating $CONFIG_STATUS" >&5
19755 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19756 cat >$CONFIG_STATUS <<_ACEOF
19758 # Generated automatically by configure.
19759 # Run this file to recreate the current configuration.
19760 # Compiler output produced by configure, useful for debugging
19761 # configure, is in config.log if it exists.
19764 SHELL=\${CONFIG_SHELL-$SHELL}
19765 ac_cs_invocation="\$0 \$@"
19769 cat >>$CONFIG_STATUS <<\_ACEOF
19770 # Be Bourne compatible
19771 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19774 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19778 # Name of the executable.
19779 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19781 if expr a : '\(a\)' >/dev/null 2>&1; then
19787 rm -f conf$$ conf$$.exe conf$$.file
19789 if ln -s conf$$.file conf$$ 2>/dev/null; then
19790 # We could just check for DJGPP; but this test a) works b) is more generic
19791 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19792 if test -f conf$$.exe; then
19793 # Don't use ln at all; we don't have any links
19798 elif ln conf$$.file conf$$ 2>/dev/null; then
19803 rm -f conf$$ conf$$.exe conf$$.file
19805 as_executable_p="test -f"
19807 # Support unset when possible.
19808 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19815 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19816 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19817 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19818 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19819 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19820 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19821 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19822 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19825 # We need space, tab and new line, in precisely that order.
19831 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19837 # Files that config.status was made for.
19838 if test -n "$ac_config_files"; then
19839 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19842 if test -n "$ac_config_headers"; then
19843 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19846 if test -n "$ac_config_links"; then
19847 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19850 if test -n "$ac_config_commands"; then
19851 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19854 cat >>$CONFIG_STATUS <<\EOF
19857 \`$as_me' instantiates files from templates according to the
19858 current configuration.
19860 Usage: $0 [OPTIONS] [FILE]...
19862 -h, --help print this help, then exit
19863 -V, --version print version number, then exit
19864 -d, --debug don't remove temporary files
19865 --recheck update $as_me by reconfiguring in the same conditions
19866 --file=FILE[:TEMPLATE]
19867 instantiate the configuration file FILE
19868 --header=FILE[:TEMPLATE]
19869 instantiate the configuration header FILE
19871 Configuration files:
19874 Configuration headers:
19877 Configuration commands:
19880 Report bugs to <dickey@invisible-island.net>."
19883 cat >>$CONFIG_STATUS <<EOF
19886 configured by $0, generated by GNU Autoconf 2.52.20170501,
19887 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19889 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19890 Free Software Foundation, Inc.
19891 This config.status script is free software; the Free Software Foundation
19892 gives unlimited permission to copy, distribute and modify it."
19897 cat >>$CONFIG_STATUS <<\EOF
19898 # If no file are specified by the user, then we need to provide default
19899 # value. By we need to know if files were specified by the user.
19905 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19906 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19908 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19912 *) # This is not an option, so the user has probably given explicit
19914 ac_need_defaults=false;;
19918 # Handling of the options.
19920 cat >>$CONFIG_STATUS <<EOF
19921 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19922 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19923 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19925 cat >>$CONFIG_STATUS <<\EOF
19926 --version | --vers* | -V )
19927 echo "$ac_cs_version"; exit 0 ;;
19929 # Conflict between --help and --header
19930 { { echo "$as_me:19930: error: ambiguous option: $1
19931 Try \`$0 --help' for more information." >&5
19932 echo "$as_me: error: ambiguous option: $1
19933 Try \`$0 --help' for more information." >&2;}
19934 { (exit 1); exit 1; }; };;
19935 --help | --hel | -h )
19936 echo "$ac_cs_usage"; exit 0 ;;
19937 --debug | --d* | -d )
19939 --file | --fil | --fi | --f )
19941 CONFIG_FILES="$CONFIG_FILES $1"
19942 ac_need_defaults=false;;
19943 --header | --heade | --head | --hea )
19945 CONFIG_HEADERS="$CONFIG_HEADERS $1"
19946 ac_need_defaults=false;;
19948 # This is an error.
19949 -*) { { echo "$as_me:19949: error: unrecognized option: $1
19950 Try \`$0 --help' for more information." >&5
19951 echo "$as_me: error: unrecognized option: $1
19952 Try \`$0 --help' for more information." >&2;}
19953 { (exit 1); exit 1; }; } ;;
19955 *) ac_config_targets="$ac_config_targets $1" ;;
19964 ## ----------------------- ##
19965 ## Running config.status. ##
19966 ## ----------------------- ##
19968 This file was extended by $as_me 2.52.20170501, executed with
19969 CONFIG_FILES = $CONFIG_FILES
19970 CONFIG_HEADERS = $CONFIG_HEADERS
19971 CONFIG_LINKS = $CONFIG_LINKS
19972 CONFIG_COMMANDS = $CONFIG_COMMANDS
19973 > $ac_cs_invocation
19974 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19979 cat >>$CONFIG_STATUS <<EOF
19981 # INIT-COMMANDS section.
19991 cat >>$CONFIG_STATUS <<\EOF
19992 for ac_config_target in $ac_config_targets
19994 case "$ac_config_target" in
19995 # Handling of arguments.
19996 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19997 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19998 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
19999 *) { { echo "$as_me:19999: error: invalid argument: $ac_config_target" >&5
20000 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20001 { (exit 1); exit 1; }; };;
20005 # If the user did not use the arguments to specify the items to instantiate,
20006 # then the envvar interface is used. Set only those that are not.
20007 # We use the long form for the default assignment because of an extremely
20008 # bizarre bug on SunOS 4.1.3.
20009 if $ac_need_defaults; then
20010 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20011 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20012 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20015 # Create a temporary directory, and hook for its removal unless debugging.
20018 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20019 trap '{ (exit 1); exit 1; }' 1 2 13 15
20022 # Create a (secure) tmp directory for tmp files.
20025 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20026 test -n "$tmp" && test -d "$tmp"
20029 tmp=$TMPDIR/cs$$-$RANDOM
20030 (umask 077 && mkdir $tmp)
20033 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20034 { (exit 1); exit 1; }
20039 cat >>$CONFIG_STATUS <<EOF
20042 # CONFIG_FILES section.
20045 # No need to generate the scripts if there are no CONFIG_FILES.
20046 # This happens for instance when ./config.status config.h
20047 if test -n "\$CONFIG_FILES"; then
20048 # Protect against being on the right side of a sed subst in config.status.
20049 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20050 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20051 s,@SHELL@,$SHELL,;t t
20052 s,@exec_prefix@,$exec_prefix,;t t
20053 s,@prefix@,$prefix,;t t
20054 s,@program_transform_name@,$program_transform_name,;t t
20055 s,@bindir@,$bindir,;t t
20056 s,@sbindir@,$sbindir,;t t
20057 s,@libexecdir@,$libexecdir,;t t
20058 s,@datarootdir@,$datarootdir,;t t
20059 s,@datadir@,$datadir,;t t
20060 s,@sysconfdir@,$sysconfdir,;t t
20061 s,@sharedstatedir@,$sharedstatedir,;t t
20062 s,@localstatedir@,$localstatedir,;t t
20063 s,@libdir@,$libdir,;t t
20064 s,@includedir@,$includedir,;t t
20065 s,@oldincludedir@,$oldincludedir,;t t
20066 s,@infodir@,$infodir,;t t
20067 s,@mandir@,$mandir,;t t
20068 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20069 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20070 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20071 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20072 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20073 s,@build_alias@,$build_alias,;t t
20074 s,@host_alias@,$host_alias,;t t
20075 s,@target_alias@,$target_alias,;t t
20076 s,@ECHO_C@,$ECHO_C,;t t
20077 s,@ECHO_N@,$ECHO_N,;t t
20078 s,@ECHO_T@,$ECHO_T,;t t
20079 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20080 s,@DEFS@,$DEFS,;t t
20081 s,@LIBS@,$LIBS,;t t
20082 s,@build@,$build,;t t
20083 s,@build_cpu@,$build_cpu,;t t
20084 s,@build_vendor@,$build_vendor,;t t
20085 s,@build_os@,$build_os,;t t
20086 s,@host@,$host,;t t
20087 s,@host_cpu@,$host_cpu,;t t
20088 s,@host_vendor@,$host_vendor,;t t
20089 s,@host_os@,$host_os,;t t
20090 s,@SET_MAKE@,$SET_MAKE,;t t
20092 s,@CFLAGS@,$CFLAGS,;t t
20093 s,@LDFLAGS@,$LDFLAGS,;t t
20094 s,@CPPFLAGS@,$CPPFLAGS,;t t
20095 s,@ac_ct_CC@,$ac_ct_CC,;t t
20096 s,@EXEEXT@,$EXEEXT,;t t
20097 s,@OBJEXT@,$OBJEXT,;t t
20098 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20101 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20102 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20103 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20104 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
20105 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
20106 s,@LINT@,$LINT,;t t
20107 s,@LINT_OPTS@,$LINT_OPTS,;t t
20108 s,@CTAGS@,$CTAGS,;t t
20109 s,@ETAGS@,$ETAGS,;t t
20110 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20111 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20112 s,@MATH_LIB@,$MATH_LIB,;t t
20113 s,@top_builddir@,$top_builddir,;t t
20114 s,@CC_G_OPT@,$CC_G_OPT,;t t
20115 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20116 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20117 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20118 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20120 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20121 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20122 s,@LD_MODEL@,$LD_MODEL,;t t
20123 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20124 s,@LIBTOOL@,$LIBTOOL,;t t
20125 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20126 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20127 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20128 s,@LIB_LINK@,$LIB_LINK,;t t
20129 s,@LINK_TESTS@,$LINK_TESTS,;t t
20130 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20131 s,@PACKAGE@,$PACKAGE,;t t
20132 s,@PTHREAD@,$PTHREAD,;t t
20133 s,@TEST_ARGS@,$TEST_ARGS,;t t
20134 s,@TEST_DEPS@,$TEST_DEPS,;t t
20135 s,@TEST_LIBS@,$TEST_LIBS,;t t
20136 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
20137 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20138 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20139 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20140 s,@includesubdir@,$includesubdir,;t t
20141 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20142 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20143 s,@ECHO_LT@,$ECHO_LT,;t t
20144 s,@ECHO_LD@,$ECHO_LD,;t t
20145 s,@RULE_CC@,$RULE_CC,;t t
20146 s,@SHOW_CC@,$SHOW_CC,;t t
20147 s,@ECHO_CC@,$ECHO_CC,;t t
20148 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20149 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
20150 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
20151 s,@X_CFLAGS@,$X_CFLAGS,;t t
20152 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20153 s,@X_LIBS@,$X_LIBS,;t t
20154 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20155 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
20156 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
20157 s,@RGB_PATH@,$RGB_PATH,;t t
20158 s,@no_x11_rgb@,$no_x11_rgb,;t t
20159 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20160 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20161 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20166 cat >>$CONFIG_STATUS <<\EOF
20167 # Split the substitutions into bite-sized pieces for seds with
20168 # small command number limits, like on Digital OSF/1 and HP-UX.
20169 ac_max_sed_lines=48
20170 ac_sed_frag=1 # Number of current file.
20171 ac_beg=1 # First line for current file.
20172 ac_end=$ac_max_sed_lines # Line after last line for current file.
20175 while $ac_more_lines; do
20176 if test $ac_beg -gt 1; then
20177 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20179 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20181 if test ! -s $tmp/subs.frag; then
20182 ac_more_lines=false
20184 # The purpose of the label and of the branching condition is to
20185 # speed up the sed processing (if there are no `@' at all, there
20186 # is no need to browse any of the substitutions).
20187 # These are the two extra sed commands mentioned above.
20189 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20190 # It is possible to make a multiline substitution using escaped newlines.
20191 # Ensure that we do not split the substitution between script fragments.
20193 ac_END=`expr $ac_end + $ac_max_sed_lines`
20194 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
20195 if test -s $tmp/subs.next; then
20196 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
20197 if test ! -s $tmp/subs.edit; then
20198 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
20199 if test ! -s $tmp/subs.edit; then
20200 if test $ac_beg -gt 1; then
20201 ac_end=`expr $ac_end - 1`
20208 if test -z "$ac_sed_cmds"; then
20209 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20211 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20213 ac_sed_frag=`expr $ac_sed_frag + 1`
20215 ac_end=`expr $ac_end + $ac_max_sed_lines`
20218 if test -z "$ac_sed_cmds"; then
20221 fi # test -n "$CONFIG_FILES"
20224 cat >>$CONFIG_STATUS <<\EOF
20225 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20226 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20228 - | *:- | *:-:* ) # input from stdin
20230 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20231 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20232 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20233 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20234 * ) ac_file_in=$ac_file.in ;;
20237 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20238 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20239 X"$ac_file" : 'X\(//\)[^/]' \| \
20240 X"$ac_file" : 'X\(//\)$' \| \
20241 X"$ac_file" : 'X\(/\)' \| \
20242 . : '\(.\)' 2>/dev/null ||
20244 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20245 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20246 /^X\(\/\/\)$/{ s//\1/; q; }
20247 /^X\(\/\).*/{ s//\1/; q; }
20249 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20250 { case "$ac_dir" in
20251 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20255 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20256 case $as_mkdir_dir in
20257 # Skip DOS drivespec
20258 ?:) as_incr_dir=$as_mkdir_dir ;;
20260 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20261 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20266 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20267 # A "../" for each directory in $ac_dir_suffix.
20268 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20270 ac_dir_suffix= ac_dots=
20275 if test -z "$ac_dots"; then
20278 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20280 [\\/]* | ?:[\\/]* )
20281 ac_srcdir=$srcdir$ac_dir_suffix;
20282 ac_top_srcdir=$srcdir ;;
20283 *) # Relative path.
20284 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20285 ac_top_srcdir=$ac_dots$srcdir ;;
20289 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20290 *) ac_INSTALL=$ac_dots$INSTALL ;;
20293 if test x"$ac_file" != x-; then
20294 { echo "$as_me:20294: creating $ac_file" >&5
20295 echo "$as_me: creating $ac_file" >&6;}
20298 # Let's still pretend it is `configure' which instantiates (i.e., don't
20299 # use $as_me), people would be surprised to read:
20300 # /* config.h. Generated automatically by config.status. */
20301 configure_input="Generated automatically from `echo $ac_file_in |
20302 sed 's,.*/,,'` by configure."
20304 # First look for the input files in the build tree, otherwise in the
20306 ac_file_inputs=`IFS=:
20307 for f in $ac_file_in; do
20309 -) echo $tmp/stdin ;;
20311 # Absolute (can't be DOS-style, as IFS=:)
20312 test -f "$f" || { { echo "$as_me:20312: error: cannot find input file: $f" >&5
20313 echo "$as_me: error: cannot find input file: $f" >&2;}
20314 { (exit 1); exit 1; }; }
20317 if test -f "$f"; then
20320 elif test -f "$srcdir/$f"; then
20325 { { echo "$as_me:20325: error: cannot find input file: $f" >&5
20326 echo "$as_me: error: cannot find input file: $f" >&2;}
20327 { (exit 1); exit 1; }; }
20330 done` || { (exit 1); exit 1; }
20332 cat >>$CONFIG_STATUS <<\EOF
20333 ac_warn_datarootdir=no
20334 if test x"$ac_file" != x-; then
20335 for ac_item in $ac_file_inputs
20337 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
20338 if test -n "$ac_seen"; then
20339 ac_used=`grep '@datarootdir@' $ac_item`
20340 if test -z "$ac_used"; then
20341 { echo "$as_me:20341: WARNING: datarootdir was used implicitly but not set:
20343 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
20345 ac_warn_datarootdir=yes
20348 ac_seen=`grep '${datarootdir}' $ac_item`
20349 if test -n "$ac_seen"; then
20350 { echo "$as_me:20350: WARNING: datarootdir was used explicitly but not set:
20352 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
20354 ac_warn_datarootdir=yes
20359 if test "x$ac_warn_datarootdir" = xyes; then
20360 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
20364 cat >>$CONFIG_STATUS <<EOF
20368 cat >>$CONFIG_STATUS <<\EOF
20370 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20371 s,@configure_input@,$configure_input,;t t
20372 s,@srcdir@,$ac_srcdir,;t t
20373 s,@top_srcdir@,$ac_top_srcdir,;t t
20374 s,@INSTALL@,$ac_INSTALL,;t t
20375 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20377 if test x"$ac_file" != x-; then
20378 cp $tmp/out $ac_file
20380 for ac_name in prefix exec_prefix datarootdir
20382 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
20383 if test -n "$ac_seen"; then
20384 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
20385 if test -z "$ac_init"; then
20386 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
20387 { echo "$as_me:20387: WARNING: Variable $ac_name is used but was not set:
20389 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
20394 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
20395 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
20396 if test -s $tmp/out; then
20397 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
20398 { echo "$as_me:20398: WARNING: Some variables may not be substituted:
20400 echo "$as_me: WARNING: Some variables may not be substituted:
20410 cat >>$CONFIG_STATUS <<\EOF
20413 # CONFIG_HEADER section.
20416 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20417 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20419 # ac_d sets the value in "#define NAME VALUE" lines.
20420 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
20421 ac_dB='[ ].*$,\1#\2'
20424 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20425 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20426 ac_iB='\([ ]\),\1#\2define\3'
20429 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20430 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20431 ac_uB='$,\1#\2define\3'
20435 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20436 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20438 - | *:- | *:-:* ) # input from stdin
20440 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20441 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20442 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20443 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20444 * ) ac_file_in=$ac_file.in ;;
20447 test x"$ac_file" != x- && { echo "$as_me:20447: creating $ac_file" >&5
20448 echo "$as_me: creating $ac_file" >&6;}
20450 # First look for the input files in the build tree, otherwise in the
20452 ac_file_inputs=`IFS=:
20453 for f in $ac_file_in; do
20455 -) echo $tmp/stdin ;;
20457 # Absolute (can't be DOS-style, as IFS=:)
20458 test -f "$f" || { { echo "$as_me:20458: error: cannot find input file: $f" >&5
20459 echo "$as_me: error: cannot find input file: $f" >&2;}
20460 { (exit 1); exit 1; }; }
20463 if test -f "$f"; then
20466 elif test -f "$srcdir/$f"; then
20471 { { echo "$as_me:20471: error: cannot find input file: $f" >&5
20472 echo "$as_me: error: cannot find input file: $f" >&2;}
20473 { (exit 1); exit 1; }; }
20476 done` || { (exit 1); exit 1; }
20477 # Remove the trailing spaces.
20478 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
20482 # Transform confdefs.h into a list of #define's. We won't use it as a sed
20483 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
20484 # be either 'cat' or 'sort'.
20485 cat confdefs.h | uniq >conftest.vals
20487 # Break up conftest.vals because some shells have a limit on
20488 # the size of here documents, and old seds have small limits too.
20490 rm -f conftest.tail
20491 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
20492 while grep . conftest.vals >/dev/null
20494 # Write chunks of a limited-size here document to conftest.frag.
20495 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20496 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20497 echo 'CEOF' >> $CONFIG_STATUS
20498 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20499 rm -f conftest.vals
20500 mv conftest.tail conftest.vals
20502 rm -f conftest.vals
20504 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20506 echo ' cat >> conftest.edit <<CEOF
20507 /@DEFS@/r conftest.frag
20510 sed -f conftest.edit $tmp/in > $tmp/out
20512 mv $tmp/out $tmp/in
20513 rm -f conftest.edit conftest.frag
20514 ' >> $CONFIG_STATUS
20516 cat >>$CONFIG_STATUS <<\EOF
20517 # Let's still pretend it is `configure' which instantiates (i.e., don't
20518 # use $as_me), people would be surprised to read:
20519 # /* config.h. Generated automatically by config.status. */
20520 if test x"$ac_file" = x-; then
20521 echo "/* Generated automatically by configure. */" >$tmp/config.h
20523 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
20525 cat $tmp/in >>$tmp/config.h
20527 if test x"$ac_file" != x-; then
20528 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20529 { echo "$as_me:20529: $ac_file is unchanged" >&5
20530 echo "$as_me: $ac_file is unchanged" >&6;}
20532 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20533 X"$ac_file" : 'X\(//\)[^/]' \| \
20534 X"$ac_file" : 'X\(//\)$' \| \
20535 X"$ac_file" : 'X\(/\)' \| \
20536 . : '\(.\)' 2>/dev/null ||
20538 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20539 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20540 /^X\(\/\/\)$/{ s//\1/; q; }
20541 /^X\(\/\).*/{ s//\1/; q; }
20543 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20544 { case "$ac_dir" in
20545 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20549 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20550 case $as_mkdir_dir in
20551 # Skip DOS drivespec
20552 ?:) as_incr_dir=$as_mkdir_dir ;;
20554 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20555 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20562 mv $tmp/config.h $ac_file
20566 rm -f $tmp/config.h
20570 cat >>$CONFIG_STATUS <<\EOF
20572 # CONFIG_COMMANDS section.
20574 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20575 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20576 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20583 if test ! -d $srcdir/$cf_dir; then
20585 elif test -f $srcdir/$cf_dir/programs; then
20586 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20590 cat >>Makefile <<TEST_EOF
20592 # These rules are generated so we do not rely on suffix rules, which do not
20593 # work consistently for different make-programs (the '\$(MODEL)/' confuses
20594 # some, and the '\$x' confuses others).
20597 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
20600 cat >>Makefile <<TEST_EOF
20602 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
20603 \$(srcdir)/test.priv.h \\
20606 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
20610 if test -f ../config.guess && test -f ../config.sub
20612 cat >>Makefile <<TEST_EOF
20614 # if we used CF_INHERIT for getting these files, we can remove them
20616 rm -f config.guess config.sub
20624 cat >>$CONFIG_STATUS <<\EOF
20626 { (exit 0); exit 0; }
20628 chmod +x $CONFIG_STATUS
20629 ac_clean_files=$ac_clean_files_save
20631 # configure is writing to config.log, and then calls config.status.
20632 # config.status does its own redirection, appending to config.log.
20633 # Unfortunately, on DOS this fails, as config.log is still kept open
20634 # by configure, so config.status won't be able to write to it; its
20635 # output is simply discarded. So we exec the FD to /dev/null,
20636 # effectively closing config.log, so it can be properly (re)opened and
20637 # appended to by config.status. When coming back to configure, we
20638 # need to make the FD available again.
20639 if test "$no_create" != yes; then
20642 $SHELL $CONFIG_STATUS || ac_cs_success=false
20644 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20645 # would make configure fail if this is the last instruction.
20646 $ac_cs_success || { (exit 1); exit 1; }