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
2080 echo "$as_me:2080: checking for inline" >&5
2081 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2082 if test "${ac_cv_c_inline+set}" = set; then
2083 echo $ECHO_N "(cached) $ECHO_C" >&6
2086 for ac_kw in inline __inline__ __inline; do
2087 cat >conftest.$ac_ext <<_ACEOF
2088 #line 2088 "configure"
2089 #include "confdefs.h"
2091 static $ac_kw int static_foo () {return 0; }
2092 $ac_kw int foo () {return 0; }
2096 rm -f conftest.$ac_objext
2097 if { (eval echo "$as_me:2097: \"$ac_compile\"") >&5
2098 (eval $ac_compile) 2>&5
2100 echo "$as_me:2100: \$? = $ac_status" >&5
2101 (exit $ac_status); } &&
2102 { ac_try='test -s conftest.$ac_objext'
2103 { (eval echo "$as_me:2103: \"$ac_try\"") >&5
2106 echo "$as_me:2106: \$? = $ac_status" >&5
2107 (exit $ac_status); }; }; then
2108 ac_cv_c_inline=$ac_kw; break
2110 echo "$as_me: failed program was:" >&5
2111 cat conftest.$ac_ext >&5
2113 rm -f conftest.$ac_objext conftest.$ac_ext
2117 echo "$as_me:2117: result: $ac_cv_c_inline" >&5
2118 echo "${ECHO_T}$ac_cv_c_inline" >&6
2119 case $ac_cv_c_inline in
2122 cat >>confdefs.h <<\EOF
2126 *) cat >>confdefs.h <<EOF
2127 #define inline $ac_cv_c_inline
2133 ac_cpp='$CPP $CPPFLAGS'
2134 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2135 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2136 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2137 ac_main_return=return
2138 echo "$as_me:2138: checking how to run the C preprocessor" >&5
2139 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2140 # On Suns, sometimes $CPP names a directory.
2141 if test -n "$CPP" && test -d "$CPP"; then
2144 if test -z "$CPP"; then
2145 if test "${ac_cv_prog_CPP+set}" = set; then
2146 echo $ECHO_N "(cached) $ECHO_C" >&6
2148 # Double quotes because CPP needs to be expanded
2149 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2152 for ac_c_preproc_warn_flag in '' yes
2154 # Use a header file that comes with gcc, so configuring glibc
2155 # with a fresh cross-compiler works.
2156 # On the NeXT, cc -E runs the code through the compiler's parser,
2157 # not just through cpp. "Syntax error" is here to catch this case.
2158 cat >conftest.$ac_ext <<_ACEOF
2159 #line 2159 "configure"
2160 #include "confdefs.h"
2164 if { (eval echo "$as_me:2164: \"$ac_cpp conftest.$ac_ext\"") >&5
2165 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167 egrep -v '^ *\+' conftest.er1 >conftest.err
2169 cat conftest.err >&5
2170 echo "$as_me:2170: \$? = $ac_status" >&5
2171 (exit $ac_status); } >/dev/null; then
2172 if test -s conftest.err; then
2173 ac_cpp_err=$ac_c_preproc_warn_flag
2180 if test -z "$ac_cpp_err"; then
2183 echo "$as_me: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2185 # Broken: fails on valid input.
2188 rm -f conftest.err conftest.$ac_ext
2190 # OK, works on sane cases. Now check whether non-existent headers
2191 # can be detected and how.
2192 cat >conftest.$ac_ext <<_ACEOF
2193 #line 2193 "configure"
2194 #include "confdefs.h"
2195 #include <ac_nonexistent.h>
2197 if { (eval echo "$as_me:2197: \"$ac_cpp conftest.$ac_ext\"") >&5
2198 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2200 egrep -v '^ *\+' conftest.er1 >conftest.err
2202 cat conftest.err >&5
2203 echo "$as_me:2203: \$? = $ac_status" >&5
2204 (exit $ac_status); } >/dev/null; then
2205 if test -s conftest.err; then
2206 ac_cpp_err=$ac_c_preproc_warn_flag
2213 if test -z "$ac_cpp_err"; then
2214 # Broken: success on invalid input.
2217 echo "$as_me: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 # Passes both tests.
2223 rm -f conftest.err conftest.$ac_ext
2226 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2227 rm -f conftest.err conftest.$ac_ext
2228 if $ac_preproc_ok; then
2240 echo "$as_me:2240: result: $CPP" >&5
2241 echo "${ECHO_T}$CPP" >&6
2243 for ac_c_preproc_warn_flag in '' yes
2245 # Use a header file that comes with gcc, so configuring glibc
2246 # with a fresh cross-compiler works.
2247 # On the NeXT, cc -E runs the code through the compiler's parser,
2248 # not just through cpp. "Syntax error" is here to catch this case.
2249 cat >conftest.$ac_ext <<_ACEOF
2250 #line 2250 "configure"
2251 #include "confdefs.h"
2255 if { (eval echo "$as_me:2255: \"$ac_cpp conftest.$ac_ext\"") >&5
2256 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258 egrep -v '^ *\+' conftest.er1 >conftest.err
2260 cat conftest.err >&5
2261 echo "$as_me:2261: \$? = $ac_status" >&5
2262 (exit $ac_status); } >/dev/null; then
2263 if test -s conftest.err; then
2264 ac_cpp_err=$ac_c_preproc_warn_flag
2271 if test -z "$ac_cpp_err"; then
2274 echo "$as_me: failed program was:" >&5
2275 cat conftest.$ac_ext >&5
2276 # Broken: fails on valid input.
2279 rm -f conftest.err conftest.$ac_ext
2281 # OK, works on sane cases. Now check whether non-existent headers
2282 # can be detected and how.
2283 cat >conftest.$ac_ext <<_ACEOF
2284 #line 2284 "configure"
2285 #include "confdefs.h"
2286 #include <ac_nonexistent.h>
2288 if { (eval echo "$as_me:2288: \"$ac_cpp conftest.$ac_ext\"") >&5
2289 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2291 egrep -v '^ *\+' conftest.er1 >conftest.err
2293 cat conftest.err >&5
2294 echo "$as_me:2294: \$? = $ac_status" >&5
2295 (exit $ac_status); } >/dev/null; then
2296 if test -s conftest.err; then
2297 ac_cpp_err=$ac_c_preproc_warn_flag
2304 if test -z "$ac_cpp_err"; then
2305 # Broken: success on invalid input.
2308 echo "$as_me: failed program was:" >&5
2309 cat conftest.$ac_ext >&5
2310 # Passes both tests.
2314 rm -f conftest.err conftest.$ac_ext
2317 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2318 rm -f conftest.err conftest.$ac_ext
2319 if $ac_preproc_ok; then
2322 { { echo "$as_me:2322: error: C preprocessor \"$CPP\" fails sanity check" >&5
2323 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2324 { (exit 1); exit 1; }; }
2328 ac_cpp='$CPP $CPPFLAGS'
2329 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2330 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2331 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2332 ac_main_return=return
2334 for ac_prog in mawk gawk nawk awk
2336 # Extract the first word of "$ac_prog", so it can be a program name with args.
2337 set dummy $ac_prog; ac_word=$2
2338 echo "$as_me:2338: checking for $ac_word" >&5
2339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2340 if test "${ac_cv_prog_AWK+set}" = set; then
2341 echo $ECHO_N "(cached) $ECHO_C" >&6
2343 if test -n "$AWK"; then
2344 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2346 ac_save_IFS=$IFS; IFS=$ac_path_separator
2348 for ac_dir in $ac_dummy; do
2350 test -z "$ac_dir" && ac_dir=.
2351 $as_executable_p "$ac_dir/$ac_word" || continue
2352 ac_cv_prog_AWK="$ac_prog"
2353 echo "$as_me:2353: found $ac_dir/$ac_word" >&5
2360 if test -n "$AWK"; then
2361 echo "$as_me:2361: result: $AWK" >&5
2362 echo "${ECHO_T}$AWK" >&6
2364 echo "$as_me:2364: result: no" >&5
2365 echo "${ECHO_T}no" >&6
2368 test -n "$AWK" && break
2371 # Find a good install program. We prefer a C program (faster),
2372 # so one script is as good as another. But avoid the broken or
2373 # incompatible versions:
2374 # SysV /etc/install, /usr/sbin/install
2375 # SunOS /usr/etc/install
2376 # IRIX /sbin/install
2378 # AmigaOS /C/install, which installs bootblocks on floppy discs
2379 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2380 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2381 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2382 # ./install, which can be erroneously created by make from ./install.sh.
2383 echo "$as_me:2383: checking for a BSD compatible install" >&5
2384 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2385 if test -z "$INSTALL"; then
2386 if test "${ac_cv_path_install+set}" = set; then
2387 echo $ECHO_N "(cached) $ECHO_C" >&6
2389 ac_save_IFS=$IFS; IFS=$ac_path_separator
2390 for ac_dir in $PATH; do
2392 # Account for people who put trailing slashes in PATH elements.
2394 / | ./ | .// | /cC/* \
2395 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2398 # OSF1 and SCO ODT 3.0 have their own names for install.
2399 # Don't use installbsd from OSF since it installs stuff as root
2401 for ac_prog in ginstall scoinst install; do
2402 if $as_executable_p "$ac_dir/$ac_prog"; then
2403 if test $ac_prog = install &&
2404 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2405 # AIX install. It has an incompatible calling convention.
2407 elif test $ac_prog = install &&
2408 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2409 # program-specific install script used by HP pwplus--don't use.
2412 ac_cv_path_install="$ac_dir/$ac_prog -c"
2422 if test "${ac_cv_path_install+set}" = set; then
2423 INSTALL=$ac_cv_path_install
2425 # As a last resort, use the slow shell script. We don't cache a
2426 # path for INSTALL within a source directory, because that will
2427 # break other packages using the cache if that directory is
2428 # removed, or if the path is relative.
2429 INSTALL=$ac_install_sh
2432 echo "$as_me:2432: result: $INSTALL" >&5
2433 echo "${ECHO_T}$INSTALL" >&6
2435 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2436 # It thinks the first close brace ends the variable substitution.
2437 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2439 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2441 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2447 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2448 test -z "$cf_dir" && cf_dir=.
2449 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2453 for ac_prog in lint cppcheck splint
2455 # Extract the first word of "$ac_prog", so it can be a program name with args.
2456 set dummy $ac_prog; ac_word=$2
2457 echo "$as_me:2457: checking for $ac_word" >&5
2458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2459 if test "${ac_cv_prog_LINT+set}" = set; then
2460 echo $ECHO_N "(cached) $ECHO_C" >&6
2462 if test -n "$LINT"; then
2463 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2465 ac_save_IFS=$IFS; IFS=$ac_path_separator
2467 for ac_dir in $ac_dummy; do
2469 test -z "$ac_dir" && ac_dir=.
2470 $as_executable_p "$ac_dir/$ac_word" || continue
2471 ac_cv_prog_LINT="$ac_prog"
2472 echo "$as_me:2472: found $ac_dir/$ac_word" >&5
2478 LINT=$ac_cv_prog_LINT
2479 if test -n "$LINT"; then
2480 echo "$as_me:2480: result: $LINT" >&5
2481 echo "${ECHO_T}$LINT" >&6
2483 echo "$as_me:2483: result: no" >&5
2484 echo "${ECHO_T}no" >&6
2487 test -n "$LINT" && break
2490 echo "$as_me:2490: checking if filesystem supports mixed-case filenames" >&5
2491 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2492 if test "${cf_cv_mixedcase+set}" = set; then
2493 echo $ECHO_N "(cached) $ECHO_C" >&6
2496 if test "$cross_compiling" = yes ; then
2497 case $target_alias in
2498 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2506 rm -f conftest CONFTEST
2508 if test -f CONFTEST ; then
2513 rm -f conftest CONFTEST
2517 echo "$as_me:2517: result: $cf_cv_mixedcase" >&5
2518 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2519 test "$cf_cv_mixedcase" = yes &&
2520 cat >>confdefs.h <<\EOF
2521 #define MIXEDCASE_FILENAMES 1
2524 for ac_prog in exctags ctags
2526 # Extract the first word of "$ac_prog", so it can be a program name with args.
2527 set dummy $ac_prog; ac_word=$2
2528 echo "$as_me:2528: checking for $ac_word" >&5
2529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2530 if test "${ac_cv_prog_CTAGS+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
2533 if test -n "$CTAGS"; then
2534 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2536 ac_save_IFS=$IFS; IFS=$ac_path_separator
2538 for ac_dir in $ac_dummy; do
2540 test -z "$ac_dir" && ac_dir=.
2541 $as_executable_p "$ac_dir/$ac_word" || continue
2542 ac_cv_prog_CTAGS="$ac_prog"
2543 echo "$as_me:2543: found $ac_dir/$ac_word" >&5
2549 CTAGS=$ac_cv_prog_CTAGS
2550 if test -n "$CTAGS"; then
2551 echo "$as_me:2551: result: $CTAGS" >&5
2552 echo "${ECHO_T}$CTAGS" >&6
2554 echo "$as_me:2554: result: no" >&5
2555 echo "${ECHO_T}no" >&6
2558 test -n "$CTAGS" && break
2561 for ac_prog in exetags etags
2563 # Extract the first word of "$ac_prog", so it can be a program name with args.
2564 set dummy $ac_prog; ac_word=$2
2565 echo "$as_me:2565: checking for $ac_word" >&5
2566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2567 if test "${ac_cv_prog_ETAGS+set}" = set; then
2568 echo $ECHO_N "(cached) $ECHO_C" >&6
2570 if test -n "$ETAGS"; then
2571 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2573 ac_save_IFS=$IFS; IFS=$ac_path_separator
2575 for ac_dir in $ac_dummy; do
2577 test -z "$ac_dir" && ac_dir=.
2578 $as_executable_p "$ac_dir/$ac_word" || continue
2579 ac_cv_prog_ETAGS="$ac_prog"
2580 echo "$as_me:2580: found $ac_dir/$ac_word" >&5
2586 ETAGS=$ac_cv_prog_ETAGS
2587 if test -n "$ETAGS"; then
2588 echo "$as_me:2588: result: $ETAGS" >&5
2589 echo "${ECHO_T}$ETAGS" >&6
2591 echo "$as_me:2591: result: no" >&5
2592 echo "${ECHO_T}no" >&6
2595 test -n "$ETAGS" && break
2598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2599 set dummy ${CTAGS:-ctags}; ac_word=$2
2600 echo "$as_me:2600: checking for $ac_word" >&5
2601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2603 echo $ECHO_N "(cached) $ECHO_C" >&6
2605 if test -n "$MAKE_LOWER_TAGS"; then
2606 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2608 ac_save_IFS=$IFS; IFS=$ac_path_separator
2610 for ac_dir in $ac_dummy; do
2612 test -z "$ac_dir" && ac_dir=.
2613 $as_executable_p "$ac_dir/$ac_word" || continue
2614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2615 echo "$as_me:2615: found $ac_dir/$ac_word" >&5
2619 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2623 if test -n "$MAKE_LOWER_TAGS"; then
2624 echo "$as_me:2624: result: $MAKE_LOWER_TAGS" >&5
2625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2627 echo "$as_me:2627: result: no" >&5
2628 echo "${ECHO_T}no" >&6
2631 if test "$cf_cv_mixedcase" = yes ; then
2632 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2633 set dummy ${ETAGS:-etags}; ac_word=$2
2634 echo "$as_me:2634: checking for $ac_word" >&5
2635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2637 echo $ECHO_N "(cached) $ECHO_C" >&6
2639 if test -n "$MAKE_UPPER_TAGS"; then
2640 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2642 ac_save_IFS=$IFS; IFS=$ac_path_separator
2644 for ac_dir in $ac_dummy; do
2646 test -z "$ac_dir" && ac_dir=.
2647 $as_executable_p "$ac_dir/$ac_word" || continue
2648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2649 echo "$as_me:2649: found $ac_dir/$ac_word" >&5
2653 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2657 if test -n "$MAKE_UPPER_TAGS"; then
2658 echo "$as_me:2658: result: $MAKE_UPPER_TAGS" >&5
2659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2661 echo "$as_me:2661: result: no" >&5
2662 echo "${ECHO_T}no" >&6
2669 if test "$MAKE_UPPER_TAGS" = yes ; then
2675 if test "$MAKE_LOWER_TAGS" = yes ; then
2681 echo "$as_me:2681: checking if -lm needed for math functions" >&5
2682 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2683 if test "${cf_cv_need_libm+set}" = set; then
2684 echo $ECHO_N "(cached) $ECHO_C" >&6
2687 cat >conftest.$ac_ext <<_ACEOF
2688 #line 2688 "configure"
2689 #include "confdefs.h"
2698 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2703 rm -f conftest.$ac_objext conftest$ac_exeext
2704 if { (eval echo "$as_me:2704: \"$ac_link\"") >&5
2705 (eval $ac_link) 2>&5
2707 echo "$as_me:2707: \$? = $ac_status" >&5
2708 (exit $ac_status); } &&
2709 { ac_try='test -s conftest$ac_exeext'
2710 { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit $ac_status); }; }; then
2717 echo "$as_me: failed program was:" >&5
2718 cat conftest.$ac_ext >&5
2721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2723 echo "$as_me:2723: result: $cf_cv_need_libm" >&5
2724 echo "${ECHO_T}$cf_cv_need_libm" >&6
2725 if test "$cf_cv_need_libm" = yes
2733 CC_SHARED_OPTS=unknown
2734 CPPFLAGS="$CPPFLAGS"
2736 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2737 DFT_UPR_MODEL="NORMAL"
2750 PACKAGE="ncurses-examples"
2756 TINFO_LIBS='$(LIBS_CURSES)'
2757 cf_cv_abi_version=""
2758 cf_cv_rel_version=""
2764 if test "$GCC" = yes
2766 cat > conftest.i <<EOF
2768 #define GCC_PRINTF 0
2773 #ifndef GCC_NORETURN
2774 #define GCC_NORETURN /* nothing */
2777 #define GCC_UNUSED /* nothing */
2780 if test "$GCC" = yes
2782 { echo "$as_me:2782: checking for $CC __attribute__ directives..." >&5
2783 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2785 "${as_me:-configure}"
2786 #include "confdefs.h"
2787 #include "conftest.h"
2788 #include "conftest.i"
2790 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2792 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2795 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2797 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2799 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2800 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2801 extern void foo(void) GCC_NORETURN;
2802 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2804 cf_printf_attribute=no
2805 cf_scanf_attribute=no
2806 for cf_attribute in scanf printf unused noreturn
2809 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2811 cf_directive="__attribute__(($cf_attribute))"
2812 echo "checking for $CC $cf_directive" 1>&5
2814 case $cf_attribute in
2816 cf_printf_attribute=yes
2817 cat >conftest.h <<EOF
2818 #define GCC_$cf_ATTRIBUTE 1
2822 cf_scanf_attribute=yes
2823 cat >conftest.h <<EOF
2824 #define GCC_$cf_ATTRIBUTE 1
2828 cat >conftest.h <<EOF
2829 #define GCC_$cf_ATTRIBUTE $cf_directive
2834 if { (eval echo "$as_me:2834: \"$ac_compile\"") >&5
2835 (eval $ac_compile) 2>&5
2837 echo "$as_me:2837: \$? = $ac_status" >&5
2838 (exit $ac_status); }; then
2839 test -n "$verbose" && echo "$as_me:2839: result: ... $cf_attribute" >&5
2840 echo "${ECHO_T}... $cf_attribute" >&6
2841 cat conftest.h >>confdefs.h
2842 case $cf_attribute in
2845 cat >>confdefs.h <<EOF
2846 #define GCC_NORETURN $cf_directive
2851 cf_value='/* nothing */'
2852 if test "$cf_printf_attribute" != no ; then
2853 cf_value='__attribute__((format(printf,fmt,var)))'
2855 cat >>confdefs.h <<\EOF
2856 #define GCC_PRINTF 1
2861 cat >>confdefs.h <<EOF
2862 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2867 cf_value='/* nothing */'
2868 if test "$cf_scanf_attribute" != no ; then
2869 cf_value='__attribute__((format(scanf,fmt,var)))'
2871 cat >>confdefs.h <<\EOF
2877 cat >>confdefs.h <<EOF
2878 #define GCC_SCANFLIKE(fmt,var) $cf_value
2884 cat >>confdefs.h <<EOF
2885 #define GCC_UNUSED $cf_directive
2893 fgrep define conftest.i >>confdefs.h
2898 echo "$as_me:2898: checking if you want to work around bogus compiler/loader warnings" >&5
2899 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2901 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2902 if test "${enable_string_hacks+set}" = set; then
2903 enableval="$enable_string_hacks"
2904 with_string_hacks=$enableval
2906 with_string_hacks=no
2908 echo "$as_me:2908: result: $with_string_hacks" >&5
2909 echo "${ECHO_T}$with_string_hacks" >&6
2911 if test "x$with_string_hacks" = "xyes"; then
2913 cat >>confdefs.h <<\EOF
2914 #define USE_STRING_HACKS 1
2917 { echo "$as_me:2917: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2918 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2919 echo "$as_me:2919: checking for strlcat" >&5
2920 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2921 if test "${ac_cv_func_strlcat+set}" = set; then
2922 echo $ECHO_N "(cached) $ECHO_C" >&6
2924 cat >conftest.$ac_ext <<_ACEOF
2925 #line 2925 "configure"
2926 #include "confdefs.h"
2927 /* System header to define __stub macros and hopefully few prototypes,
2928 which can conflict with char strlcat (); below. */
2930 /* Override any gcc2 internal prototype to avoid an error. */
2934 /* We use char because int might match the return type of a gcc2
2935 builtin and then its argument prototype would still apply. */
2942 /* The GNU C library defines this for functions which it implements
2943 to always fail with ENOSYS. Some functions are actually named
2944 something starting with __ and the normal name is an alias. */
2945 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2948 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
2955 rm -f conftest.$ac_objext conftest$ac_exeext
2956 if { (eval echo "$as_me:2956: \"$ac_link\"") >&5
2957 (eval $ac_link) 2>&5
2959 echo "$as_me:2959: \$? = $ac_status" >&5
2960 (exit $ac_status); } &&
2961 { ac_try='test -s conftest$ac_exeext'
2962 { (eval echo "$as_me:2962: \"$ac_try\"") >&5
2965 echo "$as_me:2965: \$? = $ac_status" >&5
2966 (exit $ac_status); }; }; then
2967 ac_cv_func_strlcat=yes
2969 echo "$as_me: failed program was:" >&5
2970 cat conftest.$ac_ext >&5
2971 ac_cv_func_strlcat=no
2973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2975 echo "$as_me:2975: result: $ac_cv_func_strlcat" >&5
2976 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
2977 if test $ac_cv_func_strlcat = yes; then
2979 cat >>confdefs.h <<\EOF
2980 #define HAVE_STRLCAT 1
2985 echo "$as_me:2985: checking for strlcat in -lbsd" >&5
2986 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
2987 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
2988 echo $ECHO_N "(cached) $ECHO_C" >&6
2990 ac_check_lib_save_LIBS=$LIBS
2992 cat >conftest.$ac_ext <<_ACEOF
2993 #line 2993 "configure"
2994 #include "confdefs.h"
2996 /* Override any gcc2 internal prototype to avoid an error. */
3000 /* We use char because int might match the return type of a gcc2
3001 builtin and then its argument prototype would still apply. */
3011 rm -f conftest.$ac_objext conftest$ac_exeext
3012 if { (eval echo "$as_me:3012: \"$ac_link\"") >&5
3013 (eval $ac_link) 2>&5
3015 echo "$as_me:3015: \$? = $ac_status" >&5
3016 (exit $ac_status); } &&
3017 { ac_try='test -s conftest$ac_exeext'
3018 { (eval echo "$as_me:3018: \"$ac_try\"") >&5
3021 echo "$as_me:3021: \$? = $ac_status" >&5
3022 (exit $ac_status); }; }; then
3023 ac_cv_lib_bsd_strlcat=yes
3025 echo "$as_me: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
3027 ac_cv_lib_bsd_strlcat=no
3029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3030 LIBS=$ac_check_lib_save_LIBS
3032 echo "$as_me:3032: result: $ac_cv_lib_bsd_strlcat" >&5
3033 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3034 if test $ac_cv_lib_bsd_strlcat = yes; then
3037 # Filter out duplicates - this happens with badly-designed ".pc" files...
3038 for cf_add_1lib in $LIBS
3040 for cf_add_2lib in $cf_add_libs
3042 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3048 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3052 for ac_header in bsd/string.h
3054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3055 echo "$as_me:3055: checking for $ac_header" >&5
3056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3058 echo $ECHO_N "(cached) $ECHO_C" >&6
3060 cat >conftest.$ac_ext <<_ACEOF
3061 #line 3061 "configure"
3062 #include "confdefs.h"
3063 #include <$ac_header>
3065 if { (eval echo "$as_me:3065: \"$ac_cpp conftest.$ac_ext\"") >&5
3066 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3068 egrep -v '^ *\+' conftest.er1 >conftest.err
3070 cat conftest.err >&5
3071 echo "$as_me:3071: \$? = $ac_status" >&5
3072 (exit $ac_status); } >/dev/null; then
3073 if test -s conftest.err; then
3074 ac_cpp_err=$ac_c_preproc_warn_flag
3081 if test -z "$ac_cpp_err"; then
3082 eval "$as_ac_Header=yes"
3084 echo "$as_me: failed program was:" >&5
3085 cat conftest.$ac_ext >&5
3086 eval "$as_ac_Header=no"
3088 rm -f conftest.err conftest.$ac_ext
3090 echo "$as_me:3090: result: `eval echo '${'$as_ac_Header'}'`" >&5
3091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3093 cat >>confdefs.h <<EOF
3094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3100 cat >>confdefs.h <<\EOF
3101 #define HAVE_STRLCAT 1
3108 for ac_func in strlcpy snprintf
3110 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3111 echo "$as_me:3111: checking for $ac_func" >&5
3112 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3113 if eval "test \"\${$as_ac_var+set}\" = set"; then
3114 echo $ECHO_N "(cached) $ECHO_C" >&6
3116 cat >conftest.$ac_ext <<_ACEOF
3117 #line 3117 "configure"
3118 #include "confdefs.h"
3119 /* System header to define __stub macros and hopefully few prototypes,
3120 which can conflict with char $ac_func (); below. */
3122 /* Override any gcc2 internal prototype to avoid an error. */
3126 /* We use char because int might match the return type of a gcc2
3127 builtin and then its argument prototype would still apply. */
3134 /* The GNU C library defines this for functions which it implements
3135 to always fail with ENOSYS. Some functions are actually named
3136 something starting with __ and the normal name is an alias. */
3137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3140 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3147 rm -f conftest.$ac_objext conftest$ac_exeext
3148 if { (eval echo "$as_me:3148: \"$ac_link\"") >&5
3149 (eval $ac_link) 2>&5
3151 echo "$as_me:3151: \$? = $ac_status" >&5
3152 (exit $ac_status); } &&
3153 { ac_try='test -s conftest$ac_exeext'
3154 { (eval echo "$as_me:3154: \"$ac_try\"") >&5
3157 echo "$as_me:3157: \$? = $ac_status" >&5
3158 (exit $ac_status); }; }; then
3159 eval "$as_ac_var=yes"
3161 echo "$as_me: failed program was:" >&5
3162 cat conftest.$ac_ext >&5
3163 eval "$as_ac_var=no"
3165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3167 echo "$as_me:3167: result: `eval echo '${'$as_ac_var'}'`" >&5
3168 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3169 if test `eval echo '${'$as_ac_var'}'` = yes; then
3170 cat >>confdefs.h <<EOF
3171 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3180 cf_POSIX_C_SOURCE=199506L
3185 cf_xopen_source="-D_ALL_SOURCE"
3191 cf_xopen_source="-D_APPLE_C_SOURCE"
3194 cf_xopen_source="-D_DARWIN_C_SOURCE"
3197 (freebsd*|dragonfly*)
3198 # 5.x headers associate
3199 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3200 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3201 cf_POSIX_C_SOURCE=200112L
3203 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3206 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3209 cf_xopen_source="-D_HPUX_SOURCE"
3212 cf_xopen_source="-D_SGI_SOURCE"
3215 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3217 echo "$as_me:3217: checking if we must define _GNU_SOURCE" >&5
3218 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3219 if test "${cf_cv_gnu_source+set}" = set; then
3220 echo $ECHO_N "(cached) $ECHO_C" >&6
3223 cat >conftest.$ac_ext <<_ACEOF
3224 #line 3224 "configure"
3225 #include "confdefs.h"
3226 #include <sys/types.h>
3231 #ifndef _XOPEN_SOURCE
3238 rm -f conftest.$ac_objext
3239 if { (eval echo "$as_me:3239: \"$ac_compile\"") >&5
3240 (eval $ac_compile) 2>&5
3242 echo "$as_me:3242: \$? = $ac_status" >&5
3243 (exit $ac_status); } &&
3244 { ac_try='test -s conftest.$ac_objext'
3245 { (eval echo "$as_me:3245: \"$ac_try\"") >&5
3248 echo "$as_me:3248: \$? = $ac_status" >&5
3249 (exit $ac_status); }; }; then
3252 echo "$as_me: failed program was:" >&5
3253 cat conftest.$ac_ext >&5
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 _XOPEN_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
3285 echo "$as_me: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3287 cf_cv_gnu_source=yes
3289 rm -f conftest.$ac_objext conftest.$ac_ext
3293 rm -f conftest.$ac_objext conftest.$ac_ext
3296 echo "$as_me:3296: result: $cf_cv_gnu_source" >&5
3297 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3299 if test "$cf_cv_gnu_source" = yes
3301 echo "$as_me:3301: checking if we should also define _DEFAULT_SOURCE" >&5
3302 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3303 if test "${cf_cv_default_source+set}" = set; then
3304 echo $ECHO_N "(cached) $ECHO_C" >&6
3307 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3308 cat >conftest.$ac_ext <<_ACEOF
3309 #line 3309 "configure"
3310 #include "confdefs.h"
3311 #include <sys/types.h>
3316 #ifdef _DEFAULT_SOURCE
3323 rm -f conftest.$ac_objext
3324 if { (eval echo "$as_me:3324: \"$ac_compile\"") >&5
3325 (eval $ac_compile) 2>&5
3327 echo "$as_me:3327: \$? = $ac_status" >&5
3328 (exit $ac_status); } &&
3329 { ac_try='test -s conftest.$ac_objext'
3330 { (eval echo "$as_me:3330: \"$ac_try\"") >&5
3333 echo "$as_me:3333: \$? = $ac_status" >&5
3334 (exit $ac_status); }; }; then
3335 cf_cv_default_source=no
3337 echo "$as_me: failed program was:" >&5
3338 cat conftest.$ac_ext >&5
3339 cf_cv_default_source=yes
3341 rm -f conftest.$ac_objext conftest.$ac_ext
3344 echo "$as_me:3344: result: $cf_cv_default_source" >&5
3345 echo "${ECHO_T}$cf_cv_default_source" >&6
3346 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3351 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3354 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3357 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3359 cf_save_CFLAGS="$CFLAGS"
3360 cf_save_CPPFLAGS="$CPPFLAGS"
3362 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3363 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3364 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3366 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3367 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3368 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3370 echo "$as_me:3370: checking if we should define _POSIX_C_SOURCE" >&5
3371 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3372 if test "${cf_cv_posix_c_source+set}" = set; then
3373 echo $ECHO_N "(cached) $ECHO_C" >&6
3376 echo "${as_me:-configure}:3376: testing if the symbol is already defined go no further ..." 1>&5
3378 cat >conftest.$ac_ext <<_ACEOF
3379 #line 3379 "configure"
3380 #include "confdefs.h"
3381 #include <sys/types.h>
3386 #ifndef _POSIX_C_SOURCE
3393 rm -f conftest.$ac_objext
3394 if { (eval echo "$as_me:3394: \"$ac_compile\"") >&5
3395 (eval $ac_compile) 2>&5
3397 echo "$as_me:3397: \$? = $ac_status" >&5
3398 (exit $ac_status); } &&
3399 { ac_try='test -s conftest.$ac_objext'
3400 { (eval echo "$as_me:3400: \"$ac_try\"") >&5
3403 echo "$as_me:3403: \$? = $ac_status" >&5
3404 (exit $ac_status); }; }; then
3405 cf_cv_posix_c_source=no
3407 echo "$as_me: failed program was:" >&5
3408 cat conftest.$ac_ext >&5
3409 cf_want_posix_source=no
3410 case .$cf_POSIX_C_SOURCE in
3412 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3415 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3416 cf_want_posix_source=yes
3419 cf_want_posix_source=yes
3422 if test "$cf_want_posix_source" = yes ; then
3423 cat >conftest.$ac_ext <<_ACEOF
3424 #line 3424 "configure"
3425 #include "confdefs.h"
3426 #include <sys/types.h>
3431 #ifdef _POSIX_SOURCE
3438 rm -f conftest.$ac_objext
3439 if { (eval echo "$as_me:3439: \"$ac_compile\"") >&5
3440 (eval $ac_compile) 2>&5
3442 echo "$as_me:3442: \$? = $ac_status" >&5
3443 (exit $ac_status); } &&
3444 { ac_try='test -s conftest.$ac_objext'
3445 { (eval echo "$as_me:3445: \"$ac_try\"") >&5
3448 echo "$as_me:3448: \$? = $ac_status" >&5
3449 (exit $ac_status); }; }; then
3452 echo "$as_me: failed program was:" >&5
3453 cat conftest.$ac_ext >&5
3454 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3456 rm -f conftest.$ac_objext conftest.$ac_ext
3459 echo "${as_me:-configure}:3459: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3461 CFLAGS="$cf_trim_CFLAGS"
3462 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3464 echo "${as_me:-configure}:3464: testing if the second compile does not leave our definition intact error ..." 1>&5
3466 cat >conftest.$ac_ext <<_ACEOF
3467 #line 3467 "configure"
3468 #include "confdefs.h"
3469 #include <sys/types.h>
3474 #ifndef _POSIX_C_SOURCE
3481 rm -f conftest.$ac_objext
3482 if { (eval echo "$as_me:3482: \"$ac_compile\"") >&5
3483 (eval $ac_compile) 2>&5
3485 echo "$as_me:3485: \$? = $ac_status" >&5
3486 (exit $ac_status); } &&
3487 { ac_try='test -s conftest.$ac_objext'
3488 { (eval echo "$as_me:3488: \"$ac_try\"") >&5
3491 echo "$as_me:3491: \$? = $ac_status" >&5
3492 (exit $ac_status); }; }; then
3495 echo "$as_me: failed program was:" >&5
3496 cat conftest.$ac_ext >&5
3497 cf_cv_posix_c_source=no
3499 rm -f conftest.$ac_objext conftest.$ac_ext
3500 CFLAGS="$cf_save_CFLAGS"
3501 CPPFLAGS="$cf_save_CPPFLAGS"
3504 rm -f conftest.$ac_objext conftest.$ac_ext
3507 echo "$as_me:3507: result: $cf_cv_posix_c_source" >&5
3508 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3510 if test "$cf_cv_posix_c_source" != no ; then
3511 CFLAGS="$cf_trim_CFLAGS"
3512 CPPFLAGS="$cf_trim_CPPFLAGS"
3517 cf_new_extra_cppflags=
3519 for cf_add_cflags in $cf_cv_posix_c_source
3521 case $cf_fix_cppflags in
3523 case $cf_add_cflags in
3524 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3525 case $cf_add_cflags in
3527 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3529 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3530 && test -z "${cf_tst_cflags}" \
3531 && cf_fix_cppflags=yes
3533 if test $cf_fix_cppflags = yes ; then
3535 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3536 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3539 elif test "${cf_tst_cflags}" = "\"'" ; then
3541 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3542 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3552 case $cf_add_cflags in
3554 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3556 CPPFLAGS=`echo "$CPPFLAGS" | \
3557 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3558 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3563 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3564 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3571 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3572 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3579 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3580 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3582 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3584 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3585 && test -z "${cf_tst_cflags}" \
3586 && cf_fix_cppflags=no
3591 if test -n "$cf_new_cflags" ; then
3593 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3594 CFLAGS="${CFLAGS}$cf_new_cflags"
3598 if test -n "$cf_new_cppflags" ; then
3600 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3601 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3605 if test -n "$cf_new_extra_cppflags" ; then
3607 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3608 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3616 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3619 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3620 cf_xopen_source="-D_BSD_SOURCE"
3624 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3627 cf_xopen_source="-D_OSF_SOURCE"
3630 cf_xopen_source="-D_QNX_SOURCE"
3633 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3636 cf_xopen_source="-D__EXTENSIONS__"
3637 cf_cv_xopen_source=broken
3639 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3645 echo "$as_me:3645: checking if we should define _XOPEN_SOURCE" >&5
3646 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3647 if test "${cf_cv_xopen_source+set}" = set; then
3648 echo $ECHO_N "(cached) $ECHO_C" >&6
3651 cat >conftest.$ac_ext <<_ACEOF
3652 #line 3652 "configure"
3653 #include "confdefs.h"
3657 #include <sys/types.h>
3663 #ifndef _XOPEN_SOURCE
3670 rm -f conftest.$ac_objext
3671 if { (eval echo "$as_me:3671: \"$ac_compile\"") >&5
3672 (eval $ac_compile) 2>&5
3674 echo "$as_me:3674: \$? = $ac_status" >&5
3675 (exit $ac_status); } &&
3676 { ac_try='test -s conftest.$ac_objext'
3677 { (eval echo "$as_me:3677: \"$ac_try\"") >&5
3680 echo "$as_me:3680: \$? = $ac_status" >&5
3681 (exit $ac_status); }; }; then
3682 cf_cv_xopen_source=no
3684 echo "$as_me: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3687 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3688 cat >conftest.$ac_ext <<_ACEOF
3689 #line 3689 "configure"
3690 #include "confdefs.h"
3694 #include <sys/types.h>
3700 #ifdef _XOPEN_SOURCE
3707 rm -f conftest.$ac_objext
3708 if { (eval echo "$as_me:3708: \"$ac_compile\"") >&5
3709 (eval $ac_compile) 2>&5
3711 echo "$as_me:3711: \$? = $ac_status" >&5
3712 (exit $ac_status); } &&
3713 { ac_try='test -s conftest.$ac_objext'
3714 { (eval echo "$as_me:3714: \"$ac_try\"") >&5
3717 echo "$as_me:3717: \$? = $ac_status" >&5
3718 (exit $ac_status); }; }; then
3719 cf_cv_xopen_source=no
3721 echo "$as_me: failed program was:" >&5
3722 cat conftest.$ac_ext >&5
3723 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3725 rm -f conftest.$ac_objext conftest.$ac_ext
3729 rm -f conftest.$ac_objext conftest.$ac_ext
3732 echo "$as_me:3732: result: $cf_cv_xopen_source" >&5
3733 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3735 if test "$cf_cv_xopen_source" != no ; then
3737 CFLAGS=`echo "$CFLAGS" | \
3738 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3739 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3741 CPPFLAGS=`echo "$CPPFLAGS" | \
3742 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3743 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3745 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3750 cf_new_extra_cppflags=
3752 for cf_add_cflags in $cf_temp_xopen_source
3754 case $cf_fix_cppflags in
3756 case $cf_add_cflags in
3757 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3758 case $cf_add_cflags in
3760 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3762 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3763 && test -z "${cf_tst_cflags}" \
3764 && cf_fix_cppflags=yes
3766 if test $cf_fix_cppflags = yes ; then
3768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3772 elif test "${cf_tst_cflags}" = "\"'" ; then
3774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3785 case $cf_add_cflags in
3787 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3789 CPPFLAGS=`echo "$CPPFLAGS" | \
3790 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3791 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3796 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3797 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3804 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3805 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3812 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3813 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3815 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3817 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3818 && test -z "${cf_tst_cflags}" \
3819 && cf_fix_cppflags=no
3824 if test -n "$cf_new_cflags" ; then
3826 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3827 CFLAGS="${CFLAGS}$cf_new_cflags"
3831 if test -n "$cf_new_cppflags" ; then
3833 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3834 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3838 if test -n "$cf_new_extra_cppflags" ; then
3840 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3841 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3847 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3849 cf_save_CFLAGS="$CFLAGS"
3850 cf_save_CPPFLAGS="$CPPFLAGS"
3852 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3853 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3854 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3856 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3857 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3858 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3860 echo "$as_me:3860: checking if we should define _POSIX_C_SOURCE" >&5
3861 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3862 if test "${cf_cv_posix_c_source+set}" = set; then
3863 echo $ECHO_N "(cached) $ECHO_C" >&6
3866 echo "${as_me:-configure}:3866: testing if the symbol is already defined go no further ..." 1>&5
3868 cat >conftest.$ac_ext <<_ACEOF
3869 #line 3869 "configure"
3870 #include "confdefs.h"
3871 #include <sys/types.h>
3876 #ifndef _POSIX_C_SOURCE
3883 rm -f conftest.$ac_objext
3884 if { (eval echo "$as_me:3884: \"$ac_compile\"") >&5
3885 (eval $ac_compile) 2>&5
3887 echo "$as_me:3887: \$? = $ac_status" >&5
3888 (exit $ac_status); } &&
3889 { ac_try='test -s conftest.$ac_objext'
3890 { (eval echo "$as_me:3890: \"$ac_try\"") >&5
3893 echo "$as_me:3893: \$? = $ac_status" >&5
3894 (exit $ac_status); }; }; then
3895 cf_cv_posix_c_source=no
3897 echo "$as_me: failed program was:" >&5
3898 cat conftest.$ac_ext >&5
3899 cf_want_posix_source=no
3900 case .$cf_POSIX_C_SOURCE in
3902 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3905 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3906 cf_want_posix_source=yes
3909 cf_want_posix_source=yes
3912 if test "$cf_want_posix_source" = yes ; then
3913 cat >conftest.$ac_ext <<_ACEOF
3914 #line 3914 "configure"
3915 #include "confdefs.h"
3916 #include <sys/types.h>
3921 #ifdef _POSIX_SOURCE
3928 rm -f conftest.$ac_objext
3929 if { (eval echo "$as_me:3929: \"$ac_compile\"") >&5
3930 (eval $ac_compile) 2>&5
3932 echo "$as_me:3932: \$? = $ac_status" >&5
3933 (exit $ac_status); } &&
3934 { ac_try='test -s conftest.$ac_objext'
3935 { (eval echo "$as_me:3935: \"$ac_try\"") >&5
3938 echo "$as_me:3938: \$? = $ac_status" >&5
3939 (exit $ac_status); }; }; then
3942 echo "$as_me: failed program was:" >&5
3943 cat conftest.$ac_ext >&5
3944 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3946 rm -f conftest.$ac_objext conftest.$ac_ext
3949 echo "${as_me:-configure}:3949: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3951 CFLAGS="$cf_trim_CFLAGS"
3952 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3954 echo "${as_me:-configure}:3954: testing if the second compile does not leave our definition intact error ..." 1>&5
3956 cat >conftest.$ac_ext <<_ACEOF
3957 #line 3957 "configure"
3958 #include "confdefs.h"
3959 #include <sys/types.h>
3964 #ifndef _POSIX_C_SOURCE
3971 rm -f conftest.$ac_objext
3972 if { (eval echo "$as_me:3972: \"$ac_compile\"") >&5
3973 (eval $ac_compile) 2>&5
3975 echo "$as_me:3975: \$? = $ac_status" >&5
3976 (exit $ac_status); } &&
3977 { ac_try='test -s conftest.$ac_objext'
3978 { (eval echo "$as_me:3978: \"$ac_try\"") >&5
3981 echo "$as_me:3981: \$? = $ac_status" >&5
3982 (exit $ac_status); }; }; then
3985 echo "$as_me: failed program was:" >&5
3986 cat conftest.$ac_ext >&5
3987 cf_cv_posix_c_source=no
3989 rm -f conftest.$ac_objext conftest.$ac_ext
3990 CFLAGS="$cf_save_CFLAGS"
3991 CPPFLAGS="$cf_save_CPPFLAGS"
3994 rm -f conftest.$ac_objext conftest.$ac_ext
3997 echo "$as_me:3997: result: $cf_cv_posix_c_source" >&5
3998 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4000 if test "$cf_cv_posix_c_source" != no ; then
4001 CFLAGS="$cf_trim_CFLAGS"
4002 CPPFLAGS="$cf_trim_CPPFLAGS"
4007 cf_new_extra_cppflags=
4009 for cf_add_cflags in $cf_cv_posix_c_source
4011 case $cf_fix_cppflags in
4013 case $cf_add_cflags in
4014 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4015 case $cf_add_cflags in
4017 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4020 && test -z "${cf_tst_cflags}" \
4021 && cf_fix_cppflags=yes
4023 if test $cf_fix_cppflags = yes ; then
4025 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4026 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4029 elif test "${cf_tst_cflags}" = "\"'" ; then
4031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4042 case $cf_add_cflags in
4044 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4046 CPPFLAGS=`echo "$CPPFLAGS" | \
4047 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4048 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4053 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4054 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4061 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4062 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4069 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4070 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4072 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4075 && test -z "${cf_tst_cflags}" \
4076 && cf_fix_cppflags=no
4081 if test -n "$cf_new_cflags" ; then
4083 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4084 CFLAGS="${CFLAGS}$cf_new_cflags"
4088 if test -n "$cf_new_cppflags" ; then
4090 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4091 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4095 if test -n "$cf_new_extra_cppflags" ; then
4097 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4098 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4107 if test -n "$cf_xopen_source" ; then
4112 cf_new_extra_cppflags=
4114 for cf_add_cflags in $cf_xopen_source
4116 case $cf_fix_cppflags in
4118 case $cf_add_cflags in
4119 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4120 case $cf_add_cflags in
4122 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4125 && test -z "${cf_tst_cflags}" \
4126 && cf_fix_cppflags=yes
4128 if test $cf_fix_cppflags = yes ; then
4130 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4131 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4134 elif test "${cf_tst_cflags}" = "\"'" ; then
4136 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4137 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4147 case $cf_add_cflags in
4149 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4151 CPPFLAGS=`echo "$CPPFLAGS" | \
4152 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4153 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4158 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4159 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4166 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4167 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4174 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4175 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4177 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4179 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4180 && test -z "${cf_tst_cflags}" \
4181 && cf_fix_cppflags=no
4186 if test -n "$cf_new_cflags" ; then
4187 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4189 echo "${as_me:-configure}:4189: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4191 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4192 CFLAGS="${CFLAGS}$cf_new_cflags"
4196 if test -n "$cf_new_cppflags" ; then
4197 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4199 echo "${as_me:-configure}:4199: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4201 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4202 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4206 if test -n "$cf_new_extra_cppflags" ; then
4207 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4209 echo "${as_me:-configure}:4209: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4211 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4212 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4218 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4219 echo "$as_me:4219: checking if _XOPEN_SOURCE really is set" >&5
4220 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4221 cat >conftest.$ac_ext <<_ACEOF
4222 #line 4222 "configure"
4223 #include "confdefs.h"
4229 #ifndef _XOPEN_SOURCE
4236 rm -f conftest.$ac_objext
4237 if { (eval echo "$as_me:4237: \"$ac_compile\"") >&5
4238 (eval $ac_compile) 2>&5
4240 echo "$as_me:4240: \$? = $ac_status" >&5
4241 (exit $ac_status); } &&
4242 { ac_try='test -s conftest.$ac_objext'
4243 { (eval echo "$as_me:4243: \"$ac_try\"") >&5
4246 echo "$as_me:4246: \$? = $ac_status" >&5
4247 (exit $ac_status); }; }; then
4248 cf_XOPEN_SOURCE_set=yes
4250 echo "$as_me: failed program was:" >&5
4251 cat conftest.$ac_ext >&5
4252 cf_XOPEN_SOURCE_set=no
4254 rm -f conftest.$ac_objext conftest.$ac_ext
4255 echo "$as_me:4255: result: $cf_XOPEN_SOURCE_set" >&5
4256 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4257 if test $cf_XOPEN_SOURCE_set = yes
4259 cat >conftest.$ac_ext <<_ACEOF
4260 #line 4260 "configure"
4261 #include "confdefs.h"
4267 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4274 rm -f conftest.$ac_objext
4275 if { (eval echo "$as_me:4275: \"$ac_compile\"") >&5
4276 (eval $ac_compile) 2>&5
4278 echo "$as_me:4278: \$? = $ac_status" >&5
4279 (exit $ac_status); } &&
4280 { ac_try='test -s conftest.$ac_objext'
4281 { (eval echo "$as_me:4281: \"$ac_try\"") >&5
4284 echo "$as_me:4284: \$? = $ac_status" >&5
4285 (exit $ac_status); }; }; then
4286 cf_XOPEN_SOURCE_set_ok=yes
4288 echo "$as_me: failed program was:" >&5
4289 cat conftest.$ac_ext >&5
4290 cf_XOPEN_SOURCE_set_ok=no
4292 rm -f conftest.$ac_objext conftest.$ac_ext
4293 if test $cf_XOPEN_SOURCE_set_ok = no
4295 { echo "$as_me:4295: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4296 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4300 echo "$as_me:4300: checking if we should define _XOPEN_SOURCE" >&5
4301 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4302 if test "${cf_cv_xopen_source+set}" = set; then
4303 echo $ECHO_N "(cached) $ECHO_C" >&6
4306 cat >conftest.$ac_ext <<_ACEOF
4307 #line 4307 "configure"
4308 #include "confdefs.h"
4312 #include <sys/types.h>
4318 #ifndef _XOPEN_SOURCE
4325 rm -f conftest.$ac_objext
4326 if { (eval echo "$as_me:4326: \"$ac_compile\"") >&5
4327 (eval $ac_compile) 2>&5
4329 echo "$as_me:4329: \$? = $ac_status" >&5
4330 (exit $ac_status); } &&
4331 { ac_try='test -s conftest.$ac_objext'
4332 { (eval echo "$as_me:4332: \"$ac_try\"") >&5
4335 echo "$as_me:4335: \$? = $ac_status" >&5
4336 (exit $ac_status); }; }; then
4337 cf_cv_xopen_source=no
4339 echo "$as_me: failed program was:" >&5
4340 cat conftest.$ac_ext >&5
4342 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4343 cat >conftest.$ac_ext <<_ACEOF
4344 #line 4344 "configure"
4345 #include "confdefs.h"
4349 #include <sys/types.h>
4355 #ifdef _XOPEN_SOURCE
4362 rm -f conftest.$ac_objext
4363 if { (eval echo "$as_me:4363: \"$ac_compile\"") >&5
4364 (eval $ac_compile) 2>&5
4366 echo "$as_me:4366: \$? = $ac_status" >&5
4367 (exit $ac_status); } &&
4368 { ac_try='test -s conftest.$ac_objext'
4369 { (eval echo "$as_me:4369: \"$ac_try\"") >&5
4372 echo "$as_me:4372: \$? = $ac_status" >&5
4373 (exit $ac_status); }; }; then
4374 cf_cv_xopen_source=no
4376 echo "$as_me: failed program was:" >&5
4377 cat conftest.$ac_ext >&5
4378 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4380 rm -f conftest.$ac_objext conftest.$ac_ext
4384 rm -f conftest.$ac_objext conftest.$ac_ext
4387 echo "$as_me:4387: result: $cf_cv_xopen_source" >&5
4388 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4390 if test "$cf_cv_xopen_source" != no ; then
4392 CFLAGS=`echo "$CFLAGS" | \
4393 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4394 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4396 CPPFLAGS=`echo "$CPPFLAGS" | \
4397 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4398 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4400 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4405 cf_new_extra_cppflags=
4407 for cf_add_cflags in $cf_temp_xopen_source
4409 case $cf_fix_cppflags in
4411 case $cf_add_cflags in
4412 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4413 case $cf_add_cflags in
4415 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4417 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4418 && test -z "${cf_tst_cflags}" \
4419 && cf_fix_cppflags=yes
4421 if test $cf_fix_cppflags = yes ; then
4423 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4424 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4427 elif test "${cf_tst_cflags}" = "\"'" ; then
4429 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4430 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4440 case $cf_add_cflags in
4442 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4444 CPPFLAGS=`echo "$CPPFLAGS" | \
4445 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4446 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4451 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4452 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4459 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4460 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4470 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4473 && test -z "${cf_tst_cflags}" \
4474 && cf_fix_cppflags=no
4479 if test -n "$cf_new_cflags" ; then
4481 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4482 CFLAGS="${CFLAGS}$cf_new_cflags"
4486 if test -n "$cf_new_cppflags" ; then
4488 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4489 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4493 if test -n "$cf_new_extra_cppflags" ; then
4495 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4496 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4505 echo "$as_me:4505: checking for signal global datatype" >&5
4506 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4507 if test "${cf_cv_sig_atomic_t+set}" = set; then
4508 echo $ECHO_N "(cached) $ECHO_C" >&6
4512 "volatile sig_atomic_t" \
4516 cat >conftest.$ac_ext <<_ACEOF
4517 #line 4517 "configure"
4518 #include "confdefs.h"
4520 #include <sys/types.h>
4526 static void handler(int sig)
4533 signal(SIGINT, handler);
4539 rm -f conftest.$ac_objext
4540 if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541 (eval $ac_compile) 2>&5
4543 echo "$as_me:4543: \$? = $ac_status" >&5
4544 (exit $ac_status); } &&
4545 { ac_try='test -s conftest.$ac_objext'
4546 { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit $ac_status); }; }; then
4551 cf_cv_sig_atomic_t=$cf_type
4553 echo "$as_me: failed program was:" >&5
4554 cat conftest.$ac_ext >&5
4555 cf_cv_sig_atomic_t=no
4557 rm -f conftest.$ac_objext conftest.$ac_ext
4558 test "$cf_cv_sig_atomic_t" != no && break
4563 echo "$as_me:4563: result: $cf_cv_sig_atomic_t" >&5
4564 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4565 test "$cf_cv_sig_atomic_t" != no &&
4566 cat >>confdefs.h <<EOF
4567 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4570 # Work around breakage on OS X
4572 echo "$as_me:4572: checking if SIGWINCH is defined" >&5
4573 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4574 if test "${cf_cv_define_sigwinch+set}" = set; then
4575 echo $ECHO_N "(cached) $ECHO_C" >&6
4578 cat >conftest.$ac_ext <<_ACEOF
4579 #line 4579 "configure"
4580 #include "confdefs.h"
4582 #include <sys/types.h>
4583 #include <sys/signal.h>
4593 rm -f conftest.$ac_objext
4594 if { (eval echo "$as_me:4594: \"$ac_compile\"") >&5
4595 (eval $ac_compile) 2>&5
4597 echo "$as_me:4597: \$? = $ac_status" >&5
4598 (exit $ac_status); } &&
4599 { ac_try='test -s conftest.$ac_objext'
4600 { (eval echo "$as_me:4600: \"$ac_try\"") >&5
4603 echo "$as_me:4603: \$? = $ac_status" >&5
4604 (exit $ac_status); }; }; then
4605 cf_cv_define_sigwinch=yes
4607 echo "$as_me: failed program was:" >&5
4608 cat conftest.$ac_ext >&5
4609 cat >conftest.$ac_ext <<_ACEOF
4610 #line 4610 "configure"
4611 #include "confdefs.h"
4613 #undef _XOPEN_SOURCE
4614 #undef _POSIX_SOURCE
4615 #undef _POSIX_C_SOURCE
4616 #include <sys/types.h>
4617 #include <sys/signal.h>
4627 rm -f conftest.$ac_objext
4628 if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5
4629 (eval $ac_compile) 2>&5
4631 echo "$as_me:4631: \$? = $ac_status" >&5
4632 (exit $ac_status); } &&
4633 { ac_try='test -s conftest.$ac_objext'
4634 { (eval echo "$as_me:4634: \"$ac_try\"") >&5
4637 echo "$as_me:4637: \$? = $ac_status" >&5
4638 (exit $ac_status); }; }; then
4639 cf_cv_define_sigwinch=maybe
4641 echo "$as_me: failed program was:" >&5
4642 cat conftest.$ac_ext >&5
4643 cf_cv_define_sigwinch=no
4645 rm -f conftest.$ac_objext conftest.$ac_ext
4648 rm -f conftest.$ac_objext conftest.$ac_ext
4651 echo "$as_me:4651: result: $cf_cv_define_sigwinch" >&5
4652 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4654 if test "$cf_cv_define_sigwinch" = maybe ; then
4655 echo "$as_me:4655: checking for actual SIGWINCH definition" >&5
4656 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4657 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4658 echo $ECHO_N "(cached) $ECHO_C" >&6
4661 cf_cv_fixup_sigwinch=unknown
4663 while test $cf_sigwinch != 1
4665 cat >conftest.$ac_ext <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4669 #undef _XOPEN_SOURCE
4670 #undef _POSIX_SOURCE
4671 #undef _POSIX_C_SOURCE
4672 #include <sys/types.h>
4673 #include <sys/signal.h>
4679 #if SIGWINCH != $cf_sigwinch
4687 rm -f conftest.$ac_objext
4688 if { (eval echo "$as_me:4688: \"$ac_compile\"") >&5
4689 (eval $ac_compile) 2>&5
4691 echo "$as_me:4691: \$? = $ac_status" >&5
4692 (exit $ac_status); } &&
4693 { ac_try='test -s conftest.$ac_objext'
4694 { (eval echo "$as_me:4694: \"$ac_try\"") >&5
4697 echo "$as_me:4697: \$? = $ac_status" >&5
4698 (exit $ac_status); }; }; then
4699 cf_cv_fixup_sigwinch=$cf_sigwinch
4702 echo "$as_me: failed program was:" >&5
4703 cat conftest.$ac_ext >&5
4705 rm -f conftest.$ac_objext conftest.$ac_ext
4707 cf_sigwinch=`expr $cf_sigwinch - 1`
4711 echo "$as_me:4711: result: $cf_cv_fixup_sigwinch" >&5
4712 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4714 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4715 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4719 # Checks for CODESET support.
4721 echo "$as_me:4721: checking for nl_langinfo and CODESET" >&5
4722 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4723 if test "${am_cv_langinfo_codeset+set}" = set; then
4724 echo $ECHO_N "(cached) $ECHO_C" >&6
4726 cat >conftest.$ac_ext <<_ACEOF
4727 #line 4727 "configure"
4728 #include "confdefs.h"
4729 #include <langinfo.h>
4733 char* cs = nl_langinfo(CODESET);
4738 rm -f conftest.$ac_objext conftest$ac_exeext
4739 if { (eval echo "$as_me:4739: \"$ac_link\"") >&5
4740 (eval $ac_link) 2>&5
4742 echo "$as_me:4742: \$? = $ac_status" >&5
4743 (exit $ac_status); } &&
4744 { ac_try='test -s conftest$ac_exeext'
4745 { (eval echo "$as_me:4745: \"$ac_try\"") >&5
4748 echo "$as_me:4748: \$? = $ac_status" >&5
4749 (exit $ac_status); }; }; then
4750 am_cv_langinfo_codeset=yes
4752 echo "$as_me: failed program was:" >&5
4753 cat conftest.$ac_ext >&5
4754 am_cv_langinfo_codeset=no
4756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4759 echo "$as_me:4759: result: $am_cv_langinfo_codeset" >&5
4760 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4761 if test $am_cv_langinfo_codeset = yes; then
4763 cat >>confdefs.h <<\EOF
4764 #define HAVE_LANGINFO_CODESET 1
4769 echo "$as_me:4769: checking if you want to use pkg-config" >&5
4770 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4772 # Check whether --with-pkg-config or --without-pkg-config was given.
4773 if test "${with_pkg_config+set}" = set; then
4774 withval="$with_pkg_config"
4775 cf_pkg_config=$withval
4779 echo "$as_me:4779: result: $cf_pkg_config" >&5
4780 echo "${ECHO_T}$cf_pkg_config" >&6
4782 case $cf_pkg_config in
4788 if test -n "$ac_tool_prefix"; then
4789 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4790 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4791 echo "$as_me:4791: checking for $ac_word" >&5
4792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4793 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4794 echo $ECHO_N "(cached) $ECHO_C" >&6
4798 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4801 ac_save_IFS=$IFS; IFS=$ac_path_separator
4803 for ac_dir in $ac_dummy; do
4805 test -z "$ac_dir" && ac_dir=.
4806 if $as_executable_p "$ac_dir/$ac_word"; then
4807 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4808 echo "$as_me:4808: found $ac_dir/$ac_word" >&5
4816 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4818 if test -n "$PKG_CONFIG"; then
4819 echo "$as_me:4819: result: $PKG_CONFIG" >&5
4820 echo "${ECHO_T}$PKG_CONFIG" >&6
4822 echo "$as_me:4822: result: no" >&5
4823 echo "${ECHO_T}no" >&6
4827 if test -z "$ac_cv_path_PKG_CONFIG"; then
4828 ac_pt_PKG_CONFIG=$PKG_CONFIG
4829 # Extract the first word of "pkg-config", so it can be a program name with args.
4830 set dummy pkg-config; ac_word=$2
4831 echo "$as_me:4831: checking for $ac_word" >&5
4832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4833 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4834 echo $ECHO_N "(cached) $ECHO_C" >&6
4836 case $ac_pt_PKG_CONFIG in
4838 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4841 ac_save_IFS=$IFS; IFS=$ac_path_separator
4843 for ac_dir in $ac_dummy; do
4845 test -z "$ac_dir" && ac_dir=.
4846 if $as_executable_p "$ac_dir/$ac_word"; then
4847 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4853 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4857 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4859 if test -n "$ac_pt_PKG_CONFIG"; then
4860 echo "$as_me:4860: result: $ac_pt_PKG_CONFIG" >&5
4861 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4863 echo "$as_me:4863: result: no" >&5
4864 echo "${ECHO_T}no" >&6
4867 PKG_CONFIG=$ac_pt_PKG_CONFIG
4869 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4878 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4879 if test "$PKG_CONFIG" != none ; then
4881 if test "x$prefix" != xNONE; then
4882 cf_path_syntax="$prefix"
4884 cf_path_syntax="$ac_default_prefix"
4887 case ".$PKG_CONFIG" in
4892 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4894 (.\${*prefix}*|.\${*dir}*)
4895 eval PKG_CONFIG="$PKG_CONFIG"
4896 case ".$PKG_CONFIG" in
4898 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4903 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4906 { { echo "$as_me:4906: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4907 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4908 { (exit 1); exit 1; }; }
4912 elif test "x$cf_pkg_config" != xno ; then
4913 { echo "$as_me:4913: WARNING: pkg-config is not installed" >&5
4914 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4917 echo "$as_me:4917: checking if you want to see long compiling messages" >&5
4918 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4920 # Check whether --enable-echo or --disable-echo was given.
4921 if test "${enable_echo+set}" = set; then
4922 enableval="$enable_echo"
4923 test "$enableval" != no && enableval=yes
4924 if test "$enableval" != "yes" ; then
4927 ECHO_LD='@echo linking $@;'
4928 RULE_CC='@echo compiling $<'
4929 SHOW_CC='@echo compiling $@'
4951 echo "$as_me:4951: result: $enableval" >&5
4952 echo "${ECHO_T}$enableval" >&6
4954 echo "$as_me:4954: checking for ncurses wrap-prefix" >&5
4955 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4957 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4958 if test "${with_ncurses_wrap_prefix+set}" = set; then
4959 withval="$with_ncurses_wrap_prefix"
4960 NCURSES_WRAP_PREFIX=$withval
4962 NCURSES_WRAP_PREFIX=_nc_
4964 echo "$as_me:4964: result: $NCURSES_WRAP_PREFIX" >&5
4965 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4967 echo "$as_me:4967: checking if you want to check for wide-character functions" >&5
4968 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4970 # Check whether --enable-widec or --disable-widec was given.
4971 if test "${enable_widec+set}" = set; then
4972 enableval="$enable_widec"
4973 test "$enableval" != no && enableval=yes
4974 if test "$enableval" != "yes" ; then
4984 echo "$as_me:4984: result: $cf_enable_widec" >&5
4985 echo "${ECHO_T}$cf_enable_widec" >&6
4987 echo "$as_me:4987: checking for specific curses-directory" >&5
4988 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4990 # Check whether --with-curses-dir or --without-curses-dir was given.
4991 if test "${with_curses_dir+set}" = set; then
4992 withval="$with_curses_dir"
4993 cf_cv_curses_dir=$withval
4997 echo "$as_me:4997: result: $cf_cv_curses_dir" >&5
4998 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5000 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5003 if test "x$prefix" != xNONE; then
5004 cf_path_syntax="$prefix"
5006 cf_path_syntax="$ac_default_prefix"
5014 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5016 (.\${*prefix}*|.\${*dir}*)
5017 eval withval="$withval"
5020 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5025 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5028 { { echo "$as_me:5028: error: expected a pathname, not \"$withval\"" >&5
5029 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5030 { (exit 1); exit 1; }; }
5034 if test -d "$cf_cv_curses_dir"
5037 if test -n "$cf_cv_curses_dir/include" ; then
5038 for cf_add_incdir in $cf_cv_curses_dir/include
5040 while test $cf_add_incdir != /usr/include
5042 if test -d $cf_add_incdir
5045 if test -n "$CFLAGS$CPPFLAGS" ; then
5046 # a loop is needed to ensure we can add subdirs of existing dirs
5047 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5048 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5049 cf_have_incdir=yes; break
5054 if test "$cf_have_incdir" = no ; then
5055 if test "$cf_add_incdir" = /usr/local/include ; then
5056 if test "$GCC" = yes
5058 cf_save_CPPFLAGS=$CPPFLAGS
5059 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5060 cat >conftest.$ac_ext <<_ACEOF
5061 #line 5061 "configure"
5062 #include "confdefs.h"
5072 rm -f conftest.$ac_objext
5073 if { (eval echo "$as_me:5073: \"$ac_compile\"") >&5
5074 (eval $ac_compile) 2>&5
5076 echo "$as_me:5076: \$? = $ac_status" >&5
5077 (exit $ac_status); } &&
5078 { ac_try='test -s conftest.$ac_objext'
5079 { (eval echo "$as_me:5079: \"$ac_try\"") >&5
5082 echo "$as_me:5082: \$? = $ac_status" >&5
5083 (exit $ac_status); }; }; then
5086 echo "$as_me: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
5090 rm -f conftest.$ac_objext conftest.$ac_ext
5091 CPPFLAGS=$cf_save_CPPFLAGS
5096 if test "$cf_have_incdir" = no ; then
5097 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5099 echo "${as_me:-configure}:5099: testing adding $cf_add_incdir to include-path ..." 1>&5
5101 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5103 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5104 test "$cf_top_incdir" = "$cf_add_incdir" && break
5105 cf_add_incdir="$cf_top_incdir"
5116 if test -n "$cf_cv_curses_dir/lib" ; then
5117 for cf_add_libdir in $cf_cv_curses_dir/lib
5119 if test $cf_add_libdir = /usr/lib ; then
5121 elif test -d $cf_add_libdir
5124 if test -n "$LDFLAGS$LIBS" ; then
5125 # a loop is needed to ensure we can add subdirs of existing dirs
5126 for cf_test_libdir in $LDFLAGS $LIBS ; do
5127 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5128 cf_have_libdir=yes; break
5132 if test "$cf_have_libdir" = no ; then
5133 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5135 echo "${as_me:-configure}:5135: testing adding $cf_add_libdir to library-path ..." 1>&5
5137 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5148 echo "$as_me:5148: checking for specified curses library type" >&5
5149 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5151 # Check whether --with-screen or --without-screen was given.
5152 if test "${with_screen+set}" = set; then
5153 withval="$with_screen"
5154 cf_cv_screen=$withval
5157 # Check whether --with-ncursesw or --without-ncursesw was given.
5158 if test "${with_ncursesw+set}" = set; then
5159 withval="$with_ncursesw"
5160 cf_cv_screen=ncursesw
5163 # Check whether --with-ncurses or --without-ncurses was given.
5164 if test "${with_ncurses+set}" = set; then
5165 withval="$with_ncurses"
5166 cf_cv_screen=ncurses
5169 # Check whether --with-pdcurses or --without-pdcurses was given.
5170 if test "${with_pdcurses+set}" = set; then
5171 withval="$with_pdcurses"
5172 cf_cv_screen=pdcurses
5175 # Check whether --with-curses-colr or --without-curses-colr was given.
5176 if test "${with_curses_colr+set}" = set; then
5177 withval="$with_curses_colr"
5178 cf_cv_screen=curses_colr
5181 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5182 if test "${with_curses_5lib+set}" = set; then
5183 withval="$with_curses_5lib"
5184 cf_cv_screen=curses_5lib
5192 echo "$as_me:5192: result: $cf_cv_screen" >&5
5193 echo "${ECHO_T}$cf_cv_screen" >&6
5195 case $cf_cv_screen in
5198 echo "$as_me:5198: checking for extra include directories" >&5
5199 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5200 if test "${cf_cv_curses_incdir+set}" = set; then
5201 echo $ECHO_N "(cached) $ECHO_C" >&6
5204 cf_cv_curses_incdir=no
5207 if test "x$cf_cv_screen" = "xcurses_colr"
5209 test -d /usr/include/curses_colr && \
5210 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5214 if test "x$cf_cv_screen" = "xcurses_5lib"
5216 test -d /usr/5lib && \
5217 test -d /usr/5include && \
5218 cf_cv_curses_incdir="-I/usr/5include"
5224 echo "$as_me:5224: result: $cf_cv_curses_incdir" >&5
5225 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5226 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5228 echo "$as_me:5228: checking if we have identified curses headers" >&5
5229 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5230 if test "${cf_cv_ncurses_header+set}" = set; then
5231 echo $ECHO_N "(cached) $ECHO_C" >&6
5234 cf_cv_ncurses_header=none
5237 curses.h ncurses/ncurses.h ncurses/curses.h
5239 cat >conftest.$ac_ext <<_ACEOF
5240 #line 5240 "configure"
5241 #include "confdefs.h"
5242 #include <${cf_header}>
5246 initscr(); tgoto("?", 0,0)
5251 rm -f conftest.$ac_objext
5252 if { (eval echo "$as_me:5252: \"$ac_compile\"") >&5
5253 (eval $ac_compile) 2>&5
5255 echo "$as_me:5255: \$? = $ac_status" >&5
5256 (exit $ac_status); } &&
5257 { ac_try='test -s conftest.$ac_objext'
5258 { (eval echo "$as_me:5258: \"$ac_try\"") >&5
5261 echo "$as_me:5261: \$? = $ac_status" >&5
5262 (exit $ac_status); }; }; then
5263 cf_cv_ncurses_header=$cf_header; break
5265 echo "$as_me: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5268 rm -f conftest.$ac_objext conftest.$ac_ext
5272 echo "$as_me:5272: result: $cf_cv_ncurses_header" >&5
5273 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5275 if test "$cf_cv_ncurses_header" = none ; then
5276 { { echo "$as_me:5276: error: No curses header-files found" >&5
5277 echo "$as_me: error: No curses header-files found" >&2;}
5278 { (exit 1); exit 1; }; }
5281 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5283 for ac_header in $cf_cv_ncurses_header
5285 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5286 echo "$as_me:5286: checking for $ac_header" >&5
5287 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5288 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5289 echo $ECHO_N "(cached) $ECHO_C" >&6
5291 cat >conftest.$ac_ext <<_ACEOF
5292 #line 5292 "configure"
5293 #include "confdefs.h"
5294 #include <$ac_header>
5296 if { (eval echo "$as_me:5296: \"$ac_cpp conftest.$ac_ext\"") >&5
5297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5299 egrep -v '^ *\+' conftest.er1 >conftest.err
5301 cat conftest.err >&5
5302 echo "$as_me:5302: \$? = $ac_status" >&5
5303 (exit $ac_status); } >/dev/null; then
5304 if test -s conftest.err; then
5305 ac_cpp_err=$ac_c_preproc_warn_flag
5312 if test -z "$ac_cpp_err"; then
5313 eval "$as_ac_Header=yes"
5315 echo "$as_me: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 eval "$as_ac_Header=no"
5319 rm -f conftest.err conftest.$ac_ext
5321 echo "$as_me:5321: result: `eval echo '${'$as_ac_Header'}'`" >&5
5322 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5323 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5324 cat >>confdefs.h <<EOF
5325 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5331 echo "$as_me:5331: checking for terminfo header" >&5
5332 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5333 if test "${cf_cv_term_header+set}" = set; then
5334 echo $ECHO_N "(cached) $ECHO_C" >&6
5337 case ${cf_cv_ncurses_header} in
5338 (*/ncurses.h|*/ncursesw.h)
5339 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5342 cf_term_header=term.h
5346 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5348 cat >conftest.$ac_ext <<_ACEOF
5349 #line 5349 "configure"
5350 #include "confdefs.h"
5352 #include <${cf_cv_ncurses_header:-curses.h}>
5358 int x = auto_left_margin
5363 rm -f conftest.$ac_objext
5364 if { (eval echo "$as_me:5364: \"$ac_compile\"") >&5
5365 (eval $ac_compile) 2>&5
5367 echo "$as_me:5367: \$? = $ac_status" >&5
5368 (exit $ac_status); } &&
5369 { ac_try='test -s conftest.$ac_objext'
5370 { (eval echo "$as_me:5370: \"$ac_try\"") >&5
5373 echo "$as_me:5373: \$? = $ac_status" >&5
5374 (exit $ac_status); }; }; then
5376 cf_cv_term_header="$cf_test"
5378 echo "$as_me: failed program was:" >&5
5379 cat conftest.$ac_ext >&5
5381 cf_cv_term_header=unknown
5384 rm -f conftest.$ac_objext conftest.$ac_ext
5385 test "$cf_cv_term_header" != unknown && break
5389 echo "$as_me:5389: result: $cf_cv_term_header" >&5
5390 echo "${ECHO_T}$cf_cv_term_header" >&6
5392 # Set definitions to allow ifdef'ing to accommodate subdirectories
5394 case $cf_cv_term_header in
5397 cat >>confdefs.h <<\EOF
5398 #define HAVE_TERM_H 1
5404 case $cf_cv_term_header in
5407 cat >>confdefs.h <<\EOF
5408 #define HAVE_NCURSES_TERM_H 1
5414 cat >>confdefs.h <<\EOF
5415 #define HAVE_NCURSESW_TERM_H 1
5421 echo "$as_me:5421: checking for ncurses version" >&5
5422 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5423 if test "${cf_cv_ncurses_version+set}" = set; then
5424 echo $ECHO_N "(cached) $ECHO_C" >&6
5427 cf_cv_ncurses_version=no
5430 if test "$cross_compiling" = yes; then
5432 # This will not work if the preprocessor splits the line after the
5433 # Autoconf token. The 'unproto' program does that.
5434 cat > conftest.$ac_ext <<EOF
5435 #include <${cf_cv_ncurses_header:-curses.h}>
5437 #ifdef NCURSES_VERSION
5438 Autoconf NCURSES_VERSION
5446 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5447 { (eval echo "$as_me:5447: \"$cf_try\"") >&5
5450 echo "$as_me:5450: \$? = $ac_status" >&5
5451 (exit $ac_status); }
5452 if test -f conftest.out ; then
5453 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5454 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5459 cat >conftest.$ac_ext <<_ACEOF
5460 #line 5460 "configure"
5461 #include "confdefs.h"
5463 #include <${cf_cv_ncurses_header:-curses.h}>
5467 FILE *fp = fopen("$cf_tempfile", "w");
5468 #ifdef NCURSES_VERSION
5469 # ifdef NCURSES_VERSION_PATCH
5470 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5472 fprintf(fp, "%s\n", NCURSES_VERSION);
5476 fprintf(fp, "old\n");
5481 ${cf_cv_main_return:-return}(0);
5484 rm -f conftest$ac_exeext
5485 if { (eval echo "$as_me:5485: \"$ac_link\"") >&5
5486 (eval $ac_link) 2>&5
5488 echo "$as_me:5488: \$? = $ac_status" >&5
5489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5490 { (eval echo "$as_me:5490: \"$ac_try\"") >&5
5493 echo "$as_me:5493: \$? = $ac_status" >&5
5494 (exit $ac_status); }; }; then
5496 cf_cv_ncurses_version=`cat $cf_tempfile`
5498 echo "$as_me: program exited with status $ac_status" >&5
5499 echo "$as_me: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5507 echo "$as_me:5507: result: $cf_cv_ncurses_version" >&5
5508 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5509 test "$cf_cv_ncurses_version" = no ||
5510 cat >>confdefs.h <<\EOF
5514 echo "$as_me:5514: checking if we have identified curses libraries" >&5
5515 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5516 cat >conftest.$ac_ext <<_ACEOF
5517 #line 5517 "configure"
5518 #include "confdefs.h"
5519 #include <${cf_cv_ncurses_header:-curses.h}>
5523 initscr(); tgoto("?", 0,0)
5528 rm -f conftest.$ac_objext conftest$ac_exeext
5529 if { (eval echo "$as_me:5529: \"$ac_link\"") >&5
5530 (eval $ac_link) 2>&5
5532 echo "$as_me:5532: \$? = $ac_status" >&5
5533 (exit $ac_status); } &&
5534 { ac_try='test -s conftest$ac_exeext'
5535 { (eval echo "$as_me:5535: \"$ac_try\"") >&5
5538 echo "$as_me:5538: \$? = $ac_status" >&5
5539 (exit $ac_status); }; }; then
5542 echo "$as_me: failed program was:" >&5
5543 cat conftest.$ac_ext >&5
5546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5547 echo "$as_me:5547: result: $cf_result" >&5
5548 echo "${ECHO_T}$cf_result" >&6
5550 if test "$cf_result" = no ; then
5553 echo "$as_me:5553: checking for tgoto in -lmytinfo" >&5
5554 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5555 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5556 echo $ECHO_N "(cached) $ECHO_C" >&6
5558 ac_check_lib_save_LIBS=$LIBS
5559 LIBS="-lmytinfo $LIBS"
5560 cat >conftest.$ac_ext <<_ACEOF
5561 #line 5561 "configure"
5562 #include "confdefs.h"
5564 /* Override any gcc2 internal prototype to avoid an error. */
5568 /* We use char because int might match the return type of a gcc2
5569 builtin and then its argument prototype would still apply. */
5579 rm -f conftest.$ac_objext conftest$ac_exeext
5580 if { (eval echo "$as_me:5580: \"$ac_link\"") >&5
5581 (eval $ac_link) 2>&5
5583 echo "$as_me:5583: \$? = $ac_status" >&5
5584 (exit $ac_status); } &&
5585 { ac_try='test -s conftest$ac_exeext'
5586 { (eval echo "$as_me:5586: \"$ac_try\"") >&5
5589 echo "$as_me:5589: \$? = $ac_status" >&5
5590 (exit $ac_status); }; }; then
5591 ac_cv_lib_mytinfo_tgoto=yes
5593 echo "$as_me: failed program was:" >&5
5594 cat conftest.$ac_ext >&5
5595 ac_cv_lib_mytinfo_tgoto=no
5597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5598 LIBS=$ac_check_lib_save_LIBS
5600 echo "$as_me:5600: result: $ac_cv_lib_mytinfo_tgoto" >&5
5601 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5602 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5604 cf_add_libs="-lmytinfo"
5605 # Filter out duplicates - this happens with badly-designed ".pc" files...
5606 for cf_add_1lib in $LIBS
5608 for cf_add_2lib in $cf_add_libs
5610 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5616 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5624 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5625 # next (1998), and xcurses "newer" (2000). There is no header file for
5626 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5627 # term.h) for cur_colr
5628 if test "x$cf_cv_screen" = "xcurses_colr"
5630 echo "$as_me:5630: checking for initscr in -lcur_colr" >&5
5631 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5632 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5633 echo $ECHO_N "(cached) $ECHO_C" >&6
5635 ac_check_lib_save_LIBS=$LIBS
5636 LIBS="-lcur_colr $LIBS"
5637 cat >conftest.$ac_ext <<_ACEOF
5638 #line 5638 "configure"
5639 #include "confdefs.h"
5641 /* Override any gcc2 internal prototype to avoid an error. */
5645 /* We use char because int might match the return type of a gcc2
5646 builtin and then its argument prototype would still apply. */
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658 (eval $ac_link) 2>&5
5660 echo "$as_me:5660: \$? = $ac_status" >&5
5661 (exit $ac_status); } &&
5662 { ac_try='test -s conftest$ac_exeext'
5663 { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5666 echo "$as_me:5666: \$? = $ac_status" >&5
5667 (exit $ac_status); }; }; then
5668 ac_cv_lib_cur_colr_initscr=yes
5670 echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 ac_cv_lib_cur_colr_initscr=no
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675 LIBS=$ac_check_lib_save_LIBS
5677 echo "$as_me:5677: result: $ac_cv_lib_cur_colr_initscr" >&5
5678 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5679 if test $ac_cv_lib_cur_colr_initscr = yes; then
5681 cf_add_libs="-lcur_colr"
5682 # Filter out duplicates - this happens with badly-designed ".pc" files...
5683 for cf_add_1lib in $LIBS
5685 for cf_add_2lib in $cf_add_libs
5687 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5693 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5697 ac_cv_func_initscr=yes
5701 echo "$as_me:5701: checking for initscr in -lHcurses" >&5
5702 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5703 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5704 echo $ECHO_N "(cached) $ECHO_C" >&6
5706 ac_check_lib_save_LIBS=$LIBS
5707 LIBS="-lHcurses $LIBS"
5708 cat >conftest.$ac_ext <<_ACEOF
5709 #line 5709 "configure"
5710 #include "confdefs.h"
5712 /* Override any gcc2 internal prototype to avoid an error. */
5716 /* We use char because int might match the return type of a gcc2
5717 builtin and then its argument prototype would still apply. */
5727 rm -f conftest.$ac_objext conftest$ac_exeext
5728 if { (eval echo "$as_me:5728: \"$ac_link\"") >&5
5729 (eval $ac_link) 2>&5
5731 echo "$as_me:5731: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
5733 { ac_try='test -s conftest$ac_exeext'
5734 { (eval echo "$as_me:5734: \"$ac_try\"") >&5
5737 echo "$as_me:5737: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then
5739 ac_cv_lib_Hcurses_initscr=yes
5741 echo "$as_me: failed program was:" >&5
5742 cat conftest.$ac_ext >&5
5743 ac_cv_lib_Hcurses_initscr=no
5745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5746 LIBS=$ac_check_lib_save_LIBS
5748 echo "$as_me:5748: result: $ac_cv_lib_Hcurses_initscr" >&5
5749 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5750 if test $ac_cv_lib_Hcurses_initscr = yes; then
5752 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5754 cf_add_libs="-lHcurses"
5755 # Filter out duplicates - this happens with badly-designed ".pc" files...
5756 for cf_add_1lib in $LIBS
5758 for cf_add_2lib in $cf_add_libs
5760 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5766 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5770 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5771 ac_cv_func_initscr=yes
5780 case `arch 2>/dev/null` in
5785 if test -n "/lib64" ; then
5786 for cf_add_libdir in /lib64
5788 if test $cf_add_libdir = /usr/lib ; then
5790 elif test -d $cf_add_libdir
5793 if test -n "$LDFLAGS$LIBS" ; then
5794 # a loop is needed to ensure we can add subdirs of existing dirs
5795 for cf_test_libdir in $LDFLAGS $LIBS ; do
5796 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5797 cf_have_libdir=yes; break
5801 if test "$cf_have_libdir" = no ; then
5802 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5804 echo "${as_me:-configure}:5804: testing adding $cf_add_libdir to library-path ..." 1>&5
5806 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5814 if test -n "/lib" ; then
5815 for cf_add_libdir in /lib
5817 if test $cf_add_libdir = /usr/lib ; then
5819 elif test -d $cf_add_libdir
5822 if test -n "$LDFLAGS$LIBS" ; then
5823 # a loop is needed to ensure we can add subdirs of existing dirs
5824 for cf_test_libdir in $LDFLAGS $LIBS ; do
5825 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5826 cf_have_libdir=yes; break
5830 if test "$cf_have_libdir" = no ; then
5831 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5833 echo "${as_me:-configure}:5833: testing adding $cf_add_libdir to library-path ..." 1>&5
5835 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5845 if test -n "/lib" ; then
5846 for cf_add_libdir in /lib
5848 if test $cf_add_libdir = /usr/lib ; then
5850 elif test -d $cf_add_libdir
5853 if test -n "$LDFLAGS$LIBS" ; then
5854 # a loop is needed to ensure we can add subdirs of existing dirs
5855 for cf_test_libdir in $LDFLAGS $LIBS ; do
5856 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5857 cf_have_libdir=yes; break
5861 if test "$cf_have_libdir" = no ; then
5862 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5864 echo "${as_me:-configure}:5864: testing adding $cf_add_libdir to library-path ..." 1>&5
5866 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5876 if test "x$cf_cv_screen" = "xcurses_5lib"
5878 if test -d /usr/5lib ; then
5880 if test -n "/usr/5lib" ; then
5881 for cf_add_libdir in /usr/5lib
5883 if test $cf_add_libdir = /usr/lib ; then
5885 elif test -d $cf_add_libdir
5888 if test -n "$LDFLAGS$LIBS" ; then
5889 # a loop is needed to ensure we can add subdirs of existing dirs
5890 for cf_test_libdir in $LDFLAGS $LIBS ; do
5891 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5892 cf_have_libdir=yes; break
5896 if test "$cf_have_libdir" = no ; then
5897 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5899 echo "${as_me:-configure}:5899: testing adding $cf_add_libdir to library-path ..." 1>&5
5901 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5907 cf_add_libs="-lcurses -ltermcap"
5908 # Filter out duplicates - this happens with badly-designed ".pc" files...
5909 for cf_add_1lib in $LIBS
5911 for cf_add_2lib in $cf_add_libs
5913 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5919 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5925 ac_cv_func_initscr=yes
5929 if test ".$ac_cv_func_initscr" != .yes ; then
5930 cf_save_LIBS="$LIBS"
5932 if test ".${cf_cv_ncurses_version:-no}" != .no
5934 cf_check_list="ncurses curses cursesX"
5936 cf_check_list="cursesX curses ncurses"
5939 # Check for library containing tgoto. Do this before curses library
5940 # because it may be needed to link the test-case for initscr.
5941 if test "x$cf_term_lib" = x
5943 echo "$as_me:5943: checking for tgoto" >&5
5944 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5945 if test "${ac_cv_func_tgoto+set}" = set; then
5946 echo $ECHO_N "(cached) $ECHO_C" >&6
5948 cat >conftest.$ac_ext <<_ACEOF
5949 #line 5949 "configure"
5950 #include "confdefs.h"
5951 /* System header to define __stub macros and hopefully few prototypes,
5952 which can conflict with char tgoto (); below. */
5954 /* Override any gcc2 internal prototype to avoid an error. */
5958 /* We use char because int might match the return type of a gcc2
5959 builtin and then its argument prototype would still apply. */
5966 /* The GNU C library defines this for functions which it implements
5967 to always fail with ENOSYS. Some functions are actually named
5968 something starting with __ and the normal name is an alias. */
5969 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5972 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5979 rm -f conftest.$ac_objext conftest$ac_exeext
5980 if { (eval echo "$as_me:5980: \"$ac_link\"") >&5
5981 (eval $ac_link) 2>&5
5983 echo "$as_me:5983: \$? = $ac_status" >&5
5984 (exit $ac_status); } &&
5985 { ac_try='test -s conftest$ac_exeext'
5986 { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5989 echo "$as_me:5989: \$? = $ac_status" >&5
5990 (exit $ac_status); }; }; then
5991 ac_cv_func_tgoto=yes
5993 echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5999 echo "$as_me:5999: result: $ac_cv_func_tgoto" >&5
6000 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6001 if test $ac_cv_func_tgoto = yes; then
6002 cf_term_lib=predefined
6005 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6007 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6008 echo "$as_me:6008: checking for tgoto in -l$cf_term_lib" >&5
6009 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6010 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6011 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 ac_check_lib_save_LIBS=$LIBS
6014 LIBS="-l$cf_term_lib $LIBS"
6015 cat >conftest.$ac_ext <<_ACEOF
6016 #line 6016 "configure"
6017 #include "confdefs.h"
6019 /* Override any gcc2 internal prototype to avoid an error. */
6023 /* We use char because int might match the return type of a gcc2
6024 builtin and then its argument prototype would still apply. */
6034 rm -f conftest.$ac_objext conftest$ac_exeext
6035 if { (eval echo "$as_me:6035: \"$ac_link\"") >&5
6036 (eval $ac_link) 2>&5
6038 echo "$as_me:6038: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest$ac_exeext'
6041 { (eval echo "$as_me:6041: \"$ac_try\"") >&5
6044 echo "$as_me:6044: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6046 eval "$as_ac_Lib=yes"
6048 echo "$as_me: failed program was:" >&5
6049 cat conftest.$ac_ext >&5
6050 eval "$as_ac_Lib=no"
6052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6053 LIBS=$ac_check_lib_save_LIBS
6055 echo "$as_me:6055: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6056 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6057 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6067 # Check for library containing initscr
6068 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6069 if test "x$cf_curs_lib" = x
6071 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6073 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6074 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6075 echo "$as_me:6075: checking if we can link with $cf_curs_lib library" >&5
6076 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6077 cat >conftest.$ac_ext <<_ACEOF
6078 #line 6078 "configure"
6079 #include "confdefs.h"
6080 #include <${cf_cv_ncurses_header:-curses.h}>
6089 rm -f conftest.$ac_objext conftest$ac_exeext
6090 if { (eval echo "$as_me:6090: \"$ac_link\"") >&5
6091 (eval $ac_link) 2>&5
6093 echo "$as_me:6093: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
6095 { ac_try='test -s conftest$ac_exeext'
6096 { (eval echo "$as_me:6096: \"$ac_try\"") >&5
6099 echo "$as_me:6099: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6103 echo "$as_me: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6108 echo "$as_me:6108: result: $cf_result" >&5
6109 echo "${ECHO_T}$cf_result" >&6
6110 test $cf_result = yes && break
6111 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6113 elif test "$cf_term_lib" != predefined ; then
6114 echo "$as_me:6114: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6115 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6116 cat >conftest.$ac_ext <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119 #include <${cf_cv_ncurses_header:-curses.h}>
6123 initscr(); tgoto((char *)0, 0, 0);
6128 rm -f conftest.$ac_objext conftest$ac_exeext
6129 if { (eval echo "$as_me:6129: \"$ac_link\"") >&5
6130 (eval $ac_link) 2>&5
6132 echo "$as_me:6132: \$? = $ac_status" >&5
6133 (exit $ac_status); } &&
6134 { ac_try='test -s conftest$ac_exeext'
6135 { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6138 echo "$as_me:6138: \$? = $ac_status" >&5
6139 (exit $ac_status); }; }; then
6142 echo "$as_me: failed program was:" >&5
6143 cat conftest.$ac_ext >&5
6145 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6146 cat >conftest.$ac_ext <<_ACEOF
6147 #line 6147 "configure"
6148 #include "confdefs.h"
6149 #include <${cf_cv_ncurses_header:-curses.h}>
6158 rm -f conftest.$ac_objext conftest$ac_exeext
6159 if { (eval echo "$as_me:6159: \"$ac_link\"") >&5
6160 (eval $ac_link) 2>&5
6162 echo "$as_me:6162: \$? = $ac_status" >&5
6163 (exit $ac_status); } &&
6164 { ac_try='test -s conftest$ac_exeext'
6165 { (eval echo "$as_me:6165: \"$ac_try\"") >&5
6168 echo "$as_me:6168: \$? = $ac_status" >&5
6169 (exit $ac_status); }; }; then
6172 echo "$as_me: failed program was:" >&5
6173 cat conftest.$ac_ext >&5
6176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6180 echo "$as_me:6180: result: $cf_result" >&5
6181 echo "${ECHO_T}$cf_result" >&6
6182 test $cf_result != error && break
6186 test $cf_curs_lib = unknown && { { echo "$as_me:6186: error: no curses library found" >&5
6187 echo "$as_me: error: no curses library found" >&2;}
6188 { (exit 1); exit 1; }; }
6195 echo "$as_me:6195: checking for multibyte character support" >&5
6196 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6197 if test "${cf_cv_utf8_lib+set}" = set; then
6198 echo $ECHO_N "(cached) $ECHO_C" >&6
6201 cf_save_LIBS="$LIBS"
6202 cat >conftest.$ac_ext <<_ACEOF
6203 #line 6203 "configure"
6204 #include "confdefs.h"
6215 rm -f conftest.$ac_objext conftest$ac_exeext
6216 if { (eval echo "$as_me:6216: \"$ac_link\"") >&5
6217 (eval $ac_link) 2>&5
6219 echo "$as_me:6219: \$? = $ac_status" >&5
6220 (exit $ac_status); } &&
6221 { ac_try='test -s conftest$ac_exeext'
6222 { (eval echo "$as_me:6222: \"$ac_try\"") >&5
6225 echo "$as_me:6225: \$? = $ac_status" >&5
6226 (exit $ac_status); }; }; then
6229 echo "$as_me: failed program was:" >&5
6230 cat conftest.$ac_ext >&5
6232 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6233 # will be set on completion of the AC_TRY_LINK below.
6234 cf_cv_header_path_utf8=
6235 cf_cv_library_path_utf8=
6237 echo "${as_me:-configure}:6237: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6239 cf_save_LIBS="$LIBS"
6241 cat >conftest.$ac_ext <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6245 #include <libutf8.h>
6254 rm -f conftest.$ac_objext conftest$ac_exeext
6255 if { (eval echo "$as_me:6255: \"$ac_link\"") >&5
6256 (eval $ac_link) 2>&5
6258 echo "$as_me:6258: \$? = $ac_status" >&5
6259 (exit $ac_status); } &&
6260 { ac_try='test -s conftest$ac_exeext'
6261 { (eval echo "$as_me:6261: \"$ac_try\"") >&5
6264 echo "$as_me:6264: \$? = $ac_status" >&5
6265 (exit $ac_status); }; }; then
6267 cf_cv_find_linkage_utf8=yes
6268 cf_cv_header_path_utf8=/usr/include
6269 cf_cv_library_path_utf8=/usr/lib
6272 echo "$as_me: failed program was:" >&5
6273 cat conftest.$ac_ext >&5
6275 LIBS="-lutf8 $cf_save_LIBS"
6277 cat >conftest.$ac_ext <<_ACEOF
6278 #line 6278 "configure"
6279 #include "confdefs.h"
6281 #include <libutf8.h>
6290 rm -f conftest.$ac_objext conftest$ac_exeext
6291 if { (eval echo "$as_me:6291: \"$ac_link\"") >&5
6292 (eval $ac_link) 2>&5
6294 echo "$as_me:6294: \$? = $ac_status" >&5
6295 (exit $ac_status); } &&
6296 { ac_try='test -s conftest$ac_exeext'
6297 { (eval echo "$as_me:6297: \"$ac_try\"") >&5
6300 echo "$as_me:6300: \$? = $ac_status" >&5
6301 (exit $ac_status); }; }; then
6303 cf_cv_find_linkage_utf8=yes
6304 cf_cv_header_path_utf8=/usr/include
6305 cf_cv_library_path_utf8=/usr/lib
6306 cf_cv_library_file_utf8="-lutf8"
6309 echo "$as_me: failed program was:" >&5
6310 cat conftest.$ac_ext >&5
6312 cf_cv_find_linkage_utf8=no
6313 LIBS="$cf_save_LIBS"
6315 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6317 echo "${as_me:-configure}:6317: testing find linkage for utf8 library ..." 1>&5
6319 echo "${as_me:-configure}:6319: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6321 cf_save_CPPFLAGS="$CPPFLAGS"
6322 cf_test_CPPFLAGS="$CPPFLAGS"
6326 # collect the current set of include-directories from compiler flags
6327 cf_header_path_list=""
6328 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6329 for cf_header_path in $CPPFLAGS $CFLAGS
6331 case $cf_header_path in
6333 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6335 test "x$cf_header_path" != "xNONE" && \
6336 test -d "$cf_header_path" && \
6338 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6339 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6340 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6341 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6342 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6343 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6346 cf_header_path_list="$cf_header_path_list $cf_search"
6352 # add the variations for the package we are looking for
6356 test "x$prefix" != "xNONE" && \
6357 test -d "$prefix" && \
6359 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6360 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6361 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6362 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6363 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6364 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6367 for cf_subdir_prefix in \
6376 test "x$cf_subdir_prefix" != "x$prefix" && \
6377 test -d "$cf_subdir_prefix" && \
6378 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6379 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6380 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6381 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6382 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6383 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6384 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6389 test "$includedir" != NONE && \
6390 test "$includedir" != "/usr/include" && \
6391 test -d "$includedir" && {
6392 test -d $includedir && cf_search="$cf_search $includedir"
6393 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6396 test "$oldincludedir" != NONE && \
6397 test "$oldincludedir" != "/usr/include" && \
6398 test -d "$oldincludedir" && {
6399 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6400 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6403 cf_search="$cf_search $cf_header_path_list"
6405 for cf_cv_header_path_utf8 in $cf_search
6407 if test -d $cf_cv_header_path_utf8 ; then
6408 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6410 echo "${as_me:-configure}:6410: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6412 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6413 cat >conftest.$ac_ext <<_ACEOF
6414 #line 6414 "configure"
6415 #include "confdefs.h"
6417 #include <libutf8.h>
6426 rm -f conftest.$ac_objext
6427 if { (eval echo "$as_me:6427: \"$ac_compile\"") >&5
6428 (eval $ac_compile) 2>&5
6430 echo "$as_me:6430: \$? = $ac_status" >&5
6431 (exit $ac_status); } &&
6432 { ac_try='test -s conftest.$ac_objext'
6433 { (eval echo "$as_me:6433: \"$ac_try\"") >&5
6436 echo "$as_me:6436: \$? = $ac_status" >&5
6437 (exit $ac_status); }; }; then
6439 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6441 echo "${as_me:-configure}:6441: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6443 cf_cv_find_linkage_utf8=maybe
6444 cf_test_CPPFLAGS="$CPPFLAGS"
6447 echo "$as_me: failed program was:" >&5
6448 cat conftest.$ac_ext >&5
6450 CPPFLAGS="$cf_save_CPPFLAGS"
6453 rm -f conftest.$ac_objext conftest.$ac_ext
6457 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6459 echo "${as_me:-configure}:6459: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6461 cf_save_LIBS="$LIBS"
6462 cf_save_LDFLAGS="$LDFLAGS"
6464 if test "$cf_cv_find_linkage_utf8" != yes ; then
6467 cf_library_path_list=""
6468 if test -n "${LDFLAGS}${LIBS}" ; then
6469 for cf_library_path in $LDFLAGS $LIBS
6471 case $cf_library_path in
6473 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6475 test "x$cf_library_path" != "xNONE" && \
6476 test -d "$cf_library_path" && \
6478 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6479 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6480 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6481 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6482 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6483 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6486 cf_library_path_list="$cf_library_path_list $cf_search"
6494 test "x$prefix" != "xNONE" && \
6495 test -d "$prefix" && \
6497 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6498 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6499 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6500 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6501 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6502 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6505 for cf_subdir_prefix in \
6514 test "x$cf_subdir_prefix" != "x$prefix" && \
6515 test -d "$cf_subdir_prefix" && \
6516 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6517 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6518 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6519 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6520 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6521 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6522 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6527 cf_search="$cf_library_path_list $cf_search"
6529 for cf_cv_library_path_utf8 in $cf_search
6531 if test -d $cf_cv_library_path_utf8 ; then
6532 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6534 echo "${as_me:-configure}:6534: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6536 CPPFLAGS="$cf_test_CPPFLAGS"
6537 LIBS="-lutf8 $cf_save_LIBS"
6538 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6539 cat >conftest.$ac_ext <<_ACEOF
6540 #line 6540 "configure"
6541 #include "confdefs.h"
6543 #include <libutf8.h>
6552 rm -f conftest.$ac_objext conftest$ac_exeext
6553 if { (eval echo "$as_me:6553: \"$ac_link\"") >&5
6554 (eval $ac_link) 2>&5
6556 echo "$as_me:6556: \$? = $ac_status" >&5
6557 (exit $ac_status); } &&
6558 { ac_try='test -s conftest$ac_exeext'
6559 { (eval echo "$as_me:6559: \"$ac_try\"") >&5
6562 echo "$as_me:6562: \$? = $ac_status" >&5
6563 (exit $ac_status); }; }; then
6565 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6567 echo "${as_me:-configure}:6567: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6569 cf_cv_find_linkage_utf8=yes
6570 cf_cv_library_file_utf8="-lutf8"
6573 echo "$as_me: failed program was:" >&5
6574 cat conftest.$ac_ext >&5
6576 CPPFLAGS="$cf_save_CPPFLAGS"
6577 LIBS="$cf_save_LIBS"
6578 LDFLAGS="$cf_save_LDFLAGS"
6581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6584 CPPFLAGS="$cf_save_CPPFLAGS"
6585 LDFLAGS="$cf_save_LDFLAGS"
6589 cf_cv_find_linkage_utf8=no
6593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6598 LIBS="$cf_save_LIBS"
6600 if test "$cf_cv_find_linkage_utf8" = yes ; then
6601 cf_cv_utf8_lib=add-on
6607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6609 echo "$as_me:6609: result: $cf_cv_utf8_lib" >&5
6610 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6612 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6614 if test "$cf_cv_utf8_lib" = "add-on" ; then
6616 cat >>confdefs.h <<\EOF
6617 #define HAVE_LIBUTF8_H 1
6620 if test -n "$cf_cv_header_path_utf8" ; then
6621 for cf_add_incdir in $cf_cv_header_path_utf8
6623 while test $cf_add_incdir != /usr/include
6625 if test -d $cf_add_incdir
6628 if test -n "$CFLAGS$CPPFLAGS" ; then
6629 # a loop is needed to ensure we can add subdirs of existing dirs
6630 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6631 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6632 cf_have_incdir=yes; break
6637 if test "$cf_have_incdir" = no ; then
6638 if test "$cf_add_incdir" = /usr/local/include ; then
6639 if test "$GCC" = yes
6641 cf_save_CPPFLAGS=$CPPFLAGS
6642 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6643 cat >conftest.$ac_ext <<_ACEOF
6644 #line 6644 "configure"
6645 #include "confdefs.h"
6655 rm -f conftest.$ac_objext
6656 if { (eval echo "$as_me:6656: \"$ac_compile\"") >&5
6657 (eval $ac_compile) 2>&5
6659 echo "$as_me:6659: \$? = $ac_status" >&5
6660 (exit $ac_status); } &&
6661 { ac_try='test -s conftest.$ac_objext'
6662 { (eval echo "$as_me:6662: \"$ac_try\"") >&5
6665 echo "$as_me:6665: \$? = $ac_status" >&5
6666 (exit $ac_status); }; }; then
6669 echo "$as_me: failed program was:" >&5
6670 cat conftest.$ac_ext >&5
6673 rm -f conftest.$ac_objext conftest.$ac_ext
6674 CPPFLAGS=$cf_save_CPPFLAGS
6679 if test "$cf_have_incdir" = no ; then
6680 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6682 echo "${as_me:-configure}:6682: testing adding $cf_add_incdir to include-path ..." 1>&5
6684 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6686 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6687 test "$cf_top_incdir" = "$cf_add_incdir" && break
6688 cf_add_incdir="$cf_top_incdir"
6699 if test -n "$cf_cv_library_path_utf8" ; then
6700 for cf_add_libdir in $cf_cv_library_path_utf8
6702 if test $cf_add_libdir = /usr/lib ; then
6704 elif test -d $cf_add_libdir
6707 if test -n "$LDFLAGS$LIBS" ; then
6708 # a loop is needed to ensure we can add subdirs of existing dirs
6709 for cf_test_libdir in $LDFLAGS $LIBS ; do
6710 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6711 cf_have_libdir=yes; break
6715 if test "$cf_have_libdir" = no ; then
6716 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6718 echo "${as_me:-configure}:6718: testing adding $cf_add_libdir to library-path ..." 1>&5
6720 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6726 cf_add_libs="$cf_cv_library_file_utf8"
6727 # Filter out duplicates - this happens with badly-designed ".pc" files...
6728 for cf_add_1lib in $LIBS
6730 for cf_add_2lib in $cf_add_libs
6732 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6744 cf_ncuconfig_root=$cf_cv_screen
6745 cf_have_ncuconfig=no
6747 if test "x${PKG_CONFIG:=none}" != xnone; then
6748 echo "$as_me:6748: checking pkg-config for $cf_ncuconfig_root" >&5
6749 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6750 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6751 echo "$as_me:6751: result: yes" >&5
6752 echo "${ECHO_T}yes" >&6
6754 echo "$as_me:6754: checking if the $cf_ncuconfig_root package files work" >&5
6755 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6756 cf_have_ncuconfig=unknown
6758 cf_save_CPPFLAGS="$CPPFLAGS"
6759 cf_save_LIBS="$LIBS"
6761 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6763 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6764 # Filter out duplicates - this happens with badly-designed ".pc" files...
6765 for cf_add_1lib in $LIBS
6767 for cf_add_2lib in $cf_add_libs
6769 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6775 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6779 cat >conftest.$ac_ext <<_ACEOF
6780 #line 6780 "configure"
6781 #include "confdefs.h"
6782 #include <${cf_cv_ncurses_header:-curses.h}>
6786 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6791 rm -f conftest.$ac_objext conftest$ac_exeext
6792 if { (eval echo "$as_me:6792: \"$ac_link\"") >&5
6793 (eval $ac_link) 2>&5
6795 echo "$as_me:6795: \$? = $ac_status" >&5
6796 (exit $ac_status); } &&
6797 { ac_try='test -s conftest$ac_exeext'
6798 { (eval echo "$as_me:6798: \"$ac_try\"") >&5
6801 echo "$as_me:6801: \$? = $ac_status" >&5
6802 (exit $ac_status); }; }; then
6803 if test "$cross_compiling" = yes; then
6804 cf_have_ncuconfig=maybe
6806 cat >conftest.$ac_ext <<_ACEOF
6807 #line 6807 "configure"
6808 #include "confdefs.h"
6809 #include <${cf_cv_ncurses_header:-curses.h}>
6811 { char *xx = curses_version(); return (xx == 0); }
6813 rm -f conftest$ac_exeext
6814 if { (eval echo "$as_me:6814: \"$ac_link\"") >&5
6815 (eval $ac_link) 2>&5
6817 echo "$as_me:6817: \$? = $ac_status" >&5
6818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6819 { (eval echo "$as_me:6819: \"$ac_try\"") >&5
6822 echo "$as_me:6822: \$? = $ac_status" >&5
6823 (exit $ac_status); }; }; then
6824 cf_have_ncuconfig=yes
6826 echo "$as_me: program exited with status $ac_status" >&5
6827 echo "$as_me: failed program was:" >&5
6828 cat conftest.$ac_ext >&5
6829 cf_have_ncuconfig=no
6831 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6834 echo "$as_me: failed program was:" >&5
6835 cat conftest.$ac_ext >&5
6836 cf_have_ncuconfig=no
6838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6839 echo "$as_me:6839: result: $cf_have_ncuconfig" >&5
6840 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6841 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6842 if test "$cf_have_ncuconfig" != "yes"
6844 CPPFLAGS="$cf_save_CPPFLAGS"
6845 LIBS="$cf_save_LIBS"
6846 NCURSES_CONFIG_PKG=none
6849 cat >>confdefs.h <<\EOF
6853 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6856 echo "$as_me:6856: checking for terminfo header" >&5
6857 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6858 if test "${cf_cv_term_header+set}" = set; then
6859 echo $ECHO_N "(cached) $ECHO_C" >&6
6862 case ${cf_cv_ncurses_header} in
6863 (*/ncurses.h|*/ncursesw.h)
6864 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6867 cf_term_header=term.h
6871 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6873 cat >conftest.$ac_ext <<_ACEOF
6874 #line 6874 "configure"
6875 #include "confdefs.h"
6877 #include <${cf_cv_ncurses_header:-curses.h}>
6883 int x = auto_left_margin
6888 rm -f conftest.$ac_objext
6889 if { (eval echo "$as_me:6889: \"$ac_compile\"") >&5
6890 (eval $ac_compile) 2>&5
6892 echo "$as_me:6892: \$? = $ac_status" >&5
6893 (exit $ac_status); } &&
6894 { ac_try='test -s conftest.$ac_objext'
6895 { (eval echo "$as_me:6895: \"$ac_try\"") >&5
6898 echo "$as_me:6898: \$? = $ac_status" >&5
6899 (exit $ac_status); }; }; then
6901 cf_cv_term_header="$cf_test"
6903 echo "$as_me: failed program was:" >&5
6904 cat conftest.$ac_ext >&5
6906 cf_cv_term_header=unknown
6909 rm -f conftest.$ac_objext conftest.$ac_ext
6910 test "$cf_cv_term_header" != unknown && break
6914 echo "$as_me:6914: result: $cf_cv_term_header" >&5
6915 echo "${ECHO_T}$cf_cv_term_header" >&6
6917 # Set definitions to allow ifdef'ing to accommodate subdirectories
6919 case $cf_cv_term_header in
6922 cat >>confdefs.h <<\EOF
6923 #define HAVE_TERM_H 1
6929 case $cf_cv_term_header in
6932 cat >>confdefs.h <<\EOF
6933 #define HAVE_NCURSES_TERM_H 1
6939 cat >>confdefs.h <<\EOF
6940 #define HAVE_NCURSESW_TERM_H 1
6947 echo "$as_me:6947: result: no" >&5
6948 echo "${ECHO_T}no" >&6
6949 NCURSES_CONFIG_PKG=none
6952 NCURSES_CONFIG_PKG=none
6955 if test "x$cf_have_ncuconfig" = "xno"; then
6956 echo "Looking for ${cf_ncuconfig_root}-config"
6958 if test -n "$ac_tool_prefix"; then
6959 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6961 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6962 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6963 echo "$as_me:6963: checking for $ac_word" >&5
6964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6965 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6966 echo $ECHO_N "(cached) $ECHO_C" >&6
6968 if test -n "$NCURSES_CONFIG"; then
6969 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6971 ac_save_IFS=$IFS; IFS=$ac_path_separator
6973 for ac_dir in $ac_dummy; do
6975 test -z "$ac_dir" && ac_dir=.
6976 $as_executable_p "$ac_dir/$ac_word" || continue
6977 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6978 echo "$as_me:6978: found $ac_dir/$ac_word" >&5
6984 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6985 if test -n "$NCURSES_CONFIG"; then
6986 echo "$as_me:6986: result: $NCURSES_CONFIG" >&5
6987 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6989 echo "$as_me:6989: result: no" >&5
6990 echo "${ECHO_T}no" >&6
6993 test -n "$NCURSES_CONFIG" && break
6996 if test -z "$NCURSES_CONFIG"; then
6997 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6998 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7000 # Extract the first word of "$ac_prog", so it can be a program name with args.
7001 set dummy $ac_prog; ac_word=$2
7002 echo "$as_me:7002: checking for $ac_word" >&5
7003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7004 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7007 if test -n "$ac_ct_NCURSES_CONFIG"; then
7008 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7010 ac_save_IFS=$IFS; IFS=$ac_path_separator
7012 for ac_dir in $ac_dummy; do
7014 test -z "$ac_dir" && ac_dir=.
7015 $as_executable_p "$ac_dir/$ac_word" || continue
7016 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7017 echo "$as_me:7017: found $ac_dir/$ac_word" >&5
7023 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7024 if test -n "$ac_ct_NCURSES_CONFIG"; then
7025 echo "$as_me:7025: result: $ac_ct_NCURSES_CONFIG" >&5
7026 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7028 echo "$as_me:7028: result: no" >&5
7029 echo "${ECHO_T}no" >&6
7032 test -n "$ac_ct_NCURSES_CONFIG" && break
7034 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7036 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7039 if test "$NCURSES_CONFIG" != none ; then
7041 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7043 cf_add_libs="`$NCURSES_CONFIG --libs`"
7044 # Filter out duplicates - this happens with badly-designed ".pc" files...
7045 for cf_add_1lib in $LIBS
7047 for cf_add_2lib in $cf_add_libs
7049 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7055 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7059 # even with config script, some packages use no-override for curses.h
7061 echo "$as_me:7061: checking if we have identified curses headers" >&5
7062 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7063 if test "${cf_cv_ncurses_header+set}" = set; then
7064 echo $ECHO_N "(cached) $ECHO_C" >&6
7067 cf_cv_ncurses_header=none
7069 ncurses.h $cf_cv_screen/ncurses.h \
7070 curses.h $cf_cv_screen/curses.h
7072 cat >conftest.$ac_ext <<_ACEOF
7073 #line 7073 "configure"
7074 #include "confdefs.h"
7075 #include <${cf_header}>
7079 initscr(); tgoto("?", 0,0)
7084 rm -f conftest.$ac_objext
7085 if { (eval echo "$as_me:7085: \"$ac_compile\"") >&5
7086 (eval $ac_compile) 2>&5
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
7090 { ac_try='test -s conftest.$ac_objext'
7091 { (eval echo "$as_me:7091: \"$ac_try\"") >&5
7094 echo "$as_me:7094: \$? = $ac_status" >&5
7095 (exit $ac_status); }; }; then
7096 cf_cv_ncurses_header=$cf_header; break
7098 echo "$as_me: failed program was:" >&5
7099 cat conftest.$ac_ext >&5
7101 rm -f conftest.$ac_objext conftest.$ac_ext
7105 echo "$as_me:7105: result: $cf_cv_ncurses_header" >&5
7106 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7108 if test "$cf_cv_ncurses_header" = none ; then
7109 { { echo "$as_me:7109: error: No curses header-files found" >&5
7110 echo "$as_me: error: No curses header-files found" >&2;}
7111 { (exit 1); exit 1; }; }
7114 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7116 for ac_header in $cf_cv_ncurses_header
7118 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7119 echo "$as_me:7119: checking for $ac_header" >&5
7120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7124 cat >conftest.$ac_ext <<_ACEOF
7125 #line 7125 "configure"
7126 #include "confdefs.h"
7127 #include <$ac_header>
7129 if { (eval echo "$as_me:7129: \"$ac_cpp conftest.$ac_ext\"") >&5
7130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7132 egrep -v '^ *\+' conftest.er1 >conftest.err
7134 cat conftest.err >&5
7135 echo "$as_me:7135: \$? = $ac_status" >&5
7136 (exit $ac_status); } >/dev/null; then
7137 if test -s conftest.err; then
7138 ac_cpp_err=$ac_c_preproc_warn_flag
7145 if test -z "$ac_cpp_err"; then
7146 eval "$as_ac_Header=yes"
7148 echo "$as_me: failed program was:" >&5
7149 cat conftest.$ac_ext >&5
7150 eval "$as_ac_Header=no"
7152 rm -f conftest.err conftest.$ac_ext
7154 echo "$as_me:7154: result: `eval echo '${'$as_ac_Header'}'`" >&5
7155 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7156 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7157 cat >>confdefs.h <<EOF
7158 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7164 cat >>confdefs.h <<\EOF
7168 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7170 cat >>confdefs.h <<EOF
7171 #define $cf_nculib_ROOT 1
7174 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7178 cf_ncuhdr_root=$cf_cv_screen
7180 test -n "$cf_cv_curses_dir" && \
7181 test "$cf_cv_curses_dir" != "no" && { \
7183 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7184 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7186 while test $cf_add_incdir != /usr/include
7188 if test -d $cf_add_incdir
7191 if test -n "$CFLAGS$CPPFLAGS" ; then
7192 # a loop is needed to ensure we can add subdirs of existing dirs
7193 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7194 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7195 cf_have_incdir=yes; break
7200 if test "$cf_have_incdir" = no ; then
7201 if test "$cf_add_incdir" = /usr/local/include ; then
7202 if test "$GCC" = yes
7204 cf_save_CPPFLAGS=$CPPFLAGS
7205 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7206 cat >conftest.$ac_ext <<_ACEOF
7207 #line 7207 "configure"
7208 #include "confdefs.h"
7218 rm -f conftest.$ac_objext
7219 if { (eval echo "$as_me:7219: \"$ac_compile\"") >&5
7220 (eval $ac_compile) 2>&5
7222 echo "$as_me:7222: \$? = $ac_status" >&5
7223 (exit $ac_status); } &&
7224 { ac_try='test -s conftest.$ac_objext'
7225 { (eval echo "$as_me:7225: \"$ac_try\"") >&5
7228 echo "$as_me:7228: \$? = $ac_status" >&5
7229 (exit $ac_status); }; }; then
7232 echo "$as_me: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7236 rm -f conftest.$ac_objext conftest.$ac_ext
7237 CPPFLAGS=$cf_save_CPPFLAGS
7242 if test "$cf_have_incdir" = no ; then
7243 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7245 echo "${as_me:-configure}:7245: testing adding $cf_add_incdir to include-path ..." 1>&5
7247 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7249 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7250 test "$cf_top_incdir" = "$cf_add_incdir" && break
7251 cf_add_incdir="$cf_top_incdir"
7264 echo "$as_me:7264: checking for $cf_ncuhdr_root header in include-path" >&5
7265 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7266 if test "${cf_cv_ncurses_h+set}" = set; then
7267 echo $ECHO_N "(cached) $ECHO_C" >&6
7270 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7271 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7272 for cf_header in $cf_header_list
7275 cat >conftest.$ac_ext <<_ACEOF
7276 #line 7276 "configure"
7277 #include "confdefs.h"
7279 #include <$cf_header>
7284 #ifdef NCURSES_VERSION
7286 printf("%s\n", NCURSES_VERSION);
7299 rm -f conftest.$ac_objext
7300 if { (eval echo "$as_me:7300: \"$ac_compile\"") >&5
7301 (eval $ac_compile) 2>&5
7303 echo "$as_me:7303: \$? = $ac_status" >&5
7304 (exit $ac_status); } &&
7305 { ac_try='test -s conftest.$ac_objext'
7306 { (eval echo "$as_me:7306: \"$ac_try\"") >&5
7309 echo "$as_me:7309: \$? = $ac_status" >&5
7310 (exit $ac_status); }; }; then
7311 cf_cv_ncurses_h=$cf_header
7314 echo "$as_me: failed program was:" >&5
7315 cat conftest.$ac_ext >&5
7318 rm -f conftest.$ac_objext conftest.$ac_ext
7320 test "$cf_cv_ncurses_h" != no && break
7324 echo "$as_me:7324: result: $cf_cv_ncurses_h" >&5
7325 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7327 if test "$cf_cv_ncurses_h" != no ; then
7328 cf_cv_ncurses_header=$cf_cv_ncurses_h
7331 echo "$as_me:7331: checking for $cf_ncuhdr_root include-path" >&5
7332 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7333 if test "${cf_cv_ncurses_h2+set}" = set; then
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7337 test -n "$verbose" && echo
7341 # collect the current set of include-directories from compiler flags
7342 cf_header_path_list=""
7343 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7344 for cf_header_path in $CPPFLAGS $CFLAGS
7346 case $cf_header_path in
7348 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7350 test "x$cf_header_path" != "xNONE" && \
7351 test -d "$cf_header_path" && \
7353 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7354 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7355 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7356 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7357 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7358 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"
7361 cf_header_path_list="$cf_header_path_list $cf_search"
7367 # add the variations for the package we are looking for
7371 test "x$prefix" != "xNONE" && \
7372 test -d "$prefix" && \
7374 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7375 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7376 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7377 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7378 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7379 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7382 for cf_subdir_prefix in \
7391 test "x$cf_subdir_prefix" != "x$prefix" && \
7392 test -d "$cf_subdir_prefix" && \
7393 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7394 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7395 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7396 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7397 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7398 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7399 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"
7404 test "$includedir" != NONE && \
7405 test "$includedir" != "/usr/include" && \
7406 test -d "$includedir" && {
7407 test -d $includedir && cf_search="$cf_search $includedir"
7408 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7411 test "$oldincludedir" != NONE && \
7412 test "$oldincludedir" != "/usr/include" && \
7413 test -d "$oldincludedir" && {
7414 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7415 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7418 cf_search="$cf_search $cf_header_path_list"
7420 test -n "$verbose" && echo search path $cf_search
7421 cf_save2_CPPFLAGS="$CPPFLAGS"
7422 for cf_incdir in $cf_search
7425 if test -n "$cf_incdir" ; then
7426 for cf_add_incdir in $cf_incdir
7428 while test $cf_add_incdir != /usr/include
7430 if test -d $cf_add_incdir
7433 if test -n "$CFLAGS$CPPFLAGS" ; then
7434 # a loop is needed to ensure we can add subdirs of existing dirs
7435 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7436 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7437 cf_have_incdir=yes; break
7442 if test "$cf_have_incdir" = no ; then
7443 if test "$cf_add_incdir" = /usr/local/include ; then
7444 if test "$GCC" = yes
7446 cf_save_CPPFLAGS=$CPPFLAGS
7447 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7448 cat >conftest.$ac_ext <<_ACEOF
7449 #line 7449 "configure"
7450 #include "confdefs.h"
7460 rm -f conftest.$ac_objext
7461 if { (eval echo "$as_me:7461: \"$ac_compile\"") >&5
7462 (eval $ac_compile) 2>&5
7464 echo "$as_me:7464: \$? = $ac_status" >&5
7465 (exit $ac_status); } &&
7466 { ac_try='test -s conftest.$ac_objext'
7467 { (eval echo "$as_me:7467: \"$ac_try\"") >&5
7470 echo "$as_me:7470: \$? = $ac_status" >&5
7471 (exit $ac_status); }; }; then
7474 echo "$as_me: failed program was:" >&5
7475 cat conftest.$ac_ext >&5
7478 rm -f conftest.$ac_objext conftest.$ac_ext
7479 CPPFLAGS=$cf_save_CPPFLAGS
7484 if test "$cf_have_incdir" = no ; then
7485 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7487 echo "${as_me:-configure}:7487: testing adding $cf_add_incdir to include-path ..." 1>&5
7489 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7491 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7492 test "$cf_top_incdir" = "$cf_add_incdir" && break
7493 cf_add_incdir="$cf_top_incdir"
7509 cat >conftest.$ac_ext <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7513 #include <$cf_header>
7518 #ifdef NCURSES_VERSION
7520 printf("%s\n", NCURSES_VERSION);
7533 rm -f conftest.$ac_objext
7534 if { (eval echo "$as_me:7534: \"$ac_compile\"") >&5
7535 (eval $ac_compile) 2>&5
7537 echo "$as_me:7537: \$? = $ac_status" >&5
7538 (exit $ac_status); } &&
7539 { ac_try='test -s conftest.$ac_objext'
7540 { (eval echo "$as_me:7540: \"$ac_try\"") >&5
7543 echo "$as_me:7543: \$? = $ac_status" >&5
7544 (exit $ac_status); }; }; then
7545 cf_cv_ncurses_h2=$cf_header
7548 echo "$as_me: failed program was:" >&5
7549 cat conftest.$ac_ext >&5
7552 rm -f conftest.$ac_objext conftest.$ac_ext
7554 if test "$cf_cv_ncurses_h2" != no ; then
7555 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7556 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7559 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7561 CPPFLAGS="$cf_save2_CPPFLAGS"
7562 test "$cf_cv_ncurses_h2" != no && break
7564 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7564: error: not found" >&5
7565 echo "$as_me: error: not found" >&2;}
7566 { (exit 1); exit 1; }; }
7569 echo "$as_me:7569: result: $cf_cv_ncurses_h2" >&5
7570 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7572 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7573 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7574 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7575 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7578 if test -n "$cf_1st_incdir" ; then
7579 for cf_add_incdir in $cf_1st_incdir
7581 while test $cf_add_incdir != /usr/include
7583 if test -d $cf_add_incdir
7586 if test -n "$CFLAGS$CPPFLAGS" ; then
7587 # a loop is needed to ensure we can add subdirs of existing dirs
7588 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7589 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7590 cf_have_incdir=yes; break
7595 if test "$cf_have_incdir" = no ; then
7596 if test "$cf_add_incdir" = /usr/local/include ; then
7597 if test "$GCC" = yes
7599 cf_save_CPPFLAGS=$CPPFLAGS
7600 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7601 cat >conftest.$ac_ext <<_ACEOF
7602 #line 7602 "configure"
7603 #include "confdefs.h"
7613 rm -f conftest.$ac_objext
7614 if { (eval echo "$as_me:7614: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7617 echo "$as_me:7617: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:7620: \"$ac_try\"") >&5
7623 echo "$as_me:7623: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7627 echo "$as_me: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
7631 rm -f conftest.$ac_objext conftest.$ac_ext
7632 CPPFLAGS=$cf_save_CPPFLAGS
7637 if test "$cf_have_incdir" = no ; then
7638 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7640 echo "${as_me:-configure}:7640: testing adding $cf_add_incdir to include-path ..." 1>&5
7642 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7644 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7645 test "$cf_top_incdir" = "$cf_add_incdir" && break
7646 cf_add_incdir="$cf_top_incdir"
7659 # Set definitions to allow ifdef'ing for ncurses.h
7661 case $cf_cv_ncurses_header in
7664 cat >>confdefs.h <<\EOF
7665 #define HAVE_NCURSES_H 1
7671 case $cf_cv_ncurses_header in
7672 (ncurses/curses.h|ncurses/ncurses.h)
7674 cat >>confdefs.h <<\EOF
7675 #define HAVE_NCURSES_NCURSES_H 1
7679 (ncursesw/curses.h|ncursesw/ncurses.h)
7681 cat >>confdefs.h <<\EOF
7682 #define HAVE_NCURSESW_NCURSES_H 1
7688 echo "$as_me:7688: checking for terminfo header" >&5
7689 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7690 if test "${cf_cv_term_header+set}" = set; then
7691 echo $ECHO_N "(cached) $ECHO_C" >&6
7694 case ${cf_cv_ncurses_header} in
7695 (*/ncurses.h|*/ncursesw.h)
7696 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7699 cf_term_header=term.h
7703 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7705 cat >conftest.$ac_ext <<_ACEOF
7706 #line 7706 "configure"
7707 #include "confdefs.h"
7709 #include <${cf_cv_ncurses_header:-curses.h}>
7715 int x = auto_left_margin
7720 rm -f conftest.$ac_objext
7721 if { (eval echo "$as_me:7721: \"$ac_compile\"") >&5
7722 (eval $ac_compile) 2>&5
7724 echo "$as_me:7724: \$? = $ac_status" >&5
7725 (exit $ac_status); } &&
7726 { ac_try='test -s conftest.$ac_objext'
7727 { (eval echo "$as_me:7727: \"$ac_try\"") >&5
7730 echo "$as_me:7730: \$? = $ac_status" >&5
7731 (exit $ac_status); }; }; then
7733 cf_cv_term_header="$cf_test"
7735 echo "$as_me: failed program was:" >&5
7736 cat conftest.$ac_ext >&5
7738 cf_cv_term_header=unknown
7741 rm -f conftest.$ac_objext conftest.$ac_ext
7742 test "$cf_cv_term_header" != unknown && break
7746 echo "$as_me:7746: result: $cf_cv_term_header" >&5
7747 echo "${ECHO_T}$cf_cv_term_header" >&6
7749 # Set definitions to allow ifdef'ing to accommodate subdirectories
7751 case $cf_cv_term_header in
7754 cat >>confdefs.h <<\EOF
7755 #define HAVE_TERM_H 1
7761 case $cf_cv_term_header in
7764 cat >>confdefs.h <<\EOF
7765 #define HAVE_NCURSES_TERM_H 1
7771 cat >>confdefs.h <<\EOF
7772 #define HAVE_NCURSESW_TERM_H 1
7778 # some applications need this, but should check for NCURSES_VERSION
7780 cat >>confdefs.h <<\EOF
7784 echo "$as_me:7784: checking for ncurses version" >&5
7785 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7786 if test "${cf_cv_ncurses_version+set}" = set; then
7787 echo $ECHO_N "(cached) $ECHO_C" >&6
7790 cf_cv_ncurses_version=no
7793 if test "$cross_compiling" = yes; then
7795 # This will not work if the preprocessor splits the line after the
7796 # Autoconf token. The 'unproto' program does that.
7797 cat > conftest.$ac_ext <<EOF
7798 #include <${cf_cv_ncurses_header:-curses.h}>
7800 #ifdef NCURSES_VERSION
7801 Autoconf NCURSES_VERSION
7809 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7810 { (eval echo "$as_me:7810: \"$cf_try\"") >&5
7813 echo "$as_me:7813: \$? = $ac_status" >&5
7814 (exit $ac_status); }
7815 if test -f conftest.out ; then
7816 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7817 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7822 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7826 #include <${cf_cv_ncurses_header:-curses.h}>
7830 FILE *fp = fopen("$cf_tempfile", "w");
7831 #ifdef NCURSES_VERSION
7832 # ifdef NCURSES_VERSION_PATCH
7833 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7835 fprintf(fp, "%s\n", NCURSES_VERSION);
7839 fprintf(fp, "old\n");
7844 ${cf_cv_main_return:-return}(0);
7847 rm -f conftest$ac_exeext
7848 if { (eval echo "$as_me:7848: \"$ac_link\"") >&5
7849 (eval $ac_link) 2>&5
7851 echo "$as_me:7851: \$? = $ac_status" >&5
7852 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7853 { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7856 echo "$as_me:7856: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
7859 cf_cv_ncurses_version=`cat $cf_tempfile`
7861 echo "$as_me: program exited with status $ac_status" >&5
7862 echo "$as_me: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7870 echo "$as_me:7870: result: $cf_cv_ncurses_version" >&5
7871 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7872 test "$cf_cv_ncurses_version" = no ||
7873 cat >>confdefs.h <<\EOF
7877 cf_nculib_root=$cf_cv_screen
7878 # This works, except for the special case where we find gpm, but
7879 # ncurses is in a nonstandard location via $LIBS, and we really want
7882 cf_ncurses_SAVE="$LIBS"
7883 echo "$as_me:7883: checking for Gpm_Open in -lgpm" >&5
7884 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7885 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7886 echo $ECHO_N "(cached) $ECHO_C" >&6
7888 ac_check_lib_save_LIBS=$LIBS
7890 cat >conftest.$ac_ext <<_ACEOF
7891 #line 7891 "configure"
7892 #include "confdefs.h"
7894 /* Override any gcc2 internal prototype to avoid an error. */
7898 /* We use char because int might match the return type of a gcc2
7899 builtin and then its argument prototype would still apply. */
7909 rm -f conftest.$ac_objext conftest$ac_exeext
7910 if { (eval echo "$as_me:7910: \"$ac_link\"") >&5
7911 (eval $ac_link) 2>&5
7913 echo "$as_me:7913: \$? = $ac_status" >&5
7914 (exit $ac_status); } &&
7915 { ac_try='test -s conftest$ac_exeext'
7916 { (eval echo "$as_me:7916: \"$ac_try\"") >&5
7919 echo "$as_me:7919: \$? = $ac_status" >&5
7920 (exit $ac_status); }; }; then
7921 ac_cv_lib_gpm_Gpm_Open=yes
7923 echo "$as_me: failed program was:" >&5
7924 cat conftest.$ac_ext >&5
7925 ac_cv_lib_gpm_Gpm_Open=no
7927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7928 LIBS=$ac_check_lib_save_LIBS
7930 echo "$as_me:7930: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7931 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7932 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7933 echo "$as_me:7933: checking for initscr in -lgpm" >&5
7934 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7935 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7938 ac_check_lib_save_LIBS=$LIBS
7940 cat >conftest.$ac_ext <<_ACEOF
7941 #line 7941 "configure"
7942 #include "confdefs.h"
7944 /* Override any gcc2 internal prototype to avoid an error. */
7948 /* We use char because int might match the return type of a gcc2
7949 builtin and then its argument prototype would still apply. */
7959 rm -f conftest.$ac_objext conftest$ac_exeext
7960 if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
7961 (eval $ac_link) 2>&5
7963 echo "$as_me:7963: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
7965 { ac_try='test -s conftest$ac_exeext'
7966 { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7969 echo "$as_me:7969: \$? = $ac_status" >&5
7970 (exit $ac_status); }; }; then
7971 ac_cv_lib_gpm_initscr=yes
7973 echo "$as_me: failed program was:" >&5
7974 cat conftest.$ac_ext >&5
7975 ac_cv_lib_gpm_initscr=no
7977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7978 LIBS=$ac_check_lib_save_LIBS
7980 echo "$as_me:7980: result: $ac_cv_lib_gpm_initscr" >&5
7981 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7982 if test $ac_cv_lib_gpm_initscr = yes; then
7983 LIBS="$cf_ncurses_SAVE"
7985 cf_ncurses_LIBS="-lgpm"
7992 # This is only necessary if you are linking against an obsolete
7993 # version of ncurses (but it should do no harm, since it's static).
7994 if test "$cf_nculib_root" = ncurses ; then
7995 echo "$as_me:7995: checking for tgoto in -lmytinfo" >&5
7996 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7997 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7998 echo $ECHO_N "(cached) $ECHO_C" >&6
8000 ac_check_lib_save_LIBS=$LIBS
8001 LIBS="-lmytinfo $LIBS"
8002 cat >conftest.$ac_ext <<_ACEOF
8003 #line 8003 "configure"
8004 #include "confdefs.h"
8006 /* Override any gcc2 internal prototype to avoid an error. */
8010 /* We use char because int might match the return type of a gcc2
8011 builtin and then its argument prototype would still apply. */
8021 rm -f conftest.$ac_objext conftest$ac_exeext
8022 if { (eval echo "$as_me:8022: \"$ac_link\"") >&5
8023 (eval $ac_link) 2>&5
8025 echo "$as_me:8025: \$? = $ac_status" >&5
8026 (exit $ac_status); } &&
8027 { ac_try='test -s conftest$ac_exeext'
8028 { (eval echo "$as_me:8028: \"$ac_try\"") >&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit $ac_status); }; }; then
8033 ac_cv_lib_mytinfo_tgoto=yes
8035 echo "$as_me: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
8037 ac_cv_lib_mytinfo_tgoto=no
8039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8040 LIBS=$ac_check_lib_save_LIBS
8042 echo "$as_me:8042: result: $ac_cv_lib_mytinfo_tgoto" >&5
8043 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8044 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8045 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8052 cf_add_libs="$cf_ncurses_LIBS"
8053 # Filter out duplicates - this happens with badly-designed ".pc" files...
8054 for cf_add_1lib in $LIBS
8056 for cf_add_2lib in $cf_add_libs
8058 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8064 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8068 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8071 cf_add_libs="-l$cf_nculib_root"
8072 # Filter out duplicates - this happens with badly-designed ".pc" files...
8073 for cf_add_1lib in $LIBS
8075 for cf_add_2lib in $cf_add_libs
8077 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8083 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8089 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8091 echo "$as_me:8091: checking for initscr" >&5
8092 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8093 if test "${ac_cv_func_initscr+set}" = set; then
8094 echo $ECHO_N "(cached) $ECHO_C" >&6
8096 cat >conftest.$ac_ext <<_ACEOF
8097 #line 8097 "configure"
8098 #include "confdefs.h"
8099 /* System header to define __stub macros and hopefully few prototypes,
8100 which can conflict with char initscr (); below. */
8102 /* Override any gcc2 internal prototype to avoid an error. */
8106 /* We use char because int might match the return type of a gcc2
8107 builtin and then its argument prototype would still apply. */
8114 /* The GNU C library defines this for functions which it implements
8115 to always fail with ENOSYS. Some functions are actually named
8116 something starting with __ and the normal name is an alias. */
8117 #if defined (__stub_initscr) || defined (__stub___initscr)
8120 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8127 rm -f conftest.$ac_objext conftest$ac_exeext
8128 if { (eval echo "$as_me:8128: \"$ac_link\"") >&5
8129 (eval $ac_link) 2>&5
8131 echo "$as_me:8131: \$? = $ac_status" >&5
8132 (exit $ac_status); } &&
8133 { ac_try='test -s conftest$ac_exeext'
8134 { (eval echo "$as_me:8134: \"$ac_try\"") >&5
8137 echo "$as_me:8137: \$? = $ac_status" >&5
8138 (exit $ac_status); }; }; then
8139 ac_cv_func_initscr=yes
8141 echo "$as_me: failed program was:" >&5
8142 cat conftest.$ac_ext >&5
8143 ac_cv_func_initscr=no
8145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8147 echo "$as_me:8147: result: $ac_cv_func_initscr" >&5
8148 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8149 if test $ac_cv_func_initscr = yes; then
8150 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8153 cf_save_LIBS="$LIBS"
8154 echo "$as_me:8154: checking for initscr in -l$cf_nculib_root" >&5
8155 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8156 LIBS="-l$cf_nculib_root $LIBS"
8157 cat >conftest.$ac_ext <<_ACEOF
8158 #line 8158 "configure"
8159 #include "confdefs.h"
8160 #include <${cf_cv_ncurses_header:-curses.h}>
8169 rm -f conftest.$ac_objext conftest$ac_exeext
8170 if { (eval echo "$as_me:8170: \"$ac_link\"") >&5
8171 (eval $ac_link) 2>&5
8173 echo "$as_me:8173: \$? = $ac_status" >&5
8174 (exit $ac_status); } &&
8175 { ac_try='test -s conftest$ac_exeext'
8176 { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8179 echo "$as_me:8179: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then
8181 echo "$as_me:8181: result: yes" >&5
8182 echo "${ECHO_T}yes" >&6
8183 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8186 echo "$as_me: failed program was:" >&5
8187 cat conftest.$ac_ext >&5
8188 echo "$as_me:8188: result: no" >&5
8189 echo "${ECHO_T}no" >&6
8192 cf_library_path_list=""
8193 if test -n "${LDFLAGS}${LIBS}" ; then
8194 for cf_library_path in $LDFLAGS $LIBS
8196 case $cf_library_path in
8198 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8200 test "x$cf_library_path" != "xNONE" && \
8201 test -d "$cf_library_path" && \
8203 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8204 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8205 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8206 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8207 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8208 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"
8211 cf_library_path_list="$cf_library_path_list $cf_search"
8219 test "x$prefix" != "xNONE" && \
8220 test -d "$prefix" && \
8222 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8223 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8224 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8225 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8226 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8227 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8230 for cf_subdir_prefix in \
8239 test "x$cf_subdir_prefix" != "x$prefix" && \
8240 test -d "$cf_subdir_prefix" && \
8241 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8242 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8243 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8244 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8245 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8246 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8247 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"
8252 cf_search="$cf_library_path_list $cf_search"
8254 for cf_libdir in $cf_search
8256 echo "$as_me:8256: checking for -l$cf_nculib_root in $cf_libdir" >&5
8257 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8258 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8259 cat >conftest.$ac_ext <<_ACEOF
8260 #line 8260 "configure"
8261 #include "confdefs.h"
8262 #include <${cf_cv_ncurses_header:-curses.h}>
8271 rm -f conftest.$ac_objext conftest$ac_exeext
8272 if { (eval echo "$as_me:8272: \"$ac_link\"") >&5
8273 (eval $ac_link) 2>&5
8275 echo "$as_me:8275: \$? = $ac_status" >&5
8276 (exit $ac_status); } &&
8277 { ac_try='test -s conftest$ac_exeext'
8278 { (eval echo "$as_me:8278: \"$ac_try\"") >&5
8281 echo "$as_me:8281: \$? = $ac_status" >&5
8282 (exit $ac_status); }; }; then
8283 echo "$as_me:8283: result: yes" >&5
8284 echo "${ECHO_T}yes" >&6
8285 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8288 echo "$as_me: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 echo "$as_me:8290: result: no" >&5
8291 echo "${ECHO_T}no" >&6
8292 LIBS="$cf_save_LIBS"
8294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8302 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8304 if test $cf_found_library = no ; then
8305 { { echo "$as_me:8305: error: Cannot link $cf_nculib_root library" >&5
8306 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8307 { (exit 1); exit 1; }; }
8312 if test -n "$cf_ncurses_LIBS" ; then
8313 echo "$as_me:8313: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8314 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8315 cf_ncurses_SAVE="$LIBS"
8316 for p in $cf_ncurses_LIBS ; do
8317 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8318 if test "$q" != "$LIBS" ; then
8322 cat >conftest.$ac_ext <<_ACEOF
8323 #line 8323 "configure"
8324 #include "confdefs.h"
8325 #include <${cf_cv_ncurses_header:-curses.h}>
8329 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8334 rm -f conftest.$ac_objext conftest$ac_exeext
8335 if { (eval echo "$as_me:8335: \"$ac_link\"") >&5
8336 (eval $ac_link) 2>&5
8338 echo "$as_me:8338: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest$ac_exeext'
8341 { (eval echo "$as_me:8341: \"$ac_try\"") >&5
8344 echo "$as_me:8344: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 echo "$as_me:8346: result: yes" >&5
8347 echo "${ECHO_T}yes" >&6
8349 echo "$as_me: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8351 echo "$as_me:8351: result: no" >&5
8352 echo "${ECHO_T}no" >&6
8353 LIBS="$cf_ncurses_SAVE"
8355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8358 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8360 cat >>confdefs.h <<EOF
8361 #define $cf_nculib_ROOT 1
8372 cf_ncuconfig_root=$cf_cv_screen
8373 cf_have_ncuconfig=no
8375 if test "x${PKG_CONFIG:=none}" != xnone; then
8376 echo "$as_me:8376: checking pkg-config for $cf_ncuconfig_root" >&5
8377 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8378 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8379 echo "$as_me:8379: result: yes" >&5
8380 echo "${ECHO_T}yes" >&6
8382 echo "$as_me:8382: checking if the $cf_ncuconfig_root package files work" >&5
8383 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8384 cf_have_ncuconfig=unknown
8386 cf_save_CPPFLAGS="$CPPFLAGS"
8387 cf_save_LIBS="$LIBS"
8389 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8391 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8392 # Filter out duplicates - this happens with badly-designed ".pc" files...
8393 for cf_add_1lib in $LIBS
8395 for cf_add_2lib in $cf_add_libs
8397 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8403 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8407 cat >conftest.$ac_ext <<_ACEOF
8408 #line 8408 "configure"
8409 #include "confdefs.h"
8410 #include <${cf_cv_ncurses_header:-curses.h}>
8414 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8419 rm -f conftest.$ac_objext conftest$ac_exeext
8420 if { (eval echo "$as_me:8420: \"$ac_link\"") >&5
8421 (eval $ac_link) 2>&5
8423 echo "$as_me:8423: \$? = $ac_status" >&5
8424 (exit $ac_status); } &&
8425 { ac_try='test -s conftest$ac_exeext'
8426 { (eval echo "$as_me:8426: \"$ac_try\"") >&5
8429 echo "$as_me:8429: \$? = $ac_status" >&5
8430 (exit $ac_status); }; }; then
8431 if test "$cross_compiling" = yes; then
8432 cf_have_ncuconfig=maybe
8434 cat >conftest.$ac_ext <<_ACEOF
8435 #line 8435 "configure"
8436 #include "confdefs.h"
8437 #include <${cf_cv_ncurses_header:-curses.h}>
8439 { char *xx = curses_version(); return (xx == 0); }
8441 rm -f conftest$ac_exeext
8442 if { (eval echo "$as_me:8442: \"$ac_link\"") >&5
8443 (eval $ac_link) 2>&5
8445 echo "$as_me:8445: \$? = $ac_status" >&5
8446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8447 { (eval echo "$as_me:8447: \"$ac_try\"") >&5
8450 echo "$as_me:8450: \$? = $ac_status" >&5
8451 (exit $ac_status); }; }; then
8452 cf_have_ncuconfig=yes
8454 echo "$as_me: program exited with status $ac_status" >&5
8455 echo "$as_me: failed program was:" >&5
8456 cat conftest.$ac_ext >&5
8457 cf_have_ncuconfig=no
8459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8462 echo "$as_me: failed program was:" >&5
8463 cat conftest.$ac_ext >&5
8464 cf_have_ncuconfig=no
8466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8467 echo "$as_me:8467: result: $cf_have_ncuconfig" >&5
8468 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8469 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8470 if test "$cf_have_ncuconfig" != "yes"
8472 CPPFLAGS="$cf_save_CPPFLAGS"
8473 LIBS="$cf_save_LIBS"
8474 NCURSES_CONFIG_PKG=none
8477 cat >>confdefs.h <<\EOF
8481 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8484 echo "$as_me:8484: checking for terminfo header" >&5
8485 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8486 if test "${cf_cv_term_header+set}" = set; then
8487 echo $ECHO_N "(cached) $ECHO_C" >&6
8490 case ${cf_cv_ncurses_header} in
8491 (*/ncurses.h|*/ncursesw.h)
8492 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8495 cf_term_header=term.h
8499 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8501 cat >conftest.$ac_ext <<_ACEOF
8502 #line 8502 "configure"
8503 #include "confdefs.h"
8505 #include <${cf_cv_ncurses_header:-curses.h}>
8511 int x = auto_left_margin
8516 rm -f conftest.$ac_objext
8517 if { (eval echo "$as_me:8517: \"$ac_compile\"") >&5
8518 (eval $ac_compile) 2>&5
8520 echo "$as_me:8520: \$? = $ac_status" >&5
8521 (exit $ac_status); } &&
8522 { ac_try='test -s conftest.$ac_objext'
8523 { (eval echo "$as_me:8523: \"$ac_try\"") >&5
8526 echo "$as_me:8526: \$? = $ac_status" >&5
8527 (exit $ac_status); }; }; then
8529 cf_cv_term_header="$cf_test"
8531 echo "$as_me: failed program was:" >&5
8532 cat conftest.$ac_ext >&5
8534 cf_cv_term_header=unknown
8537 rm -f conftest.$ac_objext conftest.$ac_ext
8538 test "$cf_cv_term_header" != unknown && break
8542 echo "$as_me:8542: result: $cf_cv_term_header" >&5
8543 echo "${ECHO_T}$cf_cv_term_header" >&6
8545 # Set definitions to allow ifdef'ing to accommodate subdirectories
8547 case $cf_cv_term_header in
8550 cat >>confdefs.h <<\EOF
8551 #define HAVE_TERM_H 1
8557 case $cf_cv_term_header in
8560 cat >>confdefs.h <<\EOF
8561 #define HAVE_NCURSES_TERM_H 1
8567 cat >>confdefs.h <<\EOF
8568 #define HAVE_NCURSESW_TERM_H 1
8575 echo "$as_me:8575: result: no" >&5
8576 echo "${ECHO_T}no" >&6
8577 NCURSES_CONFIG_PKG=none
8580 NCURSES_CONFIG_PKG=none
8583 if test "x$cf_have_ncuconfig" = "xno"; then
8584 echo "Looking for ${cf_ncuconfig_root}-config"
8586 if test -n "$ac_tool_prefix"; then
8587 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8589 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8590 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8591 echo "$as_me:8591: checking for $ac_word" >&5
8592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8593 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8594 echo $ECHO_N "(cached) $ECHO_C" >&6
8596 if test -n "$NCURSES_CONFIG"; then
8597 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8599 ac_save_IFS=$IFS; IFS=$ac_path_separator
8601 for ac_dir in $ac_dummy; do
8603 test -z "$ac_dir" && ac_dir=.
8604 $as_executable_p "$ac_dir/$ac_word" || continue
8605 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8606 echo "$as_me:8606: found $ac_dir/$ac_word" >&5
8612 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8613 if test -n "$NCURSES_CONFIG"; then
8614 echo "$as_me:8614: result: $NCURSES_CONFIG" >&5
8615 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8617 echo "$as_me:8617: result: no" >&5
8618 echo "${ECHO_T}no" >&6
8621 test -n "$NCURSES_CONFIG" && break
8624 if test -z "$NCURSES_CONFIG"; then
8625 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8626 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8628 # Extract the first word of "$ac_prog", so it can be a program name with args.
8629 set dummy $ac_prog; ac_word=$2
8630 echo "$as_me:8630: checking for $ac_word" >&5
8631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8632 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8633 echo $ECHO_N "(cached) $ECHO_C" >&6
8635 if test -n "$ac_ct_NCURSES_CONFIG"; then
8636 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8638 ac_save_IFS=$IFS; IFS=$ac_path_separator
8640 for ac_dir in $ac_dummy; do
8642 test -z "$ac_dir" && ac_dir=.
8643 $as_executable_p "$ac_dir/$ac_word" || continue
8644 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8645 echo "$as_me:8645: found $ac_dir/$ac_word" >&5
8651 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8652 if test -n "$ac_ct_NCURSES_CONFIG"; then
8653 echo "$as_me:8653: result: $ac_ct_NCURSES_CONFIG" >&5
8654 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8656 echo "$as_me:8656: result: no" >&5
8657 echo "${ECHO_T}no" >&6
8660 test -n "$ac_ct_NCURSES_CONFIG" && break
8662 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8664 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8667 if test "$NCURSES_CONFIG" != none ; then
8669 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8671 cf_add_libs="`$NCURSES_CONFIG --libs`"
8672 # Filter out duplicates - this happens with badly-designed ".pc" files...
8673 for cf_add_1lib in $LIBS
8675 for cf_add_2lib in $cf_add_libs
8677 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8683 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8687 # even with config script, some packages use no-override for curses.h
8689 echo "$as_me:8689: checking if we have identified curses headers" >&5
8690 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8691 if test "${cf_cv_ncurses_header+set}" = set; then
8692 echo $ECHO_N "(cached) $ECHO_C" >&6
8695 cf_cv_ncurses_header=none
8697 ncurses.h $cf_cv_screen/ncurses.h \
8698 curses.h $cf_cv_screen/curses.h
8700 cat >conftest.$ac_ext <<_ACEOF
8701 #line 8701 "configure"
8702 #include "confdefs.h"
8703 #include <${cf_header}>
8707 initscr(); tgoto("?", 0,0)
8712 rm -f conftest.$ac_objext
8713 if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
8714 (eval $ac_compile) 2>&5
8716 echo "$as_me:8716: \$? = $ac_status" >&5
8717 (exit $ac_status); } &&
8718 { ac_try='test -s conftest.$ac_objext'
8719 { (eval echo "$as_me:8719: \"$ac_try\"") >&5
8722 echo "$as_me:8722: \$? = $ac_status" >&5
8723 (exit $ac_status); }; }; then
8724 cf_cv_ncurses_header=$cf_header; break
8726 echo "$as_me: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8733 echo "$as_me:8733: result: $cf_cv_ncurses_header" >&5
8734 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8736 if test "$cf_cv_ncurses_header" = none ; then
8737 { { echo "$as_me:8737: error: No curses header-files found" >&5
8738 echo "$as_me: error: No curses header-files found" >&2;}
8739 { (exit 1); exit 1; }; }
8742 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8744 for ac_header in $cf_cv_ncurses_header
8746 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8747 echo "$as_me:8747: checking for $ac_header" >&5
8748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8752 cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 #include <$ac_header>
8757 if { (eval echo "$as_me:8757: \"$ac_cpp conftest.$ac_ext\"") >&5
8758 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8760 egrep -v '^ *\+' conftest.er1 >conftest.err
8762 cat conftest.err >&5
8763 echo "$as_me:8763: \$? = $ac_status" >&5
8764 (exit $ac_status); } >/dev/null; then
8765 if test -s conftest.err; then
8766 ac_cpp_err=$ac_c_preproc_warn_flag
8773 if test -z "$ac_cpp_err"; then
8774 eval "$as_ac_Header=yes"
8776 echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778 eval "$as_ac_Header=no"
8780 rm -f conftest.err conftest.$ac_ext
8782 echo "$as_me:8782: result: `eval echo '${'$as_ac_Header'}'`" >&5
8783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8784 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8785 cat >>confdefs.h <<EOF
8786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8792 cat >>confdefs.h <<\EOF
8796 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8798 cat >>confdefs.h <<EOF
8799 #define $cf_nculib_ROOT 1
8802 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8806 cf_ncuhdr_root=$cf_cv_screen
8808 test -n "$cf_cv_curses_dir" && \
8809 test "$cf_cv_curses_dir" != "no" && { \
8811 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8812 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8814 while test $cf_add_incdir != /usr/include
8816 if test -d $cf_add_incdir
8819 if test -n "$CFLAGS$CPPFLAGS" ; then
8820 # a loop is needed to ensure we can add subdirs of existing dirs
8821 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8822 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8823 cf_have_incdir=yes; break
8828 if test "$cf_have_incdir" = no ; then
8829 if test "$cf_add_incdir" = /usr/local/include ; then
8830 if test "$GCC" = yes
8832 cf_save_CPPFLAGS=$CPPFLAGS
8833 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8834 cat >conftest.$ac_ext <<_ACEOF
8835 #line 8835 "configure"
8836 #include "confdefs.h"
8846 rm -f conftest.$ac_objext
8847 if { (eval echo "$as_me:8847: \"$ac_compile\"") >&5
8848 (eval $ac_compile) 2>&5
8850 echo "$as_me:8850: \$? = $ac_status" >&5
8851 (exit $ac_status); } &&
8852 { ac_try='test -s conftest.$ac_objext'
8853 { (eval echo "$as_me:8853: \"$ac_try\"") >&5
8856 echo "$as_me:8856: \$? = $ac_status" >&5
8857 (exit $ac_status); }; }; then
8860 echo "$as_me: failed program was:" >&5
8861 cat conftest.$ac_ext >&5
8864 rm -f conftest.$ac_objext conftest.$ac_ext
8865 CPPFLAGS=$cf_save_CPPFLAGS
8870 if test "$cf_have_incdir" = no ; then
8871 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8873 echo "${as_me:-configure}:8873: testing adding $cf_add_incdir to include-path ..." 1>&5
8875 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8877 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8878 test "$cf_top_incdir" = "$cf_add_incdir" && break
8879 cf_add_incdir="$cf_top_incdir"
8892 echo "$as_me:8892: checking for $cf_ncuhdr_root header in include-path" >&5
8893 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8894 if test "${cf_cv_ncurses_h+set}" = set; then
8895 echo $ECHO_N "(cached) $ECHO_C" >&6
8898 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8899 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8900 for cf_header in $cf_header_list
8903 cat >conftest.$ac_ext <<_ACEOF
8904 #line 8904 "configure"
8905 #include "confdefs.h"
8907 #include <$cf_header>
8912 #ifdef NCURSES_VERSION
8914 printf("%s\n", NCURSES_VERSION);
8927 rm -f conftest.$ac_objext
8928 if { (eval echo "$as_me:8928: \"$ac_compile\"") >&5
8929 (eval $ac_compile) 2>&5
8931 echo "$as_me:8931: \$? = $ac_status" >&5
8932 (exit $ac_status); } &&
8933 { ac_try='test -s conftest.$ac_objext'
8934 { (eval echo "$as_me:8934: \"$ac_try\"") >&5
8937 echo "$as_me:8937: \$? = $ac_status" >&5
8938 (exit $ac_status); }; }; then
8939 cf_cv_ncurses_h=$cf_header
8942 echo "$as_me: failed program was:" >&5
8943 cat conftest.$ac_ext >&5
8946 rm -f conftest.$ac_objext conftest.$ac_ext
8948 test "$cf_cv_ncurses_h" != no && break
8952 echo "$as_me:8952: result: $cf_cv_ncurses_h" >&5
8953 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8955 if test "$cf_cv_ncurses_h" != no ; then
8956 cf_cv_ncurses_header=$cf_cv_ncurses_h
8959 echo "$as_me:8959: checking for $cf_ncuhdr_root include-path" >&5
8960 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8961 if test "${cf_cv_ncurses_h2+set}" = set; then
8962 echo $ECHO_N "(cached) $ECHO_C" >&6
8965 test -n "$verbose" && echo
8969 # collect the current set of include-directories from compiler flags
8970 cf_header_path_list=""
8971 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8972 for cf_header_path in $CPPFLAGS $CFLAGS
8974 case $cf_header_path in
8976 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8978 test "x$cf_header_path" != "xNONE" && \
8979 test -d "$cf_header_path" && \
8981 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8982 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8983 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8984 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8985 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8986 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"
8989 cf_header_path_list="$cf_header_path_list $cf_search"
8995 # add the variations for the package we are looking for
8999 test "x$prefix" != "xNONE" && \
9000 test -d "$prefix" && \
9002 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9003 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9004 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9005 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9006 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9007 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9010 for cf_subdir_prefix in \
9019 test "x$cf_subdir_prefix" != "x$prefix" && \
9020 test -d "$cf_subdir_prefix" && \
9021 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9022 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9023 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9024 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9025 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9026 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9027 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"
9032 test "$includedir" != NONE && \
9033 test "$includedir" != "/usr/include" && \
9034 test -d "$includedir" && {
9035 test -d $includedir && cf_search="$cf_search $includedir"
9036 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9039 test "$oldincludedir" != NONE && \
9040 test "$oldincludedir" != "/usr/include" && \
9041 test -d "$oldincludedir" && {
9042 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9043 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9046 cf_search="$cf_search $cf_header_path_list"
9048 test -n "$verbose" && echo search path $cf_search
9049 cf_save2_CPPFLAGS="$CPPFLAGS"
9050 for cf_incdir in $cf_search
9053 if test -n "$cf_incdir" ; then
9054 for cf_add_incdir in $cf_incdir
9056 while test $cf_add_incdir != /usr/include
9058 if test -d $cf_add_incdir
9061 if test -n "$CFLAGS$CPPFLAGS" ; then
9062 # a loop is needed to ensure we can add subdirs of existing dirs
9063 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9064 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9065 cf_have_incdir=yes; break
9070 if test "$cf_have_incdir" = no ; then
9071 if test "$cf_add_incdir" = /usr/local/include ; then
9072 if test "$GCC" = yes
9074 cf_save_CPPFLAGS=$CPPFLAGS
9075 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9076 cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9088 rm -f conftest.$ac_objext
9089 if { (eval echo "$as_me:9089: \"$ac_compile\"") >&5
9090 (eval $ac_compile) 2>&5
9092 echo "$as_me:9092: \$? = $ac_status" >&5
9093 (exit $ac_status); } &&
9094 { ac_try='test -s conftest.$ac_objext'
9095 { (eval echo "$as_me:9095: \"$ac_try\"") >&5
9098 echo "$as_me:9098: \$? = $ac_status" >&5
9099 (exit $ac_status); }; }; then
9102 echo "$as_me: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9106 rm -f conftest.$ac_objext conftest.$ac_ext
9107 CPPFLAGS=$cf_save_CPPFLAGS
9112 if test "$cf_have_incdir" = no ; then
9113 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9115 echo "${as_me:-configure}:9115: testing adding $cf_add_incdir to include-path ..." 1>&5
9117 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9119 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9120 test "$cf_top_incdir" = "$cf_add_incdir" && break
9121 cf_add_incdir="$cf_top_incdir"
9137 cat >conftest.$ac_ext <<_ACEOF
9138 #line 9138 "configure"
9139 #include "confdefs.h"
9141 #include <$cf_header>
9146 #ifdef NCURSES_VERSION
9148 printf("%s\n", NCURSES_VERSION);
9161 rm -f conftest.$ac_objext
9162 if { (eval echo "$as_me:9162: \"$ac_compile\"") >&5
9163 (eval $ac_compile) 2>&5
9165 echo "$as_me:9165: \$? = $ac_status" >&5
9166 (exit $ac_status); } &&
9167 { ac_try='test -s conftest.$ac_objext'
9168 { (eval echo "$as_me:9168: \"$ac_try\"") >&5
9171 echo "$as_me:9171: \$? = $ac_status" >&5
9172 (exit $ac_status); }; }; then
9173 cf_cv_ncurses_h2=$cf_header
9176 echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9180 rm -f conftest.$ac_objext conftest.$ac_ext
9182 if test "$cf_cv_ncurses_h2" != no ; then
9183 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9184 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9187 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9189 CPPFLAGS="$cf_save2_CPPFLAGS"
9190 test "$cf_cv_ncurses_h2" != no && break
9192 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9192: error: not found" >&5
9193 echo "$as_me: error: not found" >&2;}
9194 { (exit 1); exit 1; }; }
9197 echo "$as_me:9197: result: $cf_cv_ncurses_h2" >&5
9198 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9200 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9201 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9202 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9203 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9206 if test -n "$cf_1st_incdir" ; then
9207 for cf_add_incdir in $cf_1st_incdir
9209 while test $cf_add_incdir != /usr/include
9211 if test -d $cf_add_incdir
9214 if test -n "$CFLAGS$CPPFLAGS" ; then
9215 # a loop is needed to ensure we can add subdirs of existing dirs
9216 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9217 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9218 cf_have_incdir=yes; break
9223 if test "$cf_have_incdir" = no ; then
9224 if test "$cf_add_incdir" = /usr/local/include ; then
9225 if test "$GCC" = yes
9227 cf_save_CPPFLAGS=$CPPFLAGS
9228 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9229 cat >conftest.$ac_ext <<_ACEOF
9230 #line 9230 "configure"
9231 #include "confdefs.h"
9241 rm -f conftest.$ac_objext
9242 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243 (eval $ac_compile) 2>&5
9245 echo "$as_me:9245: \$? = $ac_status" >&5
9246 (exit $ac_status); } &&
9247 { ac_try='test -s conftest.$ac_objext'
9248 { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9251 echo "$as_me:9251: \$? = $ac_status" >&5
9252 (exit $ac_status); }; }; then
9255 echo "$as_me: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260 CPPFLAGS=$cf_save_CPPFLAGS
9265 if test "$cf_have_incdir" = no ; then
9266 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9268 echo "${as_me:-configure}:9268: testing adding $cf_add_incdir to include-path ..." 1>&5
9270 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9272 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9273 test "$cf_top_incdir" = "$cf_add_incdir" && break
9274 cf_add_incdir="$cf_top_incdir"
9287 # Set definitions to allow ifdef'ing for ncurses.h
9289 case $cf_cv_ncurses_header in
9292 cat >>confdefs.h <<\EOF
9293 #define HAVE_NCURSES_H 1
9299 case $cf_cv_ncurses_header in
9300 (ncurses/curses.h|ncurses/ncurses.h)
9302 cat >>confdefs.h <<\EOF
9303 #define HAVE_NCURSES_NCURSES_H 1
9307 (ncursesw/curses.h|ncursesw/ncurses.h)
9309 cat >>confdefs.h <<\EOF
9310 #define HAVE_NCURSESW_NCURSES_H 1
9316 echo "$as_me:9316: checking for terminfo header" >&5
9317 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9318 if test "${cf_cv_term_header+set}" = set; then
9319 echo $ECHO_N "(cached) $ECHO_C" >&6
9322 case ${cf_cv_ncurses_header} in
9323 (*/ncurses.h|*/ncursesw.h)
9324 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9327 cf_term_header=term.h
9331 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9333 cat >conftest.$ac_ext <<_ACEOF
9334 #line 9334 "configure"
9335 #include "confdefs.h"
9337 #include <${cf_cv_ncurses_header:-curses.h}>
9343 int x = auto_left_margin
9348 rm -f conftest.$ac_objext
9349 if { (eval echo "$as_me:9349: \"$ac_compile\"") >&5
9350 (eval $ac_compile) 2>&5
9352 echo "$as_me:9352: \$? = $ac_status" >&5
9353 (exit $ac_status); } &&
9354 { ac_try='test -s conftest.$ac_objext'
9355 { (eval echo "$as_me:9355: \"$ac_try\"") >&5
9358 echo "$as_me:9358: \$? = $ac_status" >&5
9359 (exit $ac_status); }; }; then
9361 cf_cv_term_header="$cf_test"
9363 echo "$as_me: failed program was:" >&5
9364 cat conftest.$ac_ext >&5
9366 cf_cv_term_header=unknown
9369 rm -f conftest.$ac_objext conftest.$ac_ext
9370 test "$cf_cv_term_header" != unknown && break
9374 echo "$as_me:9374: result: $cf_cv_term_header" >&5
9375 echo "${ECHO_T}$cf_cv_term_header" >&6
9377 # Set definitions to allow ifdef'ing to accommodate subdirectories
9379 case $cf_cv_term_header in
9382 cat >>confdefs.h <<\EOF
9383 #define HAVE_TERM_H 1
9389 case $cf_cv_term_header in
9392 cat >>confdefs.h <<\EOF
9393 #define HAVE_NCURSES_TERM_H 1
9399 cat >>confdefs.h <<\EOF
9400 #define HAVE_NCURSESW_TERM_H 1
9406 # some applications need this, but should check for NCURSES_VERSION
9408 cat >>confdefs.h <<\EOF
9412 echo "$as_me:9412: checking for ncurses version" >&5
9413 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9414 if test "${cf_cv_ncurses_version+set}" = set; then
9415 echo $ECHO_N "(cached) $ECHO_C" >&6
9418 cf_cv_ncurses_version=no
9421 if test "$cross_compiling" = yes; then
9423 # This will not work if the preprocessor splits the line after the
9424 # Autoconf token. The 'unproto' program does that.
9425 cat > conftest.$ac_ext <<EOF
9426 #include <${cf_cv_ncurses_header:-curses.h}>
9428 #ifdef NCURSES_VERSION
9429 Autoconf NCURSES_VERSION
9437 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9438 { (eval echo "$as_me:9438: \"$cf_try\"") >&5
9441 echo "$as_me:9441: \$? = $ac_status" >&5
9442 (exit $ac_status); }
9443 if test -f conftest.out ; then
9444 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9445 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9450 cat >conftest.$ac_ext <<_ACEOF
9451 #line 9451 "configure"
9452 #include "confdefs.h"
9454 #include <${cf_cv_ncurses_header:-curses.h}>
9458 FILE *fp = fopen("$cf_tempfile", "w");
9459 #ifdef NCURSES_VERSION
9460 # ifdef NCURSES_VERSION_PATCH
9461 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9463 fprintf(fp, "%s\n", NCURSES_VERSION);
9467 fprintf(fp, "old\n");
9472 ${cf_cv_main_return:-return}(0);
9475 rm -f conftest$ac_exeext
9476 if { (eval echo "$as_me:9476: \"$ac_link\"") >&5
9477 (eval $ac_link) 2>&5
9479 echo "$as_me:9479: \$? = $ac_status" >&5
9480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9481 { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9484 echo "$as_me:9484: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9487 cf_cv_ncurses_version=`cat $cf_tempfile`
9489 echo "$as_me: program exited with status $ac_status" >&5
9490 echo "$as_me: failed program was:" >&5
9491 cat conftest.$ac_ext >&5
9493 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9498 echo "$as_me:9498: result: $cf_cv_ncurses_version" >&5
9499 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9500 test "$cf_cv_ncurses_version" = no ||
9501 cat >>confdefs.h <<\EOF
9505 cf_nculib_root=$cf_cv_screen
9506 # This works, except for the special case where we find gpm, but
9507 # ncurses is in a nonstandard location via $LIBS, and we really want
9510 cf_ncurses_SAVE="$LIBS"
9511 echo "$as_me:9511: checking for Gpm_Open in -lgpm" >&5
9512 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9513 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9514 echo $ECHO_N "(cached) $ECHO_C" >&6
9516 ac_check_lib_save_LIBS=$LIBS
9518 cat >conftest.$ac_ext <<_ACEOF
9519 #line 9519 "configure"
9520 #include "confdefs.h"
9522 /* Override any gcc2 internal prototype to avoid an error. */
9526 /* We use char because int might match the return type of a gcc2
9527 builtin and then its argument prototype would still apply. */
9537 rm -f conftest.$ac_objext conftest$ac_exeext
9538 if { (eval echo "$as_me:9538: \"$ac_link\"") >&5
9539 (eval $ac_link) 2>&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit $ac_status); } &&
9543 { ac_try='test -s conftest$ac_exeext'
9544 { (eval echo "$as_me:9544: \"$ac_try\"") >&5
9547 echo "$as_me:9547: \$? = $ac_status" >&5
9548 (exit $ac_status); }; }; then
9549 ac_cv_lib_gpm_Gpm_Open=yes
9551 echo "$as_me: failed program was:" >&5
9552 cat conftest.$ac_ext >&5
9553 ac_cv_lib_gpm_Gpm_Open=no
9555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9556 LIBS=$ac_check_lib_save_LIBS
9558 echo "$as_me:9558: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9559 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9560 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9561 echo "$as_me:9561: checking for initscr in -lgpm" >&5
9562 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9563 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9566 ac_check_lib_save_LIBS=$LIBS
9568 cat >conftest.$ac_ext <<_ACEOF
9569 #line 9569 "configure"
9570 #include "confdefs.h"
9572 /* Override any gcc2 internal prototype to avoid an error. */
9576 /* We use char because int might match the return type of a gcc2
9577 builtin and then its argument prototype would still apply. */
9587 rm -f conftest.$ac_objext conftest$ac_exeext
9588 if { (eval echo "$as_me:9588: \"$ac_link\"") >&5
9589 (eval $ac_link) 2>&5
9591 echo "$as_me:9591: \$? = $ac_status" >&5
9592 (exit $ac_status); } &&
9593 { ac_try='test -s conftest$ac_exeext'
9594 { (eval echo "$as_me:9594: \"$ac_try\"") >&5
9597 echo "$as_me:9597: \$? = $ac_status" >&5
9598 (exit $ac_status); }; }; then
9599 ac_cv_lib_gpm_initscr=yes
9601 echo "$as_me: failed program was:" >&5
9602 cat conftest.$ac_ext >&5
9603 ac_cv_lib_gpm_initscr=no
9605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9606 LIBS=$ac_check_lib_save_LIBS
9608 echo "$as_me:9608: result: $ac_cv_lib_gpm_initscr" >&5
9609 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9610 if test $ac_cv_lib_gpm_initscr = yes; then
9611 LIBS="$cf_ncurses_SAVE"
9613 cf_ncurses_LIBS="-lgpm"
9620 # This is only necessary if you are linking against an obsolete
9621 # version of ncurses (but it should do no harm, since it's static).
9622 if test "$cf_nculib_root" = ncurses ; then
9623 echo "$as_me:9623: checking for tgoto in -lmytinfo" >&5
9624 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9625 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9626 echo $ECHO_N "(cached) $ECHO_C" >&6
9628 ac_check_lib_save_LIBS=$LIBS
9629 LIBS="-lmytinfo $LIBS"
9630 cat >conftest.$ac_ext <<_ACEOF
9631 #line 9631 "configure"
9632 #include "confdefs.h"
9634 /* Override any gcc2 internal prototype to avoid an error. */
9638 /* We use char because int might match the return type of a gcc2
9639 builtin and then its argument prototype would still apply. */
9649 rm -f conftest.$ac_objext conftest$ac_exeext
9650 if { (eval echo "$as_me:9650: \"$ac_link\"") >&5
9651 (eval $ac_link) 2>&5
9653 echo "$as_me:9653: \$? = $ac_status" >&5
9654 (exit $ac_status); } &&
9655 { ac_try='test -s conftest$ac_exeext'
9656 { (eval echo "$as_me:9656: \"$ac_try\"") >&5
9659 echo "$as_me:9659: \$? = $ac_status" >&5
9660 (exit $ac_status); }; }; then
9661 ac_cv_lib_mytinfo_tgoto=yes
9663 echo "$as_me: failed program was:" >&5
9664 cat conftest.$ac_ext >&5
9665 ac_cv_lib_mytinfo_tgoto=no
9667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9668 LIBS=$ac_check_lib_save_LIBS
9670 echo "$as_me:9670: result: $ac_cv_lib_mytinfo_tgoto" >&5
9671 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9672 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9673 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9680 cf_add_libs="$cf_ncurses_LIBS"
9681 # Filter out duplicates - this happens with badly-designed ".pc" files...
9682 for cf_add_1lib in $LIBS
9684 for cf_add_2lib in $cf_add_libs
9686 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9692 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9696 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9699 cf_add_libs="-l$cf_nculib_root"
9700 # Filter out duplicates - this happens with badly-designed ".pc" files...
9701 for cf_add_1lib in $LIBS
9703 for cf_add_2lib in $cf_add_libs
9705 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9711 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9717 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9719 echo "$as_me:9719: checking for initscr" >&5
9720 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9721 if test "${ac_cv_func_initscr+set}" = set; then
9722 echo $ECHO_N "(cached) $ECHO_C" >&6
9724 cat >conftest.$ac_ext <<_ACEOF
9725 #line 9725 "configure"
9726 #include "confdefs.h"
9727 /* System header to define __stub macros and hopefully few prototypes,
9728 which can conflict with char initscr (); below. */
9730 /* Override any gcc2 internal prototype to avoid an error. */
9734 /* We use char because int might match the return type of a gcc2
9735 builtin and then its argument prototype would still apply. */
9742 /* The GNU C library defines this for functions which it implements
9743 to always fail with ENOSYS. Some functions are actually named
9744 something starting with __ and the normal name is an alias. */
9745 #if defined (__stub_initscr) || defined (__stub___initscr)
9748 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9755 rm -f conftest.$ac_objext conftest$ac_exeext
9756 if { (eval echo "$as_me:9756: \"$ac_link\"") >&5
9757 (eval $ac_link) 2>&5
9759 echo "$as_me:9759: \$? = $ac_status" >&5
9760 (exit $ac_status); } &&
9761 { ac_try='test -s conftest$ac_exeext'
9762 { (eval echo "$as_me:9762: \"$ac_try\"") >&5
9765 echo "$as_me:9765: \$? = $ac_status" >&5
9766 (exit $ac_status); }; }; then
9767 ac_cv_func_initscr=yes
9769 echo "$as_me: failed program was:" >&5
9770 cat conftest.$ac_ext >&5
9771 ac_cv_func_initscr=no
9773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9775 echo "$as_me:9775: result: $ac_cv_func_initscr" >&5
9776 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9777 if test $ac_cv_func_initscr = yes; then
9778 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9781 cf_save_LIBS="$LIBS"
9782 echo "$as_me:9782: checking for initscr in -l$cf_nculib_root" >&5
9783 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9784 LIBS="-l$cf_nculib_root $LIBS"
9785 cat >conftest.$ac_ext <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 #include <${cf_cv_ncurses_header:-curses.h}>
9797 rm -f conftest.$ac_objext conftest$ac_exeext
9798 if { (eval echo "$as_me:9798: \"$ac_link\"") >&5
9799 (eval $ac_link) 2>&5
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest$ac_exeext'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809 echo "$as_me:9809: result: yes" >&5
9810 echo "${ECHO_T}yes" >&6
9811 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9814 echo "$as_me: failed program was:" >&5
9815 cat conftest.$ac_ext >&5
9816 echo "$as_me:9816: result: no" >&5
9817 echo "${ECHO_T}no" >&6
9820 cf_library_path_list=""
9821 if test -n "${LDFLAGS}${LIBS}" ; then
9822 for cf_library_path in $LDFLAGS $LIBS
9824 case $cf_library_path in
9826 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9828 test "x$cf_library_path" != "xNONE" && \
9829 test -d "$cf_library_path" && \
9831 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9832 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9833 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9834 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9835 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9836 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"
9839 cf_library_path_list="$cf_library_path_list $cf_search"
9847 test "x$prefix" != "xNONE" && \
9848 test -d "$prefix" && \
9850 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9851 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9852 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9853 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9854 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9855 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9858 for cf_subdir_prefix in \
9867 test "x$cf_subdir_prefix" != "x$prefix" && \
9868 test -d "$cf_subdir_prefix" && \
9869 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9870 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9871 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9872 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9873 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9874 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9875 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"
9880 cf_search="$cf_library_path_list $cf_search"
9882 for cf_libdir in $cf_search
9884 echo "$as_me:9884: checking for -l$cf_nculib_root in $cf_libdir" >&5
9885 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9886 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9887 cat >conftest.$ac_ext <<_ACEOF
9888 #line 9888 "configure"
9889 #include "confdefs.h"
9890 #include <${cf_cv_ncurses_header:-curses.h}>
9899 rm -f conftest.$ac_objext conftest$ac_exeext
9900 if { (eval echo "$as_me:9900: \"$ac_link\"") >&5
9901 (eval $ac_link) 2>&5
9903 echo "$as_me:9903: \$? = $ac_status" >&5
9904 (exit $ac_status); } &&
9905 { ac_try='test -s conftest$ac_exeext'
9906 { (eval echo "$as_me:9906: \"$ac_try\"") >&5
9909 echo "$as_me:9909: \$? = $ac_status" >&5
9910 (exit $ac_status); }; }; then
9911 echo "$as_me:9911: result: yes" >&5
9912 echo "${ECHO_T}yes" >&6
9913 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9916 echo "$as_me: failed program was:" >&5
9917 cat conftest.$ac_ext >&5
9918 echo "$as_me:9918: result: no" >&5
9919 echo "${ECHO_T}no" >&6
9920 LIBS="$cf_save_LIBS"
9922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9930 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9932 if test $cf_found_library = no ; then
9933 { { echo "$as_me:9933: error: Cannot link $cf_nculib_root library" >&5
9934 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9935 { (exit 1); exit 1; }; }
9940 if test -n "$cf_ncurses_LIBS" ; then
9941 echo "$as_me:9941: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9942 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9943 cf_ncurses_SAVE="$LIBS"
9944 for p in $cf_ncurses_LIBS ; do
9945 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9946 if test "$q" != "$LIBS" ; then
9950 cat >conftest.$ac_ext <<_ACEOF
9951 #line 9951 "configure"
9952 #include "confdefs.h"
9953 #include <${cf_cv_ncurses_header:-curses.h}>
9957 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9962 rm -f conftest.$ac_objext conftest$ac_exeext
9963 if { (eval echo "$as_me:9963: \"$ac_link\"") >&5
9964 (eval $ac_link) 2>&5
9966 echo "$as_me:9966: \$? = $ac_status" >&5
9967 (exit $ac_status); } &&
9968 { ac_try='test -s conftest$ac_exeext'
9969 { (eval echo "$as_me:9969: \"$ac_try\"") >&5
9972 echo "$as_me:9972: \$? = $ac_status" >&5
9973 (exit $ac_status); }; }; then
9974 echo "$as_me:9974: result: yes" >&5
9975 echo "${ECHO_T}yes" >&6
9977 echo "$as_me: failed program was:" >&5
9978 cat conftest.$ac_ext >&5
9979 echo "$as_me:9979: result: no" >&5
9980 echo "${ECHO_T}no" >&6
9981 LIBS="$cf_ncurses_SAVE"
9983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9986 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9988 cat >>confdefs.h <<EOF
9989 #define $cf_nculib_ROOT 1
9999 echo "$as_me:9999: checking for X" >&5
10000 echo $ECHO_N "checking for X... $ECHO_C" >&6
10002 # Check whether --with-x or --without-x was given.
10003 if test "${with_x+set}" = set; then
10007 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10008 if test "x$with_x" = xno; then
10009 # The user explicitly disabled X.
10012 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10013 # Both variables are already set.
10016 if test "${ac_cv_have_x+set}" = set; then
10017 echo $ECHO_N "(cached) $ECHO_C" >&6
10019 # One or both of the vars are not set, and there is no cached value.
10020 ac_x_includes=no ac_x_libraries=no
10021 rm -fr conftest.dir
10022 if mkdir conftest.dir; then
10024 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10025 cat >Imakefile <<'EOF'
10027 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10029 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10030 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10031 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10032 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10033 for ac_extension in a so sl dylib dll; do
10034 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10035 test -f $ac_im_libdir/libX11.$ac_extension; then
10036 ac_im_usrlibdir=$ac_im_libdir; break
10039 # Screen out bogus values from the imake configuration. They are
10040 # bogus both because they are the default anyway, and because
10041 # using them would break gcc on systems where it needs fixed includes.
10042 case $ac_im_incroot in
10044 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10046 case $ac_im_usrlibdir in
10047 /usr/lib | /lib) ;;
10048 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10052 rm -fr conftest.dir
10055 # Standard set of common directories for X headers.
10056 # Check X11 before X11Rn because it is often a symlink to the current release.
10068 /usr/local/X11/include
10069 /usr/local/X11R6/include
10070 /usr/local/X11R5/include
10071 /usr/local/X11R4/include
10073 /usr/local/include/X11
10074 /usr/local/include/X11R6
10075 /usr/local/include/X11R5
10076 /usr/local/include/X11R4
10080 /usr/XFree86/include/X11
10084 /usr/unsupported/include
10085 /usr/athena/include
10086 /usr/local/x11r5/include
10087 /usr/lpp/Xamples/include
10089 /usr/openwin/include
10090 /usr/openwin/share/include'
10092 if test "$ac_x_includes" = no; then
10093 # Guess where to find include files, by looking for Intrinsic.h.
10094 # First, try using that file with no special directory specified.
10095 cat >conftest.$ac_ext <<_ACEOF
10096 #line 10096 "configure"
10097 #include "confdefs.h"
10098 #include <X11/Intrinsic.h>
10100 if { (eval echo "$as_me:10100: \"$ac_cpp conftest.$ac_ext\"") >&5
10101 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10103 egrep -v '^ *\+' conftest.er1 >conftest.err
10105 cat conftest.err >&5
10106 echo "$as_me:10106: \$? = $ac_status" >&5
10107 (exit $ac_status); } >/dev/null; then
10108 if test -s conftest.err; then
10109 ac_cpp_err=$ac_c_preproc_warn_flag
10116 if test -z "$ac_cpp_err"; then
10117 # We can compile using X headers with no special include directory.
10120 echo "$as_me: failed program was:" >&5
10121 cat conftest.$ac_ext >&5
10122 for ac_dir in $ac_x_header_dirs; do
10123 if test -r "$ac_dir/X11/Intrinsic.h"; then
10124 ac_x_includes=$ac_dir
10129 rm -f conftest.err conftest.$ac_ext
10130 fi # $ac_x_includes = no
10132 if test "$ac_x_libraries" = no; then
10133 # Check for the libraries.
10134 # See if we find them without any special options.
10135 # Don't add to $LIBS permanently.
10138 cat >conftest.$ac_ext <<_ACEOF
10139 #line 10139 "configure"
10140 #include "confdefs.h"
10141 #include <X11/Intrinsic.h>
10150 rm -f conftest.$ac_objext conftest$ac_exeext
10151 if { (eval echo "$as_me:10151: \"$ac_link\"") >&5
10152 (eval $ac_link) 2>&5
10154 echo "$as_me:10154: \$? = $ac_status" >&5
10155 (exit $ac_status); } &&
10156 { ac_try='test -s conftest$ac_exeext'
10157 { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158 (eval $ac_try) 2>&5
10160 echo "$as_me:10160: \$? = $ac_status" >&5
10161 (exit $ac_status); }; }; then
10163 # We can link X programs with no special library path.
10166 echo "$as_me: failed program was:" >&5
10167 cat conftest.$ac_ext >&5
10169 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10171 # Don't even attempt the hair of trying to link an X program!
10172 for ac_extension in a so sl dylib dll; do
10173 if test -r $ac_dir/libXt.$ac_extension; then
10174 ac_x_libraries=$ac_dir
10180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10181 fi # $ac_x_libraries = no
10183 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10184 # Didn't find X anywhere. Cache the known absence of X.
10185 ac_cv_have_x="have_x=no"
10187 # Record where we found X for the cache.
10188 ac_cv_have_x="have_x=yes \
10189 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10194 eval "$ac_cv_have_x"
10197 if test "$have_x" != yes; then
10198 echo "$as_me:10198: result: $have_x" >&5
10199 echo "${ECHO_T}$have_x" >&6
10202 # If each of the values was on the command line, it overrides each guess.
10203 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10204 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10205 # Update the cache value to reflect the command line values.
10206 ac_cv_have_x="have_x=yes \
10207 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10208 echo "$as_me:10208: result: libraries $x_libraries, headers $x_includes" >&5
10209 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10212 if test "$no_x" = yes; then
10213 # Not all programs may use this symbol, but it does not hurt to define it.
10215 cat >>confdefs.h <<\EOF
10216 #define X_DISPLAY_MISSING 1
10219 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10221 if test -n "$x_includes"; then
10222 X_CFLAGS="$X_CFLAGS -I$x_includes"
10225 # It would also be nice to do this for all -L options, not just this one.
10226 if test -n "$x_libraries"; then
10227 X_LIBS="$X_LIBS -L$x_libraries"
10228 # For Solaris; some versions of Sun CC require a space after -R and
10229 # others require no space. Words are not sufficient . . . .
10230 case `(uname -sr) 2>/dev/null` in
10232 echo "$as_me:10232: checking whether -R must be followed by a space" >&5
10233 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10234 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10235 cat >conftest.$ac_ext <<_ACEOF
10236 #line 10236 "configure"
10237 #include "confdefs.h"
10247 rm -f conftest.$ac_objext conftest$ac_exeext
10248 if { (eval echo "$as_me:10248: \"$ac_link\"") >&5
10249 (eval $ac_link) 2>&5
10251 echo "$as_me:10251: \$? = $ac_status" >&5
10252 (exit $ac_status); } &&
10253 { ac_try='test -s conftest$ac_exeext'
10254 { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255 (eval $ac_try) 2>&5
10257 echo "$as_me:10257: \$? = $ac_status" >&5
10258 (exit $ac_status); }; }; then
10261 echo "$as_me: failed program was:" >&5
10262 cat conftest.$ac_ext >&5
10265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10266 if test $ac_R_nospace = yes; then
10267 echo "$as_me:10267: result: no" >&5
10268 echo "${ECHO_T}no" >&6
10269 X_LIBS="$X_LIBS -R$x_libraries"
10271 LIBS="$ac_xsave_LIBS -R $x_libraries"
10272 cat >conftest.$ac_ext <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10284 rm -f conftest.$ac_objext conftest$ac_exeext
10285 if { (eval echo "$as_me:10285: \"$ac_link\"") >&5
10286 (eval $ac_link) 2>&5
10288 echo "$as_me:10288: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest$ac_exeext'
10291 { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10294 echo "$as_me:10294: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10298 echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10303 if test $ac_R_space = yes; then
10304 echo "$as_me:10304: result: yes" >&5
10305 echo "${ECHO_T}yes" >&6
10306 X_LIBS="$X_LIBS -R $x_libraries"
10308 echo "$as_me:10308: result: neither works" >&5
10309 echo "${ECHO_T}neither works" >&6
10312 LIBS=$ac_xsave_LIBS
10316 # Check for system-dependent libraries X programs must link with.
10317 # Do this before checking for the system-independent R6 libraries
10318 # (-lICE), since we may need -lsocket or whatever for X linking.
10320 if test "$ISC" = yes; then
10321 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10323 # Martyn Johnson says this is needed for Ultrix, if the X
10324 # libraries were built with DECnet support. And Karl Berry says
10325 # the Alpha needs dnet_stub (dnet does not exist).
10326 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10327 cat >conftest.$ac_ext <<_ACEOF
10328 #line 10328 "configure"
10329 #include "confdefs.h"
10331 /* Override any gcc2 internal prototype to avoid an error. */
10335 /* We use char because int might match the return type of a gcc2
10336 builtin and then its argument prototype would still apply. */
10337 char XOpenDisplay ();
10346 rm -f conftest.$ac_objext conftest$ac_exeext
10347 if { (eval echo "$as_me:10347: \"$ac_link\"") >&5
10348 (eval $ac_link) 2>&5
10350 echo "$as_me:10350: \$? = $ac_status" >&5
10351 (exit $ac_status); } &&
10352 { ac_try='test -s conftest$ac_exeext'
10353 { (eval echo "$as_me:10353: \"$ac_try\"") >&5
10354 (eval $ac_try) 2>&5
10356 echo "$as_me:10356: \$? = $ac_status" >&5
10357 (exit $ac_status); }; }; then
10360 echo "$as_me: failed program was:" >&5
10361 cat conftest.$ac_ext >&5
10362 echo "$as_me:10362: checking for dnet_ntoa in -ldnet" >&5
10363 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10364 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
10367 ac_check_lib_save_LIBS=$LIBS
10368 LIBS="-ldnet $LIBS"
10369 cat >conftest.$ac_ext <<_ACEOF
10370 #line 10370 "configure"
10371 #include "confdefs.h"
10373 /* Override any gcc2 internal prototype to avoid an error. */
10377 /* We use char because int might match the return type of a gcc2
10378 builtin and then its argument prototype would still apply. */
10388 rm -f conftest.$ac_objext conftest$ac_exeext
10389 if { (eval echo "$as_me:10389: \"$ac_link\"") >&5
10390 (eval $ac_link) 2>&5
10392 echo "$as_me:10392: \$? = $ac_status" >&5
10393 (exit $ac_status); } &&
10394 { ac_try='test -s conftest$ac_exeext'
10395 { (eval echo "$as_me:10395: \"$ac_try\"") >&5
10396 (eval $ac_try) 2>&5
10398 echo "$as_me:10398: \$? = $ac_status" >&5
10399 (exit $ac_status); }; }; then
10400 ac_cv_lib_dnet_dnet_ntoa=yes
10402 echo "$as_me: failed program was:" >&5
10403 cat conftest.$ac_ext >&5
10404 ac_cv_lib_dnet_dnet_ntoa=no
10406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10407 LIBS=$ac_check_lib_save_LIBS
10409 echo "$as_me:10409: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10410 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10411 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10412 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10415 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10416 echo "$as_me:10416: checking for dnet_ntoa in -ldnet_stub" >&5
10417 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10418 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10419 echo $ECHO_N "(cached) $ECHO_C" >&6
10421 ac_check_lib_save_LIBS=$LIBS
10422 LIBS="-ldnet_stub $LIBS"
10423 cat >conftest.$ac_ext <<_ACEOF
10424 #line 10424 "configure"
10425 #include "confdefs.h"
10427 /* Override any gcc2 internal prototype to avoid an error. */
10431 /* We use char because int might match the return type of a gcc2
10432 builtin and then its argument prototype would still apply. */
10442 rm -f conftest.$ac_objext conftest$ac_exeext
10443 if { (eval echo "$as_me:10443: \"$ac_link\"") >&5
10444 (eval $ac_link) 2>&5
10446 echo "$as_me:10446: \$? = $ac_status" >&5
10447 (exit $ac_status); } &&
10448 { ac_try='test -s conftest$ac_exeext'
10449 { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450 (eval $ac_try) 2>&5
10452 echo "$as_me:10452: \$? = $ac_status" >&5
10453 (exit $ac_status); }; }; then
10454 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10456 echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 ac_cv_lib_dnet_stub_dnet_ntoa=no
10460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10461 LIBS=$ac_check_lib_save_LIBS
10463 echo "$as_me:10463: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10464 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10465 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10466 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10472 LIBS="$ac_xsave_LIBS"
10474 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10475 # to get the SysV transport functions.
10476 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10478 # The nsl library prevents programs from opening the X display
10479 # on Irix 5.2, according to T.E. Dickey.
10480 # The functions gethostbyname, getservbyname, and inet_addr are
10481 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10482 echo "$as_me:10482: checking for gethostbyname" >&5
10483 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10484 if test "${ac_cv_func_gethostbyname+set}" = set; then
10485 echo $ECHO_N "(cached) $ECHO_C" >&6
10487 cat >conftest.$ac_ext <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490 /* System header to define __stub macros and hopefully few prototypes,
10491 which can conflict with char gethostbyname (); below. */
10492 #include <assert.h>
10493 /* Override any gcc2 internal prototype to avoid an error. */
10497 /* We use char because int might match the return type of a gcc2
10498 builtin and then its argument prototype would still apply. */
10499 char gethostbyname ();
10505 /* The GNU C library defines this for functions which it implements
10506 to always fail with ENOSYS. Some functions are actually named
10507 something starting with __ and the normal name is an alias. */
10508 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10511 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10518 rm -f conftest.$ac_objext conftest$ac_exeext
10519 if { (eval echo "$as_me:10519: \"$ac_link\"") >&5
10520 (eval $ac_link) 2>&5
10522 echo "$as_me:10522: \$? = $ac_status" >&5
10523 (exit $ac_status); } &&
10524 { ac_try='test -s conftest$ac_exeext'
10525 { (eval echo "$as_me:10525: \"$ac_try\"") >&5
10526 (eval $ac_try) 2>&5
10528 echo "$as_me:10528: \$? = $ac_status" >&5
10529 (exit $ac_status); }; }; then
10530 ac_cv_func_gethostbyname=yes
10532 echo "$as_me: failed program was:" >&5
10533 cat conftest.$ac_ext >&5
10534 ac_cv_func_gethostbyname=no
10536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10538 echo "$as_me:10538: result: $ac_cv_func_gethostbyname" >&5
10539 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10541 if test $ac_cv_func_gethostbyname = no; then
10542 echo "$as_me:10542: checking for gethostbyname in -lnsl" >&5
10543 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10544 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10545 echo $ECHO_N "(cached) $ECHO_C" >&6
10547 ac_check_lib_save_LIBS=$LIBS
10549 cat >conftest.$ac_ext <<_ACEOF
10550 #line 10550 "configure"
10551 #include "confdefs.h"
10553 /* Override any gcc2 internal prototype to avoid an error. */
10557 /* We use char because int might match the return type of a gcc2
10558 builtin and then its argument prototype would still apply. */
10559 char gethostbyname ();
10568 rm -f conftest.$ac_objext conftest$ac_exeext
10569 if { (eval echo "$as_me:10569: \"$ac_link\"") >&5
10570 (eval $ac_link) 2>&5
10572 echo "$as_me:10572: \$? = $ac_status" >&5
10573 (exit $ac_status); } &&
10574 { ac_try='test -s conftest$ac_exeext'
10575 { (eval echo "$as_me:10575: \"$ac_try\"") >&5
10576 (eval $ac_try) 2>&5
10578 echo "$as_me:10578: \$? = $ac_status" >&5
10579 (exit $ac_status); }; }; then
10580 ac_cv_lib_nsl_gethostbyname=yes
10582 echo "$as_me: failed program was:" >&5
10583 cat conftest.$ac_ext >&5
10584 ac_cv_lib_nsl_gethostbyname=no
10586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10587 LIBS=$ac_check_lib_save_LIBS
10589 echo "$as_me:10589: result: $ac_cv_lib_nsl_gethostbyname" >&5
10590 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10591 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10592 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10595 if test $ac_cv_lib_nsl_gethostbyname = no; then
10596 echo "$as_me:10596: checking for gethostbyname in -lbsd" >&5
10597 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10598 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10599 echo $ECHO_N "(cached) $ECHO_C" >&6
10601 ac_check_lib_save_LIBS=$LIBS
10603 cat >conftest.$ac_ext <<_ACEOF
10604 #line 10604 "configure"
10605 #include "confdefs.h"
10607 /* Override any gcc2 internal prototype to avoid an error. */
10611 /* We use char because int might match the return type of a gcc2
10612 builtin and then its argument prototype would still apply. */
10613 char gethostbyname ();
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624 (eval $ac_link) 2>&5
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit $ac_status); } &&
10628 { ac_try='test -s conftest$ac_exeext'
10629 { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10632 echo "$as_me:10632: \$? = $ac_status" >&5
10633 (exit $ac_status); }; }; then
10634 ac_cv_lib_bsd_gethostbyname=yes
10636 echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_lib_bsd_gethostbyname=no
10640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10641 LIBS=$ac_check_lib_save_LIBS
10643 echo "$as_me:10643: result: $ac_cv_lib_bsd_gethostbyname" >&5
10644 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10645 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10646 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10652 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10653 # socket/setsockopt and other routines are undefined under SCO ODT
10654 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10655 # on later versions), says Simon Leinen: it contains gethostby*
10656 # variants that don't use the nameserver (or something). -lsocket
10657 # must be given before -lnsl if both are needed. We assume that
10658 # if connect needs -lnsl, so does gethostbyname.
10659 echo "$as_me:10659: checking for connect" >&5
10660 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10661 if test "${ac_cv_func_connect+set}" = set; then
10662 echo $ECHO_N "(cached) $ECHO_C" >&6
10664 cat >conftest.$ac_ext <<_ACEOF
10665 #line 10665 "configure"
10666 #include "confdefs.h"
10667 /* System header to define __stub macros and hopefully few prototypes,
10668 which can conflict with char connect (); below. */
10669 #include <assert.h>
10670 /* Override any gcc2 internal prototype to avoid an error. */
10674 /* We use char because int might match the return type of a gcc2
10675 builtin and then its argument prototype would still apply. */
10682 /* The GNU C library defines this for functions which it implements
10683 to always fail with ENOSYS. Some functions are actually named
10684 something starting with __ and the normal name is an alias. */
10685 #if defined (__stub_connect) || defined (__stub___connect)
10688 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10695 rm -f conftest.$ac_objext conftest$ac_exeext
10696 if { (eval echo "$as_me:10696: \"$ac_link\"") >&5
10697 (eval $ac_link) 2>&5
10699 echo "$as_me:10699: \$? = $ac_status" >&5
10700 (exit $ac_status); } &&
10701 { ac_try='test -s conftest$ac_exeext'
10702 { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703 (eval $ac_try) 2>&5
10705 echo "$as_me:10705: \$? = $ac_status" >&5
10706 (exit $ac_status); }; }; then
10707 ac_cv_func_connect=yes
10709 echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 ac_cv_func_connect=no
10713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10715 echo "$as_me:10715: result: $ac_cv_func_connect" >&5
10716 echo "${ECHO_T}$ac_cv_func_connect" >&6
10718 if test $ac_cv_func_connect = no; then
10719 echo "$as_me:10719: checking for connect in -lsocket" >&5
10720 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10721 if test "${ac_cv_lib_socket_connect+set}" = set; then
10722 echo $ECHO_N "(cached) $ECHO_C" >&6
10724 ac_check_lib_save_LIBS=$LIBS
10725 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10726 cat >conftest.$ac_ext <<_ACEOF
10727 #line 10727 "configure"
10728 #include "confdefs.h"
10730 /* Override any gcc2 internal prototype to avoid an error. */
10734 /* We use char because int might match the return type of a gcc2
10735 builtin and then its argument prototype would still apply. */
10745 rm -f conftest.$ac_objext conftest$ac_exeext
10746 if { (eval echo "$as_me:10746: \"$ac_link\"") >&5
10747 (eval $ac_link) 2>&5
10749 echo "$as_me:10749: \$? = $ac_status" >&5
10750 (exit $ac_status); } &&
10751 { ac_try='test -s conftest$ac_exeext'
10752 { (eval echo "$as_me:10752: \"$ac_try\"") >&5
10753 (eval $ac_try) 2>&5
10755 echo "$as_me:10755: \$? = $ac_status" >&5
10756 (exit $ac_status); }; }; then
10757 ac_cv_lib_socket_connect=yes
10759 echo "$as_me: failed program was:" >&5
10760 cat conftest.$ac_ext >&5
10761 ac_cv_lib_socket_connect=no
10763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10764 LIBS=$ac_check_lib_save_LIBS
10766 echo "$as_me:10766: result: $ac_cv_lib_socket_connect" >&5
10767 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10768 if test $ac_cv_lib_socket_connect = yes; then
10769 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10774 # Guillermo Gomez says -lposix is necessary on A/UX.
10775 echo "$as_me:10775: checking for remove" >&5
10776 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10777 if test "${ac_cv_func_remove+set}" = set; then
10778 echo $ECHO_N "(cached) $ECHO_C" >&6
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line 10781 "configure"
10782 #include "confdefs.h"
10783 /* System header to define __stub macros and hopefully few prototypes,
10784 which can conflict with char remove (); below. */
10785 #include <assert.h>
10786 /* Override any gcc2 internal prototype to avoid an error. */
10790 /* We use char because int might match the return type of a gcc2
10791 builtin and then its argument prototype would still apply. */
10798 /* The GNU C library defines this for functions which it implements
10799 to always fail with ENOSYS. Some functions are actually named
10800 something starting with __ and the normal name is an alias. */
10801 #if defined (__stub_remove) || defined (__stub___remove)
10804 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10811 rm -f conftest.$ac_objext conftest$ac_exeext
10812 if { (eval echo "$as_me:10812: \"$ac_link\"") >&5
10813 (eval $ac_link) 2>&5
10815 echo "$as_me:10815: \$? = $ac_status" >&5
10816 (exit $ac_status); } &&
10817 { ac_try='test -s conftest$ac_exeext'
10818 { (eval echo "$as_me:10818: \"$ac_try\"") >&5
10819 (eval $ac_try) 2>&5
10821 echo "$as_me:10821: \$? = $ac_status" >&5
10822 (exit $ac_status); }; }; then
10823 ac_cv_func_remove=yes
10825 echo "$as_me: failed program was:" >&5
10826 cat conftest.$ac_ext >&5
10827 ac_cv_func_remove=no
10829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10831 echo "$as_me:10831: result: $ac_cv_func_remove" >&5
10832 echo "${ECHO_T}$ac_cv_func_remove" >&6
10834 if test $ac_cv_func_remove = no; then
10835 echo "$as_me:10835: checking for remove in -lposix" >&5
10836 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10837 if test "${ac_cv_lib_posix_remove+set}" = set; then
10838 echo $ECHO_N "(cached) $ECHO_C" >&6
10840 ac_check_lib_save_LIBS=$LIBS
10841 LIBS="-lposix $LIBS"
10842 cat >conftest.$ac_ext <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10846 /* Override any gcc2 internal prototype to avoid an error. */
10850 /* We use char because int might match the return type of a gcc2
10851 builtin and then its argument prototype would still apply. */
10861 rm -f conftest.$ac_objext conftest$ac_exeext
10862 if { (eval echo "$as_me:10862: \"$ac_link\"") >&5
10863 (eval $ac_link) 2>&5
10865 echo "$as_me:10865: \$? = $ac_status" >&5
10866 (exit $ac_status); } &&
10867 { ac_try='test -s conftest$ac_exeext'
10868 { (eval echo "$as_me:10868: \"$ac_try\"") >&5
10869 (eval $ac_try) 2>&5
10871 echo "$as_me:10871: \$? = $ac_status" >&5
10872 (exit $ac_status); }; }; then
10873 ac_cv_lib_posix_remove=yes
10875 echo "$as_me: failed program was:" >&5
10876 cat conftest.$ac_ext >&5
10877 ac_cv_lib_posix_remove=no
10879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10880 LIBS=$ac_check_lib_save_LIBS
10882 echo "$as_me:10882: result: $ac_cv_lib_posix_remove" >&5
10883 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10884 if test $ac_cv_lib_posix_remove = yes; then
10885 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10890 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10891 echo "$as_me:10891: checking for shmat" >&5
10892 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10893 if test "${ac_cv_func_shmat+set}" = set; then
10894 echo $ECHO_N "(cached) $ECHO_C" >&6
10896 cat >conftest.$ac_ext <<_ACEOF
10897 #line 10897 "configure"
10898 #include "confdefs.h"
10899 /* System header to define __stub macros and hopefully few prototypes,
10900 which can conflict with char shmat (); below. */
10901 #include <assert.h>
10902 /* Override any gcc2 internal prototype to avoid an error. */
10906 /* We use char because int might match the return type of a gcc2
10907 builtin and then its argument prototype would still apply. */
10914 /* The GNU C library defines this for functions which it implements
10915 to always fail with ENOSYS. Some functions are actually named
10916 something starting with __ and the normal name is an alias. */
10917 #if defined (__stub_shmat) || defined (__stub___shmat)
10920 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10927 rm -f conftest.$ac_objext conftest$ac_exeext
10928 if { (eval echo "$as_me:10928: \"$ac_link\"") >&5
10929 (eval $ac_link) 2>&5
10931 echo "$as_me:10931: \$? = $ac_status" >&5
10932 (exit $ac_status); } &&
10933 { ac_try='test -s conftest$ac_exeext'
10934 { (eval echo "$as_me:10934: \"$ac_try\"") >&5
10935 (eval $ac_try) 2>&5
10937 echo "$as_me:10937: \$? = $ac_status" >&5
10938 (exit $ac_status); }; }; then
10939 ac_cv_func_shmat=yes
10941 echo "$as_me: failed program was:" >&5
10942 cat conftest.$ac_ext >&5
10943 ac_cv_func_shmat=no
10945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10947 echo "$as_me:10947: result: $ac_cv_func_shmat" >&5
10948 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10950 if test $ac_cv_func_shmat = no; then
10951 echo "$as_me:10951: checking for shmat in -lipc" >&5
10952 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10953 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10954 echo $ECHO_N "(cached) $ECHO_C" >&6
10956 ac_check_lib_save_LIBS=$LIBS
10958 cat >conftest.$ac_ext <<_ACEOF
10959 #line 10959 "configure"
10960 #include "confdefs.h"
10962 /* Override any gcc2 internal prototype to avoid an error. */
10966 /* We use char because int might match the return type of a gcc2
10967 builtin and then its argument prototype would still apply. */
10977 rm -f conftest.$ac_objext conftest$ac_exeext
10978 if { (eval echo "$as_me:10978: \"$ac_link\"") >&5
10979 (eval $ac_link) 2>&5
10981 echo "$as_me:10981: \$? = $ac_status" >&5
10982 (exit $ac_status); } &&
10983 { ac_try='test -s conftest$ac_exeext'
10984 { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985 (eval $ac_try) 2>&5
10987 echo "$as_me:10987: \$? = $ac_status" >&5
10988 (exit $ac_status); }; }; then
10989 ac_cv_lib_ipc_shmat=yes
10991 echo "$as_me: failed program was:" >&5
10992 cat conftest.$ac_ext >&5
10993 ac_cv_lib_ipc_shmat=no
10995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10996 LIBS=$ac_check_lib_save_LIBS
10998 echo "$as_me:10998: result: $ac_cv_lib_ipc_shmat" >&5
10999 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
11000 if test $ac_cv_lib_ipc_shmat = yes; then
11001 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11007 # Check for libraries that X11R6 Xt/Xaw programs need.
11008 ac_save_LDFLAGS=$LDFLAGS
11009 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11010 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11011 # check for ICE first), but we must link in the order -lSM -lICE or
11012 # we get undefined symbols. So assume we have SM if we have ICE.
11013 # These have to be linked with before -lX11, unlike the other
11014 # libraries we check for below, so use a different variable.
11015 # John Interrante, Karl Berry
11016 echo "$as_me:11016: checking for IceConnectionNumber in -lICE" >&5
11017 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
11018 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
11019 echo $ECHO_N "(cached) $ECHO_C" >&6
11021 ac_check_lib_save_LIBS=$LIBS
11022 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11023 cat >conftest.$ac_ext <<_ACEOF
11024 #line 11024 "configure"
11025 #include "confdefs.h"
11027 /* Override any gcc2 internal prototype to avoid an error. */
11031 /* We use char because int might match the return type of a gcc2
11032 builtin and then its argument prototype would still apply. */
11033 char IceConnectionNumber ();
11037 IceConnectionNumber ();
11042 rm -f conftest.$ac_objext conftest$ac_exeext
11043 if { (eval echo "$as_me:11043: \"$ac_link\"") >&5
11044 (eval $ac_link) 2>&5
11046 echo "$as_me:11046: \$? = $ac_status" >&5
11047 (exit $ac_status); } &&
11048 { ac_try='test -s conftest$ac_exeext'
11049 { (eval echo "$as_me:11049: \"$ac_try\"") >&5
11050 (eval $ac_try) 2>&5
11052 echo "$as_me:11052: \$? = $ac_status" >&5
11053 (exit $ac_status); }; }; then
11054 ac_cv_lib_ICE_IceConnectionNumber=yes
11056 echo "$as_me: failed program was:" >&5
11057 cat conftest.$ac_ext >&5
11058 ac_cv_lib_ICE_IceConnectionNumber=no
11060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11061 LIBS=$ac_check_lib_save_LIBS
11063 echo "$as_me:11063: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11064 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11065 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11066 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11069 LDFLAGS=$ac_save_LDFLAGS
11073 cf_x_athena=${cf_x_athena:-Xaw}
11075 echo "$as_me:11075: checking if you want to link with Xaw 3d library" >&5
11076 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11079 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11080 if test "${with_Xaw3d+set}" = set; then
11081 withval="$with_Xaw3d"
11084 if test "$withval" = yes ; then
11086 echo "$as_me:11086: result: yes" >&5
11087 echo "${ECHO_T}yes" >&6
11089 echo "$as_me:11089: result: no" >&5
11090 echo "${ECHO_T}no" >&6
11093 echo "$as_me:11093: checking if you want to link with Xaw 3d xft library" >&5
11094 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11097 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11098 if test "${with_Xaw3dxft+set}" = set; then
11099 withval="$with_Xaw3dxft"
11102 if test "$withval" = yes ; then
11103 cf_x_athena=Xaw3dxft
11104 echo "$as_me:11104: result: yes" >&5
11105 echo "${ECHO_T}yes" >&6
11107 echo "$as_me:11107: result: no" >&5
11108 echo "${ECHO_T}no" >&6
11111 echo "$as_me:11111: checking if you want to link with neXT Athena library" >&5
11112 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11115 # Check whether --with-neXtaw or --without-neXtaw was given.
11116 if test "${with_neXtaw+set}" = set; then
11117 withval="$with_neXtaw"
11120 if test "$withval" = yes ; then
11122 echo "$as_me:11122: result: yes" >&5
11123 echo "${ECHO_T}yes" >&6
11125 echo "$as_me:11125: result: no" >&5
11126 echo "${ECHO_T}no" >&6
11129 echo "$as_me:11129: checking if you want to link with Athena-Plus library" >&5
11130 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11133 # Check whether --with-XawPlus or --without-XawPlus was given.
11134 if test "${with_XawPlus+set}" = set; then
11135 withval="$with_XawPlus"
11138 if test "$withval" = yes ; then
11139 cf_x_athena=XawPlus
11140 echo "$as_me:11140: result: yes" >&5
11141 echo "${ECHO_T}yes" >&6
11143 echo "$as_me:11143: result: no" >&5
11144 echo "${ECHO_T}no" >&6
11149 if test "$PKG_CONFIG" != none ; then
11151 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11152 for cf_athena_pkg in \
11155 ${cf_x_athena}-devel \
11156 lib${cf_x_athena} \
11157 lib${cf_x_athena}-devel
11160 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11161 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11163 echo "${as_me:-configure}:11163: testing found package $cf_athena_pkg ..." 1>&5
11165 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11166 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11167 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11169 echo "${as_me:-configure}:11169: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11171 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11173 echo "${as_me:-configure}:11173: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11178 cf_new_extra_cppflags=
11180 for cf_add_cflags in $cf_pkgconfig_incs
11182 case $cf_fix_cppflags in
11184 case $cf_add_cflags in
11185 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11186 case $cf_add_cflags in
11188 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11190 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11191 && test -z "${cf_tst_cflags}" \
11192 && cf_fix_cppflags=yes
11194 if test $cf_fix_cppflags = yes ; then
11196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11200 elif test "${cf_tst_cflags}" = "\"'" ; then
11202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11209 case "$CPPFLAGS" in
11213 case $cf_add_cflags in
11215 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11217 CPPFLAGS=`echo "$CPPFLAGS" | \
11218 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11219 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11224 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11225 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11232 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11233 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11243 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11245 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11246 && test -z "${cf_tst_cflags}" \
11247 && cf_fix_cppflags=no
11252 if test -n "$cf_new_cflags" ; then
11254 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11255 CFLAGS="${CFLAGS}$cf_new_cflags"
11259 if test -n "$cf_new_cppflags" ; then
11261 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11262 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11266 if test -n "$cf_new_extra_cppflags" ; then
11268 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11269 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11273 cf_add_libs="$cf_pkgconfig_libs"
11274 # Filter out duplicates - this happens with badly-designed ".pc" files...
11275 for cf_add_1lib in $LIBS
11277 for cf_add_2lib in $cf_add_libs
11279 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11285 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11287 LIBS="$cf_add_libs"
11289 cf_x_athena_lib="$cf_pkgconfig_libs"
11291 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11293 cat >>confdefs.h <<EOF
11294 #define $cf_x_athena_LIBS 1
11297 for cf_trim_lib in Xmu Xt X11
11300 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11301 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11302 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11304 echo "${as_me:-configure}:11304: testing ..trimmed $LIBS ..." 1>&5
11310 echo "$as_me:11310: checking for usable $cf_x_athena/Xmu package" >&5
11311 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11312 if test "${cf_cv_xaw_compat+set}" = set; then
11313 echo $ECHO_N "(cached) $ECHO_C" >&6
11316 cat >conftest.$ac_ext <<_ACEOF
11317 #line 11317 "configure"
11318 #include "confdefs.h"
11320 #include <X11/Xmu/CharSet.h>
11326 int check = XmuCompareISOLatin1("big", "small")
11332 rm -f conftest.$ac_objext conftest$ac_exeext
11333 if { (eval echo "$as_me:11333: \"$ac_link\"") >&5
11334 (eval $ac_link) 2>&5
11336 echo "$as_me:11336: \$? = $ac_status" >&5
11337 (exit $ac_status); } &&
11338 { ac_try='test -s conftest$ac_exeext'
11339 { (eval echo "$as_me:11339: \"$ac_try\"") >&5
11340 (eval $ac_try) 2>&5
11342 echo "$as_me:11342: \$? = $ac_status" >&5
11343 (exit $ac_status); }; }; then
11344 cf_cv_xaw_compat=yes
11346 echo "$as_me: failed program was:" >&5
11347 cat conftest.$ac_ext >&5
11348 cf_cv_xaw_compat=no
11350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11352 echo "$as_me:11352: result: $cf_cv_xaw_compat" >&5
11353 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11355 if test "$cf_cv_xaw_compat" = no
11357 # workaround for broken ".pc" files...
11358 case "$cf_x_athena_lib" in
11362 test -n "$verbose" && echo " work around broken package" 1>&6
11364 echo "${as_me:-configure}:11364: testing work around broken package ..." 1>&5
11366 cf_save_xmu="$LIBS"
11367 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
11369 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11370 test -n "$verbose" && echo " found package xmu" 1>&6
11372 echo "${as_me:-configure}:11372: testing found package xmu ..." 1>&5
11374 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11375 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11376 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11378 echo "${as_me:-configure}:11378: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11380 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11382 echo "${as_me:-configure}:11382: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11387 cf_new_extra_cppflags=
11389 for cf_add_cflags in $cf_pkgconfig_incs
11391 case $cf_fix_cppflags in
11393 case $cf_add_cflags in
11394 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11395 case $cf_add_cflags in
11397 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11400 && test -z "${cf_tst_cflags}" \
11401 && cf_fix_cppflags=yes
11403 if test $cf_fix_cppflags = yes ; then
11405 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11406 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11409 elif test "${cf_tst_cflags}" = "\"'" ; then
11411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11418 case "$CPPFLAGS" in
11422 case $cf_add_cflags in
11424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11426 CPPFLAGS=`echo "$CPPFLAGS" | \
11427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11433 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11434 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11441 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11442 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11452 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11455 && test -z "${cf_tst_cflags}" \
11456 && cf_fix_cppflags=no
11461 if test -n "$cf_new_cflags" ; then
11463 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11464 CFLAGS="${CFLAGS}$cf_new_cflags"
11468 if test -n "$cf_new_cppflags" ; then
11470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11471 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11475 if test -n "$cf_new_extra_cppflags" ; then
11477 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11478 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11482 cf_add_libs="$cf_pkgconfig_libs"
11483 # Filter out duplicates - this happens with badly-designed ".pc" files...
11484 for cf_add_1lib in $LIBS
11486 for cf_add_2lib in $cf_add_libs
11488 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11494 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11496 LIBS="$cf_add_libs"
11498 LIBS="$cf_save_xmu"
11500 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11502 echo "${as_me:-configure}:11502: testing ...before $LIBS ..." 1>&5
11504 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
11505 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11507 echo "${as_me:-configure}:11507: testing ...after $LIBS ..." 1>&5
11513 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11515 echo "${as_me:-configure}:11515: testing ...before $LIBS ..." 1>&5
11517 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
11518 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11520 echo "${as_me:-configure}:11520: testing ...after $LIBS ..." 1>&5
11524 for cf_trim_lib in Xmu Xt X11
11527 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11528 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11529 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11531 echo "${as_me:-configure}:11531: testing ..trimmed $LIBS ..." 1>&5
11551 if test -z "$cf_x_athena_lib" ; then
11553 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11554 test -n "$verbose" && echo " found package Xext" 1>&6
11556 echo "${as_me:-configure}:11556: testing found package Xext ..." 1>&5
11558 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11559 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11560 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11562 echo "${as_me:-configure}:11562: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11564 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11566 echo "${as_me:-configure}:11566: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11571 cf_new_extra_cppflags=
11573 for cf_add_cflags in $cf_pkgconfig_incs
11575 case $cf_fix_cppflags in
11577 case $cf_add_cflags in
11578 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11579 case $cf_add_cflags in
11581 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11584 && test -z "${cf_tst_cflags}" \
11585 && cf_fix_cppflags=yes
11587 if test $cf_fix_cppflags = yes ; then
11589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11593 elif test "${cf_tst_cflags}" = "\"'" ; then
11595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11602 case "$CPPFLAGS" in
11606 case $cf_add_cflags in
11608 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11610 CPPFLAGS=`echo "$CPPFLAGS" | \
11611 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11612 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11617 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11618 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11625 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11626 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11636 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11639 && test -z "${cf_tst_cflags}" \
11640 && cf_fix_cppflags=no
11645 if test -n "$cf_new_cflags" ; then
11647 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11648 CFLAGS="${CFLAGS}$cf_new_cflags"
11652 if test -n "$cf_new_cppflags" ; then
11654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11655 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11659 if test -n "$cf_new_extra_cppflags" ; then
11661 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11662 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11666 cf_add_libs="$cf_pkgconfig_libs"
11667 # Filter out duplicates - this happens with badly-designed ".pc" files...
11668 for cf_add_1lib in $LIBS
11670 for cf_add_2lib in $cf_add_libs
11672 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11678 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11680 LIBS="$cf_add_libs"
11687 echo "$as_me:11687: checking for XextCreateExtension in -lXext" >&5
11688 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11689 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11690 echo $ECHO_N "(cached) $ECHO_C" >&6
11692 ac_check_lib_save_LIBS=$LIBS
11693 LIBS="-lXext $LIBS"
11694 cat >conftest.$ac_ext <<_ACEOF
11695 #line 11695 "configure"
11696 #include "confdefs.h"
11698 /* Override any gcc2 internal prototype to avoid an error. */
11702 /* We use char because int might match the return type of a gcc2
11703 builtin and then its argument prototype would still apply. */
11704 char XextCreateExtension ();
11708 XextCreateExtension ();
11713 rm -f conftest.$ac_objext conftest$ac_exeext
11714 if { (eval echo "$as_me:11714: \"$ac_link\"") >&5
11715 (eval $ac_link) 2>&5
11717 echo "$as_me:11717: \$? = $ac_status" >&5
11718 (exit $ac_status); } &&
11719 { ac_try='test -s conftest$ac_exeext'
11720 { (eval echo "$as_me:11720: \"$ac_try\"") >&5
11721 (eval $ac_try) 2>&5
11723 echo "$as_me:11723: \$? = $ac_status" >&5
11724 (exit $ac_status); }; }; then
11725 ac_cv_lib_Xext_XextCreateExtension=yes
11727 echo "$as_me: failed program was:" >&5
11728 cat conftest.$ac_ext >&5
11729 ac_cv_lib_Xext_XextCreateExtension=no
11731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11732 LIBS=$ac_check_lib_save_LIBS
11734 echo "$as_me:11734: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11735 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11736 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11738 cf_add_libs="-lXext"
11739 # Filter out duplicates - this happens with badly-designed ".pc" files...
11740 for cf_add_1lib in $LIBS
11742 for cf_add_2lib in $cf_add_libs
11744 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11750 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11752 LIBS="$cf_add_libs"
11758 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11759 # in some cases has installed dummy files in the former, other cases replaced
11760 # it with a link to the new location). This complicates the configure script.
11761 # Check for that pitfall, and recover using pkg-config
11763 # If none of these are set, the configuration is almost certainly broken.
11764 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11767 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11768 test -n "$verbose" && echo " found package x11" 1>&6
11770 echo "${as_me:-configure}:11770: testing found package x11 ..." 1>&5
11772 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11773 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11774 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11776 echo "${as_me:-configure}:11776: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11778 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11780 echo "${as_me:-configure}:11780: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11785 cf_new_extra_cppflags=
11787 for cf_add_cflags in $cf_pkgconfig_incs
11789 case $cf_fix_cppflags in
11791 case $cf_add_cflags in
11792 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11793 case $cf_add_cflags in
11795 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11798 && test -z "${cf_tst_cflags}" \
11799 && cf_fix_cppflags=yes
11801 if test $cf_fix_cppflags = yes ; then
11803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11807 elif test "${cf_tst_cflags}" = "\"'" ; then
11809 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11810 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11816 case "$CPPFLAGS" in
11820 case $cf_add_cflags in
11822 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11824 CPPFLAGS=`echo "$CPPFLAGS" | \
11825 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11826 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11831 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11832 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11839 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11840 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11850 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11852 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11853 && test -z "${cf_tst_cflags}" \
11854 && cf_fix_cppflags=no
11859 if test -n "$cf_new_cflags" ; then
11861 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11862 CFLAGS="${CFLAGS}$cf_new_cflags"
11866 if test -n "$cf_new_cppflags" ; then
11868 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11869 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11873 if test -n "$cf_new_extra_cppflags" ; then
11875 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11876 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11880 cf_add_libs="$cf_pkgconfig_libs"
11881 # Filter out duplicates - this happens with badly-designed ".pc" files...
11882 for cf_add_1lib in $LIBS
11884 for cf_add_2lib in $cf_add_libs
11886 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11892 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11894 LIBS="$cf_add_libs"
11900 { echo "$as_me:11900: WARNING: unable to find X11 library" >&5
11901 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11904 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11905 test -n "$verbose" && echo " found package ice" 1>&6
11907 echo "${as_me:-configure}:11907: testing found package ice ..." 1>&5
11909 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11910 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11911 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11913 echo "${as_me:-configure}:11913: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11915 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11917 echo "${as_me:-configure}:11917: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11922 cf_new_extra_cppflags=
11924 for cf_add_cflags in $cf_pkgconfig_incs
11926 case $cf_fix_cppflags in
11928 case $cf_add_cflags in
11929 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11930 case $cf_add_cflags in
11932 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11934 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11935 && test -z "${cf_tst_cflags}" \
11936 && cf_fix_cppflags=yes
11938 if test $cf_fix_cppflags = yes ; then
11940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11944 elif test "${cf_tst_cflags}" = "\"'" ; then
11946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11953 case "$CPPFLAGS" in
11957 case $cf_add_cflags in
11959 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11961 CPPFLAGS=`echo "$CPPFLAGS" | \
11962 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11963 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11968 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11969 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11976 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11977 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11987 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11989 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11990 && test -z "${cf_tst_cflags}" \
11991 && cf_fix_cppflags=no
11996 if test -n "$cf_new_cflags" ; then
11998 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11999 CFLAGS="${CFLAGS}$cf_new_cflags"
12003 if test -n "$cf_new_cppflags" ; then
12005 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12006 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12010 if test -n "$cf_new_extra_cppflags" ; then
12012 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12013 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12017 cf_add_libs="$cf_pkgconfig_libs"
12018 # Filter out duplicates - this happens with badly-designed ".pc" files...
12019 for cf_add_1lib in $LIBS
12021 for cf_add_2lib in $cf_add_libs
12023 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12031 LIBS="$cf_add_libs"
12037 { echo "$as_me:12037: WARNING: unable to find ICE library" >&5
12038 echo "$as_me: WARNING: unable to find ICE library" >&2;}
12041 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12042 test -n "$verbose" && echo " found package sm" 1>&6
12044 echo "${as_me:-configure}:12044: testing found package sm ..." 1>&5
12046 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12047 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12048 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12050 echo "${as_me:-configure}:12050: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12052 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12054 echo "${as_me:-configure}:12054: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12059 cf_new_extra_cppflags=
12061 for cf_add_cflags in $cf_pkgconfig_incs
12063 case $cf_fix_cppflags in
12065 case $cf_add_cflags in
12066 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12067 case $cf_add_cflags in
12069 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12072 && test -z "${cf_tst_cflags}" \
12073 && cf_fix_cppflags=yes
12075 if test $cf_fix_cppflags = yes ; then
12077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12081 elif test "${cf_tst_cflags}" = "\"'" ; then
12083 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12084 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12090 case "$CPPFLAGS" in
12094 case $cf_add_cflags in
12096 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12098 CPPFLAGS=`echo "$CPPFLAGS" | \
12099 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12100 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12105 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12106 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12113 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12114 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12121 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12122 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12124 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12126 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12127 && test -z "${cf_tst_cflags}" \
12128 && cf_fix_cppflags=no
12133 if test -n "$cf_new_cflags" ; then
12135 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12136 CFLAGS="${CFLAGS}$cf_new_cflags"
12140 if test -n "$cf_new_cppflags" ; then
12142 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12143 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12147 if test -n "$cf_new_extra_cppflags" ; then
12149 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12150 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12154 cf_add_libs="$cf_pkgconfig_libs"
12155 # Filter out duplicates - this happens with badly-designed ".pc" files...
12156 for cf_add_1lib in $LIBS
12158 for cf_add_2lib in $cf_add_libs
12160 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12166 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12168 LIBS="$cf_add_libs"
12174 { echo "$as_me:12174: WARNING: unable to find SM library" >&5
12175 echo "$as_me: WARNING: unable to find SM library" >&2;}
12178 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12179 test -n "$verbose" && echo " found package xt" 1>&6
12181 echo "${as_me:-configure}:12181: testing found package xt ..." 1>&5
12183 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12184 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12185 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12187 echo "${as_me:-configure}:12187: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12189 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12191 echo "${as_me:-configure}:12191: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12196 cf_new_extra_cppflags=
12198 for cf_add_cflags in $cf_pkgconfig_incs
12200 case $cf_fix_cppflags in
12202 case $cf_add_cflags in
12203 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12204 case $cf_add_cflags in
12206 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12208 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12209 && test -z "${cf_tst_cflags}" \
12210 && cf_fix_cppflags=yes
12212 if test $cf_fix_cppflags = yes ; then
12214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12218 elif test "${cf_tst_cflags}" = "\"'" ; then
12220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12227 case "$CPPFLAGS" in
12231 case $cf_add_cflags in
12233 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12235 CPPFLAGS=`echo "$CPPFLAGS" | \
12236 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12237 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12242 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12243 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12250 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12251 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12258 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12259 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12261 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12263 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12264 && test -z "${cf_tst_cflags}" \
12265 && cf_fix_cppflags=no
12270 if test -n "$cf_new_cflags" ; then
12272 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12273 CFLAGS="${CFLAGS}$cf_new_cflags"
12277 if test -n "$cf_new_cppflags" ; then
12279 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12280 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12284 if test -n "$cf_new_extra_cppflags" ; then
12286 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12287 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12291 cf_add_libs="$cf_pkgconfig_libs"
12292 # Filter out duplicates - this happens with badly-designed ".pc" files...
12293 for cf_add_1lib in $LIBS
12295 for cf_add_2lib in $cf_add_libs
12297 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12303 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12305 LIBS="$cf_add_libs"
12311 { echo "$as_me:12311: WARNING: unable to find Xt library" >&5
12312 echo "$as_me: WARNING: unable to find Xt library" >&2;}
12319 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12320 test -n "$verbose" && echo " found package xt" 1>&6
12322 echo "${as_me:-configure}:12322: testing found package xt ..." 1>&5
12324 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12325 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12326 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12328 echo "${as_me:-configure}:12328: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12330 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12332 echo "${as_me:-configure}:12332: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12337 cf_new_extra_cppflags=
12339 for cf_add_cflags in $cf_pkgconfig_incs
12341 case $cf_fix_cppflags in
12343 case $cf_add_cflags in
12344 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12345 case $cf_add_cflags in
12347 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12349 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12350 && test -z "${cf_tst_cflags}" \
12351 && cf_fix_cppflags=yes
12353 if test $cf_fix_cppflags = yes ; then
12355 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12356 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12359 elif test "${cf_tst_cflags}" = "\"'" ; then
12361 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12362 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12368 case "$CPPFLAGS" in
12372 case $cf_add_cflags in
12374 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12376 CPPFLAGS=`echo "$CPPFLAGS" | \
12377 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12378 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12383 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12384 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12391 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12392 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12399 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12400 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12402 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12404 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12405 && test -z "${cf_tst_cflags}" \
12406 && cf_fix_cppflags=no
12411 if test -n "$cf_new_cflags" ; then
12413 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12414 CFLAGS="${CFLAGS}$cf_new_cflags"
12418 if test -n "$cf_new_cppflags" ; then
12420 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12421 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12425 if test -n "$cf_new_extra_cppflags" ; then
12427 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12428 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12432 cf_add_libs="$cf_pkgconfig_libs"
12433 # Filter out duplicates - this happens with badly-designed ".pc" files...
12434 for cf_add_1lib in $LIBS
12436 for cf_add_2lib in $cf_add_libs
12438 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12444 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12446 LIBS="$cf_add_libs"
12452 # we have an "xt" package, but it may omit Xt's dependency on X11
12453 echo "$as_me:12453: checking for usable X dependency" >&5
12454 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
12455 if test "${cf_cv_xt_x11_compat+set}" = set; then
12456 echo $ECHO_N "(cached) $ECHO_C" >&6
12459 cat >conftest.$ac_ext <<_ACEOF
12460 #line 12460 "configure"
12461 #include "confdefs.h"
12463 #include <X11/Xlib.h>
12469 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12470 int rc2 = XClearWindow((Display*) 0, (Window) 0);
12471 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12472 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12478 rm -f conftest.$ac_objext conftest$ac_exeext
12479 if { (eval echo "$as_me:12479: \"$ac_link\"") >&5
12480 (eval $ac_link) 2>&5
12482 echo "$as_me:12482: \$? = $ac_status" >&5
12483 (exit $ac_status); } &&
12484 { ac_try='test -s conftest$ac_exeext'
12485 { (eval echo "$as_me:12485: \"$ac_try\"") >&5
12486 (eval $ac_try) 2>&5
12488 echo "$as_me:12488: \$? = $ac_status" >&5
12489 (exit $ac_status); }; }; then
12490 cf_cv_xt_x11_compat=yes
12492 echo "$as_me: failed program was:" >&5
12493 cat conftest.$ac_ext >&5
12494 cf_cv_xt_x11_compat=no
12496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12498 echo "$as_me:12498: result: $cf_cv_xt_x11_compat" >&5
12499 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12500 if test "$cf_cv_xt_x11_compat" = no
12502 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
12504 echo "${as_me:-configure}:12504: testing work around broken X11 dependency ..." 1>&5
12506 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12508 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12509 test -n "$verbose" && echo " found package x11" 1>&6
12511 echo "${as_me:-configure}:12511: testing found package x11 ..." 1>&5
12513 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12514 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12515 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12517 echo "${as_me:-configure}:12517: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12519 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12521 echo "${as_me:-configure}:12521: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12526 cf_new_extra_cppflags=
12528 for cf_add_cflags in $cf_pkgconfig_incs
12530 case $cf_fix_cppflags in
12532 case $cf_add_cflags in
12533 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12534 case $cf_add_cflags in
12536 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12538 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12539 && test -z "${cf_tst_cflags}" \
12540 && cf_fix_cppflags=yes
12542 if test $cf_fix_cppflags = yes ; then
12544 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12545 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12548 elif test "${cf_tst_cflags}" = "\"'" ; then
12550 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12551 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12557 case "$CPPFLAGS" in
12561 case $cf_add_cflags in
12563 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12565 CPPFLAGS=`echo "$CPPFLAGS" | \
12566 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12567 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12572 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12573 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12580 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12581 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12588 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12589 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12591 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12593 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12594 && test -z "${cf_tst_cflags}" \
12595 && cf_fix_cppflags=no
12600 if test -n "$cf_new_cflags" ; then
12602 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12603 CFLAGS="${CFLAGS}$cf_new_cflags"
12607 if test -n "$cf_new_cppflags" ; then
12609 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12610 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12614 if test -n "$cf_new_extra_cppflags" ; then
12616 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12617 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12621 cf_add_libs="$cf_pkgconfig_libs"
12622 # Filter out duplicates - this happens with badly-designed ".pc" files...
12623 for cf_add_1lib in $LIBS
12625 for cf_add_2lib in $cf_add_libs
12627 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12633 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12635 LIBS="$cf_add_libs"
12642 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12644 echo "${as_me:-configure}:12644: testing ...before $LIBS ..." 1>&5
12646 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12647 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12649 echo "${as_me:-configure}:12649: testing ...after $LIBS ..." 1>&5
12657 echo "$as_me:12657: checking for usable X Toolkit package" >&5
12658 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12659 if test "${cf_cv_xt_ice_compat+set}" = set; then
12660 echo $ECHO_N "(cached) $ECHO_C" >&6
12663 cat >conftest.$ac_ext <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12667 #include <X11/Shell.h>
12672 int num = IceConnectionNumber(0)
12678 rm -f conftest.$ac_objext conftest$ac_exeext
12679 if { (eval echo "$as_me:12679: \"$ac_link\"") >&5
12680 (eval $ac_link) 2>&5
12682 echo "$as_me:12682: \$? = $ac_status" >&5
12683 (exit $ac_status); } &&
12684 { ac_try='test -s conftest$ac_exeext'
12685 { (eval echo "$as_me:12685: \"$ac_try\"") >&5
12686 (eval $ac_try) 2>&5
12688 echo "$as_me:12688: \$? = $ac_status" >&5
12689 (exit $ac_status); }; }; then
12690 cf_cv_xt_ice_compat=yes
12692 echo "$as_me: failed program was:" >&5
12693 cat conftest.$ac_ext >&5
12694 cf_cv_xt_ice_compat=no
12696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12698 echo "$as_me:12698: result: $cf_cv_xt_ice_compat" >&5
12699 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12701 if test "$cf_cv_xt_ice_compat" = no
12703 # workaround for broken ".pc" files used for X Toolkit.
12704 case "x$X_PRE_LIBS" in
12710 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12712 echo "${as_me:-configure}:12712: testing work around broken ICE dependency ..." 1>&5
12714 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12715 test -n "$verbose" && echo " found package ice" 1>&6
12717 echo "${as_me:-configure}:12717: testing found package ice ..." 1>&5
12719 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12720 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12721 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12723 echo "${as_me:-configure}:12723: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12725 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12727 echo "${as_me:-configure}:12727: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12732 cf_new_extra_cppflags=
12734 for cf_add_cflags in $cf_pkgconfig_incs
12736 case $cf_fix_cppflags in
12738 case $cf_add_cflags in
12739 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12740 case $cf_add_cflags in
12742 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12744 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12745 && test -z "${cf_tst_cflags}" \
12746 && cf_fix_cppflags=yes
12748 if test $cf_fix_cppflags = yes ; then
12750 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12751 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12754 elif test "${cf_tst_cflags}" = "\"'" ; then
12756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12763 case "$CPPFLAGS" in
12767 case $cf_add_cflags in
12769 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12771 CPPFLAGS=`echo "$CPPFLAGS" | \
12772 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12773 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12778 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12779 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12786 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12787 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12794 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12795 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12797 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12799 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12800 && test -z "${cf_tst_cflags}" \
12801 && cf_fix_cppflags=no
12806 if test -n "$cf_new_cflags" ; then
12808 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12809 CFLAGS="${CFLAGS}$cf_new_cflags"
12813 if test -n "$cf_new_cppflags" ; then
12815 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12816 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12820 if test -n "$cf_new_extra_cppflags" ; then
12822 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12823 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12827 cf_add_libs="$cf_pkgconfig_libs"
12828 # Filter out duplicates - this happens with badly-designed ".pc" files...
12829 for cf_add_1lib in $LIBS
12831 for cf_add_2lib in $cf_add_libs
12833 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12839 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12841 LIBS="$cf_add_libs"
12843 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12844 test -n "$verbose" && echo " found package sm" 1>&6
12846 echo "${as_me:-configure}:12846: testing found package sm ..." 1>&5
12848 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12849 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12850 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12852 echo "${as_me:-configure}:12852: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12854 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12856 echo "${as_me:-configure}:12856: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12861 cf_new_extra_cppflags=
12863 for cf_add_cflags in $cf_pkgconfig_incs
12865 case $cf_fix_cppflags in
12867 case $cf_add_cflags in
12868 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12869 case $cf_add_cflags in
12871 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12874 && test -z "${cf_tst_cflags}" \
12875 && cf_fix_cppflags=yes
12877 if test $cf_fix_cppflags = yes ; then
12879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12883 elif test "${cf_tst_cflags}" = "\"'" ; then
12885 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12886 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12892 case "$CPPFLAGS" in
12896 case $cf_add_cflags in
12898 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12900 CPPFLAGS=`echo "$CPPFLAGS" | \
12901 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12902 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12907 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12908 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12915 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12916 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12926 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12929 && test -z "${cf_tst_cflags}" \
12930 && cf_fix_cppflags=no
12935 if test -n "$cf_new_cflags" ; then
12937 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12938 CFLAGS="${CFLAGS}$cf_new_cflags"
12942 if test -n "$cf_new_cppflags" ; then
12944 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12945 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12949 if test -n "$cf_new_extra_cppflags" ; then
12951 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12952 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12956 cf_add_libs="$cf_pkgconfig_libs"
12957 # Filter out duplicates - this happens with badly-designed ".pc" files...
12958 for cf_add_1lib in $LIBS
12960 for cf_add_2lib in $cf_add_libs
12962 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12968 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12970 LIBS="$cf_add_libs"
12983 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12985 echo "${as_me:-configure}:12985: testing ...before $LIBS ..." 1>&5
12987 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12988 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12990 echo "${as_me:-configure}:12990: testing ...after $LIBS ..." 1>&5
13006 LDFLAGS="$X_LIBS $LDFLAGS"
13008 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13010 echo "${as_me:-configure}:13010: testing checking additions to CFLAGS ..." 1>&5
13012 cf_check_cflags="$CFLAGS"
13013 cf_check_cppflags="$CPPFLAGS"
13018 cf_new_extra_cppflags=
13020 for cf_add_cflags in $X_CFLAGS
13022 case $cf_fix_cppflags in
13024 case $cf_add_cflags in
13025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13026 case $cf_add_cflags in
13028 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13031 && test -z "${cf_tst_cflags}" \
13032 && cf_fix_cppflags=yes
13034 if test $cf_fix_cppflags = yes ; then
13036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13040 elif test "${cf_tst_cflags}" = "\"'" ; then
13042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13049 case "$CPPFLAGS" in
13053 case $cf_add_cflags in
13055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13057 CPPFLAGS=`echo "$CPPFLAGS" | \
13058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13083 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13086 && test -z "${cf_tst_cflags}" \
13087 && cf_fix_cppflags=no
13092 if test -n "$cf_new_cflags" ; then
13093 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13095 echo "${as_me:-configure}:13095: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13097 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13098 CFLAGS="${CFLAGS}$cf_new_cflags"
13102 if test -n "$cf_new_cppflags" ; then
13103 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13105 echo "${as_me:-configure}:13105: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13108 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13112 if test -n "$cf_new_extra_cppflags" ; then
13113 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13115 echo "${as_me:-configure}:13115: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13117 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13118 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13122 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13123 cat >conftest.$ac_ext <<_ACEOF
13124 #line 13124 "configure"
13125 #include "confdefs.h"
13130 printf("Hello world");
13135 rm -f conftest.$ac_objext conftest$ac_exeext
13136 if { (eval echo "$as_me:13136: \"$ac_link\"") >&5
13137 (eval $ac_link) 2>&5
13139 echo "$as_me:13139: \$? = $ac_status" >&5
13140 (exit $ac_status); } &&
13141 { ac_try='test -s conftest$ac_exeext'
13142 { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143 (eval $ac_try) 2>&5
13145 echo "$as_me:13145: \$? = $ac_status" >&5
13146 (exit $ac_status); }; }; then
13149 echo "$as_me: failed program was:" >&5
13150 cat conftest.$ac_ext >&5
13151 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13153 echo "${as_me:-configure}:13153: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13155 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13156 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13158 echo "${as_me:-configure}:13158: testing but keeping change to \$CPPFLAGS ..." 1>&5
13161 CFLAGS="$cf_check_flags"
13163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13166 echo "$as_me:13166: checking for XOpenDisplay" >&5
13167 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
13168 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
13169 echo $ECHO_N "(cached) $ECHO_C" >&6
13171 cat >conftest.$ac_ext <<_ACEOF
13172 #line 13172 "configure"
13173 #include "confdefs.h"
13174 /* System header to define __stub macros and hopefully few prototypes,
13175 which can conflict with char XOpenDisplay (); below. */
13176 #include <assert.h>
13177 /* Override any gcc2 internal prototype to avoid an error. */
13181 /* We use char because int might match the return type of a gcc2
13182 builtin and then its argument prototype would still apply. */
13183 char XOpenDisplay ();
13189 /* The GNU C library defines this for functions which it implements
13190 to always fail with ENOSYS. Some functions are actually named
13191 something starting with __ and the normal name is an alias. */
13192 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
13195 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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_func_XOpenDisplay=yes
13216 echo "$as_me: failed program was:" >&5
13217 cat conftest.$ac_ext >&5
13218 ac_cv_func_XOpenDisplay=no
13220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13222 echo "$as_me:13222: result: $ac_cv_func_XOpenDisplay" >&5
13223 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
13224 if test $ac_cv_func_XOpenDisplay = yes; then
13228 echo "$as_me:13228: checking for XOpenDisplay in -lX11" >&5
13229 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13230 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
13233 ac_check_lib_save_LIBS=$LIBS
13234 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13235 cat >conftest.$ac_ext <<_ACEOF
13236 #line 13236 "configure"
13237 #include "confdefs.h"
13239 /* Override any gcc2 internal prototype to avoid an error. */
13243 /* We use char because int might match the return type of a gcc2
13244 builtin and then its argument prototype would still apply. */
13245 char XOpenDisplay ();
13254 rm -f conftest.$ac_objext conftest$ac_exeext
13255 if { (eval echo "$as_me:13255: \"$ac_link\"") >&5
13256 (eval $ac_link) 2>&5
13258 echo "$as_me:13258: \$? = $ac_status" >&5
13259 (exit $ac_status); } &&
13260 { ac_try='test -s conftest$ac_exeext'
13261 { (eval echo "$as_me:13261: \"$ac_try\"") >&5
13262 (eval $ac_try) 2>&5
13264 echo "$as_me:13264: \$? = $ac_status" >&5
13265 (exit $ac_status); }; }; then
13266 ac_cv_lib_X11_XOpenDisplay=yes
13268 echo "$as_me: failed program was:" >&5
13269 cat conftest.$ac_ext >&5
13270 ac_cv_lib_X11_XOpenDisplay=no
13272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13273 LIBS=$ac_check_lib_save_LIBS
13275 echo "$as_me:13275: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13276 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13277 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13279 cf_add_libs="-lX11"
13280 # Filter out duplicates - this happens with badly-designed ".pc" files...
13281 for cf_add_1lib in $LIBS
13283 for cf_add_2lib in $cf_add_libs
13285 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13291 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13293 LIBS="$cf_add_libs"
13299 echo "$as_me:13299: checking for XtAppInitialize" >&5
13300 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
13301 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
13302 echo $ECHO_N "(cached) $ECHO_C" >&6
13304 cat >conftest.$ac_ext <<_ACEOF
13305 #line 13305 "configure"
13306 #include "confdefs.h"
13307 /* System header to define __stub macros and hopefully few prototypes,
13308 which can conflict with char XtAppInitialize (); below. */
13309 #include <assert.h>
13310 /* Override any gcc2 internal prototype to avoid an error. */
13314 /* We use char because int might match the return type of a gcc2
13315 builtin and then its argument prototype would still apply. */
13316 char XtAppInitialize ();
13322 /* The GNU C library defines this for functions which it implements
13323 to always fail with ENOSYS. Some functions are actually named
13324 something starting with __ and the normal name is an alias. */
13325 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
13328 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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_func_XtAppInitialize=yes
13349 echo "$as_me: failed program was:" >&5
13350 cat conftest.$ac_ext >&5
13351 ac_cv_func_XtAppInitialize=no
13353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13355 echo "$as_me:13355: result: $ac_cv_func_XtAppInitialize" >&5
13356 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
13357 if test $ac_cv_func_XtAppInitialize = yes; then
13361 echo "$as_me:13361: checking for XtAppInitialize in -lXt" >&5
13362 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
13363 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
13364 echo $ECHO_N "(cached) $ECHO_C" >&6
13366 ac_check_lib_save_LIBS=$LIBS
13367 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13368 cat >conftest.$ac_ext <<_ACEOF
13369 #line 13369 "configure"
13370 #include "confdefs.h"
13372 /* Override any gcc2 internal prototype to avoid an error. */
13376 /* We use char because int might match the return type of a gcc2
13377 builtin and then its argument prototype would still apply. */
13378 char XtAppInitialize ();
13382 XtAppInitialize ();
13387 rm -f conftest.$ac_objext conftest$ac_exeext
13388 if { (eval echo "$as_me:13388: \"$ac_link\"") >&5
13389 (eval $ac_link) 2>&5
13391 echo "$as_me:13391: \$? = $ac_status" >&5
13392 (exit $ac_status); } &&
13393 { ac_try='test -s conftest$ac_exeext'
13394 { (eval echo "$as_me:13394: \"$ac_try\"") >&5
13395 (eval $ac_try) 2>&5
13397 echo "$as_me:13397: \$? = $ac_status" >&5
13398 (exit $ac_status); }; }; then
13399 ac_cv_lib_Xt_XtAppInitialize=yes
13401 echo "$as_me: failed program was:" >&5
13402 cat conftest.$ac_ext >&5
13403 ac_cv_lib_Xt_XtAppInitialize=no
13405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13406 LIBS=$ac_check_lib_save_LIBS
13408 echo "$as_me:13408: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
13409 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
13410 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
13412 cat >>confdefs.h <<\EOF
13413 #define HAVE_LIBXT 1
13417 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13424 if test $cf_have_X_LIBS = no ; then
13425 { echo "$as_me:13425: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13426 test program. You will have to check and add the proper libraries by hand
13428 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13429 test program. You will have to check and add the proper libraries by hand
13430 to makefile." >&2;}
13433 cf_x_athena_root=$cf_x_athena
13436 for cf_path in default \
13437 /usr/contrib/X11R6 \
13438 /usr/contrib/X11R5 \
13442 if test -z "$cf_x_athena_inc" ; then
13443 cf_save="$CPPFLAGS"
13444 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
13445 if test $cf_path != default ; then
13446 CPPFLAGS="$cf_save -I$cf_path/include"
13447 echo "$as_me:13447: checking for $cf_test in $cf_path" >&5
13448 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
13450 echo "$as_me:13450: checking for $cf_test" >&5
13451 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
13453 cat >conftest.$ac_ext <<_ACEOF
13454 #line 13454 "configure"
13455 #include "confdefs.h"
13457 #include <X11/Intrinsic.h>
13458 #include <$cf_test>
13467 rm -f conftest.$ac_objext
13468 if { (eval echo "$as_me:13468: \"$ac_compile\"") >&5
13469 (eval $ac_compile) 2>&5
13471 echo "$as_me:13471: \$? = $ac_status" >&5
13472 (exit $ac_status); } &&
13473 { ac_try='test -s conftest.$ac_objext'
13474 { (eval echo "$as_me:13474: \"$ac_try\"") >&5
13475 (eval $ac_try) 2>&5
13477 echo "$as_me:13477: \$? = $ac_status" >&5
13478 (exit $ac_status); }; }; then
13481 echo "$as_me: failed program was:" >&5
13482 cat conftest.$ac_ext >&5
13485 rm -f conftest.$ac_objext conftest.$ac_ext
13486 echo "$as_me:13486: result: $cf_result" >&5
13487 echo "${ECHO_T}$cf_result" >&6
13488 if test "$cf_result" = yes ; then
13489 cf_x_athena_inc=$cf_path
13492 CPPFLAGS="$cf_save"
13497 if test -z "$cf_x_athena_inc" ; then
13498 { echo "$as_me:13498: WARNING: Unable to successfully find Athena header files with test program" >&5
13499 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
13500 elif test "$cf_x_athena_inc" != default ; then
13501 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
13504 cf_x_athena_root=$cf_x_athena
13507 for cf_path in default \
13508 /usr/contrib/X11R6 \
13509 /usr/contrib/X11R5 \
13514 ${cf_x_athena_root} \
13515 ${cf_x_athena_root}7 \
13516 ${cf_x_athena_root}6
13519 "-l$cf_lib -lXmu" \
13520 "-l$cf_lib -lXpm -lXmu" \
13521 "-l${cf_lib}_s -lXmu_s"
13523 if test -z "$cf_x_athena_lib" ; then
13525 cf_test=XawSimpleMenuAddGlobalActions
13526 if test $cf_path != default ; then
13528 cf_add_libs="-L$cf_path/lib $cf_libs"
13529 # Filter out duplicates - this happens with badly-designed ".pc" files...
13530 for cf_add_1lib in $LIBS
13532 for cf_add_2lib in $cf_add_libs
13534 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13540 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13542 LIBS="$cf_add_libs"
13544 echo "$as_me:13544: checking for $cf_libs in $cf_path" >&5
13545 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13548 cf_add_libs="$cf_libs"
13549 # Filter out duplicates - this happens with badly-designed ".pc" files...
13550 for cf_add_1lib in $LIBS
13552 for cf_add_2lib in $cf_add_libs
13554 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13560 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13562 LIBS="$cf_add_libs"
13564 echo "$as_me:13564: checking for $cf_test in $cf_libs" >&5
13565 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13567 cat >conftest.$ac_ext <<_ACEOF
13568 #line 13568 "configure"
13569 #include "confdefs.h"
13571 #include <X11/Intrinsic.h>
13572 #include <X11/$cf_x_athena_root/SimpleMenu.h>
13578 $cf_test((XtAppContext) 0)
13583 rm -f conftest.$ac_objext conftest$ac_exeext
13584 if { (eval echo "$as_me:13584: \"$ac_link\"") >&5
13585 (eval $ac_link) 2>&5
13587 echo "$as_me:13587: \$? = $ac_status" >&5
13588 (exit $ac_status); } &&
13589 { ac_try='test -s conftest$ac_exeext'
13590 { (eval echo "$as_me:13590: \"$ac_try\"") >&5
13591 (eval $ac_try) 2>&5
13593 echo "$as_me:13593: \$? = $ac_status" >&5
13594 (exit $ac_status); }; }; then
13597 echo "$as_me: failed program was:" >&5
13598 cat conftest.$ac_ext >&5
13601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13602 echo "$as_me:13602: result: $cf_result" >&5
13603 echo "${ECHO_T}$cf_result" >&6
13604 if test "$cf_result" = yes ; then
13605 cf_x_athena_lib="$cf_libs"
13611 test -n "$cf_x_athena_lib" && break
13615 if test -z "$cf_x_athena_lib" ; then
13616 { { echo "$as_me:13616: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13617 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13618 { (exit 1); exit 1; }; }
13621 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13623 cat >>confdefs.h <<EOF
13624 #define $cf_x_athena_LIBS 1
13629 if test -n "$ac_tool_prefix"; then
13630 for ac_prog in xcurses-config
13632 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13633 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13634 echo "$as_me:13634: checking for $ac_word" >&5
13635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13636 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
13639 if test -n "$XCURSES_CONFIG"; then
13640 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
13642 ac_save_IFS=$IFS; IFS=$ac_path_separator
13644 for ac_dir in $ac_dummy; do
13646 test -z "$ac_dir" && ac_dir=.
13647 $as_executable_p "$ac_dir/$ac_word" || continue
13648 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
13649 echo "$as_me:13649: found $ac_dir/$ac_word" >&5
13655 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
13656 if test -n "$XCURSES_CONFIG"; then
13657 echo "$as_me:13657: result: $XCURSES_CONFIG" >&5
13658 echo "${ECHO_T}$XCURSES_CONFIG" >&6
13660 echo "$as_me:13660: result: no" >&5
13661 echo "${ECHO_T}no" >&6
13664 test -n "$XCURSES_CONFIG" && break
13667 if test -z "$XCURSES_CONFIG"; then
13668 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
13669 for ac_prog in xcurses-config
13671 # Extract the first word of "$ac_prog", so it can be a program name with args.
13672 set dummy $ac_prog; ac_word=$2
13673 echo "$as_me:13673: checking for $ac_word" >&5
13674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13675 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
13676 echo $ECHO_N "(cached) $ECHO_C" >&6
13678 if test -n "$ac_ct_XCURSES_CONFIG"; then
13679 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
13681 ac_save_IFS=$IFS; IFS=$ac_path_separator
13683 for ac_dir in $ac_dummy; do
13685 test -z "$ac_dir" && ac_dir=.
13686 $as_executable_p "$ac_dir/$ac_word" || continue
13687 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
13688 echo "$as_me:13688: found $ac_dir/$ac_word" >&5
13694 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
13695 if test -n "$ac_ct_XCURSES_CONFIG"; then
13696 echo "$as_me:13696: result: $ac_ct_XCURSES_CONFIG" >&5
13697 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
13699 echo "$as_me:13699: result: no" >&5
13700 echo "${ECHO_T}no" >&6
13703 test -n "$ac_ct_XCURSES_CONFIG" && break
13705 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
13707 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
13710 if test "$XCURSES_CONFIG" != none ; then
13712 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
13714 cf_add_libs="`$XCURSES_CONFIG --libs`"
13715 # Filter out duplicates - this happens with badly-designed ".pc" files...
13716 for cf_add_1lib in $LIBS
13718 for cf_add_2lib in $cf_add_libs
13720 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13726 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13728 LIBS="$cf_add_libs"
13730 cf_cv_lib_XCurses=yes
13734 LDFLAGS="$LDFLAGS $X_LIBS"
13736 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13738 echo "${as_me:-configure}:13738: testing checking additions to CFLAGS ..." 1>&5
13740 cf_check_cflags="$CFLAGS"
13741 cf_check_cppflags="$CPPFLAGS"
13746 cf_new_extra_cppflags=
13748 for cf_add_cflags in $X_CFLAGS
13750 case $cf_fix_cppflags in
13752 case $cf_add_cflags in
13753 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13754 case $cf_add_cflags in
13756 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13758 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13759 && test -z "${cf_tst_cflags}" \
13760 && cf_fix_cppflags=yes
13762 if test $cf_fix_cppflags = yes ; then
13764 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13765 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13768 elif test "${cf_tst_cflags}" = "\"'" ; then
13770 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13771 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13777 case "$CPPFLAGS" in
13781 case $cf_add_cflags in
13783 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13785 CPPFLAGS=`echo "$CPPFLAGS" | \
13786 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13787 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13792 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13793 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13800 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13801 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13808 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13809 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13811 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13813 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13814 && test -z "${cf_tst_cflags}" \
13815 && cf_fix_cppflags=no
13820 if test -n "$cf_new_cflags" ; then
13821 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13823 echo "${as_me:-configure}:13823: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13825 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13826 CFLAGS="${CFLAGS}$cf_new_cflags"
13830 if test -n "$cf_new_cppflags" ; then
13831 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13833 echo "${as_me:-configure}:13833: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13835 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13836 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13840 if test -n "$cf_new_extra_cppflags" ; then
13841 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13843 echo "${as_me:-configure}:13843: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13845 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13846 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13850 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13851 cat >conftest.$ac_ext <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13858 printf("Hello world");
13863 rm -f conftest.$ac_objext conftest$ac_exeext
13864 if { (eval echo "$as_me:13864: \"$ac_link\"") >&5
13865 (eval $ac_link) 2>&5
13867 echo "$as_me:13867: \$? = $ac_status" >&5
13868 (exit $ac_status); } &&
13869 { ac_try='test -s conftest$ac_exeext'
13870 { (eval echo "$as_me:13870: \"$ac_try\"") >&5
13871 (eval $ac_try) 2>&5
13873 echo "$as_me:13873: \$? = $ac_status" >&5
13874 (exit $ac_status); }; }; then
13877 echo "$as_me: failed program was:" >&5
13878 cat conftest.$ac_ext >&5
13879 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13881 echo "${as_me:-configure}:13881: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13883 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13884 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13886 echo "${as_me:-configure}:13886: testing but keeping change to \$CPPFLAGS ..." 1>&5
13889 CFLAGS="$cf_check_flags"
13891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13894 echo "$as_me:13894: checking for XOpenDisplay in -lX11" >&5
13895 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13896 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13897 echo $ECHO_N "(cached) $ECHO_C" >&6
13899 ac_check_lib_save_LIBS=$LIBS
13900 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13901 cat >conftest.$ac_ext <<_ACEOF
13902 #line 13902 "configure"
13903 #include "confdefs.h"
13905 /* Override any gcc2 internal prototype to avoid an error. */
13909 /* We use char because int might match the return type of a gcc2
13910 builtin and then its argument prototype would still apply. */
13911 char XOpenDisplay ();
13920 rm -f conftest.$ac_objext conftest$ac_exeext
13921 if { (eval echo "$as_me:13921: \"$ac_link\"") >&5
13922 (eval $ac_link) 2>&5
13924 echo "$as_me:13924: \$? = $ac_status" >&5
13925 (exit $ac_status); } &&
13926 { ac_try='test -s conftest$ac_exeext'
13927 { (eval echo "$as_me:13927: \"$ac_try\"") >&5
13928 (eval $ac_try) 2>&5
13930 echo "$as_me:13930: \$? = $ac_status" >&5
13931 (exit $ac_status); }; }; then
13932 ac_cv_lib_X11_XOpenDisplay=yes
13934 echo "$as_me: failed program was:" >&5
13935 cat conftest.$ac_ext >&5
13936 ac_cv_lib_X11_XOpenDisplay=no
13938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13939 LIBS=$ac_check_lib_save_LIBS
13941 echo "$as_me:13941: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13942 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13943 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13945 cf_add_libs="-lX11"
13946 # Filter out duplicates - this happens with badly-designed ".pc" files...
13947 for cf_add_1lib in $LIBS
13949 for cf_add_2lib in $cf_add_libs
13951 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13957 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13959 LIBS="$cf_add_libs"
13963 echo "$as_me:13963: checking for XCurses library" >&5
13964 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13965 if test "${cf_cv_lib_XCurses+set}" = set; then
13966 echo $ECHO_N "(cached) $ECHO_C" >&6
13969 cf_add_libs="-lXCurses"
13970 # Filter out duplicates - this happens with badly-designed ".pc" files...
13971 for cf_add_1lib in $LIBS
13973 for cf_add_2lib in $cf_add_libs
13975 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13981 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13983 LIBS="$cf_add_libs"
13985 cat >conftest.$ac_ext <<_ACEOF
13986 #line 13986 "configure"
13987 #include "confdefs.h"
13989 #include <xcurses.h>
13990 char *XCursesProgramName = "test";
14000 rm -f conftest.$ac_objext conftest$ac_exeext
14001 if { (eval echo "$as_me:14001: \"$ac_link\"") >&5
14002 (eval $ac_link) 2>&5
14004 echo "$as_me:14004: \$? = $ac_status" >&5
14005 (exit $ac_status); } &&
14006 { ac_try='test -s conftest$ac_exeext'
14007 { (eval echo "$as_me:14007: \"$ac_try\"") >&5
14008 (eval $ac_try) 2>&5
14010 echo "$as_me:14010: \$? = $ac_status" >&5
14011 (exit $ac_status); }; }; then
14012 cf_cv_lib_XCurses=yes
14014 echo "$as_me: failed program was:" >&5
14015 cat conftest.$ac_ext >&5
14016 cf_cv_lib_XCurses=no
14018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14021 echo "$as_me:14021: result: $cf_cv_lib_XCurses" >&5
14022 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
14026 if test $cf_cv_lib_XCurses = yes ; then
14028 cat >>confdefs.h <<\EOF
14032 cat >>confdefs.h <<\EOF
14036 echo "$as_me:14036: checking for xcurses.h" >&5
14037 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
14038 if test "${ac_cv_header_xcurses_h+set}" = set; then
14039 echo $ECHO_N "(cached) $ECHO_C" >&6
14041 cat >conftest.$ac_ext <<_ACEOF
14042 #line 14042 "configure"
14043 #include "confdefs.h"
14044 #include <xcurses.h>
14046 if { (eval echo "$as_me:14046: \"$ac_cpp conftest.$ac_ext\"") >&5
14047 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14049 egrep -v '^ *\+' conftest.er1 >conftest.err
14051 cat conftest.err >&5
14052 echo "$as_me:14052: \$? = $ac_status" >&5
14053 (exit $ac_status); } >/dev/null; then
14054 if test -s conftest.err; then
14055 ac_cpp_err=$ac_c_preproc_warn_flag
14062 if test -z "$ac_cpp_err"; then
14063 ac_cv_header_xcurses_h=yes
14065 echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 ac_cv_header_xcurses_h=no
14069 rm -f conftest.err conftest.$ac_ext
14071 echo "$as_me:14071: result: $ac_cv_header_xcurses_h" >&5
14072 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
14073 if test $ac_cv_header_xcurses_h = yes; then
14075 cat >>confdefs.h <<\EOF
14076 #define HAVE_XCURSES 1
14082 { { echo "$as_me:14082: error: Cannot link with XCurses" >&5
14083 echo "$as_me: error: Cannot link with XCurses" >&2;}
14084 { (exit 1); exit 1; }; }
14089 { { echo "$as_me:14089: error: unexpected screen-value: $cf_cv_screen" >&5
14090 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
14091 { (exit 1); exit 1; }; }
14095 : ${cf_nculib_root:=$cf_cv_screen}
14096 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
14097 echo "$as_me:14097: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
14098 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
14099 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14100 echo $ECHO_N "(cached) $ECHO_C" >&6
14102 ac_check_lib_save_LIBS=$LIBS
14103 LIBS="-l$cf_nculib_root $LIBS"
14104 cat >conftest.$ac_ext <<_ACEOF
14105 #line 14105 "configure"
14106 #include "confdefs.h"
14108 /* Override any gcc2 internal prototype to avoid an error. */
14112 /* We use char because int might match the return type of a gcc2
14113 builtin and then its argument prototype would still apply. */
14114 char _nc_init_pthreads ();
14118 _nc_init_pthreads ();
14123 rm -f conftest.$ac_objext conftest$ac_exeext
14124 if { (eval echo "$as_me:14124: \"$ac_link\"") >&5
14125 (eval $ac_link) 2>&5
14127 echo "$as_me:14127: \$? = $ac_status" >&5
14128 (exit $ac_status); } &&
14129 { ac_try='test -s conftest$ac_exeext'
14130 { (eval echo "$as_me:14130: \"$ac_try\"") >&5
14131 (eval $ac_try) 2>&5
14133 echo "$as_me:14133: \$? = $ac_status" >&5
14134 (exit $ac_status); }; }; then
14135 eval "$as_ac_Lib=yes"
14137 echo "$as_me: failed program was:" >&5
14138 cat conftest.$ac_ext >&5
14139 eval "$as_ac_Lib=no"
14141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14142 LIBS=$ac_check_lib_save_LIBS
14144 echo "$as_me:14144: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14145 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14146 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14147 cf_cv_ncurses_pthreads=yes
14149 cf_cv_ncurses_pthreads=no
14152 if test "$cf_cv_ncurses_pthreads" = yes
14155 cf_add_libs="-lpthread"
14156 # Filter out duplicates - this happens with badly-designed ".pc" files...
14157 for cf_add_1lib in $LIBS
14159 for cf_add_2lib in $cf_add_libs
14161 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14167 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14169 LIBS="$cf_add_libs"
14173 case $cf_cv_screen in
14175 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
14181 case $cf_cv_screen in
14183 cf_default_panel=no
14186 cf_default_tinfo=no
14188 (xcurses|bsdcurses)
14189 cf_default_panel=no
14192 cf_default_tinfo=yes
14195 cf_default_panel=yes
14196 cf_default_form=yes
14197 cf_default_menu=yes
14198 cf_default_tinfo=yes
14199 case $cf_cv_screen in
14201 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
14207 echo "$as_me:14207: checking if you want to check for panel functions" >&5
14208 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
14210 # Check whether --enable-panel or --disable-panel was given.
14211 if test "${enable_panel+set}" = set; then
14212 enableval="$enable_panel"
14213 test "$enableval" != no && enableval=yes
14214 if test "$enableval" != "yes" ; then
14217 cf_enable_panel=$cf_default_panel
14221 cf_enable_panel=$cf_default_panel
14224 echo "$as_me:14224: result: $cf_enable_panel" >&5
14225 echo "${ECHO_T}$cf_enable_panel" >&6
14226 if test $cf_enable_panel = yes
14229 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
14230 echo "$as_me:14230: checking for new_panel in -lpanel$cf_cv_libtype" >&5
14231 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
14232 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14233 echo $ECHO_N "(cached) $ECHO_C" >&6
14235 ac_check_lib_save_LIBS=$LIBS
14236 LIBS="-lpanel$cf_cv_libtype $LIBS"
14237 cat >conftest.$ac_ext <<_ACEOF
14238 #line 14238 "configure"
14239 #include "confdefs.h"
14241 /* Override any gcc2 internal prototype to avoid an error. */
14245 /* We use char because int might match the return type of a gcc2
14246 builtin and then its argument prototype would still apply. */
14256 rm -f conftest.$ac_objext conftest$ac_exeext
14257 if { (eval echo "$as_me:14257: \"$ac_link\"") >&5
14258 (eval $ac_link) 2>&5
14260 echo "$as_me:14260: \$? = $ac_status" >&5
14261 (exit $ac_status); } &&
14262 { ac_try='test -s conftest$ac_exeext'
14263 { (eval echo "$as_me:14263: \"$ac_try\"") >&5
14264 (eval $ac_try) 2>&5
14266 echo "$as_me:14266: \$? = $ac_status" >&5
14267 (exit $ac_status); }; }; then
14268 eval "$as_ac_Lib=yes"
14270 echo "$as_me: failed program was:" >&5
14271 cat conftest.$ac_ext >&5
14272 eval "$as_ac_Lib=no"
14274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14275 LIBS=$ac_check_lib_save_LIBS
14277 echo "$as_me:14277: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14278 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14279 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14281 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14283 cf_add_libs="-lpanel$cf_cv_libtype"
14284 # Filter out duplicates - this happens with badly-designed ".pc" files...
14285 for cf_add_1lib in $LIBS
14287 for cf_add_2lib in $cf_add_libs
14289 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14295 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14297 LIBS="$cf_add_libs"
14299 cat >>confdefs.h <<EOF
14300 #define $cf_upper 1
14305 cf_curses_headers="$cf_curses_headers panel.h"
14308 echo "$as_me:14308: checking if you want to check for menu functions" >&5
14309 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
14311 # Check whether --enable-menu or --disable-menu was given.
14312 if test "${enable_menu+set}" = set; then
14313 enableval="$enable_menu"
14314 test "$enableval" != no && enableval=yes
14315 if test "$enableval" != "yes" ; then
14318 cf_enable_menu=$cf_default_menu
14322 cf_enable_menu=$cf_default_menu
14325 echo "$as_me:14325: result: $cf_enable_menu" >&5
14326 echo "${ECHO_T}$cf_enable_menu" >&6
14327 if test $cf_enable_menu = yes
14329 case $cf_cv_screen in
14334 echo "$as_me:14334: checking for NetBSD menu.h" >&5
14335 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
14336 if test "${cf_cv_netbsd_menu_h+set}" = set; then
14337 echo $ECHO_N "(cached) $ECHO_C" >&6
14340 cat >conftest.$ac_ext <<_ACEOF
14341 #line 14341 "configure"
14342 #include "confdefs.h"
14344 #include <${cf_cv_ncurses_header:-curses.h}>
14352 int y = menu->max_item_width;
14358 rm -f conftest.$ac_objext
14359 if { (eval echo "$as_me:14359: \"$ac_compile\"") >&5
14360 (eval $ac_compile) 2>&5
14362 echo "$as_me:14362: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
14364 { ac_try='test -s conftest.$ac_objext'
14365 { (eval echo "$as_me:14365: \"$ac_try\"") >&5
14366 (eval $ac_try) 2>&5
14368 echo "$as_me:14368: \$? = $ac_status" >&5
14369 (exit $ac_status); }; }; then
14370 cf_cv_netbsd_menu_h=yes
14373 echo "$as_me: failed program was:" >&5
14374 cat conftest.$ac_ext >&5
14375 cf_cv_netbsd_menu_h=no
14377 rm -f conftest.$ac_objext conftest.$ac_ext
14380 echo "$as_me:14380: result: $cf_cv_netbsd_menu_h" >&5
14381 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
14383 test "$cf_cv_netbsd_menu_h" = yes &&
14384 cat >>confdefs.h <<\EOF
14385 #define HAVE_NETBSD_MENU_H 1
14391 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
14392 echo "$as_me:14392: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
14393 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
14394 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14395 echo $ECHO_N "(cached) $ECHO_C" >&6
14397 ac_check_lib_save_LIBS=$LIBS
14398 LIBS="-lmenu$cf_cv_libtype $LIBS"
14399 cat >conftest.$ac_ext <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14403 /* Override any gcc2 internal prototype to avoid an error. */
14407 /* We use char because int might match the return type of a gcc2
14408 builtin and then its argument prototype would still apply. */
14409 char menu_driver ();
14418 rm -f conftest.$ac_objext conftest$ac_exeext
14419 if { (eval echo "$as_me:14419: \"$ac_link\"") >&5
14420 (eval $ac_link) 2>&5
14422 echo "$as_me:14422: \$? = $ac_status" >&5
14423 (exit $ac_status); } &&
14424 { ac_try='test -s conftest$ac_exeext'
14425 { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14428 echo "$as_me:14428: \$? = $ac_status" >&5
14429 (exit $ac_status); }; }; then
14430 eval "$as_ac_Lib=yes"
14432 echo "$as_me: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14434 eval "$as_ac_Lib=no"
14436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14437 LIBS=$ac_check_lib_save_LIBS
14439 echo "$as_me:14439: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14440 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14441 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14443 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14445 cf_add_libs="-lmenu$cf_cv_libtype"
14446 # Filter out duplicates - this happens with badly-designed ".pc" files...
14447 for cf_add_1lib in $LIBS
14449 for cf_add_2lib in $cf_add_libs
14451 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14457 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14459 LIBS="$cf_add_libs"
14461 cat >>confdefs.h <<EOF
14462 #define $cf_upper 1
14467 cf_curses_headers="$cf_curses_headers menu.h"
14470 echo "$as_me:14470: checking if you want to check for form functions" >&5
14471 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
14473 # Check whether --enable-form or --disable-form was given.
14474 if test "${enable_form+set}" = set; then
14475 enableval="$enable_form"
14476 test "$enableval" != no && enableval=yes
14477 if test "$enableval" != "yes" ; then
14480 cf_enable_form=$cf_default_form
14484 cf_enable_form=$cf_default_form
14487 echo "$as_me:14487: result: $cf_enable_form" >&5
14488 echo "${ECHO_T}$cf_enable_form" >&6
14489 if test $cf_enable_form = yes
14491 case $cf_cv_screen in
14496 echo "$as_me:14496: checking for NetBSD form.h" >&5
14497 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
14498 if test "${cf_cv_netbsd_form_h+set}" = set; then
14499 echo $ECHO_N "(cached) $ECHO_C" >&6
14502 cat >conftest.$ac_ext <<_ACEOF
14503 #line 14503 "configure"
14504 #include "confdefs.h"
14506 #include <${cf_cv_ncurses_header:-curses.h}>
14514 int y = current_field(form)->cursor_ypos;
14515 int x = current_field(form)->cursor_xpos;
14521 rm -f conftest.$ac_objext
14522 if { (eval echo "$as_me:14522: \"$ac_compile\"") >&5
14523 (eval $ac_compile) 2>&5
14525 echo "$as_me:14525: \$? = $ac_status" >&5
14526 (exit $ac_status); } &&
14527 { ac_try='test -s conftest.$ac_objext'
14528 { (eval echo "$as_me:14528: \"$ac_try\"") >&5
14529 (eval $ac_try) 2>&5
14531 echo "$as_me:14531: \$? = $ac_status" >&5
14532 (exit $ac_status); }; }; then
14533 cf_cv_netbsd_form_h=yes
14536 echo "$as_me: failed program was:" >&5
14537 cat conftest.$ac_ext >&5
14538 cf_cv_netbsd_form_h=no
14540 rm -f conftest.$ac_objext conftest.$ac_ext
14543 echo "$as_me:14543: result: $cf_cv_netbsd_form_h" >&5
14544 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
14546 test "$cf_cv_netbsd_form_h" = yes &&
14547 cat >>confdefs.h <<\EOF
14548 #define HAVE_NETBSD_FORM_H 1
14554 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
14555 echo "$as_me:14555: checking for form_driver in -lform$cf_cv_libtype" >&5
14556 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
14557 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
14560 ac_check_lib_save_LIBS=$LIBS
14561 LIBS="-lform$cf_cv_libtype $LIBS"
14562 cat >conftest.$ac_ext <<_ACEOF
14563 #line 14563 "configure"
14564 #include "confdefs.h"
14566 /* Override any gcc2 internal prototype to avoid an error. */
14570 /* We use char because int might match the return type of a gcc2
14571 builtin and then its argument prototype would still apply. */
14572 char form_driver ();
14581 rm -f conftest.$ac_objext conftest$ac_exeext
14582 if { (eval echo "$as_me:14582: \"$ac_link\"") >&5
14583 (eval $ac_link) 2>&5
14585 echo "$as_me:14585: \$? = $ac_status" >&5
14586 (exit $ac_status); } &&
14587 { ac_try='test -s conftest$ac_exeext'
14588 { (eval echo "$as_me:14588: \"$ac_try\"") >&5
14589 (eval $ac_try) 2>&5
14591 echo "$as_me:14591: \$? = $ac_status" >&5
14592 (exit $ac_status); }; }; then
14593 eval "$as_ac_Lib=yes"
14595 echo "$as_me: failed program was:" >&5
14596 cat conftest.$ac_ext >&5
14597 eval "$as_ac_Lib=no"
14599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14600 LIBS=$ac_check_lib_save_LIBS
14602 echo "$as_me:14602: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14603 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14604 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14606 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14608 cf_add_libs="-lform$cf_cv_libtype"
14609 # Filter out duplicates - this happens with badly-designed ".pc" files...
14610 for cf_add_1lib in $LIBS
14612 for cf_add_2lib in $cf_add_libs
14614 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14620 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14622 LIBS="$cf_add_libs"
14624 cat >>confdefs.h <<EOF
14625 #define $cf_upper 1
14630 cf_curses_headers="$cf_curses_headers form.h"
14633 # look for curses-related headers
14635 for ac_header in $cf_curses_headers
14637 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14638 echo "$as_me:14638: checking for $ac_header" >&5
14639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14641 echo $ECHO_N "(cached) $ECHO_C" >&6
14643 cat >conftest.$ac_ext <<_ACEOF
14644 #line 14644 "configure"
14645 #include "confdefs.h"
14646 #include <$ac_header>
14648 if { (eval echo "$as_me:14648: \"$ac_cpp conftest.$ac_ext\"") >&5
14649 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14651 egrep -v '^ *\+' conftest.er1 >conftest.err
14653 cat conftest.err >&5
14654 echo "$as_me:14654: \$? = $ac_status" >&5
14655 (exit $ac_status); } >/dev/null; then
14656 if test -s conftest.err; then
14657 ac_cpp_err=$ac_c_preproc_warn_flag
14664 if test -z "$ac_cpp_err"; then
14665 eval "$as_ac_Header=yes"
14667 echo "$as_me: failed program was:" >&5
14668 cat conftest.$ac_ext >&5
14669 eval "$as_ac_Header=no"
14671 rm -f conftest.err conftest.$ac_ext
14673 echo "$as_me:14673: result: `eval echo '${'$as_ac_Header'}'`" >&5
14674 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14675 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14676 cat >>confdefs.h <<EOF
14677 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14683 echo "$as_me:14683: checking for ANSI C header files" >&5
14684 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14685 if test "${ac_cv_header_stdc+set}" = set; then
14686 echo $ECHO_N "(cached) $ECHO_C" >&6
14688 cat >conftest.$ac_ext <<_ACEOF
14689 #line 14689 "configure"
14690 #include "confdefs.h"
14691 #include <stdlib.h>
14692 #include <stdarg.h>
14693 #include <string.h>
14697 if { (eval echo "$as_me:14697: \"$ac_cpp conftest.$ac_ext\"") >&5
14698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14700 egrep -v '^ *\+' conftest.er1 >conftest.err
14702 cat conftest.err >&5
14703 echo "$as_me:14703: \$? = $ac_status" >&5
14704 (exit $ac_status); } >/dev/null; then
14705 if test -s conftest.err; then
14706 ac_cpp_err=$ac_c_preproc_warn_flag
14713 if test -z "$ac_cpp_err"; then
14714 ac_cv_header_stdc=yes
14716 echo "$as_me: failed program was:" >&5
14717 cat conftest.$ac_ext >&5
14718 ac_cv_header_stdc=no
14720 rm -f conftest.err conftest.$ac_ext
14722 if test $ac_cv_header_stdc = yes; then
14723 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14724 cat >conftest.$ac_ext <<_ACEOF
14725 #line 14725 "configure"
14726 #include "confdefs.h"
14727 #include <string.h>
14730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14731 egrep "memchr" >/dev/null 2>&1; then
14734 ac_cv_header_stdc=no
14740 if test $ac_cv_header_stdc = yes; then
14741 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14742 cat >conftest.$ac_ext <<_ACEOF
14743 #line 14743 "configure"
14744 #include "confdefs.h"
14745 #include <stdlib.h>
14748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14749 egrep "free" >/dev/null 2>&1; then
14752 ac_cv_header_stdc=no
14758 if test $ac_cv_header_stdc = yes; then
14759 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14760 if test "$cross_compiling" = yes; then
14763 cat >conftest.$ac_ext <<_ACEOF
14764 #line 14764 "configure"
14765 #include "confdefs.h"
14767 #if ((' ' & 0x0FF) == 0x020)
14768 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14769 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14771 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14772 || ('j' <= (c) && (c) <= 'r') \
14773 || ('s' <= (c) && (c) <= 'z'))
14774 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14777 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14782 for (i = 0; i < 256; i++)
14783 if (XOR (islower (i), ISLOWER (i))
14784 || toupper (i) != TOUPPER (i))
14785 $ac_main_return(2);
14786 $ac_main_return (0);
14789 rm -f conftest$ac_exeext
14790 if { (eval echo "$as_me:14790: \"$ac_link\"") >&5
14791 (eval $ac_link) 2>&5
14793 echo "$as_me:14793: \$? = $ac_status" >&5
14794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14795 { (eval echo "$as_me:14795: \"$ac_try\"") >&5
14796 (eval $ac_try) 2>&5
14798 echo "$as_me:14798: \$? = $ac_status" >&5
14799 (exit $ac_status); }; }; then
14802 echo "$as_me: program exited with status $ac_status" >&5
14803 echo "$as_me: failed program was:" >&5
14804 cat conftest.$ac_ext >&5
14805 ac_cv_header_stdc=no
14807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14811 echo "$as_me:14811: result: $ac_cv_header_stdc" >&5
14812 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14813 if test $ac_cv_header_stdc = yes; then
14815 cat >>confdefs.h <<\EOF
14816 #define STDC_HEADERS 1
14821 echo "$as_me:14821: checking whether time.h and sys/time.h may both be included" >&5
14822 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14823 if test "${ac_cv_header_time+set}" = set; then
14824 echo $ECHO_N "(cached) $ECHO_C" >&6
14826 cat >conftest.$ac_ext <<_ACEOF
14827 #line 14827 "configure"
14828 #include "confdefs.h"
14829 #include <sys/types.h>
14830 #include <sys/time.h>
14836 if ((struct tm *) 0)
14842 rm -f conftest.$ac_objext
14843 if { (eval echo "$as_me:14843: \"$ac_compile\"") >&5
14844 (eval $ac_compile) 2>&5
14846 echo "$as_me:14846: \$? = $ac_status" >&5
14847 (exit $ac_status); } &&
14848 { ac_try='test -s conftest.$ac_objext'
14849 { (eval echo "$as_me:14849: \"$ac_try\"") >&5
14850 (eval $ac_try) 2>&5
14852 echo "$as_me:14852: \$? = $ac_status" >&5
14853 (exit $ac_status); }; }; then
14854 ac_cv_header_time=yes
14856 echo "$as_me: failed program was:" >&5
14857 cat conftest.$ac_ext >&5
14858 ac_cv_header_time=no
14860 rm -f conftest.$ac_objext conftest.$ac_ext
14862 echo "$as_me:14862: result: $ac_cv_header_time" >&5
14863 echo "${ECHO_T}$ac_cv_header_time" >&6
14864 if test $ac_cv_header_time = yes; then
14866 cat >>confdefs.h <<\EOF
14867 #define TIME_WITH_SYS_TIME 1
14885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14886 echo "$as_me:14886: checking for $ac_header" >&5
14887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14889 echo $ECHO_N "(cached) $ECHO_C" >&6
14891 cat >conftest.$ac_ext <<_ACEOF
14892 #line 14892 "configure"
14893 #include "confdefs.h"
14894 #include <$ac_header>
14896 if { (eval echo "$as_me:14896: \"$ac_cpp conftest.$ac_ext\"") >&5
14897 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14899 egrep -v '^ *\+' conftest.er1 >conftest.err
14901 cat conftest.err >&5
14902 echo "$as_me:14902: \$? = $ac_status" >&5
14903 (exit $ac_status); } >/dev/null; then
14904 if test -s conftest.err; then
14905 ac_cpp_err=$ac_c_preproc_warn_flag
14912 if test -z "$ac_cpp_err"; then
14913 eval "$as_ac_Header=yes"
14915 echo "$as_me: failed program was:" >&5
14916 cat conftest.$ac_ext >&5
14917 eval "$as_ac_Header=no"
14919 rm -f conftest.err conftest.$ac_ext
14921 echo "$as_me:14921: result: `eval echo '${'$as_ac_Header'}'`" >&5
14922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14923 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14924 cat >>confdefs.h <<EOF
14925 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14931 for ac_header in unistd.h getopt.h
14933 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14934 echo "$as_me:14934: checking for $ac_header" >&5
14935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14937 echo $ECHO_N "(cached) $ECHO_C" >&6
14939 cat >conftest.$ac_ext <<_ACEOF
14940 #line 14940 "configure"
14941 #include "confdefs.h"
14942 #include <$ac_header>
14944 if { (eval echo "$as_me:14944: \"$ac_cpp conftest.$ac_ext\"") >&5
14945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14947 egrep -v '^ *\+' conftest.er1 >conftest.err
14949 cat conftest.err >&5
14950 echo "$as_me:14950: \$? = $ac_status" >&5
14951 (exit $ac_status); } >/dev/null; then
14952 if test -s conftest.err; then
14953 ac_cpp_err=$ac_c_preproc_warn_flag
14960 if test -z "$ac_cpp_err"; then
14961 eval "$as_ac_Header=yes"
14963 echo "$as_me: failed program was:" >&5
14964 cat conftest.$ac_ext >&5
14965 eval "$as_ac_Header=no"
14967 rm -f conftest.err conftest.$ac_ext
14969 echo "$as_me:14969: result: `eval echo '${'$as_ac_Header'}'`" >&5
14970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14972 cat >>confdefs.h <<EOF
14973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14979 echo "$as_me:14979: checking for header declaring getopt variables" >&5
14980 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14981 if test "${cf_cv_getopt_header+set}" = set; then
14982 echo $ECHO_N "(cached) $ECHO_C" >&6
14985 cf_cv_getopt_header=none
14986 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14988 cat >conftest.$ac_ext <<_ACEOF
14989 #line 14989 "configure"
14990 #include "confdefs.h"
14992 #include <$cf_header>
14996 int x = optind; char *y = optarg
15001 rm -f conftest.$ac_objext
15002 if { (eval echo "$as_me:15002: \"$ac_compile\"") >&5
15003 (eval $ac_compile) 2>&5
15005 echo "$as_me:15005: \$? = $ac_status" >&5
15006 (exit $ac_status); } &&
15007 { ac_try='test -s conftest.$ac_objext'
15008 { (eval echo "$as_me:15008: \"$ac_try\"") >&5
15009 (eval $ac_try) 2>&5
15011 echo "$as_me:15011: \$? = $ac_status" >&5
15012 (exit $ac_status); }; }; then
15013 cf_cv_getopt_header=$cf_header
15016 echo "$as_me: failed program was:" >&5
15017 cat conftest.$ac_ext >&5
15019 rm -f conftest.$ac_objext conftest.$ac_ext
15023 echo "$as_me:15023: result: $cf_cv_getopt_header" >&5
15024 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15025 if test $cf_cv_getopt_header != none ; then
15027 cat >>confdefs.h <<\EOF
15028 #define HAVE_GETOPT_HEADER 1
15032 if test $cf_cv_getopt_header = getopt.h ; then
15034 cat >>confdefs.h <<\EOF
15035 #define NEED_GETOPT_H 1
15047 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15048 echo "$as_me:15048: checking for $ac_func" >&5
15049 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15050 if eval "test \"\${$as_ac_var+set}\" = set"; then
15051 echo $ECHO_N "(cached) $ECHO_C" >&6
15053 cat >conftest.$ac_ext <<_ACEOF
15054 #line 15054 "configure"
15055 #include "confdefs.h"
15056 /* System header to define __stub macros and hopefully few prototypes,
15057 which can conflict with char $ac_func (); below. */
15058 #include <assert.h>
15059 /* Override any gcc2 internal prototype to avoid an error. */
15063 /* We use char because int might match the return type of a gcc2
15064 builtin and then its argument prototype would still apply. */
15071 /* The GNU C library defines this for functions which it implements
15072 to always fail with ENOSYS. Some functions are actually named
15073 something starting with __ and the normal name is an alias. */
15074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15077 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15084 rm -f conftest.$ac_objext conftest$ac_exeext
15085 if { (eval echo "$as_me:15085: \"$ac_link\"") >&5
15086 (eval $ac_link) 2>&5
15088 echo "$as_me:15088: \$? = $ac_status" >&5
15089 (exit $ac_status); } &&
15090 { ac_try='test -s conftest$ac_exeext'
15091 { (eval echo "$as_me:15091: \"$ac_try\"") >&5
15092 (eval $ac_try) 2>&5
15094 echo "$as_me:15094: \$? = $ac_status" >&5
15095 (exit $ac_status); }; }; then
15096 eval "$as_ac_var=yes"
15098 echo "$as_me: failed program was:" >&5
15099 cat conftest.$ac_ext >&5
15100 eval "$as_ac_var=no"
15102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15104 echo "$as_me:15104: result: `eval echo '${'$as_ac_var'}'`" >&5
15105 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15106 if test `eval echo '${'$as_ac_var'}'` = yes; then
15107 cat >>confdefs.h <<EOF
15108 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15114 if test "x$ac_cv_func_getopt" = xno; then
15115 { { echo "$as_me:15115: error: getopt is required for building programs" >&5
15116 echo "$as_me: error: getopt is required for building programs" >&2;}
15117 { (exit 1); exit 1; }; }
15120 if test "$cf_enable_widec" = yes; then
15133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15134 echo "$as_me:15134: checking for $ac_func" >&5
15135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15136 if eval "test \"\${$as_ac_var+set}\" = set"; then
15137 echo $ECHO_N "(cached) $ECHO_C" >&6
15139 cat >conftest.$ac_ext <<_ACEOF
15140 #line 15140 "configure"
15141 #include "confdefs.h"
15142 /* System header to define __stub macros and hopefully few prototypes,
15143 which can conflict with char $ac_func (); below. */
15144 #include <assert.h>
15145 /* Override any gcc2 internal prototype to avoid an error. */
15149 /* We use char because int might match the return type of a gcc2
15150 builtin and then its argument prototype would still apply. */
15157 /* The GNU C library defines this for functions which it implements
15158 to always fail with ENOSYS. Some functions are actually named
15159 something starting with __ and the normal name is an alias. */
15160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15163 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15170 rm -f conftest.$ac_objext conftest$ac_exeext
15171 if { (eval echo "$as_me:15171: \"$ac_link\"") >&5
15172 (eval $ac_link) 2>&5
15174 echo "$as_me:15174: \$? = $ac_status" >&5
15175 (exit $ac_status); } &&
15176 { ac_try='test -s conftest$ac_exeext'
15177 { (eval echo "$as_me:15177: \"$ac_try\"") >&5
15178 (eval $ac_try) 2>&5
15180 echo "$as_me:15180: \$? = $ac_status" >&5
15181 (exit $ac_status); }; }; then
15182 eval "$as_ac_var=yes"
15184 echo "$as_me: failed program was:" >&5
15185 cat conftest.$ac_ext >&5
15186 eval "$as_ac_var=no"
15188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15190 echo "$as_me:15190: result: `eval echo '${'$as_ac_var'}'`" >&5
15191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15192 if test `eval echo '${'$as_ac_var'}'` = yes; then
15193 cat >>confdefs.h <<EOF
15194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15202 echo "$as_me:15202: checking definition to turn on extended curses functions" >&5
15203 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
15204 if test "${cf_cv_need_xopen_extension+set}" = set; then
15205 echo $ECHO_N "(cached) $ECHO_C" >&6
15208 cf_cv_need_xopen_extension=unknown
15209 cat >conftest.$ac_ext <<_ACEOF
15210 #line 15210 "configure"
15211 #include "confdefs.h"
15213 #include <stdlib.h>
15214 #include <${cf_cv_ncurses_header:-curses.h}>
15219 #if defined(NCURSES_VERSION_PATCH)
15220 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
15224 #ifdef NCURSES_VERSION
15226 int check2 = curs_set((int)sizeof(check));
15228 long x = winnstr(stdscr, "", 0);
15230 getbegyx(stdscr, y1, x1)
15235 rm -f conftest.$ac_objext conftest$ac_exeext
15236 if { (eval echo "$as_me:15236: \"$ac_link\"") >&5
15237 (eval $ac_link) 2>&5
15239 echo "$as_me:15239: \$? = $ac_status" >&5
15240 (exit $ac_status); } &&
15241 { ac_try='test -s conftest$ac_exeext'
15242 { (eval echo "$as_me:15242: \"$ac_try\"") >&5
15243 (eval $ac_try) 2>&5
15245 echo "$as_me:15245: \$? = $ac_status" >&5
15246 (exit $ac_status); }; }; then
15247 cf_cv_need_xopen_extension=none
15249 echo "$as_me: failed program was:" >&5
15250 cat conftest.$ac_ext >&5
15252 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
15254 cat >conftest.$ac_ext <<_ACEOF
15255 #line 15255 "configure"
15256 #include "confdefs.h"
15258 #define $cf_try_xopen_extension 1
15259 #include <stdlib.h>
15260 #include <${cf_cv_ncurses_header:-curses.h}>
15265 #ifdef NCURSES_VERSION
15267 int check2 = curs_set((int)sizeof(check));
15269 long x = winnstr(stdscr, "", 0);
15271 getbegyx(stdscr, y1, x1)
15276 rm -f conftest.$ac_objext conftest$ac_exeext
15277 if { (eval echo "$as_me:15277: \"$ac_link\"") >&5
15278 (eval $ac_link) 2>&5
15280 echo "$as_me:15280: \$? = $ac_status" >&5
15281 (exit $ac_status); } &&
15282 { ac_try='test -s conftest$ac_exeext'
15283 { (eval echo "$as_me:15283: \"$ac_try\"") >&5
15284 (eval $ac_try) 2>&5
15286 echo "$as_me:15286: \$? = $ac_status" >&5
15287 (exit $ac_status); }; }; then
15288 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
15290 echo "$as_me: failed program was:" >&5
15291 cat conftest.$ac_ext >&5
15293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15300 echo "$as_me:15300: result: $cf_cv_need_xopen_extension" >&5
15301 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
15303 case $cf_cv_need_xopen_extension in
15305 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
15309 echo "$as_me:15309: checking for term.h" >&5
15310 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
15311 if test "${cf_cv_term_header+set}" = set; then
15312 echo $ECHO_N "(cached) $ECHO_C" >&6
15315 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
15316 # for <term.h> if we do not find the variant.
15318 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
15320 case ${cf_cv_ncurses_header:-curses.h} in
15322 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
15323 cf_header_list="$cf_header_item $cf_header_list"
15327 for cf_header in $cf_header_list
15329 cat >conftest.$ac_ext <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15333 #include <${cf_cv_ncurses_header:-curses.h}>
15334 #include <${cf_header}>
15343 rm -f conftest.$ac_objext
15344 if { (eval echo "$as_me:15344: \"$ac_compile\"") >&5
15345 (eval $ac_compile) 2>&5
15347 echo "$as_me:15347: \$? = $ac_status" >&5
15348 (exit $ac_status); } &&
15349 { ac_try='test -s conftest.$ac_objext'
15350 { (eval echo "$as_me:15350: \"$ac_try\"") >&5
15351 (eval $ac_try) 2>&5
15353 echo "$as_me:15353: \$? = $ac_status" >&5
15354 (exit $ac_status); }; }; then
15355 cf_cv_term_header=$cf_header
15358 echo "$as_me: failed program was:" >&5
15359 cat conftest.$ac_ext >&5
15360 cf_cv_term_header=no
15362 rm -f conftest.$ac_objext conftest.$ac_ext
15365 case $cf_cv_term_header in
15367 # If curses is ncurses, some packagers still mess it up by trying to make
15368 # us use GNU termcap. This handles the most common case.
15369 for cf_header in ncurses/term.h ncursesw/term.h
15371 cat >conftest.$ac_ext <<_ACEOF
15372 #line 15372 "configure"
15373 #include "confdefs.h"
15375 #include <${cf_cv_ncurses_header:-curses.h}>
15376 #ifdef NCURSES_VERSION
15377 #include <${cf_header}>
15389 rm -f conftest.$ac_objext
15390 if { (eval echo "$as_me:15390: \"$ac_compile\"") >&5
15391 (eval $ac_compile) 2>&5
15393 echo "$as_me:15393: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
15395 { ac_try='test -s conftest.$ac_objext'
15396 { (eval echo "$as_me:15396: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15399 echo "$as_me:15399: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
15401 cf_cv_term_header=$cf_header
15404 echo "$as_me: failed program was:" >&5
15405 cat conftest.$ac_ext >&5
15406 cf_cv_term_header=no
15408 rm -f conftest.$ac_objext conftest.$ac_ext
15414 echo "$as_me:15414: result: $cf_cv_term_header" >&5
15415 echo "${ECHO_T}$cf_cv_term_header" >&6
15417 case $cf_cv_term_header in
15420 cat >>confdefs.h <<\EOF
15421 #define HAVE_TERM_H 1
15427 cat >>confdefs.h <<\EOF
15428 #define HAVE_NCURSES_TERM_H 1
15434 cat >>confdefs.h <<\EOF
15435 #define HAVE_NCURSESW_TERM_H 1
15441 echo "$as_me:15441: checking for unctrl.h" >&5
15442 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
15443 if test "${cf_cv_unctrl_header+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
15447 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
15448 # for <unctrl.h> if we do not find the variant.
15450 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
15452 case ${cf_cv_ncurses_header:-curses.h} in
15454 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
15455 cf_header_list="$cf_header_item $cf_header_list"
15459 for cf_header in $cf_header_list
15461 cat >conftest.$ac_ext <<_ACEOF
15462 #line 15462 "configure"
15463 #include "confdefs.h"
15465 #include <${cf_cv_ncurses_header:-curses.h}>
15466 #include <${cf_header}>
15475 rm -f conftest.$ac_objext
15476 if { (eval echo "$as_me:15476: \"$ac_compile\"") >&5
15477 (eval $ac_compile) 2>&5
15479 echo "$as_me:15479: \$? = $ac_status" >&5
15480 (exit $ac_status); } &&
15481 { ac_try='test -s conftest.$ac_objext'
15482 { (eval echo "$as_me:15482: \"$ac_try\"") >&5
15483 (eval $ac_try) 2>&5
15485 echo "$as_me:15485: \$? = $ac_status" >&5
15486 (exit $ac_status); }; }; then
15487 cf_cv_unctrl_header=$cf_header
15490 echo "$as_me: failed program was:" >&5
15491 cat conftest.$ac_ext >&5
15492 cf_cv_unctrl_header=no
15494 rm -f conftest.$ac_objext conftest.$ac_ext
15498 echo "$as_me:15498: result: $cf_cv_unctrl_header" >&5
15499 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
15501 case $cf_cv_unctrl_header in
15503 { echo "$as_me:15503: WARNING: unctrl.h header not found" >&5
15504 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
15508 case $cf_cv_unctrl_header in
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_UNCTRL_H 1
15518 cat >>confdefs.h <<\EOF
15519 #define HAVE_NCURSES_UNCTRL_H 1
15523 (ncursesw/unctrl.h)
15525 cat >>confdefs.h <<\EOF
15526 #define HAVE_NCURSESW_UNCTRL_H 1
15534 assume_default_colors \
15549 init_extended_color \
15571 use_default_colors \
15573 use_extended_names \
15589 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15591 echo "$as_me:15591: checking for ${cf_func}" >&5
15592 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15594 echo "${as_me:-configure}:15594: testing ${cf_func} ..." 1>&5
15596 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15597 echo $ECHO_N "(cached) $ECHO_C" >&6
15600 eval cf_result='$ac_cv_func_'$cf_func
15601 if test ".$cf_result" != ".no"; then
15602 cat >conftest.$ac_ext <<_ACEOF
15603 #line 15603 "configure"
15604 #include "confdefs.h"
15606 #ifdef HAVE_XCURSES
15607 #include <xcurses.h>
15608 char * XCursesProgramName = "test";
15610 #include <${cf_cv_ncurses_header:-curses.h}>
15611 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15612 #include <ncursesw/term.h>
15613 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15614 #include <ncurses/term.h>
15615 #elif defined(HAVE_TERM_H)
15625 long foo = (long)(&${cf_func});
15626 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
15627 if (foo + 1234 > 5678)
15628 ${cf_cv_main_return:-return}(foo);
15635 rm -f conftest.$ac_objext conftest$ac_exeext
15636 if { (eval echo "$as_me:15636: \"$ac_link\"") >&5
15637 (eval $ac_link) 2>&5
15639 echo "$as_me:15639: \$? = $ac_status" >&5
15640 (exit $ac_status); } &&
15641 { ac_try='test -s conftest$ac_exeext'
15642 { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15645 echo "$as_me:15645: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
15649 echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15655 eval 'cf_cv_func_'$cf_func'=$cf_result'
15659 # use the computed/retrieved cache-value:
15660 eval 'cf_result=$cf_cv_func_'$cf_func
15661 echo "$as_me:15661: result: $cf_result" >&5
15662 echo "${ECHO_T}$cf_result" >&6
15663 if test $cf_result != no; then
15664 cat >>confdefs.h <<EOF
15665 #define HAVE_${cf_tr_func} 1
15671 for cf_func in tputs
15674 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15676 echo "$as_me:15676: checking for ${cf_func}" >&5
15677 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15679 echo "${as_me:-configure}:15679: testing ${cf_func} ..." 1>&5
15681 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15682 echo $ECHO_N "(cached) $ECHO_C" >&6
15685 eval cf_result='$ac_cv_func_'$cf_func
15686 if test ".$cf_result" != ".no"; then
15687 cat >conftest.$ac_ext <<_ACEOF
15688 #line 15688 "configure"
15689 #include "confdefs.h"
15691 #ifdef HAVE_XCURSES
15692 #include <xcurses.h>
15693 char * XCursesProgramName = "test";
15695 #include <${cf_cv_ncurses_header:-curses.h}>
15696 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15697 #include <ncursesw/term.h>
15698 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15699 #include <ncurses/term.h>
15700 #elif defined(HAVE_TERM_H)
15710 long foo = (long)(&${cf_func});
15711 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
15712 if (foo + 1234 > 5678)
15713 ${cf_cv_main_return:-return}(foo);
15720 rm -f conftest.$ac_objext conftest$ac_exeext
15721 if { (eval echo "$as_me:15721: \"$ac_link\"") >&5
15722 (eval $ac_link) 2>&5
15724 echo "$as_me:15724: \$? = $ac_status" >&5
15725 (exit $ac_status); } &&
15726 { ac_try='test -s conftest$ac_exeext'
15727 { (eval echo "$as_me:15727: \"$ac_try\"") >&5
15728 (eval $ac_try) 2>&5
15730 echo "$as_me:15730: \$? = $ac_status" >&5
15731 (exit $ac_status); }; }; then
15734 echo "$as_me: failed program was:" >&5
15735 cat conftest.$ac_ext >&5
15738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15740 eval 'cf_cv_func_'$cf_func'=$cf_result'
15744 # use the computed/retrieved cache-value:
15745 eval 'cf_result=$cf_cv_func_'$cf_func
15746 echo "$as_me:15746: result: $cf_result" >&5
15747 echo "${ECHO_T}$cf_result" >&6
15748 if test $cf_result != no; then
15749 cat >>confdefs.h <<EOF
15750 #define HAVE_${cf_tr_func} 1
15756 if test x$cf_cv_func_tputs = xyes
15759 for cf_arg in int char
15761 for cf_ret in int void
15763 if test $cf_ret = void
15765 cf_return="/* nothing */"
15767 cf_return="return value"
15769 cat >conftest.$ac_ext <<_ACEOF
15770 #line 15770 "configure"
15771 #include "confdefs.h"
15773 #include <${cf_cv_ncurses_header:-curses.h}>
15774 #include <$cf_cv_term_header>
15776 static $cf_ret outc($cf_arg value) { $cf_return; }
15782 tputs("hello", 0, outc);
15783 ${cf_cv_main_return:-return}(0);
15789 rm -f conftest.$ac_objext
15790 if { (eval echo "$as_me:15790: \"$ac_compile\"") >&5
15791 (eval $ac_compile) 2>&5
15793 echo "$as_me:15793: \$? = $ac_status" >&5
15794 (exit $ac_status); } &&
15795 { ac_try='test -s conftest.$ac_objext'
15796 { (eval echo "$as_me:15796: \"$ac_try\"") >&5
15797 (eval $ac_try) 2>&5
15799 echo "$as_me:15799: \$? = $ac_status" >&5
15800 (exit $ac_status); }; }; then
15802 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
15804 echo "${as_me:-configure}:15804: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
15806 cat >>confdefs.h <<EOF
15807 #define TPUTS_ARG $cf_arg
15808 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
15809 #define TPUTS_RETURN(value) $cf_return
15815 echo "$as_me: failed program was:" >&5
15816 cat conftest.$ac_ext >&5
15818 rm -f conftest.$ac_objext conftest.$ac_ext
15820 test $cf_done = yes && break
15824 echo "$as_me:15824: checking for ncurses extended functions" >&5
15825 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
15826 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
15827 echo $ECHO_N "(cached) $ECHO_C" >&6
15830 cat >conftest.$ac_ext <<_ACEOF
15831 #line 15831 "configure"
15832 #include "confdefs.h"
15834 #include <${cf_cv_ncurses_header:-curses.h}>
15839 int x = NCURSES_EXT_FUNCS
15845 rm -f conftest.$ac_objext
15846 if { (eval echo "$as_me:15846: \"$ac_compile\"") >&5
15847 (eval $ac_compile) 2>&5
15849 echo "$as_me:15849: \$? = $ac_status" >&5
15850 (exit $ac_status); } &&
15851 { ac_try='test -s conftest.$ac_objext'
15852 { (eval echo "$as_me:15852: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15855 echo "$as_me:15855: \$? = $ac_status" >&5
15856 (exit $ac_status); }; }; then
15857 cf_cv_ncurses_ext_funcs=defined
15859 echo "$as_me: failed program was:" >&5
15860 cat conftest.$ac_ext >&5
15862 cat >conftest.$ac_ext <<_ACEOF
15863 #line 15863 "configure"
15864 #include "confdefs.h"
15866 #include <${cf_cv_ncurses_header:-curses.h}>
15871 (void) assume_default_colors (0, 0);
15872 (void) curses_version ();
15873 (void) define_key (0, 0);
15874 (void) is_term_resized (0, 0);
15875 (void) key_defined (0);
15876 (void) keybound (0, 0);
15877 (void) keyok (0, 0);
15878 (void) resize_term (0, 0);
15879 (void) resizeterm (0, 0);
15880 (void) use_default_colors ();
15881 (void) use_extended_names (0);
15882 (void) wresize (0, 0, 0);
15887 rm -f conftest.$ac_objext conftest$ac_exeext
15888 if { (eval echo "$as_me:15888: \"$ac_link\"") >&5
15889 (eval $ac_link) 2>&5
15891 echo "$as_me:15891: \$? = $ac_status" >&5
15892 (exit $ac_status); } &&
15893 { ac_try='test -s conftest$ac_exeext'
15894 { (eval echo "$as_me:15894: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5
15897 echo "$as_me:15897: \$? = $ac_status" >&5
15898 (exit $ac_status); }; }; then
15899 cf_cv_ncurses_ext_funcs=yes
15901 echo "$as_me: failed program was:" >&5
15902 cat conftest.$ac_ext >&5
15903 cf_cv_ncurses_ext_funcs=no
15905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15908 rm -f conftest.$ac_objext conftest.$ac_ext
15911 echo "$as_me:15911: result: $cf_cv_ncurses_ext_funcs" >&5
15912 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
15913 test "$cf_cv_ncurses_ext_funcs" = yes &&
15914 cat >>confdefs.h <<\EOF
15915 #define NCURSES_EXT_FUNCS 1
15918 if test "$cf_enable_widec" = yes
15920 # workaround for systems with ncurses before 20111029, due to change of
15921 # feature test macro from _XPG5 to _XOPEN_SOURCE
15922 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
15925 echo "$as_me:15925: checking if _XPG5 should be defined to enable wide-characters" >&5
15926 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
15928 cat >conftest.$ac_ext <<_ACEOF
15929 #line 15929 "configure"
15930 #include "confdefs.h"
15932 #include <${cf_cv_ncurses_header:-curses.h}>
15941 rm -f conftest.$ac_objext
15942 if { (eval echo "$as_me:15942: \"$ac_compile\"") >&5
15943 (eval $ac_compile) 2>&5
15945 echo "$as_me:15945: \$? = $ac_status" >&5
15946 (exit $ac_status); } &&
15947 { ac_try='test -s conftest.$ac_objext'
15948 { (eval echo "$as_me:15948: \"$ac_try\"") >&5
15949 (eval $ac_try) 2>&5
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit $ac_status); }; }; then
15955 echo "$as_me: failed program was:" >&5
15956 cat conftest.$ac_ext >&5
15957 cf_save_cppflags="$CPPFLAGS"
15958 CPPFLAGS="$CPPFLAGS -D_XPG5"
15959 cat >conftest.$ac_ext <<_ACEOF
15960 #line 15960 "configure"
15961 #include "confdefs.h"
15963 #include <${cf_cv_ncurses_header:-curses.h}>
15972 rm -f conftest.$ac_objext
15973 if { (eval echo "$as_me:15973: \"$ac_compile\"") >&5
15974 (eval $ac_compile) 2>&5
15976 echo "$as_me:15976: \$? = $ac_status" >&5
15977 (exit $ac_status); } &&
15978 { ac_try='test -s conftest.$ac_objext'
15979 { (eval echo "$as_me:15979: \"$ac_try\"") >&5
15980 (eval $ac_try) 2>&5
15982 echo "$as_me:15982: \$? = $ac_status" >&5
15983 (exit $ac_status); }; }; then
15986 echo "$as_me: failed program was:" >&5
15987 cat conftest.$ac_ext >&5
15989 rm -f conftest.$ac_objext conftest.$ac_ext
15990 CPPFLAGS="$cf_save_cppflags"
15992 rm -f conftest.$ac_objext conftest.$ac_ext
15993 echo "$as_me:15993: result: $cf_define_xpg5" >&5
15994 echo "${ECHO_T}$cf_define_xpg5" >&6
15996 if test "$cf_define_xpg5" = yes
15998 CPPFLAGS="$CPPFLAGS -D_XPG5"
16002 echo "$as_me:16002: checking for wide-character functions" >&5
16003 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
16004 if test "${cf_cv_widechar_funcs+set}" = set; then
16005 echo $ECHO_N "(cached) $ECHO_C" >&6
16008 cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16012 #include <${cf_cv_ncurses_header:-curses.h}>
16017 static wchar_t src_wchar[2];
16018 static cchar_t dst_cchar;
16019 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
16025 rm -f conftest.$ac_objext conftest$ac_exeext
16026 if { (eval echo "$as_me:16026: \"$ac_link\"") >&5
16027 (eval $ac_link) 2>&5
16029 echo "$as_me:16029: \$? = $ac_status" >&5
16030 (exit $ac_status); } &&
16031 { ac_try='test -s conftest$ac_exeext'
16032 { (eval echo "$as_me:16032: \"$ac_try\"") >&5
16033 (eval $ac_try) 2>&5
16035 echo "$as_me:16035: \$? = $ac_status" >&5
16036 (exit $ac_status); }; }; then
16037 cf_cv_widechar_funcs=yes
16039 echo "$as_me: failed program was:" >&5
16040 cat conftest.$ac_ext >&5
16041 cf_cv_widechar_funcs=no
16043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16046 echo "$as_me:16046: result: $cf_cv_widechar_funcs" >&5
16047 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
16048 if test "$cf_cv_widechar_funcs" != no ; then
16050 cat >>confdefs.h <<\EOF
16051 #define USE_WIDEC_SUPPORT 1
16055 cat >>confdefs.h <<\EOF
16056 #define USE_WIDEC_SUPPORT 0
16061 cat >>confdefs.h <<\EOF
16062 #define USE_WIDEC_SUPPORT 0
16067 echo "$as_me:16067: checking if $cf_cv_screen library uses pthreads" >&5
16068 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
16069 if test "${cf_cv_use_pthreads+set}" = set; then
16070 echo $ECHO_N "(cached) $ECHO_C" >&6
16073 cat >conftest.$ac_ext <<_ACEOF
16074 #line 16074 "configure"
16075 #include "confdefs.h"
16077 #include <${cf_cv_ncurses_header:-curses.h}>
16078 extern void _nc_init_pthreads(void);
16085 _nc_init_pthreads();
16091 rm -f conftest.$ac_objext conftest$ac_exeext
16092 if { (eval echo "$as_me:16092: \"$ac_link\"") >&5
16093 (eval $ac_link) 2>&5
16095 echo "$as_me:16095: \$? = $ac_status" >&5
16096 (exit $ac_status); } &&
16097 { ac_try='test -s conftest$ac_exeext'
16098 { (eval echo "$as_me:16098: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16101 echo "$as_me:16101: \$? = $ac_status" >&5
16102 (exit $ac_status); }; }; then
16103 cf_cv_use_pthreads=yes
16105 echo "$as_me: failed program was:" >&5
16106 cat conftest.$ac_ext >&5
16107 cf_cv_use_pthreads=no
16109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16112 echo "$as_me:16112: result: $cf_cv_use_pthreads" >&5
16113 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
16114 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
16115 #define USE_PTHREADS 1
16118 echo "$as_me:16118: checking if sys/time.h works with sys/select.h" >&5
16119 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16120 if test "${cf_cv_sys_time_select+set}" = set; then
16121 echo $ECHO_N "(cached) $ECHO_C" >&6
16124 cat >conftest.$ac_ext <<_ACEOF
16125 #line 16125 "configure"
16126 #include "confdefs.h"
16128 #include <sys/types.h>
16129 #ifdef HAVE_SYS_TIME_H
16130 #include <sys/time.h>
16132 #ifdef HAVE_SYS_SELECT_H
16133 #include <sys/select.h>
16144 rm -f conftest.$ac_objext
16145 if { (eval echo "$as_me:16145: \"$ac_compile\"") >&5
16146 (eval $ac_compile) 2>&5
16148 echo "$as_me:16148: \$? = $ac_status" >&5
16149 (exit $ac_status); } &&
16150 { ac_try='test -s conftest.$ac_objext'
16151 { (eval echo "$as_me:16151: \"$ac_try\"") >&5
16152 (eval $ac_try) 2>&5
16154 echo "$as_me:16154: \$? = $ac_status" >&5
16155 (exit $ac_status); }; }; then
16156 cf_cv_sys_time_select=yes
16158 echo "$as_me: failed program was:" >&5
16159 cat conftest.$ac_ext >&5
16160 cf_cv_sys_time_select=no
16162 rm -f conftest.$ac_objext conftest.$ac_ext
16166 echo "$as_me:16166: result: $cf_cv_sys_time_select" >&5
16167 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16168 test "$cf_cv_sys_time_select" = yes &&
16169 cat >>confdefs.h <<\EOF
16170 #define HAVE_SYS_TIME_SELECT 1
16173 # special check for test/ditto.c
16175 echo "$as_me:16175: checking for openpty in -lutil" >&5
16176 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16177 if test "${ac_cv_lib_util_openpty+set}" = set; then
16178 echo $ECHO_N "(cached) $ECHO_C" >&6
16180 ac_check_lib_save_LIBS=$LIBS
16181 LIBS="-lutil $LIBS"
16182 cat >conftest.$ac_ext <<_ACEOF
16183 #line 16183 "configure"
16184 #include "confdefs.h"
16186 /* Override any gcc2 internal prototype to avoid an error. */
16190 /* We use char because int might match the return type of a gcc2
16191 builtin and then its argument prototype would still apply. */
16201 rm -f conftest.$ac_objext conftest$ac_exeext
16202 if { (eval echo "$as_me:16202: \"$ac_link\"") >&5
16203 (eval $ac_link) 2>&5
16205 echo "$as_me:16205: \$? = $ac_status" >&5
16206 (exit $ac_status); } &&
16207 { ac_try='test -s conftest$ac_exeext'
16208 { (eval echo "$as_me:16208: \"$ac_try\"") >&5
16209 (eval $ac_try) 2>&5
16211 echo "$as_me:16211: \$? = $ac_status" >&5
16212 (exit $ac_status); }; }; then
16213 ac_cv_lib_util_openpty=yes
16215 echo "$as_me: failed program was:" >&5
16216 cat conftest.$ac_ext >&5
16217 ac_cv_lib_util_openpty=no
16219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16220 LIBS=$ac_check_lib_save_LIBS
16222 echo "$as_me:16222: result: $ac_cv_lib_util_openpty" >&5
16223 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16224 if test $ac_cv_lib_util_openpty = yes; then
16230 echo "$as_me:16230: checking for openpty header" >&5
16231 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16232 if test "${cf_cv_func_openpty+set}" = set; then
16233 echo $ECHO_N "(cached) $ECHO_C" >&6
16236 cf_save_LIBS="$LIBS"
16237 test $cf_cv_lib_util = yes && {
16238 cf_add_libs="-lutil"
16239 # Filter out duplicates - this happens with badly-designed ".pc" files...
16240 for cf_add_1lib in $LIBS
16242 for cf_add_2lib in $cf_add_libs
16244 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16250 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16252 LIBS="$cf_add_libs"
16254 for cf_header in pty.h libutil.h util.h
16256 cat >conftest.$ac_ext <<_ACEOF
16257 #line 16257 "configure"
16258 #include "confdefs.h"
16260 #include <$cf_header>
16266 int x = openpty((int *)0, (int *)0, (char *)0,
16267 (struct termios *)0, (struct winsize *)0);
16273 rm -f conftest.$ac_objext conftest$ac_exeext
16274 if { (eval echo "$as_me:16274: \"$ac_link\"") >&5
16275 (eval $ac_link) 2>&5
16277 echo "$as_me:16277: \$? = $ac_status" >&5
16278 (exit $ac_status); } &&
16279 { ac_try='test -s conftest$ac_exeext'
16280 { (eval echo "$as_me:16280: \"$ac_try\"") >&5
16281 (eval $ac_try) 2>&5
16283 echo "$as_me:16283: \$? = $ac_status" >&5
16284 (exit $ac_status); }; }; then
16286 cf_cv_func_openpty=$cf_header
16290 echo "$as_me: failed program was:" >&5
16291 cat conftest.$ac_ext >&5
16293 cf_cv_func_openpty=no
16296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16298 LIBS="$cf_save_LIBS"
16301 echo "$as_me:16301: result: $cf_cv_func_openpty" >&5
16302 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16304 if test "$cf_cv_func_openpty" != no ; then
16306 cat >>confdefs.h <<EOF
16307 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16310 cat >>confdefs.h <<\EOF
16311 #define USE_XTERM_PTY 1
16314 if test "x$cf_cv_lib_util" = xyes ; then
16316 cf_add_libs="-lutil"
16317 # Filter out duplicates - this happens with badly-designed ".pc" files...
16318 for cf_add_1lib in $TEST_LIBS
16320 for cf_add_2lib in $cf_add_libs
16322 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16328 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16330 TEST_LIBS="$cf_add_libs"
16335 echo "$as_me:16335: checking for function curses_version" >&5
16336 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
16337 if test "${cf_cv_func_curses_version+set}" = set; then
16338 echo $ECHO_N "(cached) $ECHO_C" >&6
16341 if test "$cross_compiling" = yes; then
16342 cf_cv_func_curses_version=unknown
16344 cat >conftest.$ac_ext <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16348 #include <${cf_cv_ncurses_header:-curses.h}>
16352 sprintf(temp, "%s\n", curses_version());
16353 ${cf_cv_main_return:-return}(0);
16357 rm -f conftest$ac_exeext
16358 if { (eval echo "$as_me:16358: \"$ac_link\"") >&5
16359 (eval $ac_link) 2>&5
16361 echo "$as_me:16361: \$? = $ac_status" >&5
16362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16363 { (eval echo "$as_me:16363: \"$ac_try\"") >&5
16364 (eval $ac_try) 2>&5
16366 echo "$as_me:16366: \$? = $ac_status" >&5
16367 (exit $ac_status); }; }; then
16368 cf_cv_func_curses_version=yes
16371 echo "$as_me: program exited with status $ac_status" >&5
16372 echo "$as_me: failed program was:" >&5
16373 cat conftest.$ac_ext >&5
16374 cf_cv_func_curses_version=no
16377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16381 echo "$as_me:16381: result: $cf_cv_func_curses_version" >&5
16382 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
16383 test "$cf_cv_func_curses_version" = yes &&
16384 cat >>confdefs.h <<\EOF
16385 #define HAVE_CURSES_VERSION 1
16388 echo "$as_me:16388: checking for alternate character set array" >&5
16389 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
16390 if test "${cf_cv_curses_acs_map+set}" = set; then
16391 echo $ECHO_N "(cached) $ECHO_C" >&6
16394 cf_cv_curses_acs_map=unknown
16395 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
16397 cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16401 #include <${cf_cv_ncurses_header:-curses.h}>
16407 $name['k'] = ACS_PLUS
16413 rm -f conftest.$ac_objext conftest$ac_exeext
16414 if { (eval echo "$as_me:16414: \"$ac_link\"") >&5
16415 (eval $ac_link) 2>&5
16417 echo "$as_me:16417: \$? = $ac_status" >&5
16418 (exit $ac_status); } &&
16419 { ac_try='test -s conftest$ac_exeext'
16420 { (eval echo "$as_me:16420: \"$ac_try\"") >&5
16421 (eval $ac_try) 2>&5
16423 echo "$as_me:16423: \$? = $ac_status" >&5
16424 (exit $ac_status); }; }; then
16425 cf_cv_curses_acs_map=$name; break
16427 echo "$as_me: failed program was:" >&5
16428 cat conftest.$ac_ext >&5
16430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16434 echo "$as_me:16434: result: $cf_cv_curses_acs_map" >&5
16435 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
16437 test "$cf_cv_curses_acs_map" != unknown &&
16438 cat >>confdefs.h <<EOF
16439 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
16442 if test "$cf_enable_widec" = yes; then
16444 echo "$as_me:16444: checking for wide alternate character set array" >&5
16445 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
16446 if test "${cf_cv_curses_wacs_map+set}" = set; then
16447 echo $ECHO_N "(cached) $ECHO_C" >&6
16450 cf_cv_curses_wacs_map=unknown
16451 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
16453 cat >conftest.$ac_ext <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16457 #ifndef _XOPEN_SOURCE_EXTENDED
16458 #define _XOPEN_SOURCE_EXTENDED
16460 #include <${cf_cv_ncurses_header:-curses.h}>
16464 void *foo = &($name['k'])
16469 rm -f conftest.$ac_objext conftest$ac_exeext
16470 if { (eval echo "$as_me:16470: \"$ac_link\"") >&5
16471 (eval $ac_link) 2>&5
16473 echo "$as_me:16473: \$? = $ac_status" >&5
16474 (exit $ac_status); } &&
16475 { ac_try='test -s conftest$ac_exeext'
16476 { (eval echo "$as_me:16476: \"$ac_try\"") >&5
16477 (eval $ac_try) 2>&5
16479 echo "$as_me:16479: \$? = $ac_status" >&5
16480 (exit $ac_status); }; }; then
16481 cf_cv_curses_wacs_map=$name
16484 echo "$as_me: failed program was:" >&5
16485 cat conftest.$ac_ext >&5
16487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16490 echo "$as_me:16490: result: $cf_cv_curses_wacs_map" >&5
16491 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
16493 test "$cf_cv_curses_wacs_map" != unknown &&
16494 cat >>confdefs.h <<EOF
16495 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
16498 echo "$as_me:16498: checking for wide alternate character constants" >&5
16499 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
16500 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
16501 echo $ECHO_N "(cached) $ECHO_C" >&6
16504 cf_cv_curses_wacs_symbols=no
16505 if test "$cf_cv_curses_wacs_map" != unknown
16507 cat >conftest.$ac_ext <<_ACEOF
16508 #line 16508 "configure"
16509 #include "confdefs.h"
16511 #ifndef _XOPEN_SOURCE_EXTENDED
16512 #define _XOPEN_SOURCE_EXTENDED
16514 #include <${cf_cv_ncurses_header:-curses.h}>
16518 cchar_t *foo = WACS_PLUS;
16519 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
16524 rm -f conftest.$ac_objext conftest$ac_exeext
16525 if { (eval echo "$as_me:16525: \"$ac_link\"") >&5
16526 (eval $ac_link) 2>&5
16528 echo "$as_me:16528: \$? = $ac_status" >&5
16529 (exit $ac_status); } &&
16530 { ac_try='test -s conftest$ac_exeext'
16531 { (eval echo "$as_me:16531: \"$ac_try\"") >&5
16532 (eval $ac_try) 2>&5
16534 echo "$as_me:16534: \$? = $ac_status" >&5
16535 (exit $ac_status); }; }; then
16536 cf_cv_curses_wacs_symbols=yes
16538 echo "$as_me: failed program was:" >&5
16539 cat conftest.$ac_ext >&5
16541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16547 #ifndef _XOPEN_SOURCE_EXTENDED
16548 #define _XOPEN_SOURCE_EXTENDED
16550 #include <${cf_cv_ncurses_header:-curses.h}>
16554 cchar_t *foo = WACS_PLUS
16559 rm -f conftest.$ac_objext conftest$ac_exeext
16560 if { (eval echo "$as_me:16560: \"$ac_link\"") >&5
16561 (eval $ac_link) 2>&5
16563 echo "$as_me:16563: \$? = $ac_status" >&5
16564 (exit $ac_status); } &&
16565 { ac_try='test -s conftest$ac_exeext'
16566 { (eval echo "$as_me:16566: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16569 echo "$as_me:16569: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
16571 cf_cv_curses_wacs_symbols=yes
16573 echo "$as_me: failed program was:" >&5
16574 cat conftest.$ac_ext >&5
16576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16580 echo "$as_me:16580: result: $cf_cv_curses_wacs_symbols" >&5
16581 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
16583 test "$cf_cv_curses_wacs_symbols" != no &&
16584 cat >>confdefs.h <<\EOF
16585 #define CURSES_WACS_SYMBOLS 1
16590 echo "$as_me:16590: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16591 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16592 cat >conftest.$ac_ext <<_ACEOF
16593 #line 16593 "configure"
16594 #include "confdefs.h"
16596 #ifndef _XOPEN_SOURCE_EXTENDED
16597 #define _XOPEN_SOURCE_EXTENDED
16599 #include <${cf_cv_ncurses_header:-curses.h}>
16610 rm -f conftest.$ac_objext
16611 if { (eval echo "$as_me:16611: \"$ac_compile\"") >&5
16612 (eval $ac_compile) 2>&5
16614 echo "$as_me:16614: \$? = $ac_status" >&5
16615 (exit $ac_status); } &&
16616 { ac_try='test -s conftest.$ac_objext'
16617 { (eval echo "$as_me:16617: \"$ac_try\"") >&5
16618 (eval $ac_try) 2>&5
16620 echo "$as_me:16620: \$? = $ac_status" >&5
16621 (exit $ac_status); }; }; then
16624 echo "$as_me: failed program was:" >&5
16625 cat conftest.$ac_ext >&5
16628 rm -f conftest.$ac_objext conftest.$ac_ext
16629 echo "$as_me:16629: result: $cf_result" >&5
16630 echo "${ECHO_T}$cf_result" >&6
16631 if test $cf_result = yes ; then
16633 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16635 cat >>confdefs.h <<EOF
16636 #define $cf_result 1
16641 cat >>confdefs.h <<EOF
16642 #define attr_t long
16647 if test "$cf_enable_widec" = yes; then
16649 # This is needed on Tru64 5.0 to declare mbstate_t
16650 echo "$as_me:16650: checking if we must include wchar.h to declare mbstate_t" >&5
16651 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
16652 if test "${cf_cv_mbstate_t+set}" = set; then
16653 echo $ECHO_N "(cached) $ECHO_C" >&6
16656 cat >conftest.$ac_ext <<_ACEOF
16657 #line 16657 "configure"
16658 #include "confdefs.h"
16660 #include <stdlib.h>
16661 #include <stdarg.h>
16663 #ifdef HAVE_LIBUTF8_H
16664 #include <libutf8.h>
16674 rm -f conftest.$ac_objext
16675 if { (eval echo "$as_me:16675: \"$ac_compile\"") >&5
16676 (eval $ac_compile) 2>&5
16678 echo "$as_me:16678: \$? = $ac_status" >&5
16679 (exit $ac_status); } &&
16680 { ac_try='test -s conftest.$ac_objext'
16681 { (eval echo "$as_me:16681: \"$ac_try\"") >&5
16682 (eval $ac_try) 2>&5
16684 echo "$as_me:16684: \$? = $ac_status" >&5
16685 (exit $ac_status); }; }; then
16688 echo "$as_me: failed program was:" >&5
16689 cat conftest.$ac_ext >&5
16690 cat >conftest.$ac_ext <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16694 #include <stdlib.h>
16695 #include <stdarg.h>
16698 #ifdef HAVE_LIBUTF8_H
16699 #include <libutf8.h>
16709 rm -f conftest.$ac_objext
16710 if { (eval echo "$as_me:16710: \"$ac_compile\"") >&5
16711 (eval $ac_compile) 2>&5
16713 echo "$as_me:16713: \$? = $ac_status" >&5
16714 (exit $ac_status); } &&
16715 { ac_try='test -s conftest.$ac_objext'
16716 { (eval echo "$as_me:16716: \"$ac_try\"") >&5
16717 (eval $ac_try) 2>&5
16719 echo "$as_me:16719: \$? = $ac_status" >&5
16720 (exit $ac_status); }; }; then
16721 cf_cv_mbstate_t=yes
16723 echo "$as_me: failed program was:" >&5
16724 cat conftest.$ac_ext >&5
16725 cf_cv_mbstate_t=unknown
16727 rm -f conftest.$ac_objext conftest.$ac_ext
16729 rm -f conftest.$ac_objext conftest.$ac_ext
16731 echo "$as_me:16731: result: $cf_cv_mbstate_t" >&5
16732 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
16734 if test "$cf_cv_mbstate_t" = yes ; then
16736 cat >>confdefs.h <<\EOF
16737 #define NEED_WCHAR_H 1
16743 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
16744 if test "$cf_cv_mbstate_t" = unknown ; then
16745 NCURSES_MBSTATE_T=1
16748 # if we find mbstate_t in either place, use substitution to provide a fallback.
16749 if test "$cf_cv_mbstate_t" != unknown ; then
16750 NCURSES_OK_MBSTATE_T=1
16753 # This is needed on Tru64 5.0 to declare wchar_t
16754 echo "$as_me:16754: checking if we must include wchar.h to declare wchar_t" >&5
16755 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
16756 if test "${cf_cv_wchar_t+set}" = set; then
16757 echo $ECHO_N "(cached) $ECHO_C" >&6
16760 cat >conftest.$ac_ext <<_ACEOF
16761 #line 16761 "configure"
16762 #include "confdefs.h"
16764 #include <stdlib.h>
16765 #include <stdarg.h>
16767 #ifdef HAVE_LIBUTF8_H
16768 #include <libutf8.h>
16778 rm -f conftest.$ac_objext
16779 if { (eval echo "$as_me:16779: \"$ac_compile\"") >&5
16780 (eval $ac_compile) 2>&5
16782 echo "$as_me:16782: \$? = $ac_status" >&5
16783 (exit $ac_status); } &&
16784 { ac_try='test -s conftest.$ac_objext'
16785 { (eval echo "$as_me:16785: \"$ac_try\"") >&5
16786 (eval $ac_try) 2>&5
16788 echo "$as_me:16788: \$? = $ac_status" >&5
16789 (exit $ac_status); }; }; then
16792 echo "$as_me: failed program was:" >&5
16793 cat conftest.$ac_ext >&5
16794 cat >conftest.$ac_ext <<_ACEOF
16795 #line 16795 "configure"
16796 #include "confdefs.h"
16798 #include <stdlib.h>
16799 #include <stdarg.h>
16802 #ifdef HAVE_LIBUTF8_H
16803 #include <libutf8.h>
16813 rm -f conftest.$ac_objext
16814 if { (eval echo "$as_me:16814: \"$ac_compile\"") >&5
16815 (eval $ac_compile) 2>&5
16817 echo "$as_me:16817: \$? = $ac_status" >&5
16818 (exit $ac_status); } &&
16819 { ac_try='test -s conftest.$ac_objext'
16820 { (eval echo "$as_me:16820: \"$ac_try\"") >&5
16821 (eval $ac_try) 2>&5
16823 echo "$as_me:16823: \$? = $ac_status" >&5
16824 (exit $ac_status); }; }; then
16827 echo "$as_me: failed program was:" >&5
16828 cat conftest.$ac_ext >&5
16829 cf_cv_wchar_t=unknown
16831 rm -f conftest.$ac_objext conftest.$ac_ext
16833 rm -f conftest.$ac_objext conftest.$ac_ext
16835 echo "$as_me:16835: result: $cf_cv_wchar_t" >&5
16836 echo "${ECHO_T}$cf_cv_wchar_t" >&6
16838 if test "$cf_cv_wchar_t" = yes ; then
16840 cat >>confdefs.h <<\EOF
16841 #define NEED_WCHAR_H 1
16847 # if we do not find wchar_t in either place, use substitution to provide a fallback.
16848 if test "$cf_cv_wchar_t" = unknown ; then
16852 # if we find wchar_t in either place, use substitution to provide a fallback.
16853 if test "$cf_cv_wchar_t" != unknown ; then
16854 NCURSES_OK_WCHAR_T=1
16857 # This is needed on Tru64 5.0 to declare wint_t
16858 echo "$as_me:16858: checking if we must include wchar.h to declare wint_t" >&5
16859 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
16860 if test "${cf_cv_wint_t+set}" = set; then
16861 echo $ECHO_N "(cached) $ECHO_C" >&6
16864 cat >conftest.$ac_ext <<_ACEOF
16865 #line 16865 "configure"
16866 #include "confdefs.h"
16868 #include <stdlib.h>
16869 #include <stdarg.h>
16871 #ifdef HAVE_LIBUTF8_H
16872 #include <libutf8.h>
16882 rm -f conftest.$ac_objext
16883 if { (eval echo "$as_me:16883: \"$ac_compile\"") >&5
16884 (eval $ac_compile) 2>&5
16886 echo "$as_me:16886: \$? = $ac_status" >&5
16887 (exit $ac_status); } &&
16888 { ac_try='test -s conftest.$ac_objext'
16889 { (eval echo "$as_me:16889: \"$ac_try\"") >&5
16890 (eval $ac_try) 2>&5
16892 echo "$as_me:16892: \$? = $ac_status" >&5
16893 (exit $ac_status); }; }; then
16896 echo "$as_me: failed program was:" >&5
16897 cat conftest.$ac_ext >&5
16898 cat >conftest.$ac_ext <<_ACEOF
16899 #line 16899 "configure"
16900 #include "confdefs.h"
16902 #include <stdlib.h>
16903 #include <stdarg.h>
16906 #ifdef HAVE_LIBUTF8_H
16907 #include <libutf8.h>
16917 rm -f conftest.$ac_objext
16918 if { (eval echo "$as_me:16918: \"$ac_compile\"") >&5
16919 (eval $ac_compile) 2>&5
16921 echo "$as_me:16921: \$? = $ac_status" >&5
16922 (exit $ac_status); } &&
16923 { ac_try='test -s conftest.$ac_objext'
16924 { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925 (eval $ac_try) 2>&5
16927 echo "$as_me:16927: \$? = $ac_status" >&5
16928 (exit $ac_status); }; }; then
16931 echo "$as_me: failed program was:" >&5
16932 cat conftest.$ac_ext >&5
16933 cf_cv_wint_t=unknown
16935 rm -f conftest.$ac_objext conftest.$ac_ext
16937 rm -f conftest.$ac_objext conftest.$ac_ext
16939 echo "$as_me:16939: result: $cf_cv_wint_t" >&5
16940 echo "${ECHO_T}$cf_cv_wint_t" >&6
16942 if test "$cf_cv_wint_t" = yes ; then
16944 cat >>confdefs.h <<\EOF
16945 #define NEED_WCHAR_H 1
16951 # if we do not find wint_t in either place, use substitution to provide a fallback.
16952 if test "$cf_cv_wint_t" = unknown ; then
16956 # if we find wint_t in either place, use substitution to provide a fallback.
16957 if test "$cf_cv_wint_t" != unknown ; then
16958 NCURSES_OK_WINT_T=1
16961 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
16963 echo "$as_me:16963: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16964 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16965 cat >conftest.$ac_ext <<_ACEOF
16966 #line 16966 "configure"
16967 #include "confdefs.h"
16969 #ifndef _XOPEN_SOURCE_EXTENDED
16970 #define _XOPEN_SOURCE_EXTENDED
16972 #include <${cf_cv_ncurses_header:-curses.h}>
16983 rm -f conftest.$ac_objext
16984 if { (eval echo "$as_me:16984: \"$ac_compile\"") >&5
16985 (eval $ac_compile) 2>&5
16987 echo "$as_me:16987: \$? = $ac_status" >&5
16988 (exit $ac_status); } &&
16989 { ac_try='test -s conftest.$ac_objext'
16990 { (eval echo "$as_me:16990: \"$ac_try\"") >&5
16991 (eval $ac_try) 2>&5
16993 echo "$as_me:16993: \$? = $ac_status" >&5
16994 (exit $ac_status); }; }; then
16997 echo "$as_me: failed program was:" >&5
16998 cat conftest.$ac_ext >&5
17001 rm -f conftest.$ac_objext conftest.$ac_ext
17002 echo "$as_me:17002: result: $cf_result" >&5
17003 echo "${ECHO_T}$cf_result" >&6
17004 if test $cf_result = yes ; then
17006 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17008 cat >>confdefs.h <<EOF
17009 #define $cf_result 1
17014 cat >>confdefs.h <<EOF
17015 #define mbstate_t long
17022 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
17024 echo "$as_me:17024: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17025 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17026 cat >conftest.$ac_ext <<_ACEOF
17027 #line 17027 "configure"
17028 #include "confdefs.h"
17030 #ifndef _XOPEN_SOURCE_EXTENDED
17031 #define _XOPEN_SOURCE_EXTENDED
17033 #include <${cf_cv_ncurses_header:-curses.h}>
17044 rm -f conftest.$ac_objext
17045 if { (eval echo "$as_me:17045: \"$ac_compile\"") >&5
17046 (eval $ac_compile) 2>&5
17048 echo "$as_me:17048: \$? = $ac_status" >&5
17049 (exit $ac_status); } &&
17050 { ac_try='test -s conftest.$ac_objext'
17051 { (eval echo "$as_me:17051: \"$ac_try\"") >&5
17052 (eval $ac_try) 2>&5
17054 echo "$as_me:17054: \$? = $ac_status" >&5
17055 (exit $ac_status); }; }; then
17058 echo "$as_me: failed program was:" >&5
17059 cat conftest.$ac_ext >&5
17062 rm -f conftest.$ac_objext conftest.$ac_ext
17063 echo "$as_me:17063: result: $cf_result" >&5
17064 echo "${ECHO_T}$cf_result" >&6
17065 if test $cf_result = yes ; then
17067 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17069 cat >>confdefs.h <<EOF
17070 #define $cf_result 1
17075 cat >>confdefs.h <<EOF
17076 #define wchar_t long
17083 if test "$NCURSES_OK_WINT_T" = 0 ; then
17085 echo "$as_me:17085: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17086 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17087 cat >conftest.$ac_ext <<_ACEOF
17088 #line 17088 "configure"
17089 #include "confdefs.h"
17091 #ifndef _XOPEN_SOURCE_EXTENDED
17092 #define _XOPEN_SOURCE_EXTENDED
17094 #include <${cf_cv_ncurses_header:-curses.h}>
17105 rm -f conftest.$ac_objext
17106 if { (eval echo "$as_me:17106: \"$ac_compile\"") >&5
17107 (eval $ac_compile) 2>&5
17109 echo "$as_me:17109: \$? = $ac_status" >&5
17110 (exit $ac_status); } &&
17111 { ac_try='test -s conftest.$ac_objext'
17112 { (eval echo "$as_me:17112: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17115 echo "$as_me:17115: \$? = $ac_status" >&5
17116 (exit $ac_status); }; }; then
17119 echo "$as_me: failed program was:" >&5
17120 cat conftest.$ac_ext >&5
17123 rm -f conftest.$ac_objext conftest.$ac_ext
17124 echo "$as_me:17124: result: $cf_result" >&5
17125 echo "${ECHO_T}$cf_result" >&6
17126 if test $cf_result = yes ; then
17128 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17130 cat >>confdefs.h <<EOF
17131 #define $cf_result 1
17136 cat >>confdefs.h <<EOF
17137 #define wint_t long
17152 echo "$as_me:17152: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17153 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17155 cat >conftest.$ac_ext <<_ACEOF
17156 #line 17156 "configure"
17157 #include "confdefs.h"
17159 #ifdef HAVE_XCURSES
17160 #include <xcurses.h>
17161 char * XCursesProgramName = "test";
17163 #include <${cf_cv_ncurses_header:-curses.h}>
17164 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17165 #include <ncursesw/term.h>
17166 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17167 #include <ncurses/term.h>
17168 #elif defined(HAVE_TERM_H)
17177 void *foo = &($cf_data)
17183 rm -f conftest.$ac_objext
17184 if { (eval echo "$as_me:17184: \"$ac_compile\"") >&5
17185 (eval $ac_compile) 2>&5
17187 echo "$as_me:17187: \$? = $ac_status" >&5
17188 (exit $ac_status); } &&
17189 { ac_try='test -s conftest.$ac_objext'
17190 { (eval echo "$as_me:17190: \"$ac_try\"") >&5
17191 (eval $ac_try) 2>&5
17193 echo "$as_me:17193: \$? = $ac_status" >&5
17194 (exit $ac_status); }; }; then
17198 echo "$as_me: failed program was:" >&5
17199 cat conftest.$ac_ext >&5
17202 rm -f conftest.$ac_objext conftest.$ac_ext
17203 echo "$as_me:17203: result: $cf_result" >&5
17204 echo "${ECHO_T}$cf_result" >&6
17206 if test $cf_result = yes ; then
17208 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17210 cat >>confdefs.h <<EOF
17211 #define $cf_result 1
17215 echo "$as_me:17215: checking for data $cf_data in library" >&5
17216 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
17217 # BSD linkers insist on making weak linkage, but resolve at runtime.
17218 if test "$cross_compiling" = yes; then
17221 cat >conftest.$ac_ext <<_ACEOF
17222 #line 17222 "configure"
17223 #include "confdefs.h"
17225 #ifdef HAVE_XCURSES
17226 #include <xcurses.h>
17227 char * XCursesProgramName = "test";
17229 #include <${cf_cv_ncurses_header:-curses.h}>
17230 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17231 #include <ncursesw/term.h>
17232 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17233 #include <ncurses/term.h>
17234 #elif defined(HAVE_TERM_H)
17239 extern char $cf_data;
17245 void *foo = &($cf_data);
17246 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17247 ${cf_cv_main_return:-return}(foo == 0);
17254 rm -f conftest.$ac_objext conftest$ac_exeext
17255 if { (eval echo "$as_me:17255: \"$ac_link\"") >&5
17256 (eval $ac_link) 2>&5
17258 echo "$as_me:17258: \$? = $ac_status" >&5
17259 (exit $ac_status); } &&
17260 { ac_try='test -s conftest$ac_exeext'
17261 { (eval echo "$as_me:17261: \"$ac_try\"") >&5
17262 (eval $ac_try) 2>&5
17264 echo "$as_me:17264: \$? = $ac_status" >&5
17265 (exit $ac_status); }; }; then
17268 echo "$as_me: failed program was:" >&5
17269 cat conftest.$ac_ext >&5
17272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17275 cat >conftest.$ac_ext <<_ACEOF
17276 #line 17276 "configure"
17277 #include "confdefs.h"
17279 #ifdef HAVE_XCURSES
17280 #include <xcurses.h>
17281 char * XCursesProgramName = "test";
17283 #include <${cf_cv_ncurses_header:-curses.h}>
17284 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17285 #include <ncursesw/term.h>
17286 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17287 #include <ncurses/term.h>
17288 #elif defined(HAVE_TERM_H)
17293 extern char $cf_data;
17296 void *foo = &($cf_data);
17297 fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
17298 ${cf_cv_main_return:-return}(foo == 0);
17301 rm -f conftest$ac_exeext
17302 if { (eval echo "$as_me:17302: \"$ac_link\"") >&5
17303 (eval $ac_link) 2>&5
17305 echo "$as_me:17305: \$? = $ac_status" >&5
17306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17307 { (eval echo "$as_me:17307: \"$ac_try\"") >&5
17308 (eval $ac_try) 2>&5
17310 echo "$as_me:17310: \$? = $ac_status" >&5
17311 (exit $ac_status); }; }; then
17315 echo "$as_me: program exited with status $ac_status" >&5
17316 echo "$as_me: failed program was:" >&5
17317 cat conftest.$ac_ext >&5
17320 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17322 echo "$as_me:17322: result: $cf_result" >&5
17323 echo "${ECHO_T}$cf_result" >&6
17324 if test $cf_result = yes ; then
17326 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17328 cat >>confdefs.h <<EOF
17329 #define $cf_result 1
17332 # do not exit loop here, since we prefer system's declarations
17337 if ( test "$GCC" = yes || test "$GXX" = yes )
17339 echo "$as_me:17339: checking if you want to turn on gcc warnings" >&5
17340 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17342 # Check whether --enable-warnings or --disable-warnings was given.
17343 if test "${enable_warnings+set}" = set; then
17344 enableval="$enable_warnings"
17345 test "$enableval" != yes && enableval=no
17346 if test "$enableval" != "no" ; then
17356 echo "$as_me:17356: result: $with_warnings" >&5
17357 echo "${ECHO_T}$with_warnings" >&6
17358 if test "$with_warnings" = "yes"
17361 if test "$GCC" = yes
17363 cat > conftest.i <<EOF
17365 #define GCC_PRINTF 0
17368 #define GCC_SCANF 0
17370 #ifndef GCC_NORETURN
17371 #define GCC_NORETURN /* nothing */
17374 #define GCC_UNUSED /* nothing */
17377 if test "$GCC" = yes
17379 { echo "$as_me:17379: checking for $CC __attribute__ directives..." >&5
17380 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17381 cat > conftest.$ac_ext <<EOF
17382 #line 17382 "${as_me:-configure}"
17383 #include "confdefs.h"
17384 #include "conftest.h"
17385 #include "conftest.i"
17387 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17389 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17392 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
17394 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
17396 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17397 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
17398 extern void foo(void) GCC_NORETURN;
17399 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
17401 cf_printf_attribute=no
17402 cf_scanf_attribute=no
17403 for cf_attribute in scanf printf unused noreturn
17406 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17408 cf_directive="__attribute__(($cf_attribute))"
17409 echo "checking for $CC $cf_directive" 1>&5
17411 case $cf_attribute in
17413 cf_printf_attribute=yes
17414 cat >conftest.h <<EOF
17415 #define GCC_$cf_ATTRIBUTE 1
17419 cf_scanf_attribute=yes
17420 cat >conftest.h <<EOF
17421 #define GCC_$cf_ATTRIBUTE 1
17425 cat >conftest.h <<EOF
17426 #define GCC_$cf_ATTRIBUTE $cf_directive
17431 if { (eval echo "$as_me:17431: \"$ac_compile\"") >&5
17432 (eval $ac_compile) 2>&5
17434 echo "$as_me:17434: \$? = $ac_status" >&5
17435 (exit $ac_status); }; then
17436 test -n "$verbose" && echo "$as_me:17436: result: ... $cf_attribute" >&5
17437 echo "${ECHO_T}... $cf_attribute" >&6
17438 cat conftest.h >>confdefs.h
17439 case $cf_attribute in
17442 cat >>confdefs.h <<EOF
17443 #define GCC_NORETURN $cf_directive
17448 cf_value='/* nothing */'
17449 if test "$cf_printf_attribute" != no ; then
17450 cf_value='__attribute__((format(printf,fmt,var)))'
17452 cat >>confdefs.h <<\EOF
17453 #define GCC_PRINTF 1
17458 cat >>confdefs.h <<EOF
17459 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17464 cf_value='/* nothing */'
17465 if test "$cf_scanf_attribute" != no ; then
17466 cf_value='__attribute__((format(scanf,fmt,var)))'
17468 cat >>confdefs.h <<\EOF
17469 #define GCC_SCANF 1
17474 cat >>confdefs.h <<EOF
17475 #define GCC_SCANFLIKE(fmt,var) $cf_value
17481 cat >>confdefs.h <<EOF
17482 #define GCC_UNUSED $cf_directive
17490 fgrep define conftest.i >>confdefs.h
17497 if test "$GCC" = yes ; then
17500 echo "$as_me:17500: checking if this is really Intel C compiler" >&5
17501 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17502 cf_save_CFLAGS="$CFLAGS"
17503 CFLAGS="$CFLAGS -no-gcc"
17504 cat >conftest.$ac_ext <<_ACEOF
17505 #line 17505 "configure"
17506 #include "confdefs.h"
17512 #ifdef __INTEL_COMPILER
17521 rm -f conftest.$ac_objext
17522 if { (eval echo "$as_me:17522: \"$ac_compile\"") >&5
17523 (eval $ac_compile) 2>&5
17525 echo "$as_me:17525: \$? = $ac_status" >&5
17526 (exit $ac_status); } &&
17527 { ac_try='test -s conftest.$ac_objext'
17528 { (eval echo "$as_me:17528: \"$ac_try\"") >&5
17529 (eval $ac_try) 2>&5
17531 echo "$as_me:17531: \$? = $ac_status" >&5
17532 (exit $ac_status); }; }; then
17534 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17537 echo "$as_me: failed program was:" >&5
17538 cat conftest.$ac_ext >&5
17540 rm -f conftest.$ac_objext conftest.$ac_ext
17541 CFLAGS="$cf_save_CFLAGS"
17542 echo "$as_me:17542: result: $INTEL_COMPILER" >&5
17543 echo "${ECHO_T}$INTEL_COMPILER" >&6
17550 if test "$GCC" = yes ; then
17551 echo "$as_me:17551: checking if this is really Clang C compiler" >&5
17552 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17553 cf_save_CFLAGS="$CFLAGS"
17554 CFLAGS="$CFLAGS -Qunused-arguments"
17555 cat >conftest.$ac_ext <<_ACEOF
17556 #line 17556 "configure"
17557 #include "confdefs.h"
17572 rm -f conftest.$ac_objext
17573 if { (eval echo "$as_me:17573: \"$ac_compile\"") >&5
17574 (eval $ac_compile) 2>&5
17576 echo "$as_me:17576: \$? = $ac_status" >&5
17577 (exit $ac_status); } &&
17578 { ac_try='test -s conftest.$ac_objext'
17579 { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580 (eval $ac_try) 2>&5
17582 echo "$as_me:17582: \$? = $ac_status" >&5
17583 (exit $ac_status); }; }; then
17585 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17588 echo "$as_me: failed program was:" >&5
17589 cat conftest.$ac_ext >&5
17591 rm -f conftest.$ac_objext conftest.$ac_ext
17592 CFLAGS="$cf_save_CFLAGS"
17593 echo "$as_me:17593: result: $CLANG_COMPILER" >&5
17594 echo "${ECHO_T}$CLANG_COMPILER" >&6
17597 cat > conftest.$ac_ext <<EOF
17598 #line 17598 "${as_me:-configure}"
17599 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17602 if test "$INTEL_COMPILER" = yes
17604 # The "-wdXXX" options suppress warnings:
17605 # remark #1419: external declaration in primary source file
17606 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17607 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17608 # remark #193: zero used for undefined preprocessing identifier
17609 # remark #593: variable "curs_sb_left_arrow" was set but never used
17610 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17611 # remark #869: parameter "tw" was never referenced
17612 # remark #981: operands are evaluated in unspecified order
17613 # warning #279: controlling expression is constant
17615 { echo "$as_me:17615: checking for $CC warning options..." >&5
17616 echo "$as_me: checking for $CC warning options..." >&6;}
17617 cf_save_CFLAGS="$CFLAGS"
17618 EXTRA_CFLAGS="-Wall"
17630 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17631 if { (eval echo "$as_me:17631: \"$ac_compile\"") >&5
17632 (eval $ac_compile) 2>&5
17634 echo "$as_me:17634: \$? = $ac_status" >&5
17635 (exit $ac_status); }; then
17636 test -n "$verbose" && echo "$as_me:17636: result: ... -$cf_opt" >&5
17637 echo "${ECHO_T}... -$cf_opt" >&6
17638 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17641 CFLAGS="$cf_save_CFLAGS"
17643 elif test "$GCC" = yes
17645 { echo "$as_me:17645: checking for $CC warning options..." >&5
17646 echo "$as_me: checking for $CC warning options..." >&6;}
17647 cf_save_CFLAGS="$CFLAGS"
17650 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17651 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17652 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17653 for cf_opt in W Wall \
17654 Wbad-function-cast \
17657 Wdeclaration-after-statement \
17660 Wmissing-declarations \
17661 Wmissing-prototypes \
17665 Wstrict-prototypes \
17666 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
17668 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17669 if { (eval echo "$as_me:17669: \"$ac_compile\"") >&5
17670 (eval $ac_compile) 2>&5
17672 echo "$as_me:17672: \$? = $ac_status" >&5
17673 (exit $ac_status); }; then
17674 test -n "$verbose" && echo "$as_me:17674: result: ... -$cf_opt" >&5
17675 echo "${ECHO_T}... -$cf_opt" >&6
17678 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17681 case $GCC_VERSION in
17683 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17685 echo "${as_me:-configure}:17685: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17691 case $GCC_VERSION in
17693 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17695 echo "${as_me:-configure}:17695: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17701 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17704 CFLAGS="$cf_save_CFLAGS"
17711 echo "$as_me:17711: checking if you want to use dmalloc for testing" >&5
17712 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17714 # Check whether --with-dmalloc or --without-dmalloc was given.
17715 if test "${with_dmalloc+set}" = set; then
17716 withval="$with_dmalloc"
17718 cat >>confdefs.h <<EOF
17719 #define USE_DMALLOC 1
17722 : ${with_cflags:=-g}
17723 : ${with_no_leaks:=yes}
17728 echo "$as_me:17728: result: ${with_dmalloc:-no}" >&5
17729 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17731 case .$with_cflags in
17741 cf_new_extra_cppflags=
17743 for cf_add_cflags in -g
17745 case $cf_fix_cppflags in
17747 case $cf_add_cflags in
17748 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17749 case $cf_add_cflags in
17751 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17753 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17754 && test -z "${cf_tst_cflags}" \
17755 && cf_fix_cppflags=yes
17757 if test $cf_fix_cppflags = yes ; then
17759 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17760 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17763 elif test "${cf_tst_cflags}" = "\"'" ; then
17765 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17766 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17772 case "$CPPFLAGS" in
17776 case $cf_add_cflags in
17778 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17780 CPPFLAGS=`echo "$CPPFLAGS" | \
17781 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17782 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17787 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17788 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17795 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17796 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17806 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17809 && test -z "${cf_tst_cflags}" \
17810 && cf_fix_cppflags=no
17815 if test -n "$cf_new_cflags" ; then
17817 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17818 CFLAGS="${CFLAGS}$cf_new_cflags"
17822 if test -n "$cf_new_cppflags" ; then
17824 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17825 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17829 if test -n "$cf_new_extra_cppflags" ; then
17831 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17832 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17841 if test "$with_dmalloc" = yes ; then
17842 echo "$as_me:17842: checking for dmalloc.h" >&5
17843 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17844 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17845 echo $ECHO_N "(cached) $ECHO_C" >&6
17847 cat >conftest.$ac_ext <<_ACEOF
17848 #line 17848 "configure"
17849 #include "confdefs.h"
17850 #include <dmalloc.h>
17852 if { (eval echo "$as_me:17852: \"$ac_cpp conftest.$ac_ext\"") >&5
17853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17855 egrep -v '^ *\+' conftest.er1 >conftest.err
17857 cat conftest.err >&5
17858 echo "$as_me:17858: \$? = $ac_status" >&5
17859 (exit $ac_status); } >/dev/null; then
17860 if test -s conftest.err; then
17861 ac_cpp_err=$ac_c_preproc_warn_flag
17868 if test -z "$ac_cpp_err"; then
17869 ac_cv_header_dmalloc_h=yes
17871 echo "$as_me: failed program was:" >&5
17872 cat conftest.$ac_ext >&5
17873 ac_cv_header_dmalloc_h=no
17875 rm -f conftest.err conftest.$ac_ext
17877 echo "$as_me:17877: result: $ac_cv_header_dmalloc_h" >&5
17878 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17879 if test $ac_cv_header_dmalloc_h = yes; then
17881 echo "$as_me:17881: checking for dmalloc_debug in -ldmalloc" >&5
17882 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17883 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17884 echo $ECHO_N "(cached) $ECHO_C" >&6
17886 ac_check_lib_save_LIBS=$LIBS
17887 LIBS="-ldmalloc $LIBS"
17888 cat >conftest.$ac_ext <<_ACEOF
17889 #line 17889 "configure"
17890 #include "confdefs.h"
17892 /* Override any gcc2 internal prototype to avoid an error. */
17896 /* We use char because int might match the return type of a gcc2
17897 builtin and then its argument prototype would still apply. */
17898 char dmalloc_debug ();
17907 rm -f conftest.$ac_objext conftest$ac_exeext
17908 if { (eval echo "$as_me:17908: \"$ac_link\"") >&5
17909 (eval $ac_link) 2>&5
17911 echo "$as_me:17911: \$? = $ac_status" >&5
17912 (exit $ac_status); } &&
17913 { ac_try='test -s conftest$ac_exeext'
17914 { (eval echo "$as_me:17914: \"$ac_try\"") >&5
17915 (eval $ac_try) 2>&5
17917 echo "$as_me:17917: \$? = $ac_status" >&5
17918 (exit $ac_status); }; }; then
17919 ac_cv_lib_dmalloc_dmalloc_debug=yes
17921 echo "$as_me: failed program was:" >&5
17922 cat conftest.$ac_ext >&5
17923 ac_cv_lib_dmalloc_dmalloc_debug=no
17925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17926 LIBS=$ac_check_lib_save_LIBS
17928 echo "$as_me:17928: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17929 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17930 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17931 cat >>confdefs.h <<EOF
17932 #define HAVE_LIBDMALLOC 1
17935 LIBS="-ldmalloc $LIBS"
17943 echo "$as_me:17943: checking if you want to use dbmalloc for testing" >&5
17944 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17946 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17947 if test "${with_dbmalloc+set}" = set; then
17948 withval="$with_dbmalloc"
17950 cat >>confdefs.h <<EOF
17951 #define USE_DBMALLOC 1
17954 : ${with_cflags:=-g}
17955 : ${with_no_leaks:=yes}
17960 echo "$as_me:17960: result: ${with_dbmalloc:-no}" >&5
17961 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17963 case .$with_cflags in
17973 cf_new_extra_cppflags=
17975 for cf_add_cflags in -g
17977 case $cf_fix_cppflags in
17979 case $cf_add_cflags in
17980 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17981 case $cf_add_cflags in
17983 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17985 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17986 && test -z "${cf_tst_cflags}" \
17987 && cf_fix_cppflags=yes
17989 if test $cf_fix_cppflags = yes ; then
17991 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17992 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17995 elif test "${cf_tst_cflags}" = "\"'" ; then
17997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18004 case "$CPPFLAGS" in
18008 case $cf_add_cflags in
18010 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18012 CPPFLAGS=`echo "$CPPFLAGS" | \
18013 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18014 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18019 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18020 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18027 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18028 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18035 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18036 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18038 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18040 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18041 && test -z "${cf_tst_cflags}" \
18042 && cf_fix_cppflags=no
18047 if test -n "$cf_new_cflags" ; then
18049 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18050 CFLAGS="${CFLAGS}$cf_new_cflags"
18054 if test -n "$cf_new_cppflags" ; then
18056 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18057 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18061 if test -n "$cf_new_extra_cppflags" ; then
18063 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18064 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18073 if test "$with_dbmalloc" = yes ; then
18074 echo "$as_me:18074: checking for dbmalloc.h" >&5
18075 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18076 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18077 echo $ECHO_N "(cached) $ECHO_C" >&6
18079 cat >conftest.$ac_ext <<_ACEOF
18080 #line 18080 "configure"
18081 #include "confdefs.h"
18082 #include <dbmalloc.h>
18084 if { (eval echo "$as_me:18084: \"$ac_cpp conftest.$ac_ext\"") >&5
18085 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18087 egrep -v '^ *\+' conftest.er1 >conftest.err
18089 cat conftest.err >&5
18090 echo "$as_me:18090: \$? = $ac_status" >&5
18091 (exit $ac_status); } >/dev/null; then
18092 if test -s conftest.err; then
18093 ac_cpp_err=$ac_c_preproc_warn_flag
18100 if test -z "$ac_cpp_err"; then
18101 ac_cv_header_dbmalloc_h=yes
18103 echo "$as_me: failed program was:" >&5
18104 cat conftest.$ac_ext >&5
18105 ac_cv_header_dbmalloc_h=no
18107 rm -f conftest.err conftest.$ac_ext
18109 echo "$as_me:18109: result: $ac_cv_header_dbmalloc_h" >&5
18110 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18111 if test $ac_cv_header_dbmalloc_h = yes; then
18113 echo "$as_me:18113: checking for debug_malloc in -ldbmalloc" >&5
18114 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18115 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18116 echo $ECHO_N "(cached) $ECHO_C" >&6
18118 ac_check_lib_save_LIBS=$LIBS
18119 LIBS="-ldbmalloc $LIBS"
18120 cat >conftest.$ac_ext <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18124 /* Override any gcc2 internal prototype to avoid an error. */
18128 /* We use char because int might match the return type of a gcc2
18129 builtin and then its argument prototype would still apply. */
18130 char debug_malloc ();
18139 rm -f conftest.$ac_objext conftest$ac_exeext
18140 if { (eval echo "$as_me:18140: \"$ac_link\"") >&5
18141 (eval $ac_link) 2>&5
18143 echo "$as_me:18143: \$? = $ac_status" >&5
18144 (exit $ac_status); } &&
18145 { ac_try='test -s conftest$ac_exeext'
18146 { (eval echo "$as_me:18146: \"$ac_try\"") >&5
18147 (eval $ac_try) 2>&5
18149 echo "$as_me:18149: \$? = $ac_status" >&5
18150 (exit $ac_status); }; }; then
18151 ac_cv_lib_dbmalloc_debug_malloc=yes
18153 echo "$as_me: failed program was:" >&5
18154 cat conftest.$ac_ext >&5
18155 ac_cv_lib_dbmalloc_debug_malloc=no
18157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18158 LIBS=$ac_check_lib_save_LIBS
18160 echo "$as_me:18160: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18161 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18162 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
18163 cat >>confdefs.h <<EOF
18164 #define HAVE_LIBDBMALLOC 1
18167 LIBS="-ldbmalloc $LIBS"
18175 echo "$as_me:18175: checking if you want to use valgrind for testing" >&5
18176 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18178 # Check whether --with-valgrind or --without-valgrind was given.
18179 if test "${with_valgrind+set}" = set; then
18180 withval="$with_valgrind"
18182 cat >>confdefs.h <<EOF
18183 #define USE_VALGRIND 1
18186 : ${with_cflags:=-g}
18187 : ${with_no_leaks:=yes}
18192 echo "$as_me:18192: result: ${with_valgrind:-no}" >&5
18193 echo "${ECHO_T}${with_valgrind:-no}" >&6
18195 case .$with_cflags in
18205 cf_new_extra_cppflags=
18207 for cf_add_cflags in -g
18209 case $cf_fix_cppflags in
18211 case $cf_add_cflags in
18212 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18213 case $cf_add_cflags in
18215 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18218 && test -z "${cf_tst_cflags}" \
18219 && cf_fix_cppflags=yes
18221 if test $cf_fix_cppflags = yes ; then
18223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18227 elif test "${cf_tst_cflags}" = "\"'" ; then
18229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18236 case "$CPPFLAGS" in
18240 case $cf_add_cflags in
18242 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18244 CPPFLAGS=`echo "$CPPFLAGS" | \
18245 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18246 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18251 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18252 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18259 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18260 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18267 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18268 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18270 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18272 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18273 && test -z "${cf_tst_cflags}" \
18274 && cf_fix_cppflags=no
18279 if test -n "$cf_new_cflags" ; then
18281 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18282 CFLAGS="${CFLAGS}$cf_new_cflags"
18286 if test -n "$cf_new_cppflags" ; then
18288 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18289 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18293 if test -n "$cf_new_extra_cppflags" ; then
18295 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18296 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18305 echo "$as_me:18305: checking if you want to perform memory-leak testing" >&5
18306 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18308 # Check whether --enable-leaks or --disable-leaks was given.
18309 if test "${enable_leaks+set}" = set; then
18310 enableval="$enable_leaks"
18311 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18313 : ${with_no_leaks:=no}
18315 echo "$as_me:18315: result: $with_no_leaks" >&5
18316 echo "${ECHO_T}$with_no_leaks" >&6
18318 if test "$with_no_leaks" = yes ; then
18320 cat >>confdefs.h <<\EOF
18324 cat >>confdefs.h <<\EOF
18325 #define YY_NO_LEAKS 1
18331 echo "$as_me:18331: checking for an rpath option" >&5
18332 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
18333 case $cf_cv_system_name in
18335 if test "$GCC" = yes; then
18336 LD_RPATH_OPT="-Wl,-rpath,"
18338 LD_RPATH_OPT="-rpath "
18341 (linux*|gnu*|k*bsd*-gnu|freebsd*)
18342 LD_RPATH_OPT="-Wl,-rpath,"
18344 (openbsd[2-9].*|mirbsd*)
18345 LD_RPATH_OPT="-Wl,-rpath,"
18348 LD_RPATH_OPT="-rpath "
18351 LD_RPATH_OPT="-Wl,-rpath,"
18354 LD_RPATH_OPT="-rpath "
18362 echo "$as_me:18362: result: $LD_RPATH_OPT" >&5
18363 echo "${ECHO_T}$LD_RPATH_OPT" >&6
18365 case "x$LD_RPATH_OPT" in
18367 echo "$as_me:18367: checking if we need a space after rpath option" >&5
18368 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
18369 cf_save_LIBS="$LIBS"
18371 cf_add_libs="${LD_RPATH_OPT}$libdir"
18372 # Filter out duplicates - this happens with badly-designed ".pc" files...
18373 for cf_add_1lib in $LIBS
18375 for cf_add_2lib in $cf_add_libs
18377 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18383 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18385 LIBS="$cf_add_libs"
18387 cat >conftest.$ac_ext <<_ACEOF
18388 #line 18388 "configure"
18389 #include "confdefs.h"
18399 rm -f conftest.$ac_objext conftest$ac_exeext
18400 if { (eval echo "$as_me:18400: \"$ac_link\"") >&5
18401 (eval $ac_link) 2>&5
18403 echo "$as_me:18403: \$? = $ac_status" >&5
18404 (exit $ac_status); } &&
18405 { ac_try='test -s conftest$ac_exeext'
18406 { (eval echo "$as_me:18406: \"$ac_try\"") >&5
18407 (eval $ac_try) 2>&5
18409 echo "$as_me:18409: \$? = $ac_status" >&5
18410 (exit $ac_status); }; }; then
18413 echo "$as_me: failed program was:" >&5
18414 cat conftest.$ac_ext >&5
18417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18418 LIBS="$cf_save_LIBS"
18419 echo "$as_me:18419: result: $cf_rpath_space" >&5
18420 echo "${ECHO_T}$cf_rpath_space" >&6
18421 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
18425 echo "$as_me:18425: checking if rpath-hack should be disabled" >&5
18426 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
18428 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18429 if test "${enable_rpath_hack+set}" = set; then
18430 enableval="$enable_rpath_hack"
18431 test "$enableval" != no && enableval=yes
18432 if test "$enableval" != "yes" ; then
18433 cf_disable_rpath_hack=yes
18435 cf_disable_rpath_hack=no
18439 cf_disable_rpath_hack=no
18442 echo "$as_me:18442: result: $cf_disable_rpath_hack" >&5
18443 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18444 if test "$cf_disable_rpath_hack" = no ; then
18446 echo "$as_me:18446: checking for updated LDFLAGS" >&5
18447 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18448 if test -n "$LD_RPATH_OPT" ; then
18449 echo "$as_me:18449: result: maybe" >&5
18450 echo "${ECHO_T}maybe" >&6
18454 # Extract the first word of "$ac_prog", so it can be a program name with args.
18455 set dummy $ac_prog; ac_word=$2
18456 echo "$as_me:18456: checking for $ac_word" >&5
18457 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18458 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18459 echo $ECHO_N "(cached) $ECHO_C" >&6
18461 if test -n "$cf_ldd_prog"; then
18462 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18464 ac_save_IFS=$IFS; IFS=$ac_path_separator
18466 for ac_dir in $ac_dummy; do
18468 test -z "$ac_dir" && ac_dir=.
18469 $as_executable_p "$ac_dir/$ac_word" || continue
18470 ac_cv_prog_cf_ldd_prog="$ac_prog"
18471 echo "$as_me:18471: found $ac_dir/$ac_word" >&5
18477 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18478 if test -n "$cf_ldd_prog"; then
18479 echo "$as_me:18479: result: $cf_ldd_prog" >&5
18480 echo "${ECHO_T}$cf_ldd_prog" >&6
18482 echo "$as_me:18482: result: no" >&5
18483 echo "${ECHO_T}no" >&6
18486 test -n "$cf_ldd_prog" && break
18488 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18490 cf_rpath_list="/usr/lib /lib"
18491 if test "$cf_ldd_prog" != no
18495 cat >conftest.$ac_ext <<_ACEOF
18496 #line 18496 "configure"
18497 #include "confdefs.h"
18507 rm -f conftest.$ac_objext conftest$ac_exeext
18508 if { (eval echo "$as_me:18508: \"$ac_link\"") >&5
18509 (eval $ac_link) 2>&5
18511 echo "$as_me:18511: \$? = $ac_status" >&5
18512 (exit $ac_status); } &&
18513 { ac_try='test -s conftest$ac_exeext'
18514 { (eval echo "$as_me:18514: \"$ac_try\"") >&5
18515 (eval $ac_try) 2>&5
18517 echo "$as_me:18517: \$? = $ac_status" >&5
18518 (exit $ac_status); }; }; then
18519 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
18520 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
18522 echo "$as_me: failed program was:" >&5
18523 cat conftest.$ac_ext >&5
18525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18527 # If we passed the link-test, but get a "not found" on a given library,
18528 # this could be due to inept reconfiguration of gcc to make it only
18529 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
18530 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
18531 # /usr/local libraries.
18532 if test -n "$cf_rpath_oops"
18534 for cf_rpath_src in $cf_rpath_oops
18536 for cf_rpath_dir in \
18541 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18543 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18545 echo "${as_me:-configure}:18545: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18547 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18555 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18557 echo "${as_me:-configure}:18557: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18559 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18561 echo "${as_me:-configure}:18561: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18564 for cf_rpath_src in $LDFLAGS
18566 case $cf_rpath_src in
18569 # check if this refers to a directory which we will ignore
18571 if test -n "$cf_rpath_list"
18573 for cf_rpath_item in $cf_rpath_list
18575 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18583 if test "$cf_rpath_skip" = no
18585 # transform the option
18586 if test "$LD_RPATH_OPT" = "-R " ; then
18587 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18589 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18592 # if we have not already added this, add it now
18593 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18594 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18596 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18598 echo "${as_me:-configure}:18598: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18600 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18605 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18607 LDFLAGS=$cf_rpath_dst
18609 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18611 echo "${as_me:-configure}:18611: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18613 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18615 echo "${as_me:-configure}:18615: testing ...checking LIBS $LIBS ..." 1>&5
18618 for cf_rpath_src in $LIBS
18620 case $cf_rpath_src in
18623 # check if this refers to a directory which we will ignore
18625 if test -n "$cf_rpath_list"
18627 for cf_rpath_item in $cf_rpath_list
18629 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18637 if test "$cf_rpath_skip" = no
18639 # transform the option
18640 if test "$LD_RPATH_OPT" = "-R " ; then
18641 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18643 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18646 # if we have not already added this, add it now
18647 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18648 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18650 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18652 echo "${as_me:-configure}:18652: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18654 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18659 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18663 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18665 echo "${as_me:-configure}:18665: testing ...checked LIBS $LIBS ..." 1>&5
18667 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18669 echo "${as_me:-configure}:18669: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18672 echo "$as_me:18672: result: no" >&5
18673 echo "${ECHO_T}no" >&6
18681 ac_config_files="$ac_config_files Makefile"
18682 ac_config_commands="$ac_config_commands default"
18683 cat >confcache <<\_ACEOF
18684 # This file is a shell script that caches the results of configure
18685 # tests run on this system so they can be shared between configure
18686 # scripts and configure runs, see configure's option --config-cache.
18687 # It is not useful on other systems. If it contains results you don't
18688 # want to keep, you may remove or edit it.
18690 # config.status only pays attention to the cache file if you give it
18691 # the --recheck option to rerun configure.
18693 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18694 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18695 # following values.
18699 # The following way of writing the cache mishandles newlines in values,
18700 # but we know of no workaround that is simple, portable, and efficient.
18701 # So, don't put newlines in cache variables' values.
18702 # Ultrix sh set writes to stderr and can't be redirected directly,
18703 # and sets the high bit in the cache file unless we assign to the vars.
18706 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18708 # `set' does not quote correctly, so add quotes (double-quote
18709 # substitution turns \\\\ into \\, and sed turns \\ into \).
18712 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18715 # `set' quotes correctly as required by POSIX, so do not add quotes.
18717 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18724 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18726 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18728 if cmp -s $cache_file confcache; then :; else
18729 if test -w $cache_file; then
18730 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18731 cat confcache >$cache_file
18733 echo "not updating unwritable cache $cache_file"
18738 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18739 # Let make expand exec_prefix.
18740 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18742 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18743 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18744 # trailing colons and then remove the whole line if VPATH becomes empty
18745 # (actually we leave an empty line to preserve line numbers).
18746 if test "x$srcdir" = x.; then
18747 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18748 s/:*\$(srcdir):*/:/;
18749 s/:*\${srcdir}:*/:/;
18751 s/^\([^=]*=[ ]*\):*/\1/;
18757 DEFS=-DHAVE_CONFIG_H
18759 : ${CONFIG_STATUS=./config.status}
18760 ac_clean_files_save=$ac_clean_files
18761 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18762 { echo "$as_me:18762: creating $CONFIG_STATUS" >&5
18763 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18764 cat >$CONFIG_STATUS <<_ACEOF
18766 # Generated automatically by configure.
18767 # Run this file to recreate the current configuration.
18768 # Compiler output produced by configure, useful for debugging
18769 # configure, is in config.log if it exists.
18772 SHELL=\${CONFIG_SHELL-$SHELL}
18773 ac_cs_invocation="\$0 \$@"
18777 cat >>$CONFIG_STATUS <<\_ACEOF
18778 # Be Bourne compatible
18779 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18782 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18786 # Name of the executable.
18787 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18789 if expr a : '\(a\)' >/dev/null 2>&1; then
18795 rm -f conf$$ conf$$.exe conf$$.file
18797 if ln -s conf$$.file conf$$ 2>/dev/null; then
18798 # We could just check for DJGPP; but this test a) works b) is more generic
18799 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18800 if test -f conf$$.exe; then
18801 # Don't use ln at all; we don't have any links
18806 elif ln conf$$.file conf$$ 2>/dev/null; then
18811 rm -f conf$$ conf$$.exe conf$$.file
18813 as_executable_p="test -f"
18815 # Support unset when possible.
18816 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18823 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18824 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18825 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18826 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18827 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18828 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18829 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18830 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18833 # We need space, tab and new line, in precisely that order.
18839 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18845 # Files that config.status was made for.
18846 if test -n "$ac_config_files"; then
18847 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18850 if test -n "$ac_config_headers"; then
18851 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18854 if test -n "$ac_config_links"; then
18855 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18858 if test -n "$ac_config_commands"; then
18859 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18862 cat >>$CONFIG_STATUS <<\EOF
18865 \`$as_me' instantiates files from templates according to the
18866 current configuration.
18868 Usage: $0 [OPTIONS] [FILE]...
18870 -h, --help print this help, then exit
18871 -V, --version print version number, then exit
18872 -d, --debug don't remove temporary files
18873 --recheck update $as_me by reconfiguring in the same conditions
18874 --file=FILE[:TEMPLATE]
18875 instantiate the configuration file FILE
18876 --header=FILE[:TEMPLATE]
18877 instantiate the configuration header FILE
18879 Configuration files:
18882 Configuration headers:
18885 Configuration commands:
18888 Report bugs to <dickey@invisible-island.net>."
18891 cat >>$CONFIG_STATUS <<EOF
18894 configured by $0, generated by GNU Autoconf 2.52.20170501,
18895 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18898 Free Software Foundation, Inc.
18899 This config.status script is free software; the Free Software Foundation
18900 gives unlimited permission to copy, distribute and modify it."
18905 cat >>$CONFIG_STATUS <<\EOF
18906 # If no file are specified by the user, then we need to provide default
18907 # value. By we need to know if files were specified by the user.
18913 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18914 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18916 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18920 *) # This is not an option, so the user has probably given explicit
18922 ac_need_defaults=false;;
18926 # Handling of the options.
18928 cat >>$CONFIG_STATUS <<EOF
18929 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18930 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18931 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18933 cat >>$CONFIG_STATUS <<\EOF
18934 --version | --vers* | -V )
18935 echo "$ac_cs_version"; exit 0 ;;
18937 # Conflict between --help and --header
18938 { { echo "$as_me:18938: error: ambiguous option: $1
18939 Try \`$0 --help' for more information." >&5
18940 echo "$as_me: error: ambiguous option: $1
18941 Try \`$0 --help' for more information." >&2;}
18942 { (exit 1); exit 1; }; };;
18943 --help | --hel | -h )
18944 echo "$ac_cs_usage"; exit 0 ;;
18945 --debug | --d* | -d )
18947 --file | --fil | --fi | --f )
18949 CONFIG_FILES="$CONFIG_FILES $1"
18950 ac_need_defaults=false;;
18951 --header | --heade | --head | --hea )
18953 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18954 ac_need_defaults=false;;
18956 # This is an error.
18957 -*) { { echo "$as_me:18957: error: unrecognized option: $1
18958 Try \`$0 --help' for more information." >&5
18959 echo "$as_me: error: unrecognized option: $1
18960 Try \`$0 --help' for more information." >&2;}
18961 { (exit 1); exit 1; }; } ;;
18963 *) ac_config_targets="$ac_config_targets $1" ;;
18972 ## ----------------------- ##
18973 ## Running config.status. ##
18974 ## ----------------------- ##
18976 This file was extended by $as_me 2.52.20170501, executed with
18977 CONFIG_FILES = $CONFIG_FILES
18978 CONFIG_HEADERS = $CONFIG_HEADERS
18979 CONFIG_LINKS = $CONFIG_LINKS
18980 CONFIG_COMMANDS = $CONFIG_COMMANDS
18981 > $ac_cs_invocation
18982 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18987 cat >>$CONFIG_STATUS <<EOF
18989 # INIT-COMMANDS section.
18999 cat >>$CONFIG_STATUS <<\EOF
19000 for ac_config_target in $ac_config_targets
19002 case "$ac_config_target" in
19003 # Handling of arguments.
19004 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19005 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19006 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
19007 *) { { echo "$as_me:19007: error: invalid argument: $ac_config_target" >&5
19008 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19009 { (exit 1); exit 1; }; };;
19013 # If the user did not use the arguments to specify the items to instantiate,
19014 # then the envvar interface is used. Set only those that are not.
19015 # We use the long form for the default assignment because of an extremely
19016 # bizarre bug on SunOS 4.1.3.
19017 if $ac_need_defaults; then
19018 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19019 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19020 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19023 # Create a temporary directory, and hook for its removal unless debugging.
19026 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19027 trap '{ (exit 1); exit 1; }' 1 2 13 15
19030 # Create a (secure) tmp directory for tmp files.
19033 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19034 test -n "$tmp" && test -d "$tmp"
19037 tmp=$TMPDIR/cs$$-$RANDOM
19038 (umask 077 && mkdir $tmp)
19041 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19042 { (exit 1); exit 1; }
19047 cat >>$CONFIG_STATUS <<EOF
19050 # CONFIG_FILES section.
19053 # No need to generate the scripts if there are no CONFIG_FILES.
19054 # This happens for instance when ./config.status config.h
19055 if test -n "\$CONFIG_FILES"; then
19056 # Protect against being on the right side of a sed subst in config.status.
19057 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19058 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19059 s,@SHELL@,$SHELL,;t t
19060 s,@exec_prefix@,$exec_prefix,;t t
19061 s,@prefix@,$prefix,;t t
19062 s,@program_transform_name@,$program_transform_name,;t t
19063 s,@bindir@,$bindir,;t t
19064 s,@sbindir@,$sbindir,;t t
19065 s,@libexecdir@,$libexecdir,;t t
19066 s,@datarootdir@,$datarootdir,;t t
19067 s,@datadir@,$datadir,;t t
19068 s,@sysconfdir@,$sysconfdir,;t t
19069 s,@sharedstatedir@,$sharedstatedir,;t t
19070 s,@localstatedir@,$localstatedir,;t t
19071 s,@libdir@,$libdir,;t t
19072 s,@includedir@,$includedir,;t t
19073 s,@oldincludedir@,$oldincludedir,;t t
19074 s,@infodir@,$infodir,;t t
19075 s,@mandir@,$mandir,;t t
19076 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19077 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19078 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19079 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19080 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19081 s,@build_alias@,$build_alias,;t t
19082 s,@host_alias@,$host_alias,;t t
19083 s,@target_alias@,$target_alias,;t t
19084 s,@ECHO_C@,$ECHO_C,;t t
19085 s,@ECHO_N@,$ECHO_N,;t t
19086 s,@ECHO_T@,$ECHO_T,;t t
19087 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19088 s,@DEFS@,$DEFS,;t t
19089 s,@LIBS@,$LIBS,;t t
19090 s,@build@,$build,;t t
19091 s,@build_cpu@,$build_cpu,;t t
19092 s,@build_vendor@,$build_vendor,;t t
19093 s,@build_os@,$build_os,;t t
19094 s,@host@,$host,;t t
19095 s,@host_cpu@,$host_cpu,;t t
19096 s,@host_vendor@,$host_vendor,;t t
19097 s,@host_os@,$host_os,;t t
19098 s,@SET_MAKE@,$SET_MAKE,;t t
19100 s,@CFLAGS@,$CFLAGS,;t t
19101 s,@LDFLAGS@,$LDFLAGS,;t t
19102 s,@CPPFLAGS@,$CPPFLAGS,;t t
19103 s,@ac_ct_CC@,$ac_ct_CC,;t t
19104 s,@EXEEXT@,$EXEEXT,;t t
19105 s,@OBJEXT@,$OBJEXT,;t t
19106 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19109 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19110 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19111 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19112 s,@LINT@,$LINT,;t t
19113 s,@LINT_OPTS@,$LINT_OPTS,;t t
19114 s,@CTAGS@,$CTAGS,;t t
19115 s,@ETAGS@,$ETAGS,;t t
19116 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19117 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19118 s,@MATH_LIB@,$MATH_LIB,;t t
19119 s,@top_builddir@,$top_builddir,;t t
19120 s,@CC_G_OPT@,$CC_G_OPT,;t t
19121 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19122 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19123 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19124 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19126 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19127 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19128 s,@LD_MODEL@,$LD_MODEL,;t t
19129 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19130 s,@LIBTOOL@,$LIBTOOL,;t t
19131 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19132 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19133 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19134 s,@LIB_LINK@,$LIB_LINK,;t t
19135 s,@LINK_TESTS@,$LINK_TESTS,;t t
19136 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19137 s,@PACKAGE@,$PACKAGE,;t t
19138 s,@PTHREAD@,$PTHREAD,;t t
19139 s,@TEST_ARGS@,$TEST_ARGS,;t t
19140 s,@TEST_DEPS@,$TEST_DEPS,;t t
19141 s,@TEST_LIBS@,$TEST_LIBS,;t t
19142 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
19143 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19144 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19145 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19146 s,@includesubdir@,$includesubdir,;t t
19147 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19148 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19149 s,@ECHO_LT@,$ECHO_LT,;t t
19150 s,@ECHO_LD@,$ECHO_LD,;t t
19151 s,@RULE_CC@,$RULE_CC,;t t
19152 s,@SHOW_CC@,$SHOW_CC,;t t
19153 s,@ECHO_CC@,$ECHO_CC,;t t
19154 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19155 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
19156 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
19157 s,@X_CFLAGS@,$X_CFLAGS,;t t
19158 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19159 s,@X_LIBS@,$X_LIBS,;t t
19160 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19161 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
19162 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
19163 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19164 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19165 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19170 cat >>$CONFIG_STATUS <<\EOF
19171 # Split the substitutions into bite-sized pieces for seds with
19172 # small command number limits, like on Digital OSF/1 and HP-UX.
19173 ac_max_sed_lines=48
19174 ac_sed_frag=1 # Number of current file.
19175 ac_beg=1 # First line for current file.
19176 ac_end=$ac_max_sed_lines # Line after last line for current file.
19179 while $ac_more_lines; do
19180 if test $ac_beg -gt 1; then
19181 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19183 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19185 if test ! -s $tmp/subs.frag; then
19186 ac_more_lines=false
19188 # The purpose of the label and of the branching condition is to
19189 # speed up the sed processing (if there are no `@' at all, there
19190 # is no need to browse any of the substitutions).
19191 # These are the two extra sed commands mentioned above.
19193 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19194 # It is possible to make a multiline substitution using escaped newlines.
19195 # Ensure that we do not split the substitution between script fragments.
19197 ac_END=`expr $ac_end + $ac_max_sed_lines`
19198 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
19199 if test -s $tmp/subs.next; then
19200 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
19201 if test ! -s $tmp/subs.edit; then
19202 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
19203 if test ! -s $tmp/subs.edit; then
19204 if test $ac_beg -gt 1; then
19205 ac_end=`expr $ac_end - 1`
19212 if test -z "$ac_sed_cmds"; then
19213 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19215 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19217 ac_sed_frag=`expr $ac_sed_frag + 1`
19219 ac_end=`expr $ac_end + $ac_max_sed_lines`
19222 if test -z "$ac_sed_cmds"; then
19225 fi # test -n "$CONFIG_FILES"
19228 cat >>$CONFIG_STATUS <<\EOF
19229 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19230 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19232 - | *:- | *:-:* ) # input from stdin
19234 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19235 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19236 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19237 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19238 * ) ac_file_in=$ac_file.in ;;
19241 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19242 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19243 X"$ac_file" : 'X\(//\)[^/]' \| \
19244 X"$ac_file" : 'X\(//\)$' \| \
19245 X"$ac_file" : 'X\(/\)' \| \
19246 . : '\(.\)' 2>/dev/null ||
19248 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19249 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19250 /^X\(\/\/\)$/{ s//\1/; q; }
19251 /^X\(\/\).*/{ s//\1/; q; }
19253 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19254 { case "$ac_dir" in
19255 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19259 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19260 case $as_mkdir_dir in
19261 # Skip DOS drivespec
19262 ?:) as_incr_dir=$as_mkdir_dir ;;
19264 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19265 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19270 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19271 # A "../" for each directory in $ac_dir_suffix.
19272 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19274 ac_dir_suffix= ac_dots=
19279 if test -z "$ac_dots"; then
19282 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19284 [\\/]* | ?:[\\/]* )
19285 ac_srcdir=$srcdir$ac_dir_suffix;
19286 ac_top_srcdir=$srcdir ;;
19287 *) # Relative path.
19288 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19289 ac_top_srcdir=$ac_dots$srcdir ;;
19293 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19294 *) ac_INSTALL=$ac_dots$INSTALL ;;
19297 if test x"$ac_file" != x-; then
19298 { echo "$as_me:19298: creating $ac_file" >&5
19299 echo "$as_me: creating $ac_file" >&6;}
19302 # Let's still pretend it is `configure' which instantiates (i.e., don't
19303 # use $as_me), people would be surprised to read:
19304 # /* config.h. Generated automatically by config.status. */
19305 configure_input="Generated automatically from `echo $ac_file_in |
19306 sed 's,.*/,,'` by configure."
19308 # First look for the input files in the build tree, otherwise in the
19310 ac_file_inputs=`IFS=:
19311 for f in $ac_file_in; do
19313 -) echo $tmp/stdin ;;
19315 # Absolute (can't be DOS-style, as IFS=:)
19316 test -f "$f" || { { echo "$as_me:19316: error: cannot find input file: $f" >&5
19317 echo "$as_me: error: cannot find input file: $f" >&2;}
19318 { (exit 1); exit 1; }; }
19321 if test -f "$f"; then
19324 elif test -f "$srcdir/$f"; then
19329 { { echo "$as_me:19329: error: cannot find input file: $f" >&5
19330 echo "$as_me: error: cannot find input file: $f" >&2;}
19331 { (exit 1); exit 1; }; }
19334 done` || { (exit 1); exit 1; }
19336 cat >>$CONFIG_STATUS <<\EOF
19337 ac_warn_datarootdir=no
19338 if test x"$ac_file" != x-; then
19339 for ac_item in $ac_file_inputs
19341 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
19342 if test -n "$ac_seen"; then
19343 ac_used=`grep '@datarootdir@' $ac_item`
19344 if test -z "$ac_used"; then
19345 { echo "$as_me:19345: WARNING: datarootdir was used implicitly but not set:
19347 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19349 ac_warn_datarootdir=yes
19352 ac_seen=`grep '${datarootdir}' $ac_item`
19353 if test -n "$ac_seen"; then
19354 { echo "$as_me:19354: WARNING: datarootdir was used explicitly but not set:
19356 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19358 ac_warn_datarootdir=yes
19363 if test "x$ac_warn_datarootdir" = xyes; then
19364 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19368 cat >>$CONFIG_STATUS <<EOF
19372 cat >>$CONFIG_STATUS <<\EOF
19374 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19375 s,@configure_input@,$configure_input,;t t
19376 s,@srcdir@,$ac_srcdir,;t t
19377 s,@top_srcdir@,$ac_top_srcdir,;t t
19378 s,@INSTALL@,$ac_INSTALL,;t t
19379 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19381 if test x"$ac_file" != x-; then
19382 cp $tmp/out $ac_file
19384 for ac_name in prefix exec_prefix datarootdir
19386 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
19387 if test -n "$ac_seen"; then
19388 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
19389 if test -z "$ac_init"; then
19390 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19391 { echo "$as_me:19391: WARNING: Variable $ac_name is used but was not set:
19393 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19398 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
19399 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
19400 if test -s $tmp/out; then
19401 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19402 { echo "$as_me:19402: WARNING: Some variables may not be substituted:
19404 echo "$as_me: WARNING: Some variables may not be substituted:
19414 cat >>$CONFIG_STATUS <<\EOF
19417 # CONFIG_HEADER section.
19420 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19421 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19423 # ac_d sets the value in "#define NAME VALUE" lines.
19424 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19425 ac_dB='[ ].*$,\1#\2'
19428 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19429 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19430 ac_iB='\([ ]\),\1#\2define\3'
19433 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19434 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19435 ac_uB='$,\1#\2define\3'
19439 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19440 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19442 - | *:- | *:-:* ) # input from stdin
19444 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19445 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19446 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19447 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19448 * ) ac_file_in=$ac_file.in ;;
19451 test x"$ac_file" != x- && { echo "$as_me:19451: creating $ac_file" >&5
19452 echo "$as_me: creating $ac_file" >&6;}
19454 # First look for the input files in the build tree, otherwise in the
19456 ac_file_inputs=`IFS=:
19457 for f in $ac_file_in; do
19459 -) echo $tmp/stdin ;;
19461 # Absolute (can't be DOS-style, as IFS=:)
19462 test -f "$f" || { { echo "$as_me:19462: error: cannot find input file: $f" >&5
19463 echo "$as_me: error: cannot find input file: $f" >&2;}
19464 { (exit 1); exit 1; }; }
19467 if test -f "$f"; then
19470 elif test -f "$srcdir/$f"; then
19475 { { echo "$as_me:19475: error: cannot find input file: $f" >&5
19476 echo "$as_me: error: cannot find input file: $f" >&2;}
19477 { (exit 1); exit 1; }; }
19480 done` || { (exit 1); exit 1; }
19481 # Remove the trailing spaces.
19482 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19486 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19487 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19488 # be either 'cat' or 'sort'.
19489 cat confdefs.h | uniq >conftest.vals
19491 # Break up conftest.vals because some shells have a limit on
19492 # the size of here documents, and old seds have small limits too.
19494 rm -f conftest.tail
19495 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
19496 while grep . conftest.vals >/dev/null
19498 # Write chunks of a limited-size here document to conftest.frag.
19499 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19500 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19501 echo 'CEOF' >> $CONFIG_STATUS
19502 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19503 rm -f conftest.vals
19504 mv conftest.tail conftest.vals
19506 rm -f conftest.vals
19508 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19510 echo ' cat >> conftest.edit <<CEOF
19511 /@DEFS@/r conftest.frag
19514 sed -f conftest.edit $tmp/in > $tmp/out
19516 mv $tmp/out $tmp/in
19517 rm -f conftest.edit conftest.frag
19518 ' >> $CONFIG_STATUS
19520 cat >>$CONFIG_STATUS <<\EOF
19521 # Let's still pretend it is `configure' which instantiates (i.e., don't
19522 # use $as_me), people would be surprised to read:
19523 # /* config.h. Generated automatically by config.status. */
19524 if test x"$ac_file" = x-; then
19525 echo "/* Generated automatically by configure. */" >$tmp/config.h
19527 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19529 cat $tmp/in >>$tmp/config.h
19531 if test x"$ac_file" != x-; then
19532 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19533 { echo "$as_me:19533: $ac_file is unchanged" >&5
19534 echo "$as_me: $ac_file is unchanged" >&6;}
19536 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19537 X"$ac_file" : 'X\(//\)[^/]' \| \
19538 X"$ac_file" : 'X\(//\)$' \| \
19539 X"$ac_file" : 'X\(/\)' \| \
19540 . : '\(.\)' 2>/dev/null ||
19542 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19543 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19544 /^X\(\/\/\)$/{ s//\1/; q; }
19545 /^X\(\/\).*/{ s//\1/; q; }
19547 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19548 { case "$ac_dir" in
19549 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19553 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19554 case $as_mkdir_dir in
19555 # Skip DOS drivespec
19556 ?:) as_incr_dir=$as_mkdir_dir ;;
19558 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19559 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19566 mv $tmp/config.h $ac_file
19570 rm -f $tmp/config.h
19574 cat >>$CONFIG_STATUS <<\EOF
19576 # CONFIG_COMMANDS section.
19578 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19579 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19580 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19587 if test ! -d $srcdir/$cf_dir; then
19589 elif test -f $srcdir/$cf_dir/programs; then
19590 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19594 cat >>Makefile <<TEST_EOF
19596 # These rules are generated so we do not rely on suffix rules, which do not
19597 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19598 # some, and the '\$x' confuses others).
19601 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19604 cat >>Makefile <<TEST_EOF
19606 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19607 \$(srcdir)/test.priv.h \\
19610 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
19614 if test -f ../config.guess && test -f ../config.sub
19616 cat >>Makefile <<TEST_EOF
19618 # if we used CF_INHERIT for getting these files, we can remove them
19620 rm -f config.guess config.sub
19628 cat >>$CONFIG_STATUS <<\EOF
19630 { (exit 0); exit 0; }
19632 chmod +x $CONFIG_STATUS
19633 ac_clean_files=$ac_clean_files_save
19635 # configure is writing to config.log, and then calls config.status.
19636 # config.status does its own redirection, appending to config.log.
19637 # Unfortunately, on DOS this fails, as config.log is still kept open
19638 # by configure, so config.status won't be able to write to it; its
19639 # output is simply discarded. So we exec the FD to /dev/null,
19640 # effectively closing config.log, so it can be properly (re)opened and
19641 # appended to by config.status. When coming back to configure, we
19642 # need to make the FD available again.
19643 if test "$no_create" != yes; then
19646 $SHELL $CONFIG_STATUS || ac_cs_success=false
19648 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19649 # would make configure fail if this is the last instruction.
19650 $ac_cs_success || { (exit 1); exit 1; }