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)
657 --enable-string-hacks work around bogus compiler/loader warnings
659 --with-pkg-config{=path} enable/disable use of pkg-config
660 --disable-echo do not display "compiling" commands
661 Curses Version-dependent Options:
662 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
663 --disable-widec disable checks for wide-character functions
664 --with-curses-dir=DIR directory in which (n)curses is installed
665 --with-screen=XXX use specified curses-libraries
666 --with-ncursesw use wide ncurses-libraries
667 --with-ncurses use ncurses-libraries
668 --with-pdcurses compile/link with pdcurses X11 library
669 --with-curses-colr compile/link with HPUX 10.x color-curses
670 --with-curses-5lib compile/link with SunOS 5lib curses
671 --with-Xaw3d link with Xaw 3d library
672 --with-Xaw3dxft link with Xaw 3d xft library
673 --with-neXtaw link with neXT Athena library
674 --with-XawPlus link with Athena-Plus library
675 --with-x use the X Window System
676 --disable-panel disable checks for panel functions
677 --disable-menu disable checks for menu functions
678 --disable-form disable checks for form functions
679 Testing/development Options:
680 --enable-warnings test: turn on gcc compiler warnings
681 --with-dmalloc test: use Gray Watson's dmalloc library
682 --with-dbmalloc test: use Conor Cahill's dbmalloc library
683 --with-valgrind test: use valgrind
684 --disable-leaks test: free permanent memory, analyze leaks
685 --disable-rpath-hack don't add rpath options for additional libraries
687 Some influential environment variables:
688 CC C compiler command
689 CFLAGS C compiler flags
690 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
691 nonstandard directory <lib dir>
692 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
693 headers in a nonstandard directory <include dir>
696 Use these variables to override the choices made by `configure' or to help
697 it to find libraries and programs with nonstandard names/locations.
702 if test "$ac_init_help" = "recursive"; then
703 # If there are subdirs, report their specific --help.
705 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
707 # A "../" for each directory in /$ac_subdir.
708 ac_dots=`echo $ac_subdir |
709 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
712 .) # No --srcdir option. We are building in place.
713 ac_sub_srcdir=$srcdir ;;
714 [\\/]* | ?:[\\/]* ) # Absolute path.
715 ac_sub_srcdir=$srcdir/$ac_subdir ;;
717 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
720 # Check for guested configure; otherwise get Cygnus style configure.
721 if test -f $ac_sub_srcdir/configure.gnu; then
723 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
724 elif test -f $ac_sub_srcdir/configure; then
726 $SHELL $ac_sub_srcdir/configure --help=recursive
727 elif test -f $ac_sub_srcdir/configure.ac ||
728 test -f $ac_sub_srcdir/configure.in; then
732 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
738 test -n "$ac_init_help" && exit 0
739 if $ac_init_version; then
742 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
743 Free Software Foundation, Inc.
744 This configure script is free software; the Free Software Foundation
745 gives unlimited permission to copy, distribute and modify it.
751 This file contains any messages produced by compilers while
752 running configure, to aid debugging if configure makes a mistake.
754 It was created by $as_me, which was
755 generated by GNU Autoconf 2.52.20170501. Invocation command line was
766 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
767 uname -m = `(uname -m) 2>/dev/null || echo unknown`
768 uname -r = `(uname -r) 2>/dev/null || echo unknown`
769 uname -s = `(uname -s) 2>/dev/null || echo unknown`
770 uname -v = `(uname -v) 2>/dev/null || echo unknown`
772 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
773 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
775 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
776 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
777 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
778 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
779 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
780 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
781 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
795 # Keep a trace of the command line.
796 # Strip out --no-create and --no-recursion so they do not pile up.
797 # Also quote any args containing shell meta-characters.
803 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
804 | --no-cr | --no-c) ;;
805 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
806 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
807 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
808 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
809 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
811 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
814 # Get rid of the leading space.
817 # When interrupted or exit'd, cleanup temporary files, and complete
818 # config.log. We remove comments because anyway the quotes in there
819 # would cause problems or look ugly.
821 # Save into config.log some information that might help in debugging.
823 echo "## ----------------- ##" >&5
824 echo "## Cache variables. ##" >&5
825 echo "## ----------------- ##" >&5
827 # The following way of writing the cache mishandles newlines in values,
830 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
833 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
834 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
838 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
842 sed "/^$/d" confdefs.h >conftest.log
843 if test -s conftest.log; then
845 echo "## ------------ ##" >&5
846 echo "## confdefs.h. ##" >&5
847 echo "## ------------ ##" >&5
852 test "$ac_signal" != 0 &&
853 echo "$as_me: caught signal $ac_signal" >&5
854 echo "$as_me: exit $exit_status" >&5
855 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
858 for ac_signal in 1 2 13 15; do
859 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
863 # confdefs.h avoids OS command line length limits that DEFS can exceed.
864 rm -rf conftest* confdefs.h
865 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
868 # Let the site file select an alternate cache file if it wants to.
869 # Prefer explicitly selected file to automatically selected ones.
870 if test -z "$CONFIG_SITE"; then
871 if test "x$prefix" != xNONE; then
872 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
874 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
877 for ac_site_file in $CONFIG_SITE; do
878 if test -r "$ac_site_file"; then
879 { echo "$as_me:879: loading site script $ac_site_file" >&5
880 echo "$as_me: loading site script $ac_site_file" >&6;}
881 cat "$ac_site_file" >&5
886 if test -r "$cache_file"; then
887 # Some versions of bash will fail to source /dev/null (special
888 # files actually), so we avoid doing that.
889 if test -f "$cache_file"; then
890 { echo "$as_me:890: loading cache $cache_file" >&5
891 echo "$as_me: loading cache $cache_file" >&6;}
893 [\\/]* | ?:[\\/]* ) . $cache_file;;
898 { echo "$as_me:898: creating cache $cache_file" >&5
899 echo "$as_me: creating cache $cache_file" >&6;}
903 # Check that the precious variables saved in the cache have kept the same
905 ac_cache_corrupted=false
906 for ac_var in `(set) 2>&1 |
907 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
908 eval ac_old_set=\$ac_cv_env_${ac_var}_set
909 eval ac_new_set=\$ac_env_${ac_var}_set
910 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
911 eval ac_new_val="\$ac_env_${ac_var}_value"
912 case $ac_old_set,$ac_new_set in
914 { echo "$as_me:914: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
915 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
916 ac_cache_corrupted=: ;;
918 { echo "$as_me:918: error: \`$ac_var' was not set in the previous run" >&5
919 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
920 ac_cache_corrupted=: ;;
923 if test "x$ac_old_val" != "x$ac_new_val"; then
924 { echo "$as_me:924: error: \`$ac_var' has changed since the previous run:" >&5
925 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
926 { echo "$as_me:926: former value: $ac_old_val" >&5
927 echo "$as_me: former value: $ac_old_val" >&2;}
928 { echo "$as_me:928: current value: $ac_new_val" >&5
929 echo "$as_me: current value: $ac_new_val" >&2;}
933 # Pass precious variables to config.status. It doesn't matter if
934 # we pass some twice (in addition to the command line arguments).
935 if test "$ac_new_set" = set; then
937 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
938 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
939 ac_configure_args="$ac_configure_args '$ac_arg'"
941 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
946 if $ac_cache_corrupted; then
947 { echo "$as_me:947: error: changes in the environment can compromise the build" >&5
948 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
949 { { echo "$as_me:949: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
950 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
951 { (exit 1); exit 1; }; }
955 ac_cpp='$CPP $CPPFLAGS'
956 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
957 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
958 ac_compiler_gnu=$ac_cv_c_compiler_gnu
959 ac_main_return=return
961 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
962 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
964 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
965 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
967 echo "#! $SHELL" >conftest.sh
968 echo "exit 0" >>conftest.sh
970 if { (echo "$as_me:970: PATH=\".;.\"; conftest.sh") >&5
971 (PATH=".;."; conftest.sh) 2>&5
973 echo "$as_me:973: \$? = $ac_status" >&5
974 (exit $ac_status); }; then
975 ac_path_separator=';'
979 PATH_SEPARATOR="$ac_path_separator"
982 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
984 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
986 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
989 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
990 if test -f $ac_dir/install-sh; then
992 ac_install_sh="$ac_aux_dir/install-sh -c"
994 elif test -f $ac_dir/install.sh; then
996 ac_install_sh="$ac_aux_dir/install.sh -c"
998 elif test -f $ac_dir/shtool; then
1000 ac_install_sh="$ac_aux_dir/shtool install -c"
1004 if test -z "$ac_aux_dir"; then
1005 { { echo "$as_me:1005: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1006 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1007 { (exit 1); exit 1; }; }
1009 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1010 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1011 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1013 # Make sure we can run config.sub.
1014 $ac_config_sub sun4 >/dev/null 2>&1 ||
1015 { { echo "$as_me:1015: error: cannot run $ac_config_sub" >&5
1016 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1017 { (exit 1); exit 1; }; }
1019 echo "$as_me:1019: checking build system type" >&5
1020 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1021 if test "${ac_cv_build+set}" = set; then
1022 echo $ECHO_N "(cached) $ECHO_C" >&6
1024 ac_cv_build_alias=$build_alias
1025 test -z "$ac_cv_build_alias" &&
1026 ac_cv_build_alias=`$ac_config_guess`
1027 test -z "$ac_cv_build_alias" &&
1028 { { echo "$as_me:1028: error: cannot guess build type; you must specify one" >&5
1029 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1030 { (exit 1); exit 1; }; }
1031 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1032 { { echo "$as_me:1032: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1033 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1034 { (exit 1); exit 1; }; }
1037 echo "$as_me:1037: result: $ac_cv_build" >&5
1038 echo "${ECHO_T}$ac_cv_build" >&6
1040 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1041 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1042 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1044 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1045 echo "$as_me:1045: checking host system type" >&5
1046 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1047 if test "${ac_cv_host+set}" = set; then
1048 echo $ECHO_N "(cached) $ECHO_C" >&6
1050 ac_cv_host_alias=$host_alias
1051 test -z "$ac_cv_host_alias" &&
1052 ac_cv_host_alias=$ac_cv_build_alias
1053 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1054 { { echo "$as_me:1054: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1055 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1056 { (exit 1); exit 1; }; }
1059 echo "$as_me:1059: result: $ac_cv_host" >&5
1060 echo "${ECHO_T}$ac_cv_host" >&6
1062 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1063 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1064 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1066 system_name="$host_os"
1068 system_name="`(uname -s -r) 2>/dev/null`"
1069 if test -z "$system_name" ; then
1070 system_name="`(hostname) 2>/dev/null`"
1073 test -n "$system_name" &&
1074 cat >>confdefs.h <<EOF
1075 #define SYSTEM_NAME "$system_name"
1078 if test "${cf_cv_system_name+set}" = set; then
1079 echo $ECHO_N "(cached) $ECHO_C" >&6
1081 cf_cv_system_name="$system_name"
1084 test -z "$system_name" && system_name="$cf_cv_system_name"
1085 test -n "$cf_cv_system_name" && echo "$as_me:1085: result: Configuring for $cf_cv_system_name" >&5
1086 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1088 if test ".$system_name" != ".$cf_cv_system_name" ; then
1089 echo "$as_me:1089: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1090 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1091 { { echo "$as_me:1091: error: \"Please remove config.cache and try again.\"" >&5
1092 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1093 { (exit 1); exit 1; }; }
1096 test "$program_prefix" != NONE &&
1097 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1098 # Use a double $ so make ignores it.
1099 test "$program_suffix" != NONE &&
1100 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1101 # Double any \ or $. echo might interpret backslashes.
1102 # By default was `s,x,x', remove it if useless.
1103 cat <<\_ACEOF >conftest.sed
1104 s/[\\$]/&&/g;s/;s,x,x,$//
1106 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1109 echo "$as_me:1109: checking whether ${MAKE-make} sets \${MAKE}" >&5
1110 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1111 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1112 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1113 echo $ECHO_N "(cached) $ECHO_C" >&6
1115 cat >conftest.make <<\EOF
1117 @echo 'ac_maketemp="${MAKE}"'
1119 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1120 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1121 if test -n "$ac_maketemp"; then
1122 eval ac_cv_prog_make_${ac_make}_set=yes
1124 eval ac_cv_prog_make_${ac_make}_set=no
1128 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1129 echo "$as_me:1129: result: yes" >&5
1130 echo "${ECHO_T}yes" >&6
1133 echo "$as_me:1133: result: no" >&5
1134 echo "${ECHO_T}no" >&6
1135 SET_MAKE="MAKE=${MAKE-make}"
1139 ac_cpp='$CPP $CPPFLAGS'
1140 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1141 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1142 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1143 ac_main_return=return
1144 if test -n "$ac_tool_prefix"; then
1145 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1146 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1147 echo "$as_me:1147: checking for $ac_word" >&5
1148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1149 if test "${ac_cv_prog_CC+set}" = set; then
1150 echo $ECHO_N "(cached) $ECHO_C" >&6
1152 if test -n "$CC"; then
1153 ac_cv_prog_CC="$CC" # Let the user override the test.
1155 ac_save_IFS=$IFS; IFS=$ac_path_separator
1157 for ac_dir in $ac_dummy; do
1159 test -z "$ac_dir" && ac_dir=.
1160 $as_executable_p "$ac_dir/$ac_word" || continue
1161 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1162 echo "$as_me:1162: found $ac_dir/$ac_word" >&5
1169 if test -n "$CC"; then
1170 echo "$as_me:1170: result: $CC" >&5
1171 echo "${ECHO_T}$CC" >&6
1173 echo "$as_me:1173: result: no" >&5
1174 echo "${ECHO_T}no" >&6
1178 if test -z "$ac_cv_prog_CC"; then
1180 # Extract the first word of "gcc", so it can be a program name with args.
1181 set dummy gcc; ac_word=$2
1182 echo "$as_me:1182: checking for $ac_word" >&5
1183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1184 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1185 echo $ECHO_N "(cached) $ECHO_C" >&6
1187 if test -n "$ac_ct_CC"; then
1188 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1190 ac_save_IFS=$IFS; IFS=$ac_path_separator
1192 for ac_dir in $ac_dummy; do
1194 test -z "$ac_dir" && ac_dir=.
1195 $as_executable_p "$ac_dir/$ac_word" || continue
1196 ac_cv_prog_ac_ct_CC="gcc"
1197 echo "$as_me:1197: found $ac_dir/$ac_word" >&5
1203 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1204 if test -n "$ac_ct_CC"; then
1205 echo "$as_me:1205: result: $ac_ct_CC" >&5
1206 echo "${ECHO_T}$ac_ct_CC" >&6
1208 echo "$as_me:1208: result: no" >&5
1209 echo "${ECHO_T}no" >&6
1217 if test -z "$CC"; then
1218 if test -n "$ac_tool_prefix"; then
1219 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1220 set dummy ${ac_tool_prefix}cc; ac_word=$2
1221 echo "$as_me:1221: checking for $ac_word" >&5
1222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1223 if test "${ac_cv_prog_CC+set}" = set; then
1224 echo $ECHO_N "(cached) $ECHO_C" >&6
1226 if test -n "$CC"; then
1227 ac_cv_prog_CC="$CC" # Let the user override the test.
1229 ac_save_IFS=$IFS; IFS=$ac_path_separator
1231 for ac_dir in $ac_dummy; do
1233 test -z "$ac_dir" && ac_dir=.
1234 $as_executable_p "$ac_dir/$ac_word" || continue
1235 ac_cv_prog_CC="${ac_tool_prefix}cc"
1236 echo "$as_me:1236: found $ac_dir/$ac_word" >&5
1243 if test -n "$CC"; then
1244 echo "$as_me:1244: result: $CC" >&5
1245 echo "${ECHO_T}$CC" >&6
1247 echo "$as_me:1247: result: no" >&5
1248 echo "${ECHO_T}no" >&6
1252 if test -z "$ac_cv_prog_CC"; then
1254 # Extract the first word of "cc", so it can be a program name with args.
1255 set dummy cc; ac_word=$2
1256 echo "$as_me:1256: checking for $ac_word" >&5
1257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1258 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1259 echo $ECHO_N "(cached) $ECHO_C" >&6
1261 if test -n "$ac_ct_CC"; then
1262 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1264 ac_save_IFS=$IFS; IFS=$ac_path_separator
1266 for ac_dir in $ac_dummy; do
1268 test -z "$ac_dir" && ac_dir=.
1269 $as_executable_p "$ac_dir/$ac_word" || continue
1270 ac_cv_prog_ac_ct_CC="cc"
1271 echo "$as_me:1271: found $ac_dir/$ac_word" >&5
1277 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1278 if test -n "$ac_ct_CC"; then
1279 echo "$as_me:1279: result: $ac_ct_CC" >&5
1280 echo "${ECHO_T}$ac_ct_CC" >&6
1282 echo "$as_me:1282: result: no" >&5
1283 echo "${ECHO_T}no" >&6
1292 if test -z "$CC"; then
1293 # Extract the first word of "cc", so it can be a program name with args.
1294 set dummy cc; ac_word=$2
1295 echo "$as_me:1295: checking for $ac_word" >&5
1296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1297 if test "${ac_cv_prog_CC+set}" = set; then
1298 echo $ECHO_N "(cached) $ECHO_C" >&6
1300 if test -n "$CC"; then
1301 ac_cv_prog_CC="$CC" # Let the user override the test.
1304 ac_save_IFS=$IFS; IFS=$ac_path_separator
1306 for ac_dir in $ac_dummy; do
1308 test -z "$ac_dir" && ac_dir=.
1309 $as_executable_p "$ac_dir/$ac_word" || continue
1310 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1311 ac_prog_rejected=yes
1315 echo "$as_me:1315: found $ac_dir/$ac_word" >&5
1319 if test $ac_prog_rejected = yes; then
1320 # We found a bogon in the path, so make sure we never use it.
1321 set dummy $ac_cv_prog_CC
1323 if test $# != 0; then
1324 # We chose a different compiler from the bogus one.
1325 # However, it has the same basename, so the bogon will be chosen
1326 # first if we set CC to just the basename; use the full file name.
1328 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1336 if test -n "$CC"; then
1337 echo "$as_me:1337: result: $CC" >&5
1338 echo "${ECHO_T}$CC" >&6
1340 echo "$as_me:1340: result: no" >&5
1341 echo "${ECHO_T}no" >&6
1345 if test -z "$CC"; then
1346 if test -n "$ac_tool_prefix"; then
1349 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1350 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1351 echo "$as_me:1351: checking for $ac_word" >&5
1352 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1353 if test "${ac_cv_prog_CC+set}" = set; then
1354 echo $ECHO_N "(cached) $ECHO_C" >&6
1356 if test -n "$CC"; then
1357 ac_cv_prog_CC="$CC" # Let the user override the test.
1359 ac_save_IFS=$IFS; IFS=$ac_path_separator
1361 for ac_dir in $ac_dummy; do
1363 test -z "$ac_dir" && ac_dir=.
1364 $as_executable_p "$ac_dir/$ac_word" || continue
1365 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1366 echo "$as_me:1366: found $ac_dir/$ac_word" >&5
1373 if test -n "$CC"; then
1374 echo "$as_me:1374: result: $CC" >&5
1375 echo "${ECHO_T}$CC" >&6
1377 echo "$as_me:1377: result: no" >&5
1378 echo "${ECHO_T}no" >&6
1381 test -n "$CC" && break
1384 if test -z "$CC"; then
1388 # Extract the first word of "$ac_prog", so it can be a program name with args.
1389 set dummy $ac_prog; ac_word=$2
1390 echo "$as_me:1390: checking for $ac_word" >&5
1391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1392 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1393 echo $ECHO_N "(cached) $ECHO_C" >&6
1395 if test -n "$ac_ct_CC"; then
1396 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1398 ac_save_IFS=$IFS; IFS=$ac_path_separator
1400 for ac_dir in $ac_dummy; do
1402 test -z "$ac_dir" && ac_dir=.
1403 $as_executable_p "$ac_dir/$ac_word" || continue
1404 ac_cv_prog_ac_ct_CC="$ac_prog"
1405 echo "$as_me:1405: found $ac_dir/$ac_word" >&5
1411 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1412 if test -n "$ac_ct_CC"; then
1413 echo "$as_me:1413: result: $ac_ct_CC" >&5
1414 echo "${ECHO_T}$ac_ct_CC" >&6
1416 echo "$as_me:1416: result: no" >&5
1417 echo "${ECHO_T}no" >&6
1420 test -n "$ac_ct_CC" && break
1428 test -z "$CC" && { { echo "$as_me:1428: error: no acceptable cc found in \$PATH" >&5
1429 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1430 { (exit 1); exit 1; }; }
1432 # Provide some information about the compiler.
1433 echo "$as_me:1433:" \
1434 "checking for C compiler version" >&5
1435 ac_compiler=`set X $ac_compile; echo $2`
1436 { (eval echo "$as_me:1436: \"$ac_compiler --version </dev/null >&5\"") >&5
1437 (eval $ac_compiler --version </dev/null >&5) 2>&5
1439 echo "$as_me:1439: \$? = $ac_status" >&5
1440 (exit $ac_status); }
1441 { (eval echo "$as_me:1441: \"$ac_compiler -v </dev/null >&5\"") >&5
1442 (eval $ac_compiler -v </dev/null >&5) 2>&5
1444 echo "$as_me:1444: \$? = $ac_status" >&5
1445 (exit $ac_status); }
1446 { (eval echo "$as_me:1446: \"$ac_compiler -V </dev/null >&5\"") >&5
1447 (eval $ac_compiler -V </dev/null >&5) 2>&5
1449 echo "$as_me:1449: \$? = $ac_status" >&5
1450 (exit $ac_status); }
1452 cat >conftest.$ac_ext <<_ACEOF
1453 #line 1453 "configure"
1454 #include "confdefs.h"
1464 ac_clean_files_save=$ac_clean_files
1465 ac_clean_files="$ac_clean_files a.out a.exe"
1466 # Try to create an executable without -o first, disregard a.out.
1467 # It will help us diagnose broken compilers, and finding out an intuition
1469 echo "$as_me:1469: checking for C compiler default output" >&5
1470 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1471 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1472 if { (eval echo "$as_me:1472: \"$ac_link_default\"") >&5
1473 (eval $ac_link_default) 2>&5
1475 echo "$as_me:1475: \$? = $ac_status" >&5
1476 (exit $ac_status); }; then
1477 # Find the output, starting from the most likely. This scheme is
1478 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1480 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1481 ls a.out conftest 2>/dev/null;
1482 ls a.* conftest.* 2>/dev/null`; do
1484 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1485 a.out ) # We found the default executable, but exeext='' is most
1488 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1489 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1496 echo "$as_me: failed program was:" >&5
1497 cat conftest.$ac_ext >&5
1498 { { echo "$as_me:1498: error: C compiler cannot create executables" >&5
1499 echo "$as_me: error: C compiler cannot create executables" >&2;}
1500 { (exit 77); exit 77; }; }
1503 ac_exeext=$ac_cv_exeext
1504 echo "$as_me:1504: result: $ac_file" >&5
1505 echo "${ECHO_T}$ac_file" >&6
1507 # Check the compiler produces executables we can run. If not, either
1508 # the compiler is broken, or we cross compile.
1509 echo "$as_me:1509: checking whether the C compiler works" >&5
1510 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1511 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1512 # If not cross compiling, check that we can run a simple program.
1513 if test "$cross_compiling" != yes; then
1514 if { ac_try='./$ac_file'
1515 { (eval echo "$as_me:1515: \"$ac_try\"") >&5
1518 echo "$as_me:1518: \$? = $ac_status" >&5
1519 (exit $ac_status); }; }; then
1522 if test "$cross_compiling" = maybe; then
1525 { { echo "$as_me:1525: error: cannot run C compiled programs.
1526 If you meant to cross compile, use \`--host'." >&5
1527 echo "$as_me: error: cannot run C compiled programs.
1528 If you meant to cross compile, use \`--host'." >&2;}
1529 { (exit 1); exit 1; }; }
1533 echo "$as_me:1533: result: yes" >&5
1534 echo "${ECHO_T}yes" >&6
1536 rm -f a.out a.exe conftest$ac_cv_exeext
1537 ac_clean_files=$ac_clean_files_save
1538 # Check the compiler produces executables we can run. If not, either
1539 # the compiler is broken, or we cross compile.
1540 echo "$as_me:1540: checking whether we are cross compiling" >&5
1541 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1542 echo "$as_me:1542: result: $cross_compiling" >&5
1543 echo "${ECHO_T}$cross_compiling" >&6
1545 echo "$as_me:1545: checking for executable suffix" >&5
1546 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1547 if { (eval echo "$as_me:1547: \"$ac_link\"") >&5
1548 (eval $ac_link) 2>&5
1550 echo "$as_me:1550: \$? = $ac_status" >&5
1551 (exit $ac_status); }; then
1552 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1553 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1554 # work properly (i.e., refer to `conftest.exe'), while it won't with
1556 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1558 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1559 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1566 { { echo "$as_me:1566: error: cannot compute EXEEXT: cannot compile and link" >&5
1567 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1568 { (exit 1); exit 1; }; }
1571 rm -f conftest$ac_cv_exeext
1572 echo "$as_me:1572: result: $ac_cv_exeext" >&5
1573 echo "${ECHO_T}$ac_cv_exeext" >&6
1575 rm -f conftest.$ac_ext
1576 EXEEXT=$ac_cv_exeext
1578 echo "$as_me:1578: checking for object suffix" >&5
1579 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1580 if test "${ac_cv_objext+set}" = set; then
1581 echo $ECHO_N "(cached) $ECHO_C" >&6
1583 cat >conftest.$ac_ext <<_ACEOF
1584 #line 1584 "configure"
1585 #include "confdefs.h"
1595 rm -f conftest.o conftest.obj
1596 if { (eval echo "$as_me:1596: \"$ac_compile\"") >&5
1597 (eval $ac_compile) 2>&5
1599 echo "$as_me:1599: \$? = $ac_status" >&5
1600 (exit $ac_status); }; then
1601 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1603 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1604 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1609 echo "$as_me: failed program was:" >&5
1610 cat conftest.$ac_ext >&5
1611 { { echo "$as_me:1611: error: cannot compute OBJEXT: cannot compile" >&5
1612 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1613 { (exit 1); exit 1; }; }
1616 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1618 echo "$as_me:1618: result: $ac_cv_objext" >&5
1619 echo "${ECHO_T}$ac_cv_objext" >&6
1620 OBJEXT=$ac_cv_objext
1622 echo "$as_me:1622: checking whether we are using the GNU C compiler" >&5
1623 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1624 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1625 echo $ECHO_N "(cached) $ECHO_C" >&6
1627 cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1642 rm -f conftest.$ac_objext
1643 if { (eval echo "$as_me:1643: \"$ac_compile\"") >&5
1644 (eval $ac_compile) 2>&5
1646 echo "$as_me:1646: \$? = $ac_status" >&5
1647 (exit $ac_status); } &&
1648 { ac_try='test -s conftest.$ac_objext'
1649 { (eval echo "$as_me:1649: \"$ac_try\"") >&5
1652 echo "$as_me:1652: \$? = $ac_status" >&5
1653 (exit $ac_status); }; }; then
1656 echo "$as_me: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
1660 rm -f conftest.$ac_objext conftest.$ac_ext
1661 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1664 echo "$as_me:1664: result: $ac_cv_c_compiler_gnu" >&5
1665 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1666 GCC=`test $ac_compiler_gnu = yes && echo yes`
1667 ac_test_CFLAGS=${CFLAGS+set}
1668 ac_save_CFLAGS=$CFLAGS
1670 echo "$as_me:1670: checking whether $CC accepts -g" >&5
1671 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1672 if test "${ac_cv_prog_cc_g+set}" = set; then
1673 echo $ECHO_N "(cached) $ECHO_C" >&6
1675 cat >conftest.$ac_ext <<_ACEOF
1676 #line 1676 "configure"
1677 #include "confdefs.h"
1687 rm -f conftest.$ac_objext
1688 if { (eval echo "$as_me:1688: \"$ac_compile\"") >&5
1689 (eval $ac_compile) 2>&5
1691 echo "$as_me:1691: \$? = $ac_status" >&5
1692 (exit $ac_status); } &&
1693 { ac_try='test -s conftest.$ac_objext'
1694 { (eval echo "$as_me:1694: \"$ac_try\"") >&5
1697 echo "$as_me:1697: \$? = $ac_status" >&5
1698 (exit $ac_status); }; }; then
1701 echo "$as_me: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
1705 rm -f conftest.$ac_objext conftest.$ac_ext
1707 echo "$as_me:1707: result: $ac_cv_prog_cc_g" >&5
1708 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1709 if test "$ac_test_CFLAGS" = set; then
1710 CFLAGS=$ac_save_CFLAGS
1711 elif test $ac_cv_prog_cc_g = yes; then
1712 if test "$GCC" = yes; then
1718 if test "$GCC" = yes; then
1724 # Some people use a C++ compiler to compile C. Since we use `exit',
1725 # in C++ we need to declare it. In case someone uses the same compiler
1726 # for both compiling C and C++ we need to have the C++ compiler decide
1727 # the declaration of exit, since it's the most demanding environment.
1728 cat >conftest.$ac_ext <<_ACEOF
1733 rm -f conftest.$ac_objext
1734 if { (eval echo "$as_me:1734: \"$ac_compile\"") >&5
1735 (eval $ac_compile) 2>&5
1737 echo "$as_me:1737: \$? = $ac_status" >&5
1738 (exit $ac_status); } &&
1739 { ac_try='test -s conftest.$ac_objext'
1740 { (eval echo "$as_me:1740: \"$ac_try\"") >&5
1743 echo "$as_me:1743: \$? = $ac_status" >&5
1744 (exit $ac_status); }; }; then
1745 for ac_declaration in \
1747 '#include <stdlib.h>' \
1748 'extern "C" void std::exit (int) throw (); using std::exit;' \
1749 'extern "C" void std::exit (int); using std::exit;' \
1750 'extern "C" void exit (int) throw ();' \
1751 'extern "C" void exit (int);' \
1754 cat >conftest.$ac_ext <<_ACEOF
1755 #line 1755 "configure"
1756 #include "confdefs.h"
1767 rm -f conftest.$ac_objext
1768 if { (eval echo "$as_me:1768: \"$ac_compile\"") >&5
1769 (eval $ac_compile) 2>&5
1771 echo "$as_me:1771: \$? = $ac_status" >&5
1772 (exit $ac_status); } &&
1773 { ac_try='test -s conftest.$ac_objext'
1774 { (eval echo "$as_me:1774: \"$ac_try\"") >&5
1777 echo "$as_me:1777: \$? = $ac_status" >&5
1778 (exit $ac_status); }; }; then
1781 echo "$as_me: failed program was:" >&5
1782 cat conftest.$ac_ext >&5
1785 rm -f conftest.$ac_objext conftest.$ac_ext
1786 cat >conftest.$ac_ext <<_ACEOF
1787 #line 1787 "configure"
1788 #include "confdefs.h"
1798 rm -f conftest.$ac_objext
1799 if { (eval echo "$as_me:1799: \"$ac_compile\"") >&5
1800 (eval $ac_compile) 2>&5
1802 echo "$as_me:1802: \$? = $ac_status" >&5
1803 (exit $ac_status); } &&
1804 { ac_try='test -s conftest.$ac_objext'
1805 { (eval echo "$as_me:1805: \"$ac_try\"") >&5
1808 echo "$as_me:1808: \$? = $ac_status" >&5
1809 (exit $ac_status); }; }; then
1812 echo "$as_me: failed program was:" >&5
1813 cat conftest.$ac_ext >&5
1815 rm -f conftest.$ac_objext conftest.$ac_ext
1818 if test -n "$ac_declaration"; then
1819 echo '#ifdef __cplusplus' >>confdefs.h
1820 echo $ac_declaration >>confdefs.h
1821 echo '#endif' >>confdefs.h
1825 echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1828 rm -f conftest.$ac_objext conftest.$ac_ext
1830 ac_cpp='$CPP $CPPFLAGS'
1831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1834 ac_main_return=return
1837 if test "$GCC" = yes ; then
1838 echo "$as_me:1838: checking version of $CC" >&5
1839 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1840 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.].*//'`"
1841 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1842 echo "$as_me:1842: result: $GCC_VERSION" >&5
1843 echo "${ECHO_T}$GCC_VERSION" >&6
1846 echo "$as_me:1846: checking for $CC option to accept ANSI C" >&5
1847 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1848 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1849 echo $ECHO_N "(cached) $ECHO_C" >&6
1851 ac_cv_prog_cc_stdc=no
1853 cat >conftest.$ac_ext <<_ACEOF
1854 #line 1854 "configure"
1855 #include "confdefs.h"
1858 #include <sys/types.h>
1859 #include <sys/stat.h>
1860 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1861 struct buf { int x; };
1862 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1863 static char *e (p, i)
1869 static char *f (char * (*g) (char **, int), char **p, ...)
1874 s = g (p, va_arg (v,int));
1878 int test (int i, double x);
1879 struct s1 {int (*f) (int a);};
1880 struct s2 {int (*f) (double a);};
1881 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1887 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1892 # Don't try gcc -ansi; that turns off useful extensions and
1893 # breaks some systems' header files.
1894 # AIX -qlanglvl=ansi
1895 # Ultrix and OSF/1 -std1
1896 # HP-UX 10.20 and later -Ae
1897 # HP-UX older versions -Aa -D_HPUX_SOURCE
1898 # SVR4 -Xc -D__EXTENSIONS__
1899 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1901 CC="$ac_save_CC $ac_arg"
1902 rm -f conftest.$ac_objext
1903 if { (eval echo "$as_me:1903: \"$ac_compile\"") >&5
1904 (eval $ac_compile) 2>&5
1906 echo "$as_me:1906: \$? = $ac_status" >&5
1907 (exit $ac_status); } &&
1908 { ac_try='test -s conftest.$ac_objext'
1909 { (eval echo "$as_me:1909: \"$ac_try\"") >&5
1912 echo "$as_me:1912: \$? = $ac_status" >&5
1913 (exit $ac_status); }; }; then
1914 ac_cv_prog_cc_stdc=$ac_arg
1917 echo "$as_me: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1920 rm -f conftest.$ac_objext
1922 rm -f conftest.$ac_ext conftest.$ac_objext
1927 case "x$ac_cv_prog_cc_stdc" in
1929 echo "$as_me:1929: result: none needed" >&5
1930 echo "${ECHO_T}none needed" >&6 ;;
1932 echo "$as_me:1932: result: $ac_cv_prog_cc_stdc" >&5
1933 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1934 CC="$CC $ac_cv_prog_cc_stdc" ;;
1937 # This should have been defined by AC_PROG_CC
1940 echo "$as_me:1940: checking \$CC variable" >&5
1941 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1944 echo "$as_me:1944: result: broken" >&5
1945 echo "${ECHO_T}broken" >&6
1946 { echo "$as_me:1946: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1947 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1949 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1950 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1952 for cf_arg in $cf_flags
1960 cf_new_extra_cppflags=
1962 for cf_add_cflags in $cf_arg
1964 case $cf_fix_cppflags in
1966 case $cf_add_cflags in
1967 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1968 case $cf_add_cflags in
1970 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1972 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1973 && test -z "${cf_tst_cflags}" \
1974 && cf_fix_cppflags=yes
1976 if test $cf_fix_cppflags = yes ; then
1978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1982 elif test "${cf_tst_cflags}" = "\"'" ; then
1984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1995 case $cf_add_cflags in
1997 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1999 CPPFLAGS=`echo "$CPPFLAGS" | \
2000 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2001 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2006 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2007 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2014 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2015 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2025 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2027 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2028 && test -z "${cf_tst_cflags}" \
2029 && cf_fix_cppflags=no
2034 if test -n "$cf_new_cflags" ; then
2036 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2037 CFLAGS="${CFLAGS}$cf_new_cflags"
2041 if test -n "$cf_new_cppflags" ; then
2043 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2044 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2048 if test -n "$cf_new_extra_cppflags" ; then
2050 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2051 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2061 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2063 echo "${as_me:-configure}:2063: testing resulting CC: '$CC' ..." 1>&5
2065 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2067 echo "${as_me:-configure}:2067: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2069 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2071 echo "${as_me:-configure}:2071: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2075 echo "$as_me:2075: result: ok" >&5
2076 echo "${ECHO_T}ok" >&6
2081 ac_cpp='$CPP $CPPFLAGS'
2082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2085 ac_main_return=return
2086 echo "$as_me:2086: checking how to run the C preprocessor" >&5
2087 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2088 # On Suns, sometimes $CPP names a directory.
2089 if test -n "$CPP" && test -d "$CPP"; then
2092 if test -z "$CPP"; then
2093 if test "${ac_cv_prog_CPP+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
2096 # Double quotes because CPP needs to be expanded
2097 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2100 for ac_c_preproc_warn_flag in '' yes
2102 # Use a header file that comes with gcc, so configuring glibc
2103 # with a fresh cross-compiler works.
2104 # On the NeXT, cc -E runs the code through the compiler's parser,
2105 # not just through cpp. "Syntax error" is here to catch this case.
2106 cat >conftest.$ac_ext <<_ACEOF
2107 #line 2107 "configure"
2108 #include "confdefs.h"
2112 if { (eval echo "$as_me:2112: \"$ac_cpp conftest.$ac_ext\"") >&5
2113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2115 egrep -v '^ *\+' conftest.er1 >conftest.err
2117 cat conftest.err >&5
2118 echo "$as_me:2118: \$? = $ac_status" >&5
2119 (exit $ac_status); } >/dev/null; then
2120 if test -s conftest.err; then
2121 ac_cpp_err=$ac_c_preproc_warn_flag
2128 if test -z "$ac_cpp_err"; then
2131 echo "$as_me: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
2133 # Broken: fails on valid input.
2136 rm -f conftest.err conftest.$ac_ext
2138 # OK, works on sane cases. Now check whether non-existent headers
2139 # can be detected and how.
2140 cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <ac_nonexistent.h>
2145 if { (eval echo "$as_me:2145: \"$ac_cpp conftest.$ac_ext\"") >&5
2146 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148 egrep -v '^ *\+' conftest.er1 >conftest.err
2150 cat conftest.err >&5
2151 echo "$as_me:2151: \$? = $ac_status" >&5
2152 (exit $ac_status); } >/dev/null; then
2153 if test -s conftest.err; then
2154 ac_cpp_err=$ac_c_preproc_warn_flag
2161 if test -z "$ac_cpp_err"; then
2162 # Broken: success on invalid input.
2165 echo "$as_me: failed program was:" >&5
2166 cat conftest.$ac_ext >&5
2167 # Passes both tests.
2171 rm -f conftest.err conftest.$ac_ext
2174 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2175 rm -f conftest.err conftest.$ac_ext
2176 if $ac_preproc_ok; then
2188 echo "$as_me:2188: result: $CPP" >&5
2189 echo "${ECHO_T}$CPP" >&6
2191 for ac_c_preproc_warn_flag in '' yes
2193 # Use a header file that comes with gcc, so configuring glibc
2194 # with a fresh cross-compiler works.
2195 # On the NeXT, cc -E runs the code through the compiler's parser,
2196 # not just through cpp. "Syntax error" is here to catch this case.
2197 cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2203 if { (eval echo "$as_me:2203: \"$ac_cpp conftest.$ac_ext\"") >&5
2204 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2206 egrep -v '^ *\+' conftest.er1 >conftest.err
2208 cat conftest.err >&5
2209 echo "$as_me:2209: \$? = $ac_status" >&5
2210 (exit $ac_status); } >/dev/null; then
2211 if test -s conftest.err; then
2212 ac_cpp_err=$ac_c_preproc_warn_flag
2219 if test -z "$ac_cpp_err"; then
2222 echo "$as_me: failed program was:" >&5
2223 cat conftest.$ac_ext >&5
2224 # Broken: fails on valid input.
2227 rm -f conftest.err conftest.$ac_ext
2229 # OK, works on sane cases. Now check whether non-existent headers
2230 # can be detected and how.
2231 cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <ac_nonexistent.h>
2236 if { (eval echo "$as_me:2236: \"$ac_cpp conftest.$ac_ext\"") >&5
2237 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239 egrep -v '^ *\+' conftest.er1 >conftest.err
2241 cat conftest.err >&5
2242 echo "$as_me:2242: \$? = $ac_status" >&5
2243 (exit $ac_status); } >/dev/null; then
2244 if test -s conftest.err; then
2245 ac_cpp_err=$ac_c_preproc_warn_flag
2252 if test -z "$ac_cpp_err"; then
2253 # Broken: success on invalid input.
2256 echo "$as_me: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2258 # Passes both tests.
2262 rm -f conftest.err conftest.$ac_ext
2265 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2266 rm -f conftest.err conftest.$ac_ext
2267 if $ac_preproc_ok; then
2270 { { echo "$as_me:2270: error: C preprocessor \"$CPP\" fails sanity check" >&5
2271 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2272 { (exit 1); exit 1; }; }
2276 ac_cpp='$CPP $CPPFLAGS'
2277 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2278 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2279 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2280 ac_main_return=return
2282 for ac_prog in mawk gawk nawk awk
2284 # Extract the first word of "$ac_prog", so it can be a program name with args.
2285 set dummy $ac_prog; ac_word=$2
2286 echo "$as_me:2286: checking for $ac_word" >&5
2287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2288 if test "${ac_cv_prog_AWK+set}" = set; then
2289 echo $ECHO_N "(cached) $ECHO_C" >&6
2291 if test -n "$AWK"; then
2292 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2294 ac_save_IFS=$IFS; IFS=$ac_path_separator
2296 for ac_dir in $ac_dummy; do
2298 test -z "$ac_dir" && ac_dir=.
2299 $as_executable_p "$ac_dir/$ac_word" || continue
2300 ac_cv_prog_AWK="$ac_prog"
2301 echo "$as_me:2301: found $ac_dir/$ac_word" >&5
2308 if test -n "$AWK"; then
2309 echo "$as_me:2309: result: $AWK" >&5
2310 echo "${ECHO_T}$AWK" >&6
2312 echo "$as_me:2312: result: no" >&5
2313 echo "${ECHO_T}no" >&6
2316 test -n "$AWK" && break
2319 # Find a good install program. We prefer a C program (faster),
2320 # so one script is as good as another. But avoid the broken or
2321 # incompatible versions:
2322 # SysV /etc/install, /usr/sbin/install
2323 # SunOS /usr/etc/install
2324 # IRIX /sbin/install
2326 # AmigaOS /C/install, which installs bootblocks on floppy discs
2327 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2328 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2329 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2330 # ./install, which can be erroneously created by make from ./install.sh.
2331 echo "$as_me:2331: checking for a BSD compatible install" >&5
2332 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2333 if test -z "$INSTALL"; then
2334 if test "${ac_cv_path_install+set}" = set; then
2335 echo $ECHO_N "(cached) $ECHO_C" >&6
2337 ac_save_IFS=$IFS; IFS=$ac_path_separator
2338 for ac_dir in $PATH; do
2340 # Account for people who put trailing slashes in PATH elements.
2342 / | ./ | .// | /cC/* \
2343 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2346 # OSF1 and SCO ODT 3.0 have their own names for install.
2347 # Don't use installbsd from OSF since it installs stuff as root
2349 for ac_prog in ginstall scoinst install; do
2350 if $as_executable_p "$ac_dir/$ac_prog"; then
2351 if test $ac_prog = install &&
2352 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2353 # AIX install. It has an incompatible calling convention.
2355 elif test $ac_prog = install &&
2356 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2357 # program-specific install script used by HP pwplus--don't use.
2360 ac_cv_path_install="$ac_dir/$ac_prog -c"
2370 if test "${ac_cv_path_install+set}" = set; then
2371 INSTALL=$ac_cv_path_install
2373 # As a last resort, use the slow shell script. We don't cache a
2374 # path for INSTALL within a source directory, because that will
2375 # break other packages using the cache if that directory is
2376 # removed, or if the path is relative.
2377 INSTALL=$ac_install_sh
2380 echo "$as_me:2380: result: $INSTALL" >&5
2381 echo "${ECHO_T}$INSTALL" >&6
2383 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2384 # It thinks the first close brace ends the variable substitution.
2385 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2387 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2389 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2395 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2396 test -z "$cf_dir" && cf_dir=.
2397 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2401 for ac_prog in lint cppcheck splint
2403 # Extract the first word of "$ac_prog", so it can be a program name with args.
2404 set dummy $ac_prog; ac_word=$2
2405 echo "$as_me:2405: checking for $ac_word" >&5
2406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2407 if test "${ac_cv_prog_LINT+set}" = set; then
2408 echo $ECHO_N "(cached) $ECHO_C" >&6
2410 if test -n "$LINT"; then
2411 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2413 ac_save_IFS=$IFS; IFS=$ac_path_separator
2415 for ac_dir in $ac_dummy; do
2417 test -z "$ac_dir" && ac_dir=.
2418 $as_executable_p "$ac_dir/$ac_word" || continue
2419 ac_cv_prog_LINT="$ac_prog"
2420 echo "$as_me:2420: found $ac_dir/$ac_word" >&5
2426 LINT=$ac_cv_prog_LINT
2427 if test -n "$LINT"; then
2428 echo "$as_me:2428: result: $LINT" >&5
2429 echo "${ECHO_T}$LINT" >&6
2431 echo "$as_me:2431: result: no" >&5
2432 echo "${ECHO_T}no" >&6
2435 test -n "$LINT" && break
2438 echo "$as_me:2438: checking if filesystem supports mixed-case filenames" >&5
2439 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2440 if test "${cf_cv_mixedcase+set}" = set; then
2441 echo $ECHO_N "(cached) $ECHO_C" >&6
2444 if test "$cross_compiling" = yes ; then
2445 case $target_alias in
2446 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2454 rm -f conftest CONFTEST
2456 if test -f CONFTEST ; then
2461 rm -f conftest CONFTEST
2465 echo "$as_me:2465: result: $cf_cv_mixedcase" >&5
2466 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2467 test "$cf_cv_mixedcase" = yes &&
2468 cat >>confdefs.h <<\EOF
2469 #define MIXEDCASE_FILENAMES 1
2472 for ac_prog in exctags ctags
2474 # Extract the first word of "$ac_prog", so it can be a program name with args.
2475 set dummy $ac_prog; ac_word=$2
2476 echo "$as_me:2476: checking for $ac_word" >&5
2477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2478 if test "${ac_cv_prog_CTAGS+set}" = set; then
2479 echo $ECHO_N "(cached) $ECHO_C" >&6
2481 if test -n "$CTAGS"; then
2482 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2484 ac_save_IFS=$IFS; IFS=$ac_path_separator
2486 for ac_dir in $ac_dummy; do
2488 test -z "$ac_dir" && ac_dir=.
2489 $as_executable_p "$ac_dir/$ac_word" || continue
2490 ac_cv_prog_CTAGS="$ac_prog"
2491 echo "$as_me:2491: found $ac_dir/$ac_word" >&5
2497 CTAGS=$ac_cv_prog_CTAGS
2498 if test -n "$CTAGS"; then
2499 echo "$as_me:2499: result: $CTAGS" >&5
2500 echo "${ECHO_T}$CTAGS" >&6
2502 echo "$as_me:2502: result: no" >&5
2503 echo "${ECHO_T}no" >&6
2506 test -n "$CTAGS" && break
2509 for ac_prog in exetags etags
2511 # Extract the first word of "$ac_prog", so it can be a program name with args.
2512 set dummy $ac_prog; ac_word=$2
2513 echo "$as_me:2513: checking for $ac_word" >&5
2514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2515 if test "${ac_cv_prog_ETAGS+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2518 if test -n "$ETAGS"; then
2519 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2523 for ac_dir in $ac_dummy; do
2525 test -z "$ac_dir" && ac_dir=.
2526 $as_executable_p "$ac_dir/$ac_word" || continue
2527 ac_cv_prog_ETAGS="$ac_prog"
2528 echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2534 ETAGS=$ac_cv_prog_ETAGS
2535 if test -n "$ETAGS"; then
2536 echo "$as_me:2536: result: $ETAGS" >&5
2537 echo "${ECHO_T}$ETAGS" >&6
2539 echo "$as_me:2539: result: no" >&5
2540 echo "${ECHO_T}no" >&6
2543 test -n "$ETAGS" && break
2546 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2547 set dummy ${CTAGS:-ctags}; ac_word=$2
2548 echo "$as_me:2548: checking for $ac_word" >&5
2549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2550 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2551 echo $ECHO_N "(cached) $ECHO_C" >&6
2553 if test -n "$MAKE_LOWER_TAGS"; then
2554 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2556 ac_save_IFS=$IFS; IFS=$ac_path_separator
2558 for ac_dir in $ac_dummy; do
2560 test -z "$ac_dir" && ac_dir=.
2561 $as_executable_p "$ac_dir/$ac_word" || continue
2562 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2563 echo "$as_me:2563: found $ac_dir/$ac_word" >&5
2567 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2570 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2571 if test -n "$MAKE_LOWER_TAGS"; then
2572 echo "$as_me:2572: result: $MAKE_LOWER_TAGS" >&5
2573 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2575 echo "$as_me:2575: result: no" >&5
2576 echo "${ECHO_T}no" >&6
2579 if test "$cf_cv_mixedcase" = yes ; then
2580 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2581 set dummy ${ETAGS:-etags}; ac_word=$2
2582 echo "$as_me:2582: checking for $ac_word" >&5
2583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2584 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2585 echo $ECHO_N "(cached) $ECHO_C" >&6
2587 if test -n "$MAKE_UPPER_TAGS"; then
2588 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2590 ac_save_IFS=$IFS; IFS=$ac_path_separator
2592 for ac_dir in $ac_dummy; do
2594 test -z "$ac_dir" && ac_dir=.
2595 $as_executable_p "$ac_dir/$ac_word" || continue
2596 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2597 echo "$as_me:2597: found $ac_dir/$ac_word" >&5
2601 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2604 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2605 if test -n "$MAKE_UPPER_TAGS"; then
2606 echo "$as_me:2606: result: $MAKE_UPPER_TAGS" >&5
2607 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2609 echo "$as_me:2609: result: no" >&5
2610 echo "${ECHO_T}no" >&6
2617 if test "$MAKE_UPPER_TAGS" = yes ; then
2623 if test "$MAKE_LOWER_TAGS" = yes ; then
2629 echo "$as_me:2629: checking if -lm needed for math functions" >&5
2630 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2631 if test "${cf_cv_need_libm+set}" = set; then
2632 echo $ECHO_N "(cached) $ECHO_C" >&6
2635 cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2646 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2651 rm -f conftest.$ac_objext conftest$ac_exeext
2652 if { (eval echo "$as_me:2652: \"$ac_link\"") >&5
2653 (eval $ac_link) 2>&5
2655 echo "$as_me:2655: \$? = $ac_status" >&5
2656 (exit $ac_status); } &&
2657 { ac_try='test -s conftest$ac_exeext'
2658 { (eval echo "$as_me:2658: \"$ac_try\"") >&5
2661 echo "$as_me:2661: \$? = $ac_status" >&5
2662 (exit $ac_status); }; }; then
2665 echo "$as_me: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2671 echo "$as_me:2671: result: $cf_cv_need_libm" >&5
2672 echo "${ECHO_T}$cf_cv_need_libm" >&6
2673 if test "$cf_cv_need_libm" = yes
2681 CC_SHARED_OPTS=unknown
2682 CPPFLAGS="$CPPFLAGS"
2684 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2685 DFT_UPR_MODEL="NORMAL"
2698 PACKAGE="ncurses-examples"
2704 TINFO_LIBS='$(LIBS_CURSES)'
2705 cf_cv_abi_version=""
2706 cf_cv_rel_version=""
2712 if test "$GCC" = yes
2714 cat > conftest.i <<EOF
2716 #define GCC_PRINTF 0
2721 #ifndef GCC_NORETURN
2722 #define GCC_NORETURN /* nothing */
2725 #define GCC_UNUSED /* nothing */
2728 if test "$GCC" = yes
2730 { echo "$as_me:2730: checking for $CC __attribute__ directives..." >&5
2731 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2733 "${as_me:-configure}"
2734 #include "confdefs.h"
2735 #include "conftest.h"
2736 #include "conftest.i"
2738 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2740 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2743 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2745 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2747 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2748 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2749 extern void foo(void) GCC_NORETURN;
2750 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2752 cf_printf_attribute=no
2753 cf_scanf_attribute=no
2754 for cf_attribute in scanf printf unused noreturn
2757 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2759 cf_directive="__attribute__(($cf_attribute))"
2760 echo "checking for $CC $cf_directive" 1>&5
2762 case $cf_attribute in
2764 cf_printf_attribute=yes
2765 cat >conftest.h <<EOF
2766 #define GCC_$cf_ATTRIBUTE 1
2770 cf_scanf_attribute=yes
2771 cat >conftest.h <<EOF
2772 #define GCC_$cf_ATTRIBUTE 1
2776 cat >conftest.h <<EOF
2777 #define GCC_$cf_ATTRIBUTE $cf_directive
2782 if { (eval echo "$as_me:2782: \"$ac_compile\"") >&5
2783 (eval $ac_compile) 2>&5
2785 echo "$as_me:2785: \$? = $ac_status" >&5
2786 (exit $ac_status); }; then
2787 test -n "$verbose" && echo "$as_me:2787: result: ... $cf_attribute" >&5
2788 echo "${ECHO_T}... $cf_attribute" >&6
2789 cat conftest.h >>confdefs.h
2790 case $cf_attribute in
2793 cat >>confdefs.h <<EOF
2794 #define GCC_NORETURN $cf_directive
2799 cf_value='/* nothing */'
2800 if test "$cf_printf_attribute" != no ; then
2801 cf_value='__attribute__((format(printf,fmt,var)))'
2803 cat >>confdefs.h <<\EOF
2804 #define GCC_PRINTF 1
2809 cat >>confdefs.h <<EOF
2810 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2815 cf_value='/* nothing */'
2816 if test "$cf_scanf_attribute" != no ; then
2817 cf_value='__attribute__((format(scanf,fmt,var)))'
2819 cat >>confdefs.h <<\EOF
2825 cat >>confdefs.h <<EOF
2826 #define GCC_SCANFLIKE(fmt,var) $cf_value
2832 cat >>confdefs.h <<EOF
2833 #define GCC_UNUSED $cf_directive
2841 fgrep define conftest.i >>confdefs.h
2846 echo "$as_me:2846: checking if you want to work around bogus compiler/loader warnings" >&5
2847 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2849 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2850 if test "${enable_string_hacks+set}" = set; then
2851 enableval="$enable_string_hacks"
2852 with_string_hacks=$enableval
2854 with_string_hacks=no
2856 echo "$as_me:2856: result: $with_string_hacks" >&5
2857 echo "${ECHO_T}$with_string_hacks" >&6
2859 if test "x$with_string_hacks" = "xyes"; then
2861 cat >>confdefs.h <<\EOF
2862 #define USE_STRING_HACKS 1
2865 { echo "$as_me:2865: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2866 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2867 echo "$as_me:2867: checking for strlcat" >&5
2868 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2869 if test "${ac_cv_func_strlcat+set}" = set; then
2870 echo $ECHO_N "(cached) $ECHO_C" >&6
2872 cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 /* System header to define __stub macros and hopefully few prototypes,
2876 which can conflict with char strlcat (); below. */
2878 /* Override any gcc2 internal prototype to avoid an error. */
2882 /* We use char because int might match the return type of a gcc2
2883 builtin and then its argument prototype would still apply. */
2890 /* The GNU C library defines this for functions which it implements
2891 to always fail with ENOSYS. Some functions are actually named
2892 something starting with __ and the normal name is an alias. */
2893 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2896 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
2903 rm -f conftest.$ac_objext conftest$ac_exeext
2904 if { (eval echo "$as_me:2904: \"$ac_link\"") >&5
2905 (eval $ac_link) 2>&5
2907 echo "$as_me:2907: \$? = $ac_status" >&5
2908 (exit $ac_status); } &&
2909 { ac_try='test -s conftest$ac_exeext'
2910 { (eval echo "$as_me:2910: \"$ac_try\"") >&5
2913 echo "$as_me:2913: \$? = $ac_status" >&5
2914 (exit $ac_status); }; }; then
2915 ac_cv_func_strlcat=yes
2917 echo "$as_me: failed program was:" >&5
2918 cat conftest.$ac_ext >&5
2919 ac_cv_func_strlcat=no
2921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2923 echo "$as_me:2923: result: $ac_cv_func_strlcat" >&5
2924 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
2925 if test $ac_cv_func_strlcat = yes; then
2927 cat >>confdefs.h <<\EOF
2928 #define HAVE_STRLCAT 1
2933 echo "$as_me:2933: checking for strlcat in -lbsd" >&5
2934 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
2935 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
2936 echo $ECHO_N "(cached) $ECHO_C" >&6
2938 ac_check_lib_save_LIBS=$LIBS
2940 cat >conftest.$ac_ext <<_ACEOF
2941 #line 2941 "configure"
2942 #include "confdefs.h"
2944 /* Override any gcc2 internal prototype to avoid an error. */
2948 /* We use char because int might match the return type of a gcc2
2949 builtin and then its argument prototype would still apply. */
2959 rm -f conftest.$ac_objext conftest$ac_exeext
2960 if { (eval echo "$as_me:2960: \"$ac_link\"") >&5
2961 (eval $ac_link) 2>&5
2963 echo "$as_me:2963: \$? = $ac_status" >&5
2964 (exit $ac_status); } &&
2965 { ac_try='test -s conftest$ac_exeext'
2966 { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2969 echo "$as_me:2969: \$? = $ac_status" >&5
2970 (exit $ac_status); }; }; then
2971 ac_cv_lib_bsd_strlcat=yes
2973 echo "$as_me: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 ac_cv_lib_bsd_strlcat=no
2977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2978 LIBS=$ac_check_lib_save_LIBS
2980 echo "$as_me:2980: result: $ac_cv_lib_bsd_strlcat" >&5
2981 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
2982 if test $ac_cv_lib_bsd_strlcat = yes; then
2985 # Filter out duplicates - this happens with badly-designed ".pc" files...
2986 for cf_add_1lib in $LIBS
2988 for cf_add_2lib in $cf_add_libs
2990 if test "x$cf_add_1lib" = "x$cf_add_2lib"
2996 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3000 for ac_header in bsd/string.h
3002 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3003 echo "$as_me:3003: checking for $ac_header" >&5
3004 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3005 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 cat >conftest.$ac_ext <<_ACEOF
3009 #line 3009 "configure"
3010 #include "confdefs.h"
3011 #include <$ac_header>
3013 if { (eval echo "$as_me:3013: \"$ac_cpp conftest.$ac_ext\"") >&5
3014 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3016 egrep -v '^ *\+' conftest.er1 >conftest.err
3018 cat conftest.err >&5
3019 echo "$as_me:3019: \$? = $ac_status" >&5
3020 (exit $ac_status); } >/dev/null; then
3021 if test -s conftest.err; then
3022 ac_cpp_err=$ac_c_preproc_warn_flag
3029 if test -z "$ac_cpp_err"; then
3030 eval "$as_ac_Header=yes"
3032 echo "$as_me: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3034 eval "$as_ac_Header=no"
3036 rm -f conftest.err conftest.$ac_ext
3038 echo "$as_me:3038: result: `eval echo '${'$as_ac_Header'}'`" >&5
3039 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3040 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3041 cat >>confdefs.h <<EOF
3042 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3048 cat >>confdefs.h <<\EOF
3049 #define HAVE_STRLCAT 1
3056 for ac_func in strlcpy snprintf
3058 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3059 echo "$as_me:3059: checking for $ac_func" >&5
3060 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3061 if eval "test \"\${$as_ac_var+set}\" = set"; then
3062 echo $ECHO_N "(cached) $ECHO_C" >&6
3064 cat >conftest.$ac_ext <<_ACEOF
3065 #line 3065 "configure"
3066 #include "confdefs.h"
3067 /* System header to define __stub macros and hopefully few prototypes,
3068 which can conflict with char $ac_func (); below. */
3070 /* Override any gcc2 internal prototype to avoid an error. */
3074 /* We use char because int might match the return type of a gcc2
3075 builtin and then its argument prototype would still apply. */
3082 /* The GNU C library defines this for functions which it implements
3083 to always fail with ENOSYS. Some functions are actually named
3084 something starting with __ and the normal name is an alias. */
3085 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3088 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3095 rm -f conftest.$ac_objext conftest$ac_exeext
3096 if { (eval echo "$as_me:3096: \"$ac_link\"") >&5
3097 (eval $ac_link) 2>&5
3099 echo "$as_me:3099: \$? = $ac_status" >&5
3100 (exit $ac_status); } &&
3101 { ac_try='test -s conftest$ac_exeext'
3102 { (eval echo "$as_me:3102: \"$ac_try\"") >&5
3105 echo "$as_me:3105: \$? = $ac_status" >&5
3106 (exit $ac_status); }; }; then
3107 eval "$as_ac_var=yes"
3109 echo "$as_me: failed program was:" >&5
3110 cat conftest.$ac_ext >&5
3111 eval "$as_ac_var=no"
3113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3115 echo "$as_me:3115: result: `eval echo '${'$as_ac_var'}'`" >&5
3116 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3117 if test `eval echo '${'$as_ac_var'}'` = yes; then
3118 cat >>confdefs.h <<EOF
3119 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3128 cf_POSIX_C_SOURCE=199506L
3133 cf_xopen_source="-D_ALL_SOURCE"
3139 cf_xopen_source="-D_APPLE_C_SOURCE"
3142 cf_xopen_source="-D_DARWIN_C_SOURCE"
3145 (freebsd*|dragonfly*)
3146 # 5.x headers associate
3147 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3148 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3149 cf_POSIX_C_SOURCE=200112L
3151 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3154 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3157 cf_xopen_source="-D_HPUX_SOURCE"
3160 cf_xopen_source="-D_SGI_SOURCE"
3163 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3165 echo "$as_me:3165: checking if we must define _GNU_SOURCE" >&5
3166 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3167 if test "${cf_cv_gnu_source+set}" = set; then
3168 echo $ECHO_N "(cached) $ECHO_C" >&6
3171 cat >conftest.$ac_ext <<_ACEOF
3172 #line 3172 "configure"
3173 #include "confdefs.h"
3174 #include <sys/types.h>
3179 #ifndef _XOPEN_SOURCE
3186 rm -f conftest.$ac_objext
3187 if { (eval echo "$as_me:3187: \"$ac_compile\"") >&5
3188 (eval $ac_compile) 2>&5
3190 echo "$as_me:3190: \$? = $ac_status" >&5
3191 (exit $ac_status); } &&
3192 { ac_try='test -s conftest.$ac_objext'
3193 { (eval echo "$as_me:3193: \"$ac_try\"") >&5
3196 echo "$as_me:3196: \$? = $ac_status" >&5
3197 (exit $ac_status); }; }; then
3200 echo "$as_me: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3203 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3204 cat >conftest.$ac_ext <<_ACEOF
3205 #line 3205 "configure"
3206 #include "confdefs.h"
3207 #include <sys/types.h>
3212 #ifdef _XOPEN_SOURCE
3219 rm -f conftest.$ac_objext
3220 if { (eval echo "$as_me:3220: \"$ac_compile\"") >&5
3221 (eval $ac_compile) 2>&5
3223 echo "$as_me:3223: \$? = $ac_status" >&5
3224 (exit $ac_status); } &&
3225 { ac_try='test -s conftest.$ac_objext'
3226 { (eval echo "$as_me:3226: \"$ac_try\"") >&5
3229 echo "$as_me:3229: \$? = $ac_status" >&5
3230 (exit $ac_status); }; }; then
3233 echo "$as_me: failed program was:" >&5
3234 cat conftest.$ac_ext >&5
3235 cf_cv_gnu_source=yes
3237 rm -f conftest.$ac_objext conftest.$ac_ext
3241 rm -f conftest.$ac_objext conftest.$ac_ext
3244 echo "$as_me:3244: result: $cf_cv_gnu_source" >&5
3245 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3247 if test "$cf_cv_gnu_source" = yes
3249 echo "$as_me:3249: checking if we should also define _DEFAULT_SOURCE" >&5
3250 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3251 if test "${cf_cv_default_source+set}" = set; then
3252 echo $ECHO_N "(cached) $ECHO_C" >&6
3255 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3256 cat >conftest.$ac_ext <<_ACEOF
3257 #line 3257 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3264 #ifdef _DEFAULT_SOURCE
3271 rm -f conftest.$ac_objext
3272 if { (eval echo "$as_me:3272: \"$ac_compile\"") >&5
3273 (eval $ac_compile) 2>&5
3275 echo "$as_me:3275: \$? = $ac_status" >&5
3276 (exit $ac_status); } &&
3277 { ac_try='test -s conftest.$ac_objext'
3278 { (eval echo "$as_me:3278: \"$ac_try\"") >&5
3281 echo "$as_me:3281: \$? = $ac_status" >&5
3282 (exit $ac_status); }; }; then
3283 cf_cv_default_source=no
3285 echo "$as_me: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3287 cf_cv_default_source=yes
3289 rm -f conftest.$ac_objext conftest.$ac_ext
3292 echo "$as_me:3292: result: $cf_cv_default_source" >&5
3293 echo "${ECHO_T}$cf_cv_default_source" >&6
3294 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3299 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3302 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3305 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3307 cf_save_CFLAGS="$CFLAGS"
3308 cf_save_CPPFLAGS="$CPPFLAGS"
3310 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3311 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3312 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3314 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3315 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3316 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3318 echo "$as_me:3318: checking if we should define _POSIX_C_SOURCE" >&5
3319 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3320 if test "${cf_cv_posix_c_source+set}" = set; then
3321 echo $ECHO_N "(cached) $ECHO_C" >&6
3324 echo "${as_me:-configure}:3324: testing if the symbol is already defined go no further ..." 1>&5
3326 cat >conftest.$ac_ext <<_ACEOF
3327 #line 3327 "configure"
3328 #include "confdefs.h"
3329 #include <sys/types.h>
3334 #ifndef _POSIX_C_SOURCE
3341 rm -f conftest.$ac_objext
3342 if { (eval echo "$as_me:3342: \"$ac_compile\"") >&5
3343 (eval $ac_compile) 2>&5
3345 echo "$as_me:3345: \$? = $ac_status" >&5
3346 (exit $ac_status); } &&
3347 { ac_try='test -s conftest.$ac_objext'
3348 { (eval echo "$as_me:3348: \"$ac_try\"") >&5
3351 echo "$as_me:3351: \$? = $ac_status" >&5
3352 (exit $ac_status); }; }; then
3353 cf_cv_posix_c_source=no
3355 echo "$as_me: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 cf_want_posix_source=no
3358 case .$cf_POSIX_C_SOURCE in
3360 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3363 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3364 cf_want_posix_source=yes
3367 cf_want_posix_source=yes
3370 if test "$cf_want_posix_source" = yes ; then
3371 cat >conftest.$ac_ext <<_ACEOF
3372 #line 3372 "configure"
3373 #include "confdefs.h"
3374 #include <sys/types.h>
3379 #ifdef _POSIX_SOURCE
3386 rm -f conftest.$ac_objext
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388 (eval $ac_compile) 2>&5
3390 echo "$as_me:3390: \$? = $ac_status" >&5
3391 (exit $ac_status); } &&
3392 { ac_try='test -s conftest.$ac_objext'
3393 { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3396 echo "$as_me:3396: \$? = $ac_status" >&5
3397 (exit $ac_status); }; }; then
3400 echo "$as_me: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3404 rm -f conftest.$ac_objext conftest.$ac_ext
3407 echo "${as_me:-configure}:3407: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3409 CFLAGS="$cf_trim_CFLAGS"
3410 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3412 echo "${as_me:-configure}:3412: testing if the second compile does not leave our definition intact error ..." 1>&5
3414 cat >conftest.$ac_ext <<_ACEOF
3415 #line 3415 "configure"
3416 #include "confdefs.h"
3417 #include <sys/types.h>
3422 #ifndef _POSIX_C_SOURCE
3429 rm -f conftest.$ac_objext
3430 if { (eval echo "$as_me:3430: \"$ac_compile\"") >&5
3431 (eval $ac_compile) 2>&5
3433 echo "$as_me:3433: \$? = $ac_status" >&5
3434 (exit $ac_status); } &&
3435 { ac_try='test -s conftest.$ac_objext'
3436 { (eval echo "$as_me:3436: \"$ac_try\"") >&5
3439 echo "$as_me:3439: \$? = $ac_status" >&5
3440 (exit $ac_status); }; }; then
3443 echo "$as_me: failed program was:" >&5
3444 cat conftest.$ac_ext >&5
3445 cf_cv_posix_c_source=no
3447 rm -f conftest.$ac_objext conftest.$ac_ext
3448 CFLAGS="$cf_save_CFLAGS"
3449 CPPFLAGS="$cf_save_CPPFLAGS"
3452 rm -f conftest.$ac_objext conftest.$ac_ext
3455 echo "$as_me:3455: result: $cf_cv_posix_c_source" >&5
3456 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3458 if test "$cf_cv_posix_c_source" != no ; then
3459 CFLAGS="$cf_trim_CFLAGS"
3460 CPPFLAGS="$cf_trim_CPPFLAGS"
3465 cf_new_extra_cppflags=
3467 for cf_add_cflags in $cf_cv_posix_c_source
3469 case $cf_fix_cppflags in
3471 case $cf_add_cflags in
3472 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3473 case $cf_add_cflags in
3475 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3477 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3478 && test -z "${cf_tst_cflags}" \
3479 && cf_fix_cppflags=yes
3481 if test $cf_fix_cppflags = yes ; then
3483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3487 elif test "${cf_tst_cflags}" = "\"'" ; then
3489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3500 case $cf_add_cflags in
3502 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3504 CPPFLAGS=`echo "$CPPFLAGS" | \
3505 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3506 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3511 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3512 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3519 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3520 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3530 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3533 && test -z "${cf_tst_cflags}" \
3534 && cf_fix_cppflags=no
3539 if test -n "$cf_new_cflags" ; then
3541 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3542 CFLAGS="${CFLAGS}$cf_new_cflags"
3546 if test -n "$cf_new_cppflags" ; then
3548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3549 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3553 if test -n "$cf_new_extra_cppflags" ; then
3555 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3556 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3564 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3567 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3568 cf_xopen_source="-D_BSD_SOURCE"
3572 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3575 cf_xopen_source="-D_OSF_SOURCE"
3578 cf_xopen_source="-D_QNX_SOURCE"
3581 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3584 cf_xopen_source="-D__EXTENSIONS__"
3585 cf_cv_xopen_source=broken
3587 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3593 echo "$as_me:3593: checking if we should define _XOPEN_SOURCE" >&5
3594 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3595 if test "${cf_cv_xopen_source+set}" = set; then
3596 echo $ECHO_N "(cached) $ECHO_C" >&6
3599 cat >conftest.$ac_ext <<_ACEOF
3600 #line 3600 "configure"
3601 #include "confdefs.h"
3605 #include <sys/types.h>
3611 #ifndef _XOPEN_SOURCE
3618 rm -f conftest.$ac_objext
3619 if { (eval echo "$as_me:3619: \"$ac_compile\"") >&5
3620 (eval $ac_compile) 2>&5
3622 echo "$as_me:3622: \$? = $ac_status" >&5
3623 (exit $ac_status); } &&
3624 { ac_try='test -s conftest.$ac_objext'
3625 { (eval echo "$as_me:3625: \"$ac_try\"") >&5
3628 echo "$as_me:3628: \$? = $ac_status" >&5
3629 (exit $ac_status); }; }; then
3630 cf_cv_xopen_source=no
3632 echo "$as_me: failed program was:" >&5
3633 cat conftest.$ac_ext >&5
3635 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3636 cat >conftest.$ac_ext <<_ACEOF
3637 #line 3637 "configure"
3638 #include "confdefs.h"
3642 #include <sys/types.h>
3648 #ifdef _XOPEN_SOURCE
3655 rm -f conftest.$ac_objext
3656 if { (eval echo "$as_me:3656: \"$ac_compile\"") >&5
3657 (eval $ac_compile) 2>&5
3659 echo "$as_me:3659: \$? = $ac_status" >&5
3660 (exit $ac_status); } &&
3661 { ac_try='test -s conftest.$ac_objext'
3662 { (eval echo "$as_me:3662: \"$ac_try\"") >&5
3665 echo "$as_me:3665: \$? = $ac_status" >&5
3666 (exit $ac_status); }; }; then
3667 cf_cv_xopen_source=no
3669 echo "$as_me: failed program was:" >&5
3670 cat conftest.$ac_ext >&5
3671 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3673 rm -f conftest.$ac_objext conftest.$ac_ext
3677 rm -f conftest.$ac_objext conftest.$ac_ext
3680 echo "$as_me:3680: result: $cf_cv_xopen_source" >&5
3681 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3683 if test "$cf_cv_xopen_source" != no ; then
3685 CFLAGS=`echo "$CFLAGS" | \
3686 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3687 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3689 CPPFLAGS=`echo "$CPPFLAGS" | \
3690 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3691 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3693 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3698 cf_new_extra_cppflags=
3700 for cf_add_cflags in $cf_temp_xopen_source
3702 case $cf_fix_cppflags in
3704 case $cf_add_cflags in
3705 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3706 case $cf_add_cflags in
3708 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3710 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3711 && test -z "${cf_tst_cflags}" \
3712 && cf_fix_cppflags=yes
3714 if test $cf_fix_cppflags = yes ; then
3716 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3717 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3720 elif test "${cf_tst_cflags}" = "\"'" ; then
3722 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3723 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3733 case $cf_add_cflags in
3735 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3737 CPPFLAGS=`echo "$CPPFLAGS" | \
3738 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3739 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3744 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3745 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3752 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3753 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3760 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3761 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3763 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3765 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3766 && test -z "${cf_tst_cflags}" \
3767 && cf_fix_cppflags=no
3772 if test -n "$cf_new_cflags" ; then
3774 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3775 CFLAGS="${CFLAGS}$cf_new_cflags"
3779 if test -n "$cf_new_cppflags" ; then
3781 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3782 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3786 if test -n "$cf_new_extra_cppflags" ; then
3788 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3789 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3795 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3797 cf_save_CFLAGS="$CFLAGS"
3798 cf_save_CPPFLAGS="$CPPFLAGS"
3800 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3801 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3802 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3804 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3805 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3806 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3808 echo "$as_me:3808: checking if we should define _POSIX_C_SOURCE" >&5
3809 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3810 if test "${cf_cv_posix_c_source+set}" = set; then
3811 echo $ECHO_N "(cached) $ECHO_C" >&6
3814 echo "${as_me:-configure}:3814: testing if the symbol is already defined go no further ..." 1>&5
3816 cat >conftest.$ac_ext <<_ACEOF
3817 #line 3817 "configure"
3818 #include "confdefs.h"
3819 #include <sys/types.h>
3824 #ifndef _POSIX_C_SOURCE
3831 rm -f conftest.$ac_objext
3832 if { (eval echo "$as_me:3832: \"$ac_compile\"") >&5
3833 (eval $ac_compile) 2>&5
3835 echo "$as_me:3835: \$? = $ac_status" >&5
3836 (exit $ac_status); } &&
3837 { ac_try='test -s conftest.$ac_objext'
3838 { (eval echo "$as_me:3838: \"$ac_try\"") >&5
3841 echo "$as_me:3841: \$? = $ac_status" >&5
3842 (exit $ac_status); }; }; then
3843 cf_cv_posix_c_source=no
3845 echo "$as_me: failed program was:" >&5
3846 cat conftest.$ac_ext >&5
3847 cf_want_posix_source=no
3848 case .$cf_POSIX_C_SOURCE in
3850 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3853 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3854 cf_want_posix_source=yes
3857 cf_want_posix_source=yes
3860 if test "$cf_want_posix_source" = yes ; then
3861 cat >conftest.$ac_ext <<_ACEOF
3862 #line 3862 "configure"
3863 #include "confdefs.h"
3864 #include <sys/types.h>
3869 #ifdef _POSIX_SOURCE
3876 rm -f conftest.$ac_objext
3877 if { (eval echo "$as_me:3877: \"$ac_compile\"") >&5
3878 (eval $ac_compile) 2>&5
3880 echo "$as_me:3880: \$? = $ac_status" >&5
3881 (exit $ac_status); } &&
3882 { ac_try='test -s conftest.$ac_objext'
3883 { (eval echo "$as_me:3883: \"$ac_try\"") >&5
3886 echo "$as_me:3886: \$? = $ac_status" >&5
3887 (exit $ac_status); }; }; then
3890 echo "$as_me: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3892 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3894 rm -f conftest.$ac_objext conftest.$ac_ext
3897 echo "${as_me:-configure}:3897: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3899 CFLAGS="$cf_trim_CFLAGS"
3900 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3902 echo "${as_me:-configure}:3902: testing if the second compile does not leave our definition intact error ..." 1>&5
3904 cat >conftest.$ac_ext <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3907 #include <sys/types.h>
3912 #ifndef _POSIX_C_SOURCE
3919 rm -f conftest.$ac_objext
3920 if { (eval echo "$as_me:3920: \"$ac_compile\"") >&5
3921 (eval $ac_compile) 2>&5
3923 echo "$as_me:3923: \$? = $ac_status" >&5
3924 (exit $ac_status); } &&
3925 { ac_try='test -s conftest.$ac_objext'
3926 { (eval echo "$as_me:3926: \"$ac_try\"") >&5
3929 echo "$as_me:3929: \$? = $ac_status" >&5
3930 (exit $ac_status); }; }; then
3933 echo "$as_me: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 cf_cv_posix_c_source=no
3937 rm -f conftest.$ac_objext conftest.$ac_ext
3938 CFLAGS="$cf_save_CFLAGS"
3939 CPPFLAGS="$cf_save_CPPFLAGS"
3942 rm -f conftest.$ac_objext conftest.$ac_ext
3945 echo "$as_me:3945: result: $cf_cv_posix_c_source" >&5
3946 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3948 if test "$cf_cv_posix_c_source" != no ; then
3949 CFLAGS="$cf_trim_CFLAGS"
3950 CPPFLAGS="$cf_trim_CPPFLAGS"
3955 cf_new_extra_cppflags=
3957 for cf_add_cflags in $cf_cv_posix_c_source
3959 case $cf_fix_cppflags in
3961 case $cf_add_cflags in
3962 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3963 case $cf_add_cflags in
3965 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3967 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3968 && test -z "${cf_tst_cflags}" \
3969 && cf_fix_cppflags=yes
3971 if test $cf_fix_cppflags = yes ; then
3973 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3974 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3977 elif test "${cf_tst_cflags}" = "\"'" ; then
3979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3990 case $cf_add_cflags in
3992 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3994 CPPFLAGS=`echo "$CPPFLAGS" | \
3995 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3996 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4001 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4002 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4009 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4010 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4017 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4018 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4020 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4022 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4023 && test -z "${cf_tst_cflags}" \
4024 && cf_fix_cppflags=no
4029 if test -n "$cf_new_cflags" ; then
4031 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4032 CFLAGS="${CFLAGS}$cf_new_cflags"
4036 if test -n "$cf_new_cppflags" ; then
4038 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4039 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4043 if test -n "$cf_new_extra_cppflags" ; then
4045 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4046 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4055 if test -n "$cf_xopen_source" ; then
4060 cf_new_extra_cppflags=
4062 for cf_add_cflags in $cf_xopen_source
4064 case $cf_fix_cppflags in
4066 case $cf_add_cflags in
4067 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4068 case $cf_add_cflags in
4070 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4072 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4073 && test -z "${cf_tst_cflags}" \
4074 && cf_fix_cppflags=yes
4076 if test $cf_fix_cppflags = yes ; then
4078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4082 elif test "${cf_tst_cflags}" = "\"'" ; then
4084 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4085 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4095 case $cf_add_cflags in
4097 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4099 CPPFLAGS=`echo "$CPPFLAGS" | \
4100 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4101 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4106 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4107 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4114 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4115 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4125 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4128 && test -z "${cf_tst_cflags}" \
4129 && cf_fix_cppflags=no
4134 if test -n "$cf_new_cflags" ; then
4135 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4137 echo "${as_me:-configure}:4137: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4139 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4140 CFLAGS="${CFLAGS}$cf_new_cflags"
4144 if test -n "$cf_new_cppflags" ; then
4145 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4147 echo "${as_me:-configure}:4147: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4149 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4150 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4154 if test -n "$cf_new_extra_cppflags" ; then
4155 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4157 echo "${as_me:-configure}:4157: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4159 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4160 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4166 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4167 echo "$as_me:4167: checking if _XOPEN_SOURCE really is set" >&5
4168 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4169 cat >conftest.$ac_ext <<_ACEOF
4170 #line 4170 "configure"
4171 #include "confdefs.h"
4177 #ifndef _XOPEN_SOURCE
4184 rm -f conftest.$ac_objext
4185 if { (eval echo "$as_me:4185: \"$ac_compile\"") >&5
4186 (eval $ac_compile) 2>&5
4188 echo "$as_me:4188: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest.$ac_objext'
4191 { (eval echo "$as_me:4191: \"$ac_try\"") >&5
4194 echo "$as_me:4194: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 cf_XOPEN_SOURCE_set=yes
4198 echo "$as_me: failed program was:" >&5
4199 cat conftest.$ac_ext >&5
4200 cf_XOPEN_SOURCE_set=no
4202 rm -f conftest.$ac_objext conftest.$ac_ext
4203 echo "$as_me:4203: result: $cf_XOPEN_SOURCE_set" >&5
4204 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4205 if test $cf_XOPEN_SOURCE_set = yes
4207 cat >conftest.$ac_ext <<_ACEOF
4208 #line 4208 "configure"
4209 #include "confdefs.h"
4215 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4222 rm -f conftest.$ac_objext
4223 if { (eval echo "$as_me:4223: \"$ac_compile\"") >&5
4224 (eval $ac_compile) 2>&5
4226 echo "$as_me:4226: \$? = $ac_status" >&5
4227 (exit $ac_status); } &&
4228 { ac_try='test -s conftest.$ac_objext'
4229 { (eval echo "$as_me:4229: \"$ac_try\"") >&5
4232 echo "$as_me:4232: \$? = $ac_status" >&5
4233 (exit $ac_status); }; }; then
4234 cf_XOPEN_SOURCE_set_ok=yes
4236 echo "$as_me: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4238 cf_XOPEN_SOURCE_set_ok=no
4240 rm -f conftest.$ac_objext conftest.$ac_ext
4241 if test $cf_XOPEN_SOURCE_set_ok = no
4243 { echo "$as_me:4243: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4244 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4248 echo "$as_me:4248: checking if we should define _XOPEN_SOURCE" >&5
4249 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4250 if test "${cf_cv_xopen_source+set}" = set; then
4251 echo $ECHO_N "(cached) $ECHO_C" >&6
4254 cat >conftest.$ac_ext <<_ACEOF
4255 #line 4255 "configure"
4256 #include "confdefs.h"
4260 #include <sys/types.h>
4266 #ifndef _XOPEN_SOURCE
4273 rm -f conftest.$ac_objext
4274 if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275 (eval $ac_compile) 2>&5
4277 echo "$as_me:4277: \$? = $ac_status" >&5
4278 (exit $ac_status); } &&
4279 { ac_try='test -s conftest.$ac_objext'
4280 { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit $ac_status); }; }; then
4285 cf_cv_xopen_source=no
4287 echo "$as_me: failed program was:" >&5
4288 cat conftest.$ac_ext >&5
4290 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4291 cat >conftest.$ac_ext <<_ACEOF
4292 #line 4292 "configure"
4293 #include "confdefs.h"
4297 #include <sys/types.h>
4303 #ifdef _XOPEN_SOURCE
4310 rm -f conftest.$ac_objext
4311 if { (eval echo "$as_me:4311: \"$ac_compile\"") >&5
4312 (eval $ac_compile) 2>&5
4314 echo "$as_me:4314: \$? = $ac_status" >&5
4315 (exit $ac_status); } &&
4316 { ac_try='test -s conftest.$ac_objext'
4317 { (eval echo "$as_me:4317: \"$ac_try\"") >&5
4320 echo "$as_me:4320: \$? = $ac_status" >&5
4321 (exit $ac_status); }; }; then
4322 cf_cv_xopen_source=no
4324 echo "$as_me: failed program was:" >&5
4325 cat conftest.$ac_ext >&5
4326 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4328 rm -f conftest.$ac_objext conftest.$ac_ext
4332 rm -f conftest.$ac_objext conftest.$ac_ext
4335 echo "$as_me:4335: result: $cf_cv_xopen_source" >&5
4336 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4338 if test "$cf_cv_xopen_source" != no ; then
4340 CFLAGS=`echo "$CFLAGS" | \
4341 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4342 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4344 CPPFLAGS=`echo "$CPPFLAGS" | \
4345 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4346 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4348 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4353 cf_new_extra_cppflags=
4355 for cf_add_cflags in $cf_temp_xopen_source
4357 case $cf_fix_cppflags in
4359 case $cf_add_cflags in
4360 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4361 case $cf_add_cflags in
4363 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4365 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4366 && test -z "${cf_tst_cflags}" \
4367 && cf_fix_cppflags=yes
4369 if test $cf_fix_cppflags = yes ; then
4371 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4372 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4375 elif test "${cf_tst_cflags}" = "\"'" ; then
4377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4388 case $cf_add_cflags in
4390 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4392 CPPFLAGS=`echo "$CPPFLAGS" | \
4393 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4394 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4399 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4400 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4407 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4408 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4418 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4420 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4421 && test -z "${cf_tst_cflags}" \
4422 && cf_fix_cppflags=no
4427 if test -n "$cf_new_cflags" ; then
4429 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4430 CFLAGS="${CFLAGS}$cf_new_cflags"
4434 if test -n "$cf_new_cppflags" ; then
4436 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4437 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4441 if test -n "$cf_new_extra_cppflags" ; then
4443 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4444 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4453 echo "$as_me:4453: checking for signal global datatype" >&5
4454 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4455 if test "${cf_cv_sig_atomic_t+set}" = set; then
4456 echo $ECHO_N "(cached) $ECHO_C" >&6
4460 "volatile sig_atomic_t" \
4464 cat >conftest.$ac_ext <<_ACEOF
4465 #line 4465 "configure"
4466 #include "confdefs.h"
4468 #include <sys/types.h>
4474 static void handler(int sig)
4481 signal(SIGINT, handler);
4487 rm -f conftest.$ac_objext
4488 if { (eval echo "$as_me:4488: \"$ac_compile\"") >&5
4489 (eval $ac_compile) 2>&5
4491 echo "$as_me:4491: \$? = $ac_status" >&5
4492 (exit $ac_status); } &&
4493 { ac_try='test -s conftest.$ac_objext'
4494 { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4497 echo "$as_me:4497: \$? = $ac_status" >&5
4498 (exit $ac_status); }; }; then
4499 cf_cv_sig_atomic_t=$cf_type
4501 echo "$as_me: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 cf_cv_sig_atomic_t=no
4505 rm -f conftest.$ac_objext conftest.$ac_ext
4506 test "$cf_cv_sig_atomic_t" != no && break
4511 echo "$as_me:4511: result: $cf_cv_sig_atomic_t" >&5
4512 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4513 test "$cf_cv_sig_atomic_t" != no &&
4514 cat >>confdefs.h <<EOF
4515 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4518 # Work around breakage on OS X
4520 echo "$as_me:4520: checking if SIGWINCH is defined" >&5
4521 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4522 if test "${cf_cv_define_sigwinch+set}" = set; then
4523 echo $ECHO_N "(cached) $ECHO_C" >&6
4526 cat >conftest.$ac_ext <<_ACEOF
4527 #line 4527 "configure"
4528 #include "confdefs.h"
4530 #include <sys/types.h>
4531 #include <sys/signal.h>
4541 rm -f conftest.$ac_objext
4542 if { (eval echo "$as_me:4542: \"$ac_compile\"") >&5
4543 (eval $ac_compile) 2>&5
4545 echo "$as_me:4545: \$? = $ac_status" >&5
4546 (exit $ac_status); } &&
4547 { ac_try='test -s conftest.$ac_objext'
4548 { (eval echo "$as_me:4548: \"$ac_try\"") >&5
4551 echo "$as_me:4551: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4553 cf_cv_define_sigwinch=yes
4555 echo "$as_me: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
4557 cat >conftest.$ac_ext <<_ACEOF
4558 #line 4558 "configure"
4559 #include "confdefs.h"
4561 #undef _XOPEN_SOURCE
4562 #undef _POSIX_SOURCE
4563 #undef _POSIX_C_SOURCE
4564 #include <sys/types.h>
4565 #include <sys/signal.h>
4575 rm -f conftest.$ac_objext
4576 if { (eval echo "$as_me:4576: \"$ac_compile\"") >&5
4577 (eval $ac_compile) 2>&5
4579 echo "$as_me:4579: \$? = $ac_status" >&5
4580 (exit $ac_status); } &&
4581 { ac_try='test -s conftest.$ac_objext'
4582 { (eval echo "$as_me:4582: \"$ac_try\"") >&5
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit $ac_status); }; }; then
4587 cf_cv_define_sigwinch=maybe
4589 echo "$as_me: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 cf_cv_define_sigwinch=no
4593 rm -f conftest.$ac_objext conftest.$ac_ext
4596 rm -f conftest.$ac_objext conftest.$ac_ext
4599 echo "$as_me:4599: result: $cf_cv_define_sigwinch" >&5
4600 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4602 if test "$cf_cv_define_sigwinch" = maybe ; then
4603 echo "$as_me:4603: checking for actual SIGWINCH definition" >&5
4604 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4605 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4606 echo $ECHO_N "(cached) $ECHO_C" >&6
4609 cf_cv_fixup_sigwinch=unknown
4611 while test $cf_sigwinch != 1
4613 cat >conftest.$ac_ext <<_ACEOF
4614 #line 4614 "configure"
4615 #include "confdefs.h"
4617 #undef _XOPEN_SOURCE
4618 #undef _POSIX_SOURCE
4619 #undef _POSIX_C_SOURCE
4620 #include <sys/types.h>
4621 #include <sys/signal.h>
4627 #if SIGWINCH != $cf_sigwinch
4635 rm -f conftest.$ac_objext
4636 if { (eval echo "$as_me:4636: \"$ac_compile\"") >&5
4637 (eval $ac_compile) 2>&5
4639 echo "$as_me:4639: \$? = $ac_status" >&5
4640 (exit $ac_status); } &&
4641 { ac_try='test -s conftest.$ac_objext'
4642 { (eval echo "$as_me:4642: \"$ac_try\"") >&5
4645 echo "$as_me:4645: \$? = $ac_status" >&5
4646 (exit $ac_status); }; }; then
4647 cf_cv_fixup_sigwinch=$cf_sigwinch
4650 echo "$as_me: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4653 rm -f conftest.$ac_objext conftest.$ac_ext
4655 cf_sigwinch=`expr $cf_sigwinch - 1`
4659 echo "$as_me:4659: result: $cf_cv_fixup_sigwinch" >&5
4660 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4662 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4663 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4667 # Checks for CODESET support.
4669 echo "$as_me:4669: checking for nl_langinfo and CODESET" >&5
4670 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4671 if test "${am_cv_langinfo_codeset+set}" = set; then
4672 echo $ECHO_N "(cached) $ECHO_C" >&6
4674 cat >conftest.$ac_ext <<_ACEOF
4675 #line 4675 "configure"
4676 #include "confdefs.h"
4677 #include <langinfo.h>
4681 char* cs = nl_langinfo(CODESET);
4686 rm -f conftest.$ac_objext conftest$ac_exeext
4687 if { (eval echo "$as_me:4687: \"$ac_link\"") >&5
4688 (eval $ac_link) 2>&5
4690 echo "$as_me:4690: \$? = $ac_status" >&5
4691 (exit $ac_status); } &&
4692 { ac_try='test -s conftest$ac_exeext'
4693 { (eval echo "$as_me:4693: \"$ac_try\"") >&5
4696 echo "$as_me:4696: \$? = $ac_status" >&5
4697 (exit $ac_status); }; }; then
4698 am_cv_langinfo_codeset=yes
4700 echo "$as_me: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 am_cv_langinfo_codeset=no
4704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4707 echo "$as_me:4707: result: $am_cv_langinfo_codeset" >&5
4708 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4709 if test $am_cv_langinfo_codeset = yes; then
4711 cat >>confdefs.h <<\EOF
4712 #define HAVE_LANGINFO_CODESET 1
4717 echo "$as_me:4717: checking if you want to use pkg-config" >&5
4718 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4720 # Check whether --with-pkg-config or --without-pkg-config was given.
4721 if test "${with_pkg_config+set}" = set; then
4722 withval="$with_pkg_config"
4723 cf_pkg_config=$withval
4727 echo "$as_me:4727: result: $cf_pkg_config" >&5
4728 echo "${ECHO_T}$cf_pkg_config" >&6
4730 case $cf_pkg_config in
4736 if test -n "$ac_tool_prefix"; then
4737 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4738 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4739 echo "$as_me:4739: checking for $ac_word" >&5
4740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4741 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4742 echo $ECHO_N "(cached) $ECHO_C" >&6
4746 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4749 ac_save_IFS=$IFS; IFS=$ac_path_separator
4751 for ac_dir in $ac_dummy; do
4753 test -z "$ac_dir" && ac_dir=.
4754 if $as_executable_p "$ac_dir/$ac_word"; then
4755 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4756 echo "$as_me:4756: found $ac_dir/$ac_word" >&5
4764 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4766 if test -n "$PKG_CONFIG"; then
4767 echo "$as_me:4767: result: $PKG_CONFIG" >&5
4768 echo "${ECHO_T}$PKG_CONFIG" >&6
4770 echo "$as_me:4770: result: no" >&5
4771 echo "${ECHO_T}no" >&6
4775 if test -z "$ac_cv_path_PKG_CONFIG"; then
4776 ac_pt_PKG_CONFIG=$PKG_CONFIG
4777 # Extract the first word of "pkg-config", so it can be a program name with args.
4778 set dummy pkg-config; ac_word=$2
4779 echo "$as_me:4779: checking for $ac_word" >&5
4780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4781 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
4784 case $ac_pt_PKG_CONFIG in
4786 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4789 ac_save_IFS=$IFS; IFS=$ac_path_separator
4791 for ac_dir in $ac_dummy; do
4793 test -z "$ac_dir" && ac_dir=.
4794 if $as_executable_p "$ac_dir/$ac_word"; then
4795 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4796 echo "$as_me:4796: found $ac_dir/$ac_word" >&5
4801 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4805 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4807 if test -n "$ac_pt_PKG_CONFIG"; then
4808 echo "$as_me:4808: result: $ac_pt_PKG_CONFIG" >&5
4809 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4811 echo "$as_me:4811: result: no" >&5
4812 echo "${ECHO_T}no" >&6
4815 PKG_CONFIG=$ac_pt_PKG_CONFIG
4817 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4826 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4827 if test "$PKG_CONFIG" != none ; then
4829 if test "x$prefix" != xNONE; then
4830 cf_path_syntax="$prefix"
4832 cf_path_syntax="$ac_default_prefix"
4835 case ".$PKG_CONFIG" in
4840 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4842 (.\${*prefix}*|.\${*dir}*)
4843 eval PKG_CONFIG="$PKG_CONFIG"
4844 case ".$PKG_CONFIG" in
4846 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4851 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4854 { { echo "$as_me:4854: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4855 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4856 { (exit 1); exit 1; }; }
4860 elif test "x$cf_pkg_config" != xno ; then
4861 { echo "$as_me:4861: WARNING: pkg-config is not installed" >&5
4862 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4865 echo "$as_me:4865: checking if you want to see long compiling messages" >&5
4866 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4868 # Check whether --enable-echo or --disable-echo was given.
4869 if test "${enable_echo+set}" = set; then
4870 enableval="$enable_echo"
4871 test "$enableval" != no && enableval=yes
4872 if test "$enableval" != "yes" ; then
4875 ECHO_LD='@echo linking $@;'
4876 RULE_CC='@echo compiling $<'
4877 SHOW_CC='@echo compiling $@'
4899 echo "$as_me:4899: result: $enableval" >&5
4900 echo "${ECHO_T}$enableval" >&6
4902 echo "$as_me:4902: checking for ncurses wrap-prefix" >&5
4903 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4905 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4906 if test "${with_ncurses_wrap_prefix+set}" = set; then
4907 withval="$with_ncurses_wrap_prefix"
4908 NCURSES_WRAP_PREFIX=$withval
4910 NCURSES_WRAP_PREFIX=_nc_
4912 echo "$as_me:4912: result: $NCURSES_WRAP_PREFIX" >&5
4913 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4915 echo "$as_me:4915: checking if you want to check for wide-character functions" >&5
4916 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4918 # Check whether --enable-widec or --disable-widec was given.
4919 if test "${enable_widec+set}" = set; then
4920 enableval="$enable_widec"
4921 test "$enableval" != no && enableval=yes
4922 if test "$enableval" != "yes" ; then
4932 echo "$as_me:4932: result: $cf_enable_widec" >&5
4933 echo "${ECHO_T}$cf_enable_widec" >&6
4935 echo "$as_me:4935: checking for specific curses-directory" >&5
4936 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4938 # Check whether --with-curses-dir or --without-curses-dir was given.
4939 if test "${with_curses_dir+set}" = set; then
4940 withval="$with_curses_dir"
4941 cf_cv_curses_dir=$withval
4945 echo "$as_me:4945: result: $cf_cv_curses_dir" >&5
4946 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4948 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4951 if test "x$prefix" != xNONE; then
4952 cf_path_syntax="$prefix"
4954 cf_path_syntax="$ac_default_prefix"
4962 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4964 (.\${*prefix}*|.\${*dir}*)
4965 eval withval="$withval"
4968 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4973 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4976 { { echo "$as_me:4976: error: expected a pathname, not \"$withval\"" >&5
4977 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4978 { (exit 1); exit 1; }; }
4982 if test -d "$cf_cv_curses_dir"
4985 if test -n "$cf_cv_curses_dir/include" ; then
4986 for cf_add_incdir in $cf_cv_curses_dir/include
4988 while test $cf_add_incdir != /usr/include
4990 if test -d $cf_add_incdir
4993 if test -n "$CFLAGS$CPPFLAGS" ; then
4994 # a loop is needed to ensure we can add subdirs of existing dirs
4995 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4996 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4997 cf_have_incdir=yes; break
5002 if test "$cf_have_incdir" = no ; then
5003 if test "$cf_add_incdir" = /usr/local/include ; then
5004 if test "$GCC" = yes
5006 cf_save_CPPFLAGS=$CPPFLAGS
5007 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5008 cat >conftest.$ac_ext <<_ACEOF
5009 #line 5009 "configure"
5010 #include "confdefs.h"
5020 rm -f conftest.$ac_objext
5021 if { (eval echo "$as_me:5021: \"$ac_compile\"") >&5
5022 (eval $ac_compile) 2>&5
5024 echo "$as_me:5024: \$? = $ac_status" >&5
5025 (exit $ac_status); } &&
5026 { ac_try='test -s conftest.$ac_objext'
5027 { (eval echo "$as_me:5027: \"$ac_try\"") >&5
5030 echo "$as_me:5030: \$? = $ac_status" >&5
5031 (exit $ac_status); }; }; then
5034 echo "$as_me: failed program was:" >&5
5035 cat conftest.$ac_ext >&5
5038 rm -f conftest.$ac_objext conftest.$ac_ext
5039 CPPFLAGS=$cf_save_CPPFLAGS
5044 if test "$cf_have_incdir" = no ; then
5045 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5047 echo "${as_me:-configure}:5047: testing adding $cf_add_incdir to include-path ..." 1>&5
5049 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5051 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5052 test "$cf_top_incdir" = "$cf_add_incdir" && break
5053 cf_add_incdir="$cf_top_incdir"
5064 if test -n "$cf_cv_curses_dir/lib" ; then
5065 for cf_add_libdir in $cf_cv_curses_dir/lib
5067 if test $cf_add_libdir = /usr/lib ; then
5069 elif test -d $cf_add_libdir
5072 if test -n "$LDFLAGS$LIBS" ; then
5073 # a loop is needed to ensure we can add subdirs of existing dirs
5074 for cf_test_libdir in $LDFLAGS $LIBS ; do
5075 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5076 cf_have_libdir=yes; break
5080 if test "$cf_have_libdir" = no ; then
5081 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5083 echo "${as_me:-configure}:5083: testing adding $cf_add_libdir to library-path ..." 1>&5
5085 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5096 echo "$as_me:5096: checking for specified curses library type" >&5
5097 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5099 # Check whether --with-screen or --without-screen was given.
5100 if test "${with_screen+set}" = set; then
5101 withval="$with_screen"
5102 cf_cv_screen=$withval
5105 # Check whether --with-ncursesw or --without-ncursesw was given.
5106 if test "${with_ncursesw+set}" = set; then
5107 withval="$with_ncursesw"
5108 cf_cv_screen=ncursesw
5111 # Check whether --with-ncurses or --without-ncurses was given.
5112 if test "${with_ncurses+set}" = set; then
5113 withval="$with_ncurses"
5114 cf_cv_screen=ncurses
5117 # Check whether --with-pdcurses or --without-pdcurses was given.
5118 if test "${with_pdcurses+set}" = set; then
5119 withval="$with_pdcurses"
5120 cf_cv_screen=pdcurses
5123 # Check whether --with-curses-colr or --without-curses-colr was given.
5124 if test "${with_curses_colr+set}" = set; then
5125 withval="$with_curses_colr"
5126 cf_cv_screen=curses_colr
5129 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5130 if test "${with_curses_5lib+set}" = set; then
5131 withval="$with_curses_5lib"
5132 cf_cv_screen=curses_5lib
5140 echo "$as_me:5140: result: $cf_cv_screen" >&5
5141 echo "${ECHO_T}$cf_cv_screen" >&6
5143 case $cf_cv_screen in
5146 echo "$as_me:5146: checking for extra include directories" >&5
5147 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5148 if test "${cf_cv_curses_incdir+set}" = set; then
5149 echo $ECHO_N "(cached) $ECHO_C" >&6
5152 cf_cv_curses_incdir=no
5155 if test "x$cf_cv_screen" = "xcurses_colr"
5157 test -d /usr/include/curses_colr && \
5158 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5162 if test "x$cf_cv_screen" = "xcurses_5lib"
5164 test -d /usr/5lib && \
5165 test -d /usr/5include && \
5166 cf_cv_curses_incdir="-I/usr/5include"
5172 echo "$as_me:5172: result: $cf_cv_curses_incdir" >&5
5173 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5174 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5176 echo "$as_me:5176: checking if we have identified curses headers" >&5
5177 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5178 if test "${cf_cv_ncurses_header+set}" = set; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5182 cf_cv_ncurses_header=none
5185 curses.h ncurses/ncurses.h ncurses/curses.h
5187 cat >conftest.$ac_ext <<_ACEOF
5188 #line 5188 "configure"
5189 #include "confdefs.h"
5190 #include <${cf_header}>
5194 initscr(); tgoto("?", 0,0)
5199 rm -f conftest.$ac_objext
5200 if { (eval echo "$as_me:5200: \"$ac_compile\"") >&5
5201 (eval $ac_compile) 2>&5
5203 echo "$as_me:5203: \$? = $ac_status" >&5
5204 (exit $ac_status); } &&
5205 { ac_try='test -s conftest.$ac_objext'
5206 { (eval echo "$as_me:5206: \"$ac_try\"") >&5
5209 echo "$as_me:5209: \$? = $ac_status" >&5
5210 (exit $ac_status); }; }; then
5211 cf_cv_ncurses_header=$cf_header; break
5213 echo "$as_me: failed program was:" >&5
5214 cat conftest.$ac_ext >&5
5216 rm -f conftest.$ac_objext conftest.$ac_ext
5220 echo "$as_me:5220: result: $cf_cv_ncurses_header" >&5
5221 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5223 if test "$cf_cv_ncurses_header" = none ; then
5224 { { echo "$as_me:5224: error: No curses header-files found" >&5
5225 echo "$as_me: error: No curses header-files found" >&2;}
5226 { (exit 1); exit 1; }; }
5229 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5231 for ac_header in $cf_cv_ncurses_header
5233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5234 echo "$as_me:5234: checking for $ac_header" >&5
5235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5237 echo $ECHO_N "(cached) $ECHO_C" >&6
5239 cat >conftest.$ac_ext <<_ACEOF
5240 #line 5240 "configure"
5241 #include "confdefs.h"
5242 #include <$ac_header>
5244 if { (eval echo "$as_me:5244: \"$ac_cpp conftest.$ac_ext\"") >&5
5245 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5247 egrep -v '^ *\+' conftest.er1 >conftest.err
5249 cat conftest.err >&5
5250 echo "$as_me:5250: \$? = $ac_status" >&5
5251 (exit $ac_status); } >/dev/null; then
5252 if test -s conftest.err; then
5253 ac_cpp_err=$ac_c_preproc_warn_flag
5260 if test -z "$ac_cpp_err"; then
5261 eval "$as_ac_Header=yes"
5263 echo "$as_me: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
5265 eval "$as_ac_Header=no"
5267 rm -f conftest.err conftest.$ac_ext
5269 echo "$as_me:5269: result: `eval echo '${'$as_ac_Header'}'`" >&5
5270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5272 cat >>confdefs.h <<EOF
5273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5279 echo "$as_me:5279: checking for terminfo header" >&5
5280 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5281 if test "${cf_cv_term_header+set}" = set; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5285 case ${cf_cv_ncurses_header} in
5286 (*/ncurses.h|*/ncursesw.h)
5287 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5290 cf_term_header=term.h
5294 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5296 cat >conftest.$ac_ext <<_ACEOF
5297 #line 5297 "configure"
5298 #include "confdefs.h"
5300 #include <${cf_cv_ncurses_header:-curses.h}>
5306 int x = auto_left_margin
5311 rm -f conftest.$ac_objext
5312 if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
5313 (eval $ac_compile) 2>&5
5315 echo "$as_me:5315: \$? = $ac_status" >&5
5316 (exit $ac_status); } &&
5317 { ac_try='test -s conftest.$ac_objext'
5318 { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5321 echo "$as_me:5321: \$? = $ac_status" >&5
5322 (exit $ac_status); }; }; then
5324 cf_cv_term_header="$cf_test"
5326 echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5329 cf_cv_term_header=unknown
5332 rm -f conftest.$ac_objext conftest.$ac_ext
5333 test "$cf_cv_term_header" != unknown && break
5337 echo "$as_me:5337: result: $cf_cv_term_header" >&5
5338 echo "${ECHO_T}$cf_cv_term_header" >&6
5340 # Set definitions to allow ifdef'ing to accommodate subdirectories
5342 case $cf_cv_term_header in
5345 cat >>confdefs.h <<\EOF
5346 #define HAVE_TERM_H 1
5352 case $cf_cv_term_header in
5355 cat >>confdefs.h <<\EOF
5356 #define HAVE_NCURSES_TERM_H 1
5362 cat >>confdefs.h <<\EOF
5363 #define HAVE_NCURSESW_TERM_H 1
5369 echo "$as_me:5369: checking for ncurses version" >&5
5370 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5371 if test "${cf_cv_ncurses_version+set}" = set; then
5372 echo $ECHO_N "(cached) $ECHO_C" >&6
5375 cf_cv_ncurses_version=no
5378 if test "$cross_compiling" = yes; then
5380 # This will not work if the preprocessor splits the line after the
5381 # Autoconf token. The 'unproto' program does that.
5382 cat > conftest.$ac_ext <<EOF
5383 #include <${cf_cv_ncurses_header:-curses.h}>
5385 #ifdef NCURSES_VERSION
5386 Autoconf NCURSES_VERSION
5394 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5395 { (eval echo "$as_me:5395: \"$cf_try\"") >&5
5398 echo "$as_me:5398: \$? = $ac_status" >&5
5399 (exit $ac_status); }
5400 if test -f conftest.out ; then
5401 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5402 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5407 cat >conftest.$ac_ext <<_ACEOF
5408 #line 5408 "configure"
5409 #include "confdefs.h"
5411 #include <${cf_cv_ncurses_header:-curses.h}>
5415 FILE *fp = fopen("$cf_tempfile", "w");
5416 #ifdef NCURSES_VERSION
5417 # ifdef NCURSES_VERSION_PATCH
5418 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5420 fprintf(fp, "%s\n", NCURSES_VERSION);
5424 fprintf(fp, "old\n");
5429 ${cf_cv_main_return:-return}(0);
5432 rm -f conftest$ac_exeext
5433 if { (eval echo "$as_me:5433: \"$ac_link\"") >&5
5434 (eval $ac_link) 2>&5
5436 echo "$as_me:5436: \$? = $ac_status" >&5
5437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5438 { (eval echo "$as_me:5438: \"$ac_try\"") >&5
5441 echo "$as_me:5441: \$? = $ac_status" >&5
5442 (exit $ac_status); }; }; then
5444 cf_cv_ncurses_version=`cat $cf_tempfile`
5446 echo "$as_me: program exited with status $ac_status" >&5
5447 echo "$as_me: failed program was:" >&5
5448 cat conftest.$ac_ext >&5
5450 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5455 echo "$as_me:5455: result: $cf_cv_ncurses_version" >&5
5456 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5457 test "$cf_cv_ncurses_version" = no ||
5458 cat >>confdefs.h <<\EOF
5462 echo "$as_me:5462: checking if we have identified curses libraries" >&5
5463 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5464 cat >conftest.$ac_ext <<_ACEOF
5465 #line 5465 "configure"
5466 #include "confdefs.h"
5467 #include <${cf_cv_ncurses_header:-curses.h}>
5471 initscr(); tgoto("?", 0,0)
5476 rm -f conftest.$ac_objext conftest$ac_exeext
5477 if { (eval echo "$as_me:5477: \"$ac_link\"") >&5
5478 (eval $ac_link) 2>&5
5480 echo "$as_me:5480: \$? = $ac_status" >&5
5481 (exit $ac_status); } &&
5482 { ac_try='test -s conftest$ac_exeext'
5483 { (eval echo "$as_me:5483: \"$ac_try\"") >&5
5486 echo "$as_me:5486: \$? = $ac_status" >&5
5487 (exit $ac_status); }; }; then
5490 echo "$as_me: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
5494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5495 echo "$as_me:5495: result: $cf_result" >&5
5496 echo "${ECHO_T}$cf_result" >&6
5498 if test "$cf_result" = no ; then
5501 echo "$as_me:5501: checking for tgoto in -lmytinfo" >&5
5502 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5503 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5504 echo $ECHO_N "(cached) $ECHO_C" >&6
5506 ac_check_lib_save_LIBS=$LIBS
5507 LIBS="-lmytinfo $LIBS"
5508 cat >conftest.$ac_ext <<_ACEOF
5509 #line 5509 "configure"
5510 #include "confdefs.h"
5512 /* Override any gcc2 internal prototype to avoid an error. */
5516 /* We use char because int might match the return type of a gcc2
5517 builtin and then its argument prototype would still apply. */
5527 rm -f conftest.$ac_objext conftest$ac_exeext
5528 if { (eval echo "$as_me:5528: \"$ac_link\"") >&5
5529 (eval $ac_link) 2>&5
5531 echo "$as_me:5531: \$? = $ac_status" >&5
5532 (exit $ac_status); } &&
5533 { ac_try='test -s conftest$ac_exeext'
5534 { (eval echo "$as_me:5534: \"$ac_try\"") >&5
5537 echo "$as_me:5537: \$? = $ac_status" >&5
5538 (exit $ac_status); }; }; then
5539 ac_cv_lib_mytinfo_tgoto=yes
5541 echo "$as_me: failed program was:" >&5
5542 cat conftest.$ac_ext >&5
5543 ac_cv_lib_mytinfo_tgoto=no
5545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5546 LIBS=$ac_check_lib_save_LIBS
5548 echo "$as_me:5548: result: $ac_cv_lib_mytinfo_tgoto" >&5
5549 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5550 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5552 cf_add_libs="-lmytinfo"
5553 # Filter out duplicates - this happens with badly-designed ".pc" files...
5554 for cf_add_1lib in $LIBS
5556 for cf_add_2lib in $cf_add_libs
5558 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5564 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5572 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5573 # next (1998), and xcurses "newer" (2000). There is no header file for
5574 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5575 # term.h) for cur_colr
5576 if test "x$cf_cv_screen" = "xcurses_colr"
5578 echo "$as_me:5578: checking for initscr in -lcur_colr" >&5
5579 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5580 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5581 echo $ECHO_N "(cached) $ECHO_C" >&6
5583 ac_check_lib_save_LIBS=$LIBS
5584 LIBS="-lcur_colr $LIBS"
5585 cat >conftest.$ac_ext <<_ACEOF
5586 #line 5586 "configure"
5587 #include "confdefs.h"
5589 /* Override any gcc2 internal prototype to avoid an error. */
5593 /* We use char because int might match the return type of a gcc2
5594 builtin and then its argument prototype would still apply. */
5604 rm -f conftest.$ac_objext conftest$ac_exeext
5605 if { (eval echo "$as_me:5605: \"$ac_link\"") >&5
5606 (eval $ac_link) 2>&5
5608 echo "$as_me:5608: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
5610 { ac_try='test -s conftest$ac_exeext'
5611 { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5614 echo "$as_me:5614: \$? = $ac_status" >&5
5615 (exit $ac_status); }; }; then
5616 ac_cv_lib_cur_colr_initscr=yes
5618 echo "$as_me: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 ac_cv_lib_cur_colr_initscr=no
5622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5623 LIBS=$ac_check_lib_save_LIBS
5625 echo "$as_me:5625: result: $ac_cv_lib_cur_colr_initscr" >&5
5626 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5627 if test $ac_cv_lib_cur_colr_initscr = yes; then
5629 cf_add_libs="-lcur_colr"
5630 # Filter out duplicates - this happens with badly-designed ".pc" files...
5631 for cf_add_1lib in $LIBS
5633 for cf_add_2lib in $cf_add_libs
5635 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5641 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5645 ac_cv_func_initscr=yes
5649 echo "$as_me:5649: checking for initscr in -lHcurses" >&5
5650 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5651 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
5654 ac_check_lib_save_LIBS=$LIBS
5655 LIBS="-lHcurses $LIBS"
5656 cat >conftest.$ac_ext <<_ACEOF
5657 #line 5657 "configure"
5658 #include "confdefs.h"
5660 /* Override any gcc2 internal prototype to avoid an error. */
5664 /* We use char because int might match the return type of a gcc2
5665 builtin and then its argument prototype would still apply. */
5675 rm -f conftest.$ac_objext conftest$ac_exeext
5676 if { (eval echo "$as_me:5676: \"$ac_link\"") >&5
5677 (eval $ac_link) 2>&5
5679 echo "$as_me:5679: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest$ac_exeext'
5682 { (eval echo "$as_me:5682: \"$ac_try\"") >&5
5685 echo "$as_me:5685: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_lib_Hcurses_initscr=yes
5689 echo "$as_me: failed program was:" >&5
5690 cat conftest.$ac_ext >&5
5691 ac_cv_lib_Hcurses_initscr=no
5693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5694 LIBS=$ac_check_lib_save_LIBS
5696 echo "$as_me:5696: result: $ac_cv_lib_Hcurses_initscr" >&5
5697 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5698 if test $ac_cv_lib_Hcurses_initscr = yes; then
5700 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5702 cf_add_libs="-lHcurses"
5703 # Filter out duplicates - this happens with badly-designed ".pc" files...
5704 for cf_add_1lib in $LIBS
5706 for cf_add_2lib in $cf_add_libs
5708 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5714 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5718 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5719 ac_cv_func_initscr=yes
5728 case `arch 2>/dev/null` in
5733 if test -n "/lib64" ; then
5734 for cf_add_libdir in /lib64
5736 if test $cf_add_libdir = /usr/lib ; then
5738 elif test -d $cf_add_libdir
5741 if test -n "$LDFLAGS$LIBS" ; then
5742 # a loop is needed to ensure we can add subdirs of existing dirs
5743 for cf_test_libdir in $LDFLAGS $LIBS ; do
5744 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5745 cf_have_libdir=yes; break
5749 if test "$cf_have_libdir" = no ; then
5750 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5752 echo "${as_me:-configure}:5752: testing adding $cf_add_libdir to library-path ..." 1>&5
5754 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5762 if test -n "/lib" ; then
5763 for cf_add_libdir in /lib
5765 if test $cf_add_libdir = /usr/lib ; then
5767 elif test -d $cf_add_libdir
5770 if test -n "$LDFLAGS$LIBS" ; then
5771 # a loop is needed to ensure we can add subdirs of existing dirs
5772 for cf_test_libdir in $LDFLAGS $LIBS ; do
5773 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5774 cf_have_libdir=yes; break
5778 if test "$cf_have_libdir" = no ; then
5779 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5781 echo "${as_me:-configure}:5781: testing adding $cf_add_libdir to library-path ..." 1>&5
5783 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5793 if test -n "/lib" ; then
5794 for cf_add_libdir in /lib
5796 if test $cf_add_libdir = /usr/lib ; then
5798 elif test -d $cf_add_libdir
5801 if test -n "$LDFLAGS$LIBS" ; then
5802 # a loop is needed to ensure we can add subdirs of existing dirs
5803 for cf_test_libdir in $LDFLAGS $LIBS ; do
5804 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5805 cf_have_libdir=yes; break
5809 if test "$cf_have_libdir" = no ; then
5810 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5812 echo "${as_me:-configure}:5812: testing adding $cf_add_libdir to library-path ..." 1>&5
5814 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5824 if test "x$cf_cv_screen" = "xcurses_5lib"
5826 if test -d /usr/5lib ; then
5828 if test -n "/usr/5lib" ; then
5829 for cf_add_libdir in /usr/5lib
5831 if test $cf_add_libdir = /usr/lib ; then
5833 elif test -d $cf_add_libdir
5836 if test -n "$LDFLAGS$LIBS" ; then
5837 # a loop is needed to ensure we can add subdirs of existing dirs
5838 for cf_test_libdir in $LDFLAGS $LIBS ; do
5839 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5840 cf_have_libdir=yes; break
5844 if test "$cf_have_libdir" = no ; then
5845 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5847 echo "${as_me:-configure}:5847: testing adding $cf_add_libdir to library-path ..." 1>&5
5849 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5855 cf_add_libs="-lcurses -ltermcap"
5856 # Filter out duplicates - this happens with badly-designed ".pc" files...
5857 for cf_add_1lib in $LIBS
5859 for cf_add_2lib in $cf_add_libs
5861 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5867 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5873 ac_cv_func_initscr=yes
5877 if test ".$ac_cv_func_initscr" != .yes ; then
5878 cf_save_LIBS="$LIBS"
5880 if test ".${cf_cv_ncurses_version:-no}" != .no
5882 cf_check_list="ncurses curses cursesX"
5884 cf_check_list="cursesX curses ncurses"
5887 # Check for library containing tgoto. Do this before curses library
5888 # because it may be needed to link the test-case for initscr.
5889 if test "x$cf_term_lib" = x
5891 echo "$as_me:5891: checking for tgoto" >&5
5892 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5893 if test "${ac_cv_func_tgoto+set}" = set; then
5894 echo $ECHO_N "(cached) $ECHO_C" >&6
5896 cat >conftest.$ac_ext <<_ACEOF
5897 #line 5897 "configure"
5898 #include "confdefs.h"
5899 /* System header to define __stub macros and hopefully few prototypes,
5900 which can conflict with char tgoto (); below. */
5902 /* Override any gcc2 internal prototype to avoid an error. */
5906 /* We use char because int might match the return type of a gcc2
5907 builtin and then its argument prototype would still apply. */
5914 /* The GNU C library defines this for functions which it implements
5915 to always fail with ENOSYS. Some functions are actually named
5916 something starting with __ and the normal name is an alias. */
5917 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5920 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5927 rm -f conftest.$ac_objext conftest$ac_exeext
5928 if { (eval echo "$as_me:5928: \"$ac_link\"") >&5
5929 (eval $ac_link) 2>&5
5931 echo "$as_me:5931: \$? = $ac_status" >&5
5932 (exit $ac_status); } &&
5933 { ac_try='test -s conftest$ac_exeext'
5934 { (eval echo "$as_me:5934: \"$ac_try\"") >&5
5937 echo "$as_me:5937: \$? = $ac_status" >&5
5938 (exit $ac_status); }; }; then
5939 ac_cv_func_tgoto=yes
5941 echo "$as_me: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5947 echo "$as_me:5947: result: $ac_cv_func_tgoto" >&5
5948 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5949 if test $ac_cv_func_tgoto = yes; then
5950 cf_term_lib=predefined
5953 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5955 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5956 echo "$as_me:5956: checking for tgoto in -l$cf_term_lib" >&5
5957 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5958 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5959 echo $ECHO_N "(cached) $ECHO_C" >&6
5961 ac_check_lib_save_LIBS=$LIBS
5962 LIBS="-l$cf_term_lib $LIBS"
5963 cat >conftest.$ac_ext <<_ACEOF
5964 #line 5964 "configure"
5965 #include "confdefs.h"
5967 /* Override any gcc2 internal prototype to avoid an error. */
5971 /* We use char because int might match the return type of a gcc2
5972 builtin and then its argument prototype would still apply. */
5982 rm -f conftest.$ac_objext conftest$ac_exeext
5983 if { (eval echo "$as_me:5983: \"$ac_link\"") >&5
5984 (eval $ac_link) 2>&5
5986 echo "$as_me:5986: \$? = $ac_status" >&5
5987 (exit $ac_status); } &&
5988 { ac_try='test -s conftest$ac_exeext'
5989 { (eval echo "$as_me:5989: \"$ac_try\"") >&5
5992 echo "$as_me:5992: \$? = $ac_status" >&5
5993 (exit $ac_status); }; }; then
5994 eval "$as_ac_Lib=yes"
5996 echo "$as_me: failed program was:" >&5
5997 cat conftest.$ac_ext >&5
5998 eval "$as_ac_Lib=no"
6000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6001 LIBS=$ac_check_lib_save_LIBS
6003 echo "$as_me:6003: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6004 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6005 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6015 # Check for library containing initscr
6016 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6017 if test "x$cf_curs_lib" = x
6019 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6021 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6022 if test "$cf_term_lib" = unknown ; then
6023 echo "$as_me:6023: checking if we can link with $cf_curs_lib library" >&5
6024 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6025 cat >conftest.$ac_ext <<_ACEOF
6026 #line 6026 "configure"
6027 #include "confdefs.h"
6028 #include <${cf_cv_ncurses_header:-curses.h}>
6037 rm -f conftest.$ac_objext conftest$ac_exeext
6038 if { (eval echo "$as_me:6038: \"$ac_link\"") >&5
6039 (eval $ac_link) 2>&5
6041 echo "$as_me:6041: \$? = $ac_status" >&5
6042 (exit $ac_status); } &&
6043 { ac_try='test -s conftest$ac_exeext'
6044 { (eval echo "$as_me:6044: \"$ac_try\"") >&5
6047 echo "$as_me:6047: \$? = $ac_status" >&5
6048 (exit $ac_status); }; }; then
6051 echo "$as_me: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6056 echo "$as_me:6056: result: $cf_result" >&5
6057 echo "${ECHO_T}$cf_result" >&6
6058 test $cf_result = yes && break
6059 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6061 elif test "$cf_term_lib" != predefined ; then
6062 echo "$as_me:6062: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6063 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6064 cat >conftest.$ac_ext <<_ACEOF
6065 #line 6065 "configure"
6066 #include "confdefs.h"
6067 #include <${cf_cv_ncurses_header:-curses.h}>
6071 initscr(); tgoto((char *)0, 0, 0);
6076 rm -f conftest.$ac_objext conftest$ac_exeext
6077 if { (eval echo "$as_me:6077: \"$ac_link\"") >&5
6078 (eval $ac_link) 2>&5
6080 echo "$as_me:6080: \$? = $ac_status" >&5
6081 (exit $ac_status); } &&
6082 { ac_try='test -s conftest$ac_exeext'
6083 { (eval echo "$as_me:6083: \"$ac_try\"") >&5
6086 echo "$as_me:6086: \$? = $ac_status" >&5
6087 (exit $ac_status); }; }; then
6090 echo "$as_me: failed program was:" >&5
6091 cat conftest.$ac_ext >&5
6093 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6094 cat >conftest.$ac_ext <<_ACEOF
6095 #line 6095 "configure"
6096 #include "confdefs.h"
6097 #include <${cf_cv_ncurses_header:-curses.h}>
6106 rm -f conftest.$ac_objext conftest$ac_exeext
6107 if { (eval echo "$as_me:6107: \"$ac_link\"") >&5
6108 (eval $ac_link) 2>&5
6110 echo "$as_me:6110: \$? = $ac_status" >&5
6111 (exit $ac_status); } &&
6112 { ac_try='test -s conftest$ac_exeext'
6113 { (eval echo "$as_me:6113: \"$ac_try\"") >&5
6116 echo "$as_me:6116: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
6120 echo "$as_me: failed program was:" >&5
6121 cat conftest.$ac_ext >&5
6124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6128 echo "$as_me:6128: result: $cf_result" >&5
6129 echo "${ECHO_T}$cf_result" >&6
6130 test $cf_result != error && break
6134 test $cf_curs_lib = unknown && { { echo "$as_me:6134: error: no curses library found" >&5
6135 echo "$as_me: error: no curses library found" >&2;}
6136 { (exit 1); exit 1; }; }
6143 echo "$as_me:6143: checking for multibyte character support" >&5
6144 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6145 if test "${cf_cv_utf8_lib+set}" = set; then
6146 echo $ECHO_N "(cached) $ECHO_C" >&6
6149 cf_save_LIBS="$LIBS"
6150 cat >conftest.$ac_ext <<_ACEOF
6151 #line 6151 "configure"
6152 #include "confdefs.h"
6163 rm -f conftest.$ac_objext conftest$ac_exeext
6164 if { (eval echo "$as_me:6164: \"$ac_link\"") >&5
6165 (eval $ac_link) 2>&5
6167 echo "$as_me:6167: \$? = $ac_status" >&5
6168 (exit $ac_status); } &&
6169 { ac_try='test -s conftest$ac_exeext'
6170 { (eval echo "$as_me:6170: \"$ac_try\"") >&5
6173 echo "$as_me:6173: \$? = $ac_status" >&5
6174 (exit $ac_status); }; }; then
6177 echo "$as_me: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6180 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6181 # will be set on completion of the AC_TRY_LINK below.
6182 cf_cv_header_path_utf8=
6183 cf_cv_library_path_utf8=
6185 echo "${as_me:-configure}:6185: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6187 cf_save_LIBS="$LIBS"
6189 cat >conftest.$ac_ext <<_ACEOF
6190 #line 6190 "configure"
6191 #include "confdefs.h"
6193 #include <libutf8.h>
6202 rm -f conftest.$ac_objext conftest$ac_exeext
6203 if { (eval echo "$as_me:6203: \"$ac_link\"") >&5
6204 (eval $ac_link) 2>&5
6206 echo "$as_me:6206: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest$ac_exeext'
6209 { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6212 echo "$as_me:6212: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6215 cf_cv_find_linkage_utf8=yes
6216 cf_cv_header_path_utf8=/usr/include
6217 cf_cv_library_path_utf8=/usr/lib
6220 echo "$as_me: failed program was:" >&5
6221 cat conftest.$ac_ext >&5
6223 LIBS="-lutf8 $cf_save_LIBS"
6225 cat >conftest.$ac_ext <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6229 #include <libutf8.h>
6238 rm -f conftest.$ac_objext conftest$ac_exeext
6239 if { (eval echo "$as_me:6239: \"$ac_link\"") >&5
6240 (eval $ac_link) 2>&5
6242 echo "$as_me:6242: \$? = $ac_status" >&5
6243 (exit $ac_status); } &&
6244 { ac_try='test -s conftest$ac_exeext'
6245 { (eval echo "$as_me:6245: \"$ac_try\"") >&5
6248 echo "$as_me:6248: \$? = $ac_status" >&5
6249 (exit $ac_status); }; }; then
6251 cf_cv_find_linkage_utf8=yes
6252 cf_cv_header_path_utf8=/usr/include
6253 cf_cv_library_path_utf8=/usr/lib
6254 cf_cv_library_file_utf8="-lutf8"
6257 echo "$as_me: failed program was:" >&5
6258 cat conftest.$ac_ext >&5
6260 cf_cv_find_linkage_utf8=no
6261 LIBS="$cf_save_LIBS"
6263 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6265 echo "${as_me:-configure}:6265: testing find linkage for utf8 library ..." 1>&5
6267 echo "${as_me:-configure}:6267: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6269 cf_save_CPPFLAGS="$CPPFLAGS"
6270 cf_test_CPPFLAGS="$CPPFLAGS"
6274 # collect the current set of include-directories from compiler flags
6275 cf_header_path_list=""
6276 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6277 for cf_header_path in $CPPFLAGS $CFLAGS
6279 case $cf_header_path in
6281 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6283 test "x$cf_header_path" != "xNONE" && \
6284 test -d "$cf_header_path" && \
6286 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6287 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6288 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6289 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6290 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6291 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6294 cf_header_path_list="$cf_header_path_list $cf_search"
6300 # add the variations for the package we are looking for
6304 test "x$prefix" != "xNONE" && \
6305 test -d "$prefix" && \
6307 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6308 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6309 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6310 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6311 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6312 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6315 for cf_subdir_prefix in \
6324 test "x$cf_subdir_prefix" != "x$prefix" && \
6325 test -d "$cf_subdir_prefix" && \
6326 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6327 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6328 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6329 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6330 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6331 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6332 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6337 test "$includedir" != NONE && \
6338 test "$includedir" != "/usr/include" && \
6339 test -d "$includedir" && {
6340 test -d $includedir && cf_search="$cf_search $includedir"
6341 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6344 test "$oldincludedir" != NONE && \
6345 test "$oldincludedir" != "/usr/include" && \
6346 test -d "$oldincludedir" && {
6347 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6348 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6351 cf_search="$cf_search $cf_header_path_list"
6353 for cf_cv_header_path_utf8 in $cf_search
6355 if test -d $cf_cv_header_path_utf8 ; then
6356 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6358 echo "${as_me:-configure}:6358: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6360 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6361 cat >conftest.$ac_ext <<_ACEOF
6362 #line 6362 "configure"
6363 #include "confdefs.h"
6365 #include <libutf8.h>
6374 rm -f conftest.$ac_objext
6375 if { (eval echo "$as_me:6375: \"$ac_compile\"") >&5
6376 (eval $ac_compile) 2>&5
6378 echo "$as_me:6378: \$? = $ac_status" >&5
6379 (exit $ac_status); } &&
6380 { ac_try='test -s conftest.$ac_objext'
6381 { (eval echo "$as_me:6381: \"$ac_try\"") >&5
6384 echo "$as_me:6384: \$? = $ac_status" >&5
6385 (exit $ac_status); }; }; then
6387 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6389 echo "${as_me:-configure}:6389: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6391 cf_cv_find_linkage_utf8=maybe
6392 cf_test_CPPFLAGS="$CPPFLAGS"
6395 echo "$as_me: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6398 CPPFLAGS="$cf_save_CPPFLAGS"
6401 rm -f conftest.$ac_objext conftest.$ac_ext
6405 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6407 echo "${as_me:-configure}:6407: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6409 cf_save_LIBS="$LIBS"
6410 cf_save_LDFLAGS="$LDFLAGS"
6412 if test "$cf_cv_find_linkage_utf8" != yes ; then
6415 cf_library_path_list=""
6416 if test -n "${LDFLAGS}${LIBS}" ; then
6417 for cf_library_path in $LDFLAGS $LIBS
6419 case $cf_library_path in
6421 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6423 test "x$cf_library_path" != "xNONE" && \
6424 test -d "$cf_library_path" && \
6426 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6427 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6428 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6429 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6430 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6431 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6434 cf_library_path_list="$cf_library_path_list $cf_search"
6442 test "x$prefix" != "xNONE" && \
6443 test -d "$prefix" && \
6445 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6446 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6447 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6448 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6449 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6450 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6453 for cf_subdir_prefix in \
6462 test "x$cf_subdir_prefix" != "x$prefix" && \
6463 test -d "$cf_subdir_prefix" && \
6464 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6465 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6466 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6467 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6468 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6469 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6470 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6475 cf_search="$cf_library_path_list $cf_search"
6477 for cf_cv_library_path_utf8 in $cf_search
6479 if test -d $cf_cv_library_path_utf8 ; then
6480 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6482 echo "${as_me:-configure}:6482: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6484 CPPFLAGS="$cf_test_CPPFLAGS"
6485 LIBS="-lutf8 $cf_save_LIBS"
6486 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6487 cat >conftest.$ac_ext <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6491 #include <libutf8.h>
6500 rm -f conftest.$ac_objext conftest$ac_exeext
6501 if { (eval echo "$as_me:6501: \"$ac_link\"") >&5
6502 (eval $ac_link) 2>&5
6504 echo "$as_me:6504: \$? = $ac_status" >&5
6505 (exit $ac_status); } &&
6506 { ac_try='test -s conftest$ac_exeext'
6507 { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6510 echo "$as_me:6510: \$? = $ac_status" >&5
6511 (exit $ac_status); }; }; then
6513 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6515 echo "${as_me:-configure}:6515: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6517 cf_cv_find_linkage_utf8=yes
6518 cf_cv_library_file_utf8="-lutf8"
6521 echo "$as_me: failed program was:" >&5
6522 cat conftest.$ac_ext >&5
6524 CPPFLAGS="$cf_save_CPPFLAGS"
6525 LIBS="$cf_save_LIBS"
6526 LDFLAGS="$cf_save_LDFLAGS"
6529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6532 CPPFLAGS="$cf_save_CPPFLAGS"
6533 LDFLAGS="$cf_save_LDFLAGS"
6537 cf_cv_find_linkage_utf8=no
6541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6546 LIBS="$cf_save_LIBS"
6548 if test "$cf_cv_find_linkage_utf8" = yes ; then
6549 cf_cv_utf8_lib=add-on
6555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6557 echo "$as_me:6557: result: $cf_cv_utf8_lib" >&5
6558 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6560 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6562 if test "$cf_cv_utf8_lib" = "add-on" ; then
6564 cat >>confdefs.h <<\EOF
6565 #define HAVE_LIBUTF8_H 1
6568 if test -n "$cf_cv_header_path_utf8" ; then
6569 for cf_add_incdir in $cf_cv_header_path_utf8
6571 while test $cf_add_incdir != /usr/include
6573 if test -d $cf_add_incdir
6576 if test -n "$CFLAGS$CPPFLAGS" ; then
6577 # a loop is needed to ensure we can add subdirs of existing dirs
6578 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6579 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6580 cf_have_incdir=yes; break
6585 if test "$cf_have_incdir" = no ; then
6586 if test "$cf_add_incdir" = /usr/local/include ; then
6587 if test "$GCC" = yes
6589 cf_save_CPPFLAGS=$CPPFLAGS
6590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6591 cat >conftest.$ac_ext <<_ACEOF
6592 #line 6592 "configure"
6593 #include "confdefs.h"
6603 rm -f conftest.$ac_objext
6604 if { (eval echo "$as_me:6604: \"$ac_compile\"") >&5
6605 (eval $ac_compile) 2>&5
6607 echo "$as_me:6607: \$? = $ac_status" >&5
6608 (exit $ac_status); } &&
6609 { ac_try='test -s conftest.$ac_objext'
6610 { (eval echo "$as_me:6610: \"$ac_try\"") >&5
6613 echo "$as_me:6613: \$? = $ac_status" >&5
6614 (exit $ac_status); }; }; then
6617 echo "$as_me: failed program was:" >&5
6618 cat conftest.$ac_ext >&5
6621 rm -f conftest.$ac_objext conftest.$ac_ext
6622 CPPFLAGS=$cf_save_CPPFLAGS
6627 if test "$cf_have_incdir" = no ; then
6628 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6630 echo "${as_me:-configure}:6630: testing adding $cf_add_incdir to include-path ..." 1>&5
6632 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6634 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6635 test "$cf_top_incdir" = "$cf_add_incdir" && break
6636 cf_add_incdir="$cf_top_incdir"
6647 if test -n "$cf_cv_library_path_utf8" ; then
6648 for cf_add_libdir in $cf_cv_library_path_utf8
6650 if test $cf_add_libdir = /usr/lib ; then
6652 elif test -d $cf_add_libdir
6655 if test -n "$LDFLAGS$LIBS" ; then
6656 # a loop is needed to ensure we can add subdirs of existing dirs
6657 for cf_test_libdir in $LDFLAGS $LIBS ; do
6658 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6659 cf_have_libdir=yes; break
6663 if test "$cf_have_libdir" = no ; then
6664 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6666 echo "${as_me:-configure}:6666: testing adding $cf_add_libdir to library-path ..." 1>&5
6668 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6674 cf_add_libs="$cf_cv_library_file_utf8"
6675 # Filter out duplicates - this happens with badly-designed ".pc" files...
6676 for cf_add_1lib in $LIBS
6678 for cf_add_2lib in $cf_add_libs
6680 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6686 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6692 cf_ncuconfig_root=$cf_cv_screen
6693 cf_have_ncuconfig=no
6695 if test "x${PKG_CONFIG:=none}" != xnone; then
6696 echo "$as_me:6696: checking pkg-config for $cf_ncuconfig_root" >&5
6697 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6698 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6699 echo "$as_me:6699: result: yes" >&5
6700 echo "${ECHO_T}yes" >&6
6702 echo "$as_me:6702: checking if the $cf_ncuconfig_root package files work" >&5
6703 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6704 cf_have_ncuconfig=unknown
6706 cf_save_CPPFLAGS="$CPPFLAGS"
6707 cf_save_LIBS="$LIBS"
6709 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6711 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6712 # Filter out duplicates - this happens with badly-designed ".pc" files...
6713 for cf_add_1lib in $LIBS
6715 for cf_add_2lib in $cf_add_libs
6717 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6723 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6727 cat >conftest.$ac_ext <<_ACEOF
6728 #line 6728 "configure"
6729 #include "confdefs.h"
6730 #include <${cf_cv_ncurses_header:-curses.h}>
6734 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6739 rm -f conftest.$ac_objext conftest$ac_exeext
6740 if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
6741 (eval $ac_link) 2>&5
6743 echo "$as_me:6743: \$? = $ac_status" >&5
6744 (exit $ac_status); } &&
6745 { ac_try='test -s conftest$ac_exeext'
6746 { (eval echo "$as_me:6746: \"$ac_try\"") >&5
6749 echo "$as_me:6749: \$? = $ac_status" >&5
6750 (exit $ac_status); }; }; then
6751 if test "$cross_compiling" = yes; then
6752 cf_have_ncuconfig=maybe
6754 cat >conftest.$ac_ext <<_ACEOF
6755 #line 6755 "configure"
6756 #include "confdefs.h"
6757 #include <${cf_cv_ncurses_header:-curses.h}>
6759 { char *xx = curses_version(); return (xx == 0); }
6761 rm -f conftest$ac_exeext
6762 if { (eval echo "$as_me:6762: \"$ac_link\"") >&5
6763 (eval $ac_link) 2>&5
6765 echo "$as_me:6765: \$? = $ac_status" >&5
6766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6767 { (eval echo "$as_me:6767: \"$ac_try\"") >&5
6770 echo "$as_me:6770: \$? = $ac_status" >&5
6771 (exit $ac_status); }; }; then
6772 cf_have_ncuconfig=yes
6774 echo "$as_me: program exited with status $ac_status" >&5
6775 echo "$as_me: failed program was:" >&5
6776 cat conftest.$ac_ext >&5
6777 cf_have_ncuconfig=no
6779 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6782 echo "$as_me: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 cf_have_ncuconfig=no
6786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6787 echo "$as_me:6787: result: $cf_have_ncuconfig" >&5
6788 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6789 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6790 if test "$cf_have_ncuconfig" != "yes"
6792 CPPFLAGS="$cf_save_CPPFLAGS"
6793 LIBS="$cf_save_LIBS"
6794 NCURSES_CONFIG_PKG=none
6797 cat >>confdefs.h <<\EOF
6801 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6804 echo "$as_me:6804: checking for terminfo header" >&5
6805 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6806 if test "${cf_cv_term_header+set}" = set; then
6807 echo $ECHO_N "(cached) $ECHO_C" >&6
6810 case ${cf_cv_ncurses_header} in
6811 (*/ncurses.h|*/ncursesw.h)
6812 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6815 cf_term_header=term.h
6819 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6821 cat >conftest.$ac_ext <<_ACEOF
6822 #line 6822 "configure"
6823 #include "confdefs.h"
6825 #include <${cf_cv_ncurses_header:-curses.h}>
6831 int x = auto_left_margin
6836 rm -f conftest.$ac_objext
6837 if { (eval echo "$as_me:6837: \"$ac_compile\"") >&5
6838 (eval $ac_compile) 2>&5
6840 echo "$as_me:6840: \$? = $ac_status" >&5
6841 (exit $ac_status); } &&
6842 { ac_try='test -s conftest.$ac_objext'
6843 { (eval echo "$as_me:6843: \"$ac_try\"") >&5
6846 echo "$as_me:6846: \$? = $ac_status" >&5
6847 (exit $ac_status); }; }; then
6849 cf_cv_term_header="$cf_test"
6851 echo "$as_me: failed program was:" >&5
6852 cat conftest.$ac_ext >&5
6854 cf_cv_term_header=unknown
6857 rm -f conftest.$ac_objext conftest.$ac_ext
6858 test "$cf_cv_term_header" != unknown && break
6862 echo "$as_me:6862: result: $cf_cv_term_header" >&5
6863 echo "${ECHO_T}$cf_cv_term_header" >&6
6865 # Set definitions to allow ifdef'ing to accommodate subdirectories
6867 case $cf_cv_term_header in
6870 cat >>confdefs.h <<\EOF
6871 #define HAVE_TERM_H 1
6877 case $cf_cv_term_header in
6880 cat >>confdefs.h <<\EOF
6881 #define HAVE_NCURSES_TERM_H 1
6887 cat >>confdefs.h <<\EOF
6888 #define HAVE_NCURSESW_TERM_H 1
6895 echo "$as_me:6895: result: no" >&5
6896 echo "${ECHO_T}no" >&6
6897 NCURSES_CONFIG_PKG=none
6900 NCURSES_CONFIG_PKG=none
6903 if test "x$cf_have_ncuconfig" = "xno"; then
6904 echo "Looking for ${cf_ncuconfig_root}-config"
6906 if test -n "$ac_tool_prefix"; then
6907 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6909 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6910 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6911 echo "$as_me:6911: checking for $ac_word" >&5
6912 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6913 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6914 echo $ECHO_N "(cached) $ECHO_C" >&6
6916 if test -n "$NCURSES_CONFIG"; then
6917 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6919 ac_save_IFS=$IFS; IFS=$ac_path_separator
6921 for ac_dir in $ac_dummy; do
6923 test -z "$ac_dir" && ac_dir=.
6924 $as_executable_p "$ac_dir/$ac_word" || continue
6925 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6926 echo "$as_me:6926: found $ac_dir/$ac_word" >&5
6932 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6933 if test -n "$NCURSES_CONFIG"; then
6934 echo "$as_me:6934: result: $NCURSES_CONFIG" >&5
6935 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6937 echo "$as_me:6937: result: no" >&5
6938 echo "${ECHO_T}no" >&6
6941 test -n "$NCURSES_CONFIG" && break
6944 if test -z "$NCURSES_CONFIG"; then
6945 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6946 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6948 # Extract the first word of "$ac_prog", so it can be a program name with args.
6949 set dummy $ac_prog; ac_word=$2
6950 echo "$as_me:6950: checking for $ac_word" >&5
6951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6952 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6953 echo $ECHO_N "(cached) $ECHO_C" >&6
6955 if test -n "$ac_ct_NCURSES_CONFIG"; then
6956 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6958 ac_save_IFS=$IFS; IFS=$ac_path_separator
6960 for ac_dir in $ac_dummy; do
6962 test -z "$ac_dir" && ac_dir=.
6963 $as_executable_p "$ac_dir/$ac_word" || continue
6964 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6965 echo "$as_me:6965: found $ac_dir/$ac_word" >&5
6971 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6972 if test -n "$ac_ct_NCURSES_CONFIG"; then
6973 echo "$as_me:6973: result: $ac_ct_NCURSES_CONFIG" >&5
6974 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6976 echo "$as_me:6976: result: no" >&5
6977 echo "${ECHO_T}no" >&6
6980 test -n "$ac_ct_NCURSES_CONFIG" && break
6982 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6984 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6987 if test "$NCURSES_CONFIG" != none ; then
6989 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6991 cf_add_libs="`$NCURSES_CONFIG --libs`"
6992 # Filter out duplicates - this happens with badly-designed ".pc" files...
6993 for cf_add_1lib in $LIBS
6995 for cf_add_2lib in $cf_add_libs
6997 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7003 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7007 # even with config script, some packages use no-override for curses.h
7009 echo "$as_me:7009: checking if we have identified curses headers" >&5
7010 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7011 if test "${cf_cv_ncurses_header+set}" = set; then
7012 echo $ECHO_N "(cached) $ECHO_C" >&6
7015 cf_cv_ncurses_header=none
7017 ncurses.h $cf_cv_screen/ncurses.h \
7018 curses.h $cf_cv_screen/curses.h
7020 cat >conftest.$ac_ext <<_ACEOF
7021 #line 7021 "configure"
7022 #include "confdefs.h"
7023 #include <${cf_header}>
7027 initscr(); tgoto("?", 0,0)
7032 rm -f conftest.$ac_objext
7033 if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5
7034 (eval $ac_compile) 2>&5
7036 echo "$as_me:7036: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
7038 { ac_try='test -s conftest.$ac_objext'
7039 { (eval echo "$as_me:7039: \"$ac_try\"") >&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); }; }; then
7044 cf_cv_ncurses_header=$cf_header; break
7046 echo "$as_me: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7049 rm -f conftest.$ac_objext conftest.$ac_ext
7053 echo "$as_me:7053: result: $cf_cv_ncurses_header" >&5
7054 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7056 if test "$cf_cv_ncurses_header" = none ; then
7057 { { echo "$as_me:7057: error: No curses header-files found" >&5
7058 echo "$as_me: error: No curses header-files found" >&2;}
7059 { (exit 1); exit 1; }; }
7062 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7064 for ac_header in $cf_cv_ncurses_header
7066 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7067 echo "$as_me:7067: checking for $ac_header" >&5
7068 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7069 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7070 echo $ECHO_N "(cached) $ECHO_C" >&6
7072 cat >conftest.$ac_ext <<_ACEOF
7073 #line 7073 "configure"
7074 #include "confdefs.h"
7075 #include <$ac_header>
7077 if { (eval echo "$as_me:7077: \"$ac_cpp conftest.$ac_ext\"") >&5
7078 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7080 egrep -v '^ *\+' conftest.er1 >conftest.err
7082 cat conftest.err >&5
7083 echo "$as_me:7083: \$? = $ac_status" >&5
7084 (exit $ac_status); } >/dev/null; then
7085 if test -s conftest.err; then
7086 ac_cpp_err=$ac_c_preproc_warn_flag
7093 if test -z "$ac_cpp_err"; then
7094 eval "$as_ac_Header=yes"
7096 echo "$as_me: failed program was:" >&5
7097 cat conftest.$ac_ext >&5
7098 eval "$as_ac_Header=no"
7100 rm -f conftest.err conftest.$ac_ext
7102 echo "$as_me:7102: result: `eval echo '${'$as_ac_Header'}'`" >&5
7103 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7104 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7105 cat >>confdefs.h <<EOF
7106 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7112 cat >>confdefs.h <<\EOF
7116 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7118 cat >>confdefs.h <<EOF
7119 #define $cf_nculib_ROOT 1
7122 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7126 cf_ncuhdr_root=$cf_cv_screen
7128 test -n "$cf_cv_curses_dir" && \
7129 test "$cf_cv_curses_dir" != "no" && { \
7131 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7132 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7134 while test $cf_add_incdir != /usr/include
7136 if test -d $cf_add_incdir
7139 if test -n "$CFLAGS$CPPFLAGS" ; then
7140 # a loop is needed to ensure we can add subdirs of existing dirs
7141 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7142 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7143 cf_have_incdir=yes; break
7148 if test "$cf_have_incdir" = no ; then
7149 if test "$cf_add_incdir" = /usr/local/include ; then
7150 if test "$GCC" = yes
7152 cf_save_CPPFLAGS=$CPPFLAGS
7153 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7154 cat >conftest.$ac_ext <<_ACEOF
7155 #line 7155 "configure"
7156 #include "confdefs.h"
7166 rm -f conftest.$ac_objext
7167 if { (eval echo "$as_me:7167: \"$ac_compile\"") >&5
7168 (eval $ac_compile) 2>&5
7170 echo "$as_me:7170: \$? = $ac_status" >&5
7171 (exit $ac_status); } &&
7172 { ac_try='test -s conftest.$ac_objext'
7173 { (eval echo "$as_me:7173: \"$ac_try\"") >&5
7176 echo "$as_me:7176: \$? = $ac_status" >&5
7177 (exit $ac_status); }; }; then
7180 echo "$as_me: failed program was:" >&5
7181 cat conftest.$ac_ext >&5
7184 rm -f conftest.$ac_objext conftest.$ac_ext
7185 CPPFLAGS=$cf_save_CPPFLAGS
7190 if test "$cf_have_incdir" = no ; then
7191 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7193 echo "${as_me:-configure}:7193: testing adding $cf_add_incdir to include-path ..." 1>&5
7195 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7197 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7198 test "$cf_top_incdir" = "$cf_add_incdir" && break
7199 cf_add_incdir="$cf_top_incdir"
7212 echo "$as_me:7212: checking for $cf_ncuhdr_root header in include-path" >&5
7213 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7214 if test "${cf_cv_ncurses_h+set}" = set; then
7215 echo $ECHO_N "(cached) $ECHO_C" >&6
7218 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7219 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7220 for cf_header in $cf_header_list
7223 cat >conftest.$ac_ext <<_ACEOF
7224 #line 7224 "configure"
7225 #include "confdefs.h"
7227 #include <$cf_header>
7232 #ifdef NCURSES_VERSION
7234 printf("%s\n", NCURSES_VERSION);
7247 rm -f conftest.$ac_objext
7248 if { (eval echo "$as_me:7248: \"$ac_compile\"") >&5
7249 (eval $ac_compile) 2>&5
7251 echo "$as_me:7251: \$? = $ac_status" >&5
7252 (exit $ac_status); } &&
7253 { ac_try='test -s conftest.$ac_objext'
7254 { (eval echo "$as_me:7254: \"$ac_try\"") >&5
7257 echo "$as_me:7257: \$? = $ac_status" >&5
7258 (exit $ac_status); }; }; then
7259 cf_cv_ncurses_h=$cf_header
7262 echo "$as_me: failed program was:" >&5
7263 cat conftest.$ac_ext >&5
7266 rm -f conftest.$ac_objext conftest.$ac_ext
7268 test "$cf_cv_ncurses_h" != no && break
7272 echo "$as_me:7272: result: $cf_cv_ncurses_h" >&5
7273 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7275 if test "$cf_cv_ncurses_h" != no ; then
7276 cf_cv_ncurses_header=$cf_cv_ncurses_h
7279 echo "$as_me:7279: checking for $cf_ncuhdr_root include-path" >&5
7280 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7281 if test "${cf_cv_ncurses_h2+set}" = set; then
7282 echo $ECHO_N "(cached) $ECHO_C" >&6
7285 test -n "$verbose" && echo
7289 # collect the current set of include-directories from compiler flags
7290 cf_header_path_list=""
7291 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7292 for cf_header_path in $CPPFLAGS $CFLAGS
7294 case $cf_header_path in
7296 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7298 test "x$cf_header_path" != "xNONE" && \
7299 test -d "$cf_header_path" && \
7301 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7302 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7303 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7304 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7305 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7306 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"
7309 cf_header_path_list="$cf_header_path_list $cf_search"
7315 # add the variations for the package we are looking for
7319 test "x$prefix" != "xNONE" && \
7320 test -d "$prefix" && \
7322 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7323 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7324 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7325 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7326 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7327 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7330 for cf_subdir_prefix in \
7339 test "x$cf_subdir_prefix" != "x$prefix" && \
7340 test -d "$cf_subdir_prefix" && \
7341 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7342 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7343 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7344 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7345 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7346 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7347 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"
7352 test "$includedir" != NONE && \
7353 test "$includedir" != "/usr/include" && \
7354 test -d "$includedir" && {
7355 test -d $includedir && cf_search="$cf_search $includedir"
7356 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7359 test "$oldincludedir" != NONE && \
7360 test "$oldincludedir" != "/usr/include" && \
7361 test -d "$oldincludedir" && {
7362 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7363 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7366 cf_search="$cf_search $cf_header_path_list"
7368 test -n "$verbose" && echo search path $cf_search
7369 cf_save2_CPPFLAGS="$CPPFLAGS"
7370 for cf_incdir in $cf_search
7373 if test -n "$cf_incdir" ; then
7374 for cf_add_incdir in $cf_incdir
7376 while test $cf_add_incdir != /usr/include
7378 if test -d $cf_add_incdir
7381 if test -n "$CFLAGS$CPPFLAGS" ; then
7382 # a loop is needed to ensure we can add subdirs of existing dirs
7383 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7384 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7385 cf_have_incdir=yes; break
7390 if test "$cf_have_incdir" = no ; then
7391 if test "$cf_add_incdir" = /usr/local/include ; then
7392 if test "$GCC" = yes
7394 cf_save_CPPFLAGS=$CPPFLAGS
7395 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7396 cat >conftest.$ac_ext <<_ACEOF
7397 #line 7397 "configure"
7398 #include "confdefs.h"
7408 rm -f conftest.$ac_objext
7409 if { (eval echo "$as_me:7409: \"$ac_compile\"") >&5
7410 (eval $ac_compile) 2>&5
7412 echo "$as_me:7412: \$? = $ac_status" >&5
7413 (exit $ac_status); } &&
7414 { ac_try='test -s conftest.$ac_objext'
7415 { (eval echo "$as_me:7415: \"$ac_try\"") >&5
7418 echo "$as_me:7418: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7422 echo "$as_me: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7426 rm -f conftest.$ac_objext conftest.$ac_ext
7427 CPPFLAGS=$cf_save_CPPFLAGS
7432 if test "$cf_have_incdir" = no ; then
7433 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7435 echo "${as_me:-configure}:7435: testing adding $cf_add_incdir to include-path ..." 1>&5
7437 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7439 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7440 test "$cf_top_incdir" = "$cf_add_incdir" && break
7441 cf_add_incdir="$cf_top_incdir"
7457 cat >conftest.$ac_ext <<_ACEOF
7458 #line 7458 "configure"
7459 #include "confdefs.h"
7461 #include <$cf_header>
7466 #ifdef NCURSES_VERSION
7468 printf("%s\n", NCURSES_VERSION);
7481 rm -f conftest.$ac_objext
7482 if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483 (eval $ac_compile) 2>&5
7485 echo "$as_me:7485: \$? = $ac_status" >&5
7486 (exit $ac_status); } &&
7487 { ac_try='test -s conftest.$ac_objext'
7488 { (eval echo "$as_me:7488: \"$ac_try\"") >&5
7491 echo "$as_me:7491: \$? = $ac_status" >&5
7492 (exit $ac_status); }; }; then
7493 cf_cv_ncurses_h2=$cf_header
7496 echo "$as_me: failed program was:" >&5
7497 cat conftest.$ac_ext >&5
7500 rm -f conftest.$ac_objext conftest.$ac_ext
7502 if test "$cf_cv_ncurses_h2" != no ; then
7503 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7504 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7507 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7509 CPPFLAGS="$cf_save2_CPPFLAGS"
7510 test "$cf_cv_ncurses_h2" != no && break
7512 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7512: error: not found" >&5
7513 echo "$as_me: error: not found" >&2;}
7514 { (exit 1); exit 1; }; }
7517 echo "$as_me:7517: result: $cf_cv_ncurses_h2" >&5
7518 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7520 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7521 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7522 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7523 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7526 if test -n "$cf_1st_incdir" ; then
7527 for cf_add_incdir in $cf_1st_incdir
7529 while test $cf_add_incdir != /usr/include
7531 if test -d $cf_add_incdir
7534 if test -n "$CFLAGS$CPPFLAGS" ; then
7535 # a loop is needed to ensure we can add subdirs of existing dirs
7536 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7537 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7538 cf_have_incdir=yes; break
7543 if test "$cf_have_incdir" = no ; then
7544 if test "$cf_add_incdir" = /usr/local/include ; then
7545 if test "$GCC" = yes
7547 cf_save_CPPFLAGS=$CPPFLAGS
7548 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7549 cat >conftest.$ac_ext <<_ACEOF
7550 #line 7550 "configure"
7551 #include "confdefs.h"
7561 rm -f conftest.$ac_objext
7562 if { (eval echo "$as_me:7562: \"$ac_compile\"") >&5
7563 (eval $ac_compile) 2>&5
7565 echo "$as_me:7565: \$? = $ac_status" >&5
7566 (exit $ac_status); } &&
7567 { ac_try='test -s conftest.$ac_objext'
7568 { (eval echo "$as_me:7568: \"$ac_try\"") >&5
7571 echo "$as_me:7571: \$? = $ac_status" >&5
7572 (exit $ac_status); }; }; then
7575 echo "$as_me: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7579 rm -f conftest.$ac_objext conftest.$ac_ext
7580 CPPFLAGS=$cf_save_CPPFLAGS
7585 if test "$cf_have_incdir" = no ; then
7586 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7588 echo "${as_me:-configure}:7588: testing adding $cf_add_incdir to include-path ..." 1>&5
7590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7592 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7593 test "$cf_top_incdir" = "$cf_add_incdir" && break
7594 cf_add_incdir="$cf_top_incdir"
7607 # Set definitions to allow ifdef'ing for ncurses.h
7609 case $cf_cv_ncurses_header in
7612 cat >>confdefs.h <<\EOF
7613 #define HAVE_NCURSES_H 1
7619 case $cf_cv_ncurses_header in
7620 (ncurses/curses.h|ncurses/ncurses.h)
7622 cat >>confdefs.h <<\EOF
7623 #define HAVE_NCURSES_NCURSES_H 1
7627 (ncursesw/curses.h|ncursesw/ncurses.h)
7629 cat >>confdefs.h <<\EOF
7630 #define HAVE_NCURSESW_NCURSES_H 1
7636 echo "$as_me:7636: checking for terminfo header" >&5
7637 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7638 if test "${cf_cv_term_header+set}" = set; then
7639 echo $ECHO_N "(cached) $ECHO_C" >&6
7642 case ${cf_cv_ncurses_header} in
7643 (*/ncurses.h|*/ncursesw.h)
7644 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7647 cf_term_header=term.h
7651 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7653 cat >conftest.$ac_ext <<_ACEOF
7654 #line 7654 "configure"
7655 #include "confdefs.h"
7657 #include <${cf_cv_ncurses_header:-curses.h}>
7663 int x = auto_left_margin
7668 rm -f conftest.$ac_objext
7669 if { (eval echo "$as_me:7669: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7672 echo "$as_me:7672: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:7675: \"$ac_try\"") >&5
7678 echo "$as_me:7678: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7681 cf_cv_term_header="$cf_test"
7683 echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7686 cf_cv_term_header=unknown
7689 rm -f conftest.$ac_objext conftest.$ac_ext
7690 test "$cf_cv_term_header" != unknown && break
7694 echo "$as_me:7694: result: $cf_cv_term_header" >&5
7695 echo "${ECHO_T}$cf_cv_term_header" >&6
7697 # Set definitions to allow ifdef'ing to accommodate subdirectories
7699 case $cf_cv_term_header in
7702 cat >>confdefs.h <<\EOF
7703 #define HAVE_TERM_H 1
7709 case $cf_cv_term_header in
7712 cat >>confdefs.h <<\EOF
7713 #define HAVE_NCURSES_TERM_H 1
7719 cat >>confdefs.h <<\EOF
7720 #define HAVE_NCURSESW_TERM_H 1
7726 # some applications need this, but should check for NCURSES_VERSION
7728 cat >>confdefs.h <<\EOF
7732 echo "$as_me:7732: checking for ncurses version" >&5
7733 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7734 if test "${cf_cv_ncurses_version+set}" = set; then
7735 echo $ECHO_N "(cached) $ECHO_C" >&6
7738 cf_cv_ncurses_version=no
7741 if test "$cross_compiling" = yes; then
7743 # This will not work if the preprocessor splits the line after the
7744 # Autoconf token. The 'unproto' program does that.
7745 cat > conftest.$ac_ext <<EOF
7746 #include <${cf_cv_ncurses_header:-curses.h}>
7748 #ifdef NCURSES_VERSION
7749 Autoconf NCURSES_VERSION
7757 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7758 { (eval echo "$as_me:7758: \"$cf_try\"") >&5
7761 echo "$as_me:7761: \$? = $ac_status" >&5
7762 (exit $ac_status); }
7763 if test -f conftest.out ; then
7764 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7765 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7770 cat >conftest.$ac_ext <<_ACEOF
7771 #line 7771 "configure"
7772 #include "confdefs.h"
7774 #include <${cf_cv_ncurses_header:-curses.h}>
7778 FILE *fp = fopen("$cf_tempfile", "w");
7779 #ifdef NCURSES_VERSION
7780 # ifdef NCURSES_VERSION_PATCH
7781 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7783 fprintf(fp, "%s\n", NCURSES_VERSION);
7787 fprintf(fp, "old\n");
7792 ${cf_cv_main_return:-return}(0);
7795 rm -f conftest$ac_exeext
7796 if { (eval echo "$as_me:7796: \"$ac_link\"") >&5
7797 (eval $ac_link) 2>&5
7799 echo "$as_me:7799: \$? = $ac_status" >&5
7800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7801 { (eval echo "$as_me:7801: \"$ac_try\"") >&5
7804 echo "$as_me:7804: \$? = $ac_status" >&5
7805 (exit $ac_status); }; }; then
7807 cf_cv_ncurses_version=`cat $cf_tempfile`
7809 echo "$as_me: program exited with status $ac_status" >&5
7810 echo "$as_me: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7813 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7818 echo "$as_me:7818: result: $cf_cv_ncurses_version" >&5
7819 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7820 test "$cf_cv_ncurses_version" = no ||
7821 cat >>confdefs.h <<\EOF
7825 cf_nculib_root=$cf_cv_screen
7826 # This works, except for the special case where we find gpm, but
7827 # ncurses is in a nonstandard location via $LIBS, and we really want
7830 cf_ncurses_SAVE="$LIBS"
7831 echo "$as_me:7831: checking for Gpm_Open in -lgpm" >&5
7832 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7833 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7836 ac_check_lib_save_LIBS=$LIBS
7838 cat >conftest.$ac_ext <<_ACEOF
7839 #line 7839 "configure"
7840 #include "confdefs.h"
7842 /* Override any gcc2 internal prototype to avoid an error. */
7846 /* We use char because int might match the return type of a gcc2
7847 builtin and then its argument prototype would still apply. */
7857 rm -f conftest.$ac_objext conftest$ac_exeext
7858 if { (eval echo "$as_me:7858: \"$ac_link\"") >&5
7859 (eval $ac_link) 2>&5
7861 echo "$as_me:7861: \$? = $ac_status" >&5
7862 (exit $ac_status); } &&
7863 { ac_try='test -s conftest$ac_exeext'
7864 { (eval echo "$as_me:7864: \"$ac_try\"") >&5
7867 echo "$as_me:7867: \$? = $ac_status" >&5
7868 (exit $ac_status); }; }; then
7869 ac_cv_lib_gpm_Gpm_Open=yes
7871 echo "$as_me: failed program was:" >&5
7872 cat conftest.$ac_ext >&5
7873 ac_cv_lib_gpm_Gpm_Open=no
7875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7876 LIBS=$ac_check_lib_save_LIBS
7878 echo "$as_me:7878: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7879 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7880 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7881 echo "$as_me:7881: checking for initscr in -lgpm" >&5
7882 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7883 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7884 echo $ECHO_N "(cached) $ECHO_C" >&6
7886 ac_check_lib_save_LIBS=$LIBS
7888 cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7892 /* Override any gcc2 internal prototype to avoid an error. */
7896 /* We use char because int might match the return type of a gcc2
7897 builtin and then its argument prototype would still apply. */
7907 rm -f conftest.$ac_objext conftest$ac_exeext
7908 if { (eval echo "$as_me:7908: \"$ac_link\"") >&5
7909 (eval $ac_link) 2>&5
7911 echo "$as_me:7911: \$? = $ac_status" >&5
7912 (exit $ac_status); } &&
7913 { ac_try='test -s conftest$ac_exeext'
7914 { (eval echo "$as_me:7914: \"$ac_try\"") >&5
7917 echo "$as_me:7917: \$? = $ac_status" >&5
7918 (exit $ac_status); }; }; then
7919 ac_cv_lib_gpm_initscr=yes
7921 echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 ac_cv_lib_gpm_initscr=no
7925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7926 LIBS=$ac_check_lib_save_LIBS
7928 echo "$as_me:7928: result: $ac_cv_lib_gpm_initscr" >&5
7929 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7930 if test $ac_cv_lib_gpm_initscr = yes; then
7931 LIBS="$cf_ncurses_SAVE"
7933 cf_ncurses_LIBS="-lgpm"
7940 # This is only necessary if you are linking against an obsolete
7941 # version of ncurses (but it should do no harm, since it's static).
7942 if test "$cf_nculib_root" = ncurses ; then
7943 echo "$as_me:7943: checking for tgoto in -lmytinfo" >&5
7944 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7945 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7946 echo $ECHO_N "(cached) $ECHO_C" >&6
7948 ac_check_lib_save_LIBS=$LIBS
7949 LIBS="-lmytinfo $LIBS"
7950 cat >conftest.$ac_ext <<_ACEOF
7951 #line 7951 "configure"
7952 #include "confdefs.h"
7954 /* Override any gcc2 internal prototype to avoid an error. */
7958 /* We use char because int might match the return type of a gcc2
7959 builtin and then its argument prototype would still apply. */
7969 rm -f conftest.$ac_objext conftest$ac_exeext
7970 if { (eval echo "$as_me:7970: \"$ac_link\"") >&5
7971 (eval $ac_link) 2>&5
7973 echo "$as_me:7973: \$? = $ac_status" >&5
7974 (exit $ac_status); } &&
7975 { ac_try='test -s conftest$ac_exeext'
7976 { (eval echo "$as_me:7976: \"$ac_try\"") >&5
7979 echo "$as_me:7979: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
7981 ac_cv_lib_mytinfo_tgoto=yes
7983 echo "$as_me: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 ac_cv_lib_mytinfo_tgoto=no
7987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7988 LIBS=$ac_check_lib_save_LIBS
7990 echo "$as_me:7990: result: $ac_cv_lib_mytinfo_tgoto" >&5
7991 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7992 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7993 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8000 cf_add_libs="$cf_ncurses_LIBS"
8001 # Filter out duplicates - this happens with badly-designed ".pc" files...
8002 for cf_add_1lib in $LIBS
8004 for cf_add_2lib in $cf_add_libs
8006 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8012 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8016 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8019 cf_add_libs="-l$cf_nculib_root"
8020 # Filter out duplicates - this happens with badly-designed ".pc" files...
8021 for cf_add_1lib in $LIBS
8023 for cf_add_2lib in $cf_add_libs
8025 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8031 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8037 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8039 echo "$as_me:8039: checking for initscr" >&5
8040 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8041 if test "${ac_cv_func_initscr+set}" = set; then
8042 echo $ECHO_N "(cached) $ECHO_C" >&6
8044 cat >conftest.$ac_ext <<_ACEOF
8045 #line 8045 "configure"
8046 #include "confdefs.h"
8047 /* System header to define __stub macros and hopefully few prototypes,
8048 which can conflict with char initscr (); below. */
8050 /* Override any gcc2 internal prototype to avoid an error. */
8054 /* We use char because int might match the return type of a gcc2
8055 builtin and then its argument prototype would still apply. */
8062 /* The GNU C library defines this for functions which it implements
8063 to always fail with ENOSYS. Some functions are actually named
8064 something starting with __ and the normal name is an alias. */
8065 #if defined (__stub_initscr) || defined (__stub___initscr)
8068 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8075 rm -f conftest.$ac_objext conftest$ac_exeext
8076 if { (eval echo "$as_me:8076: \"$ac_link\"") >&5
8077 (eval $ac_link) 2>&5
8079 echo "$as_me:8079: \$? = $ac_status" >&5
8080 (exit $ac_status); } &&
8081 { ac_try='test -s conftest$ac_exeext'
8082 { (eval echo "$as_me:8082: \"$ac_try\"") >&5
8085 echo "$as_me:8085: \$? = $ac_status" >&5
8086 (exit $ac_status); }; }; then
8087 ac_cv_func_initscr=yes
8089 echo "$as_me: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 ac_cv_func_initscr=no
8093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8095 echo "$as_me:8095: result: $ac_cv_func_initscr" >&5
8096 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8097 if test $ac_cv_func_initscr = yes; then
8098 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8101 cf_save_LIBS="$LIBS"
8102 echo "$as_me:8102: checking for initscr in -l$cf_nculib_root" >&5
8103 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8104 LIBS="-l$cf_nculib_root $LIBS"
8105 cat >conftest.$ac_ext <<_ACEOF
8106 #line 8106 "configure"
8107 #include "confdefs.h"
8108 #include <${cf_cv_ncurses_header:-curses.h}>
8117 rm -f conftest.$ac_objext conftest$ac_exeext
8118 if { (eval echo "$as_me:8118: \"$ac_link\"") >&5
8119 (eval $ac_link) 2>&5
8121 echo "$as_me:8121: \$? = $ac_status" >&5
8122 (exit $ac_status); } &&
8123 { ac_try='test -s conftest$ac_exeext'
8124 { (eval echo "$as_me:8124: \"$ac_try\"") >&5
8127 echo "$as_me:8127: \$? = $ac_status" >&5
8128 (exit $ac_status); }; }; then
8129 echo "$as_me:8129: result: yes" >&5
8130 echo "${ECHO_T}yes" >&6
8131 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8134 echo "$as_me: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8136 echo "$as_me:8136: result: no" >&5
8137 echo "${ECHO_T}no" >&6
8140 cf_library_path_list=""
8141 if test -n "${LDFLAGS}${LIBS}" ; then
8142 for cf_library_path in $LDFLAGS $LIBS
8144 case $cf_library_path in
8146 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8148 test "x$cf_library_path" != "xNONE" && \
8149 test -d "$cf_library_path" && \
8151 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8152 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8153 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8154 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8155 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8156 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"
8159 cf_library_path_list="$cf_library_path_list $cf_search"
8167 test "x$prefix" != "xNONE" && \
8168 test -d "$prefix" && \
8170 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8171 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8172 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8173 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8174 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8175 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8178 for cf_subdir_prefix in \
8187 test "x$cf_subdir_prefix" != "x$prefix" && \
8188 test -d "$cf_subdir_prefix" && \
8189 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8190 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8191 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8192 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8193 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8194 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8195 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"
8200 cf_search="$cf_library_path_list $cf_search"
8202 for cf_libdir in $cf_search
8204 echo "$as_me:8204: checking for -l$cf_nculib_root in $cf_libdir" >&5
8205 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8206 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8207 cat >conftest.$ac_ext <<_ACEOF
8208 #line 8208 "configure"
8209 #include "confdefs.h"
8210 #include <${cf_cv_ncurses_header:-curses.h}>
8219 rm -f conftest.$ac_objext conftest$ac_exeext
8220 if { (eval echo "$as_me:8220: \"$ac_link\"") >&5
8221 (eval $ac_link) 2>&5
8223 echo "$as_me:8223: \$? = $ac_status" >&5
8224 (exit $ac_status); } &&
8225 { ac_try='test -s conftest$ac_exeext'
8226 { (eval echo "$as_me:8226: \"$ac_try\"") >&5
8229 echo "$as_me:8229: \$? = $ac_status" >&5
8230 (exit $ac_status); }; }; then
8231 echo "$as_me:8231: result: yes" >&5
8232 echo "${ECHO_T}yes" >&6
8233 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8236 echo "$as_me: failed program was:" >&5
8237 cat conftest.$ac_ext >&5
8238 echo "$as_me:8238: result: no" >&5
8239 echo "${ECHO_T}no" >&6
8240 LIBS="$cf_save_LIBS"
8242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8250 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8252 if test $cf_found_library = no ; then
8253 { { echo "$as_me:8253: error: Cannot link $cf_nculib_root library" >&5
8254 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8255 { (exit 1); exit 1; }; }
8260 if test -n "$cf_ncurses_LIBS" ; then
8261 echo "$as_me:8261: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8262 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8263 cf_ncurses_SAVE="$LIBS"
8264 for p in $cf_ncurses_LIBS ; do
8265 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8266 if test "$q" != "$LIBS" ; then
8270 cat >conftest.$ac_ext <<_ACEOF
8271 #line 8271 "configure"
8272 #include "confdefs.h"
8273 #include <${cf_cv_ncurses_header:-curses.h}>
8277 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8282 rm -f conftest.$ac_objext conftest$ac_exeext
8283 if { (eval echo "$as_me:8283: \"$ac_link\"") >&5
8284 (eval $ac_link) 2>&5
8286 echo "$as_me:8286: \$? = $ac_status" >&5
8287 (exit $ac_status); } &&
8288 { ac_try='test -s conftest$ac_exeext'
8289 { (eval echo "$as_me:8289: \"$ac_try\"") >&5
8292 echo "$as_me:8292: \$? = $ac_status" >&5
8293 (exit $ac_status); }; }; then
8294 echo "$as_me:8294: result: yes" >&5
8295 echo "${ECHO_T}yes" >&6
8297 echo "$as_me: failed program was:" >&5
8298 cat conftest.$ac_ext >&5
8299 echo "$as_me:8299: result: no" >&5
8300 echo "${ECHO_T}no" >&6
8301 LIBS="$cf_ncurses_SAVE"
8303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8306 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8308 cat >>confdefs.h <<EOF
8309 #define $cf_nculib_ROOT 1
8320 cf_ncuconfig_root=$cf_cv_screen
8321 cf_have_ncuconfig=no
8323 if test "x${PKG_CONFIG:=none}" != xnone; then
8324 echo "$as_me:8324: checking pkg-config for $cf_ncuconfig_root" >&5
8325 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8326 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8327 echo "$as_me:8327: result: yes" >&5
8328 echo "${ECHO_T}yes" >&6
8330 echo "$as_me:8330: checking if the $cf_ncuconfig_root package files work" >&5
8331 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8332 cf_have_ncuconfig=unknown
8334 cf_save_CPPFLAGS="$CPPFLAGS"
8335 cf_save_LIBS="$LIBS"
8337 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8339 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8340 # Filter out duplicates - this happens with badly-designed ".pc" files...
8341 for cf_add_1lib in $LIBS
8343 for cf_add_2lib in $cf_add_libs
8345 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8351 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8355 cat >conftest.$ac_ext <<_ACEOF
8356 #line 8356 "configure"
8357 #include "confdefs.h"
8358 #include <${cf_cv_ncurses_header:-curses.h}>
8362 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8367 rm -f conftest.$ac_objext conftest$ac_exeext
8368 if { (eval echo "$as_me:8368: \"$ac_link\"") >&5
8369 (eval $ac_link) 2>&5
8371 echo "$as_me:8371: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest$ac_exeext'
8374 { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8377 echo "$as_me:8377: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 if test "$cross_compiling" = yes; then
8380 cf_have_ncuconfig=maybe
8382 cat >conftest.$ac_ext <<_ACEOF
8383 #line 8383 "configure"
8384 #include "confdefs.h"
8385 #include <${cf_cv_ncurses_header:-curses.h}>
8387 { char *xx = curses_version(); return (xx == 0); }
8389 rm -f conftest$ac_exeext
8390 if { (eval echo "$as_me:8390: \"$ac_link\"") >&5
8391 (eval $ac_link) 2>&5
8393 echo "$as_me:8393: \$? = $ac_status" >&5
8394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8395 { (eval echo "$as_me:8395: \"$ac_try\"") >&5
8398 echo "$as_me:8398: \$? = $ac_status" >&5
8399 (exit $ac_status); }; }; then
8400 cf_have_ncuconfig=yes
8402 echo "$as_me: program exited with status $ac_status" >&5
8403 echo "$as_me: failed program was:" >&5
8404 cat conftest.$ac_ext >&5
8405 cf_have_ncuconfig=no
8407 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8410 echo "$as_me: failed program was:" >&5
8411 cat conftest.$ac_ext >&5
8412 cf_have_ncuconfig=no
8414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8415 echo "$as_me:8415: result: $cf_have_ncuconfig" >&5
8416 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8417 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8418 if test "$cf_have_ncuconfig" != "yes"
8420 CPPFLAGS="$cf_save_CPPFLAGS"
8421 LIBS="$cf_save_LIBS"
8422 NCURSES_CONFIG_PKG=none
8425 cat >>confdefs.h <<\EOF
8429 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8432 echo "$as_me:8432: checking for terminfo header" >&5
8433 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8434 if test "${cf_cv_term_header+set}" = set; then
8435 echo $ECHO_N "(cached) $ECHO_C" >&6
8438 case ${cf_cv_ncurses_header} in
8439 (*/ncurses.h|*/ncursesw.h)
8440 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8443 cf_term_header=term.h
8447 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8449 cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8453 #include <${cf_cv_ncurses_header:-curses.h}>
8459 int x = auto_left_margin
8464 rm -f conftest.$ac_objext
8465 if { (eval echo "$as_me:8465: \"$ac_compile\"") >&5
8466 (eval $ac_compile) 2>&5
8468 echo "$as_me:8468: \$? = $ac_status" >&5
8469 (exit $ac_status); } &&
8470 { ac_try='test -s conftest.$ac_objext'
8471 { (eval echo "$as_me:8471: \"$ac_try\"") >&5
8474 echo "$as_me:8474: \$? = $ac_status" >&5
8475 (exit $ac_status); }; }; then
8477 cf_cv_term_header="$cf_test"
8479 echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8482 cf_cv_term_header=unknown
8485 rm -f conftest.$ac_objext conftest.$ac_ext
8486 test "$cf_cv_term_header" != unknown && break
8490 echo "$as_me:8490: result: $cf_cv_term_header" >&5
8491 echo "${ECHO_T}$cf_cv_term_header" >&6
8493 # Set definitions to allow ifdef'ing to accommodate subdirectories
8495 case $cf_cv_term_header in
8498 cat >>confdefs.h <<\EOF
8499 #define HAVE_TERM_H 1
8505 case $cf_cv_term_header in
8508 cat >>confdefs.h <<\EOF
8509 #define HAVE_NCURSES_TERM_H 1
8515 cat >>confdefs.h <<\EOF
8516 #define HAVE_NCURSESW_TERM_H 1
8523 echo "$as_me:8523: result: no" >&5
8524 echo "${ECHO_T}no" >&6
8525 NCURSES_CONFIG_PKG=none
8528 NCURSES_CONFIG_PKG=none
8531 if test "x$cf_have_ncuconfig" = "xno"; then
8532 echo "Looking for ${cf_ncuconfig_root}-config"
8534 if test -n "$ac_tool_prefix"; then
8535 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8537 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8538 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8539 echo "$as_me:8539: checking for $ac_word" >&5
8540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8541 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8542 echo $ECHO_N "(cached) $ECHO_C" >&6
8544 if test -n "$NCURSES_CONFIG"; then
8545 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8547 ac_save_IFS=$IFS; IFS=$ac_path_separator
8549 for ac_dir in $ac_dummy; do
8551 test -z "$ac_dir" && ac_dir=.
8552 $as_executable_p "$ac_dir/$ac_word" || continue
8553 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8554 echo "$as_me:8554: found $ac_dir/$ac_word" >&5
8560 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8561 if test -n "$NCURSES_CONFIG"; then
8562 echo "$as_me:8562: result: $NCURSES_CONFIG" >&5
8563 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8565 echo "$as_me:8565: result: no" >&5
8566 echo "${ECHO_T}no" >&6
8569 test -n "$NCURSES_CONFIG" && break
8572 if test -z "$NCURSES_CONFIG"; then
8573 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8574 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8576 # Extract the first word of "$ac_prog", so it can be a program name with args.
8577 set dummy $ac_prog; ac_word=$2
8578 echo "$as_me:8578: checking for $ac_word" >&5
8579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8580 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8581 echo $ECHO_N "(cached) $ECHO_C" >&6
8583 if test -n "$ac_ct_NCURSES_CONFIG"; then
8584 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8586 ac_save_IFS=$IFS; IFS=$ac_path_separator
8588 for ac_dir in $ac_dummy; do
8590 test -z "$ac_dir" && ac_dir=.
8591 $as_executable_p "$ac_dir/$ac_word" || continue
8592 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8593 echo "$as_me:8593: found $ac_dir/$ac_word" >&5
8599 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8600 if test -n "$ac_ct_NCURSES_CONFIG"; then
8601 echo "$as_me:8601: result: $ac_ct_NCURSES_CONFIG" >&5
8602 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8604 echo "$as_me:8604: result: no" >&5
8605 echo "${ECHO_T}no" >&6
8608 test -n "$ac_ct_NCURSES_CONFIG" && break
8610 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8612 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8615 if test "$NCURSES_CONFIG" != none ; then
8617 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8619 cf_add_libs="`$NCURSES_CONFIG --libs`"
8620 # Filter out duplicates - this happens with badly-designed ".pc" files...
8621 for cf_add_1lib in $LIBS
8623 for cf_add_2lib in $cf_add_libs
8625 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8631 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8635 # even with config script, some packages use no-override for curses.h
8637 echo "$as_me:8637: checking if we have identified curses headers" >&5
8638 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8639 if test "${cf_cv_ncurses_header+set}" = set; then
8640 echo $ECHO_N "(cached) $ECHO_C" >&6
8643 cf_cv_ncurses_header=none
8645 ncurses.h $cf_cv_screen/ncurses.h \
8646 curses.h $cf_cv_screen/curses.h
8648 cat >conftest.$ac_ext <<_ACEOF
8649 #line 8649 "configure"
8650 #include "confdefs.h"
8651 #include <${cf_header}>
8655 initscr(); tgoto("?", 0,0)
8660 rm -f conftest.$ac_objext
8661 if { (eval echo "$as_me:8661: \"$ac_compile\"") >&5
8662 (eval $ac_compile) 2>&5
8664 echo "$as_me:8664: \$? = $ac_status" >&5
8665 (exit $ac_status); } &&
8666 { ac_try='test -s conftest.$ac_objext'
8667 { (eval echo "$as_me:8667: \"$ac_try\"") >&5
8670 echo "$as_me:8670: \$? = $ac_status" >&5
8671 (exit $ac_status); }; }; then
8672 cf_cv_ncurses_header=$cf_header; break
8674 echo "$as_me: failed program was:" >&5
8675 cat conftest.$ac_ext >&5
8677 rm -f conftest.$ac_objext conftest.$ac_ext
8681 echo "$as_me:8681: result: $cf_cv_ncurses_header" >&5
8682 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8684 if test "$cf_cv_ncurses_header" = none ; then
8685 { { echo "$as_me:8685: error: No curses header-files found" >&5
8686 echo "$as_me: error: No curses header-files found" >&2;}
8687 { (exit 1); exit 1; }; }
8690 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8692 for ac_header in $cf_cv_ncurses_header
8694 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8695 echo "$as_me:8695: checking for $ac_header" >&5
8696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8698 echo $ECHO_N "(cached) $ECHO_C" >&6
8700 cat >conftest.$ac_ext <<_ACEOF
8701 #line 8701 "configure"
8702 #include "confdefs.h"
8703 #include <$ac_header>
8705 if { (eval echo "$as_me:8705: \"$ac_cpp conftest.$ac_ext\"") >&5
8706 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8708 egrep -v '^ *\+' conftest.er1 >conftest.err
8710 cat conftest.err >&5
8711 echo "$as_me:8711: \$? = $ac_status" >&5
8712 (exit $ac_status); } >/dev/null; then
8713 if test -s conftest.err; then
8714 ac_cpp_err=$ac_c_preproc_warn_flag
8721 if test -z "$ac_cpp_err"; then
8722 eval "$as_ac_Header=yes"
8724 echo "$as_me: failed program was:" >&5
8725 cat conftest.$ac_ext >&5
8726 eval "$as_ac_Header=no"
8728 rm -f conftest.err conftest.$ac_ext
8730 echo "$as_me:8730: result: `eval echo '${'$as_ac_Header'}'`" >&5
8731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8733 cat >>confdefs.h <<EOF
8734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8740 cat >>confdefs.h <<\EOF
8744 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8746 cat >>confdefs.h <<EOF
8747 #define $cf_nculib_ROOT 1
8750 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8754 cf_ncuhdr_root=$cf_cv_screen
8756 test -n "$cf_cv_curses_dir" && \
8757 test "$cf_cv_curses_dir" != "no" && { \
8759 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8760 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8762 while test $cf_add_incdir != /usr/include
8764 if test -d $cf_add_incdir
8767 if test -n "$CFLAGS$CPPFLAGS" ; then
8768 # a loop is needed to ensure we can add subdirs of existing dirs
8769 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8770 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8771 cf_have_incdir=yes; break
8776 if test "$cf_have_incdir" = no ; then
8777 if test "$cf_add_incdir" = /usr/local/include ; then
8778 if test "$GCC" = yes
8780 cf_save_CPPFLAGS=$CPPFLAGS
8781 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8782 cat >conftest.$ac_ext <<_ACEOF
8783 #line 8783 "configure"
8784 #include "confdefs.h"
8794 rm -f conftest.$ac_objext
8795 if { (eval echo "$as_me:8795: \"$ac_compile\"") >&5
8796 (eval $ac_compile) 2>&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest.$ac_objext'
8801 { (eval echo "$as_me:8801: \"$ac_try\"") >&5
8804 echo "$as_me:8804: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8808 echo "$as_me: failed program was:" >&5
8809 cat conftest.$ac_ext >&5
8812 rm -f conftest.$ac_objext conftest.$ac_ext
8813 CPPFLAGS=$cf_save_CPPFLAGS
8818 if test "$cf_have_incdir" = no ; then
8819 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8821 echo "${as_me:-configure}:8821: testing adding $cf_add_incdir to include-path ..." 1>&5
8823 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8825 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8826 test "$cf_top_incdir" = "$cf_add_incdir" && break
8827 cf_add_incdir="$cf_top_incdir"
8840 echo "$as_me:8840: checking for $cf_ncuhdr_root header in include-path" >&5
8841 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8842 if test "${cf_cv_ncurses_h+set}" = set; then
8843 echo $ECHO_N "(cached) $ECHO_C" >&6
8846 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8847 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8848 for cf_header in $cf_header_list
8851 cat >conftest.$ac_ext <<_ACEOF
8852 #line 8852 "configure"
8853 #include "confdefs.h"
8855 #include <$cf_header>
8860 #ifdef NCURSES_VERSION
8862 printf("%s\n", NCURSES_VERSION);
8875 rm -f conftest.$ac_objext
8876 if { (eval echo "$as_me:8876: \"$ac_compile\"") >&5
8877 (eval $ac_compile) 2>&5
8879 echo "$as_me:8879: \$? = $ac_status" >&5
8880 (exit $ac_status); } &&
8881 { ac_try='test -s conftest.$ac_objext'
8882 { (eval echo "$as_me:8882: \"$ac_try\"") >&5
8885 echo "$as_me:8885: \$? = $ac_status" >&5
8886 (exit $ac_status); }; }; then
8887 cf_cv_ncurses_h=$cf_header
8890 echo "$as_me: failed program was:" >&5
8891 cat conftest.$ac_ext >&5
8894 rm -f conftest.$ac_objext conftest.$ac_ext
8896 test "$cf_cv_ncurses_h" != no && break
8900 echo "$as_me:8900: result: $cf_cv_ncurses_h" >&5
8901 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8903 if test "$cf_cv_ncurses_h" != no ; then
8904 cf_cv_ncurses_header=$cf_cv_ncurses_h
8907 echo "$as_me:8907: checking for $cf_ncuhdr_root include-path" >&5
8908 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8909 if test "${cf_cv_ncurses_h2+set}" = set; then
8910 echo $ECHO_N "(cached) $ECHO_C" >&6
8913 test -n "$verbose" && echo
8917 # collect the current set of include-directories from compiler flags
8918 cf_header_path_list=""
8919 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8920 for cf_header_path in $CPPFLAGS $CFLAGS
8922 case $cf_header_path in
8924 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8926 test "x$cf_header_path" != "xNONE" && \
8927 test -d "$cf_header_path" && \
8929 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8930 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8931 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8932 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8933 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8934 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"
8937 cf_header_path_list="$cf_header_path_list $cf_search"
8943 # add the variations for the package we are looking for
8947 test "x$prefix" != "xNONE" && \
8948 test -d "$prefix" && \
8950 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8951 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8952 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8953 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8954 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8955 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8958 for cf_subdir_prefix in \
8967 test "x$cf_subdir_prefix" != "x$prefix" && \
8968 test -d "$cf_subdir_prefix" && \
8969 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8970 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8971 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8972 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8973 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8974 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8975 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"
8980 test "$includedir" != NONE && \
8981 test "$includedir" != "/usr/include" && \
8982 test -d "$includedir" && {
8983 test -d $includedir && cf_search="$cf_search $includedir"
8984 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8987 test "$oldincludedir" != NONE && \
8988 test "$oldincludedir" != "/usr/include" && \
8989 test -d "$oldincludedir" && {
8990 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8991 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8994 cf_search="$cf_search $cf_header_path_list"
8996 test -n "$verbose" && echo search path $cf_search
8997 cf_save2_CPPFLAGS="$CPPFLAGS"
8998 for cf_incdir in $cf_search
9001 if test -n "$cf_incdir" ; then
9002 for cf_add_incdir in $cf_incdir
9004 while test $cf_add_incdir != /usr/include
9006 if test -d $cf_add_incdir
9009 if test -n "$CFLAGS$CPPFLAGS" ; then
9010 # a loop is needed to ensure we can add subdirs of existing dirs
9011 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9012 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9013 cf_have_incdir=yes; break
9018 if test "$cf_have_incdir" = no ; then
9019 if test "$cf_add_incdir" = /usr/local/include ; then
9020 if test "$GCC" = yes
9022 cf_save_CPPFLAGS=$CPPFLAGS
9023 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9024 cat >conftest.$ac_ext <<_ACEOF
9025 #line 9025 "configure"
9026 #include "confdefs.h"
9036 rm -f conftest.$ac_objext
9037 if { (eval echo "$as_me:9037: \"$ac_compile\"") >&5
9038 (eval $ac_compile) 2>&5
9040 echo "$as_me:9040: \$? = $ac_status" >&5
9041 (exit $ac_status); } &&
9042 { ac_try='test -s conftest.$ac_objext'
9043 { (eval echo "$as_me:9043: \"$ac_try\"") >&5
9046 echo "$as_me:9046: \$? = $ac_status" >&5
9047 (exit $ac_status); }; }; then
9050 echo "$as_me: failed program was:" >&5
9051 cat conftest.$ac_ext >&5
9054 rm -f conftest.$ac_objext conftest.$ac_ext
9055 CPPFLAGS=$cf_save_CPPFLAGS
9060 if test "$cf_have_incdir" = no ; then
9061 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9063 echo "${as_me:-configure}:9063: testing adding $cf_add_incdir to include-path ..." 1>&5
9065 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9067 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9068 test "$cf_top_incdir" = "$cf_add_incdir" && break
9069 cf_add_incdir="$cf_top_incdir"
9085 cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9089 #include <$cf_header>
9094 #ifdef NCURSES_VERSION
9096 printf("%s\n", NCURSES_VERSION);
9109 rm -f conftest.$ac_objext
9110 if { (eval echo "$as_me:9110: \"$ac_compile\"") >&5
9111 (eval $ac_compile) 2>&5
9113 echo "$as_me:9113: \$? = $ac_status" >&5
9114 (exit $ac_status); } &&
9115 { ac_try='test -s conftest.$ac_objext'
9116 { (eval echo "$as_me:9116: \"$ac_try\"") >&5
9119 echo "$as_me:9119: \$? = $ac_status" >&5
9120 (exit $ac_status); }; }; then
9121 cf_cv_ncurses_h2=$cf_header
9124 echo "$as_me: failed program was:" >&5
9125 cat conftest.$ac_ext >&5
9128 rm -f conftest.$ac_objext conftest.$ac_ext
9130 if test "$cf_cv_ncurses_h2" != no ; then
9131 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9132 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9135 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9137 CPPFLAGS="$cf_save2_CPPFLAGS"
9138 test "$cf_cv_ncurses_h2" != no && break
9140 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9140: error: not found" >&5
9141 echo "$as_me: error: not found" >&2;}
9142 { (exit 1); exit 1; }; }
9145 echo "$as_me:9145: result: $cf_cv_ncurses_h2" >&5
9146 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9148 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9149 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9150 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9151 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9154 if test -n "$cf_1st_incdir" ; then
9155 for cf_add_incdir in $cf_1st_incdir
9157 while test $cf_add_incdir != /usr/include
9159 if test -d $cf_add_incdir
9162 if test -n "$CFLAGS$CPPFLAGS" ; then
9163 # a loop is needed to ensure we can add subdirs of existing dirs
9164 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9165 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9166 cf_have_incdir=yes; break
9171 if test "$cf_have_incdir" = no ; then
9172 if test "$cf_add_incdir" = /usr/local/include ; then
9173 if test "$GCC" = yes
9175 cf_save_CPPFLAGS=$CPPFLAGS
9176 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9177 cat >conftest.$ac_ext <<_ACEOF
9178 #line 9178 "configure"
9179 #include "confdefs.h"
9189 rm -f conftest.$ac_objext
9190 if { (eval echo "$as_me:9190: \"$ac_compile\"") >&5
9191 (eval $ac_compile) 2>&5
9193 echo "$as_me:9193: \$? = $ac_status" >&5
9194 (exit $ac_status); } &&
9195 { ac_try='test -s conftest.$ac_objext'
9196 { (eval echo "$as_me:9196: \"$ac_try\"") >&5
9199 echo "$as_me:9199: \$? = $ac_status" >&5
9200 (exit $ac_status); }; }; then
9203 echo "$as_me: failed program was:" >&5
9204 cat conftest.$ac_ext >&5
9207 rm -f conftest.$ac_objext conftest.$ac_ext
9208 CPPFLAGS=$cf_save_CPPFLAGS
9213 if test "$cf_have_incdir" = no ; then
9214 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9216 echo "${as_me:-configure}:9216: testing adding $cf_add_incdir to include-path ..." 1>&5
9218 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9220 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9221 test "$cf_top_incdir" = "$cf_add_incdir" && break
9222 cf_add_incdir="$cf_top_incdir"
9235 # Set definitions to allow ifdef'ing for ncurses.h
9237 case $cf_cv_ncurses_header in
9240 cat >>confdefs.h <<\EOF
9241 #define HAVE_NCURSES_H 1
9247 case $cf_cv_ncurses_header in
9248 (ncurses/curses.h|ncurses/ncurses.h)
9250 cat >>confdefs.h <<\EOF
9251 #define HAVE_NCURSES_NCURSES_H 1
9255 (ncursesw/curses.h|ncursesw/ncurses.h)
9257 cat >>confdefs.h <<\EOF
9258 #define HAVE_NCURSESW_NCURSES_H 1
9264 echo "$as_me:9264: checking for terminfo header" >&5
9265 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9266 if test "${cf_cv_term_header+set}" = set; then
9267 echo $ECHO_N "(cached) $ECHO_C" >&6
9270 case ${cf_cv_ncurses_header} in
9271 (*/ncurses.h|*/ncursesw.h)
9272 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9275 cf_term_header=term.h
9279 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9281 cat >conftest.$ac_ext <<_ACEOF
9282 #line 9282 "configure"
9283 #include "confdefs.h"
9285 #include <${cf_cv_ncurses_header:-curses.h}>
9291 int x = auto_left_margin
9296 rm -f conftest.$ac_objext
9297 if { (eval echo "$as_me:9297: \"$ac_compile\"") >&5
9298 (eval $ac_compile) 2>&5
9300 echo "$as_me:9300: \$? = $ac_status" >&5
9301 (exit $ac_status); } &&
9302 { ac_try='test -s conftest.$ac_objext'
9303 { (eval echo "$as_me:9303: \"$ac_try\"") >&5
9306 echo "$as_me:9306: \$? = $ac_status" >&5
9307 (exit $ac_status); }; }; then
9309 cf_cv_term_header="$cf_test"
9311 echo "$as_me: failed program was:" >&5
9312 cat conftest.$ac_ext >&5
9314 cf_cv_term_header=unknown
9317 rm -f conftest.$ac_objext conftest.$ac_ext
9318 test "$cf_cv_term_header" != unknown && break
9322 echo "$as_me:9322: result: $cf_cv_term_header" >&5
9323 echo "${ECHO_T}$cf_cv_term_header" >&6
9325 # Set definitions to allow ifdef'ing to accommodate subdirectories
9327 case $cf_cv_term_header in
9330 cat >>confdefs.h <<\EOF
9331 #define HAVE_TERM_H 1
9337 case $cf_cv_term_header in
9340 cat >>confdefs.h <<\EOF
9341 #define HAVE_NCURSES_TERM_H 1
9347 cat >>confdefs.h <<\EOF
9348 #define HAVE_NCURSESW_TERM_H 1
9354 # some applications need this, but should check for NCURSES_VERSION
9356 cat >>confdefs.h <<\EOF
9360 echo "$as_me:9360: checking for ncurses version" >&5
9361 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9362 if test "${cf_cv_ncurses_version+set}" = set; then
9363 echo $ECHO_N "(cached) $ECHO_C" >&6
9366 cf_cv_ncurses_version=no
9369 if test "$cross_compiling" = yes; then
9371 # This will not work if the preprocessor splits the line after the
9372 # Autoconf token. The 'unproto' program does that.
9373 cat > conftest.$ac_ext <<EOF
9374 #include <${cf_cv_ncurses_header:-curses.h}>
9376 #ifdef NCURSES_VERSION
9377 Autoconf NCURSES_VERSION
9385 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9386 { (eval echo "$as_me:9386: \"$cf_try\"") >&5
9389 echo "$as_me:9389: \$? = $ac_status" >&5
9390 (exit $ac_status); }
9391 if test -f conftest.out ; then
9392 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9393 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9398 cat >conftest.$ac_ext <<_ACEOF
9399 #line 9399 "configure"
9400 #include "confdefs.h"
9402 #include <${cf_cv_ncurses_header:-curses.h}>
9406 FILE *fp = fopen("$cf_tempfile", "w");
9407 #ifdef NCURSES_VERSION
9408 # ifdef NCURSES_VERSION_PATCH
9409 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9411 fprintf(fp, "%s\n", NCURSES_VERSION);
9415 fprintf(fp, "old\n");
9420 ${cf_cv_main_return:-return}(0);
9423 rm -f conftest$ac_exeext
9424 if { (eval echo "$as_me:9424: \"$ac_link\"") >&5
9425 (eval $ac_link) 2>&5
9427 echo "$as_me:9427: \$? = $ac_status" >&5
9428 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9429 { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9432 echo "$as_me:9432: \$? = $ac_status" >&5
9433 (exit $ac_status); }; }; then
9435 cf_cv_ncurses_version=`cat $cf_tempfile`
9437 echo "$as_me: program exited with status $ac_status" >&5
9438 echo "$as_me: failed program was:" >&5
9439 cat conftest.$ac_ext >&5
9441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9446 echo "$as_me:9446: result: $cf_cv_ncurses_version" >&5
9447 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9448 test "$cf_cv_ncurses_version" = no ||
9449 cat >>confdefs.h <<\EOF
9453 cf_nculib_root=$cf_cv_screen
9454 # This works, except for the special case where we find gpm, but
9455 # ncurses is in a nonstandard location via $LIBS, and we really want
9458 cf_ncurses_SAVE="$LIBS"
9459 echo "$as_me:9459: checking for Gpm_Open in -lgpm" >&5
9460 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9461 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9462 echo $ECHO_N "(cached) $ECHO_C" >&6
9464 ac_check_lib_save_LIBS=$LIBS
9466 cat >conftest.$ac_ext <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9470 /* Override any gcc2 internal prototype to avoid an error. */
9474 /* We use char because int might match the return type of a gcc2
9475 builtin and then its argument prototype would still apply. */
9485 rm -f conftest.$ac_objext conftest$ac_exeext
9486 if { (eval echo "$as_me:9486: \"$ac_link\"") >&5
9487 (eval $ac_link) 2>&5
9489 echo "$as_me:9489: \$? = $ac_status" >&5
9490 (exit $ac_status); } &&
9491 { ac_try='test -s conftest$ac_exeext'
9492 { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9495 echo "$as_me:9495: \$? = $ac_status" >&5
9496 (exit $ac_status); }; }; then
9497 ac_cv_lib_gpm_Gpm_Open=yes
9499 echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501 ac_cv_lib_gpm_Gpm_Open=no
9503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9504 LIBS=$ac_check_lib_save_LIBS
9506 echo "$as_me:9506: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9507 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9508 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9509 echo "$as_me:9509: checking for initscr in -lgpm" >&5
9510 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9511 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9512 echo $ECHO_N "(cached) $ECHO_C" >&6
9514 ac_check_lib_save_LIBS=$LIBS
9516 cat >conftest.$ac_ext <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9520 /* Override any gcc2 internal prototype to avoid an error. */
9524 /* We use char because int might match the return type of a gcc2
9525 builtin and then its argument prototype would still apply. */
9535 rm -f conftest.$ac_objext conftest$ac_exeext
9536 if { (eval echo "$as_me:9536: \"$ac_link\"") >&5
9537 (eval $ac_link) 2>&5
9539 echo "$as_me:9539: \$? = $ac_status" >&5
9540 (exit $ac_status); } &&
9541 { ac_try='test -s conftest$ac_exeext'
9542 { (eval echo "$as_me:9542: \"$ac_try\"") >&5
9545 echo "$as_me:9545: \$? = $ac_status" >&5
9546 (exit $ac_status); }; }; then
9547 ac_cv_lib_gpm_initscr=yes
9549 echo "$as_me: failed program was:" >&5
9550 cat conftest.$ac_ext >&5
9551 ac_cv_lib_gpm_initscr=no
9553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9554 LIBS=$ac_check_lib_save_LIBS
9556 echo "$as_me:9556: result: $ac_cv_lib_gpm_initscr" >&5
9557 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9558 if test $ac_cv_lib_gpm_initscr = yes; then
9559 LIBS="$cf_ncurses_SAVE"
9561 cf_ncurses_LIBS="-lgpm"
9568 # This is only necessary if you are linking against an obsolete
9569 # version of ncurses (but it should do no harm, since it's static).
9570 if test "$cf_nculib_root" = ncurses ; then
9571 echo "$as_me:9571: checking for tgoto in -lmytinfo" >&5
9572 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9573 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9574 echo $ECHO_N "(cached) $ECHO_C" >&6
9576 ac_check_lib_save_LIBS=$LIBS
9577 LIBS="-lmytinfo $LIBS"
9578 cat >conftest.$ac_ext <<_ACEOF
9579 #line 9579 "configure"
9580 #include "confdefs.h"
9582 /* Override any gcc2 internal prototype to avoid an error. */
9586 /* We use char because int might match the return type of a gcc2
9587 builtin and then its argument prototype would still apply. */
9597 rm -f conftest.$ac_objext conftest$ac_exeext
9598 if { (eval echo "$as_me:9598: \"$ac_link\"") >&5
9599 (eval $ac_link) 2>&5
9601 echo "$as_me:9601: \$? = $ac_status" >&5
9602 (exit $ac_status); } &&
9603 { ac_try='test -s conftest$ac_exeext'
9604 { (eval echo "$as_me:9604: \"$ac_try\"") >&5
9607 echo "$as_me:9607: \$? = $ac_status" >&5
9608 (exit $ac_status); }; }; then
9609 ac_cv_lib_mytinfo_tgoto=yes
9611 echo "$as_me: failed program was:" >&5
9612 cat conftest.$ac_ext >&5
9613 ac_cv_lib_mytinfo_tgoto=no
9615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9616 LIBS=$ac_check_lib_save_LIBS
9618 echo "$as_me:9618: result: $ac_cv_lib_mytinfo_tgoto" >&5
9619 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9620 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9621 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9628 cf_add_libs="$cf_ncurses_LIBS"
9629 # Filter out duplicates - this happens with badly-designed ".pc" files...
9630 for cf_add_1lib in $LIBS
9632 for cf_add_2lib in $cf_add_libs
9634 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9640 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9644 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9647 cf_add_libs="-l$cf_nculib_root"
9648 # Filter out duplicates - this happens with badly-designed ".pc" files...
9649 for cf_add_1lib in $LIBS
9651 for cf_add_2lib in $cf_add_libs
9653 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9659 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9665 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9667 echo "$as_me:9667: checking for initscr" >&5
9668 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9669 if test "${ac_cv_func_initscr+set}" = set; then
9670 echo $ECHO_N "(cached) $ECHO_C" >&6
9672 cat >conftest.$ac_ext <<_ACEOF
9673 #line 9673 "configure"
9674 #include "confdefs.h"
9675 /* System header to define __stub macros and hopefully few prototypes,
9676 which can conflict with char initscr (); below. */
9678 /* Override any gcc2 internal prototype to avoid an error. */
9682 /* We use char because int might match the return type of a gcc2
9683 builtin and then its argument prototype would still apply. */
9690 /* The GNU C library defines this for functions which it implements
9691 to always fail with ENOSYS. Some functions are actually named
9692 something starting with __ and the normal name is an alias. */
9693 #if defined (__stub_initscr) || defined (__stub___initscr)
9696 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9703 rm -f conftest.$ac_objext conftest$ac_exeext
9704 if { (eval echo "$as_me:9704: \"$ac_link\"") >&5
9705 (eval $ac_link) 2>&5
9707 echo "$as_me:9707: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
9709 { ac_try='test -s conftest$ac_exeext'
9710 { (eval echo "$as_me:9710: \"$ac_try\"") >&5
9713 echo "$as_me:9713: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_cv_func_initscr=yes
9717 echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719 ac_cv_func_initscr=no
9721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9723 echo "$as_me:9723: result: $ac_cv_func_initscr" >&5
9724 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9725 if test $ac_cv_func_initscr = yes; then
9726 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9729 cf_save_LIBS="$LIBS"
9730 echo "$as_me:9730: checking for initscr in -l$cf_nculib_root" >&5
9731 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9732 LIBS="-l$cf_nculib_root $LIBS"
9733 cat >conftest.$ac_ext <<_ACEOF
9734 #line 9734 "configure"
9735 #include "confdefs.h"
9736 #include <${cf_cv_ncurses_header:-curses.h}>
9745 rm -f conftest.$ac_objext conftest$ac_exeext
9746 if { (eval echo "$as_me:9746: \"$ac_link\"") >&5
9747 (eval $ac_link) 2>&5
9749 echo "$as_me:9749: \$? = $ac_status" >&5
9750 (exit $ac_status); } &&
9751 { ac_try='test -s conftest$ac_exeext'
9752 { (eval echo "$as_me:9752: \"$ac_try\"") >&5
9755 echo "$as_me:9755: \$? = $ac_status" >&5
9756 (exit $ac_status); }; }; then
9757 echo "$as_me:9757: result: yes" >&5
9758 echo "${ECHO_T}yes" >&6
9759 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9762 echo "$as_me: failed program was:" >&5
9763 cat conftest.$ac_ext >&5
9764 echo "$as_me:9764: result: no" >&5
9765 echo "${ECHO_T}no" >&6
9768 cf_library_path_list=""
9769 if test -n "${LDFLAGS}${LIBS}" ; then
9770 for cf_library_path in $LDFLAGS $LIBS
9772 case $cf_library_path in
9774 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9776 test "x$cf_library_path" != "xNONE" && \
9777 test -d "$cf_library_path" && \
9779 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9780 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9781 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9782 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9783 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9784 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"
9787 cf_library_path_list="$cf_library_path_list $cf_search"
9795 test "x$prefix" != "xNONE" && \
9796 test -d "$prefix" && \
9798 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9799 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9800 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9801 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9802 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9803 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9806 for cf_subdir_prefix in \
9815 test "x$cf_subdir_prefix" != "x$prefix" && \
9816 test -d "$cf_subdir_prefix" && \
9817 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9818 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9819 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9820 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9821 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9822 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9823 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"
9828 cf_search="$cf_library_path_list $cf_search"
9830 for cf_libdir in $cf_search
9832 echo "$as_me:9832: checking for -l$cf_nculib_root in $cf_libdir" >&5
9833 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9834 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9835 cat >conftest.$ac_ext <<_ACEOF
9836 #line 9836 "configure"
9837 #include "confdefs.h"
9838 #include <${cf_cv_ncurses_header:-curses.h}>
9847 rm -f conftest.$ac_objext conftest$ac_exeext
9848 if { (eval echo "$as_me:9848: \"$ac_link\"") >&5
9849 (eval $ac_link) 2>&5
9851 echo "$as_me:9851: \$? = $ac_status" >&5
9852 (exit $ac_status); } &&
9853 { ac_try='test -s conftest$ac_exeext'
9854 { (eval echo "$as_me:9854: \"$ac_try\"") >&5
9857 echo "$as_me:9857: \$? = $ac_status" >&5
9858 (exit $ac_status); }; }; then
9859 echo "$as_me:9859: result: yes" >&5
9860 echo "${ECHO_T}yes" >&6
9861 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9864 echo "$as_me: failed program was:" >&5
9865 cat conftest.$ac_ext >&5
9866 echo "$as_me:9866: result: no" >&5
9867 echo "${ECHO_T}no" >&6
9868 LIBS="$cf_save_LIBS"
9870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9878 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9880 if test $cf_found_library = no ; then
9881 { { echo "$as_me:9881: error: Cannot link $cf_nculib_root library" >&5
9882 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9883 { (exit 1); exit 1; }; }
9888 if test -n "$cf_ncurses_LIBS" ; then
9889 echo "$as_me:9889: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9890 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9891 cf_ncurses_SAVE="$LIBS"
9892 for p in $cf_ncurses_LIBS ; do
9893 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9894 if test "$q" != "$LIBS" ; then
9898 cat >conftest.$ac_ext <<_ACEOF
9899 #line 9899 "configure"
9900 #include "confdefs.h"
9901 #include <${cf_cv_ncurses_header:-curses.h}>
9905 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9910 rm -f conftest.$ac_objext conftest$ac_exeext
9911 if { (eval echo "$as_me:9911: \"$ac_link\"") >&5
9912 (eval $ac_link) 2>&5
9914 echo "$as_me:9914: \$? = $ac_status" >&5
9915 (exit $ac_status); } &&
9916 { ac_try='test -s conftest$ac_exeext'
9917 { (eval echo "$as_me:9917: \"$ac_try\"") >&5
9920 echo "$as_me:9920: \$? = $ac_status" >&5
9921 (exit $ac_status); }; }; then
9922 echo "$as_me:9922: result: yes" >&5
9923 echo "${ECHO_T}yes" >&6
9925 echo "$as_me: failed program was:" >&5
9926 cat conftest.$ac_ext >&5
9927 echo "$as_me:9927: result: no" >&5
9928 echo "${ECHO_T}no" >&6
9929 LIBS="$cf_ncurses_SAVE"
9931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9934 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9936 cat >>confdefs.h <<EOF
9937 #define $cf_nculib_ROOT 1
9947 echo "$as_me:9947: checking for X" >&5
9948 echo $ECHO_N "checking for X... $ECHO_C" >&6
9950 # Check whether --with-x or --without-x was given.
9951 if test "${with_x+set}" = set; then
9955 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9956 if test "x$with_x" = xno; then
9957 # The user explicitly disabled X.
9960 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9961 # Both variables are already set.
9964 if test "${ac_cv_have_x+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
9967 # One or both of the vars are not set, and there is no cached value.
9968 ac_x_includes=no ac_x_libraries=no
9970 if mkdir conftest.dir; then
9972 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9973 cat >Imakefile <<'EOF'
9975 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9977 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9978 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9979 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9980 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9981 for ac_extension in a so sl dylib dll; do
9982 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9983 test -f $ac_im_libdir/libX11.$ac_extension; then
9984 ac_im_usrlibdir=$ac_im_libdir; break
9987 # Screen out bogus values from the imake configuration. They are
9988 # bogus both because they are the default anyway, and because
9989 # using them would break gcc on systems where it needs fixed includes.
9990 case $ac_im_incroot in
9992 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9994 case $ac_im_usrlibdir in
9996 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10000 rm -fr conftest.dir
10003 # Standard set of common directories for X headers.
10004 # Check X11 before X11Rn because it is often a symlink to the current release.
10016 /usr/local/X11/include
10017 /usr/local/X11R6/include
10018 /usr/local/X11R5/include
10019 /usr/local/X11R4/include
10021 /usr/local/include/X11
10022 /usr/local/include/X11R6
10023 /usr/local/include/X11R5
10024 /usr/local/include/X11R4
10028 /usr/XFree86/include/X11
10032 /usr/unsupported/include
10033 /usr/athena/include
10034 /usr/local/x11r5/include
10035 /usr/lpp/Xamples/include
10037 /usr/openwin/include
10038 /usr/openwin/share/include'
10040 if test "$ac_x_includes" = no; then
10041 # Guess where to find include files, by looking for Intrinsic.h.
10042 # First, try using that file with no special directory specified.
10043 cat >conftest.$ac_ext <<_ACEOF
10044 #line 10044 "configure"
10045 #include "confdefs.h"
10046 #include <X11/Intrinsic.h>
10048 if { (eval echo "$as_me:10048: \"$ac_cpp conftest.$ac_ext\"") >&5
10049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10051 egrep -v '^ *\+' conftest.er1 >conftest.err
10053 cat conftest.err >&5
10054 echo "$as_me:10054: \$? = $ac_status" >&5
10055 (exit $ac_status); } >/dev/null; then
10056 if test -s conftest.err; then
10057 ac_cpp_err=$ac_c_preproc_warn_flag
10064 if test -z "$ac_cpp_err"; then
10065 # We can compile using X headers with no special include directory.
10068 echo "$as_me: failed program was:" >&5
10069 cat conftest.$ac_ext >&5
10070 for ac_dir in $ac_x_header_dirs; do
10071 if test -r "$ac_dir/X11/Intrinsic.h"; then
10072 ac_x_includes=$ac_dir
10077 rm -f conftest.err conftest.$ac_ext
10078 fi # $ac_x_includes = no
10080 if test "$ac_x_libraries" = no; then
10081 # Check for the libraries.
10082 # See if we find them without any special options.
10083 # Don't add to $LIBS permanently.
10086 cat >conftest.$ac_ext <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10089 #include <X11/Intrinsic.h>
10098 rm -f conftest.$ac_objext conftest$ac_exeext
10099 if { (eval echo "$as_me:10099: \"$ac_link\"") >&5
10100 (eval $ac_link) 2>&5
10102 echo "$as_me:10102: \$? = $ac_status" >&5
10103 (exit $ac_status); } &&
10104 { ac_try='test -s conftest$ac_exeext'
10105 { (eval echo "$as_me:10105: \"$ac_try\"") >&5
10106 (eval $ac_try) 2>&5
10108 echo "$as_me:10108: \$? = $ac_status" >&5
10109 (exit $ac_status); }; }; then
10111 # We can link X programs with no special library path.
10114 echo "$as_me: failed program was:" >&5
10115 cat conftest.$ac_ext >&5
10117 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10119 # Don't even attempt the hair of trying to link an X program!
10120 for ac_extension in a so sl dylib dll; do
10121 if test -r $ac_dir/libXt.$ac_extension; then
10122 ac_x_libraries=$ac_dir
10128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10129 fi # $ac_x_libraries = no
10131 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10132 # Didn't find X anywhere. Cache the known absence of X.
10133 ac_cv_have_x="have_x=no"
10135 # Record where we found X for the cache.
10136 ac_cv_have_x="have_x=yes \
10137 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10142 eval "$ac_cv_have_x"
10145 if test "$have_x" != yes; then
10146 echo "$as_me:10146: result: $have_x" >&5
10147 echo "${ECHO_T}$have_x" >&6
10150 # If each of the values was on the command line, it overrides each guess.
10151 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10152 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10153 # Update the cache value to reflect the command line values.
10154 ac_cv_have_x="have_x=yes \
10155 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10156 echo "$as_me:10156: result: libraries $x_libraries, headers $x_includes" >&5
10157 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10160 if test "$no_x" = yes; then
10161 # Not all programs may use this symbol, but it does not hurt to define it.
10163 cat >>confdefs.h <<\EOF
10164 #define X_DISPLAY_MISSING 1
10167 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10169 if test -n "$x_includes"; then
10170 X_CFLAGS="$X_CFLAGS -I$x_includes"
10173 # It would also be nice to do this for all -L options, not just this one.
10174 if test -n "$x_libraries"; then
10175 X_LIBS="$X_LIBS -L$x_libraries"
10176 # For Solaris; some versions of Sun CC require a space after -R and
10177 # others require no space. Words are not sufficient . . . .
10178 case `(uname -sr) 2>/dev/null` in
10180 echo "$as_me:10180: checking whether -R must be followed by a space" >&5
10181 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10182 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10183 cat >conftest.$ac_ext <<_ACEOF
10184 #line 10184 "configure"
10185 #include "confdefs.h"
10195 rm -f conftest.$ac_objext conftest$ac_exeext
10196 if { (eval echo "$as_me:10196: \"$ac_link\"") >&5
10197 (eval $ac_link) 2>&5
10199 echo "$as_me:10199: \$? = $ac_status" >&5
10200 (exit $ac_status); } &&
10201 { ac_try='test -s conftest$ac_exeext'
10202 { (eval echo "$as_me:10202: \"$ac_try\"") >&5
10203 (eval $ac_try) 2>&5
10205 echo "$as_me:10205: \$? = $ac_status" >&5
10206 (exit $ac_status); }; }; then
10209 echo "$as_me: failed program was:" >&5
10210 cat conftest.$ac_ext >&5
10213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10214 if test $ac_R_nospace = yes; then
10215 echo "$as_me:10215: result: no" >&5
10216 echo "${ECHO_T}no" >&6
10217 X_LIBS="$X_LIBS -R$x_libraries"
10219 LIBS="$ac_xsave_LIBS -R $x_libraries"
10220 cat >conftest.$ac_ext <<_ACEOF
10221 #line 10221 "configure"
10222 #include "confdefs.h"
10232 rm -f conftest.$ac_objext conftest$ac_exeext
10233 if { (eval echo "$as_me:10233: \"$ac_link\"") >&5
10234 (eval $ac_link) 2>&5
10236 echo "$as_me:10236: \$? = $ac_status" >&5
10237 (exit $ac_status); } &&
10238 { ac_try='test -s conftest$ac_exeext'
10239 { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240 (eval $ac_try) 2>&5
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit $ac_status); }; }; then
10246 echo "$as_me: failed program was:" >&5
10247 cat conftest.$ac_ext >&5
10250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10251 if test $ac_R_space = yes; then
10252 echo "$as_me:10252: result: yes" >&5
10253 echo "${ECHO_T}yes" >&6
10254 X_LIBS="$X_LIBS -R $x_libraries"
10256 echo "$as_me:10256: result: neither works" >&5
10257 echo "${ECHO_T}neither works" >&6
10260 LIBS=$ac_xsave_LIBS
10264 # Check for system-dependent libraries X programs must link with.
10265 # Do this before checking for the system-independent R6 libraries
10266 # (-lICE), since we may need -lsocket or whatever for X linking.
10268 if test "$ISC" = yes; then
10269 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10271 # Martyn Johnson says this is needed for Ultrix, if the X
10272 # libraries were built with DECnet support. And Karl Berry says
10273 # the Alpha needs dnet_stub (dnet does not exist).
10274 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10279 /* Override any gcc2 internal prototype to avoid an error. */
10283 /* We use char because int might match the return type of a gcc2
10284 builtin and then its argument prototype would still apply. */
10285 char XOpenDisplay ();
10294 rm -f conftest.$ac_objext conftest$ac_exeext
10295 if { (eval echo "$as_me:10295: \"$ac_link\"") >&5
10296 (eval $ac_link) 2>&5
10298 echo "$as_me:10298: \$? = $ac_status" >&5
10299 (exit $ac_status); } &&
10300 { ac_try='test -s conftest$ac_exeext'
10301 { (eval echo "$as_me:10301: \"$ac_try\"") >&5
10302 (eval $ac_try) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit $ac_status); }; }; then
10308 echo "$as_me: failed program was:" >&5
10309 cat conftest.$ac_ext >&5
10310 echo "$as_me:10310: checking for dnet_ntoa in -ldnet" >&5
10311 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10312 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10313 echo $ECHO_N "(cached) $ECHO_C" >&6
10315 ac_check_lib_save_LIBS=$LIBS
10316 LIBS="-ldnet $LIBS"
10317 cat >conftest.$ac_ext <<_ACEOF
10318 #line 10318 "configure"
10319 #include "confdefs.h"
10321 /* Override any gcc2 internal prototype to avoid an error. */
10325 /* We use char because int might match the return type of a gcc2
10326 builtin and then its argument prototype would still apply. */
10336 rm -f conftest.$ac_objext conftest$ac_exeext
10337 if { (eval echo "$as_me:10337: \"$ac_link\"") >&5
10338 (eval $ac_link) 2>&5
10340 echo "$as_me:10340: \$? = $ac_status" >&5
10341 (exit $ac_status); } &&
10342 { ac_try='test -s conftest$ac_exeext'
10343 { (eval echo "$as_me:10343: \"$ac_try\"") >&5
10344 (eval $ac_try) 2>&5
10346 echo "$as_me:10346: \$? = $ac_status" >&5
10347 (exit $ac_status); }; }; then
10348 ac_cv_lib_dnet_dnet_ntoa=yes
10350 echo "$as_me: failed program was:" >&5
10351 cat conftest.$ac_ext >&5
10352 ac_cv_lib_dnet_dnet_ntoa=no
10354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10355 LIBS=$ac_check_lib_save_LIBS
10357 echo "$as_me:10357: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10358 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10359 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10360 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10363 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10364 echo "$as_me:10364: checking for dnet_ntoa in -ldnet_stub" >&5
10365 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10366 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10367 echo $ECHO_N "(cached) $ECHO_C" >&6
10369 ac_check_lib_save_LIBS=$LIBS
10370 LIBS="-ldnet_stub $LIBS"
10371 cat >conftest.$ac_ext <<_ACEOF
10372 #line 10372 "configure"
10373 #include "confdefs.h"
10375 /* Override any gcc2 internal prototype to avoid an error. */
10379 /* We use char because int might match the return type of a gcc2
10380 builtin and then its argument prototype would still apply. */
10390 rm -f conftest.$ac_objext conftest$ac_exeext
10391 if { (eval echo "$as_me:10391: \"$ac_link\"") >&5
10392 (eval $ac_link) 2>&5
10394 echo "$as_me:10394: \$? = $ac_status" >&5
10395 (exit $ac_status); } &&
10396 { ac_try='test -s conftest$ac_exeext'
10397 { (eval echo "$as_me:10397: \"$ac_try\"") >&5
10398 (eval $ac_try) 2>&5
10400 echo "$as_me:10400: \$? = $ac_status" >&5
10401 (exit $ac_status); }; }; then
10402 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10404 echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406 ac_cv_lib_dnet_stub_dnet_ntoa=no
10408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10409 LIBS=$ac_check_lib_save_LIBS
10411 echo "$as_me:10411: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10412 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10413 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10414 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10420 LIBS="$ac_xsave_LIBS"
10422 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10423 # to get the SysV transport functions.
10424 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10426 # The nsl library prevents programs from opening the X display
10427 # on Irix 5.2, according to T.E. Dickey.
10428 # The functions gethostbyname, getservbyname, and inet_addr are
10429 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10430 echo "$as_me:10430: checking for gethostbyname" >&5
10431 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10432 if test "${ac_cv_func_gethostbyname+set}" = set; then
10433 echo $ECHO_N "(cached) $ECHO_C" >&6
10435 cat >conftest.$ac_ext <<_ACEOF
10436 #line 10436 "configure"
10437 #include "confdefs.h"
10438 /* System header to define __stub macros and hopefully few prototypes,
10439 which can conflict with char gethostbyname (); below. */
10440 #include <assert.h>
10441 /* Override any gcc2 internal prototype to avoid an error. */
10445 /* We use char because int might match the return type of a gcc2
10446 builtin and then its argument prototype would still apply. */
10447 char gethostbyname ();
10453 /* The GNU C library defines this for functions which it implements
10454 to always fail with ENOSYS. Some functions are actually named
10455 something starting with __ and the normal name is an alias. */
10456 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10459 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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
10478 ac_cv_func_gethostbyname=yes
10480 echo "$as_me: failed program was:" >&5
10481 cat conftest.$ac_ext >&5
10482 ac_cv_func_gethostbyname=no
10484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10486 echo "$as_me:10486: result: $ac_cv_func_gethostbyname" >&5
10487 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10489 if test $ac_cv_func_gethostbyname = no; then
10490 echo "$as_me:10490: checking for gethostbyname in -lnsl" >&5
10491 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10492 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10493 echo $ECHO_N "(cached) $ECHO_C" >&6
10495 ac_check_lib_save_LIBS=$LIBS
10497 cat >conftest.$ac_ext <<_ACEOF
10498 #line 10498 "configure"
10499 #include "confdefs.h"
10501 /* Override any gcc2 internal prototype to avoid an error. */
10505 /* We use char because int might match the return type of a gcc2
10506 builtin and then its argument prototype would still apply. */
10507 char gethostbyname ();
10516 rm -f conftest.$ac_objext conftest$ac_exeext
10517 if { (eval echo "$as_me:10517: \"$ac_link\"") >&5
10518 (eval $ac_link) 2>&5
10520 echo "$as_me:10520: \$? = $ac_status" >&5
10521 (exit $ac_status); } &&
10522 { ac_try='test -s conftest$ac_exeext'
10523 { (eval echo "$as_me:10523: \"$ac_try\"") >&5
10524 (eval $ac_try) 2>&5
10526 echo "$as_me:10526: \$? = $ac_status" >&5
10527 (exit $ac_status); }; }; then
10528 ac_cv_lib_nsl_gethostbyname=yes
10530 echo "$as_me: failed program was:" >&5
10531 cat conftest.$ac_ext >&5
10532 ac_cv_lib_nsl_gethostbyname=no
10534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10535 LIBS=$ac_check_lib_save_LIBS
10537 echo "$as_me:10537: result: $ac_cv_lib_nsl_gethostbyname" >&5
10538 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10539 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10540 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10543 if test $ac_cv_lib_nsl_gethostbyname = no; then
10544 echo "$as_me:10544: checking for gethostbyname in -lbsd" >&5
10545 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10546 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10549 ac_check_lib_save_LIBS=$LIBS
10551 cat >conftest.$ac_ext <<_ACEOF
10552 #line 10552 "configure"
10553 #include "confdefs.h"
10555 /* Override any gcc2 internal prototype to avoid an error. */
10559 /* We use char because int might match the return type of a gcc2
10560 builtin and then its argument prototype would still apply. */
10561 char gethostbyname ();
10570 rm -f conftest.$ac_objext conftest$ac_exeext
10571 if { (eval echo "$as_me:10571: \"$ac_link\"") >&5
10572 (eval $ac_link) 2>&5
10574 echo "$as_me:10574: \$? = $ac_status" >&5
10575 (exit $ac_status); } &&
10576 { ac_try='test -s conftest$ac_exeext'
10577 { (eval echo "$as_me:10577: \"$ac_try\"") >&5
10578 (eval $ac_try) 2>&5
10580 echo "$as_me:10580: \$? = $ac_status" >&5
10581 (exit $ac_status); }; }; then
10582 ac_cv_lib_bsd_gethostbyname=yes
10584 echo "$as_me: failed program was:" >&5
10585 cat conftest.$ac_ext >&5
10586 ac_cv_lib_bsd_gethostbyname=no
10588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10589 LIBS=$ac_check_lib_save_LIBS
10591 echo "$as_me:10591: result: $ac_cv_lib_bsd_gethostbyname" >&5
10592 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10593 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10594 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10600 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10601 # socket/setsockopt and other routines are undefined under SCO ODT
10602 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10603 # on later versions), says Simon Leinen: it contains gethostby*
10604 # variants that don't use the nameserver (or something). -lsocket
10605 # must be given before -lnsl if both are needed. We assume that
10606 # if connect needs -lnsl, so does gethostbyname.
10607 echo "$as_me:10607: checking for connect" >&5
10608 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10609 if test "${ac_cv_func_connect+set}" = set; then
10610 echo $ECHO_N "(cached) $ECHO_C" >&6
10612 cat >conftest.$ac_ext <<_ACEOF
10613 #line 10613 "configure"
10614 #include "confdefs.h"
10615 /* System header to define __stub macros and hopefully few prototypes,
10616 which can conflict with char connect (); below. */
10617 #include <assert.h>
10618 /* Override any gcc2 internal prototype to avoid an error. */
10622 /* We use char because int might match the return type of a gcc2
10623 builtin and then its argument prototype would still apply. */
10630 /* The GNU C library defines this for functions which it implements
10631 to always fail with ENOSYS. Some functions are actually named
10632 something starting with __ and the normal name is an alias. */
10633 #if defined (__stub_connect) || defined (__stub___connect)
10636 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10643 rm -f conftest.$ac_objext conftest$ac_exeext
10644 if { (eval echo "$as_me:10644: \"$ac_link\"") >&5
10645 (eval $ac_link) 2>&5
10647 echo "$as_me:10647: \$? = $ac_status" >&5
10648 (exit $ac_status); } &&
10649 { ac_try='test -s conftest$ac_exeext'
10650 { (eval echo "$as_me:10650: \"$ac_try\"") >&5
10651 (eval $ac_try) 2>&5
10653 echo "$as_me:10653: \$? = $ac_status" >&5
10654 (exit $ac_status); }; }; then
10655 ac_cv_func_connect=yes
10657 echo "$as_me: failed program was:" >&5
10658 cat conftest.$ac_ext >&5
10659 ac_cv_func_connect=no
10661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10663 echo "$as_me:10663: result: $ac_cv_func_connect" >&5
10664 echo "${ECHO_T}$ac_cv_func_connect" >&6
10666 if test $ac_cv_func_connect = no; then
10667 echo "$as_me:10667: checking for connect in -lsocket" >&5
10668 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10669 if test "${ac_cv_lib_socket_connect+set}" = set; then
10670 echo $ECHO_N "(cached) $ECHO_C" >&6
10672 ac_check_lib_save_LIBS=$LIBS
10673 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10674 cat >conftest.$ac_ext <<_ACEOF
10675 #line 10675 "configure"
10676 #include "confdefs.h"
10678 /* Override any gcc2 internal prototype to avoid an error. */
10682 /* We use char because int might match the return type of a gcc2
10683 builtin and then its argument prototype would still apply. */
10693 rm -f conftest.$ac_objext conftest$ac_exeext
10694 if { (eval echo "$as_me:10694: \"$ac_link\"") >&5
10695 (eval $ac_link) 2>&5
10697 echo "$as_me:10697: \$? = $ac_status" >&5
10698 (exit $ac_status); } &&
10699 { ac_try='test -s conftest$ac_exeext'
10700 { (eval echo "$as_me:10700: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10703 echo "$as_me:10703: \$? = $ac_status" >&5
10704 (exit $ac_status); }; }; then
10705 ac_cv_lib_socket_connect=yes
10707 echo "$as_me: failed program was:" >&5
10708 cat conftest.$ac_ext >&5
10709 ac_cv_lib_socket_connect=no
10711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10712 LIBS=$ac_check_lib_save_LIBS
10714 echo "$as_me:10714: result: $ac_cv_lib_socket_connect" >&5
10715 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10716 if test $ac_cv_lib_socket_connect = yes; then
10717 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10722 # Guillermo Gomez says -lposix is necessary on A/UX.
10723 echo "$as_me:10723: checking for remove" >&5
10724 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10725 if test "${ac_cv_func_remove+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
10728 cat >conftest.$ac_ext <<_ACEOF
10729 #line 10729 "configure"
10730 #include "confdefs.h"
10731 /* System header to define __stub macros and hopefully few prototypes,
10732 which can conflict with char remove (); below. */
10733 #include <assert.h>
10734 /* Override any gcc2 internal prototype to avoid an error. */
10738 /* We use char because int might match the return type of a gcc2
10739 builtin and then its argument prototype would still apply. */
10746 /* The GNU C library defines this for functions which it implements
10747 to always fail with ENOSYS. Some functions are actually named
10748 something starting with __ and the normal name is an alias. */
10749 #if defined (__stub_remove) || defined (__stub___remove)
10752 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10759 rm -f conftest.$ac_objext conftest$ac_exeext
10760 if { (eval echo "$as_me:10760: \"$ac_link\"") >&5
10761 (eval $ac_link) 2>&5
10763 echo "$as_me:10763: \$? = $ac_status" >&5
10764 (exit $ac_status); } &&
10765 { ac_try='test -s conftest$ac_exeext'
10766 { (eval echo "$as_me:10766: \"$ac_try\"") >&5
10767 (eval $ac_try) 2>&5
10769 echo "$as_me:10769: \$? = $ac_status" >&5
10770 (exit $ac_status); }; }; then
10771 ac_cv_func_remove=yes
10773 echo "$as_me: failed program was:" >&5
10774 cat conftest.$ac_ext >&5
10775 ac_cv_func_remove=no
10777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10779 echo "$as_me:10779: result: $ac_cv_func_remove" >&5
10780 echo "${ECHO_T}$ac_cv_func_remove" >&6
10782 if test $ac_cv_func_remove = no; then
10783 echo "$as_me:10783: checking for remove in -lposix" >&5
10784 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10785 if test "${ac_cv_lib_posix_remove+set}" = set; then
10786 echo $ECHO_N "(cached) $ECHO_C" >&6
10788 ac_check_lib_save_LIBS=$LIBS
10789 LIBS="-lposix $LIBS"
10790 cat >conftest.$ac_ext <<_ACEOF
10791 #line 10791 "configure"
10792 #include "confdefs.h"
10794 /* Override any gcc2 internal prototype to avoid an error. */
10798 /* We use char because int might match the return type of a gcc2
10799 builtin and then its argument prototype would still apply. */
10809 rm -f conftest.$ac_objext conftest$ac_exeext
10810 if { (eval echo "$as_me:10810: \"$ac_link\"") >&5
10811 (eval $ac_link) 2>&5
10813 echo "$as_me:10813: \$? = $ac_status" >&5
10814 (exit $ac_status); } &&
10815 { ac_try='test -s conftest$ac_exeext'
10816 { (eval echo "$as_me:10816: \"$ac_try\"") >&5
10817 (eval $ac_try) 2>&5
10819 echo "$as_me:10819: \$? = $ac_status" >&5
10820 (exit $ac_status); }; }; then
10821 ac_cv_lib_posix_remove=yes
10823 echo "$as_me: failed program was:" >&5
10824 cat conftest.$ac_ext >&5
10825 ac_cv_lib_posix_remove=no
10827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10828 LIBS=$ac_check_lib_save_LIBS
10830 echo "$as_me:10830: result: $ac_cv_lib_posix_remove" >&5
10831 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10832 if test $ac_cv_lib_posix_remove = yes; then
10833 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10838 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10839 echo "$as_me:10839: checking for shmat" >&5
10840 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10841 if test "${ac_cv_func_shmat+set}" = set; then
10842 echo $ECHO_N "(cached) $ECHO_C" >&6
10844 cat >conftest.$ac_ext <<_ACEOF
10845 #line 10845 "configure"
10846 #include "confdefs.h"
10847 /* System header to define __stub macros and hopefully few prototypes,
10848 which can conflict with char shmat (); below. */
10849 #include <assert.h>
10850 /* Override any gcc2 internal prototype to avoid an error. */
10854 /* We use char because int might match the return type of a gcc2
10855 builtin and then its argument prototype would still apply. */
10862 /* The GNU C library defines this for functions which it implements
10863 to always fail with ENOSYS. Some functions are actually named
10864 something starting with __ and the normal name is an alias. */
10865 #if defined (__stub_shmat) || defined (__stub___shmat)
10868 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10875 rm -f conftest.$ac_objext conftest$ac_exeext
10876 if { (eval echo "$as_me:10876: \"$ac_link\"") >&5
10877 (eval $ac_link) 2>&5
10879 echo "$as_me:10879: \$? = $ac_status" >&5
10880 (exit $ac_status); } &&
10881 { ac_try='test -s conftest$ac_exeext'
10882 { (eval echo "$as_me:10882: \"$ac_try\"") >&5
10883 (eval $ac_try) 2>&5
10885 echo "$as_me:10885: \$? = $ac_status" >&5
10886 (exit $ac_status); }; }; then
10887 ac_cv_func_shmat=yes
10889 echo "$as_me: failed program was:" >&5
10890 cat conftest.$ac_ext >&5
10891 ac_cv_func_shmat=no
10893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10895 echo "$as_me:10895: result: $ac_cv_func_shmat" >&5
10896 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10898 if test $ac_cv_func_shmat = no; then
10899 echo "$as_me:10899: checking for shmat in -lipc" >&5
10900 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10901 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10902 echo $ECHO_N "(cached) $ECHO_C" >&6
10904 ac_check_lib_save_LIBS=$LIBS
10906 cat >conftest.$ac_ext <<_ACEOF
10907 #line 10907 "configure"
10908 #include "confdefs.h"
10910 /* Override any gcc2 internal prototype to avoid an error. */
10914 /* We use char because int might match the return type of a gcc2
10915 builtin and then its argument prototype would still apply. */
10925 rm -f conftest.$ac_objext conftest$ac_exeext
10926 if { (eval echo "$as_me:10926: \"$ac_link\"") >&5
10927 (eval $ac_link) 2>&5
10929 echo "$as_me:10929: \$? = $ac_status" >&5
10930 (exit $ac_status); } &&
10931 { ac_try='test -s conftest$ac_exeext'
10932 { (eval echo "$as_me:10932: \"$ac_try\"") >&5
10933 (eval $ac_try) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit $ac_status); }; }; then
10937 ac_cv_lib_ipc_shmat=yes
10939 echo "$as_me: failed program was:" >&5
10940 cat conftest.$ac_ext >&5
10941 ac_cv_lib_ipc_shmat=no
10943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10944 LIBS=$ac_check_lib_save_LIBS
10946 echo "$as_me:10946: result: $ac_cv_lib_ipc_shmat" >&5
10947 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10948 if test $ac_cv_lib_ipc_shmat = yes; then
10949 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10955 # Check for libraries that X11R6 Xt/Xaw programs need.
10956 ac_save_LDFLAGS=$LDFLAGS
10957 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10958 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10959 # check for ICE first), but we must link in the order -lSM -lICE or
10960 # we get undefined symbols. So assume we have SM if we have ICE.
10961 # These have to be linked with before -lX11, unlike the other
10962 # libraries we check for below, so use a different variable.
10963 # John Interrante, Karl Berry
10964 echo "$as_me:10964: checking for IceConnectionNumber in -lICE" >&5
10965 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10966 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10967 echo $ECHO_N "(cached) $ECHO_C" >&6
10969 ac_check_lib_save_LIBS=$LIBS
10970 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10971 cat >conftest.$ac_ext <<_ACEOF
10972 #line 10972 "configure"
10973 #include "confdefs.h"
10975 /* Override any gcc2 internal prototype to avoid an error. */
10979 /* We use char because int might match the return type of a gcc2
10980 builtin and then its argument prototype would still apply. */
10981 char IceConnectionNumber ();
10985 IceConnectionNumber ();
10990 rm -f conftest.$ac_objext conftest$ac_exeext
10991 if { (eval echo "$as_me:10991: \"$ac_link\"") >&5
10992 (eval $ac_link) 2>&5
10994 echo "$as_me:10994: \$? = $ac_status" >&5
10995 (exit $ac_status); } &&
10996 { ac_try='test -s conftest$ac_exeext'
10997 { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998 (eval $ac_try) 2>&5
11000 echo "$as_me:11000: \$? = $ac_status" >&5
11001 (exit $ac_status); }; }; then
11002 ac_cv_lib_ICE_IceConnectionNumber=yes
11004 echo "$as_me: failed program was:" >&5
11005 cat conftest.$ac_ext >&5
11006 ac_cv_lib_ICE_IceConnectionNumber=no
11008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11009 LIBS=$ac_check_lib_save_LIBS
11011 echo "$as_me:11011: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11012 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11013 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11014 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11017 LDFLAGS=$ac_save_LDFLAGS
11021 cf_x_athena=${cf_x_athena:-Xaw}
11023 echo "$as_me:11023: checking if you want to link with Xaw 3d library" >&5
11024 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11027 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11028 if test "${with_Xaw3d+set}" = set; then
11029 withval="$with_Xaw3d"
11032 if test "$withval" = yes ; then
11034 echo "$as_me:11034: result: yes" >&5
11035 echo "${ECHO_T}yes" >&6
11037 echo "$as_me:11037: result: no" >&5
11038 echo "${ECHO_T}no" >&6
11041 echo "$as_me:11041: checking if you want to link with Xaw 3d xft library" >&5
11042 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11045 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11046 if test "${with_Xaw3dxft+set}" = set; then
11047 withval="$with_Xaw3dxft"
11050 if test "$withval" = yes ; then
11051 cf_x_athena=Xaw3dxft
11052 echo "$as_me:11052: result: yes" >&5
11053 echo "${ECHO_T}yes" >&6
11055 echo "$as_me:11055: result: no" >&5
11056 echo "${ECHO_T}no" >&6
11059 echo "$as_me:11059: checking if you want to link with neXT Athena library" >&5
11060 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11063 # Check whether --with-neXtaw or --without-neXtaw was given.
11064 if test "${with_neXtaw+set}" = set; then
11065 withval="$with_neXtaw"
11068 if test "$withval" = yes ; then
11070 echo "$as_me:11070: result: yes" >&5
11071 echo "${ECHO_T}yes" >&6
11073 echo "$as_me:11073: result: no" >&5
11074 echo "${ECHO_T}no" >&6
11077 echo "$as_me:11077: checking if you want to link with Athena-Plus library" >&5
11078 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11081 # Check whether --with-XawPlus or --without-XawPlus was given.
11082 if test "${with_XawPlus+set}" = set; then
11083 withval="$with_XawPlus"
11086 if test "$withval" = yes ; then
11087 cf_x_athena=XawPlus
11088 echo "$as_me:11088: result: yes" >&5
11089 echo "${ECHO_T}yes" >&6
11091 echo "$as_me:11091: result: no" >&5
11092 echo "${ECHO_T}no" >&6
11097 if test "$PKG_CONFIG" != none ; then
11099 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11100 for cf_athena_pkg in \
11103 ${cf_x_athena}-devel \
11104 lib${cf_x_athena} \
11105 lib${cf_x_athena}-devel
11108 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11109 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11111 echo "${as_me:-configure}:11111: testing found package $cf_athena_pkg ..." 1>&5
11113 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11114 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11115 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11117 echo "${as_me:-configure}:11117: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11119 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11121 echo "${as_me:-configure}:11121: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11126 cf_new_extra_cppflags=
11128 for cf_add_cflags in $cf_pkgconfig_incs
11130 case $cf_fix_cppflags in
11132 case $cf_add_cflags in
11133 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11134 case $cf_add_cflags in
11136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11139 && test -z "${cf_tst_cflags}" \
11140 && cf_fix_cppflags=yes
11142 if test $cf_fix_cppflags = yes ; then
11144 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11145 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11148 elif test "${cf_tst_cflags}" = "\"'" ; then
11150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11157 case "$CPPFLAGS" in
11161 case $cf_add_cflags in
11163 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11165 CPPFLAGS=`echo "$CPPFLAGS" | \
11166 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11167 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11172 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11173 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11180 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11181 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11191 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11194 && test -z "${cf_tst_cflags}" \
11195 && cf_fix_cppflags=no
11200 if test -n "$cf_new_cflags" ; then
11202 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11203 CFLAGS="${CFLAGS}$cf_new_cflags"
11207 if test -n "$cf_new_cppflags" ; then
11209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11210 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11214 if test -n "$cf_new_extra_cppflags" ; then
11216 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11217 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11221 cf_add_libs="$cf_pkgconfig_libs"
11222 # Filter out duplicates - this happens with badly-designed ".pc" files...
11223 for cf_add_1lib in $LIBS
11225 for cf_add_2lib in $cf_add_libs
11227 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11235 LIBS="$cf_add_libs"
11237 cf_x_athena_lib="$cf_pkgconfig_libs"
11239 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11241 cat >>confdefs.h <<EOF
11242 #define $cf_x_athena_LIBS 1
11245 for cf_trim_lib in Xmu Xt X11
11248 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11249 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11250 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11252 echo "${as_me:-configure}:11252: testing ..trimmed $LIBS ..." 1>&5
11258 echo "$as_me:11258: checking for usable $cf_x_athena/Xmu package" >&5
11259 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11260 if test "${cf_cv_xaw_compat+set}" = set; then
11261 echo $ECHO_N "(cached) $ECHO_C" >&6
11264 cat >conftest.$ac_ext <<_ACEOF
11265 #line 11265 "configure"
11266 #include "confdefs.h"
11268 #include <X11/Xmu/CharSet.h>
11274 int check = XmuCompareISOLatin1("big", "small")
11280 rm -f conftest.$ac_objext conftest$ac_exeext
11281 if { (eval echo "$as_me:11281: \"$ac_link\"") >&5
11282 (eval $ac_link) 2>&5
11284 echo "$as_me:11284: \$? = $ac_status" >&5
11285 (exit $ac_status); } &&
11286 { ac_try='test -s conftest$ac_exeext'
11287 { (eval echo "$as_me:11287: \"$ac_try\"") >&5
11288 (eval $ac_try) 2>&5
11290 echo "$as_me:11290: \$? = $ac_status" >&5
11291 (exit $ac_status); }; }; then
11292 cf_cv_xaw_compat=yes
11294 echo "$as_me: failed program was:" >&5
11295 cat conftest.$ac_ext >&5
11296 cf_cv_xaw_compat=no
11298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11300 echo "$as_me:11300: result: $cf_cv_xaw_compat" >&5
11301 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11303 if test "$cf_cv_xaw_compat" = no
11305 # workaround for broken ".pc" files...
11306 case "$cf_x_athena_lib" in
11310 test -n "$verbose" && echo " work around broken package" 1>&6
11312 echo "${as_me:-configure}:11312: testing work around broken package ..." 1>&5
11314 cf_save_xmu="$LIBS"
11315 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
11317 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11318 test -n "$verbose" && echo " found package xmu" 1>&6
11320 echo "${as_me:-configure}:11320: testing found package xmu ..." 1>&5
11322 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11323 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11324 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11326 echo "${as_me:-configure}:11326: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11328 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11330 echo "${as_me:-configure}:11330: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11335 cf_new_extra_cppflags=
11337 for cf_add_cflags in $cf_pkgconfig_incs
11339 case $cf_fix_cppflags in
11341 case $cf_add_cflags in
11342 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11343 case $cf_add_cflags in
11345 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11347 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11348 && test -z "${cf_tst_cflags}" \
11349 && cf_fix_cppflags=yes
11351 if test $cf_fix_cppflags = yes ; then
11353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11357 elif test "${cf_tst_cflags}" = "\"'" ; then
11359 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11360 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11366 case "$CPPFLAGS" in
11370 case $cf_add_cflags in
11372 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11374 CPPFLAGS=`echo "$CPPFLAGS" | \
11375 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11376 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11381 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11382 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11389 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11390 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11397 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11398 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11400 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11402 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11403 && test -z "${cf_tst_cflags}" \
11404 && cf_fix_cppflags=no
11409 if test -n "$cf_new_cflags" ; then
11411 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11412 CFLAGS="${CFLAGS}$cf_new_cflags"
11416 if test -n "$cf_new_cppflags" ; then
11418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11419 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11423 if test -n "$cf_new_extra_cppflags" ; then
11425 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11426 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11430 cf_add_libs="$cf_pkgconfig_libs"
11431 # Filter out duplicates - this happens with badly-designed ".pc" files...
11432 for cf_add_1lib in $LIBS
11434 for cf_add_2lib in $cf_add_libs
11436 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11442 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11444 LIBS="$cf_add_libs"
11446 LIBS="$cf_save_xmu"
11448 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11450 echo "${as_me:-configure}:11450: testing ...before $LIBS ..." 1>&5
11452 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
11453 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11455 echo "${as_me:-configure}:11455: testing ...after $LIBS ..." 1>&5
11461 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11463 echo "${as_me:-configure}:11463: testing ...before $LIBS ..." 1>&5
11465 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
11466 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11468 echo "${as_me:-configure}:11468: testing ...after $LIBS ..." 1>&5
11472 for cf_trim_lib in Xmu Xt X11
11475 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11476 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11477 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11479 echo "${as_me:-configure}:11479: testing ..trimmed $LIBS ..." 1>&5
11499 if test -z "$cf_x_athena_lib" ; then
11501 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11502 test -n "$verbose" && echo " found package Xext" 1>&6
11504 echo "${as_me:-configure}:11504: testing found package Xext ..." 1>&5
11506 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11507 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11508 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11510 echo "${as_me:-configure}:11510: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11512 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11514 echo "${as_me:-configure}:11514: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11519 cf_new_extra_cppflags=
11521 for cf_add_cflags in $cf_pkgconfig_incs
11523 case $cf_fix_cppflags in
11525 case $cf_add_cflags in
11526 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11527 case $cf_add_cflags in
11529 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11532 && test -z "${cf_tst_cflags}" \
11533 && cf_fix_cppflags=yes
11535 if test $cf_fix_cppflags = yes ; then
11537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11541 elif test "${cf_tst_cflags}" = "\"'" ; then
11543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11550 case "$CPPFLAGS" in
11554 case $cf_add_cflags in
11556 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11558 CPPFLAGS=`echo "$CPPFLAGS" | \
11559 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11560 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11565 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11566 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11573 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11574 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11581 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11582 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11584 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11587 && test -z "${cf_tst_cflags}" \
11588 && cf_fix_cppflags=no
11593 if test -n "$cf_new_cflags" ; then
11595 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11596 CFLAGS="${CFLAGS}$cf_new_cflags"
11600 if test -n "$cf_new_cppflags" ; then
11602 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11603 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11607 if test -n "$cf_new_extra_cppflags" ; then
11609 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11610 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11614 cf_add_libs="$cf_pkgconfig_libs"
11615 # Filter out duplicates - this happens with badly-designed ".pc" files...
11616 for cf_add_1lib in $LIBS
11618 for cf_add_2lib in $cf_add_libs
11620 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11626 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11628 LIBS="$cf_add_libs"
11635 echo "$as_me:11635: checking for XextCreateExtension in -lXext" >&5
11636 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11637 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11640 ac_check_lib_save_LIBS=$LIBS
11641 LIBS="-lXext $LIBS"
11642 cat >conftest.$ac_ext <<_ACEOF
11643 #line 11643 "configure"
11644 #include "confdefs.h"
11646 /* Override any gcc2 internal prototype to avoid an error. */
11650 /* We use char because int might match the return type of a gcc2
11651 builtin and then its argument prototype would still apply. */
11652 char XextCreateExtension ();
11656 XextCreateExtension ();
11661 rm -f conftest.$ac_objext conftest$ac_exeext
11662 if { (eval echo "$as_me:11662: \"$ac_link\"") >&5
11663 (eval $ac_link) 2>&5
11665 echo "$as_me:11665: \$? = $ac_status" >&5
11666 (exit $ac_status); } &&
11667 { ac_try='test -s conftest$ac_exeext'
11668 { (eval echo "$as_me:11668: \"$ac_try\"") >&5
11669 (eval $ac_try) 2>&5
11671 echo "$as_me:11671: \$? = $ac_status" >&5
11672 (exit $ac_status); }; }; then
11673 ac_cv_lib_Xext_XextCreateExtension=yes
11675 echo "$as_me: failed program was:" >&5
11676 cat conftest.$ac_ext >&5
11677 ac_cv_lib_Xext_XextCreateExtension=no
11679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11680 LIBS=$ac_check_lib_save_LIBS
11682 echo "$as_me:11682: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11683 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11684 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11686 cf_add_libs="-lXext"
11687 # Filter out duplicates - this happens with badly-designed ".pc" files...
11688 for cf_add_1lib in $LIBS
11690 for cf_add_2lib in $cf_add_libs
11692 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11700 LIBS="$cf_add_libs"
11706 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11707 # in some cases has installed dummy files in the former, other cases replaced
11708 # it with a link to the new location). This complicates the configure script.
11709 # Check for that pitfall, and recover using pkg-config
11711 # If none of these are set, the configuration is almost certainly broken.
11712 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11715 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11716 test -n "$verbose" && echo " found package x11" 1>&6
11718 echo "${as_me:-configure}:11718: testing found package x11 ..." 1>&5
11720 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11721 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11722 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11724 echo "${as_me:-configure}:11724: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11726 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11728 echo "${as_me:-configure}:11728: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11733 cf_new_extra_cppflags=
11735 for cf_add_cflags in $cf_pkgconfig_incs
11737 case $cf_fix_cppflags in
11739 case $cf_add_cflags in
11740 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11741 case $cf_add_cflags in
11743 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11746 && test -z "${cf_tst_cflags}" \
11747 && cf_fix_cppflags=yes
11749 if test $cf_fix_cppflags = yes ; then
11751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11755 elif test "${cf_tst_cflags}" = "\"'" ; then
11757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11764 case "$CPPFLAGS" in
11768 case $cf_add_cflags in
11770 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11772 CPPFLAGS=`echo "$CPPFLAGS" | \
11773 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11774 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11779 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11780 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11787 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11788 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11798 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11800 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11801 && test -z "${cf_tst_cflags}" \
11802 && cf_fix_cppflags=no
11807 if test -n "$cf_new_cflags" ; then
11809 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11810 CFLAGS="${CFLAGS}$cf_new_cflags"
11814 if test -n "$cf_new_cppflags" ; then
11816 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11817 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11821 if test -n "$cf_new_extra_cppflags" ; then
11823 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11824 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11828 cf_add_libs="$cf_pkgconfig_libs"
11829 # Filter out duplicates - this happens with badly-designed ".pc" files...
11830 for cf_add_1lib in $LIBS
11832 for cf_add_2lib in $cf_add_libs
11834 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11842 LIBS="$cf_add_libs"
11848 { echo "$as_me:11848: WARNING: unable to find X11 library" >&5
11849 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11852 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11853 test -n "$verbose" && echo " found package ice" 1>&6
11855 echo "${as_me:-configure}:11855: testing found package ice ..." 1>&5
11857 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11858 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11859 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11861 echo "${as_me:-configure}:11861: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11863 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11865 echo "${as_me:-configure}:11865: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11870 cf_new_extra_cppflags=
11872 for cf_add_cflags in $cf_pkgconfig_incs
11874 case $cf_fix_cppflags in
11876 case $cf_add_cflags in
11877 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11878 case $cf_add_cflags in
11880 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11882 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11883 && test -z "${cf_tst_cflags}" \
11884 && cf_fix_cppflags=yes
11886 if test $cf_fix_cppflags = yes ; then
11888 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11889 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11892 elif test "${cf_tst_cflags}" = "\"'" ; then
11894 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11895 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11901 case "$CPPFLAGS" in
11905 case $cf_add_cflags in
11907 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11909 CPPFLAGS=`echo "$CPPFLAGS" | \
11910 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11911 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11916 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11917 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11924 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11925 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11932 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11933 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11935 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11937 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11938 && test -z "${cf_tst_cflags}" \
11939 && cf_fix_cppflags=no
11944 if test -n "$cf_new_cflags" ; then
11946 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11947 CFLAGS="${CFLAGS}$cf_new_cflags"
11951 if test -n "$cf_new_cppflags" ; then
11953 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11954 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11958 if test -n "$cf_new_extra_cppflags" ; then
11960 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11961 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11965 cf_add_libs="$cf_pkgconfig_libs"
11966 # Filter out duplicates - this happens with badly-designed ".pc" files...
11967 for cf_add_1lib in $LIBS
11969 for cf_add_2lib in $cf_add_libs
11971 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11977 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11979 LIBS="$cf_add_libs"
11985 { echo "$as_me:11985: WARNING: unable to find ICE library" >&5
11986 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11989 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11990 test -n "$verbose" && echo " found package sm" 1>&6
11992 echo "${as_me:-configure}:11992: testing found package sm ..." 1>&5
11994 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11995 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11996 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11998 echo "${as_me:-configure}:11998: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12000 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12002 echo "${as_me:-configure}:12002: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12007 cf_new_extra_cppflags=
12009 for cf_add_cflags in $cf_pkgconfig_incs
12011 case $cf_fix_cppflags in
12013 case $cf_add_cflags in
12014 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12015 case $cf_add_cflags in
12017 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12020 && test -z "${cf_tst_cflags}" \
12021 && cf_fix_cppflags=yes
12023 if test $cf_fix_cppflags = yes ; then
12025 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12026 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12029 elif test "${cf_tst_cflags}" = "\"'" ; then
12031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12038 case "$CPPFLAGS" in
12042 case $cf_add_cflags in
12044 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12046 CPPFLAGS=`echo "$CPPFLAGS" | \
12047 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12048 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12053 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12054 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12061 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12062 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12069 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12070 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12072 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12075 && test -z "${cf_tst_cflags}" \
12076 && cf_fix_cppflags=no
12081 if test -n "$cf_new_cflags" ; then
12083 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12084 CFLAGS="${CFLAGS}$cf_new_cflags"
12088 if test -n "$cf_new_cppflags" ; then
12090 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12091 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12095 if test -n "$cf_new_extra_cppflags" ; then
12097 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12098 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12102 cf_add_libs="$cf_pkgconfig_libs"
12103 # Filter out duplicates - this happens with badly-designed ".pc" files...
12104 for cf_add_1lib in $LIBS
12106 for cf_add_2lib in $cf_add_libs
12108 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12114 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12116 LIBS="$cf_add_libs"
12122 { echo "$as_me:12122: WARNING: unable to find SM library" >&5
12123 echo "$as_me: WARNING: unable to find SM library" >&2;}
12126 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12127 test -n "$verbose" && echo " found package xt" 1>&6
12129 echo "${as_me:-configure}:12129: testing found package xt ..." 1>&5
12131 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12132 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12133 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12135 echo "${as_me:-configure}:12135: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12137 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12139 echo "${as_me:-configure}:12139: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12144 cf_new_extra_cppflags=
12146 for cf_add_cflags in $cf_pkgconfig_incs
12148 case $cf_fix_cppflags in
12150 case $cf_add_cflags in
12151 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12152 case $cf_add_cflags in
12154 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12156 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12157 && test -z "${cf_tst_cflags}" \
12158 && cf_fix_cppflags=yes
12160 if test $cf_fix_cppflags = yes ; then
12162 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12163 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12166 elif test "${cf_tst_cflags}" = "\"'" ; then
12168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12175 case "$CPPFLAGS" in
12179 case $cf_add_cflags in
12181 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12183 CPPFLAGS=`echo "$CPPFLAGS" | \
12184 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12185 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12190 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12191 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12198 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12199 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12206 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12207 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12211 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12212 && test -z "${cf_tst_cflags}" \
12213 && cf_fix_cppflags=no
12218 if test -n "$cf_new_cflags" ; then
12220 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12221 CFLAGS="${CFLAGS}$cf_new_cflags"
12225 if test -n "$cf_new_cppflags" ; then
12227 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12228 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12232 if test -n "$cf_new_extra_cppflags" ; then
12234 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12235 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12239 cf_add_libs="$cf_pkgconfig_libs"
12240 # Filter out duplicates - this happens with badly-designed ".pc" files...
12241 for cf_add_1lib in $LIBS
12243 for cf_add_2lib in $cf_add_libs
12245 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12251 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12253 LIBS="$cf_add_libs"
12259 { echo "$as_me:12259: WARNING: unable to find Xt library" >&5
12260 echo "$as_me: WARNING: unable to find Xt library" >&2;}
12267 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12268 test -n "$verbose" && echo " found package xt" 1>&6
12270 echo "${as_me:-configure}:12270: testing found package xt ..." 1>&5
12272 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12273 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12274 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12276 echo "${as_me:-configure}:12276: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12278 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12280 echo "${as_me:-configure}:12280: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12285 cf_new_extra_cppflags=
12287 for cf_add_cflags in $cf_pkgconfig_incs
12289 case $cf_fix_cppflags in
12291 case $cf_add_cflags in
12292 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12293 case $cf_add_cflags in
12295 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12298 && test -z "${cf_tst_cflags}" \
12299 && cf_fix_cppflags=yes
12301 if test $cf_fix_cppflags = yes ; then
12303 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12304 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12307 elif test "${cf_tst_cflags}" = "\"'" ; then
12309 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12310 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12316 case "$CPPFLAGS" in
12320 case $cf_add_cflags in
12322 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12324 CPPFLAGS=`echo "$CPPFLAGS" | \
12325 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12326 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12331 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12332 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12339 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12340 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12347 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12348 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12350 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12352 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12353 && test -z "${cf_tst_cflags}" \
12354 && cf_fix_cppflags=no
12359 if test -n "$cf_new_cflags" ; then
12361 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12362 CFLAGS="${CFLAGS}$cf_new_cflags"
12366 if test -n "$cf_new_cppflags" ; then
12368 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12369 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12373 if test -n "$cf_new_extra_cppflags" ; then
12375 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12376 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12380 cf_add_libs="$cf_pkgconfig_libs"
12381 # Filter out duplicates - this happens with badly-designed ".pc" files...
12382 for cf_add_1lib in $LIBS
12384 for cf_add_2lib in $cf_add_libs
12386 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12392 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12394 LIBS="$cf_add_libs"
12400 # we have an "xt" package, but it may omit Xt's dependency on X11
12401 echo "$as_me:12401: checking for usable X dependency" >&5
12402 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
12403 if test "${cf_cv_xt_x11_compat+set}" = set; then
12404 echo $ECHO_N "(cached) $ECHO_C" >&6
12407 cat >conftest.$ac_ext <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12411 #include <X11/Xlib.h>
12417 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12418 int rc2 = XClearWindow((Display*) 0, (Window) 0);
12419 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12420 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12426 rm -f conftest.$ac_objext conftest$ac_exeext
12427 if { (eval echo "$as_me:12427: \"$ac_link\"") >&5
12428 (eval $ac_link) 2>&5
12430 echo "$as_me:12430: \$? = $ac_status" >&5
12431 (exit $ac_status); } &&
12432 { ac_try='test -s conftest$ac_exeext'
12433 { (eval echo "$as_me:12433: \"$ac_try\"") >&5
12434 (eval $ac_try) 2>&5
12436 echo "$as_me:12436: \$? = $ac_status" >&5
12437 (exit $ac_status); }; }; then
12438 cf_cv_xt_x11_compat=yes
12440 echo "$as_me: failed program was:" >&5
12441 cat conftest.$ac_ext >&5
12442 cf_cv_xt_x11_compat=no
12444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12446 echo "$as_me:12446: result: $cf_cv_xt_x11_compat" >&5
12447 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12448 if test "$cf_cv_xt_x11_compat" = no
12450 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
12452 echo "${as_me:-configure}:12452: testing work around broken X11 dependency ..." 1>&5
12454 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12456 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12457 test -n "$verbose" && echo " found package x11" 1>&6
12459 echo "${as_me:-configure}:12459: testing found package x11 ..." 1>&5
12461 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12462 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12463 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12465 echo "${as_me:-configure}:12465: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12467 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12469 echo "${as_me:-configure}:12469: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12474 cf_new_extra_cppflags=
12476 for cf_add_cflags in $cf_pkgconfig_incs
12478 case $cf_fix_cppflags in
12480 case $cf_add_cflags in
12481 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12482 case $cf_add_cflags in
12484 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12486 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12487 && test -z "${cf_tst_cflags}" \
12488 && cf_fix_cppflags=yes
12490 if test $cf_fix_cppflags = yes ; then
12492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12496 elif test "${cf_tst_cflags}" = "\"'" ; then
12498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12505 case "$CPPFLAGS" in
12509 case $cf_add_cflags in
12511 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12513 CPPFLAGS=`echo "$CPPFLAGS" | \
12514 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12515 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12520 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12521 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12528 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12529 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12539 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12542 && test -z "${cf_tst_cflags}" \
12543 && cf_fix_cppflags=no
12548 if test -n "$cf_new_cflags" ; then
12550 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12551 CFLAGS="${CFLAGS}$cf_new_cflags"
12555 if test -n "$cf_new_cppflags" ; then
12557 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12558 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12562 if test -n "$cf_new_extra_cppflags" ; then
12564 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12565 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12569 cf_add_libs="$cf_pkgconfig_libs"
12570 # Filter out duplicates - this happens with badly-designed ".pc" files...
12571 for cf_add_1lib in $LIBS
12573 for cf_add_2lib in $cf_add_libs
12575 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12581 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12583 LIBS="$cf_add_libs"
12590 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12592 echo "${as_me:-configure}:12592: testing ...before $LIBS ..." 1>&5
12594 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12595 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12597 echo "${as_me:-configure}:12597: testing ...after $LIBS ..." 1>&5
12605 echo "$as_me:12605: checking for usable X Toolkit package" >&5
12606 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12607 if test "${cf_cv_xt_ice_compat+set}" = set; then
12608 echo $ECHO_N "(cached) $ECHO_C" >&6
12611 cat >conftest.$ac_ext <<_ACEOF
12612 #line 12612 "configure"
12613 #include "confdefs.h"
12615 #include <X11/Shell.h>
12620 int num = IceConnectionNumber(0)
12626 rm -f conftest.$ac_objext conftest$ac_exeext
12627 if { (eval echo "$as_me:12627: \"$ac_link\"") >&5
12628 (eval $ac_link) 2>&5
12630 echo "$as_me:12630: \$? = $ac_status" >&5
12631 (exit $ac_status); } &&
12632 { ac_try='test -s conftest$ac_exeext'
12633 { (eval echo "$as_me:12633: \"$ac_try\"") >&5
12634 (eval $ac_try) 2>&5
12636 echo "$as_me:12636: \$? = $ac_status" >&5
12637 (exit $ac_status); }; }; then
12638 cf_cv_xt_ice_compat=yes
12640 echo "$as_me: failed program was:" >&5
12641 cat conftest.$ac_ext >&5
12642 cf_cv_xt_ice_compat=no
12644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12646 echo "$as_me:12646: result: $cf_cv_xt_ice_compat" >&5
12647 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12649 if test "$cf_cv_xt_ice_compat" = no
12651 # workaround for broken ".pc" files used for X Toolkit.
12652 case "x$X_PRE_LIBS" in
12658 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12660 echo "${as_me:-configure}:12660: testing work around broken ICE dependency ..." 1>&5
12662 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12663 test -n "$verbose" && echo " found package ice" 1>&6
12665 echo "${as_me:-configure}:12665: testing found package ice ..." 1>&5
12667 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12668 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12669 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12671 echo "${as_me:-configure}:12671: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12673 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12675 echo "${as_me:-configure}:12675: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12680 cf_new_extra_cppflags=
12682 for cf_add_cflags in $cf_pkgconfig_incs
12684 case $cf_fix_cppflags in
12686 case $cf_add_cflags in
12687 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12688 case $cf_add_cflags in
12690 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12692 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12693 && test -z "${cf_tst_cflags}" \
12694 && cf_fix_cppflags=yes
12696 if test $cf_fix_cppflags = yes ; then
12698 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12699 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12702 elif test "${cf_tst_cflags}" = "\"'" ; then
12704 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12705 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12711 case "$CPPFLAGS" in
12715 case $cf_add_cflags in
12717 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12719 CPPFLAGS=`echo "$CPPFLAGS" | \
12720 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12721 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12726 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12727 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12734 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12735 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12742 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12743 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12745 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12747 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12748 && test -z "${cf_tst_cflags}" \
12749 && cf_fix_cppflags=no
12754 if test -n "$cf_new_cflags" ; then
12756 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12757 CFLAGS="${CFLAGS}$cf_new_cflags"
12761 if test -n "$cf_new_cppflags" ; then
12763 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12764 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12768 if test -n "$cf_new_extra_cppflags" ; then
12770 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12771 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12775 cf_add_libs="$cf_pkgconfig_libs"
12776 # Filter out duplicates - this happens with badly-designed ".pc" files...
12777 for cf_add_1lib in $LIBS
12779 for cf_add_2lib in $cf_add_libs
12781 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12787 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12789 LIBS="$cf_add_libs"
12791 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12792 test -n "$verbose" && echo " found package sm" 1>&6
12794 echo "${as_me:-configure}:12794: testing found package sm ..." 1>&5
12796 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12797 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12798 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12800 echo "${as_me:-configure}:12800: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12802 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12804 echo "${as_me:-configure}:12804: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12809 cf_new_extra_cppflags=
12811 for cf_add_cflags in $cf_pkgconfig_incs
12813 case $cf_fix_cppflags in
12815 case $cf_add_cflags in
12816 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12817 case $cf_add_cflags in
12819 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12822 && test -z "${cf_tst_cflags}" \
12823 && cf_fix_cppflags=yes
12825 if test $cf_fix_cppflags = yes ; then
12827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12831 elif test "${cf_tst_cflags}" = "\"'" ; then
12833 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12834 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12840 case "$CPPFLAGS" in
12844 case $cf_add_cflags in
12846 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12848 CPPFLAGS=`echo "$CPPFLAGS" | \
12849 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12850 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12855 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12856 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12863 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12864 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12874 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12876 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12877 && test -z "${cf_tst_cflags}" \
12878 && cf_fix_cppflags=no
12883 if test -n "$cf_new_cflags" ; then
12885 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12886 CFLAGS="${CFLAGS}$cf_new_cflags"
12890 if test -n "$cf_new_cppflags" ; then
12892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12893 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12897 if test -n "$cf_new_extra_cppflags" ; then
12899 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12900 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12904 cf_add_libs="$cf_pkgconfig_libs"
12905 # Filter out duplicates - this happens with badly-designed ".pc" files...
12906 for cf_add_1lib in $LIBS
12908 for cf_add_2lib in $cf_add_libs
12910 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12916 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12918 LIBS="$cf_add_libs"
12931 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12933 echo "${as_me:-configure}:12933: testing ...before $LIBS ..." 1>&5
12935 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12936 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12938 echo "${as_me:-configure}:12938: testing ...after $LIBS ..." 1>&5
12954 LDFLAGS="$X_LIBS $LDFLAGS"
12956 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12958 echo "${as_me:-configure}:12958: testing checking additions to CFLAGS ..." 1>&5
12960 cf_check_cflags="$CFLAGS"
12961 cf_check_cppflags="$CPPFLAGS"
12966 cf_new_extra_cppflags=
12968 for cf_add_cflags in $X_CFLAGS
12970 case $cf_fix_cppflags in
12972 case $cf_add_cflags in
12973 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12974 case $cf_add_cflags in
12976 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12978 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12979 && test -z "${cf_tst_cflags}" \
12980 && cf_fix_cppflags=yes
12982 if test $cf_fix_cppflags = yes ; then
12984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12988 elif test "${cf_tst_cflags}" = "\"'" ; then
12990 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12991 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12997 case "$CPPFLAGS" in
13001 case $cf_add_cflags in
13003 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13005 CPPFLAGS=`echo "$CPPFLAGS" | \
13006 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13007 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13012 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13013 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13020 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13021 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13028 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13029 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13031 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13033 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13034 && test -z "${cf_tst_cflags}" \
13035 && cf_fix_cppflags=no
13040 if test -n "$cf_new_cflags" ; then
13041 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13043 echo "${as_me:-configure}:13043: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13045 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13046 CFLAGS="${CFLAGS}$cf_new_cflags"
13050 if test -n "$cf_new_cppflags" ; then
13051 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13053 echo "${as_me:-configure}:13053: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13055 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13056 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13060 if test -n "$cf_new_extra_cppflags" ; then
13061 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13063 echo "${as_me:-configure}:13063: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13065 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13066 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13070 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13071 cat >conftest.$ac_ext <<_ACEOF
13072 #line 13072 "configure"
13073 #include "confdefs.h"
13078 printf("Hello world");
13083 rm -f conftest.$ac_objext conftest$ac_exeext
13084 if { (eval echo "$as_me:13084: \"$ac_link\"") >&5
13085 (eval $ac_link) 2>&5
13087 echo "$as_me:13087: \$? = $ac_status" >&5
13088 (exit $ac_status); } &&
13089 { ac_try='test -s conftest$ac_exeext'
13090 { (eval echo "$as_me:13090: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13093 echo "$as_me:13093: \$? = $ac_status" >&5
13094 (exit $ac_status); }; }; then
13097 echo "$as_me: failed program was:" >&5
13098 cat conftest.$ac_ext >&5
13099 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13101 echo "${as_me:-configure}:13101: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13103 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13104 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13106 echo "${as_me:-configure}:13106: testing but keeping change to \$CPPFLAGS ..." 1>&5
13109 CFLAGS="$cf_check_flags"
13111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13114 echo "$as_me:13114: checking for XOpenDisplay" >&5
13115 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
13116 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
13117 echo $ECHO_N "(cached) $ECHO_C" >&6
13119 cat >conftest.$ac_ext <<_ACEOF
13120 #line 13120 "configure"
13121 #include "confdefs.h"
13122 /* System header to define __stub macros and hopefully few prototypes,
13123 which can conflict with char XOpenDisplay (); below. */
13124 #include <assert.h>
13125 /* Override any gcc2 internal prototype to avoid an error. */
13129 /* We use char because int might match the return type of a gcc2
13130 builtin and then its argument prototype would still apply. */
13131 char XOpenDisplay ();
13137 /* The GNU C library defines this for functions which it implements
13138 to always fail with ENOSYS. Some functions are actually named
13139 something starting with __ and the normal name is an alias. */
13140 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
13143 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13150 rm -f conftest.$ac_objext conftest$ac_exeext
13151 if { (eval echo "$as_me:13151: \"$ac_link\"") >&5
13152 (eval $ac_link) 2>&5
13154 echo "$as_me:13154: \$? = $ac_status" >&5
13155 (exit $ac_status); } &&
13156 { ac_try='test -s conftest$ac_exeext'
13157 { (eval echo "$as_me:13157: \"$ac_try\"") >&5
13158 (eval $ac_try) 2>&5
13160 echo "$as_me:13160: \$? = $ac_status" >&5
13161 (exit $ac_status); }; }; then
13162 ac_cv_func_XOpenDisplay=yes
13164 echo "$as_me: failed program was:" >&5
13165 cat conftest.$ac_ext >&5
13166 ac_cv_func_XOpenDisplay=no
13168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13170 echo "$as_me:13170: result: $ac_cv_func_XOpenDisplay" >&5
13171 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
13172 if test $ac_cv_func_XOpenDisplay = yes; then
13176 echo "$as_me:13176: checking for XOpenDisplay in -lX11" >&5
13177 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13178 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13179 echo $ECHO_N "(cached) $ECHO_C" >&6
13181 ac_check_lib_save_LIBS=$LIBS
13182 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13183 cat >conftest.$ac_ext <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13187 /* Override any gcc2 internal prototype to avoid an error. */
13191 /* We use char because int might match the return type of a gcc2
13192 builtin and then its argument prototype would still apply. */
13193 char XOpenDisplay ();
13202 rm -f conftest.$ac_objext conftest$ac_exeext
13203 if { (eval echo "$as_me:13203: \"$ac_link\"") >&5
13204 (eval $ac_link) 2>&5
13206 echo "$as_me:13206: \$? = $ac_status" >&5
13207 (exit $ac_status); } &&
13208 { ac_try='test -s conftest$ac_exeext'
13209 { (eval echo "$as_me:13209: \"$ac_try\"") >&5
13210 (eval $ac_try) 2>&5
13212 echo "$as_me:13212: \$? = $ac_status" >&5
13213 (exit $ac_status); }; }; then
13214 ac_cv_lib_X11_XOpenDisplay=yes
13216 echo "$as_me: failed program was:" >&5
13217 cat conftest.$ac_ext >&5
13218 ac_cv_lib_X11_XOpenDisplay=no
13220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13221 LIBS=$ac_check_lib_save_LIBS
13223 echo "$as_me:13223: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13224 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13225 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13227 cf_add_libs="-lX11"
13228 # Filter out duplicates - this happens with badly-designed ".pc" files...
13229 for cf_add_1lib in $LIBS
13231 for cf_add_2lib in $cf_add_libs
13233 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13239 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13241 LIBS="$cf_add_libs"
13247 echo "$as_me:13247: checking for XtAppInitialize" >&5
13248 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
13249 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
13252 cat >conftest.$ac_ext <<_ACEOF
13253 #line 13253 "configure"
13254 #include "confdefs.h"
13255 /* System header to define __stub macros and hopefully few prototypes,
13256 which can conflict with char XtAppInitialize (); below. */
13257 #include <assert.h>
13258 /* Override any gcc2 internal prototype to avoid an error. */
13262 /* We use char because int might match the return type of a gcc2
13263 builtin and then its argument prototype would still apply. */
13264 char XtAppInitialize ();
13270 /* The GNU C library defines this for functions which it implements
13271 to always fail with ENOSYS. Some functions are actually named
13272 something starting with __ and the normal name is an alias. */
13273 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
13276 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13283 rm -f conftest.$ac_objext conftest$ac_exeext
13284 if { (eval echo "$as_me:13284: \"$ac_link\"") >&5
13285 (eval $ac_link) 2>&5
13287 echo "$as_me:13287: \$? = $ac_status" >&5
13288 (exit $ac_status); } &&
13289 { ac_try='test -s conftest$ac_exeext'
13290 { (eval echo "$as_me:13290: \"$ac_try\"") >&5
13291 (eval $ac_try) 2>&5
13293 echo "$as_me:13293: \$? = $ac_status" >&5
13294 (exit $ac_status); }; }; then
13295 ac_cv_func_XtAppInitialize=yes
13297 echo "$as_me: failed program was:" >&5
13298 cat conftest.$ac_ext >&5
13299 ac_cv_func_XtAppInitialize=no
13301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13303 echo "$as_me:13303: result: $ac_cv_func_XtAppInitialize" >&5
13304 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
13305 if test $ac_cv_func_XtAppInitialize = yes; then
13309 echo "$as_me:13309: checking for XtAppInitialize in -lXt" >&5
13310 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
13311 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
13314 ac_check_lib_save_LIBS=$LIBS
13315 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13316 cat >conftest.$ac_ext <<_ACEOF
13317 #line 13317 "configure"
13318 #include "confdefs.h"
13320 /* Override any gcc2 internal prototype to avoid an error. */
13324 /* We use char because int might match the return type of a gcc2
13325 builtin and then its argument prototype would still apply. */
13326 char XtAppInitialize ();
13330 XtAppInitialize ();
13335 rm -f conftest.$ac_objext conftest$ac_exeext
13336 if { (eval echo "$as_me:13336: \"$ac_link\"") >&5
13337 (eval $ac_link) 2>&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit $ac_status); } &&
13341 { ac_try='test -s conftest$ac_exeext'
13342 { (eval echo "$as_me:13342: \"$ac_try\"") >&5
13343 (eval $ac_try) 2>&5
13345 echo "$as_me:13345: \$? = $ac_status" >&5
13346 (exit $ac_status); }; }; then
13347 ac_cv_lib_Xt_XtAppInitialize=yes
13349 echo "$as_me: failed program was:" >&5
13350 cat conftest.$ac_ext >&5
13351 ac_cv_lib_Xt_XtAppInitialize=no
13353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13354 LIBS=$ac_check_lib_save_LIBS
13356 echo "$as_me:13356: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
13357 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
13358 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
13360 cat >>confdefs.h <<\EOF
13361 #define HAVE_LIBXT 1
13365 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13372 if test $cf_have_X_LIBS = no ; then
13373 { echo "$as_me:13373: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13374 test program. You will have to check and add the proper libraries by hand
13376 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13377 test program. You will have to check and add the proper libraries by hand
13378 to makefile." >&2;}
13381 cf_x_athena_root=$cf_x_athena
13384 for cf_path in default \
13385 /usr/contrib/X11R6 \
13386 /usr/contrib/X11R5 \
13390 if test -z "$cf_x_athena_inc" ; then
13391 cf_save="$CPPFLAGS"
13392 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
13393 if test $cf_path != default ; then
13394 CPPFLAGS="$cf_save -I$cf_path/include"
13395 echo "$as_me:13395: checking for $cf_test in $cf_path" >&5
13396 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
13398 echo "$as_me:13398: checking for $cf_test" >&5
13399 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
13401 cat >conftest.$ac_ext <<_ACEOF
13402 #line 13402 "configure"
13403 #include "confdefs.h"
13405 #include <X11/Intrinsic.h>
13406 #include <$cf_test>
13415 rm -f conftest.$ac_objext
13416 if { (eval echo "$as_me:13416: \"$ac_compile\"") >&5
13417 (eval $ac_compile) 2>&5
13419 echo "$as_me:13419: \$? = $ac_status" >&5
13420 (exit $ac_status); } &&
13421 { ac_try='test -s conftest.$ac_objext'
13422 { (eval echo "$as_me:13422: \"$ac_try\"") >&5
13423 (eval $ac_try) 2>&5
13425 echo "$as_me:13425: \$? = $ac_status" >&5
13426 (exit $ac_status); }; }; then
13429 echo "$as_me: failed program was:" >&5
13430 cat conftest.$ac_ext >&5
13433 rm -f conftest.$ac_objext conftest.$ac_ext
13434 echo "$as_me:13434: result: $cf_result" >&5
13435 echo "${ECHO_T}$cf_result" >&6
13436 if test "$cf_result" = yes ; then
13437 cf_x_athena_inc=$cf_path
13440 CPPFLAGS="$cf_save"
13445 if test -z "$cf_x_athena_inc" ; then
13446 { echo "$as_me:13446: WARNING: Unable to successfully find Athena header files with test program" >&5
13447 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
13448 elif test "$cf_x_athena_inc" != default ; then
13449 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
13452 cf_x_athena_root=$cf_x_athena
13455 for cf_path in default \
13456 /usr/contrib/X11R6 \
13457 /usr/contrib/X11R5 \
13462 ${cf_x_athena_root} \
13463 ${cf_x_athena_root}7 \
13464 ${cf_x_athena_root}6
13467 "-l$cf_lib -lXmu" \
13468 "-l$cf_lib -lXpm -lXmu" \
13469 "-l${cf_lib}_s -lXmu_s"
13471 if test -z "$cf_x_athena_lib" ; then
13473 cf_test=XawSimpleMenuAddGlobalActions
13474 if test $cf_path != default ; then
13476 cf_add_libs="-L$cf_path/lib $cf_libs"
13477 # Filter out duplicates - this happens with badly-designed ".pc" files...
13478 for cf_add_1lib in $LIBS
13480 for cf_add_2lib in $cf_add_libs
13482 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13488 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13490 LIBS="$cf_add_libs"
13492 echo "$as_me:13492: checking for $cf_libs in $cf_path" >&5
13493 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13496 cf_add_libs="$cf_libs"
13497 # Filter out duplicates - this happens with badly-designed ".pc" files...
13498 for cf_add_1lib in $LIBS
13500 for cf_add_2lib in $cf_add_libs
13502 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13508 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13510 LIBS="$cf_add_libs"
13512 echo "$as_me:13512: checking for $cf_test in $cf_libs" >&5
13513 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13515 cat >conftest.$ac_ext <<_ACEOF
13516 #line 13516 "configure"
13517 #include "confdefs.h"
13519 #include <X11/Intrinsic.h>
13520 #include <X11/$cf_x_athena_root/SimpleMenu.h>
13526 $cf_test((XtAppContext) 0)
13531 rm -f conftest.$ac_objext conftest$ac_exeext
13532 if { (eval echo "$as_me:13532: \"$ac_link\"") >&5
13533 (eval $ac_link) 2>&5
13535 echo "$as_me:13535: \$? = $ac_status" >&5
13536 (exit $ac_status); } &&
13537 { ac_try='test -s conftest$ac_exeext'
13538 { (eval echo "$as_me:13538: \"$ac_try\"") >&5
13539 (eval $ac_try) 2>&5
13541 echo "$as_me:13541: \$? = $ac_status" >&5
13542 (exit $ac_status); }; }; then
13545 echo "$as_me: failed program was:" >&5
13546 cat conftest.$ac_ext >&5
13549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13550 echo "$as_me:13550: result: $cf_result" >&5
13551 echo "${ECHO_T}$cf_result" >&6
13552 if test "$cf_result" = yes ; then
13553 cf_x_athena_lib="$cf_libs"
13559 test -n "$cf_x_athena_lib" && break
13563 if test -z "$cf_x_athena_lib" ; then
13564 { { echo "$as_me:13564: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13565 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13566 { (exit 1); exit 1; }; }
13569 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13571 cat >>confdefs.h <<EOF
13572 #define $cf_x_athena_LIBS 1
13577 if test -n "$ac_tool_prefix"; then
13578 for ac_prog in xcurses-config
13580 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13581 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13582 echo "$as_me:13582: checking for $ac_word" >&5
13583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13584 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
13585 echo $ECHO_N "(cached) $ECHO_C" >&6
13587 if test -n "$XCURSES_CONFIG"; then
13588 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
13590 ac_save_IFS=$IFS; IFS=$ac_path_separator
13592 for ac_dir in $ac_dummy; do
13594 test -z "$ac_dir" && ac_dir=.
13595 $as_executable_p "$ac_dir/$ac_word" || continue
13596 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
13597 echo "$as_me:13597: found $ac_dir/$ac_word" >&5
13603 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
13604 if test -n "$XCURSES_CONFIG"; then
13605 echo "$as_me:13605: result: $XCURSES_CONFIG" >&5
13606 echo "${ECHO_T}$XCURSES_CONFIG" >&6
13608 echo "$as_me:13608: result: no" >&5
13609 echo "${ECHO_T}no" >&6
13612 test -n "$XCURSES_CONFIG" && break
13615 if test -z "$XCURSES_CONFIG"; then
13616 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
13617 for ac_prog in xcurses-config
13619 # Extract the first word of "$ac_prog", so it can be a program name with args.
13620 set dummy $ac_prog; ac_word=$2
13621 echo "$as_me:13621: checking for $ac_word" >&5
13622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13623 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
13624 echo $ECHO_N "(cached) $ECHO_C" >&6
13626 if test -n "$ac_ct_XCURSES_CONFIG"; then
13627 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
13629 ac_save_IFS=$IFS; IFS=$ac_path_separator
13631 for ac_dir in $ac_dummy; do
13633 test -z "$ac_dir" && ac_dir=.
13634 $as_executable_p "$ac_dir/$ac_word" || continue
13635 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
13636 echo "$as_me:13636: found $ac_dir/$ac_word" >&5
13642 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
13643 if test -n "$ac_ct_XCURSES_CONFIG"; then
13644 echo "$as_me:13644: result: $ac_ct_XCURSES_CONFIG" >&5
13645 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
13647 echo "$as_me:13647: result: no" >&5
13648 echo "${ECHO_T}no" >&6
13651 test -n "$ac_ct_XCURSES_CONFIG" && break
13653 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
13655 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
13658 if test "$XCURSES_CONFIG" != none ; then
13660 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
13662 cf_add_libs="`$XCURSES_CONFIG --libs`"
13663 # Filter out duplicates - this happens with badly-designed ".pc" files...
13664 for cf_add_1lib in $LIBS
13666 for cf_add_2lib in $cf_add_libs
13668 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13674 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13676 LIBS="$cf_add_libs"
13678 cf_cv_lib_XCurses=yes
13682 LDFLAGS="$LDFLAGS $X_LIBS"
13684 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13686 echo "${as_me:-configure}:13686: testing checking additions to CFLAGS ..." 1>&5
13688 cf_check_cflags="$CFLAGS"
13689 cf_check_cppflags="$CPPFLAGS"
13694 cf_new_extra_cppflags=
13696 for cf_add_cflags in $X_CFLAGS
13698 case $cf_fix_cppflags in
13700 case $cf_add_cflags in
13701 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13702 case $cf_add_cflags in
13704 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13706 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13707 && test -z "${cf_tst_cflags}" \
13708 && cf_fix_cppflags=yes
13710 if test $cf_fix_cppflags = yes ; then
13712 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13713 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13716 elif test "${cf_tst_cflags}" = "\"'" ; then
13718 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13719 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13725 case "$CPPFLAGS" in
13729 case $cf_add_cflags in
13731 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13733 CPPFLAGS=`echo "$CPPFLAGS" | \
13734 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13735 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13740 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13741 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13748 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13749 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13759 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13761 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13762 && test -z "${cf_tst_cflags}" \
13763 && cf_fix_cppflags=no
13768 if test -n "$cf_new_cflags" ; then
13769 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13771 echo "${as_me:-configure}:13771: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13773 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13774 CFLAGS="${CFLAGS}$cf_new_cflags"
13778 if test -n "$cf_new_cppflags" ; then
13779 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13781 echo "${as_me:-configure}:13781: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13783 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13784 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13788 if test -n "$cf_new_extra_cppflags" ; then
13789 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13791 echo "${as_me:-configure}:13791: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13793 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13794 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13798 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13799 cat >conftest.$ac_ext <<_ACEOF
13800 #line 13800 "configure"
13801 #include "confdefs.h"
13806 printf("Hello world");
13811 rm -f conftest.$ac_objext conftest$ac_exeext
13812 if { (eval echo "$as_me:13812: \"$ac_link\"") >&5
13813 (eval $ac_link) 2>&5
13815 echo "$as_me:13815: \$? = $ac_status" >&5
13816 (exit $ac_status); } &&
13817 { ac_try='test -s conftest$ac_exeext'
13818 { (eval echo "$as_me:13818: \"$ac_try\"") >&5
13819 (eval $ac_try) 2>&5
13821 echo "$as_me:13821: \$? = $ac_status" >&5
13822 (exit $ac_status); }; }; then
13825 echo "$as_me: failed program was:" >&5
13826 cat conftest.$ac_ext >&5
13827 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13829 echo "${as_me:-configure}:13829: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13831 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13832 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13834 echo "${as_me:-configure}:13834: testing but keeping change to \$CPPFLAGS ..." 1>&5
13837 CFLAGS="$cf_check_flags"
13839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13842 echo "$as_me:13842: checking for XOpenDisplay in -lX11" >&5
13843 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13844 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13845 echo $ECHO_N "(cached) $ECHO_C" >&6
13847 ac_check_lib_save_LIBS=$LIBS
13848 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13849 cat >conftest.$ac_ext <<_ACEOF
13850 #line 13850 "configure"
13851 #include "confdefs.h"
13853 /* Override any gcc2 internal prototype to avoid an error. */
13857 /* We use char because int might match the return type of a gcc2
13858 builtin and then its argument prototype would still apply. */
13859 char XOpenDisplay ();
13868 rm -f conftest.$ac_objext conftest$ac_exeext
13869 if { (eval echo "$as_me:13869: \"$ac_link\"") >&5
13870 (eval $ac_link) 2>&5
13872 echo "$as_me:13872: \$? = $ac_status" >&5
13873 (exit $ac_status); } &&
13874 { ac_try='test -s conftest$ac_exeext'
13875 { (eval echo "$as_me:13875: \"$ac_try\"") >&5
13876 (eval $ac_try) 2>&5
13878 echo "$as_me:13878: \$? = $ac_status" >&5
13879 (exit $ac_status); }; }; then
13880 ac_cv_lib_X11_XOpenDisplay=yes
13882 echo "$as_me: failed program was:" >&5
13883 cat conftest.$ac_ext >&5
13884 ac_cv_lib_X11_XOpenDisplay=no
13886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13887 LIBS=$ac_check_lib_save_LIBS
13889 echo "$as_me:13889: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13890 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13891 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13893 cf_add_libs="-lX11"
13894 # Filter out duplicates - this happens with badly-designed ".pc" files...
13895 for cf_add_1lib in $LIBS
13897 for cf_add_2lib in $cf_add_libs
13899 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13905 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13907 LIBS="$cf_add_libs"
13911 echo "$as_me:13911: checking for XCurses library" >&5
13912 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13913 if test "${cf_cv_lib_XCurses+set}" = set; then
13914 echo $ECHO_N "(cached) $ECHO_C" >&6
13917 cf_add_libs="-lXCurses"
13918 # Filter out duplicates - this happens with badly-designed ".pc" files...
13919 for cf_add_1lib in $LIBS
13921 for cf_add_2lib in $cf_add_libs
13923 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13929 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13931 LIBS="$cf_add_libs"
13933 cat >conftest.$ac_ext <<_ACEOF
13934 #line 13934 "configure"
13935 #include "confdefs.h"
13937 #include <xcurses.h>
13938 char *XCursesProgramName = "test";
13948 rm -f conftest.$ac_objext conftest$ac_exeext
13949 if { (eval echo "$as_me:13949: \"$ac_link\"") >&5
13950 (eval $ac_link) 2>&5
13952 echo "$as_me:13952: \$? = $ac_status" >&5
13953 (exit $ac_status); } &&
13954 { ac_try='test -s conftest$ac_exeext'
13955 { (eval echo "$as_me:13955: \"$ac_try\"") >&5
13956 (eval $ac_try) 2>&5
13958 echo "$as_me:13958: \$? = $ac_status" >&5
13959 (exit $ac_status); }; }; then
13960 cf_cv_lib_XCurses=yes
13962 echo "$as_me: failed program was:" >&5
13963 cat conftest.$ac_ext >&5
13964 cf_cv_lib_XCurses=no
13966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13969 echo "$as_me:13969: result: $cf_cv_lib_XCurses" >&5
13970 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13974 if test $cf_cv_lib_XCurses = yes ; then
13976 cat >>confdefs.h <<\EOF
13980 cat >>confdefs.h <<\EOF
13984 echo "$as_me:13984: checking for xcurses.h" >&5
13985 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13986 if test "${ac_cv_header_xcurses_h+set}" = set; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
13989 cat >conftest.$ac_ext <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 #include <xcurses.h>
13994 if { (eval echo "$as_me:13994: \"$ac_cpp conftest.$ac_ext\"") >&5
13995 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13997 egrep -v '^ *\+' conftest.er1 >conftest.err
13999 cat conftest.err >&5
14000 echo "$as_me:14000: \$? = $ac_status" >&5
14001 (exit $ac_status); } >/dev/null; then
14002 if test -s conftest.err; then
14003 ac_cpp_err=$ac_c_preproc_warn_flag
14010 if test -z "$ac_cpp_err"; then
14011 ac_cv_header_xcurses_h=yes
14013 echo "$as_me: failed program was:" >&5
14014 cat conftest.$ac_ext >&5
14015 ac_cv_header_xcurses_h=no
14017 rm -f conftest.err conftest.$ac_ext
14019 echo "$as_me:14019: result: $ac_cv_header_xcurses_h" >&5
14020 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
14021 if test $ac_cv_header_xcurses_h = yes; then
14023 cat >>confdefs.h <<\EOF
14024 #define HAVE_XCURSES 1
14030 { { echo "$as_me:14030: error: Cannot link with XCurses" >&5
14031 echo "$as_me: error: Cannot link with XCurses" >&2;}
14032 { (exit 1); exit 1; }; }
14037 { { echo "$as_me:14037: error: unexpected screen-value: $cf_cv_screen" >&5
14038 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
14039 { (exit 1); exit 1; }; }
14043 : ${cf_nculib_root:=$cf_cv_screen}
14044 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
14045 echo "$as_me:14045: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
14046 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
14047 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14048 echo $ECHO_N "(cached) $ECHO_C" >&6
14050 ac_check_lib_save_LIBS=$LIBS
14051 LIBS="-l$cf_nculib_root $LIBS"
14052 cat >conftest.$ac_ext <<_ACEOF
14053 #line 14053 "configure"
14054 #include "confdefs.h"
14056 /* Override any gcc2 internal prototype to avoid an error. */
14060 /* We use char because int might match the return type of a gcc2
14061 builtin and then its argument prototype would still apply. */
14062 char _nc_init_pthreads ();
14066 _nc_init_pthreads ();
14071 rm -f conftest.$ac_objext conftest$ac_exeext
14072 if { (eval echo "$as_me:14072: \"$ac_link\"") >&5
14073 (eval $ac_link) 2>&5
14075 echo "$as_me:14075: \$? = $ac_status" >&5
14076 (exit $ac_status); } &&
14077 { ac_try='test -s conftest$ac_exeext'
14078 { (eval echo "$as_me:14078: \"$ac_try\"") >&5
14079 (eval $ac_try) 2>&5
14081 echo "$as_me:14081: \$? = $ac_status" >&5
14082 (exit $ac_status); }; }; then
14083 eval "$as_ac_Lib=yes"
14085 echo "$as_me: failed program was:" >&5
14086 cat conftest.$ac_ext >&5
14087 eval "$as_ac_Lib=no"
14089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14090 LIBS=$ac_check_lib_save_LIBS
14092 echo "$as_me:14092: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14093 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14094 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14095 cf_cv_ncurses_pthreads=yes
14097 cf_cv_ncurses_pthreads=no
14100 if test "$cf_cv_ncurses_pthreads" = yes
14103 cf_add_libs="-lpthread"
14104 # Filter out duplicates - this happens with badly-designed ".pc" files...
14105 for cf_add_1lib in $LIBS
14107 for cf_add_2lib in $cf_add_libs
14109 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14115 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14117 LIBS="$cf_add_libs"
14121 case $cf_cv_screen in
14123 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
14129 case $cf_cv_screen in
14131 cf_default_panel=no
14134 cf_default_tinfo=no
14136 (xcurses|bsdcurses)
14137 cf_default_panel=no
14140 cf_default_tinfo=yes
14143 cf_default_panel=yes
14144 cf_default_form=yes
14145 cf_default_menu=yes
14146 cf_default_tinfo=yes
14147 case $cf_cv_screen in
14149 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
14155 echo "$as_me:14155: checking if you want to check for panel functions" >&5
14156 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
14158 # Check whether --enable-panel or --disable-panel was given.
14159 if test "${enable_panel+set}" = set; then
14160 enableval="$enable_panel"
14161 test "$enableval" != no && enableval=yes
14162 if test "$enableval" != "yes" ; then
14165 cf_enable_panel=$cf_default_panel
14169 cf_enable_panel=$cf_default_panel
14172 echo "$as_me:14172: result: $cf_enable_panel" >&5
14173 echo "${ECHO_T}$cf_enable_panel" >&6
14174 if test $cf_enable_panel = yes
14177 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
14178 echo "$as_me:14178: checking for new_panel in -lpanel$cf_cv_libtype" >&5
14179 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
14180 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14181 echo $ECHO_N "(cached) $ECHO_C" >&6
14183 ac_check_lib_save_LIBS=$LIBS
14184 LIBS="-lpanel$cf_cv_libtype $LIBS"
14185 cat >conftest.$ac_ext <<_ACEOF
14186 #line 14186 "configure"
14187 #include "confdefs.h"
14189 /* Override any gcc2 internal prototype to avoid an error. */
14193 /* We use char because int might match the return type of a gcc2
14194 builtin and then its argument prototype would still apply. */
14204 rm -f conftest.$ac_objext conftest$ac_exeext
14205 if { (eval echo "$as_me:14205: \"$ac_link\"") >&5
14206 (eval $ac_link) 2>&5
14208 echo "$as_me:14208: \$? = $ac_status" >&5
14209 (exit $ac_status); } &&
14210 { ac_try='test -s conftest$ac_exeext'
14211 { (eval echo "$as_me:14211: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14214 echo "$as_me:14214: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
14216 eval "$as_ac_Lib=yes"
14218 echo "$as_me: failed program was:" >&5
14219 cat conftest.$ac_ext >&5
14220 eval "$as_ac_Lib=no"
14222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14223 LIBS=$ac_check_lib_save_LIBS
14225 echo "$as_me:14225: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14226 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14227 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14229 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14231 cf_add_libs="-lpanel$cf_cv_libtype"
14232 # Filter out duplicates - this happens with badly-designed ".pc" files...
14233 for cf_add_1lib in $LIBS
14235 for cf_add_2lib in $cf_add_libs
14237 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14243 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14245 LIBS="$cf_add_libs"
14247 cat >>confdefs.h <<EOF
14248 #define $cf_upper 1
14253 cf_curses_headers="$cf_curses_headers panel.h"
14256 echo "$as_me:14256: checking if you want to check for menu functions" >&5
14257 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
14259 # Check whether --enable-menu or --disable-menu was given.
14260 if test "${enable_menu+set}" = set; then
14261 enableval="$enable_menu"
14262 test "$enableval" != no && enableval=yes
14263 if test "$enableval" != "yes" ; then
14266 cf_enable_menu=$cf_default_menu
14270 cf_enable_menu=$cf_default_menu
14273 echo "$as_me:14273: result: $cf_enable_menu" >&5
14274 echo "${ECHO_T}$cf_enable_menu" >&6
14275 if test $cf_enable_menu = yes
14277 case $cf_cv_screen in
14282 echo "$as_me:14282: checking for NetBSD menu.h" >&5
14283 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
14284 if test "${cf_cv_netbsd_menu_h+set}" = set; then
14285 echo $ECHO_N "(cached) $ECHO_C" >&6
14288 cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14292 #include <${cf_cv_ncurses_header:-curses.h}>
14300 int y = menu->max_item_width;
14306 rm -f conftest.$ac_objext
14307 if { (eval echo "$as_me:14307: \"$ac_compile\"") >&5
14308 (eval $ac_compile) 2>&5
14310 echo "$as_me:14310: \$? = $ac_status" >&5
14311 (exit $ac_status); } &&
14312 { ac_try='test -s conftest.$ac_objext'
14313 { (eval echo "$as_me:14313: \"$ac_try\"") >&5
14314 (eval $ac_try) 2>&5
14316 echo "$as_me:14316: \$? = $ac_status" >&5
14317 (exit $ac_status); }; }; then
14318 cf_cv_netbsd_menu_h=yes
14321 echo "$as_me: failed program was:" >&5
14322 cat conftest.$ac_ext >&5
14323 cf_cv_netbsd_menu_h=no
14325 rm -f conftest.$ac_objext conftest.$ac_ext
14328 echo "$as_me:14328: result: $cf_cv_netbsd_menu_h" >&5
14329 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
14331 test "$cf_cv_netbsd_menu_h" = yes &&
14332 cat >>confdefs.h <<\EOF
14333 #define HAVE_NETBSD_MENU_H 1
14339 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
14340 echo "$as_me:14340: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
14341 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
14342 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14343 echo $ECHO_N "(cached) $ECHO_C" >&6
14345 ac_check_lib_save_LIBS=$LIBS
14346 LIBS="-lmenu$cf_cv_libtype $LIBS"
14347 cat >conftest.$ac_ext <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14351 /* Override any gcc2 internal prototype to avoid an error. */
14355 /* We use char because int might match the return type of a gcc2
14356 builtin and then its argument prototype would still apply. */
14357 char menu_driver ();
14366 rm -f conftest.$ac_objext conftest$ac_exeext
14367 if { (eval echo "$as_me:14367: \"$ac_link\"") >&5
14368 (eval $ac_link) 2>&5
14370 echo "$as_me:14370: \$? = $ac_status" >&5
14371 (exit $ac_status); } &&
14372 { ac_try='test -s conftest$ac_exeext'
14373 { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374 (eval $ac_try) 2>&5
14376 echo "$as_me:14376: \$? = $ac_status" >&5
14377 (exit $ac_status); }; }; then
14378 eval "$as_ac_Lib=yes"
14380 echo "$as_me: failed program was:" >&5
14381 cat conftest.$ac_ext >&5
14382 eval "$as_ac_Lib=no"
14384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14385 LIBS=$ac_check_lib_save_LIBS
14387 echo "$as_me:14387: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14388 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14389 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14391 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14393 cf_add_libs="-lmenu$cf_cv_libtype"
14394 # Filter out duplicates - this happens with badly-designed ".pc" files...
14395 for cf_add_1lib in $LIBS
14397 for cf_add_2lib in $cf_add_libs
14399 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14405 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14407 LIBS="$cf_add_libs"
14409 cat >>confdefs.h <<EOF
14410 #define $cf_upper 1
14415 cf_curses_headers="$cf_curses_headers menu.h"
14418 echo "$as_me:14418: checking if you want to check for form functions" >&5
14419 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
14421 # Check whether --enable-form or --disable-form was given.
14422 if test "${enable_form+set}" = set; then
14423 enableval="$enable_form"
14424 test "$enableval" != no && enableval=yes
14425 if test "$enableval" != "yes" ; then
14428 cf_enable_form=$cf_default_form
14432 cf_enable_form=$cf_default_form
14435 echo "$as_me:14435: result: $cf_enable_form" >&5
14436 echo "${ECHO_T}$cf_enable_form" >&6
14437 if test $cf_enable_form = yes
14439 case $cf_cv_screen in
14444 echo "$as_me:14444: checking for NetBSD form.h" >&5
14445 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
14446 if test "${cf_cv_netbsd_form_h+set}" = set; then
14447 echo $ECHO_N "(cached) $ECHO_C" >&6
14450 cat >conftest.$ac_ext <<_ACEOF
14451 #line 14451 "configure"
14452 #include "confdefs.h"
14454 #include <${cf_cv_ncurses_header:-curses.h}>
14462 int y = current_field(form)->cursor_ypos;
14463 int x = current_field(form)->cursor_xpos;
14469 rm -f conftest.$ac_objext
14470 if { (eval echo "$as_me:14470: \"$ac_compile\"") >&5
14471 (eval $ac_compile) 2>&5
14473 echo "$as_me:14473: \$? = $ac_status" >&5
14474 (exit $ac_status); } &&
14475 { ac_try='test -s conftest.$ac_objext'
14476 { (eval echo "$as_me:14476: \"$ac_try\"") >&5
14477 (eval $ac_try) 2>&5
14479 echo "$as_me:14479: \$? = $ac_status" >&5
14480 (exit $ac_status); }; }; then
14481 cf_cv_netbsd_form_h=yes
14484 echo "$as_me: failed program was:" >&5
14485 cat conftest.$ac_ext >&5
14486 cf_cv_netbsd_form_h=no
14488 rm -f conftest.$ac_objext conftest.$ac_ext
14491 echo "$as_me:14491: result: $cf_cv_netbsd_form_h" >&5
14492 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
14494 test "$cf_cv_netbsd_form_h" = yes &&
14495 cat >>confdefs.h <<\EOF
14496 #define HAVE_NETBSD_FORM_H 1
14502 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
14503 echo "$as_me:14503: checking for form_driver in -lform$cf_cv_libtype" >&5
14504 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
14505 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14506 echo $ECHO_N "(cached) $ECHO_C" >&6
14508 ac_check_lib_save_LIBS=$LIBS
14509 LIBS="-lform$cf_cv_libtype $LIBS"
14510 cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14514 /* Override any gcc2 internal prototype to avoid an error. */
14518 /* We use char because int might match the return type of a gcc2
14519 builtin and then its argument prototype would still apply. */
14520 char form_driver ();
14529 rm -f conftest.$ac_objext conftest$ac_exeext
14530 if { (eval echo "$as_me:14530: \"$ac_link\"") >&5
14531 (eval $ac_link) 2>&5
14533 echo "$as_me:14533: \$? = $ac_status" >&5
14534 (exit $ac_status); } &&
14535 { ac_try='test -s conftest$ac_exeext'
14536 { (eval echo "$as_me:14536: \"$ac_try\"") >&5
14537 (eval $ac_try) 2>&5
14539 echo "$as_me:14539: \$? = $ac_status" >&5
14540 (exit $ac_status); }; }; then
14541 eval "$as_ac_Lib=yes"
14543 echo "$as_me: failed program was:" >&5
14544 cat conftest.$ac_ext >&5
14545 eval "$as_ac_Lib=no"
14547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14548 LIBS=$ac_check_lib_save_LIBS
14550 echo "$as_me:14550: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14551 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14552 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14554 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14556 cf_add_libs="-lform$cf_cv_libtype"
14557 # Filter out duplicates - this happens with badly-designed ".pc" files...
14558 for cf_add_1lib in $LIBS
14560 for cf_add_2lib in $cf_add_libs
14562 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14568 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14570 LIBS="$cf_add_libs"
14572 cat >>confdefs.h <<EOF
14573 #define $cf_upper 1
14578 cf_curses_headers="$cf_curses_headers form.h"
14581 # look for curses-related headers
14583 for ac_header in $cf_curses_headers
14585 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14586 echo "$as_me:14586: checking for $ac_header" >&5
14587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14589 echo $ECHO_N "(cached) $ECHO_C" >&6
14591 cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594 #include <$ac_header>
14596 if { (eval echo "$as_me:14596: \"$ac_cpp conftest.$ac_ext\"") >&5
14597 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14599 egrep -v '^ *\+' conftest.er1 >conftest.err
14601 cat conftest.err >&5
14602 echo "$as_me:14602: \$? = $ac_status" >&5
14603 (exit $ac_status); } >/dev/null; then
14604 if test -s conftest.err; then
14605 ac_cpp_err=$ac_c_preproc_warn_flag
14612 if test -z "$ac_cpp_err"; then
14613 eval "$as_ac_Header=yes"
14615 echo "$as_me: failed program was:" >&5
14616 cat conftest.$ac_ext >&5
14617 eval "$as_ac_Header=no"
14619 rm -f conftest.err conftest.$ac_ext
14621 echo "$as_me:14621: result: `eval echo '${'$as_ac_Header'}'`" >&5
14622 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14623 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14624 cat >>confdefs.h <<EOF
14625 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14631 echo "$as_me:14631: checking for ANSI C header files" >&5
14632 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14633 if test "${ac_cv_header_stdc+set}" = set; then
14634 echo $ECHO_N "(cached) $ECHO_C" >&6
14636 cat >conftest.$ac_ext <<_ACEOF
14637 #line 14637 "configure"
14638 #include "confdefs.h"
14639 #include <stdlib.h>
14640 #include <stdarg.h>
14641 #include <string.h>
14645 if { (eval echo "$as_me:14645: \"$ac_cpp conftest.$ac_ext\"") >&5
14646 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14648 egrep -v '^ *\+' conftest.er1 >conftest.err
14650 cat conftest.err >&5
14651 echo "$as_me:14651: \$? = $ac_status" >&5
14652 (exit $ac_status); } >/dev/null; then
14653 if test -s conftest.err; then
14654 ac_cpp_err=$ac_c_preproc_warn_flag
14661 if test -z "$ac_cpp_err"; then
14662 ac_cv_header_stdc=yes
14664 echo "$as_me: failed program was:" >&5
14665 cat conftest.$ac_ext >&5
14666 ac_cv_header_stdc=no
14668 rm -f conftest.err conftest.$ac_ext
14670 if test $ac_cv_header_stdc = yes; then
14671 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14672 cat >conftest.$ac_ext <<_ACEOF
14673 #line 14673 "configure"
14674 #include "confdefs.h"
14675 #include <string.h>
14678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14679 egrep "memchr" >/dev/null 2>&1; then
14682 ac_cv_header_stdc=no
14688 if test $ac_cv_header_stdc = yes; then
14689 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14690 cat >conftest.$ac_ext <<_ACEOF
14691 #line 14691 "configure"
14692 #include "confdefs.h"
14693 #include <stdlib.h>
14696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14697 egrep "free" >/dev/null 2>&1; then
14700 ac_cv_header_stdc=no
14706 if test $ac_cv_header_stdc = yes; then
14707 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14708 if test "$cross_compiling" = yes; then
14711 cat >conftest.$ac_ext <<_ACEOF
14712 #line 14712 "configure"
14713 #include "confdefs.h"
14715 #if ((' ' & 0x0FF) == 0x020)
14716 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14717 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14719 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14720 || ('j' <= (c) && (c) <= 'r') \
14721 || ('s' <= (c) && (c) <= 'z'))
14722 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14725 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14730 for (i = 0; i < 256; i++)
14731 if (XOR (islower (i), ISLOWER (i))
14732 || toupper (i) != TOUPPER (i))
14733 $ac_main_return(2);
14734 $ac_main_return (0);
14737 rm -f conftest$ac_exeext
14738 if { (eval echo "$as_me:14738: \"$ac_link\"") >&5
14739 (eval $ac_link) 2>&5
14741 echo "$as_me:14741: \$? = $ac_status" >&5
14742 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14743 { (eval echo "$as_me:14743: \"$ac_try\"") >&5
14744 (eval $ac_try) 2>&5
14746 echo "$as_me:14746: \$? = $ac_status" >&5
14747 (exit $ac_status); }; }; then
14750 echo "$as_me: program exited with status $ac_status" >&5
14751 echo "$as_me: failed program was:" >&5
14752 cat conftest.$ac_ext >&5
14753 ac_cv_header_stdc=no
14755 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14759 echo "$as_me:14759: result: $ac_cv_header_stdc" >&5
14760 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14761 if test $ac_cv_header_stdc = yes; then
14763 cat >>confdefs.h <<\EOF
14764 #define STDC_HEADERS 1
14769 echo "$as_me:14769: checking whether time.h and sys/time.h may both be included" >&5
14770 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14771 if test "${ac_cv_header_time+set}" = set; then
14772 echo $ECHO_N "(cached) $ECHO_C" >&6
14774 cat >conftest.$ac_ext <<_ACEOF
14775 #line 14775 "configure"
14776 #include "confdefs.h"
14777 #include <sys/types.h>
14778 #include <sys/time.h>
14784 if ((struct tm *) 0)
14790 rm -f conftest.$ac_objext
14791 if { (eval echo "$as_me:14791: \"$ac_compile\"") >&5
14792 (eval $ac_compile) 2>&5
14794 echo "$as_me:14794: \$? = $ac_status" >&5
14795 (exit $ac_status); } &&
14796 { ac_try='test -s conftest.$ac_objext'
14797 { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14800 echo "$as_me:14800: \$? = $ac_status" >&5
14801 (exit $ac_status); }; }; then
14802 ac_cv_header_time=yes
14804 echo "$as_me: failed program was:" >&5
14805 cat conftest.$ac_ext >&5
14806 ac_cv_header_time=no
14808 rm -f conftest.$ac_objext conftest.$ac_ext
14810 echo "$as_me:14810: result: $ac_cv_header_time" >&5
14811 echo "${ECHO_T}$ac_cv_header_time" >&6
14812 if test $ac_cv_header_time = yes; then
14814 cat >>confdefs.h <<\EOF
14815 #define TIME_WITH_SYS_TIME 1
14833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14834 echo "$as_me:14834: checking for $ac_header" >&5
14835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14837 echo $ECHO_N "(cached) $ECHO_C" >&6
14839 cat >conftest.$ac_ext <<_ACEOF
14840 #line 14840 "configure"
14841 #include "confdefs.h"
14842 #include <$ac_header>
14844 if { (eval echo "$as_me:14844: \"$ac_cpp conftest.$ac_ext\"") >&5
14845 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14847 egrep -v '^ *\+' conftest.er1 >conftest.err
14849 cat conftest.err >&5
14850 echo "$as_me:14850: \$? = $ac_status" >&5
14851 (exit $ac_status); } >/dev/null; then
14852 if test -s conftest.err; then
14853 ac_cpp_err=$ac_c_preproc_warn_flag
14860 if test -z "$ac_cpp_err"; then
14861 eval "$as_ac_Header=yes"
14863 echo "$as_me: failed program was:" >&5
14864 cat conftest.$ac_ext >&5
14865 eval "$as_ac_Header=no"
14867 rm -f conftest.err conftest.$ac_ext
14869 echo "$as_me:14869: result: `eval echo '${'$as_ac_Header'}'`" >&5
14870 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14872 cat >>confdefs.h <<EOF
14873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14879 for ac_header in unistd.h getopt.h
14881 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14882 echo "$as_me:14882: checking for $ac_header" >&5
14883 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14884 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14885 echo $ECHO_N "(cached) $ECHO_C" >&6
14887 cat >conftest.$ac_ext <<_ACEOF
14888 #line 14888 "configure"
14889 #include "confdefs.h"
14890 #include <$ac_header>
14892 if { (eval echo "$as_me:14892: \"$ac_cpp conftest.$ac_ext\"") >&5
14893 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14895 egrep -v '^ *\+' conftest.er1 >conftest.err
14897 cat conftest.err >&5
14898 echo "$as_me:14898: \$? = $ac_status" >&5
14899 (exit $ac_status); } >/dev/null; then
14900 if test -s conftest.err; then
14901 ac_cpp_err=$ac_c_preproc_warn_flag
14908 if test -z "$ac_cpp_err"; then
14909 eval "$as_ac_Header=yes"
14911 echo "$as_me: failed program was:" >&5
14912 cat conftest.$ac_ext >&5
14913 eval "$as_ac_Header=no"
14915 rm -f conftest.err conftest.$ac_ext
14917 echo "$as_me:14917: result: `eval echo '${'$as_ac_Header'}'`" >&5
14918 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14919 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14920 cat >>confdefs.h <<EOF
14921 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14927 echo "$as_me:14927: checking for header declaring getopt variables" >&5
14928 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14929 if test "${cf_cv_getopt_header+set}" = set; then
14930 echo $ECHO_N "(cached) $ECHO_C" >&6
14933 cf_cv_getopt_header=none
14934 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14936 cat >conftest.$ac_ext <<_ACEOF
14937 #line 14937 "configure"
14938 #include "confdefs.h"
14940 #include <$cf_header>
14944 int x = optind; char *y = optarg
14949 rm -f conftest.$ac_objext
14950 if { (eval echo "$as_me:14950: \"$ac_compile\"") >&5
14951 (eval $ac_compile) 2>&5
14953 echo "$as_me:14953: \$? = $ac_status" >&5
14954 (exit $ac_status); } &&
14955 { ac_try='test -s conftest.$ac_objext'
14956 { (eval echo "$as_me:14956: \"$ac_try\"") >&5
14957 (eval $ac_try) 2>&5
14959 echo "$as_me:14959: \$? = $ac_status" >&5
14960 (exit $ac_status); }; }; then
14961 cf_cv_getopt_header=$cf_header
14964 echo "$as_me: failed program was:" >&5
14965 cat conftest.$ac_ext >&5
14967 rm -f conftest.$ac_objext conftest.$ac_ext
14971 echo "$as_me:14971: result: $cf_cv_getopt_header" >&5
14972 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14973 if test $cf_cv_getopt_header != none ; then
14975 cat >>confdefs.h <<\EOF
14976 #define HAVE_GETOPT_HEADER 1
14980 if test $cf_cv_getopt_header = getopt.h ; then
14982 cat >>confdefs.h <<\EOF
14983 #define NEED_GETOPT_H 1
14995 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14996 echo "$as_me:14996: checking for $ac_func" >&5
14997 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14998 if eval "test \"\${$as_ac_var+set}\" = set"; then
14999 echo $ECHO_N "(cached) $ECHO_C" >&6
15001 cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 /* System header to define __stub macros and hopefully few prototypes,
15005 which can conflict with char $ac_func (); below. */
15006 #include <assert.h>
15007 /* Override any gcc2 internal prototype to avoid an error. */
15011 /* We use char because int might match the return type of a gcc2
15012 builtin and then its argument prototype would still apply. */
15019 /* The GNU C library defines this for functions which it implements
15020 to always fail with ENOSYS. Some functions are actually named
15021 something starting with __ and the normal name is an alias. */
15022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15025 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15032 rm -f conftest.$ac_objext conftest$ac_exeext
15033 if { (eval echo "$as_me:15033: \"$ac_link\"") >&5
15034 (eval $ac_link) 2>&5
15036 echo "$as_me:15036: \$? = $ac_status" >&5
15037 (exit $ac_status); } &&
15038 { ac_try='test -s conftest$ac_exeext'
15039 { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040 (eval $ac_try) 2>&5
15042 echo "$as_me:15042: \$? = $ac_status" >&5
15043 (exit $ac_status); }; }; then
15044 eval "$as_ac_var=yes"
15046 echo "$as_me: failed program was:" >&5
15047 cat conftest.$ac_ext >&5
15048 eval "$as_ac_var=no"
15050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15052 echo "$as_me:15052: result: `eval echo '${'$as_ac_var'}'`" >&5
15053 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15054 if test `eval echo '${'$as_ac_var'}'` = yes; then
15055 cat >>confdefs.h <<EOF
15056 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15062 if test "x$ac_cv_func_getopt" = xno; then
15063 { { echo "$as_me:15063: error: getopt is required for building programs" >&5
15064 echo "$as_me: error: getopt is required for building programs" >&2;}
15065 { (exit 1); exit 1; }; }
15068 if test "$cf_enable_widec" = yes; then
15081 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15082 echo "$as_me:15082: checking for $ac_func" >&5
15083 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15084 if eval "test \"\${$as_ac_var+set}\" = set"; then
15085 echo $ECHO_N "(cached) $ECHO_C" >&6
15087 cat >conftest.$ac_ext <<_ACEOF
15088 #line 15088 "configure"
15089 #include "confdefs.h"
15090 /* System header to define __stub macros and hopefully few prototypes,
15091 which can conflict with char $ac_func (); below. */
15092 #include <assert.h>
15093 /* Override any gcc2 internal prototype to avoid an error. */
15097 /* We use char because int might match the return type of a gcc2
15098 builtin and then its argument prototype would still apply. */
15105 /* The GNU C library defines this for functions which it implements
15106 to always fail with ENOSYS. Some functions are actually named
15107 something starting with __ and the normal name is an alias. */
15108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15111 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15118 rm -f conftest.$ac_objext conftest$ac_exeext
15119 if { (eval echo "$as_me:15119: \"$ac_link\"") >&5
15120 (eval $ac_link) 2>&5
15122 echo "$as_me:15122: \$? = $ac_status" >&5
15123 (exit $ac_status); } &&
15124 { ac_try='test -s conftest$ac_exeext'
15125 { (eval echo "$as_me:15125: \"$ac_try\"") >&5
15126 (eval $ac_try) 2>&5
15128 echo "$as_me:15128: \$? = $ac_status" >&5
15129 (exit $ac_status); }; }; then
15130 eval "$as_ac_var=yes"
15132 echo "$as_me: failed program was:" >&5
15133 cat conftest.$ac_ext >&5
15134 eval "$as_ac_var=no"
15136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15138 echo "$as_me:15138: result: `eval echo '${'$as_ac_var'}'`" >&5
15139 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15140 if test `eval echo '${'$as_ac_var'}'` = yes; then
15141 cat >>confdefs.h <<EOF
15142 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15150 echo "$as_me:15150: checking definition to turn on extended curses functions" >&5
15151 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
15152 if test "${cf_cv_need_xopen_extension+set}" = set; then
15153 echo $ECHO_N "(cached) $ECHO_C" >&6
15156 cf_cv_need_xopen_extension=unknown
15157 cat >conftest.$ac_ext <<_ACEOF
15158 #line 15158 "configure"
15159 #include "confdefs.h"
15161 #include <stdlib.h>
15162 #include <${cf_cv_ncurses_header:-curses.h}>
15167 #if defined(NCURSES_VERSION_PATCH)
15168 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
15172 #ifdef NCURSES_VERSION
15174 int check2 = curs_set((int)sizeof(check));
15176 long x = winnstr(stdscr, "", 0);
15178 getbegyx(stdscr, y1, x1)
15183 rm -f conftest.$ac_objext conftest$ac_exeext
15184 if { (eval echo "$as_me:15184: \"$ac_link\"") >&5
15185 (eval $ac_link) 2>&5
15187 echo "$as_me:15187: \$? = $ac_status" >&5
15188 (exit $ac_status); } &&
15189 { ac_try='test -s conftest$ac_exeext'
15190 { (eval echo "$as_me:15190: \"$ac_try\"") >&5
15191 (eval $ac_try) 2>&5
15193 echo "$as_me:15193: \$? = $ac_status" >&5
15194 (exit $ac_status); }; }; then
15195 cf_cv_need_xopen_extension=none
15197 echo "$as_me: failed program was:" >&5
15198 cat conftest.$ac_ext >&5
15200 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
15202 cat >conftest.$ac_ext <<_ACEOF
15203 #line 15203 "configure"
15204 #include "confdefs.h"
15206 #define $cf_try_xopen_extension 1
15207 #include <stdlib.h>
15208 #include <${cf_cv_ncurses_header:-curses.h}>
15213 #ifdef NCURSES_VERSION
15215 int check2 = curs_set((int)sizeof(check));
15217 long x = winnstr(stdscr, "", 0);
15219 getbegyx(stdscr, y1, x1)
15224 rm -f conftest.$ac_objext conftest$ac_exeext
15225 if { (eval echo "$as_me:15225: \"$ac_link\"") >&5
15226 (eval $ac_link) 2>&5
15228 echo "$as_me:15228: \$? = $ac_status" >&5
15229 (exit $ac_status); } &&
15230 { ac_try='test -s conftest$ac_exeext'
15231 { (eval echo "$as_me:15231: \"$ac_try\"") >&5
15232 (eval $ac_try) 2>&5
15234 echo "$as_me:15234: \$? = $ac_status" >&5
15235 (exit $ac_status); }; }; then
15236 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
15238 echo "$as_me: failed program was:" >&5
15239 cat conftest.$ac_ext >&5
15241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15248 echo "$as_me:15248: result: $cf_cv_need_xopen_extension" >&5
15249 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
15251 case $cf_cv_need_xopen_extension in
15253 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
15257 echo "$as_me:15257: checking for term.h" >&5
15258 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
15259 if test "${cf_cv_term_header+set}" = set; then
15260 echo $ECHO_N "(cached) $ECHO_C" >&6
15263 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
15264 # for <term.h> if we do not find the variant.
15266 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
15268 case ${cf_cv_ncurses_header:-curses.h} in
15270 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
15271 cf_header_list="$cf_header_item $cf_header_list"
15275 for cf_header in $cf_header_list
15277 cat >conftest.$ac_ext <<_ACEOF
15278 #line 15278 "configure"
15279 #include "confdefs.h"
15281 #include <${cf_cv_ncurses_header:-curses.h}>
15282 #include <${cf_header}>
15291 rm -f conftest.$ac_objext
15292 if { (eval echo "$as_me:15292: \"$ac_compile\"") >&5
15293 (eval $ac_compile) 2>&5
15295 echo "$as_me:15295: \$? = $ac_status" >&5
15296 (exit $ac_status); } &&
15297 { ac_try='test -s conftest.$ac_objext'
15298 { (eval echo "$as_me:15298: \"$ac_try\"") >&5
15299 (eval $ac_try) 2>&5
15301 echo "$as_me:15301: \$? = $ac_status" >&5
15302 (exit $ac_status); }; }; then
15303 cf_cv_term_header=$cf_header
15306 echo "$as_me: failed program was:" >&5
15307 cat conftest.$ac_ext >&5
15308 cf_cv_term_header=no
15310 rm -f conftest.$ac_objext conftest.$ac_ext
15313 case $cf_cv_term_header in
15315 # If curses is ncurses, some packagers still mess it up by trying to make
15316 # us use GNU termcap. This handles the most common case.
15317 for cf_header in ncurses/term.h ncursesw/term.h
15319 cat >conftest.$ac_ext <<_ACEOF
15320 #line 15320 "configure"
15321 #include "confdefs.h"
15323 #include <${cf_cv_ncurses_header:-curses.h}>
15324 #ifdef NCURSES_VERSION
15325 #include <${cf_header}>
15337 rm -f conftest.$ac_objext
15338 if { (eval echo "$as_me:15338: \"$ac_compile\"") >&5
15339 (eval $ac_compile) 2>&5
15341 echo "$as_me:15341: \$? = $ac_status" >&5
15342 (exit $ac_status); } &&
15343 { ac_try='test -s conftest.$ac_objext'
15344 { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15347 echo "$as_me:15347: \$? = $ac_status" >&5
15348 (exit $ac_status); }; }; then
15349 cf_cv_term_header=$cf_header
15352 echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 cf_cv_term_header=no
15356 rm -f conftest.$ac_objext conftest.$ac_ext
15362 echo "$as_me:15362: result: $cf_cv_term_header" >&5
15363 echo "${ECHO_T}$cf_cv_term_header" >&6
15365 case $cf_cv_term_header in
15368 cat >>confdefs.h <<\EOF
15369 #define HAVE_TERM_H 1
15375 cat >>confdefs.h <<\EOF
15376 #define HAVE_NCURSES_TERM_H 1
15382 cat >>confdefs.h <<\EOF
15383 #define HAVE_NCURSESW_TERM_H 1
15389 echo "$as_me:15389: checking for unctrl.h" >&5
15390 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
15391 if test "${cf_cv_unctrl_header+set}" = set; then
15392 echo $ECHO_N "(cached) $ECHO_C" >&6
15395 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
15396 # for <unctrl.h> if we do not find the variant.
15398 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
15400 case ${cf_cv_ncurses_header:-curses.h} in
15402 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
15403 cf_header_list="$cf_header_item $cf_header_list"
15407 for cf_header in $cf_header_list
15409 cat >conftest.$ac_ext <<_ACEOF
15410 #line 15410 "configure"
15411 #include "confdefs.h"
15413 #include <${cf_cv_ncurses_header:-curses.h}>
15414 #include <${cf_header}>
15423 rm -f conftest.$ac_objext
15424 if { (eval echo "$as_me:15424: \"$ac_compile\"") >&5
15425 (eval $ac_compile) 2>&5
15427 echo "$as_me:15427: \$? = $ac_status" >&5
15428 (exit $ac_status); } &&
15429 { ac_try='test -s conftest.$ac_objext'
15430 { (eval echo "$as_me:15430: \"$ac_try\"") >&5
15431 (eval $ac_try) 2>&5
15433 echo "$as_me:15433: \$? = $ac_status" >&5
15434 (exit $ac_status); }; }; then
15435 cf_cv_unctrl_header=$cf_header
15438 echo "$as_me: failed program was:" >&5
15439 cat conftest.$ac_ext >&5
15440 cf_cv_unctrl_header=no
15442 rm -f conftest.$ac_objext conftest.$ac_ext
15446 echo "$as_me:15446: result: $cf_cv_unctrl_header" >&5
15447 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
15449 case $cf_cv_unctrl_header in
15451 { echo "$as_me:15451: WARNING: unctrl.h header not found" >&5
15452 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
15456 case $cf_cv_unctrl_header in
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_UNCTRL_H 1
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_NCURSES_UNCTRL_H 1
15471 (ncursesw/unctrl.h)
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_NCURSESW_UNCTRL_H 1
15482 assume_default_colors \
15493 init_extended_color \
15512 use_default_colors \
15514 use_extended_names \
15529 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15531 echo "$as_me:15531: checking for ${cf_func}" >&5
15532 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15534 echo "${as_me:-configure}:15534: testing ${cf_func} ..." 1>&5
15536 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15537 echo $ECHO_N "(cached) $ECHO_C" >&6
15540 eval cf_result='$ac_cv_func_'$cf_func
15541 if test ".$cf_result" != ".no"; then
15542 cat >conftest.$ac_ext <<_ACEOF
15543 #line 15543 "configure"
15544 #include "confdefs.h"
15546 #ifdef HAVE_XCURSES
15547 #include <xcurses.h>
15548 char * XCursesProgramName = "test";
15550 #include <${cf_cv_ncurses_header:-curses.h}>
15551 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15552 #include <ncursesw/term.h>
15553 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15554 #include <ncurses/term.h>
15555 #elif defined(HAVE_TERM_H)
15565 long foo = (long)(&${cf_func});
15566 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
15567 if (foo + 1234 > 5678)
15568 ${cf_cv_main_return:-return}(foo);
15575 rm -f conftest.$ac_objext conftest$ac_exeext
15576 if { (eval echo "$as_me:15576: \"$ac_link\"") >&5
15577 (eval $ac_link) 2>&5
15579 echo "$as_me:15579: \$? = $ac_status" >&5
15580 (exit $ac_status); } &&
15581 { ac_try='test -s conftest$ac_exeext'
15582 { (eval echo "$as_me:15582: \"$ac_try\"") >&5
15583 (eval $ac_try) 2>&5
15585 echo "$as_me:15585: \$? = $ac_status" >&5
15586 (exit $ac_status); }; }; then
15589 echo "$as_me: failed program was:" >&5
15590 cat conftest.$ac_ext >&5
15593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15595 eval 'cf_cv_func_'$cf_func'=$cf_result'
15599 # use the computed/retrieved cache-value:
15600 eval 'cf_result=$cf_cv_func_'$cf_func
15601 echo "$as_me:15601: result: $cf_result" >&5
15602 echo "${ECHO_T}$cf_result" >&6
15603 if test $cf_result != no; then
15604 cat >>confdefs.h <<EOF
15605 #define HAVE_${cf_tr_func} 1
15611 for cf_func in tputs
15614 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15616 echo "$as_me:15616: checking for ${cf_func}" >&5
15617 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15619 echo "${as_me:-configure}:15619: testing ${cf_func} ..." 1>&5
15621 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15622 echo $ECHO_N "(cached) $ECHO_C" >&6
15625 eval cf_result='$ac_cv_func_'$cf_func
15626 if test ".$cf_result" != ".no"; then
15627 cat >conftest.$ac_ext <<_ACEOF
15628 #line 15628 "configure"
15629 #include "confdefs.h"
15631 #ifdef HAVE_XCURSES
15632 #include <xcurses.h>
15633 char * XCursesProgramName = "test";
15635 #include <${cf_cv_ncurses_header:-curses.h}>
15636 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15637 #include <ncursesw/term.h>
15638 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15639 #include <ncurses/term.h>
15640 #elif defined(HAVE_TERM_H)
15650 long foo = (long)(&${cf_func});
15651 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
15652 if (foo + 1234 > 5678)
15653 ${cf_cv_main_return:-return}(foo);
15660 rm -f conftest.$ac_objext conftest$ac_exeext
15661 if { (eval echo "$as_me:15661: \"$ac_link\"") >&5
15662 (eval $ac_link) 2>&5
15664 echo "$as_me:15664: \$? = $ac_status" >&5
15665 (exit $ac_status); } &&
15666 { ac_try='test -s conftest$ac_exeext'
15667 { (eval echo "$as_me:15667: \"$ac_try\"") >&5
15668 (eval $ac_try) 2>&5
15670 echo "$as_me:15670: \$? = $ac_status" >&5
15671 (exit $ac_status); }; }; then
15674 echo "$as_me: failed program was:" >&5
15675 cat conftest.$ac_ext >&5
15678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15680 eval 'cf_cv_func_'$cf_func'=$cf_result'
15684 # use the computed/retrieved cache-value:
15685 eval 'cf_result=$cf_cv_func_'$cf_func
15686 echo "$as_me:15686: result: $cf_result" >&5
15687 echo "${ECHO_T}$cf_result" >&6
15688 if test $cf_result != no; then
15689 cat >>confdefs.h <<EOF
15690 #define HAVE_${cf_tr_func} 1
15696 if test x$cf_cv_func_tputs = xyes
15699 for cf_arg in int char
15701 for cf_ret in int void
15703 if test $cf_ret = void
15705 cf_return="/* nothing */"
15707 cf_return="return value"
15709 cat >conftest.$ac_ext <<_ACEOF
15710 #line 15710 "configure"
15711 #include "confdefs.h"
15713 #include <${cf_cv_ncurses_header:-curses.h}>
15714 #include <$cf_cv_term_header>
15716 static $cf_ret outc($cf_arg value) { $cf_return; }
15722 tputs("hello", 0, outc);
15723 ${cf_cv_main_return:-return}(0);
15729 rm -f conftest.$ac_objext
15730 if { (eval echo "$as_me:15730: \"$ac_compile\"") >&5
15731 (eval $ac_compile) 2>&5
15733 echo "$as_me:15733: \$? = $ac_status" >&5
15734 (exit $ac_status); } &&
15735 { ac_try='test -s conftest.$ac_objext'
15736 { (eval echo "$as_me:15736: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15739 echo "$as_me:15739: \$? = $ac_status" >&5
15740 (exit $ac_status); }; }; then
15742 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
15744 echo "${as_me:-configure}:15744: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
15746 cat >>confdefs.h <<EOF
15747 #define TPUTS_ARG $cf_arg
15748 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
15749 #define TPUTS_RETURN(value) $cf_return
15755 echo "$as_me: failed program was:" >&5
15756 cat conftest.$ac_ext >&5
15758 rm -f conftest.$ac_objext conftest.$ac_ext
15760 test $cf_done = yes && break
15764 echo "$as_me:15764: checking for ncurses extended functions" >&5
15765 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
15766 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
15767 echo $ECHO_N "(cached) $ECHO_C" >&6
15770 cat >conftest.$ac_ext <<_ACEOF
15771 #line 15771 "configure"
15772 #include "confdefs.h"
15774 #include <${cf_cv_ncurses_header:-curses.h}>
15779 int x = NCURSES_EXT_FUNCS
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 cf_cv_ncurses_ext_funcs=defined
15799 echo "$as_me: failed program was:" >&5
15800 cat conftest.$ac_ext >&5
15802 cat >conftest.$ac_ext <<_ACEOF
15803 #line 15803 "configure"
15804 #include "confdefs.h"
15806 #include <${cf_cv_ncurses_header:-curses.h}>
15811 (void) assume_default_colors (0, 0);
15812 (void) curses_version ();
15813 (void) define_key (0, 0);
15814 (void) is_term_resized (0, 0);
15815 (void) key_defined (0);
15816 (void) keybound (0, 0);
15817 (void) keyok (0, 0);
15818 (void) resize_term (0, 0);
15819 (void) resizeterm (0, 0);
15820 (void) use_default_colors ();
15821 (void) use_extended_names (0);
15822 (void) wresize (0, 0, 0);
15827 rm -f conftest.$ac_objext conftest$ac_exeext
15828 if { (eval echo "$as_me:15828: \"$ac_link\"") >&5
15829 (eval $ac_link) 2>&5
15831 echo "$as_me:15831: \$? = $ac_status" >&5
15832 (exit $ac_status); } &&
15833 { ac_try='test -s conftest$ac_exeext'
15834 { (eval echo "$as_me:15834: \"$ac_try\"") >&5
15835 (eval $ac_try) 2>&5
15837 echo "$as_me:15837: \$? = $ac_status" >&5
15838 (exit $ac_status); }; }; then
15839 cf_cv_ncurses_ext_funcs=yes
15841 echo "$as_me: failed program was:" >&5
15842 cat conftest.$ac_ext >&5
15843 cf_cv_ncurses_ext_funcs=no
15845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15848 rm -f conftest.$ac_objext conftest.$ac_ext
15851 echo "$as_me:15851: result: $cf_cv_ncurses_ext_funcs" >&5
15852 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
15853 test "$cf_cv_ncurses_ext_funcs" = yes &&
15854 cat >>confdefs.h <<\EOF
15855 #define NCURSES_EXT_FUNCS 1
15858 if test "$cf_enable_widec" = yes
15860 # workaround for systems with ncurses before 20111029, due to change of
15861 # feature test macro from _XPG5 to _XOPEN_SOURCE
15862 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
15865 echo "$as_me:15865: checking if _XPG5 should be defined to enable wide-characters" >&5
15866 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
15868 cat >conftest.$ac_ext <<_ACEOF
15869 #line 15869 "configure"
15870 #include "confdefs.h"
15872 #include <${cf_cv_ncurses_header:-curses.h}>
15881 rm -f conftest.$ac_objext
15882 if { (eval echo "$as_me:15882: \"$ac_compile\"") >&5
15883 (eval $ac_compile) 2>&5
15885 echo "$as_me:15885: \$? = $ac_status" >&5
15886 (exit $ac_status); } &&
15887 { ac_try='test -s conftest.$ac_objext'
15888 { (eval echo "$as_me:15888: \"$ac_try\"") >&5
15889 (eval $ac_try) 2>&5
15891 echo "$as_me:15891: \$? = $ac_status" >&5
15892 (exit $ac_status); }; }; then
15895 echo "$as_me: failed program was:" >&5
15896 cat conftest.$ac_ext >&5
15897 cf_save_cppflags="$CPPFLAGS"
15898 CPPFLAGS="$CPPFLAGS -D_XPG5"
15899 cat >conftest.$ac_ext <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15903 #include <${cf_cv_ncurses_header:-curses.h}>
15912 rm -f conftest.$ac_objext
15913 if { (eval echo "$as_me:15913: \"$ac_compile\"") >&5
15914 (eval $ac_compile) 2>&5
15916 echo "$as_me:15916: \$? = $ac_status" >&5
15917 (exit $ac_status); } &&
15918 { ac_try='test -s conftest.$ac_objext'
15919 { (eval echo "$as_me:15919: \"$ac_try\"") >&5
15920 (eval $ac_try) 2>&5
15922 echo "$as_me:15922: \$? = $ac_status" >&5
15923 (exit $ac_status); }; }; then
15926 echo "$as_me: failed program was:" >&5
15927 cat conftest.$ac_ext >&5
15929 rm -f conftest.$ac_objext conftest.$ac_ext
15930 CPPFLAGS="$cf_save_cppflags"
15932 rm -f conftest.$ac_objext conftest.$ac_ext
15933 echo "$as_me:15933: result: $cf_define_xpg5" >&5
15934 echo "${ECHO_T}$cf_define_xpg5" >&6
15936 if test "$cf_define_xpg5" = yes
15938 CPPFLAGS="$CPPFLAGS -D_XPG5"
15942 echo "$as_me:15942: checking for wide-character functions" >&5
15943 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
15944 if test "${cf_cv_widechar_funcs+set}" = set; then
15945 echo $ECHO_N "(cached) $ECHO_C" >&6
15948 cat >conftest.$ac_ext <<_ACEOF
15949 #line 15949 "configure"
15950 #include "confdefs.h"
15952 #include <${cf_cv_ncurses_header:-curses.h}>
15957 static wchar_t src_wchar[2];
15958 static cchar_t dst_cchar;
15959 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15965 rm -f conftest.$ac_objext conftest$ac_exeext
15966 if { (eval echo "$as_me:15966: \"$ac_link\"") >&5
15967 (eval $ac_link) 2>&5
15969 echo "$as_me:15969: \$? = $ac_status" >&5
15970 (exit $ac_status); } &&
15971 { ac_try='test -s conftest$ac_exeext'
15972 { (eval echo "$as_me:15972: \"$ac_try\"") >&5
15973 (eval $ac_try) 2>&5
15975 echo "$as_me:15975: \$? = $ac_status" >&5
15976 (exit $ac_status); }; }; then
15977 cf_cv_widechar_funcs=yes
15979 echo "$as_me: failed program was:" >&5
15980 cat conftest.$ac_ext >&5
15981 cf_cv_widechar_funcs=no
15983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15986 echo "$as_me:15986: result: $cf_cv_widechar_funcs" >&5
15987 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15988 if test "$cf_cv_widechar_funcs" != no ; then
15990 cat >>confdefs.h <<\EOF
15991 #define USE_WIDEC_SUPPORT 1
15995 cat >>confdefs.h <<\EOF
15996 #define USE_WIDEC_SUPPORT 0
16001 cat >>confdefs.h <<\EOF
16002 #define USE_WIDEC_SUPPORT 0
16007 echo "$as_me:16007: checking if $cf_cv_screen library uses pthreads" >&5
16008 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
16009 if test "${cf_cv_use_pthreads+set}" = set; then
16010 echo $ECHO_N "(cached) $ECHO_C" >&6
16013 cat >conftest.$ac_ext <<_ACEOF
16014 #line 16014 "configure"
16015 #include "confdefs.h"
16017 #include <${cf_cv_ncurses_header:-curses.h}>
16018 extern void _nc_init_pthreads(void);
16025 _nc_init_pthreads();
16031 rm -f conftest.$ac_objext conftest$ac_exeext
16032 if { (eval echo "$as_me:16032: \"$ac_link\"") >&5
16033 (eval $ac_link) 2>&5
16035 echo "$as_me:16035: \$? = $ac_status" >&5
16036 (exit $ac_status); } &&
16037 { ac_try='test -s conftest$ac_exeext'
16038 { (eval echo "$as_me:16038: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16041 echo "$as_me:16041: \$? = $ac_status" >&5
16042 (exit $ac_status); }; }; then
16043 cf_cv_use_pthreads=yes
16045 echo "$as_me: failed program was:" >&5
16046 cat conftest.$ac_ext >&5
16047 cf_cv_use_pthreads=no
16049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16052 echo "$as_me:16052: result: $cf_cv_use_pthreads" >&5
16053 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
16054 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
16055 #define USE_PTHREADS 1
16058 echo "$as_me:16058: checking if sys/time.h works with sys/select.h" >&5
16059 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16060 if test "${cf_cv_sys_time_select+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 <sys/types.h>
16069 #ifdef HAVE_SYS_TIME_H
16070 #include <sys/time.h>
16072 #ifdef HAVE_SYS_SELECT_H
16073 #include <sys/select.h>
16084 rm -f conftest.$ac_objext
16085 if { (eval echo "$as_me:16085: \"$ac_compile\"") >&5
16086 (eval $ac_compile) 2>&5
16088 echo "$as_me:16088: \$? = $ac_status" >&5
16089 (exit $ac_status); } &&
16090 { ac_try='test -s conftest.$ac_objext'
16091 { (eval echo "$as_me:16091: \"$ac_try\"") >&5
16092 (eval $ac_try) 2>&5
16094 echo "$as_me:16094: \$? = $ac_status" >&5
16095 (exit $ac_status); }; }; then
16096 cf_cv_sys_time_select=yes
16098 echo "$as_me: failed program was:" >&5
16099 cat conftest.$ac_ext >&5
16100 cf_cv_sys_time_select=no
16102 rm -f conftest.$ac_objext conftest.$ac_ext
16106 echo "$as_me:16106: result: $cf_cv_sys_time_select" >&5
16107 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16108 test "$cf_cv_sys_time_select" = yes &&
16109 cat >>confdefs.h <<\EOF
16110 #define HAVE_SYS_TIME_SELECT 1
16113 # special check for test/ditto.c
16115 echo "$as_me:16115: checking for openpty in -lutil" >&5
16116 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16117 if test "${ac_cv_lib_util_openpty+set}" = set; then
16118 echo $ECHO_N "(cached) $ECHO_C" >&6
16120 ac_check_lib_save_LIBS=$LIBS
16121 LIBS="-lutil $LIBS"
16122 cat >conftest.$ac_ext <<_ACEOF
16123 #line 16123 "configure"
16124 #include "confdefs.h"
16126 /* Override any gcc2 internal prototype to avoid an error. */
16130 /* We use char because int might match the return type of a gcc2
16131 builtin and then its argument prototype would still apply. */
16141 rm -f conftest.$ac_objext conftest$ac_exeext
16142 if { (eval echo "$as_me:16142: \"$ac_link\"") >&5
16143 (eval $ac_link) 2>&5
16145 echo "$as_me:16145: \$? = $ac_status" >&5
16146 (exit $ac_status); } &&
16147 { ac_try='test -s conftest$ac_exeext'
16148 { (eval echo "$as_me:16148: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16151 echo "$as_me:16151: \$? = $ac_status" >&5
16152 (exit $ac_status); }; }; then
16153 ac_cv_lib_util_openpty=yes
16155 echo "$as_me: failed program was:" >&5
16156 cat conftest.$ac_ext >&5
16157 ac_cv_lib_util_openpty=no
16159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16160 LIBS=$ac_check_lib_save_LIBS
16162 echo "$as_me:16162: result: $ac_cv_lib_util_openpty" >&5
16163 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16164 if test $ac_cv_lib_util_openpty = yes; then
16170 echo "$as_me:16170: checking for openpty header" >&5
16171 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16172 if test "${cf_cv_func_openpty+set}" = set; then
16173 echo $ECHO_N "(cached) $ECHO_C" >&6
16176 cf_save_LIBS="$LIBS"
16177 test $cf_cv_lib_util = yes && {
16178 cf_add_libs="-lutil"
16179 # Filter out duplicates - this happens with badly-designed ".pc" files...
16180 for cf_add_1lib in $LIBS
16182 for cf_add_2lib in $cf_add_libs
16184 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16190 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16192 LIBS="$cf_add_libs"
16194 for cf_header in pty.h libutil.h util.h
16196 cat >conftest.$ac_ext <<_ACEOF
16197 #line 16197 "configure"
16198 #include "confdefs.h"
16200 #include <$cf_header>
16206 int x = openpty((int *)0, (int *)0, (char *)0,
16207 (struct termios *)0, (struct winsize *)0);
16213 rm -f conftest.$ac_objext conftest$ac_exeext
16214 if { (eval echo "$as_me:16214: \"$ac_link\"") >&5
16215 (eval $ac_link) 2>&5
16217 echo "$as_me:16217: \$? = $ac_status" >&5
16218 (exit $ac_status); } &&
16219 { ac_try='test -s conftest$ac_exeext'
16220 { (eval echo "$as_me:16220: \"$ac_try\"") >&5
16221 (eval $ac_try) 2>&5
16223 echo "$as_me:16223: \$? = $ac_status" >&5
16224 (exit $ac_status); }; }; then
16226 cf_cv_func_openpty=$cf_header
16230 echo "$as_me: failed program was:" >&5
16231 cat conftest.$ac_ext >&5
16233 cf_cv_func_openpty=no
16236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16238 LIBS="$cf_save_LIBS"
16241 echo "$as_me:16241: result: $cf_cv_func_openpty" >&5
16242 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16244 if test "$cf_cv_func_openpty" != no ; then
16246 cat >>confdefs.h <<EOF
16247 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16250 cat >>confdefs.h <<\EOF
16251 #define USE_XTERM_PTY 1
16254 if test "x$cf_cv_lib_util" = xyes ; then
16256 cf_add_libs="-lutil"
16257 # Filter out duplicates - this happens with badly-designed ".pc" files...
16258 for cf_add_1lib in $TEST_LIBS
16260 for cf_add_2lib in $cf_add_libs
16262 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16268 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16270 TEST_LIBS="$cf_add_libs"
16275 echo "$as_me:16275: checking for function curses_version" >&5
16276 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
16277 if test "${cf_cv_func_curses_version+set}" = set; then
16278 echo $ECHO_N "(cached) $ECHO_C" >&6
16281 if test "$cross_compiling" = yes; then
16282 cf_cv_func_curses_version=unknown
16284 cat >conftest.$ac_ext <<_ACEOF
16285 #line 16285 "configure"
16286 #include "confdefs.h"
16288 #include <${cf_cv_ncurses_header:-curses.h}>
16292 sprintf(temp, "%s\n", curses_version());
16293 ${cf_cv_main_return:-return}(0);
16297 rm -f conftest$ac_exeext
16298 if { (eval echo "$as_me:16298: \"$ac_link\"") >&5
16299 (eval $ac_link) 2>&5
16301 echo "$as_me:16301: \$? = $ac_status" >&5
16302 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16303 { (eval echo "$as_me:16303: \"$ac_try\"") >&5
16304 (eval $ac_try) 2>&5
16306 echo "$as_me:16306: \$? = $ac_status" >&5
16307 (exit $ac_status); }; }; then
16308 cf_cv_func_curses_version=yes
16311 echo "$as_me: program exited with status $ac_status" >&5
16312 echo "$as_me: failed program was:" >&5
16313 cat conftest.$ac_ext >&5
16314 cf_cv_func_curses_version=no
16317 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16321 echo "$as_me:16321: result: $cf_cv_func_curses_version" >&5
16322 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
16323 test "$cf_cv_func_curses_version" = yes &&
16324 cat >>confdefs.h <<\EOF
16325 #define HAVE_CURSES_VERSION 1
16328 echo "$as_me:16328: checking for alternate character set array" >&5
16329 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
16330 if test "${cf_cv_curses_acs_map+set}" = set; then
16331 echo $ECHO_N "(cached) $ECHO_C" >&6
16334 cf_cv_curses_acs_map=unknown
16335 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
16337 cat >conftest.$ac_ext <<_ACEOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16341 #include <${cf_cv_ncurses_header:-curses.h}>
16347 $name['k'] = ACS_PLUS
16353 rm -f conftest.$ac_objext conftest$ac_exeext
16354 if { (eval echo "$as_me:16354: \"$ac_link\"") >&5
16355 (eval $ac_link) 2>&5
16357 echo "$as_me:16357: \$? = $ac_status" >&5
16358 (exit $ac_status); } &&
16359 { ac_try='test -s conftest$ac_exeext'
16360 { (eval echo "$as_me:16360: \"$ac_try\"") >&5
16361 (eval $ac_try) 2>&5
16363 echo "$as_me:16363: \$? = $ac_status" >&5
16364 (exit $ac_status); }; }; then
16365 cf_cv_curses_acs_map=$name; break
16367 echo "$as_me: failed program was:" >&5
16368 cat conftest.$ac_ext >&5
16370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16374 echo "$as_me:16374: result: $cf_cv_curses_acs_map" >&5
16375 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
16377 test "$cf_cv_curses_acs_map" != unknown &&
16378 cat >>confdefs.h <<EOF
16379 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
16382 if test "$cf_enable_widec" = yes; then
16384 echo "$as_me:16384: checking for wide alternate character set array" >&5
16385 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
16386 if test "${cf_cv_curses_wacs_map+set}" = set; then
16387 echo $ECHO_N "(cached) $ECHO_C" >&6
16390 cf_cv_curses_wacs_map=unknown
16391 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
16393 cat >conftest.$ac_ext <<_ACEOF
16394 #line 16394 "configure"
16395 #include "confdefs.h"
16397 #ifndef _XOPEN_SOURCE_EXTENDED
16398 #define _XOPEN_SOURCE_EXTENDED
16400 #include <${cf_cv_ncurses_header:-curses.h}>
16404 void *foo = &($name['k'])
16409 rm -f conftest.$ac_objext conftest$ac_exeext
16410 if { (eval echo "$as_me:16410: \"$ac_link\"") >&5
16411 (eval $ac_link) 2>&5
16413 echo "$as_me:16413: \$? = $ac_status" >&5
16414 (exit $ac_status); } &&
16415 { ac_try='test -s conftest$ac_exeext'
16416 { (eval echo "$as_me:16416: \"$ac_try\"") >&5
16417 (eval $ac_try) 2>&5
16419 echo "$as_me:16419: \$? = $ac_status" >&5
16420 (exit $ac_status); }; }; then
16421 cf_cv_curses_wacs_map=$name
16424 echo "$as_me: failed program was:" >&5
16425 cat conftest.$ac_ext >&5
16427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16430 echo "$as_me:16430: result: $cf_cv_curses_wacs_map" >&5
16431 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
16433 test "$cf_cv_curses_wacs_map" != unknown &&
16434 cat >>confdefs.h <<EOF
16435 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
16438 echo "$as_me:16438: checking for wide alternate character constants" >&5
16439 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
16440 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
16441 echo $ECHO_N "(cached) $ECHO_C" >&6
16444 cf_cv_curses_wacs_symbols=no
16445 if test "$cf_cv_curses_wacs_map" != unknown
16447 cat >conftest.$ac_ext <<_ACEOF
16448 #line 16448 "configure"
16449 #include "confdefs.h"
16451 #ifndef _XOPEN_SOURCE_EXTENDED
16452 #define _XOPEN_SOURCE_EXTENDED
16454 #include <${cf_cv_ncurses_header:-curses.h}>
16458 cchar_t *foo = WACS_PLUS;
16459 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
16464 rm -f conftest.$ac_objext conftest$ac_exeext
16465 if { (eval echo "$as_me:16465: \"$ac_link\"") >&5
16466 (eval $ac_link) 2>&5
16468 echo "$as_me:16468: \$? = $ac_status" >&5
16469 (exit $ac_status); } &&
16470 { ac_try='test -s conftest$ac_exeext'
16471 { (eval echo "$as_me:16471: \"$ac_try\"") >&5
16472 (eval $ac_try) 2>&5
16474 echo "$as_me:16474: \$? = $ac_status" >&5
16475 (exit $ac_status); }; }; then
16476 cf_cv_curses_wacs_symbols=yes
16478 echo "$as_me: failed program was:" >&5
16479 cat conftest.$ac_ext >&5
16481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16483 cat >conftest.$ac_ext <<_ACEOF
16484 #line 16484 "configure"
16485 #include "confdefs.h"
16487 #ifndef _XOPEN_SOURCE_EXTENDED
16488 #define _XOPEN_SOURCE_EXTENDED
16490 #include <${cf_cv_ncurses_header:-curses.h}>
16494 cchar_t *foo = WACS_PLUS
16499 rm -f conftest.$ac_objext conftest$ac_exeext
16500 if { (eval echo "$as_me:16500: \"$ac_link\"") >&5
16501 (eval $ac_link) 2>&5
16503 echo "$as_me:16503: \$? = $ac_status" >&5
16504 (exit $ac_status); } &&
16505 { ac_try='test -s conftest$ac_exeext'
16506 { (eval echo "$as_me:16506: \"$ac_try\"") >&5
16507 (eval $ac_try) 2>&5
16509 echo "$as_me:16509: \$? = $ac_status" >&5
16510 (exit $ac_status); }; }; then
16511 cf_cv_curses_wacs_symbols=yes
16513 echo "$as_me: failed program was:" >&5
16514 cat conftest.$ac_ext >&5
16516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16520 echo "$as_me:16520: result: $cf_cv_curses_wacs_symbols" >&5
16521 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
16523 test "$cf_cv_curses_wacs_symbols" != no &&
16524 cat >>confdefs.h <<\EOF
16525 #define CURSES_WACS_SYMBOLS 1
16530 echo "$as_me:16530: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16531 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16532 cat >conftest.$ac_ext <<_ACEOF
16533 #line 16533 "configure"
16534 #include "confdefs.h"
16536 #ifndef _XOPEN_SOURCE_EXTENDED
16537 #define _XOPEN_SOURCE_EXTENDED
16539 #include <${cf_cv_ncurses_header:-curses.h}>
16550 rm -f conftest.$ac_objext
16551 if { (eval echo "$as_me:16551: \"$ac_compile\"") >&5
16552 (eval $ac_compile) 2>&5
16554 echo "$as_me:16554: \$? = $ac_status" >&5
16555 (exit $ac_status); } &&
16556 { ac_try='test -s conftest.$ac_objext'
16557 { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558 (eval $ac_try) 2>&5
16560 echo "$as_me:16560: \$? = $ac_status" >&5
16561 (exit $ac_status); }; }; then
16564 echo "$as_me: failed program was:" >&5
16565 cat conftest.$ac_ext >&5
16568 rm -f conftest.$ac_objext conftest.$ac_ext
16569 echo "$as_me:16569: result: $cf_result" >&5
16570 echo "${ECHO_T}$cf_result" >&6
16571 if test $cf_result = yes ; then
16573 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16575 cat >>confdefs.h <<EOF
16576 #define $cf_result 1
16581 cat >>confdefs.h <<EOF
16582 #define attr_t long
16587 if test "$cf_enable_widec" = yes; then
16589 # This is needed on Tru64 5.0 to declare mbstate_t
16590 echo "$as_me:16590: checking if we must include wchar.h to declare mbstate_t" >&5
16591 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
16592 if test "${cf_cv_mbstate_t+set}" = set; then
16593 echo $ECHO_N "(cached) $ECHO_C" >&6
16596 cat >conftest.$ac_ext <<_ACEOF
16597 #line 16597 "configure"
16598 #include "confdefs.h"
16600 #include <stdlib.h>
16601 #include <stdarg.h>
16603 #ifdef HAVE_LIBUTF8_H
16604 #include <libutf8.h>
16614 rm -f conftest.$ac_objext
16615 if { (eval echo "$as_me:16615: \"$ac_compile\"") >&5
16616 (eval $ac_compile) 2>&5
16618 echo "$as_me:16618: \$? = $ac_status" >&5
16619 (exit $ac_status); } &&
16620 { ac_try='test -s conftest.$ac_objext'
16621 { (eval echo "$as_me:16621: \"$ac_try\"") >&5
16622 (eval $ac_try) 2>&5
16624 echo "$as_me:16624: \$? = $ac_status" >&5
16625 (exit $ac_status); }; }; then
16628 echo "$as_me: failed program was:" >&5
16629 cat conftest.$ac_ext >&5
16630 cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16634 #include <stdlib.h>
16635 #include <stdarg.h>
16638 #ifdef HAVE_LIBUTF8_H
16639 #include <libutf8.h>
16649 rm -f conftest.$ac_objext
16650 if { (eval echo "$as_me:16650: \"$ac_compile\"") >&5
16651 (eval $ac_compile) 2>&5
16653 echo "$as_me:16653: \$? = $ac_status" >&5
16654 (exit $ac_status); } &&
16655 { ac_try='test -s conftest.$ac_objext'
16656 { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657 (eval $ac_try) 2>&5
16659 echo "$as_me:16659: \$? = $ac_status" >&5
16660 (exit $ac_status); }; }; then
16661 cf_cv_mbstate_t=yes
16663 echo "$as_me: failed program was:" >&5
16664 cat conftest.$ac_ext >&5
16665 cf_cv_mbstate_t=unknown
16667 rm -f conftest.$ac_objext conftest.$ac_ext
16669 rm -f conftest.$ac_objext conftest.$ac_ext
16671 echo "$as_me:16671: result: $cf_cv_mbstate_t" >&5
16672 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
16674 if test "$cf_cv_mbstate_t" = yes ; then
16676 cat >>confdefs.h <<\EOF
16677 #define NEED_WCHAR_H 1
16683 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
16684 if test "$cf_cv_mbstate_t" = unknown ; then
16685 NCURSES_MBSTATE_T=1
16688 # if we find mbstate_t in either place, use substitution to provide a fallback.
16689 if test "$cf_cv_mbstate_t" != unknown ; then
16690 NCURSES_OK_MBSTATE_T=1
16693 # This is needed on Tru64 5.0 to declare wchar_t
16694 echo "$as_me:16694: checking if we must include wchar.h to declare wchar_t" >&5
16695 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
16696 if test "${cf_cv_wchar_t+set}" = set; then
16697 echo $ECHO_N "(cached) $ECHO_C" >&6
16700 cat >conftest.$ac_ext <<_ACEOF
16701 #line 16701 "configure"
16702 #include "confdefs.h"
16704 #include <stdlib.h>
16705 #include <stdarg.h>
16707 #ifdef HAVE_LIBUTF8_H
16708 #include <libutf8.h>
16718 rm -f conftest.$ac_objext
16719 if { (eval echo "$as_me:16719: \"$ac_compile\"") >&5
16720 (eval $ac_compile) 2>&5
16722 echo "$as_me:16722: \$? = $ac_status" >&5
16723 (exit $ac_status); } &&
16724 { ac_try='test -s conftest.$ac_objext'
16725 { (eval echo "$as_me:16725: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16728 echo "$as_me:16728: \$? = $ac_status" >&5
16729 (exit $ac_status); }; }; then
16732 echo "$as_me: failed program was:" >&5
16733 cat conftest.$ac_ext >&5
16734 cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16738 #include <stdlib.h>
16739 #include <stdarg.h>
16742 #ifdef HAVE_LIBUTF8_H
16743 #include <libutf8.h>
16753 rm -f conftest.$ac_objext
16754 if { (eval echo "$as_me:16754: \"$ac_compile\"") >&5
16755 (eval $ac_compile) 2>&5
16757 echo "$as_me:16757: \$? = $ac_status" >&5
16758 (exit $ac_status); } &&
16759 { ac_try='test -s conftest.$ac_objext'
16760 { (eval echo "$as_me:16760: \"$ac_try\"") >&5
16761 (eval $ac_try) 2>&5
16763 echo "$as_me:16763: \$? = $ac_status" >&5
16764 (exit $ac_status); }; }; then
16767 echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 cf_cv_wchar_t=unknown
16771 rm -f conftest.$ac_objext conftest.$ac_ext
16773 rm -f conftest.$ac_objext conftest.$ac_ext
16775 echo "$as_me:16775: result: $cf_cv_wchar_t" >&5
16776 echo "${ECHO_T}$cf_cv_wchar_t" >&6
16778 if test "$cf_cv_wchar_t" = yes ; then
16780 cat >>confdefs.h <<\EOF
16781 #define NEED_WCHAR_H 1
16787 # if we do not find wchar_t in either place, use substitution to provide a fallback.
16788 if test "$cf_cv_wchar_t" = unknown ; then
16792 # if we find wchar_t in either place, use substitution to provide a fallback.
16793 if test "$cf_cv_wchar_t" != unknown ; then
16794 NCURSES_OK_WCHAR_T=1
16797 # This is needed on Tru64 5.0 to declare wint_t
16798 echo "$as_me:16798: checking if we must include wchar.h to declare wint_t" >&5
16799 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
16800 if test "${cf_cv_wint_t+set}" = set; then
16801 echo $ECHO_N "(cached) $ECHO_C" >&6
16804 cat >conftest.$ac_ext <<_ACEOF
16805 #line 16805 "configure"
16806 #include "confdefs.h"
16808 #include <stdlib.h>
16809 #include <stdarg.h>
16811 #ifdef HAVE_LIBUTF8_H
16812 #include <libutf8.h>
16822 rm -f conftest.$ac_objext
16823 if { (eval echo "$as_me:16823: \"$ac_compile\"") >&5
16824 (eval $ac_compile) 2>&5
16826 echo "$as_me:16826: \$? = $ac_status" >&5
16827 (exit $ac_status); } &&
16828 { ac_try='test -s conftest.$ac_objext'
16829 { (eval echo "$as_me:16829: \"$ac_try\"") >&5
16830 (eval $ac_try) 2>&5
16832 echo "$as_me:16832: \$? = $ac_status" >&5
16833 (exit $ac_status); }; }; then
16836 echo "$as_me: failed program was:" >&5
16837 cat conftest.$ac_ext >&5
16838 cat >conftest.$ac_ext <<_ACEOF
16839 #line 16839 "configure"
16840 #include "confdefs.h"
16842 #include <stdlib.h>
16843 #include <stdarg.h>
16846 #ifdef HAVE_LIBUTF8_H
16847 #include <libutf8.h>
16857 rm -f conftest.$ac_objext
16858 if { (eval echo "$as_me:16858: \"$ac_compile\"") >&5
16859 (eval $ac_compile) 2>&5
16861 echo "$as_me:16861: \$? = $ac_status" >&5
16862 (exit $ac_status); } &&
16863 { ac_try='test -s conftest.$ac_objext'
16864 { (eval echo "$as_me:16864: \"$ac_try\"") >&5
16865 (eval $ac_try) 2>&5
16867 echo "$as_me:16867: \$? = $ac_status" >&5
16868 (exit $ac_status); }; }; then
16871 echo "$as_me: failed program was:" >&5
16872 cat conftest.$ac_ext >&5
16873 cf_cv_wint_t=unknown
16875 rm -f conftest.$ac_objext conftest.$ac_ext
16877 rm -f conftest.$ac_objext conftest.$ac_ext
16879 echo "$as_me:16879: result: $cf_cv_wint_t" >&5
16880 echo "${ECHO_T}$cf_cv_wint_t" >&6
16882 if test "$cf_cv_wint_t" = yes ; then
16884 cat >>confdefs.h <<\EOF
16885 #define NEED_WCHAR_H 1
16891 # if we do not find wint_t in either place, use substitution to provide a fallback.
16892 if test "$cf_cv_wint_t" = unknown ; then
16896 # if we find wint_t in either place, use substitution to provide a fallback.
16897 if test "$cf_cv_wint_t" != unknown ; then
16898 NCURSES_OK_WINT_T=1
16901 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
16903 echo "$as_me:16903: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16904 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16905 cat >conftest.$ac_ext <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16909 #ifndef _XOPEN_SOURCE_EXTENDED
16910 #define _XOPEN_SOURCE_EXTENDED
16912 #include <${cf_cv_ncurses_header:-curses.h}>
16923 rm -f conftest.$ac_objext
16924 if { (eval echo "$as_me:16924: \"$ac_compile\"") >&5
16925 (eval $ac_compile) 2>&5
16927 echo "$as_me:16927: \$? = $ac_status" >&5
16928 (exit $ac_status); } &&
16929 { ac_try='test -s conftest.$ac_objext'
16930 { (eval echo "$as_me:16930: \"$ac_try\"") >&5
16931 (eval $ac_try) 2>&5
16933 echo "$as_me:16933: \$? = $ac_status" >&5
16934 (exit $ac_status); }; }; then
16937 echo "$as_me: failed program was:" >&5
16938 cat conftest.$ac_ext >&5
16941 rm -f conftest.$ac_objext conftest.$ac_ext
16942 echo "$as_me:16942: result: $cf_result" >&5
16943 echo "${ECHO_T}$cf_result" >&6
16944 if test $cf_result = yes ; then
16946 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16948 cat >>confdefs.h <<EOF
16949 #define $cf_result 1
16954 cat >>confdefs.h <<EOF
16955 #define mbstate_t long
16962 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16964 echo "$as_me:16964: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16965 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16966 cat >conftest.$ac_ext <<_ACEOF
16967 #line 16967 "configure"
16968 #include "confdefs.h"
16970 #ifndef _XOPEN_SOURCE_EXTENDED
16971 #define _XOPEN_SOURCE_EXTENDED
16973 #include <${cf_cv_ncurses_header:-curses.h}>
16984 rm -f conftest.$ac_objext
16985 if { (eval echo "$as_me:16985: \"$ac_compile\"") >&5
16986 (eval $ac_compile) 2>&5
16988 echo "$as_me:16988: \$? = $ac_status" >&5
16989 (exit $ac_status); } &&
16990 { ac_try='test -s conftest.$ac_objext'
16991 { (eval echo "$as_me:16991: \"$ac_try\"") >&5
16992 (eval $ac_try) 2>&5
16994 echo "$as_me:16994: \$? = $ac_status" >&5
16995 (exit $ac_status); }; }; then
16998 echo "$as_me: failed program was:" >&5
16999 cat conftest.$ac_ext >&5
17002 rm -f conftest.$ac_objext conftest.$ac_ext
17003 echo "$as_me:17003: result: $cf_result" >&5
17004 echo "${ECHO_T}$cf_result" >&6
17005 if test $cf_result = yes ; then
17007 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17009 cat >>confdefs.h <<EOF
17010 #define $cf_result 1
17015 cat >>confdefs.h <<EOF
17016 #define wchar_t long
17023 if test "$NCURSES_OK_WINT_T" = 0 ; then
17025 echo "$as_me:17025: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17026 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17027 cat >conftest.$ac_ext <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17031 #ifndef _XOPEN_SOURCE_EXTENDED
17032 #define _XOPEN_SOURCE_EXTENDED
17034 #include <${cf_cv_ncurses_header:-curses.h}>
17045 rm -f conftest.$ac_objext
17046 if { (eval echo "$as_me:17046: \"$ac_compile\"") >&5
17047 (eval $ac_compile) 2>&5
17049 echo "$as_me:17049: \$? = $ac_status" >&5
17050 (exit $ac_status); } &&
17051 { ac_try='test -s conftest.$ac_objext'
17052 { (eval echo "$as_me:17052: \"$ac_try\"") >&5
17053 (eval $ac_try) 2>&5
17055 echo "$as_me:17055: \$? = $ac_status" >&5
17056 (exit $ac_status); }; }; then
17059 echo "$as_me: failed program was:" >&5
17060 cat conftest.$ac_ext >&5
17063 rm -f conftest.$ac_objext conftest.$ac_ext
17064 echo "$as_me:17064: result: $cf_result" >&5
17065 echo "${ECHO_T}$cf_result" >&6
17066 if test $cf_result = yes ; then
17068 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17070 cat >>confdefs.h <<EOF
17071 #define $cf_result 1
17076 cat >>confdefs.h <<EOF
17077 #define wint_t long
17085 for cf_data in curscr
17087 echo "$as_me:17087: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17088 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17090 cat >conftest.$ac_ext <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17094 #ifdef HAVE_XCURSES
17095 #include <xcurses.h>
17096 char * XCursesProgramName = "test";
17098 #include <${cf_cv_ncurses_header:-curses.h}>
17099 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17100 #include <ncursesw/term.h>
17101 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17102 #include <ncurses/term.h>
17103 #elif defined(HAVE_TERM_H)
17112 void *foo = &($cf_data)
17118 rm -f conftest.$ac_objext
17119 if { (eval echo "$as_me:17119: \"$ac_compile\"") >&5
17120 (eval $ac_compile) 2>&5
17122 echo "$as_me:17122: \$? = $ac_status" >&5
17123 (exit $ac_status); } &&
17124 { ac_try='test -s conftest.$ac_objext'
17125 { (eval echo "$as_me:17125: \"$ac_try\"") >&5
17126 (eval $ac_try) 2>&5
17128 echo "$as_me:17128: \$? = $ac_status" >&5
17129 (exit $ac_status); }; }; then
17133 echo "$as_me: failed program was:" >&5
17134 cat conftest.$ac_ext >&5
17137 rm -f conftest.$ac_objext conftest.$ac_ext
17138 echo "$as_me:17138: result: $cf_result" >&5
17139 echo "${ECHO_T}$cf_result" >&6
17141 if test $cf_result = yes ; then
17143 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17145 cat >>confdefs.h <<EOF
17146 #define $cf_result 1
17150 echo "$as_me:17150: checking for data $cf_data in library" >&5
17151 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17152 # BSD linkers insist on making weak linkage, but resolve at runtime.
17153 if test "$cross_compiling" = yes; then
17156 cat >conftest.$ac_ext <<_ACEOF
17157 #line 17157 "configure"
17158 #include "confdefs.h"
17160 #ifdef HAVE_XCURSES
17161 #include <xcurses.h>
17162 char * XCursesProgramName = "test";
17164 #include <${cf_cv_ncurses_header:-curses.h}>
17165 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17166 #include <ncursesw/term.h>
17167 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17168 #include <ncurses/term.h>
17169 #elif defined(HAVE_TERM_H)
17174 extern char $cf_data;
17180 void *foo = &($cf_data);
17181 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17182 ${cf_cv_main_return:-return}(foo == 0);
17189 rm -f conftest.$ac_objext conftest$ac_exeext
17190 if { (eval echo "$as_me:17190: \"$ac_link\"") >&5
17191 (eval $ac_link) 2>&5
17193 echo "$as_me:17193: \$? = $ac_status" >&5
17194 (exit $ac_status); } &&
17195 { ac_try='test -s conftest$ac_exeext'
17196 { (eval echo "$as_me:17196: \"$ac_try\"") >&5
17197 (eval $ac_try) 2>&5
17199 echo "$as_me:17199: \$? = $ac_status" >&5
17200 (exit $ac_status); }; }; then
17203 echo "$as_me: failed program was:" >&5
17204 cat conftest.$ac_ext >&5
17207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17210 cat >conftest.$ac_ext <<_ACEOF
17211 #line 17211 "configure"
17212 #include "confdefs.h"
17214 #ifdef HAVE_XCURSES
17215 #include <xcurses.h>
17216 char * XCursesProgramName = "test";
17218 #include <${cf_cv_ncurses_header:-curses.h}>
17219 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17220 #include <ncursesw/term.h>
17221 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17222 #include <ncurses/term.h>
17223 #elif defined(HAVE_TERM_H)
17228 extern char $cf_data;
17231 void *foo = &($cf_data);
17232 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17233 ${cf_cv_main_return:-return}(foo == 0);
17236 rm -f conftest$ac_exeext
17237 if { (eval echo "$as_me:17237: \"$ac_link\"") >&5
17238 (eval $ac_link) 2>&5
17240 echo "$as_me:17240: \$? = $ac_status" >&5
17241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17242 { (eval echo "$as_me:17242: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17245 echo "$as_me:17245: \$? = $ac_status" >&5
17246 (exit $ac_status); }; }; then
17250 echo "$as_me: program exited with status $ac_status" >&5
17251 echo "$as_me: failed program was:" >&5
17252 cat conftest.$ac_ext >&5
17255 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17257 echo "$as_me:17257: result: $cf_result" >&5
17258 echo "${ECHO_T}$cf_result" >&6
17259 if test $cf_result = yes ; then
17261 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17263 cat >>confdefs.h <<EOF
17264 #define $cf_result 1
17267 # do not exit loop here, since we prefer system's declarations
17272 for cf_data in ospeed
17274 echo "$as_me:17274: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17275 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17277 cat >conftest.$ac_ext <<_ACEOF
17278 #line 17278 "configure"
17279 #include "confdefs.h"
17281 #ifdef HAVE_XCURSES
17282 #include <xcurses.h>
17283 char * XCursesProgramName = "test";
17285 #include <${cf_cv_ncurses_header:-curses.h}>
17286 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17287 #include <ncursesw/term.h>
17288 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17289 #include <ncurses/term.h>
17290 #elif defined(HAVE_TERM_H)
17299 void *foo = &($cf_data)
17305 rm -f conftest.$ac_objext
17306 if { (eval echo "$as_me:17306: \"$ac_compile\"") >&5
17307 (eval $ac_compile) 2>&5
17309 echo "$as_me:17309: \$? = $ac_status" >&5
17310 (exit $ac_status); } &&
17311 { ac_try='test -s conftest.$ac_objext'
17312 { (eval echo "$as_me:17312: \"$ac_try\"") >&5
17313 (eval $ac_try) 2>&5
17315 echo "$as_me:17315: \$? = $ac_status" >&5
17316 (exit $ac_status); }; }; then
17320 echo "$as_me: failed program was:" >&5
17321 cat conftest.$ac_ext >&5
17324 rm -f conftest.$ac_objext conftest.$ac_ext
17325 echo "$as_me:17325: result: $cf_result" >&5
17326 echo "${ECHO_T}$cf_result" >&6
17328 if test $cf_result = yes ; then
17330 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17332 cat >>confdefs.h <<EOF
17333 #define $cf_result 1
17337 echo "$as_me:17337: checking for data $cf_data in library" >&5
17338 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17339 # BSD linkers insist on making weak linkage, but resolve at runtime.
17340 if test "$cross_compiling" = yes; then
17343 cat >conftest.$ac_ext <<_ACEOF
17344 #line 17344 "configure"
17345 #include "confdefs.h"
17347 #ifdef HAVE_XCURSES
17348 #include <xcurses.h>
17349 char * XCursesProgramName = "test";
17351 #include <${cf_cv_ncurses_header:-curses.h}>
17352 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17353 #include <ncursesw/term.h>
17354 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17355 #include <ncurses/term.h>
17356 #elif defined(HAVE_TERM_H)
17361 extern char $cf_data;
17367 void *foo = &($cf_data);
17368 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17369 ${cf_cv_main_return:-return}(foo == 0);
17376 rm -f conftest.$ac_objext conftest$ac_exeext
17377 if { (eval echo "$as_me:17377: \"$ac_link\"") >&5
17378 (eval $ac_link) 2>&5
17380 echo "$as_me:17380: \$? = $ac_status" >&5
17381 (exit $ac_status); } &&
17382 { ac_try='test -s conftest$ac_exeext'
17383 { (eval echo "$as_me:17383: \"$ac_try\"") >&5
17384 (eval $ac_try) 2>&5
17386 echo "$as_me:17386: \$? = $ac_status" >&5
17387 (exit $ac_status); }; }; then
17390 echo "$as_me: failed program was:" >&5
17391 cat conftest.$ac_ext >&5
17394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17397 cat >conftest.$ac_ext <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17401 #ifdef HAVE_XCURSES
17402 #include <xcurses.h>
17403 char * XCursesProgramName = "test";
17405 #include <${cf_cv_ncurses_header:-curses.h}>
17406 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17407 #include <ncursesw/term.h>
17408 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17409 #include <ncurses/term.h>
17410 #elif defined(HAVE_TERM_H)
17415 extern char $cf_data;
17418 void *foo = &($cf_data);
17419 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17420 ${cf_cv_main_return:-return}(foo == 0);
17423 rm -f conftest$ac_exeext
17424 if { (eval echo "$as_me:17424: \"$ac_link\"") >&5
17425 (eval $ac_link) 2>&5
17427 echo "$as_me:17427: \$? = $ac_status" >&5
17428 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17429 { (eval echo "$as_me:17429: \"$ac_try\"") >&5
17430 (eval $ac_try) 2>&5
17432 echo "$as_me:17432: \$? = $ac_status" >&5
17433 (exit $ac_status); }; }; then
17437 echo "$as_me: program exited with status $ac_status" >&5
17438 echo "$as_me: failed program was:" >&5
17439 cat conftest.$ac_ext >&5
17442 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17444 echo "$as_me:17444: result: $cf_result" >&5
17445 echo "${ECHO_T}$cf_result" >&6
17446 if test $cf_result = yes ; then
17448 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17450 cat >>confdefs.h <<EOF
17451 #define $cf_result 1
17454 # do not exit loop here, since we prefer system's declarations
17459 for cf_data in boolnames
17461 echo "$as_me:17461: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17462 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17464 cat >conftest.$ac_ext <<_ACEOF
17465 #line 17465 "configure"
17466 #include "confdefs.h"
17468 #ifdef HAVE_XCURSES
17469 #include <xcurses.h>
17470 char * XCursesProgramName = "test";
17472 #include <${cf_cv_ncurses_header:-curses.h}>
17473 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17474 #include <ncursesw/term.h>
17475 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17476 #include <ncurses/term.h>
17477 #elif defined(HAVE_TERM_H)
17486 void *foo = &($cf_data)
17492 rm -f conftest.$ac_objext
17493 if { (eval echo "$as_me:17493: \"$ac_compile\"") >&5
17494 (eval $ac_compile) 2>&5
17496 echo "$as_me:17496: \$? = $ac_status" >&5
17497 (exit $ac_status); } &&
17498 { ac_try='test -s conftest.$ac_objext'
17499 { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500 (eval $ac_try) 2>&5
17502 echo "$as_me:17502: \$? = $ac_status" >&5
17503 (exit $ac_status); }; }; then
17507 echo "$as_me: failed program was:" >&5
17508 cat conftest.$ac_ext >&5
17511 rm -f conftest.$ac_objext conftest.$ac_ext
17512 echo "$as_me:17512: result: $cf_result" >&5
17513 echo "${ECHO_T}$cf_result" >&6
17515 if test $cf_result = yes ; then
17517 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17519 cat >>confdefs.h <<EOF
17520 #define $cf_result 1
17524 echo "$as_me:17524: checking for data $cf_data in library" >&5
17525 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17526 # BSD linkers insist on making weak linkage, but resolve at runtime.
17527 if test "$cross_compiling" = yes; then
17530 cat >conftest.$ac_ext <<_ACEOF
17531 #line 17531 "configure"
17532 #include "confdefs.h"
17534 #ifdef HAVE_XCURSES
17535 #include <xcurses.h>
17536 char * XCursesProgramName = "test";
17538 #include <${cf_cv_ncurses_header:-curses.h}>
17539 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17540 #include <ncursesw/term.h>
17541 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17542 #include <ncurses/term.h>
17543 #elif defined(HAVE_TERM_H)
17548 extern char $cf_data;
17554 void *foo = &($cf_data);
17555 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17556 ${cf_cv_main_return:-return}(foo == 0);
17563 rm -f conftest.$ac_objext conftest$ac_exeext
17564 if { (eval echo "$as_me:17564: \"$ac_link\"") >&5
17565 (eval $ac_link) 2>&5
17567 echo "$as_me:17567: \$? = $ac_status" >&5
17568 (exit $ac_status); } &&
17569 { ac_try='test -s conftest$ac_exeext'
17570 { (eval echo "$as_me:17570: \"$ac_try\"") >&5
17571 (eval $ac_try) 2>&5
17573 echo "$as_me:17573: \$? = $ac_status" >&5
17574 (exit $ac_status); }; }; then
17577 echo "$as_me: failed program was:" >&5
17578 cat conftest.$ac_ext >&5
17581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17584 cat >conftest.$ac_ext <<_ACEOF
17585 #line 17585 "configure"
17586 #include "confdefs.h"
17588 #ifdef HAVE_XCURSES
17589 #include <xcurses.h>
17590 char * XCursesProgramName = "test";
17592 #include <${cf_cv_ncurses_header:-curses.h}>
17593 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17594 #include <ncursesw/term.h>
17595 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17596 #include <ncurses/term.h>
17597 #elif defined(HAVE_TERM_H)
17602 extern char $cf_data;
17605 void *foo = &($cf_data);
17606 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17607 ${cf_cv_main_return:-return}(foo == 0);
17610 rm -f conftest$ac_exeext
17611 if { (eval echo "$as_me:17611: \"$ac_link\"") >&5
17612 (eval $ac_link) 2>&5
17614 echo "$as_me:17614: \$? = $ac_status" >&5
17615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17616 { (eval echo "$as_me:17616: \"$ac_try\"") >&5
17617 (eval $ac_try) 2>&5
17619 echo "$as_me:17619: \$? = $ac_status" >&5
17620 (exit $ac_status); }; }; then
17624 echo "$as_me: program exited with status $ac_status" >&5
17625 echo "$as_me: failed program was:" >&5
17626 cat conftest.$ac_ext >&5
17629 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17631 echo "$as_me:17631: result: $cf_result" >&5
17632 echo "${ECHO_T}$cf_result" >&6
17633 if test $cf_result = yes ; then
17635 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17637 cat >>confdefs.h <<EOF
17638 #define $cf_result 1
17641 # do not exit loop here, since we prefer system's declarations
17646 for cf_data in boolfnames
17648 echo "$as_me:17648: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17649 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17651 cat >conftest.$ac_ext <<_ACEOF
17652 #line 17652 "configure"
17653 #include "confdefs.h"
17655 #ifdef HAVE_XCURSES
17656 #include <xcurses.h>
17657 char * XCursesProgramName = "test";
17659 #include <${cf_cv_ncurses_header:-curses.h}>
17660 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17661 #include <ncursesw/term.h>
17662 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17663 #include <ncurses/term.h>
17664 #elif defined(HAVE_TERM_H)
17673 void *foo = &($cf_data)
17679 rm -f conftest.$ac_objext
17680 if { (eval echo "$as_me:17680: \"$ac_compile\"") >&5
17681 (eval $ac_compile) 2>&5
17683 echo "$as_me:17683: \$? = $ac_status" >&5
17684 (exit $ac_status); } &&
17685 { ac_try='test -s conftest.$ac_objext'
17686 { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687 (eval $ac_try) 2>&5
17689 echo "$as_me:17689: \$? = $ac_status" >&5
17690 (exit $ac_status); }; }; then
17694 echo "$as_me: failed program was:" >&5
17695 cat conftest.$ac_ext >&5
17698 rm -f conftest.$ac_objext conftest.$ac_ext
17699 echo "$as_me:17699: result: $cf_result" >&5
17700 echo "${ECHO_T}$cf_result" >&6
17702 if test $cf_result = yes ; then
17704 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17706 cat >>confdefs.h <<EOF
17707 #define $cf_result 1
17711 echo "$as_me:17711: checking for data $cf_data in library" >&5
17712 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17713 # BSD linkers insist on making weak linkage, but resolve at runtime.
17714 if test "$cross_compiling" = yes; then
17717 cat >conftest.$ac_ext <<_ACEOF
17718 #line 17718 "configure"
17719 #include "confdefs.h"
17721 #ifdef HAVE_XCURSES
17722 #include <xcurses.h>
17723 char * XCursesProgramName = "test";
17725 #include <${cf_cv_ncurses_header:-curses.h}>
17726 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17727 #include <ncursesw/term.h>
17728 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17729 #include <ncurses/term.h>
17730 #elif defined(HAVE_TERM_H)
17735 extern char $cf_data;
17741 void *foo = &($cf_data);
17742 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17743 ${cf_cv_main_return:-return}(foo == 0);
17750 rm -f conftest.$ac_objext conftest$ac_exeext
17751 if { (eval echo "$as_me:17751: \"$ac_link\"") >&5
17752 (eval $ac_link) 2>&5
17754 echo "$as_me:17754: \$? = $ac_status" >&5
17755 (exit $ac_status); } &&
17756 { ac_try='test -s conftest$ac_exeext'
17757 { (eval echo "$as_me:17757: \"$ac_try\"") >&5
17758 (eval $ac_try) 2>&5
17760 echo "$as_me:17760: \$? = $ac_status" >&5
17761 (exit $ac_status); }; }; then
17764 echo "$as_me: failed program was:" >&5
17765 cat conftest.$ac_ext >&5
17768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17771 cat >conftest.$ac_ext <<_ACEOF
17772 #line 17772 "configure"
17773 #include "confdefs.h"
17775 #ifdef HAVE_XCURSES
17776 #include <xcurses.h>
17777 char * XCursesProgramName = "test";
17779 #include <${cf_cv_ncurses_header:-curses.h}>
17780 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17781 #include <ncursesw/term.h>
17782 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17783 #include <ncurses/term.h>
17784 #elif defined(HAVE_TERM_H)
17789 extern char $cf_data;
17792 void *foo = &($cf_data);
17793 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17794 ${cf_cv_main_return:-return}(foo == 0);
17797 rm -f conftest$ac_exeext
17798 if { (eval echo "$as_me:17798: \"$ac_link\"") >&5
17799 (eval $ac_link) 2>&5
17801 echo "$as_me:17801: \$? = $ac_status" >&5
17802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17803 { (eval echo "$as_me:17803: \"$ac_try\"") >&5
17804 (eval $ac_try) 2>&5
17806 echo "$as_me:17806: \$? = $ac_status" >&5
17807 (exit $ac_status); }; }; then
17811 echo "$as_me: program exited with status $ac_status" >&5
17812 echo "$as_me: failed program was:" >&5
17813 cat conftest.$ac_ext >&5
17816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17818 echo "$as_me:17818: result: $cf_result" >&5
17819 echo "${ECHO_T}$cf_result" >&6
17820 if test $cf_result = yes ; then
17822 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17824 cat >>confdefs.h <<EOF
17825 #define $cf_result 1
17828 # do not exit loop here, since we prefer system's declarations
17833 for cf_data in ttytype
17835 echo "$as_me:17835: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17836 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17838 cat >conftest.$ac_ext <<_ACEOF
17839 #line 17839 "configure"
17840 #include "confdefs.h"
17842 #ifdef HAVE_XCURSES
17843 #include <xcurses.h>
17844 char * XCursesProgramName = "test";
17846 #include <${cf_cv_ncurses_header:-curses.h}>
17847 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17848 #include <ncursesw/term.h>
17849 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17850 #include <ncurses/term.h>
17851 #elif defined(HAVE_TERM_H)
17860 void *foo = &($cf_data)
17866 rm -f conftest.$ac_objext
17867 if { (eval echo "$as_me:17867: \"$ac_compile\"") >&5
17868 (eval $ac_compile) 2>&5
17870 echo "$as_me:17870: \$? = $ac_status" >&5
17871 (exit $ac_status); } &&
17872 { ac_try='test -s conftest.$ac_objext'
17873 { (eval echo "$as_me:17873: \"$ac_try\"") >&5
17874 (eval $ac_try) 2>&5
17876 echo "$as_me:17876: \$? = $ac_status" >&5
17877 (exit $ac_status); }; }; then
17881 echo "$as_me: failed program was:" >&5
17882 cat conftest.$ac_ext >&5
17885 rm -f conftest.$ac_objext conftest.$ac_ext
17886 echo "$as_me:17886: result: $cf_result" >&5
17887 echo "${ECHO_T}$cf_result" >&6
17889 if test $cf_result = yes ; then
17891 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17893 cat >>confdefs.h <<EOF
17894 #define $cf_result 1
17898 echo "$as_me:17898: checking for data $cf_data in library" >&5
17899 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17900 # BSD linkers insist on making weak linkage, but resolve at runtime.
17901 if test "$cross_compiling" = yes; then
17904 cat >conftest.$ac_ext <<_ACEOF
17905 #line 17905 "configure"
17906 #include "confdefs.h"
17908 #ifdef HAVE_XCURSES
17909 #include <xcurses.h>
17910 char * XCursesProgramName = "test";
17912 #include <${cf_cv_ncurses_header:-curses.h}>
17913 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17914 #include <ncursesw/term.h>
17915 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17916 #include <ncurses/term.h>
17917 #elif defined(HAVE_TERM_H)
17922 extern char $cf_data;
17928 void *foo = &($cf_data);
17929 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17930 ${cf_cv_main_return:-return}(foo == 0);
17937 rm -f conftest.$ac_objext conftest$ac_exeext
17938 if { (eval echo "$as_me:17938: \"$ac_link\"") >&5
17939 (eval $ac_link) 2>&5
17941 echo "$as_me:17941: \$? = $ac_status" >&5
17942 (exit $ac_status); } &&
17943 { ac_try='test -s conftest$ac_exeext'
17944 { (eval echo "$as_me:17944: \"$ac_try\"") >&5
17945 (eval $ac_try) 2>&5
17947 echo "$as_me:17947: \$? = $ac_status" >&5
17948 (exit $ac_status); }; }; then
17951 echo "$as_me: failed program was:" >&5
17952 cat conftest.$ac_ext >&5
17955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17958 cat >conftest.$ac_ext <<_ACEOF
17959 #line 17959 "configure"
17960 #include "confdefs.h"
17962 #ifdef HAVE_XCURSES
17963 #include <xcurses.h>
17964 char * XCursesProgramName = "test";
17966 #include <${cf_cv_ncurses_header:-curses.h}>
17967 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17968 #include <ncursesw/term.h>
17969 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17970 #include <ncurses/term.h>
17971 #elif defined(HAVE_TERM_H)
17976 extern char $cf_data;
17979 void *foo = &($cf_data);
17980 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17981 ${cf_cv_main_return:-return}(foo == 0);
17984 rm -f conftest$ac_exeext
17985 if { (eval echo "$as_me:17985: \"$ac_link\"") >&5
17986 (eval $ac_link) 2>&5
17988 echo "$as_me:17988: \$? = $ac_status" >&5
17989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17990 { (eval echo "$as_me:17990: \"$ac_try\"") >&5
17991 (eval $ac_try) 2>&5
17993 echo "$as_me:17993: \$? = $ac_status" >&5
17994 (exit $ac_status); }; }; then
17998 echo "$as_me: program exited with status $ac_status" >&5
17999 echo "$as_me: failed program was:" >&5
18000 cat conftest.$ac_ext >&5
18003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18005 echo "$as_me:18005: result: $cf_result" >&5
18006 echo "${ECHO_T}$cf_result" >&6
18007 if test $cf_result = yes ; then
18009 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18011 cat >>confdefs.h <<EOF
18012 #define $cf_result 1
18015 # do not exit loop here, since we prefer system's declarations
18020 if ( test "$GCC" = yes || test "$GXX" = yes )
18022 echo "$as_me:18022: checking if you want to turn on gcc warnings" >&5
18023 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
18025 # Check whether --enable-warnings or --disable-warnings was given.
18026 if test "${enable_warnings+set}" = set; then
18027 enableval="$enable_warnings"
18028 test "$enableval" != yes && enableval=no
18029 if test "$enableval" != "no" ; then
18039 echo "$as_me:18039: result: $with_warnings" >&5
18040 echo "${ECHO_T}$with_warnings" >&6
18041 if test "$with_warnings" = "yes"
18044 if test "$GCC" = yes
18046 cat > conftest.i <<EOF
18048 #define GCC_PRINTF 0
18051 #define GCC_SCANF 0
18053 #ifndef GCC_NORETURN
18054 #define GCC_NORETURN /* nothing */
18057 #define GCC_UNUSED /* nothing */
18060 if test "$GCC" = yes
18062 { echo "$as_me:18062: checking for $CC __attribute__ directives..." >&5
18063 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
18064 cat > conftest.$ac_ext <<EOF
18065 #line 18065 "${as_me:-configure}"
18066 #include "confdefs.h"
18067 #include "conftest.h"
18068 #include "conftest.i"
18070 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
18072 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
18075 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
18077 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
18079 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
18080 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
18081 extern void foo(void) GCC_NORETURN;
18082 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
18084 cf_printf_attribute=no
18085 cf_scanf_attribute=no
18086 for cf_attribute in scanf printf unused noreturn
18089 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18091 cf_directive="__attribute__(($cf_attribute))"
18092 echo "checking for $CC $cf_directive" 1>&5
18094 case $cf_attribute in
18096 cf_printf_attribute=yes
18097 cat >conftest.h <<EOF
18098 #define GCC_$cf_ATTRIBUTE 1
18102 cf_scanf_attribute=yes
18103 cat >conftest.h <<EOF
18104 #define GCC_$cf_ATTRIBUTE 1
18108 cat >conftest.h <<EOF
18109 #define GCC_$cf_ATTRIBUTE $cf_directive
18114 if { (eval echo "$as_me:18114: \"$ac_compile\"") >&5
18115 (eval $ac_compile) 2>&5
18117 echo "$as_me:18117: \$? = $ac_status" >&5
18118 (exit $ac_status); }; then
18119 test -n "$verbose" && echo "$as_me:18119: result: ... $cf_attribute" >&5
18120 echo "${ECHO_T}... $cf_attribute" >&6
18121 cat conftest.h >>confdefs.h
18122 case $cf_attribute in
18125 cat >>confdefs.h <<EOF
18126 #define GCC_NORETURN $cf_directive
18131 cf_value='/* nothing */'
18132 if test "$cf_printf_attribute" != no ; then
18133 cf_value='__attribute__((format(printf,fmt,var)))'
18135 cat >>confdefs.h <<\EOF
18136 #define GCC_PRINTF 1
18141 cat >>confdefs.h <<EOF
18142 #define GCC_PRINTFLIKE(fmt,var) $cf_value
18147 cf_value='/* nothing */'
18148 if test "$cf_scanf_attribute" != no ; then
18149 cf_value='__attribute__((format(scanf,fmt,var)))'
18151 cat >>confdefs.h <<\EOF
18152 #define GCC_SCANF 1
18157 cat >>confdefs.h <<EOF
18158 #define GCC_SCANFLIKE(fmt,var) $cf_value
18164 cat >>confdefs.h <<EOF
18165 #define GCC_UNUSED $cf_directive
18173 fgrep define conftest.i >>confdefs.h
18180 if test "$GCC" = yes ; then
18183 echo "$as_me:18183: checking if this is really Intel C compiler" >&5
18184 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
18185 cf_save_CFLAGS="$CFLAGS"
18186 CFLAGS="$CFLAGS -no-gcc"
18187 cat >conftest.$ac_ext <<_ACEOF
18188 #line 18188 "configure"
18189 #include "confdefs.h"
18195 #ifdef __INTEL_COMPILER
18204 rm -f conftest.$ac_objext
18205 if { (eval echo "$as_me:18205: \"$ac_compile\"") >&5
18206 (eval $ac_compile) 2>&5
18208 echo "$as_me:18208: \$? = $ac_status" >&5
18209 (exit $ac_status); } &&
18210 { ac_try='test -s conftest.$ac_objext'
18211 { (eval echo "$as_me:18211: \"$ac_try\"") >&5
18212 (eval $ac_try) 2>&5
18214 echo "$as_me:18214: \$? = $ac_status" >&5
18215 (exit $ac_status); }; }; then
18217 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
18220 echo "$as_me: failed program was:" >&5
18221 cat conftest.$ac_ext >&5
18223 rm -f conftest.$ac_objext conftest.$ac_ext
18224 CFLAGS="$cf_save_CFLAGS"
18225 echo "$as_me:18225: result: $INTEL_COMPILER" >&5
18226 echo "${ECHO_T}$INTEL_COMPILER" >&6
18233 if test "$GCC" = yes ; then
18234 echo "$as_me:18234: checking if this is really Clang C compiler" >&5
18235 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
18236 cf_save_CFLAGS="$CFLAGS"
18237 CFLAGS="$CFLAGS -Qunused-arguments"
18238 cat >conftest.$ac_ext <<_ACEOF
18239 #line 18239 "configure"
18240 #include "confdefs.h"
18255 rm -f conftest.$ac_objext
18256 if { (eval echo "$as_me:18256: \"$ac_compile\"") >&5
18257 (eval $ac_compile) 2>&5
18259 echo "$as_me:18259: \$? = $ac_status" >&5
18260 (exit $ac_status); } &&
18261 { ac_try='test -s conftest.$ac_objext'
18262 { (eval echo "$as_me:18262: \"$ac_try\"") >&5
18263 (eval $ac_try) 2>&5
18265 echo "$as_me:18265: \$? = $ac_status" >&5
18266 (exit $ac_status); }; }; then
18268 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
18271 echo "$as_me: failed program was:" >&5
18272 cat conftest.$ac_ext >&5
18274 rm -f conftest.$ac_objext conftest.$ac_ext
18275 CFLAGS="$cf_save_CFLAGS"
18276 echo "$as_me:18276: result: $CLANG_COMPILER" >&5
18277 echo "${ECHO_T}$CLANG_COMPILER" >&6
18280 cat > conftest.$ac_ext <<EOF
18281 #line 18281 "${as_me:-configure}"
18282 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18285 if test "$INTEL_COMPILER" = yes
18287 # The "-wdXXX" options suppress warnings:
18288 # remark #1419: external declaration in primary source file
18289 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18290 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18291 # remark #193: zero used for undefined preprocessing identifier
18292 # remark #593: variable "curs_sb_left_arrow" was set but never used
18293 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18294 # remark #869: parameter "tw" was never referenced
18295 # remark #981: operands are evaluated in unspecified order
18296 # warning #279: controlling expression is constant
18298 { echo "$as_me:18298: checking for $CC warning options..." >&5
18299 echo "$as_me: checking for $CC warning options..." >&6;}
18300 cf_save_CFLAGS="$CFLAGS"
18301 EXTRA_CFLAGS="-Wall"
18313 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18314 if { (eval echo "$as_me:18314: \"$ac_compile\"") >&5
18315 (eval $ac_compile) 2>&5
18317 echo "$as_me:18317: \$? = $ac_status" >&5
18318 (exit $ac_status); }; then
18319 test -n "$verbose" && echo "$as_me:18319: result: ... -$cf_opt" >&5
18320 echo "${ECHO_T}... -$cf_opt" >&6
18321 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18324 CFLAGS="$cf_save_CFLAGS"
18326 elif test "$GCC" = yes
18328 { echo "$as_me:18328: checking for $CC warning options..." >&5
18329 echo "$as_me: checking for $CC warning options..." >&6;}
18330 cf_save_CFLAGS="$CFLAGS"
18333 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
18334 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
18335 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
18336 for cf_opt in W Wall \
18337 Wbad-function-cast \
18340 Wdeclaration-after-statement \
18343 Wmissing-declarations \
18344 Wmissing-prototypes \
18348 Wstrict-prototypes \
18349 Wundef $cf_gcc_warnings $cf_warn_CONST
18351 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18352 if { (eval echo "$as_me:18352: \"$ac_compile\"") >&5
18353 (eval $ac_compile) 2>&5
18355 echo "$as_me:18355: \$? = $ac_status" >&5
18356 (exit $ac_status); }; then
18357 test -n "$verbose" && echo "$as_me:18357: result: ... -$cf_opt" >&5
18358 echo "${ECHO_T}... -$cf_opt" >&6
18361 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
18364 case $GCC_VERSION in
18366 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18368 echo "${as_me:-configure}:18368: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18374 case $GCC_VERSION in
18376 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18378 echo "${as_me:-configure}:18378: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18384 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18387 CFLAGS="$cf_save_CFLAGS"
18394 echo "$as_me:18394: checking if you want to use dmalloc for testing" >&5
18395 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18397 # Check whether --with-dmalloc or --without-dmalloc was given.
18398 if test "${with_dmalloc+set}" = set; then
18399 withval="$with_dmalloc"
18401 cat >>confdefs.h <<EOF
18402 #define USE_DMALLOC 1
18405 : ${with_cflags:=-g}
18406 : ${with_no_leaks:=yes}
18411 echo "$as_me:18411: result: ${with_dmalloc:-no}" >&5
18412 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18414 case .$with_cflags in
18424 cf_new_extra_cppflags=
18426 for cf_add_cflags in -g
18428 case $cf_fix_cppflags in
18430 case $cf_add_cflags in
18431 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18432 case $cf_add_cflags in
18434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18437 && test -z "${cf_tst_cflags}" \
18438 && cf_fix_cppflags=yes
18440 if test $cf_fix_cppflags = yes ; then
18442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18446 elif test "${cf_tst_cflags}" = "\"'" ; then
18448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18455 case "$CPPFLAGS" in
18459 case $cf_add_cflags in
18461 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18463 CPPFLAGS=`echo "$CPPFLAGS" | \
18464 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18465 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18470 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18471 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18478 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18479 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18492 && test -z "${cf_tst_cflags}" \
18493 && cf_fix_cppflags=no
18498 if test -n "$cf_new_cflags" ; then
18500 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18501 CFLAGS="${CFLAGS}$cf_new_cflags"
18505 if test -n "$cf_new_cppflags" ; then
18507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18508 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18512 if test -n "$cf_new_extra_cppflags" ; then
18514 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18515 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18524 if test "$with_dmalloc" = yes ; then
18525 echo "$as_me:18525: checking for dmalloc.h" >&5
18526 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18527 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18528 echo $ECHO_N "(cached) $ECHO_C" >&6
18530 cat >conftest.$ac_ext <<_ACEOF
18531 #line 18531 "configure"
18532 #include "confdefs.h"
18533 #include <dmalloc.h>
18535 if { (eval echo "$as_me:18535: \"$ac_cpp conftest.$ac_ext\"") >&5
18536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18538 egrep -v '^ *\+' conftest.er1 >conftest.err
18540 cat conftest.err >&5
18541 echo "$as_me:18541: \$? = $ac_status" >&5
18542 (exit $ac_status); } >/dev/null; then
18543 if test -s conftest.err; then
18544 ac_cpp_err=$ac_c_preproc_warn_flag
18551 if test -z "$ac_cpp_err"; then
18552 ac_cv_header_dmalloc_h=yes
18554 echo "$as_me: failed program was:" >&5
18555 cat conftest.$ac_ext >&5
18556 ac_cv_header_dmalloc_h=no
18558 rm -f conftest.err conftest.$ac_ext
18560 echo "$as_me:18560: result: $ac_cv_header_dmalloc_h" >&5
18561 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18562 if test $ac_cv_header_dmalloc_h = yes; then
18564 echo "$as_me:18564: checking for dmalloc_debug in -ldmalloc" >&5
18565 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18566 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18567 echo $ECHO_N "(cached) $ECHO_C" >&6
18569 ac_check_lib_save_LIBS=$LIBS
18570 LIBS="-ldmalloc $LIBS"
18571 cat >conftest.$ac_ext <<_ACEOF
18572 #line 18572 "configure"
18573 #include "confdefs.h"
18575 /* Override any gcc2 internal prototype to avoid an error. */
18579 /* We use char because int might match the return type of a gcc2
18580 builtin and then its argument prototype would still apply. */
18581 char dmalloc_debug ();
18590 rm -f conftest.$ac_objext conftest$ac_exeext
18591 if { (eval echo "$as_me:18591: \"$ac_link\"") >&5
18592 (eval $ac_link) 2>&5
18594 echo "$as_me:18594: \$? = $ac_status" >&5
18595 (exit $ac_status); } &&
18596 { ac_try='test -s conftest$ac_exeext'
18597 { (eval echo "$as_me:18597: \"$ac_try\"") >&5
18598 (eval $ac_try) 2>&5
18600 echo "$as_me:18600: \$? = $ac_status" >&5
18601 (exit $ac_status); }; }; then
18602 ac_cv_lib_dmalloc_dmalloc_debug=yes
18604 echo "$as_me: failed program was:" >&5
18605 cat conftest.$ac_ext >&5
18606 ac_cv_lib_dmalloc_dmalloc_debug=no
18608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18609 LIBS=$ac_check_lib_save_LIBS
18611 echo "$as_me:18611: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18612 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18613 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
18614 cat >>confdefs.h <<EOF
18615 #define HAVE_LIBDMALLOC 1
18618 LIBS="-ldmalloc $LIBS"
18626 echo "$as_me:18626: checking if you want to use dbmalloc for testing" >&5
18627 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18629 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18630 if test "${with_dbmalloc+set}" = set; then
18631 withval="$with_dbmalloc"
18633 cat >>confdefs.h <<EOF
18634 #define USE_DBMALLOC 1
18637 : ${with_cflags:=-g}
18638 : ${with_no_leaks:=yes}
18643 echo "$as_me:18643: result: ${with_dbmalloc:-no}" >&5
18644 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18646 case .$with_cflags in
18656 cf_new_extra_cppflags=
18658 for cf_add_cflags in -g
18660 case $cf_fix_cppflags in
18662 case $cf_add_cflags in
18663 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18664 case $cf_add_cflags in
18666 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18669 && test -z "${cf_tst_cflags}" \
18670 && cf_fix_cppflags=yes
18672 if test $cf_fix_cppflags = yes ; then
18674 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18675 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18678 elif test "${cf_tst_cflags}" = "\"'" ; then
18680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18687 case "$CPPFLAGS" in
18691 case $cf_add_cflags in
18693 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18695 CPPFLAGS=`echo "$CPPFLAGS" | \
18696 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18697 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18702 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18703 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18710 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18711 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18718 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18719 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18721 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18723 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18724 && test -z "${cf_tst_cflags}" \
18725 && cf_fix_cppflags=no
18730 if test -n "$cf_new_cflags" ; then
18732 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18733 CFLAGS="${CFLAGS}$cf_new_cflags"
18737 if test -n "$cf_new_cppflags" ; then
18739 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18740 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18744 if test -n "$cf_new_extra_cppflags" ; then
18746 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18747 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18756 if test "$with_dbmalloc" = yes ; then
18757 echo "$as_me:18757: checking for dbmalloc.h" >&5
18758 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18759 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18760 echo $ECHO_N "(cached) $ECHO_C" >&6
18762 cat >conftest.$ac_ext <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18765 #include <dbmalloc.h>
18767 if { (eval echo "$as_me:18767: \"$ac_cpp conftest.$ac_ext\"") >&5
18768 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18770 egrep -v '^ *\+' conftest.er1 >conftest.err
18772 cat conftest.err >&5
18773 echo "$as_me:18773: \$? = $ac_status" >&5
18774 (exit $ac_status); } >/dev/null; then
18775 if test -s conftest.err; then
18776 ac_cpp_err=$ac_c_preproc_warn_flag
18783 if test -z "$ac_cpp_err"; then
18784 ac_cv_header_dbmalloc_h=yes
18786 echo "$as_me: failed program was:" >&5
18787 cat conftest.$ac_ext >&5
18788 ac_cv_header_dbmalloc_h=no
18790 rm -f conftest.err conftest.$ac_ext
18792 echo "$as_me:18792: result: $ac_cv_header_dbmalloc_h" >&5
18793 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18794 if test $ac_cv_header_dbmalloc_h = yes; then
18796 echo "$as_me:18796: checking for debug_malloc in -ldbmalloc" >&5
18797 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18798 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18799 echo $ECHO_N "(cached) $ECHO_C" >&6
18801 ac_check_lib_save_LIBS=$LIBS
18802 LIBS="-ldbmalloc $LIBS"
18803 cat >conftest.$ac_ext <<_ACEOF
18804 #line 18804 "configure"
18805 #include "confdefs.h"
18807 /* Override any gcc2 internal prototype to avoid an error. */
18811 /* We use char because int might match the return type of a gcc2
18812 builtin and then its argument prototype would still apply. */
18813 char debug_malloc ();
18822 rm -f conftest.$ac_objext conftest$ac_exeext
18823 if { (eval echo "$as_me:18823: \"$ac_link\"") >&5
18824 (eval $ac_link) 2>&5
18826 echo "$as_me:18826: \$? = $ac_status" >&5
18827 (exit $ac_status); } &&
18828 { ac_try='test -s conftest$ac_exeext'
18829 { (eval echo "$as_me:18829: \"$ac_try\"") >&5
18830 (eval $ac_try) 2>&5
18832 echo "$as_me:18832: \$? = $ac_status" >&5
18833 (exit $ac_status); }; }; then
18834 ac_cv_lib_dbmalloc_debug_malloc=yes
18836 echo "$as_me: failed program was:" >&5
18837 cat conftest.$ac_ext >&5
18838 ac_cv_lib_dbmalloc_debug_malloc=no
18840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18841 LIBS=$ac_check_lib_save_LIBS
18843 echo "$as_me:18843: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18844 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18845 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
18846 cat >>confdefs.h <<EOF
18847 #define HAVE_LIBDBMALLOC 1
18850 LIBS="-ldbmalloc $LIBS"
18858 echo "$as_me:18858: checking if you want to use valgrind for testing" >&5
18859 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18861 # Check whether --with-valgrind or --without-valgrind was given.
18862 if test "${with_valgrind+set}" = set; then
18863 withval="$with_valgrind"
18865 cat >>confdefs.h <<EOF
18866 #define USE_VALGRIND 1
18869 : ${with_cflags:=-g}
18870 : ${with_no_leaks:=yes}
18875 echo "$as_me:18875: result: ${with_valgrind:-no}" >&5
18876 echo "${ECHO_T}${with_valgrind:-no}" >&6
18878 case .$with_cflags in
18888 cf_new_extra_cppflags=
18890 for cf_add_cflags in -g
18892 case $cf_fix_cppflags in
18894 case $cf_add_cflags in
18895 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18896 case $cf_add_cflags in
18898 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18900 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18901 && test -z "${cf_tst_cflags}" \
18902 && cf_fix_cppflags=yes
18904 if test $cf_fix_cppflags = yes ; then
18906 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18907 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18910 elif test "${cf_tst_cflags}" = "\"'" ; then
18912 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18913 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18919 case "$CPPFLAGS" in
18923 case $cf_add_cflags in
18925 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18927 CPPFLAGS=`echo "$CPPFLAGS" | \
18928 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18929 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18934 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18935 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18942 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18943 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18950 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18951 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18953 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18955 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18956 && test -z "${cf_tst_cflags}" \
18957 && cf_fix_cppflags=no
18962 if test -n "$cf_new_cflags" ; then
18964 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18965 CFLAGS="${CFLAGS}$cf_new_cflags"
18969 if test -n "$cf_new_cppflags" ; then
18971 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18972 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18976 if test -n "$cf_new_extra_cppflags" ; then
18978 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18979 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18988 echo "$as_me:18988: checking if you want to perform memory-leak testing" >&5
18989 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18991 # Check whether --enable-leaks or --disable-leaks was given.
18992 if test "${enable_leaks+set}" = set; then
18993 enableval="$enable_leaks"
18994 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18996 : ${with_no_leaks:=no}
18998 echo "$as_me:18998: result: $with_no_leaks" >&5
18999 echo "${ECHO_T}$with_no_leaks" >&6
19001 if test "$with_no_leaks" = yes ; then
19003 cat >>confdefs.h <<\EOF
19007 cat >>confdefs.h <<\EOF
19008 #define YY_NO_LEAKS 1
19014 echo "$as_me:19014: checking for an rpath option" >&5
19015 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
19016 case $cf_cv_system_name in
19018 if test "$GCC" = yes; then
19019 LD_RPATH_OPT="-Wl,-rpath,"
19021 LD_RPATH_OPT="-rpath "
19024 (linux*|gnu*|k*bsd*-gnu|freebsd*)
19025 LD_RPATH_OPT="-Wl,-rpath,"
19027 (openbsd[2-9].*|mirbsd*)
19028 LD_RPATH_OPT="-Wl,-rpath,"
19031 LD_RPATH_OPT="-rpath "
19034 LD_RPATH_OPT="-Wl,-rpath,"
19037 LD_RPATH_OPT="-rpath "
19045 echo "$as_me:19045: result: $LD_RPATH_OPT" >&5
19046 echo "${ECHO_T}$LD_RPATH_OPT" >&6
19048 case "x$LD_RPATH_OPT" in
19050 echo "$as_me:19050: checking if we need a space after rpath option" >&5
19051 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
19052 cf_save_LIBS="$LIBS"
19054 cf_add_libs="${LD_RPATH_OPT}$libdir"
19055 # Filter out duplicates - this happens with badly-designed ".pc" files...
19056 for cf_add_1lib in $LIBS
19058 for cf_add_2lib in $cf_add_libs
19060 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19066 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19068 LIBS="$cf_add_libs"
19070 cat >conftest.$ac_ext <<_ACEOF
19071 #line 19071 "configure"
19072 #include "confdefs.h"
19082 rm -f conftest.$ac_objext conftest$ac_exeext
19083 if { (eval echo "$as_me:19083: \"$ac_link\"") >&5
19084 (eval $ac_link) 2>&5
19086 echo "$as_me:19086: \$? = $ac_status" >&5
19087 (exit $ac_status); } &&
19088 { ac_try='test -s conftest$ac_exeext'
19089 { (eval echo "$as_me:19089: \"$ac_try\"") >&5
19090 (eval $ac_try) 2>&5
19092 echo "$as_me:19092: \$? = $ac_status" >&5
19093 (exit $ac_status); }; }; then
19096 echo "$as_me: failed program was:" >&5
19097 cat conftest.$ac_ext >&5
19100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19101 LIBS="$cf_save_LIBS"
19102 echo "$as_me:19102: result: $cf_rpath_space" >&5
19103 echo "${ECHO_T}$cf_rpath_space" >&6
19104 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
19108 echo "$as_me:19108: checking if rpath-hack should be disabled" >&5
19109 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
19111 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
19112 if test "${enable_rpath_hack+set}" = set; then
19113 enableval="$enable_rpath_hack"
19114 test "$enableval" != no && enableval=yes
19115 if test "$enableval" != "yes" ; then
19116 cf_disable_rpath_hack=yes
19118 cf_disable_rpath_hack=no
19122 cf_disable_rpath_hack=no
19125 echo "$as_me:19125: result: $cf_disable_rpath_hack" >&5
19126 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
19127 if test "$cf_disable_rpath_hack" = no ; then
19129 echo "$as_me:19129: checking for updated LDFLAGS" >&5
19130 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
19131 if test -n "$LD_RPATH_OPT" ; then
19132 echo "$as_me:19132: result: maybe" >&5
19133 echo "${ECHO_T}maybe" >&6
19137 # Extract the first word of "$ac_prog", so it can be a program name with args.
19138 set dummy $ac_prog; ac_word=$2
19139 echo "$as_me:19139: checking for $ac_word" >&5
19140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19141 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
19142 echo $ECHO_N "(cached) $ECHO_C" >&6
19144 if test -n "$cf_ldd_prog"; then
19145 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
19147 ac_save_IFS=$IFS; IFS=$ac_path_separator
19149 for ac_dir in $ac_dummy; do
19151 test -z "$ac_dir" && ac_dir=.
19152 $as_executable_p "$ac_dir/$ac_word" || continue
19153 ac_cv_prog_cf_ldd_prog="$ac_prog"
19154 echo "$as_me:19154: found $ac_dir/$ac_word" >&5
19160 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
19161 if test -n "$cf_ldd_prog"; then
19162 echo "$as_me:19162: result: $cf_ldd_prog" >&5
19163 echo "${ECHO_T}$cf_ldd_prog" >&6
19165 echo "$as_me:19165: result: no" >&5
19166 echo "${ECHO_T}no" >&6
19169 test -n "$cf_ldd_prog" && break
19171 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
19173 cf_rpath_list="/usr/lib /lib"
19174 if test "$cf_ldd_prog" != no
19178 cat >conftest.$ac_ext <<_ACEOF
19179 #line 19179 "configure"
19180 #include "confdefs.h"
19190 rm -f conftest.$ac_objext conftest$ac_exeext
19191 if { (eval echo "$as_me:19191: \"$ac_link\"") >&5
19192 (eval $ac_link) 2>&5
19194 echo "$as_me:19194: \$? = $ac_status" >&5
19195 (exit $ac_status); } &&
19196 { ac_try='test -s conftest$ac_exeext'
19197 { (eval echo "$as_me:19197: \"$ac_try\"") >&5
19198 (eval $ac_try) 2>&5
19200 echo "$as_me:19200: \$? = $ac_status" >&5
19201 (exit $ac_status); }; }; then
19202 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
19203 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
19205 echo "$as_me: failed program was:" >&5
19206 cat conftest.$ac_ext >&5
19208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19210 # If we passed the link-test, but get a "not found" on a given library,
19211 # this could be due to inept reconfiguration of gcc to make it only
19212 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
19213 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
19214 # /usr/local libraries.
19215 if test -n "$cf_rpath_oops"
19217 for cf_rpath_src in $cf_rpath_oops
19219 for cf_rpath_dir in \
19224 if test -f $cf_rpath_dir/lib/$cf_rpath_src
19226 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
19228 echo "${as_me:-configure}:19228: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
19230 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
19238 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19240 echo "${as_me:-configure}:19240: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19242 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
19244 echo "${as_me:-configure}:19244: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
19247 for cf_rpath_src in $LDFLAGS
19249 case $cf_rpath_src in
19252 # check if this refers to a directory which we will ignore
19254 if test -n "$cf_rpath_list"
19256 for cf_rpath_item in $cf_rpath_list
19258 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19266 if test "$cf_rpath_skip" = no
19268 # transform the option
19269 if test "$LD_RPATH_OPT" = "-R " ; then
19270 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19272 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19275 # if we have not already added this, add it now
19276 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19277 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19279 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19281 echo "${as_me:-configure}:19281: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19283 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19288 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19290 LDFLAGS=$cf_rpath_dst
19292 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
19294 echo "${as_me:-configure}:19294: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
19296 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
19298 echo "${as_me:-configure}:19298: testing ...checking LIBS $LIBS ..." 1>&5
19301 for cf_rpath_src in $LIBS
19303 case $cf_rpath_src in
19306 # check if this refers to a directory which we will ignore
19308 if test -n "$cf_rpath_list"
19310 for cf_rpath_item in $cf_rpath_list
19312 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19320 if test "$cf_rpath_skip" = no
19322 # transform the option
19323 if test "$LD_RPATH_OPT" = "-R " ; then
19324 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19326 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19329 # if we have not already added this, add it now
19330 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19331 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19333 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19335 echo "${as_me:-configure}:19335: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19337 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19342 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19346 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
19348 echo "${as_me:-configure}:19348: testing ...checked LIBS $LIBS ..." 1>&5
19350 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19352 echo "${as_me:-configure}:19352: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19355 echo "$as_me:19355: result: no" >&5
19356 echo "${ECHO_T}no" >&6
19364 ac_config_files="$ac_config_files Makefile"
19365 ac_config_commands="$ac_config_commands default"
19366 cat >confcache <<\_ACEOF
19367 # This file is a shell script that caches the results of configure
19368 # tests run on this system so they can be shared between configure
19369 # scripts and configure runs, see configure's option --config-cache.
19370 # It is not useful on other systems. If it contains results you don't
19371 # want to keep, you may remove or edit it.
19373 # config.status only pays attention to the cache file if you give it
19374 # the --recheck option to rerun configure.
19376 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19377 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19378 # following values.
19382 # The following way of writing the cache mishandles newlines in values,
19383 # but we know of no workaround that is simple, portable, and efficient.
19384 # So, don't put newlines in cache variables' values.
19385 # Ultrix sh set writes to stderr and can't be redirected directly,
19386 # and sets the high bit in the cache file unless we assign to the vars.
19389 case `(ac_space=' '; set | grep ac_space) 2>&1` in
19391 # `set' does not quote correctly, so add quotes (double-quote
19392 # substitution turns \\\\ into \\, and sed turns \\ into \).
19395 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19398 # `set' quotes correctly as required by POSIX, so do not add quotes.
19400 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19407 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19409 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19411 if cmp -s $cache_file confcache; then :; else
19412 if test -w $cache_file; then
19413 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19414 cat confcache >$cache_file
19416 echo "not updating unwritable cache $cache_file"
19421 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19422 # Let make expand exec_prefix.
19423 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19425 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19426 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19427 # trailing colons and then remove the whole line if VPATH becomes empty
19428 # (actually we leave an empty line to preserve line numbers).
19429 if test "x$srcdir" = x.; then
19430 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19431 s/:*\$(srcdir):*/:/;
19432 s/:*\${srcdir}:*/:/;
19434 s/^\([^=]*=[ ]*\):*/\1/;
19440 DEFS=-DHAVE_CONFIG_H
19442 : ${CONFIG_STATUS=./config.status}
19443 ac_clean_files_save=$ac_clean_files
19444 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19445 { echo "$as_me:19445: creating $CONFIG_STATUS" >&5
19446 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19447 cat >$CONFIG_STATUS <<_ACEOF
19449 # Generated automatically by configure.
19450 # Run this file to recreate the current configuration.
19451 # Compiler output produced by configure, useful for debugging
19452 # configure, is in config.log if it exists.
19455 SHELL=\${CONFIG_SHELL-$SHELL}
19456 ac_cs_invocation="\$0 \$@"
19460 cat >>$CONFIG_STATUS <<\_ACEOF
19461 # Be Bourne compatible
19462 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19465 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19469 # Name of the executable.
19470 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19472 if expr a : '\(a\)' >/dev/null 2>&1; then
19478 rm -f conf$$ conf$$.exe conf$$.file
19480 if ln -s conf$$.file conf$$ 2>/dev/null; then
19481 # We could just check for DJGPP; but this test a) works b) is more generic
19482 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19483 if test -f conf$$.exe; then
19484 # Don't use ln at all; we don't have any links
19489 elif ln conf$$.file conf$$ 2>/dev/null; then
19494 rm -f conf$$ conf$$.exe conf$$.file
19496 as_executable_p="test -f"
19498 # Support unset when possible.
19499 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19506 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19507 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19508 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19509 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19510 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19511 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19512 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19513 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19516 # We need space, tab and new line, in precisely that order.
19522 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19528 # Files that config.status was made for.
19529 if test -n "$ac_config_files"; then
19530 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19533 if test -n "$ac_config_headers"; then
19534 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19537 if test -n "$ac_config_links"; then
19538 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19541 if test -n "$ac_config_commands"; then
19542 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19545 cat >>$CONFIG_STATUS <<\EOF
19548 \`$as_me' instantiates files from templates according to the
19549 current configuration.
19551 Usage: $0 [OPTIONS] [FILE]...
19553 -h, --help print this help, then exit
19554 -V, --version print version number, then exit
19555 -d, --debug don't remove temporary files
19556 --recheck update $as_me by reconfiguring in the same conditions
19557 --file=FILE[:TEMPLATE]
19558 instantiate the configuration file FILE
19559 --header=FILE[:TEMPLATE]
19560 instantiate the configuration header FILE
19562 Configuration files:
19565 Configuration headers:
19568 Configuration commands:
19571 Report bugs to <dickey@invisible-island.net>."
19574 cat >>$CONFIG_STATUS <<EOF
19577 configured by $0, generated by GNU Autoconf 2.52.20170501,
19578 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19580 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19581 Free Software Foundation, Inc.
19582 This config.status script is free software; the Free Software Foundation
19583 gives unlimited permission to copy, distribute and modify it."
19588 cat >>$CONFIG_STATUS <<\EOF
19589 # If no file are specified by the user, then we need to provide default
19590 # value. By we need to know if files were specified by the user.
19596 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19597 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19599 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19603 *) # This is not an option, so the user has probably given explicit
19605 ac_need_defaults=false;;
19609 # Handling of the options.
19611 cat >>$CONFIG_STATUS <<EOF
19612 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19613 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19614 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19616 cat >>$CONFIG_STATUS <<\EOF
19617 --version | --vers* | -V )
19618 echo "$ac_cs_version"; exit 0 ;;
19620 # Conflict between --help and --header
19621 { { echo "$as_me:19621: error: ambiguous option: $1
19622 Try \`$0 --help' for more information." >&5
19623 echo "$as_me: error: ambiguous option: $1
19624 Try \`$0 --help' for more information." >&2;}
19625 { (exit 1); exit 1; }; };;
19626 --help | --hel | -h )
19627 echo "$ac_cs_usage"; exit 0 ;;
19628 --debug | --d* | -d )
19630 --file | --fil | --fi | --f )
19632 CONFIG_FILES="$CONFIG_FILES $1"
19633 ac_need_defaults=false;;
19634 --header | --heade | --head | --hea )
19636 CONFIG_HEADERS="$CONFIG_HEADERS $1"
19637 ac_need_defaults=false;;
19639 # This is an error.
19640 -*) { { echo "$as_me:19640: error: unrecognized option: $1
19641 Try \`$0 --help' for more information." >&5
19642 echo "$as_me: error: unrecognized option: $1
19643 Try \`$0 --help' for more information." >&2;}
19644 { (exit 1); exit 1; }; } ;;
19646 *) ac_config_targets="$ac_config_targets $1" ;;
19655 ## ----------------------- ##
19656 ## Running config.status. ##
19657 ## ----------------------- ##
19659 This file was extended by $as_me 2.52.20170501, executed with
19660 CONFIG_FILES = $CONFIG_FILES
19661 CONFIG_HEADERS = $CONFIG_HEADERS
19662 CONFIG_LINKS = $CONFIG_LINKS
19663 CONFIG_COMMANDS = $CONFIG_COMMANDS
19664 > $ac_cs_invocation
19665 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19670 cat >>$CONFIG_STATUS <<EOF
19672 # INIT-COMMANDS section.
19682 cat >>$CONFIG_STATUS <<\EOF
19683 for ac_config_target in $ac_config_targets
19685 case "$ac_config_target" in
19686 # Handling of arguments.
19687 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19688 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19689 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
19690 *) { { echo "$as_me:19690: error: invalid argument: $ac_config_target" >&5
19691 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19692 { (exit 1); exit 1; }; };;
19696 # If the user did not use the arguments to specify the items to instantiate,
19697 # then the envvar interface is used. Set only those that are not.
19698 # We use the long form for the default assignment because of an extremely
19699 # bizarre bug on SunOS 4.1.3.
19700 if $ac_need_defaults; then
19701 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19702 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19703 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19706 # Create a temporary directory, and hook for its removal unless debugging.
19709 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19710 trap '{ (exit 1); exit 1; }' 1 2 13 15
19713 # Create a (secure) tmp directory for tmp files.
19716 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19717 test -n "$tmp" && test -d "$tmp"
19720 tmp=$TMPDIR/cs$$-$RANDOM
19721 (umask 077 && mkdir $tmp)
19724 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19725 { (exit 1); exit 1; }
19730 cat >>$CONFIG_STATUS <<EOF
19733 # CONFIG_FILES section.
19736 # No need to generate the scripts if there are no CONFIG_FILES.
19737 # This happens for instance when ./config.status config.h
19738 if test -n "\$CONFIG_FILES"; then
19739 # Protect against being on the right side of a sed subst in config.status.
19740 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19741 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19742 s,@SHELL@,$SHELL,;t t
19743 s,@exec_prefix@,$exec_prefix,;t t
19744 s,@prefix@,$prefix,;t t
19745 s,@program_transform_name@,$program_transform_name,;t t
19746 s,@bindir@,$bindir,;t t
19747 s,@sbindir@,$sbindir,;t t
19748 s,@libexecdir@,$libexecdir,;t t
19749 s,@datarootdir@,$datarootdir,;t t
19750 s,@datadir@,$datadir,;t t
19751 s,@sysconfdir@,$sysconfdir,;t t
19752 s,@sharedstatedir@,$sharedstatedir,;t t
19753 s,@localstatedir@,$localstatedir,;t t
19754 s,@libdir@,$libdir,;t t
19755 s,@includedir@,$includedir,;t t
19756 s,@oldincludedir@,$oldincludedir,;t t
19757 s,@infodir@,$infodir,;t t
19758 s,@mandir@,$mandir,;t t
19759 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19760 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19761 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19762 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19763 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19764 s,@build_alias@,$build_alias,;t t
19765 s,@host_alias@,$host_alias,;t t
19766 s,@target_alias@,$target_alias,;t t
19767 s,@ECHO_C@,$ECHO_C,;t t
19768 s,@ECHO_N@,$ECHO_N,;t t
19769 s,@ECHO_T@,$ECHO_T,;t t
19770 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19771 s,@DEFS@,$DEFS,;t t
19772 s,@LIBS@,$LIBS,;t t
19773 s,@build@,$build,;t t
19774 s,@build_cpu@,$build_cpu,;t t
19775 s,@build_vendor@,$build_vendor,;t t
19776 s,@build_os@,$build_os,;t t
19777 s,@host@,$host,;t t
19778 s,@host_cpu@,$host_cpu,;t t
19779 s,@host_vendor@,$host_vendor,;t t
19780 s,@host_os@,$host_os,;t t
19781 s,@SET_MAKE@,$SET_MAKE,;t t
19783 s,@CFLAGS@,$CFLAGS,;t t
19784 s,@LDFLAGS@,$LDFLAGS,;t t
19785 s,@CPPFLAGS@,$CPPFLAGS,;t t
19786 s,@ac_ct_CC@,$ac_ct_CC,;t t
19787 s,@EXEEXT@,$EXEEXT,;t t
19788 s,@OBJEXT@,$OBJEXT,;t t
19789 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19792 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19793 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19794 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19795 s,@LINT@,$LINT,;t t
19796 s,@LINT_OPTS@,$LINT_OPTS,;t t
19797 s,@CTAGS@,$CTAGS,;t t
19798 s,@ETAGS@,$ETAGS,;t t
19799 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19800 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19801 s,@MATH_LIB@,$MATH_LIB,;t t
19802 s,@top_builddir@,$top_builddir,;t t
19803 s,@CC_G_OPT@,$CC_G_OPT,;t t
19804 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19805 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19806 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19807 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19809 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19810 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19811 s,@LD_MODEL@,$LD_MODEL,;t t
19812 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19813 s,@LIBTOOL@,$LIBTOOL,;t t
19814 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19815 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19816 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19817 s,@LIB_LINK@,$LIB_LINK,;t t
19818 s,@LINK_TESTS@,$LINK_TESTS,;t t
19819 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19820 s,@PACKAGE@,$PACKAGE,;t t
19821 s,@PTHREAD@,$PTHREAD,;t t
19822 s,@TEST_ARGS@,$TEST_ARGS,;t t
19823 s,@TEST_DEPS@,$TEST_DEPS,;t t
19824 s,@TEST_LIBS@,$TEST_LIBS,;t t
19825 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
19826 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19827 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19828 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19829 s,@includesubdir@,$includesubdir,;t t
19830 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19831 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19832 s,@ECHO_LT@,$ECHO_LT,;t t
19833 s,@ECHO_LD@,$ECHO_LD,;t t
19834 s,@RULE_CC@,$RULE_CC,;t t
19835 s,@SHOW_CC@,$SHOW_CC,;t t
19836 s,@ECHO_CC@,$ECHO_CC,;t t
19837 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19838 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
19839 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
19840 s,@X_CFLAGS@,$X_CFLAGS,;t t
19841 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19842 s,@X_LIBS@,$X_LIBS,;t t
19843 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19844 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
19845 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
19846 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19847 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19848 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19853 cat >>$CONFIG_STATUS <<\EOF
19854 # Split the substitutions into bite-sized pieces for seds with
19855 # small command number limits, like on Digital OSF/1 and HP-UX.
19856 ac_max_sed_lines=48
19857 ac_sed_frag=1 # Number of current file.
19858 ac_beg=1 # First line for current file.
19859 ac_end=$ac_max_sed_lines # Line after last line for current file.
19862 while $ac_more_lines; do
19863 if test $ac_beg -gt 1; then
19864 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19866 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19868 if test ! -s $tmp/subs.frag; then
19869 ac_more_lines=false
19871 # The purpose of the label and of the branching condition is to
19872 # speed up the sed processing (if there are no `@' at all, there
19873 # is no need to browse any of the substitutions).
19874 # These are the two extra sed commands mentioned above.
19876 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19877 # It is possible to make a multiline substitution using escaped newlines.
19878 # Ensure that we do not split the substitution between script fragments.
19880 ac_END=`expr $ac_end + $ac_max_sed_lines`
19881 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
19882 if test -s $tmp/subs.next; then
19883 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
19884 if test ! -s $tmp/subs.edit; then
19885 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
19886 if test ! -s $tmp/subs.edit; then
19887 if test $ac_beg -gt 1; then
19888 ac_end=`expr $ac_end - 1`
19895 if test -z "$ac_sed_cmds"; then
19896 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19898 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19900 ac_sed_frag=`expr $ac_sed_frag + 1`
19902 ac_end=`expr $ac_end + $ac_max_sed_lines`
19905 if test -z "$ac_sed_cmds"; then
19908 fi # test -n "$CONFIG_FILES"
19911 cat >>$CONFIG_STATUS <<\EOF
19912 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19913 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19915 - | *:- | *:-:* ) # input from stdin
19917 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19918 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19919 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19920 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19921 * ) ac_file_in=$ac_file.in ;;
19924 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19925 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19926 X"$ac_file" : 'X\(//\)[^/]' \| \
19927 X"$ac_file" : 'X\(//\)$' \| \
19928 X"$ac_file" : 'X\(/\)' \| \
19929 . : '\(.\)' 2>/dev/null ||
19931 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19932 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19933 /^X\(\/\/\)$/{ s//\1/; q; }
19934 /^X\(\/\).*/{ s//\1/; q; }
19936 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19937 { case "$ac_dir" in
19938 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19942 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19943 case $as_mkdir_dir in
19944 # Skip DOS drivespec
19945 ?:) as_incr_dir=$as_mkdir_dir ;;
19947 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19948 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19953 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19954 # A "../" for each directory in $ac_dir_suffix.
19955 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19957 ac_dir_suffix= ac_dots=
19962 if test -z "$ac_dots"; then
19965 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19967 [\\/]* | ?:[\\/]* )
19968 ac_srcdir=$srcdir$ac_dir_suffix;
19969 ac_top_srcdir=$srcdir ;;
19970 *) # Relative path.
19971 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19972 ac_top_srcdir=$ac_dots$srcdir ;;
19976 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19977 *) ac_INSTALL=$ac_dots$INSTALL ;;
19980 if test x"$ac_file" != x-; then
19981 { echo "$as_me:19981: creating $ac_file" >&5
19982 echo "$as_me: creating $ac_file" >&6;}
19985 # Let's still pretend it is `configure' which instantiates (i.e., don't
19986 # use $as_me), people would be surprised to read:
19987 # /* config.h. Generated automatically by config.status. */
19988 configure_input="Generated automatically from `echo $ac_file_in |
19989 sed 's,.*/,,'` by configure."
19991 # First look for the input files in the build tree, otherwise in the
19993 ac_file_inputs=`IFS=:
19994 for f in $ac_file_in; do
19996 -) echo $tmp/stdin ;;
19998 # Absolute (can't be DOS-style, as IFS=:)
19999 test -f "$f" || { { echo "$as_me:19999: error: cannot find input file: $f" >&5
20000 echo "$as_me: error: cannot find input file: $f" >&2;}
20001 { (exit 1); exit 1; }; }
20004 if test -f "$f"; then
20007 elif test -f "$srcdir/$f"; then
20012 { { echo "$as_me:20012: error: cannot find input file: $f" >&5
20013 echo "$as_me: error: cannot find input file: $f" >&2;}
20014 { (exit 1); exit 1; }; }
20017 done` || { (exit 1); exit 1; }
20019 cat >>$CONFIG_STATUS <<\EOF
20020 ac_warn_datarootdir=no
20021 if test x"$ac_file" != x-; then
20022 for ac_item in $ac_file_inputs
20024 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
20025 if test -n "$ac_seen"; then
20026 ac_used=`grep '@datarootdir@' $ac_item`
20027 if test -z "$ac_used"; then
20028 { echo "$as_me:20028: WARNING: datarootdir was used implicitly but not set:
20030 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
20032 ac_warn_datarootdir=yes
20035 ac_seen=`grep '${datarootdir}' $ac_item`
20036 if test -n "$ac_seen"; then
20037 { echo "$as_me:20037: WARNING: datarootdir was used explicitly but not set:
20039 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
20041 ac_warn_datarootdir=yes
20046 if test "x$ac_warn_datarootdir" = xyes; then
20047 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
20051 cat >>$CONFIG_STATUS <<EOF
20055 cat >>$CONFIG_STATUS <<\EOF
20057 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20058 s,@configure_input@,$configure_input,;t t
20059 s,@srcdir@,$ac_srcdir,;t t
20060 s,@top_srcdir@,$ac_top_srcdir,;t t
20061 s,@INSTALL@,$ac_INSTALL,;t t
20062 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20064 if test x"$ac_file" != x-; then
20065 cp $tmp/out $ac_file
20067 for ac_name in prefix exec_prefix datarootdir
20069 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
20070 if test -n "$ac_seen"; then
20071 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
20072 if test -z "$ac_init"; then
20073 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
20074 { echo "$as_me:20074: WARNING: Variable $ac_name is used but was not set:
20076 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
20081 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
20082 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
20083 if test -s $tmp/out; then
20084 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
20085 { echo "$as_me:20085: WARNING: Some variables may not be substituted:
20087 echo "$as_me: WARNING: Some variables may not be substituted:
20097 cat >>$CONFIG_STATUS <<\EOF
20100 # CONFIG_HEADER section.
20103 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20104 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20106 # ac_d sets the value in "#define NAME VALUE" lines.
20107 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
20108 ac_dB='[ ].*$,\1#\2'
20111 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20112 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20113 ac_iB='\([ ]\),\1#\2define\3'
20116 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20117 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20118 ac_uB='$,\1#\2define\3'
20122 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20123 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20125 - | *:- | *:-:* ) # input from stdin
20127 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20128 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20129 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20130 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20131 * ) ac_file_in=$ac_file.in ;;
20134 test x"$ac_file" != x- && { echo "$as_me:20134: creating $ac_file" >&5
20135 echo "$as_me: creating $ac_file" >&6;}
20137 # First look for the input files in the build tree, otherwise in the
20139 ac_file_inputs=`IFS=:
20140 for f in $ac_file_in; do
20142 -) echo $tmp/stdin ;;
20144 # Absolute (can't be DOS-style, as IFS=:)
20145 test -f "$f" || { { echo "$as_me:20145: error: cannot find input file: $f" >&5
20146 echo "$as_me: error: cannot find input file: $f" >&2;}
20147 { (exit 1); exit 1; }; }
20150 if test -f "$f"; then
20153 elif test -f "$srcdir/$f"; then
20158 { { echo "$as_me:20158: error: cannot find input file: $f" >&5
20159 echo "$as_me: error: cannot find input file: $f" >&2;}
20160 { (exit 1); exit 1; }; }
20163 done` || { (exit 1); exit 1; }
20164 # Remove the trailing spaces.
20165 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
20169 # Transform confdefs.h into a list of #define's. We won't use it as a sed
20170 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
20171 # be either 'cat' or 'sort'.
20172 cat confdefs.h | uniq >conftest.vals
20174 # Break up conftest.vals because some shells have a limit on
20175 # the size of here documents, and old seds have small limits too.
20177 rm -f conftest.tail
20178 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
20179 while grep . conftest.vals >/dev/null
20181 # Write chunks of a limited-size here document to conftest.frag.
20182 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20183 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20184 echo 'CEOF' >> $CONFIG_STATUS
20185 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20186 rm -f conftest.vals
20187 mv conftest.tail conftest.vals
20189 rm -f conftest.vals
20191 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20193 echo ' cat >> conftest.edit <<CEOF
20194 /@DEFS@/r conftest.frag
20197 sed -f conftest.edit $tmp/in > $tmp/out
20199 mv $tmp/out $tmp/in
20200 rm -f conftest.edit conftest.frag
20201 ' >> $CONFIG_STATUS
20203 cat >>$CONFIG_STATUS <<\EOF
20204 # Let's still pretend it is `configure' which instantiates (i.e., don't
20205 # use $as_me), people would be surprised to read:
20206 # /* config.h. Generated automatically by config.status. */
20207 if test x"$ac_file" = x-; then
20208 echo "/* Generated automatically by configure. */" >$tmp/config.h
20210 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
20212 cat $tmp/in >>$tmp/config.h
20214 if test x"$ac_file" != x-; then
20215 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20216 { echo "$as_me:20216: $ac_file is unchanged" >&5
20217 echo "$as_me: $ac_file is unchanged" >&6;}
20219 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20220 X"$ac_file" : 'X\(//\)[^/]' \| \
20221 X"$ac_file" : 'X\(//\)$' \| \
20222 X"$ac_file" : 'X\(/\)' \| \
20223 . : '\(.\)' 2>/dev/null ||
20225 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20226 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20227 /^X\(\/\/\)$/{ s//\1/; q; }
20228 /^X\(\/\).*/{ s//\1/; q; }
20230 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20231 { case "$ac_dir" in
20232 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20236 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20237 case $as_mkdir_dir in
20238 # Skip DOS drivespec
20239 ?:) as_incr_dir=$as_mkdir_dir ;;
20241 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20242 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20249 mv $tmp/config.h $ac_file
20253 rm -f $tmp/config.h
20257 cat >>$CONFIG_STATUS <<\EOF
20259 # CONFIG_COMMANDS section.
20261 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20262 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20263 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20270 if test ! -d $srcdir/$cf_dir; then
20272 elif test -f $srcdir/$cf_dir/programs; then
20273 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20277 cat >>Makefile <<TEST_EOF
20279 # These rules are generated so we do not rely on suffix rules, which do not
20280 # work consistently for different make-programs (the '\$(MODEL)/' confuses
20281 # some, and the '\$x' confuses others).
20284 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
20287 cat >>Makefile <<TEST_EOF
20289 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
20290 \$(srcdir)/test.priv.h \\
20293 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
20297 if test -f ../config.guess && test -f ../config.sub
20299 cat >>Makefile <<TEST_EOF
20301 # if we used CF_INHERIT for getting these files, we can remove them
20303 rm -f config.guess config.sub
20311 cat >>$CONFIG_STATUS <<\EOF
20313 { (exit 0); exit 0; }
20315 chmod +x $CONFIG_STATUS
20316 ac_clean_files=$ac_clean_files_save
20318 # configure is writing to config.log, and then calls config.status.
20319 # config.status does its own redirection, appending to config.log.
20320 # Unfortunately, on DOS this fails, as config.log is still kept open
20321 # by configure, so config.status won't be able to write to it; its
20322 # output is simply discarded. So we exec the FD to /dev/null,
20323 # effectively closing config.log, so it can be properly (re)opened and
20324 # appended to by config.status. When coming back to configure, we
20325 # need to make the FD available again.
20326 if test "$no_create" != yes; then
20329 $SHELL $CONFIG_STATUS || ac_cs_success=false
20331 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20332 # would make configure fail if this is the last instruction.
20333 $ac_cs_success || { (exit 1); exit 1; }