2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20150926.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
148 # Identity of this package.
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
189 cache_file=config.cache ;;
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 datadir=$ac_optarg ;;
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
224 eval "enable_$ac_feature='$ac_optarg'" ;;
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
239 -help | --help | --hel | --he | -h)
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
263 -libdir | --libdir | --libdi | --libd)
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290 # Obsolete; use --without-fp.
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
329 -program-transform-name | --program-transform-name \
330 | --program-transform-nam | --program-transform-na \
331 | --program-transform-n | --program-transform- \
332 | --program-transform | --program-transfor \
333 | --program-transfo | --program-transf \
334 | --program-trans | --program-tran \
335 | --progr-tra | --program-tr | --program-t)
336 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 sbindir=$ac_optarg ;;
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 sharedstatedir=$ac_optarg ;;
367 -site | --site | --sit)
369 -site=* | --site=* | --sit=*)
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
392 -version | --version | --versio | --versi | --vers | -V)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
406 eval "with_$ac_package='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
418 # Obsolete; use --with-x.
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
461 if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
470 eval ac_val=$`echo $ac_var`
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
482 eval ac_val=$`echo $ac_var`
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510 test "$silent" = yes && exec 6>/dev/null
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
570 # Report the --help message.
572 if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
576 \`configure' configures this package to adapt to many kinds of systems.
578 Usage: $0 [OPTION]... [VAR=VALUE]...
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE. See below for descriptions of some of the useful variables.
583 Defaults for the options are specified in brackets.
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
599 Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
610 For better control, use the options below.
612 Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
645 if test -n "$ac_init_help"; then
650 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
654 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
655 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
658 --with-pkg-config{=path} enable/disable use of pkg-config
659 --disable-echo do not display "compiling" commands
660 Curses Version-dependent Options:
661 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662 --disable-widec disable checks for wide-character functions
663 --with-curses-dir=DIR directory in which (n)curses is installed
664 --with-screen=XXX use specified curses-libraries
665 --with-ncursesw use wide ncurses-libraries
666 --with-ncurses use ncurses-libraries
667 --with-pdcurses compile/link with pdcurses X11 library
668 --with-curses-colr compile/link with HPUX 10.x color-curses
669 --with-curses-5lib compile/link with SunOS 5lib curses
670 --with-Xaw3d link with Xaw 3d library
671 --with-Xaw3dxft link with Xaw 3d xft library
672 --with-neXtaw link with neXT Athena library
673 --with-XawPlus link with Athena-Plus library
674 --with-x use the X Window System
675 Testing/development Options:
676 --enable-warnings test: turn on gcc compiler warnings
677 --with-dmalloc test: use Gray Watson's dmalloc library
678 --with-dbmalloc test: use Conor Cahill's dbmalloc library
679 --with-valgrind test: use valgrind
680 --disable-leaks test: free permanent memory, analyze leaks
681 --disable-rpath-hack don't add rpath options for additional libraries
683 Some influential environment variables:
684 CC C compiler command
685 CFLAGS C compiler flags
686 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
687 nonstandard directory <lib dir>
688 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
689 headers in a nonstandard directory <include dir>
692 Use these variables to override the choices made by `configure' or to help
693 it to find libraries and programs with nonstandard names/locations.
698 if test "$ac_init_help" = "recursive"; then
699 # If there are subdirs, report their specific --help.
701 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
703 # A "../" for each directory in /$ac_subdir.
704 ac_dots=`echo $ac_subdir |
705 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
708 .) # No --srcdir option. We are building in place.
709 ac_sub_srcdir=$srcdir ;;
710 [\\/]* | ?:[\\/]* ) # Absolute path.
711 ac_sub_srcdir=$srcdir/$ac_subdir ;;
713 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
716 # Check for guested configure; otherwise get Cygnus style configure.
717 if test -f $ac_sub_srcdir/configure.gnu; then
719 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
720 elif test -f $ac_sub_srcdir/configure; then
722 $SHELL $ac_sub_srcdir/configure --help=recursive
723 elif test -f $ac_sub_srcdir/configure.ac ||
724 test -f $ac_sub_srcdir/configure.in; then
728 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
734 test -n "$ac_init_help" && exit 0
735 if $ac_init_version; then
738 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
739 Free Software Foundation, Inc.
740 This configure script is free software; the Free Software Foundation
741 gives unlimited permission to copy, distribute and modify it.
747 This file contains any messages produced by compilers while
748 running configure, to aid debugging if configure makes a mistake.
750 It was created by $as_me, which was
751 generated by GNU Autoconf 2.52.20150926. Invocation command line was
762 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
763 uname -m = `(uname -m) 2>/dev/null || echo unknown`
764 uname -r = `(uname -r) 2>/dev/null || echo unknown`
765 uname -s = `(uname -s) 2>/dev/null || echo unknown`
766 uname -v = `(uname -v) 2>/dev/null || echo unknown`
768 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
769 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
771 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
772 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
773 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
774 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
775 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
776 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
777 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
791 # Keep a trace of the command line.
792 # Strip out --no-create and --no-recursion so they do not pile up.
793 # Also quote any args containing shell meta-characters.
799 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
800 | --no-cr | --no-c) ;;
801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
803 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
804 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
805 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
807 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
810 # Get rid of the leading space.
813 # When interrupted or exit'd, cleanup temporary files, and complete
814 # config.log. We remove comments because anyway the quotes in there
815 # would cause problems or look ugly.
817 # Save into config.log some information that might help in debugging.
819 echo "## ----------------- ##" >&5
820 echo "## Cache variables. ##" >&5
821 echo "## ----------------- ##" >&5
823 # The following way of writing the cache mishandles newlines in values,
826 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
829 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
834 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
838 sed "/^$/d" confdefs.h >conftest.log
839 if test -s conftest.log; then
841 echo "## ------------ ##" >&5
842 echo "## confdefs.h. ##" >&5
843 echo "## ------------ ##" >&5
848 test "$ac_signal" != 0 &&
849 echo "$as_me: caught signal $ac_signal" >&5
850 echo "$as_me: exit $exit_status" >&5
851 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
854 for ac_signal in 1 2 13 15; do
855 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
859 # confdefs.h avoids OS command line length limits that DEFS can exceed.
860 rm -rf conftest* confdefs.h
861 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
864 # Let the site file select an alternate cache file if it wants to.
865 # Prefer explicitly selected file to automatically selected ones.
866 if test -z "$CONFIG_SITE"; then
867 if test "x$prefix" != xNONE; then
868 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
870 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
873 for ac_site_file in $CONFIG_SITE; do
874 if test -r "$ac_site_file"; then
875 { echo "$as_me:875: loading site script $ac_site_file" >&5
876 echo "$as_me: loading site script $ac_site_file" >&6;}
877 cat "$ac_site_file" >&5
882 if test -r "$cache_file"; then
883 # Some versions of bash will fail to source /dev/null (special
884 # files actually), so we avoid doing that.
885 if test -f "$cache_file"; then
886 { echo "$as_me:886: loading cache $cache_file" >&5
887 echo "$as_me: loading cache $cache_file" >&6;}
889 [\\/]* | ?:[\\/]* ) . $cache_file;;
894 { echo "$as_me:894: creating cache $cache_file" >&5
895 echo "$as_me: creating cache $cache_file" >&6;}
899 # Check that the precious variables saved in the cache have kept the same
901 ac_cache_corrupted=false
902 for ac_var in `(set) 2>&1 |
903 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
904 eval ac_old_set=\$ac_cv_env_${ac_var}_set
905 eval ac_new_set=\$ac_env_${ac_var}_set
906 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
907 eval ac_new_val="\$ac_env_${ac_var}_value"
908 case $ac_old_set,$ac_new_set in
910 { echo "$as_me:910: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
911 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
912 ac_cache_corrupted=: ;;
914 { echo "$as_me:914: error: \`$ac_var' was not set in the previous run" >&5
915 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
916 ac_cache_corrupted=: ;;
919 if test "x$ac_old_val" != "x$ac_new_val"; then
920 { echo "$as_me:920: error: \`$ac_var' has changed since the previous run:" >&5
921 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
922 { echo "$as_me:922: former value: $ac_old_val" >&5
923 echo "$as_me: former value: $ac_old_val" >&2;}
924 { echo "$as_me:924: current value: $ac_new_val" >&5
925 echo "$as_me: current value: $ac_new_val" >&2;}
929 # Pass precious variables to config.status. It doesn't matter if
930 # we pass some twice (in addition to the command line arguments).
931 if test "$ac_new_set" = set; then
933 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
935 ac_configure_args="$ac_configure_args '$ac_arg'"
937 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
942 if $ac_cache_corrupted; then
943 { echo "$as_me:943: error: changes in the environment can compromise the build" >&5
944 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
945 { { echo "$as_me:945: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
946 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
947 { (exit 1); exit 1; }; }
951 ac_cpp='$CPP $CPPFLAGS'
952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
955 ac_main_return=return
957 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
958 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
960 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
961 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
963 echo "#! $SHELL" >conftest.sh
964 echo "exit 0" >>conftest.sh
966 if { (echo "$as_me:966: PATH=\".;.\"; conftest.sh") >&5
967 (PATH=".;."; conftest.sh) 2>&5
969 echo "$as_me:969: \$? = $ac_status" >&5
970 (exit $ac_status); }; then
971 ac_path_separator=';'
975 PATH_SEPARATOR="$ac_path_separator"
978 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
980 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
982 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
985 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986 if test -f $ac_dir/install-sh; then
988 ac_install_sh="$ac_aux_dir/install-sh -c"
990 elif test -f $ac_dir/install.sh; then
992 ac_install_sh="$ac_aux_dir/install.sh -c"
994 elif test -f $ac_dir/shtool; then
996 ac_install_sh="$ac_aux_dir/shtool install -c"
1000 if test -z "$ac_aux_dir"; then
1001 { { echo "$as_me:1001: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1002 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1003 { (exit 1); exit 1; }; }
1005 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1006 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1007 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1009 # Make sure we can run config.sub.
1010 $ac_config_sub sun4 >/dev/null 2>&1 ||
1011 { { echo "$as_me:1011: error: cannot run $ac_config_sub" >&5
1012 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1013 { (exit 1); exit 1; }; }
1015 echo "$as_me:1015: checking build system type" >&5
1016 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1017 if test "${ac_cv_build+set}" = set; then
1018 echo $ECHO_N "(cached) $ECHO_C" >&6
1020 ac_cv_build_alias=$build_alias
1021 test -z "$ac_cv_build_alias" &&
1022 ac_cv_build_alias=`$ac_config_guess`
1023 test -z "$ac_cv_build_alias" &&
1024 { { echo "$as_me:1024: error: cannot guess build type; you must specify one" >&5
1025 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1026 { (exit 1); exit 1; }; }
1027 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1028 { { echo "$as_me:1028: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1029 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1030 { (exit 1); exit 1; }; }
1033 echo "$as_me:1033: result: $ac_cv_build" >&5
1034 echo "${ECHO_T}$ac_cv_build" >&6
1036 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1037 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1038 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1040 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1041 echo "$as_me:1041: checking host system type" >&5
1042 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1043 if test "${ac_cv_host+set}" = set; then
1044 echo $ECHO_N "(cached) $ECHO_C" >&6
1046 ac_cv_host_alias=$host_alias
1047 test -z "$ac_cv_host_alias" &&
1048 ac_cv_host_alias=$ac_cv_build_alias
1049 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1050 { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1051 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1052 { (exit 1); exit 1; }; }
1055 echo "$as_me:1055: result: $ac_cv_host" >&5
1056 echo "${ECHO_T}$ac_cv_host" >&6
1058 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1059 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1060 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1062 system_name="$host_os"
1064 system_name="`(uname -s -r) 2>/dev/null`"
1065 if test -z "$system_name" ; then
1066 system_name="`(hostname) 2>/dev/null`"
1069 test -n "$system_name" &&
1070 cat >>confdefs.h <<EOF
1071 #define SYSTEM_NAME "$system_name"
1074 if test "${cf_cv_system_name+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1077 cf_cv_system_name="$system_name"
1080 test -z "$system_name" && system_name="$cf_cv_system_name"
1081 test -n "$cf_cv_system_name" && echo "$as_me:1081: result: Configuring for $cf_cv_system_name" >&5
1082 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1084 if test ".$system_name" != ".$cf_cv_system_name" ; then
1085 echo "$as_me:1085: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1086 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1087 { { echo "$as_me:1087: error: \"Please remove config.cache and try again.\"" >&5
1088 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1089 { (exit 1); exit 1; }; }
1092 test "$program_prefix" != NONE &&
1093 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1094 # Use a double $ so make ignores it.
1095 test "$program_suffix" != NONE &&
1096 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1097 # Double any \ or $. echo might interpret backslashes.
1098 # By default was `s,x,x', remove it if useless.
1099 cat <<\_ACEOF >conftest.sed
1100 s/[\\$]/&&/g;s/;s,x,x,$//
1102 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1105 echo "$as_me:1105: checking whether ${MAKE-make} sets \${MAKE}" >&5
1106 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1107 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1108 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1109 echo $ECHO_N "(cached) $ECHO_C" >&6
1111 cat >conftest.make <<\EOF
1113 @echo 'ac_maketemp="${MAKE}"'
1115 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1116 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1117 if test -n "$ac_maketemp"; then
1118 eval ac_cv_prog_make_${ac_make}_set=yes
1120 eval ac_cv_prog_make_${ac_make}_set=no
1124 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1125 echo "$as_me:1125: result: yes" >&5
1126 echo "${ECHO_T}yes" >&6
1129 echo "$as_me:1129: result: no" >&5
1130 echo "${ECHO_T}no" >&6
1131 SET_MAKE="MAKE=${MAKE-make}"
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140 if test -n "$ac_tool_prefix"; then
1141 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1142 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1143 echo "$as_me:1143: checking for $ac_word" >&5
1144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145 if test "${ac_cv_prog_CC+set}" = set; then
1146 echo $ECHO_N "(cached) $ECHO_C" >&6
1148 if test -n "$CC"; then
1149 ac_cv_prog_CC="$CC" # Let the user override the test.
1151 ac_save_IFS=$IFS; IFS=$ac_path_separator
1153 for ac_dir in $ac_dummy; do
1155 test -z "$ac_dir" && ac_dir=.
1156 $as_executable_p "$ac_dir/$ac_word" || continue
1157 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1158 echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1165 if test -n "$CC"; then
1166 echo "$as_me:1166: result: $CC" >&5
1167 echo "${ECHO_T}$CC" >&6
1169 echo "$as_me:1169: result: no" >&5
1170 echo "${ECHO_T}no" >&6
1174 if test -z "$ac_cv_prog_CC"; then
1176 # Extract the first word of "gcc", so it can be a program name with args.
1177 set dummy gcc; ac_word=$2
1178 echo "$as_me:1178: checking for $ac_word" >&5
1179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181 echo $ECHO_N "(cached) $ECHO_C" >&6
1183 if test -n "$ac_ct_CC"; then
1184 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1186 ac_save_IFS=$IFS; IFS=$ac_path_separator
1188 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 $as_executable_p "$ac_dir/$ac_word" || continue
1192 ac_cv_prog_ac_ct_CC="gcc"
1193 echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1199 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200 if test -n "$ac_ct_CC"; then
1201 echo "$as_me:1201: result: $ac_ct_CC" >&5
1202 echo "${ECHO_T}$ac_ct_CC" >&6
1204 echo "$as_me:1204: result: no" >&5
1205 echo "${ECHO_T}no" >&6
1213 if test -z "$CC"; then
1214 if test -n "$ac_tool_prefix"; then
1215 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1216 set dummy ${ac_tool_prefix}cc; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_CC+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$CC"; then
1223 ac_cv_prog_CC="$CC" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_CC="${ac_tool_prefix}cc"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1239 if test -n "$CC"; then
1240 echo "$as_me:1240: result: $CC" >&5
1241 echo "${ECHO_T}$CC" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1248 if test -z "$ac_cv_prog_CC"; then
1250 # Extract the first word of "cc", so it can be a program name with args.
1251 set dummy cc; ac_word=$2
1252 echo "$as_me:1252: checking for $ac_word" >&5
1253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1254 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1257 if test -n "$ac_ct_CC"; then
1258 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1260 ac_save_IFS=$IFS; IFS=$ac_path_separator
1262 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 $as_executable_p "$ac_dir/$ac_word" || continue
1266 ac_cv_prog_ac_ct_CC="cc"
1267 echo "$as_me:1267: found $ac_dir/$ac_word" >&5
1273 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1274 if test -n "$ac_ct_CC"; then
1275 echo "$as_me:1275: result: $ac_ct_CC" >&5
1276 echo "${ECHO_T}$ac_ct_CC" >&6
1278 echo "$as_me:1278: result: no" >&5
1279 echo "${ECHO_T}no" >&6
1288 if test -z "$CC"; then
1289 # Extract the first word of "cc", so it can be a program name with args.
1290 set dummy cc; ac_word=$2
1291 echo "$as_me:1291: checking for $ac_word" >&5
1292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1293 if test "${ac_cv_prog_CC+set}" = set; then
1294 echo $ECHO_N "(cached) $ECHO_C" >&6
1296 if test -n "$CC"; then
1297 ac_cv_prog_CC="$CC" # Let the user override the test.
1300 ac_save_IFS=$IFS; IFS=$ac_path_separator
1302 for ac_dir in $ac_dummy; do
1304 test -z "$ac_dir" && ac_dir=.
1305 $as_executable_p "$ac_dir/$ac_word" || continue
1306 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1307 ac_prog_rejected=yes
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1315 if test $ac_prog_rejected = yes; then
1316 # We found a bogon in the path, so make sure we never use it.
1317 set dummy $ac_cv_prog_CC
1319 if test $# != 0; then
1320 # We chose a different compiler from the bogus one.
1321 # However, it has the same basename, so the bogon will be chosen
1322 # first if we set CC to just the basename; use the full file name.
1324 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1332 if test -n "$CC"; then
1333 echo "$as_me:1333: result: $CC" >&5
1334 echo "${ECHO_T}$CC" >&6
1336 echo "$as_me:1336: result: no" >&5
1337 echo "${ECHO_T}no" >&6
1341 if test -z "$CC"; then
1342 if test -n "$ac_tool_prefix"; then
1345 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1346 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1347 echo "$as_me:1347: checking for $ac_word" >&5
1348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1349 if test "${ac_cv_prog_CC+set}" = set; then
1350 echo $ECHO_N "(cached) $ECHO_C" >&6
1352 if test -n "$CC"; then
1353 ac_cv_prog_CC="$CC" # Let the user override the test.
1355 ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 for ac_dir in $ac_dummy; do
1359 test -z "$ac_dir" && ac_dir=.
1360 $as_executable_p "$ac_dir/$ac_word" || continue
1361 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1362 echo "$as_me:1362: found $ac_dir/$ac_word" >&5
1369 if test -n "$CC"; then
1370 echo "$as_me:1370: result: $CC" >&5
1371 echo "${ECHO_T}$CC" >&6
1373 echo "$as_me:1373: result: no" >&5
1374 echo "${ECHO_T}no" >&6
1377 test -n "$CC" && break
1380 if test -z "$CC"; then
1384 # Extract the first word of "$ac_prog", so it can be a program name with args.
1385 set dummy $ac_prog; ac_word=$2
1386 echo "$as_me:1386: checking for $ac_word" >&5
1387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1389 echo $ECHO_N "(cached) $ECHO_C" >&6
1391 if test -n "$ac_ct_CC"; then
1392 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1394 ac_save_IFS=$IFS; IFS=$ac_path_separator
1396 for ac_dir in $ac_dummy; do
1398 test -z "$ac_dir" && ac_dir=.
1399 $as_executable_p "$ac_dir/$ac_word" || continue
1400 ac_cv_prog_ac_ct_CC="$ac_prog"
1401 echo "$as_me:1401: found $ac_dir/$ac_word" >&5
1407 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1408 if test -n "$ac_ct_CC"; then
1409 echo "$as_me:1409: result: $ac_ct_CC" >&5
1410 echo "${ECHO_T}$ac_ct_CC" >&6
1412 echo "$as_me:1412: result: no" >&5
1413 echo "${ECHO_T}no" >&6
1416 test -n "$ac_ct_CC" && break
1424 test -z "$CC" && { { echo "$as_me:1424: error: no acceptable cc found in \$PATH" >&5
1425 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1426 { (exit 1); exit 1; }; }
1428 # Provide some information about the compiler.
1429 echo "$as_me:1429:" \
1430 "checking for C compiler version" >&5
1431 ac_compiler=`set X $ac_compile; echo $2`
1432 { (eval echo "$as_me:1432: \"$ac_compiler --version </dev/null >&5\"") >&5
1433 (eval $ac_compiler --version </dev/null >&5) 2>&5
1435 echo "$as_me:1435: \$? = $ac_status" >&5
1436 (exit $ac_status); }
1437 { (eval echo "$as_me:1437: \"$ac_compiler -v </dev/null >&5\"") >&5
1438 (eval $ac_compiler -v </dev/null >&5) 2>&5
1440 echo "$as_me:1440: \$? = $ac_status" >&5
1441 (exit $ac_status); }
1442 { (eval echo "$as_me:1442: \"$ac_compiler -V </dev/null >&5\"") >&5
1443 (eval $ac_compiler -V </dev/null >&5) 2>&5
1445 echo "$as_me:1445: \$? = $ac_status" >&5
1446 (exit $ac_status); }
1448 cat >conftest.$ac_ext <<_ACEOF
1449 #line 1449 "configure"
1450 #include "confdefs.h"
1460 ac_clean_files_save=$ac_clean_files
1461 ac_clean_files="$ac_clean_files a.out a.exe"
1462 # Try to create an executable without -o first, disregard a.out.
1463 # It will help us diagnose broken compilers, and finding out an intuition
1465 echo "$as_me:1465: checking for C compiler default output" >&5
1466 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1467 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1468 if { (eval echo "$as_me:1468: \"$ac_link_default\"") >&5
1469 (eval $ac_link_default) 2>&5
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit $ac_status); }; then
1473 # Find the output, starting from the most likely. This scheme is
1474 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1476 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1477 ls a.out conftest 2>/dev/null;
1478 ls a.* conftest.* 2>/dev/null`; do
1480 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481 a.out ) # We found the default executable, but exeext='' is most
1484 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1485 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1492 echo "$as_me: failed program was:" >&5
1493 cat conftest.$ac_ext >&5
1494 { { echo "$as_me:1494: error: C compiler cannot create executables" >&5
1495 echo "$as_me: error: C compiler cannot create executables" >&2;}
1496 { (exit 77); exit 77; }; }
1499 ac_exeext=$ac_cv_exeext
1500 echo "$as_me:1500: result: $ac_file" >&5
1501 echo "${ECHO_T}$ac_file" >&6
1503 # Check the compiler produces executables we can run. If not, either
1504 # the compiler is broken, or we cross compile.
1505 echo "$as_me:1505: checking whether the C compiler works" >&5
1506 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1507 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1508 # If not cross compiling, check that we can run a simple program.
1509 if test "$cross_compiling" != yes; then
1510 if { ac_try='./$ac_file'
1511 { (eval echo "$as_me:1511: \"$ac_try\"") >&5
1514 echo "$as_me:1514: \$? = $ac_status" >&5
1515 (exit $ac_status); }; }; then
1518 if test "$cross_compiling" = maybe; then
1521 { { echo "$as_me:1521: error: cannot run C compiled programs.
1522 If you meant to cross compile, use \`--host'." >&5
1523 echo "$as_me: error: cannot run C compiled programs.
1524 If you meant to cross compile, use \`--host'." >&2;}
1525 { (exit 1); exit 1; }; }
1529 echo "$as_me:1529: result: yes" >&5
1530 echo "${ECHO_T}yes" >&6
1532 rm -f a.out a.exe conftest$ac_cv_exeext
1533 ac_clean_files=$ac_clean_files_save
1534 # Check the compiler produces executables we can run. If not, either
1535 # the compiler is broken, or we cross compile.
1536 echo "$as_me:1536: checking whether we are cross compiling" >&5
1537 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1538 echo "$as_me:1538: result: $cross_compiling" >&5
1539 echo "${ECHO_T}$cross_compiling" >&6
1541 echo "$as_me:1541: checking for executable suffix" >&5
1542 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1543 if { (eval echo "$as_me:1543: \"$ac_link\"") >&5
1544 (eval $ac_link) 2>&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); }; then
1548 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1549 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1550 # work properly (i.e., refer to `conftest.exe'), while it won't with
1552 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1554 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1555 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1562 { { echo "$as_me:1562: error: cannot compute EXEEXT: cannot compile and link" >&5
1563 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1564 { (exit 1); exit 1; }; }
1567 rm -f conftest$ac_cv_exeext
1568 echo "$as_me:1568: result: $ac_cv_exeext" >&5
1569 echo "${ECHO_T}$ac_cv_exeext" >&6
1571 rm -f conftest.$ac_ext
1572 EXEEXT=$ac_cv_exeext
1574 echo "$as_me:1574: checking for object suffix" >&5
1575 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1576 if test "${ac_cv_objext+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1591 rm -f conftest.o conftest.obj
1592 if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); }; then
1597 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1599 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1600 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1605 echo "$as_me: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1607 { { echo "$as_me:1607: error: cannot compute OBJEXT: cannot compile" >&5
1608 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1609 { (exit 1); exit 1; }; }
1612 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1614 echo "$as_me:1614: result: $ac_cv_objext" >&5
1615 echo "${ECHO_T}$ac_cv_objext" >&6
1616 OBJEXT=$ac_cv_objext
1618 echo "$as_me:1618: checking whether we are using the GNU C compiler" >&5
1619 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1620 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1621 echo $ECHO_N "(cached) $ECHO_C" >&6
1623 cat >conftest.$ac_ext <<_ACEOF
1624 #line 1624 "configure"
1625 #include "confdefs.h"
1638 rm -f conftest.$ac_objext
1639 if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640 (eval $ac_compile) 2>&5
1642 echo "$as_me:1642: \$? = $ac_status" >&5
1643 (exit $ac_status); } &&
1644 { ac_try='test -s conftest.$ac_objext'
1645 { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); }; }; then
1652 echo "$as_me: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1656 rm -f conftest.$ac_objext conftest.$ac_ext
1657 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1660 echo "$as_me:1660: result: $ac_cv_c_compiler_gnu" >&5
1661 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1662 GCC=`test $ac_compiler_gnu = yes && echo yes`
1663 ac_test_CFLAGS=${CFLAGS+set}
1664 ac_save_CFLAGS=$CFLAGS
1666 echo "$as_me:1666: checking whether $CC accepts -g" >&5
1667 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1668 if test "${ac_cv_prog_cc_g+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1671 cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1683 rm -f conftest.$ac_objext
1684 if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5
1685 (eval $ac_compile) 2>&5
1687 echo "$as_me:1687: \$? = $ac_status" >&5
1688 (exit $ac_status); } &&
1689 { ac_try='test -s conftest.$ac_objext'
1690 { (eval echo "$as_me:1690: \"$ac_try\"") >&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); }; }; then
1697 echo "$as_me: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1701 rm -f conftest.$ac_objext conftest.$ac_ext
1703 echo "$as_me:1703: result: $ac_cv_prog_cc_g" >&5
1704 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1705 if test "$ac_test_CFLAGS" = set; then
1706 CFLAGS=$ac_save_CFLAGS
1707 elif test $ac_cv_prog_cc_g = yes; then
1708 if test "$GCC" = yes; then
1714 if test "$GCC" = yes; then
1720 # Some people use a C++ compiler to compile C. Since we use `exit',
1721 # in C++ we need to declare it. In case someone uses the same compiler
1722 # for both compiling C and C++ we need to have the C++ compiler decide
1723 # the declaration of exit, since it's the most demanding environment.
1724 cat >conftest.$ac_ext <<_ACEOF
1729 rm -f conftest.$ac_objext
1730 if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731 (eval $ac_compile) 2>&5
1733 echo "$as_me:1733: \$? = $ac_status" >&5
1734 (exit $ac_status); } &&
1735 { ac_try='test -s conftest.$ac_objext'
1736 { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); }; }; then
1741 for ac_declaration in \
1743 '#include <stdlib.h>' \
1744 'extern "C" void std::exit (int) throw (); using std::exit;' \
1745 'extern "C" void std::exit (int); using std::exit;' \
1746 'extern "C" void exit (int) throw ();' \
1747 'extern "C" void exit (int);' \
1750 cat >conftest.$ac_ext <<_ACEOF
1751 #line 1751 "configure"
1752 #include "confdefs.h"
1763 rm -f conftest.$ac_objext
1764 if { (eval echo "$as_me:1764: \"$ac_compile\"") >&5
1765 (eval $ac_compile) 2>&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); } &&
1769 { ac_try='test -s conftest.$ac_objext'
1770 { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); }; }; then
1777 echo "$as_me: failed program was:" >&5
1778 cat conftest.$ac_ext >&5
1781 rm -f conftest.$ac_objext conftest.$ac_ext
1782 cat >conftest.$ac_ext <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1794 rm -f conftest.$ac_objext
1795 if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit $ac_status); } &&
1800 { ac_try='test -s conftest.$ac_objext'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); }; }; then
1808 echo "$as_me: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
1811 rm -f conftest.$ac_objext conftest.$ac_ext
1814 if test -n "$ac_declaration"; then
1815 echo '#ifdef __cplusplus' >>confdefs.h
1816 echo $ac_declaration >>confdefs.h
1817 echo '#endif' >>confdefs.h
1821 echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1824 rm -f conftest.$ac_objext conftest.$ac_ext
1826 ac_cpp='$CPP $CPPFLAGS'
1827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830 ac_main_return=return
1833 if test "$GCC" = yes ; then
1834 echo "$as_me:1834: checking version of $CC" >&5
1835 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1836 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1837 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1838 echo "$as_me:1838: result: $GCC_VERSION" >&5
1839 echo "${ECHO_T}$GCC_VERSION" >&6
1842 echo "$as_me:1842: checking for $CC option to accept ANSI C" >&5
1843 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1844 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1845 echo $ECHO_N "(cached) $ECHO_C" >&6
1847 ac_cv_prog_cc_stdc=no
1849 cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1854 #include <sys/types.h>
1855 #include <sys/stat.h>
1856 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1857 struct buf { int x; };
1858 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1859 static char *e (p, i)
1865 static char *f (char * (*g) (char **, int), char **p, ...)
1870 s = g (p, va_arg (v,int));
1874 int test (int i, double x);
1875 struct s1 {int (*f) (int a);};
1876 struct s2 {int (*f) (double a);};
1877 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1883 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1888 # Don't try gcc -ansi; that turns off useful extensions and
1889 # breaks some systems' header files.
1890 # AIX -qlanglvl=ansi
1891 # Ultrix and OSF/1 -std1
1892 # HP-UX 10.20 and later -Ae
1893 # HP-UX older versions -Aa -D_HPUX_SOURCE
1894 # SVR4 -Xc -D__EXTENSIONS__
1895 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1897 CC="$ac_save_CC $ac_arg"
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900 (eval $ac_compile) 2>&5
1902 echo "$as_me:1902: \$? = $ac_status" >&5
1903 (exit $ac_status); } &&
1904 { ac_try='test -s conftest.$ac_objext'
1905 { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); }; }; then
1910 ac_cv_prog_cc_stdc=$ac_arg
1913 echo "$as_me: failed program was:" >&5
1914 cat conftest.$ac_ext >&5
1916 rm -f conftest.$ac_objext
1918 rm -f conftest.$ac_ext conftest.$ac_objext
1923 case "x$ac_cv_prog_cc_stdc" in
1925 echo "$as_me:1925: result: none needed" >&5
1926 echo "${ECHO_T}none needed" >&6 ;;
1928 echo "$as_me:1928: result: $ac_cv_prog_cc_stdc" >&5
1929 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1930 CC="$CC $ac_cv_prog_cc_stdc" ;;
1933 # This should have been defined by AC_PROG_CC
1936 echo "$as_me:1936: checking \$CC variable" >&5
1937 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1940 echo "$as_me:1940: result: broken" >&5
1941 echo "${ECHO_T}broken" >&6
1942 { echo "$as_me:1942: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1943 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1945 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ][ ]*//'`
1946 CC=`echo "$CC " | sed -e 's/[ ]-[IUD][^ ][^ ]*//g' -e 's/[ ]*$//'`
1951 cf_new_extra_cppflags=
1953 for cf_add_cflags in $cf_flags
1955 case $cf_fix_cppflags in
1957 case $cf_add_cflags in
1958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1959 case $cf_add_cflags in
1961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1964 && test -z "${cf_tst_cflags}" \
1965 && cf_fix_cppflags=yes
1967 if test $cf_fix_cppflags = yes ; then
1968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1970 elif test "${cf_tst_cflags}" = "\"'" ; then
1971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1980 case $cf_add_cflags in
1982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1984 CPPFLAGS=`echo "$CPPFLAGS" | \
1985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2005 && test -z "${cf_tst_cflags}" \
2006 && cf_fix_cppflags=no
2011 if test -n "$cf_new_cflags" ; then
2013 CFLAGS="$CFLAGS $cf_new_cflags"
2016 if test -n "$cf_new_cppflags" ; then
2018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2021 if test -n "$cf_new_extra_cppflags" ; then
2023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2026 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2028 echo "${as_me:-configure}:2028: testing resulting CC: '$CC' ..." 1>&5
2030 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2032 echo "${as_me:-configure}:2032: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2034 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2036 echo "${as_me:-configure}:2036: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2040 echo "$as_me:2040: result: ok" >&5
2041 echo "${ECHO_T}ok" >&6
2046 ac_cpp='$CPP $CPPFLAGS'
2047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2050 ac_main_return=return
2051 echo "$as_me:2051: checking how to run the C preprocessor" >&5
2052 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2053 # On Suns, sometimes $CPP names a directory.
2054 if test -n "$CPP" && test -d "$CPP"; then
2057 if test -z "$CPP"; then
2058 if test "${ac_cv_prog_CPP+set}" = set; then
2059 echo $ECHO_N "(cached) $ECHO_C" >&6
2061 # Double quotes because CPP needs to be expanded
2062 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2065 for ac_c_preproc_warn_flag in '' yes
2067 # Use a header file that comes with gcc, so configuring glibc
2068 # with a fresh cross-compiler works.
2069 # On the NeXT, cc -E runs the code through the compiler's parser,
2070 # not just through cpp. "Syntax error" is here to catch this case.
2071 cat >conftest.$ac_ext <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2077 if { (eval echo "$as_me:2077: \"$ac_cpp conftest.$ac_ext\"") >&5
2078 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2080 egrep -v '^ *\+' conftest.er1 >conftest.err
2082 cat conftest.err >&5
2083 echo "$as_me:2083: \$? = $ac_status" >&5
2084 (exit $ac_status); } >/dev/null; then
2085 if test -s conftest.err; then
2086 ac_cpp_err=$ac_c_preproc_warn_flag
2093 if test -z "$ac_cpp_err"; then
2096 echo "$as_me: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 # Broken: fails on valid input.
2101 rm -f conftest.err conftest.$ac_ext
2103 # OK, works on sane cases. Now check whether non-existent headers
2104 # can be detected and how.
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <ac_nonexistent.h>
2110 if { (eval echo "$as_me:2110: \"$ac_cpp conftest.$ac_ext\"") >&5
2111 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2113 egrep -v '^ *\+' conftest.er1 >conftest.err
2115 cat conftest.err >&5
2116 echo "$as_me:2116: \$? = $ac_status" >&5
2117 (exit $ac_status); } >/dev/null; then
2118 if test -s conftest.err; then
2119 ac_cpp_err=$ac_c_preproc_warn_flag
2126 if test -z "$ac_cpp_err"; then
2127 # Broken: success on invalid input.
2130 echo "$as_me: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2132 # Passes both tests.
2136 rm -f conftest.err conftest.$ac_ext
2139 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2140 rm -f conftest.err conftest.$ac_ext
2141 if $ac_preproc_ok; then
2153 echo "$as_me:2153: result: $CPP" >&5
2154 echo "${ECHO_T}$CPP" >&6
2156 for ac_c_preproc_warn_flag in '' yes
2158 # Use a header file that comes with gcc, so configuring glibc
2159 # with a fresh cross-compiler works.
2160 # On the NeXT, cc -E runs the code through the compiler's parser,
2161 # not just through cpp. "Syntax error" is here to catch this case.
2162 cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171 egrep -v '^ *\+' conftest.er1 >conftest.err
2173 cat conftest.err >&5
2174 echo "$as_me:2174: \$? = $ac_status" >&5
2175 (exit $ac_status); } >/dev/null; then
2176 if test -s conftest.err; then
2177 ac_cpp_err=$ac_c_preproc_warn_flag
2184 if test -z "$ac_cpp_err"; then
2187 echo "$as_me: failed program was:" >&5
2188 cat conftest.$ac_ext >&5
2189 # Broken: fails on valid input.
2192 rm -f conftest.err conftest.$ac_ext
2194 # OK, works on sane cases. Now check whether non-existent headers
2195 # can be detected and how.
2196 cat >conftest.$ac_ext <<_ACEOF
2197 #line 2197 "configure"
2198 #include "confdefs.h"
2199 #include <ac_nonexistent.h>
2201 if { (eval echo "$as_me:2201: \"$ac_cpp conftest.$ac_ext\"") >&5
2202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204 egrep -v '^ *\+' conftest.er1 >conftest.err
2206 cat conftest.err >&5
2207 echo "$as_me:2207: \$? = $ac_status" >&5
2208 (exit $ac_status); } >/dev/null; then
2209 if test -s conftest.err; then
2210 ac_cpp_err=$ac_c_preproc_warn_flag
2217 if test -z "$ac_cpp_err"; then
2218 # Broken: success on invalid input.
2221 echo "$as_me: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2223 # Passes both tests.
2227 rm -f conftest.err conftest.$ac_ext
2230 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2231 rm -f conftest.err conftest.$ac_ext
2232 if $ac_preproc_ok; then
2235 { { echo "$as_me:2235: error: C preprocessor \"$CPP\" fails sanity check" >&5
2236 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2237 { (exit 1); exit 1; }; }
2241 ac_cpp='$CPP $CPPFLAGS'
2242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2245 ac_main_return=return
2247 for ac_prog in mawk gawk nawk awk
2249 # Extract the first word of "$ac_prog", so it can be a program name with args.
2250 set dummy $ac_prog; ac_word=$2
2251 echo "$as_me:2251: checking for $ac_word" >&5
2252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2253 if test "${ac_cv_prog_AWK+set}" = set; then
2254 echo $ECHO_N "(cached) $ECHO_C" >&6
2256 if test -n "$AWK"; then
2257 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2259 ac_save_IFS=$IFS; IFS=$ac_path_separator
2261 for ac_dir in $ac_dummy; do
2263 test -z "$ac_dir" && ac_dir=.
2264 $as_executable_p "$ac_dir/$ac_word" || continue
2265 ac_cv_prog_AWK="$ac_prog"
2266 echo "$as_me:2266: found $ac_dir/$ac_word" >&5
2273 if test -n "$AWK"; then
2274 echo "$as_me:2274: result: $AWK" >&5
2275 echo "${ECHO_T}$AWK" >&6
2277 echo "$as_me:2277: result: no" >&5
2278 echo "${ECHO_T}no" >&6
2281 test -n "$AWK" && break
2284 # Find a good install program. We prefer a C program (faster),
2285 # so one script is as good as another. But avoid the broken or
2286 # incompatible versions:
2287 # SysV /etc/install, /usr/sbin/install
2288 # SunOS /usr/etc/install
2289 # IRIX /sbin/install
2291 # AmigaOS /C/install, which installs bootblocks on floppy discs
2292 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2293 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2294 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2295 # ./install, which can be erroneously created by make from ./install.sh.
2296 echo "$as_me:2296: checking for a BSD compatible install" >&5
2297 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2298 if test -z "$INSTALL"; then
2299 if test "${ac_cv_path_install+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
2302 ac_save_IFS=$IFS; IFS=$ac_path_separator
2303 for ac_dir in $PATH; do
2305 # Account for people who put trailing slashes in PATH elements.
2307 / | ./ | .// | /cC/* \
2308 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2311 # OSF1 and SCO ODT 3.0 have their own names for install.
2312 # Don't use installbsd from OSF since it installs stuff as root
2314 for ac_prog in ginstall scoinst install; do
2315 if $as_executable_p "$ac_dir/$ac_prog"; then
2316 if test $ac_prog = install &&
2317 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2318 # AIX install. It has an incompatible calling convention.
2320 elif test $ac_prog = install &&
2321 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2322 # program-specific install script used by HP pwplus--don't use.
2325 ac_cv_path_install="$ac_dir/$ac_prog -c"
2335 if test "${ac_cv_path_install+set}" = set; then
2336 INSTALL=$ac_cv_path_install
2338 # As a last resort, use the slow shell script. We don't cache a
2339 # path for INSTALL within a source directory, because that will
2340 # break other packages using the cache if that directory is
2341 # removed, or if the path is relative.
2342 INSTALL=$ac_install_sh
2345 echo "$as_me:2345: result: $INSTALL" >&5
2346 echo "${ECHO_T}$INSTALL" >&6
2348 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2349 # It thinks the first close brace ends the variable substitution.
2350 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2352 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2354 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2360 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2361 test -z "$cf_dir" && cf_dir=.
2362 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2366 for ac_prog in lint cppcheck splint
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo "$as_me:2370: checking for $ac_word" >&5
2371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2372 if test "${ac_cv_prog_LINT+set}" = set; then
2373 echo $ECHO_N "(cached) $ECHO_C" >&6
2375 if test -n "$LINT"; then
2376 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2378 ac_save_IFS=$IFS; IFS=$ac_path_separator
2380 for ac_dir in $ac_dummy; do
2382 test -z "$ac_dir" && ac_dir=.
2383 $as_executable_p "$ac_dir/$ac_word" || continue
2384 ac_cv_prog_LINT="$ac_prog"
2385 echo "$as_me:2385: found $ac_dir/$ac_word" >&5
2391 LINT=$ac_cv_prog_LINT
2392 if test -n "$LINT"; then
2393 echo "$as_me:2393: result: $LINT" >&5
2394 echo "${ECHO_T}$LINT" >&6
2396 echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2400 test -n "$LINT" && break
2403 echo "$as_me:2403: checking if filesystem supports mixed-case filenames" >&5
2404 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2405 if test "${cf_cv_mixedcase+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 if test "$cross_compiling" = yes ; then
2410 case $target_alias in
2411 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2419 rm -f conftest CONFTEST
2421 if test -f CONFTEST ; then
2426 rm -f conftest CONFTEST
2430 echo "$as_me:2430: result: $cf_cv_mixedcase" >&5
2431 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2432 test "$cf_cv_mixedcase" = yes &&
2433 cat >>confdefs.h <<\EOF
2434 #define MIXEDCASE_FILENAMES 1
2437 for ac_prog in exctags ctags
2439 # Extract the first word of "$ac_prog", so it can be a program name with args.
2440 set dummy $ac_prog; ac_word=$2
2441 echo "$as_me:2441: checking for $ac_word" >&5
2442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2443 if test "${ac_cv_prog_CTAGS+set}" = set; then
2444 echo $ECHO_N "(cached) $ECHO_C" >&6
2446 if test -n "$CTAGS"; then
2447 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2449 ac_save_IFS=$IFS; IFS=$ac_path_separator
2451 for ac_dir in $ac_dummy; do
2453 test -z "$ac_dir" && ac_dir=.
2454 $as_executable_p "$ac_dir/$ac_word" || continue
2455 ac_cv_prog_CTAGS="$ac_prog"
2456 echo "$as_me:2456: found $ac_dir/$ac_word" >&5
2462 CTAGS=$ac_cv_prog_CTAGS
2463 if test -n "$CTAGS"; then
2464 echo "$as_me:2464: result: $CTAGS" >&5
2465 echo "${ECHO_T}$CTAGS" >&6
2467 echo "$as_me:2467: result: no" >&5
2468 echo "${ECHO_T}no" >&6
2471 test -n "$CTAGS" && break
2474 for ac_prog in exetags etags
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477 set dummy $ac_prog; ac_word=$2
2478 echo "$as_me:2478: checking for $ac_word" >&5
2479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2480 if test "${ac_cv_prog_ETAGS+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2483 if test -n "$ETAGS"; then
2484 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2486 ac_save_IFS=$IFS; IFS=$ac_path_separator
2488 for ac_dir in $ac_dummy; do
2490 test -z "$ac_dir" && ac_dir=.
2491 $as_executable_p "$ac_dir/$ac_word" || continue
2492 ac_cv_prog_ETAGS="$ac_prog"
2493 echo "$as_me:2493: found $ac_dir/$ac_word" >&5
2499 ETAGS=$ac_cv_prog_ETAGS
2500 if test -n "$ETAGS"; then
2501 echo "$as_me:2501: result: $ETAGS" >&5
2502 echo "${ECHO_T}$ETAGS" >&6
2504 echo "$as_me:2504: result: no" >&5
2505 echo "${ECHO_T}no" >&6
2508 test -n "$ETAGS" && break
2511 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2512 set dummy ${CTAGS:-ctags}; ac_word=$2
2513 echo "$as_me:2513: checking for $ac_word" >&5
2514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2515 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2518 if test -n "$MAKE_LOWER_TAGS"; then
2519 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2523 for ac_dir in $ac_dummy; do
2525 test -z "$ac_dir" && ac_dir=.
2526 $as_executable_p "$ac_dir/$ac_word" || continue
2527 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2528 echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2532 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2535 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2536 if test -n "$MAKE_LOWER_TAGS"; then
2537 echo "$as_me:2537: result: $MAKE_LOWER_TAGS" >&5
2538 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2540 echo "$as_me:2540: result: no" >&5
2541 echo "${ECHO_T}no" >&6
2544 if test "$cf_cv_mixedcase" = yes ; then
2545 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2546 set dummy ${ETAGS:-etags}; ac_word=$2
2547 echo "$as_me:2547: checking for $ac_word" >&5
2548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2549 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2550 echo $ECHO_N "(cached) $ECHO_C" >&6
2552 if test -n "$MAKE_UPPER_TAGS"; then
2553 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2555 ac_save_IFS=$IFS; IFS=$ac_path_separator
2557 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 $as_executable_p "$ac_dir/$ac_word" || continue
2561 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2562 echo "$as_me:2562: found $ac_dir/$ac_word" >&5
2566 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2569 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2570 if test -n "$MAKE_UPPER_TAGS"; then
2571 echo "$as_me:2571: result: $MAKE_UPPER_TAGS" >&5
2572 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2574 echo "$as_me:2574: result: no" >&5
2575 echo "${ECHO_T}no" >&6
2582 if test "$MAKE_UPPER_TAGS" = yes ; then
2588 if test "$MAKE_LOWER_TAGS" = yes ; then
2594 echo "$as_me:2594: checking if -lm needed for math functions" >&5
2595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2596 if test "${cf_cv_need_libm+set}" = set; then
2597 echo $ECHO_N "(cached) $ECHO_C" >&6
2600 cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2610 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2615 rm -f conftest.$ac_objext conftest$ac_exeext
2616 if { (eval echo "$as_me:2616: \"$ac_link\"") >&5
2617 (eval $ac_link) 2>&5
2619 echo "$as_me:2619: \$? = $ac_status" >&5
2620 (exit $ac_status); } &&
2621 { ac_try='test -s conftest$ac_exeext'
2622 { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit $ac_status); }; }; then
2629 echo "$as_me: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2635 echo "$as_me:2635: result: $cf_cv_need_libm" >&5
2636 echo "${ECHO_T}$cf_cv_need_libm" >&6
2637 if test "$cf_cv_need_libm" = yes
2645 CC_SHARED_OPTS=unknown
2646 CPPFLAGS="$CPPFLAGS"
2648 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2649 DFT_UPR_MODEL="NORMAL"
2662 PACKAGE="ncurses-examples"
2668 TINFO_LIBS='$(LIBS_CURSES)'
2669 cf_cv_abi_version=""
2670 cf_cv_rel_version=""
2676 if test "$GCC" = yes
2678 cat > conftest.i <<EOF
2680 #define GCC_PRINTF 0
2685 #ifndef GCC_NORETURN
2686 #define GCC_NORETURN /* nothing */
2689 #define GCC_UNUSED /* nothing */
2692 if test "$GCC" = yes
2694 { echo "$as_me:2694: checking for $CC __attribute__ directives..." >&5
2695 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2697 "${as_me:-configure}"
2698 #include "confdefs.h"
2699 #include "conftest.h"
2700 #include "conftest.i"
2702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2707 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2709 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2712 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2713 extern void foo(void) GCC_NORETURN;
2714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2716 cf_printf_attribute=no
2717 cf_scanf_attribute=no
2718 for cf_attribute in scanf printf unused noreturn
2721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2723 cf_directive="__attribute__(($cf_attribute))"
2724 echo "checking for $CC $cf_directive" 1>&5
2726 case $cf_attribute in
2728 cf_printf_attribute=yes
2729 cat >conftest.h <<EOF
2730 #define GCC_$cf_ATTRIBUTE 1
2734 cf_scanf_attribute=yes
2735 cat >conftest.h <<EOF
2736 #define GCC_$cf_ATTRIBUTE 1
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE $cf_directive
2746 if { (eval echo "$as_me:2746: \"$ac_compile\"") >&5
2747 (eval $ac_compile) 2>&5
2749 echo "$as_me:2749: \$? = $ac_status" >&5
2750 (exit $ac_status); }; then
2751 test -n "$verbose" && echo "$as_me:2751: result: ... $cf_attribute" >&5
2752 echo "${ECHO_T}... $cf_attribute" >&6
2753 cat conftest.h >>confdefs.h
2754 case $cf_attribute in
2757 cat >>confdefs.h <<EOF
2758 #define GCC_NORETURN $cf_directive
2763 cf_value='/* nothing */'
2764 if test "$cf_printf_attribute" != no ; then
2765 cf_value='__attribute__((format(printf,fmt,var)))'
2767 cat >>confdefs.h <<\EOF
2768 #define GCC_PRINTF 1
2773 cat >>confdefs.h <<EOF
2774 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2779 cf_value='/* nothing */'
2780 if test "$cf_scanf_attribute" != no ; then
2781 cf_value='__attribute__((format(scanf,fmt,var)))'
2783 cat >>confdefs.h <<\EOF
2789 cat >>confdefs.h <<EOF
2790 #define GCC_SCANFLIKE(fmt,var) $cf_value
2796 cat >>confdefs.h <<EOF
2797 #define GCC_UNUSED $cf_directive
2805 fgrep define conftest.i >>confdefs.h
2811 cf_POSIX_C_SOURCE=199506L
2816 cf_xopen_source="-D_ALL_SOURCE"
2822 cf_xopen_source="-D_APPLE_C_SOURCE"
2825 cf_xopen_source="-D_DARWIN_C_SOURCE"
2828 (freebsd*|dragonfly*)
2829 # 5.x headers associate
2830 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2831 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2832 cf_POSIX_C_SOURCE=200112L
2834 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2837 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2840 cf_xopen_source="-D_HPUX_SOURCE"
2843 cf_xopen_source="-D_SGI_SOURCE"
2846 (linux*|gnu*|mint*|k*bsd*-gnu)
2848 echo "$as_me:2848: checking if we must define _GNU_SOURCE" >&5
2849 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2850 if test "${cf_cv_gnu_source+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2854 cat >conftest.$ac_ext <<_ACEOF
2855 #line 2855 "configure"
2856 #include "confdefs.h"
2857 #include <sys/types.h>
2862 #ifndef _XOPEN_SOURCE
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871 (eval $ac_compile) 2>&5
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); } &&
2875 { ac_try='test -s conftest.$ac_objext'
2876 { (eval echo "$as_me:2876: \"$ac_try\"") >&5
2879 echo "$as_me:2879: \$? = $ac_status" >&5
2880 (exit $ac_status); }; }; then
2883 echo "$as_me: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2886 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2887 cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890 #include <sys/types.h>
2895 #ifdef _XOPEN_SOURCE
2902 rm -f conftest.$ac_objext
2903 if { (eval echo "$as_me:2903: \"$ac_compile\"") >&5
2904 (eval $ac_compile) 2>&5
2906 echo "$as_me:2906: \$? = $ac_status" >&5
2907 (exit $ac_status); } &&
2908 { ac_try='test -s conftest.$ac_objext'
2909 { (eval echo "$as_me:2909: \"$ac_try\"") >&5
2912 echo "$as_me:2912: \$? = $ac_status" >&5
2913 (exit $ac_status); }; }; then
2916 echo "$as_me: failed program was:" >&5
2917 cat conftest.$ac_ext >&5
2918 cf_cv_gnu_source=yes
2920 rm -f conftest.$ac_objext conftest.$ac_ext
2924 rm -f conftest.$ac_objext conftest.$ac_ext
2927 echo "$as_me:2927: result: $cf_cv_gnu_source" >&5
2928 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2930 if test "$cf_cv_gnu_source" = yes
2932 echo "$as_me:2932: checking if we should also define _DEFAULT_SOURCE" >&5
2933 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
2934 if test "${cf_cv_default_source+set}" = set; then
2935 echo $ECHO_N "(cached) $ECHO_C" >&6
2938 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2939 cat >conftest.$ac_ext <<_ACEOF
2940 #line 2940 "configure"
2941 #include "confdefs.h"
2942 #include <sys/types.h>
2947 #ifdef _DEFAULT_SOURCE
2954 rm -f conftest.$ac_objext
2955 if { (eval echo "$as_me:2955: \"$ac_compile\"") >&5
2956 (eval $ac_compile) 2>&5
2958 echo "$as_me:2958: \$? = $ac_status" >&5
2959 (exit $ac_status); } &&
2960 { ac_try='test -s conftest.$ac_objext'
2961 { (eval echo "$as_me:2961: \"$ac_try\"") >&5
2964 echo "$as_me:2964: \$? = $ac_status" >&5
2965 (exit $ac_status); }; }; then
2966 cf_cv_default_source=no
2968 echo "$as_me: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 cf_cv_default_source=yes
2972 rm -f conftest.$ac_objext conftest.$ac_ext
2975 echo "$as_me:2975: result: $cf_cv_default_source" >&5
2976 echo "${ECHO_T}$cf_cv_default_source" >&6
2977 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
2982 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2985 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2988 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2990 cf_save_CFLAGS="$CFLAGS"
2991 cf_save_CPPFLAGS="$CPPFLAGS"
2993 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2994 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2995 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2997 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2998 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2999 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3001 echo "$as_me:3001: checking if we should define _POSIX_C_SOURCE" >&5
3002 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3003 if test "${cf_cv_posix_c_source+set}" = set; then
3004 echo $ECHO_N "(cached) $ECHO_C" >&6
3007 echo "${as_me:-configure}:3007: testing if the symbol is already defined go no further ..." 1>&5
3009 cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3012 #include <sys/types.h>
3017 #ifndef _POSIX_C_SOURCE
3024 rm -f conftest.$ac_objext
3025 if { (eval echo "$as_me:3025: \"$ac_compile\"") >&5
3026 (eval $ac_compile) 2>&5
3028 echo "$as_me:3028: \$? = $ac_status" >&5
3029 (exit $ac_status); } &&
3030 { ac_try='test -s conftest.$ac_objext'
3031 { (eval echo "$as_me:3031: \"$ac_try\"") >&5
3034 echo "$as_me:3034: \$? = $ac_status" >&5
3035 (exit $ac_status); }; }; then
3036 cf_cv_posix_c_source=no
3038 echo "$as_me: failed program was:" >&5
3039 cat conftest.$ac_ext >&5
3040 cf_want_posix_source=no
3041 case .$cf_POSIX_C_SOURCE in
3043 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3046 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3047 cf_want_posix_source=yes
3050 cf_want_posix_source=yes
3053 if test "$cf_want_posix_source" = yes ; then
3054 cat >conftest.$ac_ext <<_ACEOF
3055 #line 3055 "configure"
3056 #include "confdefs.h"
3057 #include <sys/types.h>
3062 #ifdef _POSIX_SOURCE
3069 rm -f conftest.$ac_objext
3070 if { (eval echo "$as_me:3070: \"$ac_compile\"") >&5
3071 (eval $ac_compile) 2>&5
3073 echo "$as_me:3073: \$? = $ac_status" >&5
3074 (exit $ac_status); } &&
3075 { ac_try='test -s conftest.$ac_objext'
3076 { (eval echo "$as_me:3076: \"$ac_try\"") >&5
3079 echo "$as_me:3079: \$? = $ac_status" >&5
3080 (exit $ac_status); }; }; then
3083 echo "$as_me: failed program was:" >&5
3084 cat conftest.$ac_ext >&5
3085 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3087 rm -f conftest.$ac_objext conftest.$ac_ext
3090 echo "${as_me:-configure}:3090: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3092 CFLAGS="$cf_trim_CFLAGS"
3093 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3095 echo "${as_me:-configure}:3095: testing if the second compile does not leave our definition intact error ..." 1>&5
3097 cat >conftest.$ac_ext <<_ACEOF
3098 #line 3098 "configure"
3099 #include "confdefs.h"
3100 #include <sys/types.h>
3105 #ifndef _POSIX_C_SOURCE
3112 rm -f conftest.$ac_objext
3113 if { (eval echo "$as_me:3113: \"$ac_compile\"") >&5
3114 (eval $ac_compile) 2>&5
3116 echo "$as_me:3116: \$? = $ac_status" >&5
3117 (exit $ac_status); } &&
3118 { ac_try='test -s conftest.$ac_objext'
3119 { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3122 echo "$as_me:3122: \$? = $ac_status" >&5
3123 (exit $ac_status); }; }; then
3126 echo "$as_me: failed program was:" >&5
3127 cat conftest.$ac_ext >&5
3128 cf_cv_posix_c_source=no
3130 rm -f conftest.$ac_objext conftest.$ac_ext
3131 CFLAGS="$cf_save_CFLAGS"
3132 CPPFLAGS="$cf_save_CPPFLAGS"
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3138 echo "$as_me:3138: result: $cf_cv_posix_c_source" >&5
3139 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3141 if test "$cf_cv_posix_c_source" != no ; then
3142 CFLAGS="$cf_trim_CFLAGS"
3143 CPPFLAGS="$cf_trim_CPPFLAGS"
3148 cf_new_extra_cppflags=
3150 for cf_add_cflags in $cf_cv_posix_c_source
3152 case $cf_fix_cppflags in
3154 case $cf_add_cflags in
3155 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3156 case $cf_add_cflags in
3158 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3160 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3161 && test -z "${cf_tst_cflags}" \
3162 && cf_fix_cppflags=yes
3164 if test $cf_fix_cppflags = yes ; then
3165 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3167 elif test "${cf_tst_cflags}" = "\"'" ; then
3168 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3177 case $cf_add_cflags in
3179 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3181 CPPFLAGS=`echo "$CPPFLAGS" | \
3182 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3183 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3187 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3192 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3197 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3199 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3202 && test -z "${cf_tst_cflags}" \
3203 && cf_fix_cppflags=no
3208 if test -n "$cf_new_cflags" ; then
3210 CFLAGS="$CFLAGS $cf_new_cflags"
3213 if test -n "$cf_new_cppflags" ; then
3215 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3218 if test -n "$cf_new_extra_cppflags" ; then
3220 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3227 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3230 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3231 cf_xopen_source="-D_BSD_SOURCE"
3235 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3241 cf_xopen_source="-D_OSF_SOURCE"
3244 cf_xopen_source="-D_QNX_SOURCE"
3247 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3250 cf_xopen_source="-D__EXTENSIONS__"
3251 cf_cv_xopen_source=broken
3253 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3259 echo "$as_me:3259: checking if we should define _XOPEN_SOURCE" >&5
3260 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3261 if test "${cf_cv_xopen_source+set}" = set; then
3262 echo $ECHO_N "(cached) $ECHO_C" >&6
3265 cat >conftest.$ac_ext <<_ACEOF
3266 #line 3266 "configure"
3267 #include "confdefs.h"
3271 #include <sys/types.h>
3277 #ifndef _XOPEN_SOURCE
3284 rm -f conftest.$ac_objext
3285 if { (eval echo "$as_me:3285: \"$ac_compile\"") >&5
3286 (eval $ac_compile) 2>&5
3288 echo "$as_me:3288: \$? = $ac_status" >&5
3289 (exit $ac_status); } &&
3290 { ac_try='test -s conftest.$ac_objext'
3291 { (eval echo "$as_me:3291: \"$ac_try\"") >&5
3294 echo "$as_me:3294: \$? = $ac_status" >&5
3295 (exit $ac_status); }; }; then
3296 cf_cv_xopen_source=no
3298 echo "$as_me: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3301 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3302 cat >conftest.$ac_ext <<_ACEOF
3303 #line 3303 "configure"
3304 #include "confdefs.h"
3308 #include <sys/types.h>
3314 #ifdef _XOPEN_SOURCE
3321 rm -f conftest.$ac_objext
3322 if { (eval echo "$as_me:3322: \"$ac_compile\"") >&5
3323 (eval $ac_compile) 2>&5
3325 echo "$as_me:3325: \$? = $ac_status" >&5
3326 (exit $ac_status); } &&
3327 { ac_try='test -s conftest.$ac_objext'
3328 { (eval echo "$as_me:3328: \"$ac_try\"") >&5
3331 echo "$as_me:3331: \$? = $ac_status" >&5
3332 (exit $ac_status); }; }; then
3333 cf_cv_xopen_source=no
3335 echo "$as_me: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3339 rm -f conftest.$ac_objext conftest.$ac_ext
3343 rm -f conftest.$ac_objext conftest.$ac_ext
3346 echo "$as_me:3346: result: $cf_cv_xopen_source" >&5
3347 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3349 if test "$cf_cv_xopen_source" != no ; then
3351 CFLAGS=`echo "$CFLAGS" | \
3352 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3353 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3355 CPPFLAGS=`echo "$CPPFLAGS" | \
3356 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3357 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3359 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3364 cf_new_extra_cppflags=
3366 for cf_add_cflags in $cf_temp_xopen_source
3368 case $cf_fix_cppflags in
3370 case $cf_add_cflags in
3371 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3372 case $cf_add_cflags in
3374 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3376 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3377 && test -z "${cf_tst_cflags}" \
3378 && cf_fix_cppflags=yes
3380 if test $cf_fix_cppflags = yes ; then
3381 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3383 elif test "${cf_tst_cflags}" = "\"'" ; then
3384 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3393 case $cf_add_cflags in
3395 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3397 CPPFLAGS=`echo "$CPPFLAGS" | \
3398 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3399 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3403 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3408 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3413 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3415 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3417 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3418 && test -z "${cf_tst_cflags}" \
3419 && cf_fix_cppflags=no
3424 if test -n "$cf_new_cflags" ; then
3426 CFLAGS="$CFLAGS $cf_new_cflags"
3429 if test -n "$cf_new_cppflags" ; then
3431 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3434 if test -n "$cf_new_extra_cppflags" ; then
3436 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3441 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3443 cf_save_CFLAGS="$CFLAGS"
3444 cf_save_CPPFLAGS="$CPPFLAGS"
3446 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3447 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3448 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3450 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3451 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3452 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3454 echo "$as_me:3454: checking if we should define _POSIX_C_SOURCE" >&5
3455 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3456 if test "${cf_cv_posix_c_source+set}" = set; then
3457 echo $ECHO_N "(cached) $ECHO_C" >&6
3460 echo "${as_me:-configure}:3460: testing if the symbol is already defined go no further ..." 1>&5
3462 cat >conftest.$ac_ext <<_ACEOF
3463 #line 3463 "configure"
3464 #include "confdefs.h"
3465 #include <sys/types.h>
3470 #ifndef _POSIX_C_SOURCE
3477 rm -f conftest.$ac_objext
3478 if { (eval echo "$as_me:3478: \"$ac_compile\"") >&5
3479 (eval $ac_compile) 2>&5
3481 echo "$as_me:3481: \$? = $ac_status" >&5
3482 (exit $ac_status); } &&
3483 { ac_try='test -s conftest.$ac_objext'
3484 { (eval echo "$as_me:3484: \"$ac_try\"") >&5
3487 echo "$as_me:3487: \$? = $ac_status" >&5
3488 (exit $ac_status); }; }; then
3489 cf_cv_posix_c_source=no
3491 echo "$as_me: failed program was:" >&5
3492 cat conftest.$ac_ext >&5
3493 cf_want_posix_source=no
3494 case .$cf_POSIX_C_SOURCE in
3496 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3499 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3500 cf_want_posix_source=yes
3503 cf_want_posix_source=yes
3506 if test "$cf_want_posix_source" = yes ; then
3507 cat >conftest.$ac_ext <<_ACEOF
3508 #line 3508 "configure"
3509 #include "confdefs.h"
3510 #include <sys/types.h>
3515 #ifdef _POSIX_SOURCE
3522 rm -f conftest.$ac_objext
3523 if { (eval echo "$as_me:3523: \"$ac_compile\"") >&5
3524 (eval $ac_compile) 2>&5
3526 echo "$as_me:3526: \$? = $ac_status" >&5
3527 (exit $ac_status); } &&
3528 { ac_try='test -s conftest.$ac_objext'
3529 { (eval echo "$as_me:3529: \"$ac_try\"") >&5
3532 echo "$as_me:3532: \$? = $ac_status" >&5
3533 (exit $ac_status); }; }; then
3536 echo "$as_me: failed program was:" >&5
3537 cat conftest.$ac_ext >&5
3538 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3540 rm -f conftest.$ac_objext conftest.$ac_ext
3543 echo "${as_me:-configure}:3543: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3545 CFLAGS="$cf_trim_CFLAGS"
3546 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3548 echo "${as_me:-configure}:3548: testing if the second compile does not leave our definition intact error ..." 1>&5
3550 cat >conftest.$ac_ext <<_ACEOF
3551 #line 3551 "configure"
3552 #include "confdefs.h"
3553 #include <sys/types.h>
3558 #ifndef _POSIX_C_SOURCE
3565 rm -f conftest.$ac_objext
3566 if { (eval echo "$as_me:3566: \"$ac_compile\"") >&5
3567 (eval $ac_compile) 2>&5
3569 echo "$as_me:3569: \$? = $ac_status" >&5
3570 (exit $ac_status); } &&
3571 { ac_try='test -s conftest.$ac_objext'
3572 { (eval echo "$as_me:3572: \"$ac_try\"") >&5
3575 echo "$as_me:3575: \$? = $ac_status" >&5
3576 (exit $ac_status); }; }; then
3579 echo "$as_me: failed program was:" >&5
3580 cat conftest.$ac_ext >&5
3581 cf_cv_posix_c_source=no
3583 rm -f conftest.$ac_objext conftest.$ac_ext
3584 CFLAGS="$cf_save_CFLAGS"
3585 CPPFLAGS="$cf_save_CPPFLAGS"
3588 rm -f conftest.$ac_objext conftest.$ac_ext
3591 echo "$as_me:3591: result: $cf_cv_posix_c_source" >&5
3592 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3594 if test "$cf_cv_posix_c_source" != no ; then
3595 CFLAGS="$cf_trim_CFLAGS"
3596 CPPFLAGS="$cf_trim_CPPFLAGS"
3601 cf_new_extra_cppflags=
3603 for cf_add_cflags in $cf_cv_posix_c_source
3605 case $cf_fix_cppflags in
3607 case $cf_add_cflags in
3608 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3609 case $cf_add_cflags in
3611 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3613 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3614 && test -z "${cf_tst_cflags}" \
3615 && cf_fix_cppflags=yes
3617 if test $cf_fix_cppflags = yes ; then
3618 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3620 elif test "${cf_tst_cflags}" = "\"'" ; then
3621 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3630 case $cf_add_cflags in
3632 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3634 CPPFLAGS=`echo "$CPPFLAGS" | \
3635 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3636 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3640 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3645 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3650 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3652 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3655 && test -z "${cf_tst_cflags}" \
3656 && cf_fix_cppflags=no
3661 if test -n "$cf_new_cflags" ; then
3663 CFLAGS="$CFLAGS $cf_new_cflags"
3666 if test -n "$cf_new_cppflags" ; then
3668 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3671 if test -n "$cf_new_extra_cppflags" ; then
3673 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3681 if test -n "$cf_xopen_source" ; then
3686 cf_new_extra_cppflags=
3688 for cf_add_cflags in $cf_xopen_source
3690 case $cf_fix_cppflags in
3692 case $cf_add_cflags in
3693 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3694 case $cf_add_cflags in
3696 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3698 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3699 && test -z "${cf_tst_cflags}" \
3700 && cf_fix_cppflags=yes
3702 if test $cf_fix_cppflags = yes ; then
3703 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3705 elif test "${cf_tst_cflags}" = "\"'" ; then
3706 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3715 case $cf_add_cflags in
3717 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3719 CPPFLAGS=`echo "$CPPFLAGS" | \
3720 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3721 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3725 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3730 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3735 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3737 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3739 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3740 && test -z "${cf_tst_cflags}" \
3741 && cf_fix_cppflags=no
3746 if test -n "$cf_new_cflags" ; then
3747 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3749 echo "${as_me:-configure}:3749: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3751 CFLAGS="$CFLAGS $cf_new_cflags"
3754 if test -n "$cf_new_cppflags" ; then
3755 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3757 echo "${as_me:-configure}:3757: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3759 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3762 if test -n "$cf_new_extra_cppflags" ; then
3763 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3765 echo "${as_me:-configure}:3765: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3767 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3772 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3773 echo "$as_me:3773: checking if _XOPEN_SOURCE really is set" >&5
3774 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3775 cat >conftest.$ac_ext <<_ACEOF
3776 #line 3776 "configure"
3777 #include "confdefs.h"
3783 #ifndef _XOPEN_SOURCE
3790 rm -f conftest.$ac_objext
3791 if { (eval echo "$as_me:3791: \"$ac_compile\"") >&5
3792 (eval $ac_compile) 2>&5
3794 echo "$as_me:3794: \$? = $ac_status" >&5
3795 (exit $ac_status); } &&
3796 { ac_try='test -s conftest.$ac_objext'
3797 { (eval echo "$as_me:3797: \"$ac_try\"") >&5
3800 echo "$as_me:3800: \$? = $ac_status" >&5
3801 (exit $ac_status); }; }; then
3802 cf_XOPEN_SOURCE_set=yes
3804 echo "$as_me: failed program was:" >&5
3805 cat conftest.$ac_ext >&5
3806 cf_XOPEN_SOURCE_set=no
3808 rm -f conftest.$ac_objext conftest.$ac_ext
3809 echo "$as_me:3809: result: $cf_XOPEN_SOURCE_set" >&5
3810 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3811 if test $cf_XOPEN_SOURCE_set = yes
3813 cat >conftest.$ac_ext <<_ACEOF
3814 #line 3814 "configure"
3815 #include "confdefs.h"
3821 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3828 rm -f conftest.$ac_objext
3829 if { (eval echo "$as_me:3829: \"$ac_compile\"") >&5
3830 (eval $ac_compile) 2>&5
3832 echo "$as_me:3832: \$? = $ac_status" >&5
3833 (exit $ac_status); } &&
3834 { ac_try='test -s conftest.$ac_objext'
3835 { (eval echo "$as_me:3835: \"$ac_try\"") >&5
3838 echo "$as_me:3838: \$? = $ac_status" >&5
3839 (exit $ac_status); }; }; then
3840 cf_XOPEN_SOURCE_set_ok=yes
3842 echo "$as_me: failed program was:" >&5
3843 cat conftest.$ac_ext >&5
3844 cf_XOPEN_SOURCE_set_ok=no
3846 rm -f conftest.$ac_objext conftest.$ac_ext
3847 if test $cf_XOPEN_SOURCE_set_ok = no
3849 { echo "$as_me:3849: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3850 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3854 echo "$as_me:3854: checking if we should define _XOPEN_SOURCE" >&5
3855 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3856 if test "${cf_cv_xopen_source+set}" = set; then
3857 echo $ECHO_N "(cached) $ECHO_C" >&6
3860 cat >conftest.$ac_ext <<_ACEOF
3861 #line 3861 "configure"
3862 #include "confdefs.h"
3866 #include <sys/types.h>
3872 #ifndef _XOPEN_SOURCE
3879 rm -f conftest.$ac_objext
3880 if { (eval echo "$as_me:3880: \"$ac_compile\"") >&5
3881 (eval $ac_compile) 2>&5
3883 echo "$as_me:3883: \$? = $ac_status" >&5
3884 (exit $ac_status); } &&
3885 { ac_try='test -s conftest.$ac_objext'
3886 { (eval echo "$as_me:3886: \"$ac_try\"") >&5
3889 echo "$as_me:3889: \$? = $ac_status" >&5
3890 (exit $ac_status); }; }; then
3891 cf_cv_xopen_source=no
3893 echo "$as_me: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3896 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3897 cat >conftest.$ac_ext <<_ACEOF
3898 #line 3898 "configure"
3899 #include "confdefs.h"
3903 #include <sys/types.h>
3909 #ifdef _XOPEN_SOURCE
3916 rm -f conftest.$ac_objext
3917 if { (eval echo "$as_me:3917: \"$ac_compile\"") >&5
3918 (eval $ac_compile) 2>&5
3920 echo "$as_me:3920: \$? = $ac_status" >&5
3921 (exit $ac_status); } &&
3922 { ac_try='test -s conftest.$ac_objext'
3923 { (eval echo "$as_me:3923: \"$ac_try\"") >&5
3926 echo "$as_me:3926: \$? = $ac_status" >&5
3927 (exit $ac_status); }; }; then
3928 cf_cv_xopen_source=no
3930 echo "$as_me: failed program was:" >&5
3931 cat conftest.$ac_ext >&5
3932 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3934 rm -f conftest.$ac_objext conftest.$ac_ext
3938 rm -f conftest.$ac_objext conftest.$ac_ext
3941 echo "$as_me:3941: result: $cf_cv_xopen_source" >&5
3942 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3944 if test "$cf_cv_xopen_source" != no ; then
3946 CFLAGS=`echo "$CFLAGS" | \
3947 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3948 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3950 CPPFLAGS=`echo "$CPPFLAGS" | \
3951 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3952 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3954 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3959 cf_new_extra_cppflags=
3961 for cf_add_cflags in $cf_temp_xopen_source
3963 case $cf_fix_cppflags in
3965 case $cf_add_cflags in
3966 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3967 case $cf_add_cflags in
3969 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3971 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3972 && test -z "${cf_tst_cflags}" \
3973 && cf_fix_cppflags=yes
3975 if test $cf_fix_cppflags = yes ; then
3976 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3978 elif test "${cf_tst_cflags}" = "\"'" ; then
3979 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3988 case $cf_add_cflags in
3990 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3992 CPPFLAGS=`echo "$CPPFLAGS" | \
3993 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3994 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3998 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4003 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4008 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4010 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4012 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4013 && test -z "${cf_tst_cflags}" \
4014 && cf_fix_cppflags=no
4019 if test -n "$cf_new_cflags" ; then
4021 CFLAGS="$CFLAGS $cf_new_cflags"
4024 if test -n "$cf_new_cppflags" ; then
4026 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4029 if test -n "$cf_new_extra_cppflags" ; then
4031 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4039 echo "$as_me:4039: checking for signal global datatype" >&5
4040 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4041 if test "${cf_cv_sig_atomic_t+set}" = set; then
4042 echo $ECHO_N "(cached) $ECHO_C" >&6
4046 "volatile sig_atomic_t" \
4050 cat >conftest.$ac_ext <<_ACEOF
4051 #line 4051 "configure"
4052 #include "confdefs.h"
4054 #include <sys/types.h>
4060 static void handler(int sig)
4067 signal(SIGINT, handler);
4073 rm -f conftest.$ac_objext
4074 if { (eval echo "$as_me:4074: \"$ac_compile\"") >&5
4075 (eval $ac_compile) 2>&5
4077 echo "$as_me:4077: \$? = $ac_status" >&5
4078 (exit $ac_status); } &&
4079 { ac_try='test -s conftest.$ac_objext'
4080 { (eval echo "$as_me:4080: \"$ac_try\"") >&5
4083 echo "$as_me:4083: \$? = $ac_status" >&5
4084 (exit $ac_status); }; }; then
4085 cf_cv_sig_atomic_t=$cf_type
4087 echo "$as_me: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 cf_cv_sig_atomic_t=no
4091 rm -f conftest.$ac_objext conftest.$ac_ext
4092 test "$cf_cv_sig_atomic_t" != no && break
4097 echo "$as_me:4097: result: $cf_cv_sig_atomic_t" >&5
4098 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4099 test "$cf_cv_sig_atomic_t" != no &&
4100 cat >>confdefs.h <<EOF
4101 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4104 # Work around breakage on OS X
4106 echo "$as_me:4106: checking if SIGWINCH is defined" >&5
4107 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4108 if test "${cf_cv_define_sigwinch+set}" = set; then
4109 echo $ECHO_N "(cached) $ECHO_C" >&6
4112 cat >conftest.$ac_ext <<_ACEOF
4113 #line 4113 "configure"
4114 #include "confdefs.h"
4116 #include <sys/types.h>
4117 #include <sys/signal.h>
4127 rm -f conftest.$ac_objext
4128 if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
4129 (eval $ac_compile) 2>&5
4131 echo "$as_me:4131: \$? = $ac_status" >&5
4132 (exit $ac_status); } &&
4133 { ac_try='test -s conftest.$ac_objext'
4134 { (eval echo "$as_me:4134: \"$ac_try\"") >&5
4137 echo "$as_me:4137: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4139 cf_cv_define_sigwinch=yes
4141 echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 cat >conftest.$ac_ext <<_ACEOF
4144 #line 4144 "configure"
4145 #include "confdefs.h"
4147 #undef _XOPEN_SOURCE
4148 #undef _POSIX_SOURCE
4149 #undef _POSIX_C_SOURCE
4150 #include <sys/types.h>
4151 #include <sys/signal.h>
4161 rm -f conftest.$ac_objext
4162 if { (eval echo "$as_me:4162: \"$ac_compile\"") >&5
4163 (eval $ac_compile) 2>&5
4165 echo "$as_me:4165: \$? = $ac_status" >&5
4166 (exit $ac_status); } &&
4167 { ac_try='test -s conftest.$ac_objext'
4168 { (eval echo "$as_me:4168: \"$ac_try\"") >&5
4171 echo "$as_me:4171: \$? = $ac_status" >&5
4172 (exit $ac_status); }; }; then
4173 cf_cv_define_sigwinch=maybe
4175 echo "$as_me: failed program was:" >&5
4176 cat conftest.$ac_ext >&5
4177 cf_cv_define_sigwinch=no
4179 rm -f conftest.$ac_objext conftest.$ac_ext
4182 rm -f conftest.$ac_objext conftest.$ac_ext
4185 echo "$as_me:4185: result: $cf_cv_define_sigwinch" >&5
4186 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4188 if test "$cf_cv_define_sigwinch" = maybe ; then
4189 echo "$as_me:4189: checking for actual SIGWINCH definition" >&5
4190 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4191 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4195 cf_cv_fixup_sigwinch=unknown
4197 while test $cf_sigwinch != 1
4199 cat >conftest.$ac_ext <<_ACEOF
4200 #line 4200 "configure"
4201 #include "confdefs.h"
4203 #undef _XOPEN_SOURCE
4204 #undef _POSIX_SOURCE
4205 #undef _POSIX_C_SOURCE
4206 #include <sys/types.h>
4207 #include <sys/signal.h>
4213 #if SIGWINCH != $cf_sigwinch
4221 rm -f conftest.$ac_objext
4222 if { (eval echo "$as_me:4222: \"$ac_compile\"") >&5
4223 (eval $ac_compile) 2>&5
4225 echo "$as_me:4225: \$? = $ac_status" >&5
4226 (exit $ac_status); } &&
4227 { ac_try='test -s conftest.$ac_objext'
4228 { (eval echo "$as_me:4228: \"$ac_try\"") >&5
4231 echo "$as_me:4231: \$? = $ac_status" >&5
4232 (exit $ac_status); }; }; then
4233 cf_cv_fixup_sigwinch=$cf_sigwinch
4236 echo "$as_me: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4239 rm -f conftest.$ac_objext conftest.$ac_ext
4241 cf_sigwinch=`expr $cf_sigwinch - 1`
4245 echo "$as_me:4245: result: $cf_cv_fixup_sigwinch" >&5
4246 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4248 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4249 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4253 # Checks for CODESET support.
4255 echo "$as_me:4255: checking for nl_langinfo and CODESET" >&5
4256 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4257 if test "${am_cv_langinfo_codeset+set}" = set; then
4258 echo $ECHO_N "(cached) $ECHO_C" >&6
4260 cat >conftest.$ac_ext <<_ACEOF
4261 #line 4261 "configure"
4262 #include "confdefs.h"
4263 #include <langinfo.h>
4267 char* cs = nl_langinfo(CODESET);
4272 rm -f conftest.$ac_objext conftest$ac_exeext
4273 if { (eval echo "$as_me:4273: \"$ac_link\"") >&5
4274 (eval $ac_link) 2>&5
4276 echo "$as_me:4276: \$? = $ac_status" >&5
4277 (exit $ac_status); } &&
4278 { ac_try='test -s conftest$ac_exeext'
4279 { (eval echo "$as_me:4279: \"$ac_try\"") >&5
4282 echo "$as_me:4282: \$? = $ac_status" >&5
4283 (exit $ac_status); }; }; then
4284 am_cv_langinfo_codeset=yes
4286 echo "$as_me: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 am_cv_langinfo_codeset=no
4290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4293 echo "$as_me:4293: result: $am_cv_langinfo_codeset" >&5
4294 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4295 if test $am_cv_langinfo_codeset = yes; then
4297 cat >>confdefs.h <<\EOF
4298 #define HAVE_LANGINFO_CODESET 1
4303 echo "$as_me:4303: checking if you want to use pkg-config" >&5
4304 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4306 # Check whether --with-pkg-config or --without-pkg-config was given.
4307 if test "${with_pkg_config+set}" = set; then
4308 withval="$with_pkg_config"
4309 cf_pkg_config=$withval
4313 echo "$as_me:4313: result: $cf_pkg_config" >&5
4314 echo "${ECHO_T}$cf_pkg_config" >&6
4316 case $cf_pkg_config in
4322 if test -n "$ac_tool_prefix"; then
4323 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4324 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4325 echo "$as_me:4325: checking for $ac_word" >&5
4326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4327 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4328 echo $ECHO_N "(cached) $ECHO_C" >&6
4332 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4335 ac_save_IFS=$IFS; IFS=$ac_path_separator
4337 for ac_dir in $ac_dummy; do
4339 test -z "$ac_dir" && ac_dir=.
4340 if $as_executable_p "$ac_dir/$ac_word"; then
4341 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4342 echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4350 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4352 if test -n "$PKG_CONFIG"; then
4353 echo "$as_me:4353: result: $PKG_CONFIG" >&5
4354 echo "${ECHO_T}$PKG_CONFIG" >&6
4356 echo "$as_me:4356: result: no" >&5
4357 echo "${ECHO_T}no" >&6
4361 if test -z "$ac_cv_path_PKG_CONFIG"; then
4362 ac_pt_PKG_CONFIG=$PKG_CONFIG
4363 # Extract the first word of "pkg-config", so it can be a program name with args.
4364 set dummy pkg-config; ac_word=$2
4365 echo "$as_me:4365: checking for $ac_word" >&5
4366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4367 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4368 echo $ECHO_N "(cached) $ECHO_C" >&6
4370 case $ac_pt_PKG_CONFIG in
4372 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4375 ac_save_IFS=$IFS; IFS=$ac_path_separator
4377 for ac_dir in $ac_dummy; do
4379 test -z "$ac_dir" && ac_dir=.
4380 if $as_executable_p "$ac_dir/$ac_word"; then
4381 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4382 echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4387 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4391 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4393 if test -n "$ac_pt_PKG_CONFIG"; then
4394 echo "$as_me:4394: result: $ac_pt_PKG_CONFIG" >&5
4395 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4397 echo "$as_me:4397: result: no" >&5
4398 echo "${ECHO_T}no" >&6
4401 PKG_CONFIG=$ac_pt_PKG_CONFIG
4403 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4412 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4413 if test "$PKG_CONFIG" != none ; then
4415 if test "x$prefix" != xNONE; then
4416 cf_path_syntax="$prefix"
4418 cf_path_syntax="$ac_default_prefix"
4421 case ".$PKG_CONFIG" in
4426 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4428 (.\${*prefix}*|.\${*dir}*)
4429 eval PKG_CONFIG="$PKG_CONFIG"
4430 case ".$PKG_CONFIG" in
4432 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4437 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4440 { { echo "$as_me:4440: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4441 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4442 { (exit 1); exit 1; }; }
4446 elif test "x$cf_pkg_config" != xno ; then
4447 { echo "$as_me:4447: WARNING: pkg-config is not installed" >&5
4448 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4451 echo "$as_me:4451: checking if you want to see long compiling messages" >&5
4452 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4454 # Check whether --enable-echo or --disable-echo was given.
4455 if test "${enable_echo+set}" = set; then
4456 enableval="$enable_echo"
4457 test "$enableval" != no && enableval=yes
4458 if test "$enableval" != "yes" ; then
4461 ECHO_LD='@echo linking $@;'
4462 RULE_CC='@echo compiling $<'
4463 SHOW_CC='@echo compiling $@'
4485 echo "$as_me:4485: result: $enableval" >&5
4486 echo "${ECHO_T}$enableval" >&6
4488 echo "$as_me:4488: checking for ncurses wrap-prefix" >&5
4489 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4491 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4492 if test "${with_ncurses_wrap_prefix+set}" = set; then
4493 withval="$with_ncurses_wrap_prefix"
4494 NCURSES_WRAP_PREFIX=$withval
4496 NCURSES_WRAP_PREFIX=_nc_
4498 echo "$as_me:4498: result: $NCURSES_WRAP_PREFIX" >&5
4499 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4501 echo "$as_me:4501: checking if you want to check for wide-character functions" >&5
4502 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4504 # Check whether --enable-widec or --disable-widec was given.
4505 if test "${enable_widec+set}" = set; then
4506 enableval="$enable_widec"
4507 test "$enableval" != no && enableval=yes
4508 if test "$enableval" != "yes" ; then
4518 echo "$as_me:4518: result: $cf_enable_widec" >&5
4519 echo "${ECHO_T}$cf_enable_widec" >&6
4521 echo "$as_me:4521: checking for specific curses-directory" >&5
4522 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4524 # Check whether --with-curses-dir or --without-curses-dir was given.
4525 if test "${with_curses_dir+set}" = set; then
4526 withval="$with_curses_dir"
4527 cf_cv_curses_dir=$withval
4531 echo "$as_me:4531: result: $cf_cv_curses_dir" >&5
4532 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4534 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4537 if test "x$prefix" != xNONE; then
4538 cf_path_syntax="$prefix"
4540 cf_path_syntax="$ac_default_prefix"
4548 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4550 (.\${*prefix}*|.\${*dir}*)
4551 eval withval="$withval"
4554 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4559 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4562 { { echo "$as_me:4562: error: expected a pathname, not \"$withval\"" >&5
4563 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4564 { (exit 1); exit 1; }; }
4568 if test -d "$cf_cv_curses_dir"
4571 if test -n "$cf_cv_curses_dir/include" ; then
4572 for cf_add_incdir in $cf_cv_curses_dir/include
4574 while test $cf_add_incdir != /usr/include
4576 if test -d $cf_add_incdir
4579 if test -n "$CFLAGS$CPPFLAGS" ; then
4580 # a loop is needed to ensure we can add subdirs of existing dirs
4581 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4582 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4583 cf_have_incdir=yes; break
4588 if test "$cf_have_incdir" = no ; then
4589 if test "$cf_add_incdir" = /usr/local/include ; then
4590 if test "$GCC" = yes
4592 cf_save_CPPFLAGS=$CPPFLAGS
4593 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4594 cat >conftest.$ac_ext <<_ACEOF
4595 #line 4595 "configure"
4596 #include "confdefs.h"
4606 rm -f conftest.$ac_objext
4607 if { (eval echo "$as_me:4607: \"$ac_compile\"") >&5
4608 (eval $ac_compile) 2>&5
4610 echo "$as_me:4610: \$? = $ac_status" >&5
4611 (exit $ac_status); } &&
4612 { ac_try='test -s conftest.$ac_objext'
4613 { (eval echo "$as_me:4613: \"$ac_try\"") >&5
4616 echo "$as_me:4616: \$? = $ac_status" >&5
4617 (exit $ac_status); }; }; then
4620 echo "$as_me: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4624 rm -f conftest.$ac_objext conftest.$ac_ext
4625 CPPFLAGS=$cf_save_CPPFLAGS
4630 if test "$cf_have_incdir" = no ; then
4631 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4633 echo "${as_me:-configure}:4633: testing adding $cf_add_incdir to include-path ..." 1>&5
4635 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4637 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4638 test "$cf_top_incdir" = "$cf_add_incdir" && break
4639 cf_add_incdir="$cf_top_incdir"
4650 if test -n "$cf_cv_curses_dir/lib" ; then
4651 for cf_add_libdir in $cf_cv_curses_dir/lib
4653 if test $cf_add_libdir = /usr/lib ; then
4655 elif test -d $cf_add_libdir
4658 if test -n "$LDFLAGS$LIBS" ; then
4659 # a loop is needed to ensure we can add subdirs of existing dirs
4660 for cf_test_libdir in $LDFLAGS $LIBS ; do
4661 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4662 cf_have_libdir=yes; break
4666 if test "$cf_have_libdir" = no ; then
4667 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4669 echo "${as_me:-configure}:4669: testing adding $cf_add_libdir to library-path ..." 1>&5
4671 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4682 echo "$as_me:4682: checking for specified curses library type" >&5
4683 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4685 # Check whether --with-screen or --without-screen was given.
4686 if test "${with_screen+set}" = set; then
4687 withval="$with_screen"
4688 cf_cv_screen=$withval
4691 # Check whether --with-ncursesw or --without-ncursesw was given.
4692 if test "${with_ncursesw+set}" = set; then
4693 withval="$with_ncursesw"
4694 cf_cv_screen=ncursesw
4697 # Check whether --with-ncurses or --without-ncurses was given.
4698 if test "${with_ncurses+set}" = set; then
4699 withval="$with_ncurses"
4700 cf_cv_screen=ncurses
4703 # Check whether --with-pdcurses or --without-pdcurses was given.
4704 if test "${with_pdcurses+set}" = set; then
4705 withval="$with_pdcurses"
4706 cf_cv_screen=pdcurses
4709 # Check whether --with-curses-colr or --without-curses-colr was given.
4710 if test "${with_curses_colr+set}" = set; then
4711 withval="$with_curses_colr"
4712 cf_cv_screen=curses_colr
4715 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4716 if test "${with_curses_5lib+set}" = set; then
4717 withval="$with_curses_5lib"
4718 cf_cv_screen=curses_5lib
4726 echo "$as_me:4726: result: $cf_cv_screen" >&5
4727 echo "${ECHO_T}$cf_cv_screen" >&6
4729 case $cf_cv_screen in
4732 echo "$as_me:4732: checking for extra include directories" >&5
4733 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4734 if test "${cf_cv_curses_incdir+set}" = set; then
4735 echo $ECHO_N "(cached) $ECHO_C" >&6
4738 cf_cv_curses_incdir=no
4741 if test "x$cf_cv_screen" = "xcurses_colr"
4743 test -d /usr/include/curses_colr && \
4744 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4748 if test "x$cf_cv_screen" = "xcurses_5lib"
4750 test -d /usr/5lib && \
4751 test -d /usr/5include && \
4752 cf_cv_curses_incdir="-I/usr/5include"
4758 echo "$as_me:4758: result: $cf_cv_curses_incdir" >&5
4759 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4760 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4762 echo "$as_me:4762: checking if we have identified curses headers" >&5
4763 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4764 if test "${cf_cv_ncurses_header+set}" = set; then
4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4768 cf_cv_ncurses_header=none
4771 curses.h ncurses/ncurses.h ncurses/curses.h
4773 cat >conftest.$ac_ext <<_ACEOF
4774 #line 4774 "configure"
4775 #include "confdefs.h"
4776 #include <${cf_header}>
4780 initscr(); tgoto("?", 0,0)
4785 rm -f conftest.$ac_objext
4786 if { (eval echo "$as_me:4786: \"$ac_compile\"") >&5
4787 (eval $ac_compile) 2>&5
4789 echo "$as_me:4789: \$? = $ac_status" >&5
4790 (exit $ac_status); } &&
4791 { ac_try='test -s conftest.$ac_objext'
4792 { (eval echo "$as_me:4792: \"$ac_try\"") >&5
4795 echo "$as_me:4795: \$? = $ac_status" >&5
4796 (exit $ac_status); }; }; then
4797 cf_cv_ncurses_header=$cf_header; break
4799 echo "$as_me: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
4802 rm -f conftest.$ac_objext conftest.$ac_ext
4806 echo "$as_me:4806: result: $cf_cv_ncurses_header" >&5
4807 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4809 if test "$cf_cv_ncurses_header" = none ; then
4810 { { echo "$as_me:4810: error: No curses header-files found" >&5
4811 echo "$as_me: error: No curses header-files found" >&2;}
4812 { (exit 1); exit 1; }; }
4815 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4817 for ac_header in $cf_cv_ncurses_header
4819 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4820 echo "$as_me:4820: checking for $ac_header" >&5
4821 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4822 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
4825 cat >conftest.$ac_ext <<_ACEOF
4826 #line 4826 "configure"
4827 #include "confdefs.h"
4828 #include <$ac_header>
4830 if { (eval echo "$as_me:4830: \"$ac_cpp conftest.$ac_ext\"") >&5
4831 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4833 egrep -v '^ *\+' conftest.er1 >conftest.err
4835 cat conftest.err >&5
4836 echo "$as_me:4836: \$? = $ac_status" >&5
4837 (exit $ac_status); } >/dev/null; then
4838 if test -s conftest.err; then
4839 ac_cpp_err=$ac_c_preproc_warn_flag
4846 if test -z "$ac_cpp_err"; then
4847 eval "$as_ac_Header=yes"
4849 echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851 eval "$as_ac_Header=no"
4853 rm -f conftest.err conftest.$ac_ext
4855 echo "$as_me:4855: result: `eval echo '${'$as_ac_Header'}'`" >&5
4856 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4857 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4858 cat >>confdefs.h <<EOF
4859 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4865 echo "$as_me:4865: checking for terminfo header" >&5
4866 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4867 if test "${cf_cv_term_header+set}" = set; then
4868 echo $ECHO_N "(cached) $ECHO_C" >&6
4871 case ${cf_cv_ncurses_header} in
4872 (*/ncurses.h|*/ncursesw.h)
4873 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4876 cf_term_header=term.h
4880 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4882 cat >conftest.$ac_ext <<_ACEOF
4883 #line 4883 "configure"
4884 #include "confdefs.h"
4886 #include <${cf_cv_ncurses_header:-curses.h}>
4892 int x = auto_left_margin
4897 rm -f conftest.$ac_objext
4898 if { (eval echo "$as_me:4898: \"$ac_compile\"") >&5
4899 (eval $ac_compile) 2>&5
4901 echo "$as_me:4901: \$? = $ac_status" >&5
4902 (exit $ac_status); } &&
4903 { ac_try='test -s conftest.$ac_objext'
4904 { (eval echo "$as_me:4904: \"$ac_try\"") >&5
4907 echo "$as_me:4907: \$? = $ac_status" >&5
4908 (exit $ac_status); }; }; then
4910 cf_cv_term_header="$cf_test"
4912 echo "$as_me: failed program was:" >&5
4913 cat conftest.$ac_ext >&5
4915 cf_cv_term_header=unknown
4918 rm -f conftest.$ac_objext conftest.$ac_ext
4919 test "$cf_cv_term_header" != unknown && break
4923 echo "$as_me:4923: result: $cf_cv_term_header" >&5
4924 echo "${ECHO_T}$cf_cv_term_header" >&6
4926 # Set definitions to allow ifdef'ing to accommodate subdirectories
4928 case $cf_cv_term_header in
4931 cat >>confdefs.h <<\EOF
4932 #define HAVE_TERM_H 1
4938 case $cf_cv_term_header in
4941 cat >>confdefs.h <<\EOF
4942 #define HAVE_NCURSES_TERM_H 1
4948 cat >>confdefs.h <<\EOF
4949 #define HAVE_NCURSESW_TERM_H 1
4955 echo "$as_me:4955: checking for ncurses version" >&5
4956 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4957 if test "${cf_cv_ncurses_version+set}" = set; then
4958 echo $ECHO_N "(cached) $ECHO_C" >&6
4961 cf_cv_ncurses_version=no
4964 if test "$cross_compiling" = yes; then
4966 # This will not work if the preprocessor splits the line after the
4967 # Autoconf token. The 'unproto' program does that.
4968 cat > conftest.$ac_ext <<EOF
4969 #include <${cf_cv_ncurses_header:-curses.h}>
4971 #ifdef NCURSES_VERSION
4972 Autoconf NCURSES_VERSION
4980 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4981 { (eval echo "$as_me:4981: \"$cf_try\"") >&5
4984 echo "$as_me:4984: \$? = $ac_status" >&5
4985 (exit $ac_status); }
4986 if test -f conftest.out ; then
4987 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4988 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4993 cat >conftest.$ac_ext <<_ACEOF
4994 #line 4994 "configure"
4995 #include "confdefs.h"
4997 #include <${cf_cv_ncurses_header:-curses.h}>
5001 FILE *fp = fopen("$cf_tempfile", "w");
5002 #ifdef NCURSES_VERSION
5003 # ifdef NCURSES_VERSION_PATCH
5004 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5006 fprintf(fp, "%s\n", NCURSES_VERSION);
5010 fprintf(fp, "old\n");
5015 ${cf_cv_main_return:-return}(0);
5018 rm -f conftest$ac_exeext
5019 if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
5020 (eval $ac_link) 2>&5
5022 echo "$as_me:5022: \$? = $ac_status" >&5
5023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5024 { (eval echo "$as_me:5024: \"$ac_try\"") >&5
5027 echo "$as_me:5027: \$? = $ac_status" >&5
5028 (exit $ac_status); }; }; then
5030 cf_cv_ncurses_version=`cat $cf_tempfile`
5032 echo "$as_me: program exited with status $ac_status" >&5
5033 echo "$as_me: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5036 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5041 echo "$as_me:5041: result: $cf_cv_ncurses_version" >&5
5042 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5043 test "$cf_cv_ncurses_version" = no ||
5044 cat >>confdefs.h <<\EOF
5048 echo "$as_me:5048: checking if we have identified curses libraries" >&5
5049 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5050 cat >conftest.$ac_ext <<_ACEOF
5051 #line 5051 "configure"
5052 #include "confdefs.h"
5053 #include <${cf_cv_ncurses_header:-curses.h}>
5057 initscr(); tgoto("?", 0,0)
5062 rm -f conftest.$ac_objext conftest$ac_exeext
5063 if { (eval echo "$as_me:5063: \"$ac_link\"") >&5
5064 (eval $ac_link) 2>&5
5066 echo "$as_me:5066: \$? = $ac_status" >&5
5067 (exit $ac_status); } &&
5068 { ac_try='test -s conftest$ac_exeext'
5069 { (eval echo "$as_me:5069: \"$ac_try\"") >&5
5072 echo "$as_me:5072: \$? = $ac_status" >&5
5073 (exit $ac_status); }; }; then
5076 echo "$as_me: failed program was:" >&5
5077 cat conftest.$ac_ext >&5
5080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5081 echo "$as_me:5081: result: $cf_result" >&5
5082 echo "${ECHO_T}$cf_result" >&6
5084 if test "$cf_result" = no ; then
5087 echo "$as_me:5087: checking for tgoto in -lmytinfo" >&5
5088 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5089 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5092 ac_check_lib_save_LIBS=$LIBS
5093 LIBS="-lmytinfo $LIBS"
5094 cat >conftest.$ac_ext <<_ACEOF
5095 #line 5095 "configure"
5096 #include "confdefs.h"
5098 /* Override any gcc2 internal prototype to avoid an error. */
5102 /* We use char because int might match the return type of a gcc2
5103 builtin and then its argument prototype would still apply. */
5113 rm -f conftest.$ac_objext conftest$ac_exeext
5114 if { (eval echo "$as_me:5114: \"$ac_link\"") >&5
5115 (eval $ac_link) 2>&5
5117 echo "$as_me:5117: \$? = $ac_status" >&5
5118 (exit $ac_status); } &&
5119 { ac_try='test -s conftest$ac_exeext'
5120 { (eval echo "$as_me:5120: \"$ac_try\"") >&5
5123 echo "$as_me:5123: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
5125 ac_cv_lib_mytinfo_tgoto=yes
5127 echo "$as_me: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
5129 ac_cv_lib_mytinfo_tgoto=no
5131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5132 LIBS=$ac_check_lib_save_LIBS
5134 echo "$as_me:5134: result: $ac_cv_lib_mytinfo_tgoto" >&5
5135 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5136 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5138 cf_add_libs="-lmytinfo"
5139 # Filter out duplicates - this happens with badly-designed ".pc" files...
5140 for cf_add_1lib in $LIBS
5142 for cf_add_2lib in $cf_add_libs
5144 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5150 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5158 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5159 # next (1998), and xcurses "newer" (2000). There is no header file for
5160 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5161 # term.h) for cur_colr
5162 if test "x$cf_cv_screen" = "xcurses_colr"
5164 echo "$as_me:5164: checking for initscr in -lcur_colr" >&5
5165 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5166 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5167 echo $ECHO_N "(cached) $ECHO_C" >&6
5169 ac_check_lib_save_LIBS=$LIBS
5170 LIBS="-lcur_colr $LIBS"
5171 cat >conftest.$ac_ext <<_ACEOF
5172 #line 5172 "configure"
5173 #include "confdefs.h"
5175 /* Override any gcc2 internal prototype to avoid an error. */
5179 /* We use char because int might match the return type of a gcc2
5180 builtin and then its argument prototype would still apply. */
5190 rm -f conftest.$ac_objext conftest$ac_exeext
5191 if { (eval echo "$as_me:5191: \"$ac_link\"") >&5
5192 (eval $ac_link) 2>&5
5194 echo "$as_me:5194: \$? = $ac_status" >&5
5195 (exit $ac_status); } &&
5196 { ac_try='test -s conftest$ac_exeext'
5197 { (eval echo "$as_me:5197: \"$ac_try\"") >&5
5200 echo "$as_me:5200: \$? = $ac_status" >&5
5201 (exit $ac_status); }; }; then
5202 ac_cv_lib_cur_colr_initscr=yes
5204 echo "$as_me: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5206 ac_cv_lib_cur_colr_initscr=no
5208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5209 LIBS=$ac_check_lib_save_LIBS
5211 echo "$as_me:5211: result: $ac_cv_lib_cur_colr_initscr" >&5
5212 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5213 if test $ac_cv_lib_cur_colr_initscr = yes; then
5215 cf_add_libs="-lcur_colr"
5216 # Filter out duplicates - this happens with badly-designed ".pc" files...
5217 for cf_add_1lib in $LIBS
5219 for cf_add_2lib in $cf_add_libs
5221 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5227 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5231 ac_cv_func_initscr=yes
5235 echo "$as_me:5235: checking for initscr in -lHcurses" >&5
5236 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5237 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5238 echo $ECHO_N "(cached) $ECHO_C" >&6
5240 ac_check_lib_save_LIBS=$LIBS
5241 LIBS="-lHcurses $LIBS"
5242 cat >conftest.$ac_ext <<_ACEOF
5243 #line 5243 "configure"
5244 #include "confdefs.h"
5246 /* Override any gcc2 internal prototype to avoid an error. */
5250 /* We use char because int might match the return type of a gcc2
5251 builtin and then its argument prototype would still apply. */
5261 rm -f conftest.$ac_objext conftest$ac_exeext
5262 if { (eval echo "$as_me:5262: \"$ac_link\"") >&5
5263 (eval $ac_link) 2>&5
5265 echo "$as_me:5265: \$? = $ac_status" >&5
5266 (exit $ac_status); } &&
5267 { ac_try='test -s conftest$ac_exeext'
5268 { (eval echo "$as_me:5268: \"$ac_try\"") >&5
5271 echo "$as_me:5271: \$? = $ac_status" >&5
5272 (exit $ac_status); }; }; then
5273 ac_cv_lib_Hcurses_initscr=yes
5275 echo "$as_me: failed program was:" >&5
5276 cat conftest.$ac_ext >&5
5277 ac_cv_lib_Hcurses_initscr=no
5279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5280 LIBS=$ac_check_lib_save_LIBS
5282 echo "$as_me:5282: result: $ac_cv_lib_Hcurses_initscr" >&5
5283 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5284 if test $ac_cv_lib_Hcurses_initscr = yes; then
5286 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5288 cf_add_libs="-lHcurses"
5289 # Filter out duplicates - this happens with badly-designed ".pc" files...
5290 for cf_add_1lib in $LIBS
5292 for cf_add_2lib in $cf_add_libs
5294 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5300 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5304 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5305 ac_cv_func_initscr=yes
5314 case `arch 2>/dev/null` in
5319 if test -n "/lib64" ; then
5320 for cf_add_libdir in /lib64
5322 if test $cf_add_libdir = /usr/lib ; then
5324 elif test -d $cf_add_libdir
5327 if test -n "$LDFLAGS$LIBS" ; then
5328 # a loop is needed to ensure we can add subdirs of existing dirs
5329 for cf_test_libdir in $LDFLAGS $LIBS ; do
5330 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5331 cf_have_libdir=yes; break
5335 if test "$cf_have_libdir" = no ; then
5336 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5338 echo "${as_me:-configure}:5338: testing adding $cf_add_libdir to library-path ..." 1>&5
5340 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5348 if test -n "/lib" ; then
5349 for cf_add_libdir in /lib
5351 if test $cf_add_libdir = /usr/lib ; then
5353 elif test -d $cf_add_libdir
5356 if test -n "$LDFLAGS$LIBS" ; then
5357 # a loop is needed to ensure we can add subdirs of existing dirs
5358 for cf_test_libdir in $LDFLAGS $LIBS ; do
5359 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5360 cf_have_libdir=yes; break
5364 if test "$cf_have_libdir" = no ; then
5365 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5367 echo "${as_me:-configure}:5367: testing adding $cf_add_libdir to library-path ..." 1>&5
5369 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5379 if test -n "/lib" ; then
5380 for cf_add_libdir in /lib
5382 if test $cf_add_libdir = /usr/lib ; then
5384 elif test -d $cf_add_libdir
5387 if test -n "$LDFLAGS$LIBS" ; then
5388 # a loop is needed to ensure we can add subdirs of existing dirs
5389 for cf_test_libdir in $LDFLAGS $LIBS ; do
5390 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5391 cf_have_libdir=yes; break
5395 if test "$cf_have_libdir" = no ; then
5396 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5398 echo "${as_me:-configure}:5398: testing adding $cf_add_libdir to library-path ..." 1>&5
5400 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5410 if test "x$cf_cv_screen" = "xcurses_5lib"
5412 if test -d /usr/5lib ; then
5414 if test -n "/usr/5lib" ; then
5415 for cf_add_libdir in /usr/5lib
5417 if test $cf_add_libdir = /usr/lib ; then
5419 elif test -d $cf_add_libdir
5422 if test -n "$LDFLAGS$LIBS" ; then
5423 # a loop is needed to ensure we can add subdirs of existing dirs
5424 for cf_test_libdir in $LDFLAGS $LIBS ; do
5425 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5426 cf_have_libdir=yes; break
5430 if test "$cf_have_libdir" = no ; then
5431 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5433 echo "${as_me:-configure}:5433: testing adding $cf_add_libdir to library-path ..." 1>&5
5435 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5441 cf_add_libs="-lcurses -ltermcap"
5442 # Filter out duplicates - this happens with badly-designed ".pc" files...
5443 for cf_add_1lib in $LIBS
5445 for cf_add_2lib in $cf_add_libs
5447 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5453 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5459 ac_cv_func_initscr=yes
5463 if test ".$ac_cv_func_initscr" != .yes ; then
5464 cf_save_LIBS="$LIBS"
5466 if test ".${cf_cv_ncurses_version:-no}" != .no
5468 cf_check_list="ncurses curses cursesX"
5470 cf_check_list="cursesX curses ncurses"
5473 # Check for library containing tgoto. Do this before curses library
5474 # because it may be needed to link the test-case for initscr.
5475 if test "x$cf_term_lib" = x
5477 echo "$as_me:5477: checking for tgoto" >&5
5478 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5479 if test "${ac_cv_func_tgoto+set}" = set; then
5480 echo $ECHO_N "(cached) $ECHO_C" >&6
5482 cat >conftest.$ac_ext <<_ACEOF
5483 #line 5483 "configure"
5484 #include "confdefs.h"
5485 /* System header to define __stub macros and hopefully few prototypes,
5486 which can conflict with char tgoto (); below. */
5488 /* Override any gcc2 internal prototype to avoid an error. */
5492 /* We use char because int might match the return type of a gcc2
5493 builtin and then its argument prototype would still apply. */
5500 /* The GNU C library defines this for functions which it implements
5501 to always fail with ENOSYS. Some functions are actually named
5502 something starting with __ and the normal name is an alias. */
5503 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5506 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5513 rm -f conftest.$ac_objext conftest$ac_exeext
5514 if { (eval echo "$as_me:5514: \"$ac_link\"") >&5
5515 (eval $ac_link) 2>&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit $ac_status); } &&
5519 { ac_try='test -s conftest$ac_exeext'
5520 { (eval echo "$as_me:5520: \"$ac_try\"") >&5
5523 echo "$as_me:5523: \$? = $ac_status" >&5
5524 (exit $ac_status); }; }; then
5525 ac_cv_func_tgoto=yes
5527 echo "$as_me: failed program was:" >&5
5528 cat conftest.$ac_ext >&5
5531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5533 echo "$as_me:5533: result: $ac_cv_func_tgoto" >&5
5534 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5535 if test $ac_cv_func_tgoto = yes; then
5536 cf_term_lib=predefined
5539 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5541 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5542 echo "$as_me:5542: checking for tgoto in -l$cf_term_lib" >&5
5543 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5544 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5545 echo $ECHO_N "(cached) $ECHO_C" >&6
5547 ac_check_lib_save_LIBS=$LIBS
5548 LIBS="-l$cf_term_lib $LIBS"
5549 cat >conftest.$ac_ext <<_ACEOF
5550 #line 5550 "configure"
5551 #include "confdefs.h"
5553 /* Override any gcc2 internal prototype to avoid an error. */
5557 /* We use char because int might match the return type of a gcc2
5558 builtin and then its argument prototype would still apply. */
5568 rm -f conftest.$ac_objext conftest$ac_exeext
5569 if { (eval echo "$as_me:5569: \"$ac_link\"") >&5
5570 (eval $ac_link) 2>&5
5572 echo "$as_me:5572: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest$ac_exeext'
5575 { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5578 echo "$as_me:5578: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
5580 eval "$as_ac_Lib=yes"
5582 echo "$as_me: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 eval "$as_ac_Lib=no"
5586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5587 LIBS=$ac_check_lib_save_LIBS
5589 echo "$as_me:5589: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5590 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5591 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5601 # Check for library containing initscr
5602 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5603 if test "x$cf_curs_lib" = x
5605 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5607 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5608 echo "$as_me:5608: checking for initscr in -l$cf_curs_lib" >&5
5609 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5610 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5611 echo $ECHO_N "(cached) $ECHO_C" >&6
5613 ac_check_lib_save_LIBS=$LIBS
5614 LIBS="-l$cf_curs_lib $LIBS"
5615 cat >conftest.$ac_ext <<_ACEOF
5616 #line 5616 "configure"
5617 #include "confdefs.h"
5619 /* Override any gcc2 internal prototype to avoid an error. */
5623 /* We use char because int might match the return type of a gcc2
5624 builtin and then its argument prototype would still apply. */
5634 rm -f conftest.$ac_objext conftest$ac_exeext
5635 if { (eval echo "$as_me:5635: \"$ac_link\"") >&5
5636 (eval $ac_link) 2>&5
5638 echo "$as_me:5638: \$? = $ac_status" >&5
5639 (exit $ac_status); } &&
5640 { ac_try='test -s conftest$ac_exeext'
5641 { (eval echo "$as_me:5641: \"$ac_try\"") >&5
5644 echo "$as_me:5644: \$? = $ac_status" >&5
5645 (exit $ac_status); }; }; then
5646 eval "$as_ac_Lib=yes"
5648 echo "$as_me: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
5650 eval "$as_ac_Lib=no"
5652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5653 LIBS=$ac_check_lib_save_LIBS
5655 echo "$as_me:5655: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5656 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5657 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5663 test $cf_curs_lib = unknown && { { echo "$as_me:5663: error: no curses library found" >&5
5664 echo "$as_me: error: no curses library found" >&2;}
5665 { (exit 1); exit 1; }; }
5667 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5668 if test "$cf_term_lib" = unknown ; then
5669 echo "$as_me:5669: checking if we can link with $cf_curs_lib library" >&5
5670 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5671 cat >conftest.$ac_ext <<_ACEOF
5672 #line 5672 "configure"
5673 #include "confdefs.h"
5674 #include <${cf_cv_ncurses_header:-curses.h}>
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684 if { (eval echo "$as_me:5684: \"$ac_link\"") >&5
5685 (eval $ac_link) 2>&5
5687 echo "$as_me:5687: \$? = $ac_status" >&5
5688 (exit $ac_status); } &&
5689 { ac_try='test -s conftest$ac_exeext'
5690 { (eval echo "$as_me:5690: \"$ac_try\"") >&5
5693 echo "$as_me:5693: \$? = $ac_status" >&5
5694 (exit $ac_status); }; }; then
5697 echo "$as_me: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5702 echo "$as_me:5702: result: $cf_result" >&5
5703 echo "${ECHO_T}$cf_result" >&6
5704 test $cf_result = no && { { echo "$as_me:5704: error: Cannot link curses library" >&5
5705 echo "$as_me: error: Cannot link curses library" >&2;}
5706 { (exit 1); exit 1; }; }
5707 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5709 elif test "$cf_term_lib" != predefined ; then
5710 echo "$as_me:5710: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5711 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5712 cat >conftest.$ac_ext <<_ACEOF
5713 #line 5713 "configure"
5714 #include "confdefs.h"
5715 #include <${cf_cv_ncurses_header:-curses.h}>
5719 initscr(); tgoto((char *)0, 0, 0);
5724 rm -f conftest.$ac_objext conftest$ac_exeext
5725 if { (eval echo "$as_me:5725: \"$ac_link\"") >&5
5726 (eval $ac_link) 2>&5
5728 echo "$as_me:5728: \$? = $ac_status" >&5
5729 (exit $ac_status); } &&
5730 { ac_try='test -s conftest$ac_exeext'
5731 { (eval echo "$as_me:5731: \"$ac_try\"") >&5
5734 echo "$as_me:5734: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
5738 echo "$as_me: failed program was:" >&5
5739 cat conftest.$ac_ext >&5
5741 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5742 cat >conftest.$ac_ext <<_ACEOF
5743 #line 5743 "configure"
5744 #include "confdefs.h"
5745 #include <${cf_cv_ncurses_header:-curses.h}>
5754 rm -f conftest.$ac_objext conftest$ac_exeext
5755 if { (eval echo "$as_me:5755: \"$ac_link\"") >&5
5756 (eval $ac_link) 2>&5
5758 echo "$as_me:5758: \$? = $ac_status" >&5
5759 (exit $ac_status); } &&
5760 { ac_try='test -s conftest$ac_exeext'
5761 { (eval echo "$as_me:5761: \"$ac_try\"") >&5
5764 echo "$as_me:5764: \$? = $ac_status" >&5
5765 (exit $ac_status); }; }; then
5768 echo "$as_me: failed program was:" >&5
5769 cat conftest.$ac_ext >&5
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776 echo "$as_me:5776: result: $cf_result" >&5
5777 echo "${ECHO_T}$cf_result" >&6
5785 echo "$as_me:5785: checking for multibyte character support" >&5
5786 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5787 if test "${cf_cv_utf8_lib+set}" = set; then
5788 echo $ECHO_N "(cached) $ECHO_C" >&6
5791 cf_save_LIBS="$LIBS"
5792 cat >conftest.$ac_ext <<_ACEOF
5793 #line 5793 "configure"
5794 #include "confdefs.h"
5805 rm -f conftest.$ac_objext conftest$ac_exeext
5806 if { (eval echo "$as_me:5806: \"$ac_link\"") >&5
5807 (eval $ac_link) 2>&5
5809 echo "$as_me:5809: \$? = $ac_status" >&5
5810 (exit $ac_status); } &&
5811 { ac_try='test -s conftest$ac_exeext'
5812 { (eval echo "$as_me:5812: \"$ac_try\"") >&5
5815 echo "$as_me:5815: \$? = $ac_status" >&5
5816 (exit $ac_status); }; }; then
5819 echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5822 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5823 # will be set on completion of the AC_TRY_LINK below.
5824 cf_cv_header_path_utf8=
5825 cf_cv_library_path_utf8=
5827 echo "${as_me:-configure}:5827: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5829 cf_save_LIBS="$LIBS"
5831 cat >conftest.$ac_ext <<_ACEOF
5832 #line 5832 "configure"
5833 #include "confdefs.h"
5835 #include <libutf8.h>
5844 rm -f conftest.$ac_objext conftest$ac_exeext
5845 if { (eval echo "$as_me:5845: \"$ac_link\"") >&5
5846 (eval $ac_link) 2>&5
5848 echo "$as_me:5848: \$? = $ac_status" >&5
5849 (exit $ac_status); } &&
5850 { ac_try='test -s conftest$ac_exeext'
5851 { (eval echo "$as_me:5851: \"$ac_try\"") >&5
5854 echo "$as_me:5854: \$? = $ac_status" >&5
5855 (exit $ac_status); }; }; then
5857 cf_cv_find_linkage_utf8=yes
5858 cf_cv_header_path_utf8=/usr/include
5859 cf_cv_library_path_utf8=/usr/lib
5862 echo "$as_me: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
5865 LIBS="-lutf8 $cf_save_LIBS"
5867 cat >conftest.$ac_ext <<_ACEOF
5868 #line 5868 "configure"
5869 #include "confdefs.h"
5871 #include <libutf8.h>
5880 rm -f conftest.$ac_objext conftest$ac_exeext
5881 if { (eval echo "$as_me:5881: \"$ac_link\"") >&5
5882 (eval $ac_link) 2>&5
5884 echo "$as_me:5884: \$? = $ac_status" >&5
5885 (exit $ac_status); } &&
5886 { ac_try='test -s conftest$ac_exeext'
5887 { (eval echo "$as_me:5887: \"$ac_try\"") >&5
5890 echo "$as_me:5890: \$? = $ac_status" >&5
5891 (exit $ac_status); }; }; then
5893 cf_cv_find_linkage_utf8=yes
5894 cf_cv_header_path_utf8=/usr/include
5895 cf_cv_library_path_utf8=/usr/lib
5896 cf_cv_library_file_utf8="-lutf8"
5899 echo "$as_me: failed program was:" >&5
5900 cat conftest.$ac_ext >&5
5902 cf_cv_find_linkage_utf8=no
5903 LIBS="$cf_save_LIBS"
5905 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5907 echo "${as_me:-configure}:5907: testing find linkage for utf8 library ..." 1>&5
5909 echo "${as_me:-configure}:5909: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5911 cf_save_CPPFLAGS="$CPPFLAGS"
5912 cf_test_CPPFLAGS="$CPPFLAGS"
5916 # collect the current set of include-directories from compiler flags
5917 cf_header_path_list=""
5918 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5919 for cf_header_path in $CPPFLAGS $CFLAGS
5921 case $cf_header_path in
5923 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5925 test "x$cf_header_path" != "xNONE" && \
5926 test -d "$cf_header_path" && \
5928 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5929 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5930 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5931 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5932 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5933 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5936 cf_header_path_list="$cf_header_path_list $cf_search"
5942 # add the variations for the package we are looking for
5946 test "x$prefix" != "xNONE" && \
5947 test -d "$prefix" && \
5949 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5950 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5951 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5952 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5953 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5954 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5957 for cf_subdir_prefix in \
5966 test "x$cf_subdir_prefix" != "x$prefix" && \
5967 test -d "$cf_subdir_prefix" && \
5968 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5969 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5970 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5971 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5972 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5973 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5974 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5979 test "$includedir" != NONE && \
5980 test "$includedir" != "/usr/include" && \
5981 test -d "$includedir" && {
5982 test -d $includedir && cf_search="$cf_search $includedir"
5983 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5986 test "$oldincludedir" != NONE && \
5987 test "$oldincludedir" != "/usr/include" && \
5988 test -d "$oldincludedir" && {
5989 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5990 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5993 cf_search="$cf_search $cf_header_path_list"
5995 for cf_cv_header_path_utf8 in $cf_search
5997 if test -d $cf_cv_header_path_utf8 ; then
5998 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6000 echo "${as_me:-configure}:6000: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6002 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6003 cat >conftest.$ac_ext <<_ACEOF
6004 #line 6004 "configure"
6005 #include "confdefs.h"
6007 #include <libutf8.h>
6016 rm -f conftest.$ac_objext
6017 if { (eval echo "$as_me:6017: \"$ac_compile\"") >&5
6018 (eval $ac_compile) 2>&5
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit $ac_status); } &&
6022 { ac_try='test -s conftest.$ac_objext'
6023 { (eval echo "$as_me:6023: \"$ac_try\"") >&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit $ac_status); }; }; then
6029 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6031 echo "${as_me:-configure}:6031: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6033 cf_cv_find_linkage_utf8=maybe
6034 cf_test_CPPFLAGS="$CPPFLAGS"
6037 echo "$as_me: failed program was:" >&5
6038 cat conftest.$ac_ext >&5
6040 CPPFLAGS="$cf_save_CPPFLAGS"
6043 rm -f conftest.$ac_objext conftest.$ac_ext
6047 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6049 echo "${as_me:-configure}:6049: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6051 cf_save_LIBS="$LIBS"
6052 cf_save_LDFLAGS="$LDFLAGS"
6054 if test "$cf_cv_find_linkage_utf8" != yes ; then
6057 cf_library_path_list=""
6058 if test -n "${LDFLAGS}${LIBS}" ; then
6059 for cf_library_path in $LDFLAGS $LIBS
6061 case $cf_library_path in
6063 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6065 test "x$cf_library_path" != "xNONE" && \
6066 test -d "$cf_library_path" && \
6068 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6069 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6070 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6071 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6072 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6073 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6076 cf_library_path_list="$cf_library_path_list $cf_search"
6084 test "x$prefix" != "xNONE" && \
6085 test -d "$prefix" && \
6087 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6088 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6089 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6090 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6091 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6092 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6095 for cf_subdir_prefix in \
6104 test "x$cf_subdir_prefix" != "x$prefix" && \
6105 test -d "$cf_subdir_prefix" && \
6106 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6107 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6108 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6109 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6110 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6111 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6112 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6117 cf_search="$cf_library_path_list $cf_search"
6119 for cf_cv_library_path_utf8 in $cf_search
6121 if test -d $cf_cv_library_path_utf8 ; then
6122 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6124 echo "${as_me:-configure}:6124: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6126 CPPFLAGS="$cf_test_CPPFLAGS"
6127 LIBS="-lutf8 $cf_save_LIBS"
6128 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6129 cat >conftest.$ac_ext <<_ACEOF
6130 #line 6130 "configure"
6131 #include "confdefs.h"
6133 #include <libutf8.h>
6142 rm -f conftest.$ac_objext conftest$ac_exeext
6143 if { (eval echo "$as_me:6143: \"$ac_link\"") >&5
6144 (eval $ac_link) 2>&5
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
6148 { ac_try='test -s conftest$ac_exeext'
6149 { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6152 echo "$as_me:6152: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6155 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6157 echo "${as_me:-configure}:6157: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6159 cf_cv_find_linkage_utf8=yes
6160 cf_cv_library_file_utf8="-lutf8"
6163 echo "$as_me: failed program was:" >&5
6164 cat conftest.$ac_ext >&5
6166 CPPFLAGS="$cf_save_CPPFLAGS"
6167 LIBS="$cf_save_LIBS"
6168 LDFLAGS="$cf_save_LDFLAGS"
6171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6174 CPPFLAGS="$cf_save_CPPFLAGS"
6175 LDFLAGS="$cf_save_LDFLAGS"
6179 cf_cv_find_linkage_utf8=no
6183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6188 LIBS="$cf_save_LIBS"
6190 if test "$cf_cv_find_linkage_utf8" = yes ; then
6191 cf_cv_utf8_lib=add-on
6197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6199 echo "$as_me:6199: result: $cf_cv_utf8_lib" >&5
6200 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6202 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6204 if test "$cf_cv_utf8_lib" = "add-on" ; then
6206 cat >>confdefs.h <<\EOF
6207 #define HAVE_LIBUTF8_H 1
6210 if test -n "$cf_cv_header_path_utf8" ; then
6211 for cf_add_incdir in $cf_cv_header_path_utf8
6213 while test $cf_add_incdir != /usr/include
6215 if test -d $cf_add_incdir
6218 if test -n "$CFLAGS$CPPFLAGS" ; then
6219 # a loop is needed to ensure we can add subdirs of existing dirs
6220 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6221 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6222 cf_have_incdir=yes; break
6227 if test "$cf_have_incdir" = no ; then
6228 if test "$cf_add_incdir" = /usr/local/include ; then
6229 if test "$GCC" = yes
6231 cf_save_CPPFLAGS=$CPPFLAGS
6232 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6233 cat >conftest.$ac_ext <<_ACEOF
6234 #line 6234 "configure"
6235 #include "confdefs.h"
6245 rm -f conftest.$ac_objext
6246 if { (eval echo "$as_me:6246: \"$ac_compile\"") >&5
6247 (eval $ac_compile) 2>&5
6249 echo "$as_me:6249: \$? = $ac_status" >&5
6250 (exit $ac_status); } &&
6251 { ac_try='test -s conftest.$ac_objext'
6252 { (eval echo "$as_me:6252: \"$ac_try\"") >&5
6255 echo "$as_me:6255: \$? = $ac_status" >&5
6256 (exit $ac_status); }; }; then
6259 echo "$as_me: failed program was:" >&5
6260 cat conftest.$ac_ext >&5
6263 rm -f conftest.$ac_objext conftest.$ac_ext
6264 CPPFLAGS=$cf_save_CPPFLAGS
6269 if test "$cf_have_incdir" = no ; then
6270 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6272 echo "${as_me:-configure}:6272: testing adding $cf_add_incdir to include-path ..." 1>&5
6274 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6276 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6277 test "$cf_top_incdir" = "$cf_add_incdir" && break
6278 cf_add_incdir="$cf_top_incdir"
6289 if test -n "$cf_cv_library_path_utf8" ; then
6290 for cf_add_libdir in $cf_cv_library_path_utf8
6292 if test $cf_add_libdir = /usr/lib ; then
6294 elif test -d $cf_add_libdir
6297 if test -n "$LDFLAGS$LIBS" ; then
6298 # a loop is needed to ensure we can add subdirs of existing dirs
6299 for cf_test_libdir in $LDFLAGS $LIBS ; do
6300 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6301 cf_have_libdir=yes; break
6305 if test "$cf_have_libdir" = no ; then
6306 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6308 echo "${as_me:-configure}:6308: testing adding $cf_add_libdir to library-path ..." 1>&5
6310 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6316 cf_add_libs="$cf_cv_library_file_utf8"
6317 # Filter out duplicates - this happens with badly-designed ".pc" files...
6318 for cf_add_1lib in $LIBS
6320 for cf_add_2lib in $cf_add_libs
6322 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6328 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6334 cf_ncuconfig_root=$cf_cv_screen
6335 cf_have_ncuconfig=no
6337 if test "x${PKG_CONFIG:=none}" != xnone; then
6338 echo "$as_me:6338: checking pkg-config for $cf_ncuconfig_root" >&5
6339 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6340 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6341 echo "$as_me:6341: result: yes" >&5
6342 echo "${ECHO_T}yes" >&6
6344 echo "$as_me:6344: checking if the $cf_ncuconfig_root package files work" >&5
6345 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6346 cf_have_ncuconfig=unknown
6348 cf_save_CPPFLAGS="$CPPFLAGS"
6349 cf_save_LIBS="$LIBS"
6351 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6353 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6354 # Filter out duplicates - this happens with badly-designed ".pc" files...
6355 for cf_add_1lib in $LIBS
6357 for cf_add_2lib in $cf_add_libs
6359 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6365 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6369 cat >conftest.$ac_ext <<_ACEOF
6370 #line 6370 "configure"
6371 #include "confdefs.h"
6372 #include <${cf_cv_ncurses_header:-curses.h}>
6376 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6381 rm -f conftest.$ac_objext conftest$ac_exeext
6382 if { (eval echo "$as_me:6382: \"$ac_link\"") >&5
6383 (eval $ac_link) 2>&5
6385 echo "$as_me:6385: \$? = $ac_status" >&5
6386 (exit $ac_status); } &&
6387 { ac_try='test -s conftest$ac_exeext'
6388 { (eval echo "$as_me:6388: \"$ac_try\"") >&5
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit $ac_status); }; }; then
6393 if test "$cross_compiling" = yes; then
6394 cf_have_ncuconfig=maybe
6396 cat >conftest.$ac_ext <<_ACEOF
6397 #line 6397 "configure"
6398 #include "confdefs.h"
6399 #include <${cf_cv_ncurses_header:-curses.h}>
6401 { char *xx = curses_version(); return (xx == 0); }
6403 rm -f conftest$ac_exeext
6404 if { (eval echo "$as_me:6404: \"$ac_link\"") >&5
6405 (eval $ac_link) 2>&5
6407 echo "$as_me:6407: \$? = $ac_status" >&5
6408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6409 { (eval echo "$as_me:6409: \"$ac_try\"") >&5
6412 echo "$as_me:6412: \$? = $ac_status" >&5
6413 (exit $ac_status); }; }; then
6414 cf_have_ncuconfig=yes
6416 echo "$as_me: program exited with status $ac_status" >&5
6417 echo "$as_me: failed program was:" >&5
6418 cat conftest.$ac_ext >&5
6419 cf_have_ncuconfig=no
6421 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6424 echo "$as_me: failed program was:" >&5
6425 cat conftest.$ac_ext >&5
6426 cf_have_ncuconfig=no
6428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6429 echo "$as_me:6429: result: $cf_have_ncuconfig" >&5
6430 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6431 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6432 if test "$cf_have_ncuconfig" != "yes"
6434 CPPFLAGS="$cf_save_CPPFLAGS"
6435 LIBS="$cf_save_LIBS"
6436 NCURSES_CONFIG_PKG=none
6439 cat >>confdefs.h <<\EOF
6443 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6447 echo "$as_me:6447: result: no" >&5
6448 echo "${ECHO_T}no" >&6
6449 NCURSES_CONFIG_PKG=none
6452 NCURSES_CONFIG_PKG=none
6455 if test "x$cf_have_ncuconfig" = "xno"; then
6456 echo "Looking for ${cf_ncuconfig_root}-config"
6458 if test -n "$ac_tool_prefix"; then
6459 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6461 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6462 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6463 echo "$as_me:6463: checking for $ac_word" >&5
6464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6465 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6466 echo $ECHO_N "(cached) $ECHO_C" >&6
6468 if test -n "$NCURSES_CONFIG"; then
6469 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6471 ac_save_IFS=$IFS; IFS=$ac_path_separator
6473 for ac_dir in $ac_dummy; do
6475 test -z "$ac_dir" && ac_dir=.
6476 $as_executable_p "$ac_dir/$ac_word" || continue
6477 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6478 echo "$as_me:6478: found $ac_dir/$ac_word" >&5
6484 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6485 if test -n "$NCURSES_CONFIG"; then
6486 echo "$as_me:6486: result: $NCURSES_CONFIG" >&5
6487 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6489 echo "$as_me:6489: result: no" >&5
6490 echo "${ECHO_T}no" >&6
6493 test -n "$NCURSES_CONFIG" && break
6496 if test -z "$NCURSES_CONFIG"; then
6497 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6498 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6500 # Extract the first word of "$ac_prog", so it can be a program name with args.
6501 set dummy $ac_prog; ac_word=$2
6502 echo "$as_me:6502: checking for $ac_word" >&5
6503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6504 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6505 echo $ECHO_N "(cached) $ECHO_C" >&6
6507 if test -n "$ac_ct_NCURSES_CONFIG"; then
6508 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6510 ac_save_IFS=$IFS; IFS=$ac_path_separator
6512 for ac_dir in $ac_dummy; do
6514 test -z "$ac_dir" && ac_dir=.
6515 $as_executable_p "$ac_dir/$ac_word" || continue
6516 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6517 echo "$as_me:6517: found $ac_dir/$ac_word" >&5
6523 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6524 if test -n "$ac_ct_NCURSES_CONFIG"; then
6525 echo "$as_me:6525: result: $ac_ct_NCURSES_CONFIG" >&5
6526 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6528 echo "$as_me:6528: result: no" >&5
6529 echo "${ECHO_T}no" >&6
6532 test -n "$ac_ct_NCURSES_CONFIG" && break
6534 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6536 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6539 if test "$NCURSES_CONFIG" != none ; then
6541 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6543 cf_add_libs="`$NCURSES_CONFIG --libs`"
6544 # Filter out duplicates - this happens with badly-designed ".pc" files...
6545 for cf_add_1lib in $LIBS
6547 for cf_add_2lib in $cf_add_libs
6549 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6555 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6559 # even with config script, some packages use no-override for curses.h
6561 echo "$as_me:6561: checking if we have identified curses headers" >&5
6562 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6563 if test "${cf_cv_ncurses_header+set}" = set; then
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6567 cf_cv_ncurses_header=none
6569 ncurses.h $cf_cv_screen/ncurses.h \
6570 curses.h $cf_cv_screen/curses.h
6572 cat >conftest.$ac_ext <<_ACEOF
6573 #line 6573 "configure"
6574 #include "confdefs.h"
6575 #include <${cf_header}>
6579 initscr(); tgoto("?", 0,0)
6584 rm -f conftest.$ac_objext
6585 if { (eval echo "$as_me:6585: \"$ac_compile\"") >&5
6586 (eval $ac_compile) 2>&5
6588 echo "$as_me:6588: \$? = $ac_status" >&5
6589 (exit $ac_status); } &&
6590 { ac_try='test -s conftest.$ac_objext'
6591 { (eval echo "$as_me:6591: \"$ac_try\"") >&5
6594 echo "$as_me:6594: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 cf_cv_ncurses_header=$cf_header; break
6598 echo "$as_me: failed program was:" >&5
6599 cat conftest.$ac_ext >&5
6601 rm -f conftest.$ac_objext conftest.$ac_ext
6605 echo "$as_me:6605: result: $cf_cv_ncurses_header" >&5
6606 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6608 if test "$cf_cv_ncurses_header" = none ; then
6609 { { echo "$as_me:6609: error: No curses header-files found" >&5
6610 echo "$as_me: error: No curses header-files found" >&2;}
6611 { (exit 1); exit 1; }; }
6614 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6616 for ac_header in $cf_cv_ncurses_header
6618 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6619 echo "$as_me:6619: checking for $ac_header" >&5
6620 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6621 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6622 echo $ECHO_N "(cached) $ECHO_C" >&6
6624 cat >conftest.$ac_ext <<_ACEOF
6625 #line 6625 "configure"
6626 #include "confdefs.h"
6627 #include <$ac_header>
6629 if { (eval echo "$as_me:6629: \"$ac_cpp conftest.$ac_ext\"") >&5
6630 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6632 egrep -v '^ *\+' conftest.er1 >conftest.err
6634 cat conftest.err >&5
6635 echo "$as_me:6635: \$? = $ac_status" >&5
6636 (exit $ac_status); } >/dev/null; then
6637 if test -s conftest.err; then
6638 ac_cpp_err=$ac_c_preproc_warn_flag
6645 if test -z "$ac_cpp_err"; then
6646 eval "$as_ac_Header=yes"
6648 echo "$as_me: failed program was:" >&5
6649 cat conftest.$ac_ext >&5
6650 eval "$as_ac_Header=no"
6652 rm -f conftest.err conftest.$ac_ext
6654 echo "$as_me:6654: result: `eval echo '${'$as_ac_Header'}'`" >&5
6655 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6656 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6657 cat >>confdefs.h <<EOF
6658 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6664 cat >>confdefs.h <<\EOF
6668 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6670 cat >>confdefs.h <<EOF
6671 #define $cf_nculib_ROOT 1
6674 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6678 cf_ncuhdr_root=$cf_cv_screen
6680 test -n "$cf_cv_curses_dir" && \
6681 test "$cf_cv_curses_dir" != "no" && { \
6683 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6684 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6686 while test $cf_add_incdir != /usr/include
6688 if test -d $cf_add_incdir
6691 if test -n "$CFLAGS$CPPFLAGS" ; then
6692 # a loop is needed to ensure we can add subdirs of existing dirs
6693 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6694 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6695 cf_have_incdir=yes; break
6700 if test "$cf_have_incdir" = no ; then
6701 if test "$cf_add_incdir" = /usr/local/include ; then
6702 if test "$GCC" = yes
6704 cf_save_CPPFLAGS=$CPPFLAGS
6705 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6706 cat >conftest.$ac_ext <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6718 rm -f conftest.$ac_objext
6719 if { (eval echo "$as_me:6719: \"$ac_compile\"") >&5
6720 (eval $ac_compile) 2>&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit $ac_status); } &&
6724 { ac_try='test -s conftest.$ac_objext'
6725 { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6728 echo "$as_me:6728: \$? = $ac_status" >&5
6729 (exit $ac_status); }; }; then
6732 echo "$as_me: failed program was:" >&5
6733 cat conftest.$ac_ext >&5
6736 rm -f conftest.$ac_objext conftest.$ac_ext
6737 CPPFLAGS=$cf_save_CPPFLAGS
6742 if test "$cf_have_incdir" = no ; then
6743 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6745 echo "${as_me:-configure}:6745: testing adding $cf_add_incdir to include-path ..." 1>&5
6747 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6749 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6750 test "$cf_top_incdir" = "$cf_add_incdir" && break
6751 cf_add_incdir="$cf_top_incdir"
6764 echo "$as_me:6764: checking for $cf_ncuhdr_root header in include-path" >&5
6765 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6766 if test "${cf_cv_ncurses_h+set}" = set; then
6767 echo $ECHO_N "(cached) $ECHO_C" >&6
6770 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6771 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6772 for cf_header in $cf_header_list
6775 cat >conftest.$ac_ext <<_ACEOF
6776 #line 6776 "configure"
6777 #include "confdefs.h"
6779 #include <$cf_header>
6784 #ifdef NCURSES_VERSION
6786 printf("%s\n", NCURSES_VERSION);
6799 rm -f conftest.$ac_objext
6800 if { (eval echo "$as_me:6800: \"$ac_compile\"") >&5
6801 (eval $ac_compile) 2>&5
6803 echo "$as_me:6803: \$? = $ac_status" >&5
6804 (exit $ac_status); } &&
6805 { ac_try='test -s conftest.$ac_objext'
6806 { (eval echo "$as_me:6806: \"$ac_try\"") >&5
6809 echo "$as_me:6809: \$? = $ac_status" >&5
6810 (exit $ac_status); }; }; then
6811 cf_cv_ncurses_h=$cf_header
6814 echo "$as_me: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6818 rm -f conftest.$ac_objext conftest.$ac_ext
6820 test "$cf_cv_ncurses_h" != no && break
6824 echo "$as_me:6824: result: $cf_cv_ncurses_h" >&5
6825 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6827 if test "$cf_cv_ncurses_h" != no ; then
6828 cf_cv_ncurses_header=$cf_cv_ncurses_h
6831 echo "$as_me:6831: checking for $cf_ncuhdr_root include-path" >&5
6832 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6833 if test "${cf_cv_ncurses_h2+set}" = set; then
6834 echo $ECHO_N "(cached) $ECHO_C" >&6
6837 test -n "$verbose" && echo
6841 # collect the current set of include-directories from compiler flags
6842 cf_header_path_list=""
6843 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6844 for cf_header_path in $CPPFLAGS $CFLAGS
6846 case $cf_header_path in
6848 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6850 test "x$cf_header_path" != "xNONE" && \
6851 test -d "$cf_header_path" && \
6853 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6854 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6855 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6856 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6857 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6858 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"
6861 cf_header_path_list="$cf_header_path_list $cf_search"
6867 # add the variations for the package we are looking for
6871 test "x$prefix" != "xNONE" && \
6872 test -d "$prefix" && \
6874 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6875 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6876 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6877 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6878 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6879 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6882 for cf_subdir_prefix in \
6891 test "x$cf_subdir_prefix" != "x$prefix" && \
6892 test -d "$cf_subdir_prefix" && \
6893 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6894 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6895 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6896 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6897 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6898 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6899 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"
6904 test "$includedir" != NONE && \
6905 test "$includedir" != "/usr/include" && \
6906 test -d "$includedir" && {
6907 test -d $includedir && cf_search="$cf_search $includedir"
6908 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6911 test "$oldincludedir" != NONE && \
6912 test "$oldincludedir" != "/usr/include" && \
6913 test -d "$oldincludedir" && {
6914 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6915 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6918 cf_search="$cf_search $cf_header_path_list"
6920 test -n "$verbose" && echo search path $cf_search
6921 cf_save2_CPPFLAGS="$CPPFLAGS"
6922 for cf_incdir in $cf_search
6925 if test -n "$cf_incdir" ; then
6926 for cf_add_incdir in $cf_incdir
6928 while test $cf_add_incdir != /usr/include
6930 if test -d $cf_add_incdir
6933 if test -n "$CFLAGS$CPPFLAGS" ; then
6934 # a loop is needed to ensure we can add subdirs of existing dirs
6935 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6936 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6937 cf_have_incdir=yes; break
6942 if test "$cf_have_incdir" = no ; then
6943 if test "$cf_add_incdir" = /usr/local/include ; then
6944 if test "$GCC" = yes
6946 cf_save_CPPFLAGS=$CPPFLAGS
6947 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6948 cat >conftest.$ac_ext <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6960 rm -f conftest.$ac_objext
6961 if { (eval echo "$as_me:6961: \"$ac_compile\"") >&5
6962 (eval $ac_compile) 2>&5
6964 echo "$as_me:6964: \$? = $ac_status" >&5
6965 (exit $ac_status); } &&
6966 { ac_try='test -s conftest.$ac_objext'
6967 { (eval echo "$as_me:6967: \"$ac_try\"") >&5
6970 echo "$as_me:6970: \$? = $ac_status" >&5
6971 (exit $ac_status); }; }; then
6974 echo "$as_me: failed program was:" >&5
6975 cat conftest.$ac_ext >&5
6978 rm -f conftest.$ac_objext conftest.$ac_ext
6979 CPPFLAGS=$cf_save_CPPFLAGS
6984 if test "$cf_have_incdir" = no ; then
6985 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6987 echo "${as_me:-configure}:6987: testing adding $cf_add_incdir to include-path ..." 1>&5
6989 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6991 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6992 test "$cf_top_incdir" = "$cf_add_incdir" && break
6993 cf_add_incdir="$cf_top_incdir"
7009 cat >conftest.$ac_ext <<_ACEOF
7010 #line 7010 "configure"
7011 #include "confdefs.h"
7013 #include <$cf_header>
7018 #ifdef NCURSES_VERSION
7020 printf("%s\n", NCURSES_VERSION);
7033 rm -f conftest.$ac_objext
7034 if { (eval echo "$as_me:7034: \"$ac_compile\"") >&5
7035 (eval $ac_compile) 2>&5
7037 echo "$as_me:7037: \$? = $ac_status" >&5
7038 (exit $ac_status); } &&
7039 { ac_try='test -s conftest.$ac_objext'
7040 { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7043 echo "$as_me:7043: \$? = $ac_status" >&5
7044 (exit $ac_status); }; }; then
7045 cf_cv_ncurses_h2=$cf_header
7048 echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7052 rm -f conftest.$ac_objext conftest.$ac_ext
7054 if test "$cf_cv_ncurses_h2" != no ; then
7055 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7056 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7059 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7061 CPPFLAGS="$cf_save2_CPPFLAGS"
7062 test "$cf_cv_ncurses_h2" != no && break
7064 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7064: error: not found" >&5
7065 echo "$as_me: error: not found" >&2;}
7066 { (exit 1); exit 1; }; }
7069 echo "$as_me:7069: result: $cf_cv_ncurses_h2" >&5
7070 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7072 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7073 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7074 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7075 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7078 if test -n "$cf_1st_incdir" ; then
7079 for cf_add_incdir in $cf_1st_incdir
7081 while test $cf_add_incdir != /usr/include
7083 if test -d $cf_add_incdir
7086 if test -n "$CFLAGS$CPPFLAGS" ; then
7087 # a loop is needed to ensure we can add subdirs of existing dirs
7088 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7089 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7090 cf_have_incdir=yes; break
7095 if test "$cf_have_incdir" = no ; then
7096 if test "$cf_add_incdir" = /usr/local/include ; then
7097 if test "$GCC" = yes
7099 cf_save_CPPFLAGS=$CPPFLAGS
7100 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7101 cat >conftest.$ac_ext <<_ACEOF
7102 #line 7102 "configure"
7103 #include "confdefs.h"
7113 rm -f conftest.$ac_objext
7114 if { (eval echo "$as_me:7114: \"$ac_compile\"") >&5
7115 (eval $ac_compile) 2>&5
7117 echo "$as_me:7117: \$? = $ac_status" >&5
7118 (exit $ac_status); } &&
7119 { ac_try='test -s conftest.$ac_objext'
7120 { (eval echo "$as_me:7120: \"$ac_try\"") >&5
7123 echo "$as_me:7123: \$? = $ac_status" >&5
7124 (exit $ac_status); }; }; then
7127 echo "$as_me: failed program was:" >&5
7128 cat conftest.$ac_ext >&5
7131 rm -f conftest.$ac_objext conftest.$ac_ext
7132 CPPFLAGS=$cf_save_CPPFLAGS
7137 if test "$cf_have_incdir" = no ; then
7138 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7140 echo "${as_me:-configure}:7140: testing adding $cf_add_incdir to include-path ..." 1>&5
7142 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7144 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7145 test "$cf_top_incdir" = "$cf_add_incdir" && break
7146 cf_add_incdir="$cf_top_incdir"
7159 # Set definitions to allow ifdef'ing for ncurses.h
7161 case $cf_cv_ncurses_header in
7164 cat >>confdefs.h <<\EOF
7165 #define HAVE_NCURSES_H 1
7171 case $cf_cv_ncurses_header in
7172 (ncurses/curses.h|ncurses/ncurses.h)
7174 cat >>confdefs.h <<\EOF
7175 #define HAVE_NCURSES_NCURSES_H 1
7179 (ncursesw/curses.h|ncursesw/ncurses.h)
7181 cat >>confdefs.h <<\EOF
7182 #define HAVE_NCURSESW_NCURSES_H 1
7188 echo "$as_me:7188: checking for terminfo header" >&5
7189 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7190 if test "${cf_cv_term_header+set}" = set; then
7191 echo $ECHO_N "(cached) $ECHO_C" >&6
7194 case ${cf_cv_ncurses_header} in
7195 (*/ncurses.h|*/ncursesw.h)
7196 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7199 cf_term_header=term.h
7203 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7205 cat >conftest.$ac_ext <<_ACEOF
7206 #line 7206 "configure"
7207 #include "confdefs.h"
7209 #include <${cf_cv_ncurses_header:-curses.h}>
7215 int x = auto_left_margin
7220 rm -f conftest.$ac_objext
7221 if { (eval echo "$as_me:7221: \"$ac_compile\"") >&5
7222 (eval $ac_compile) 2>&5
7224 echo "$as_me:7224: \$? = $ac_status" >&5
7225 (exit $ac_status); } &&
7226 { ac_try='test -s conftest.$ac_objext'
7227 { (eval echo "$as_me:7227: \"$ac_try\"") >&5
7230 echo "$as_me:7230: \$? = $ac_status" >&5
7231 (exit $ac_status); }; }; then
7233 cf_cv_term_header="$cf_test"
7235 echo "$as_me: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7238 cf_cv_term_header=unknown
7241 rm -f conftest.$ac_objext conftest.$ac_ext
7242 test "$cf_cv_term_header" != unknown && break
7246 echo "$as_me:7246: result: $cf_cv_term_header" >&5
7247 echo "${ECHO_T}$cf_cv_term_header" >&6
7249 # Set definitions to allow ifdef'ing to accommodate subdirectories
7251 case $cf_cv_term_header in
7254 cat >>confdefs.h <<\EOF
7255 #define HAVE_TERM_H 1
7261 case $cf_cv_term_header in
7264 cat >>confdefs.h <<\EOF
7265 #define HAVE_NCURSES_TERM_H 1
7271 cat >>confdefs.h <<\EOF
7272 #define HAVE_NCURSESW_TERM_H 1
7278 # some applications need this, but should check for NCURSES_VERSION
7280 cat >>confdefs.h <<\EOF
7284 echo "$as_me:7284: checking for ncurses version" >&5
7285 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7286 if test "${cf_cv_ncurses_version+set}" = set; then
7287 echo $ECHO_N "(cached) $ECHO_C" >&6
7290 cf_cv_ncurses_version=no
7293 if test "$cross_compiling" = yes; then
7295 # This will not work if the preprocessor splits the line after the
7296 # Autoconf token. The 'unproto' program does that.
7297 cat > conftest.$ac_ext <<EOF
7298 #include <${cf_cv_ncurses_header:-curses.h}>
7300 #ifdef NCURSES_VERSION
7301 Autoconf NCURSES_VERSION
7309 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7310 { (eval echo "$as_me:7310: \"$cf_try\"") >&5
7313 echo "$as_me:7313: \$? = $ac_status" >&5
7314 (exit $ac_status); }
7315 if test -f conftest.out ; then
7316 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7317 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7322 cat >conftest.$ac_ext <<_ACEOF
7323 #line 7323 "configure"
7324 #include "confdefs.h"
7326 #include <${cf_cv_ncurses_header:-curses.h}>
7330 FILE *fp = fopen("$cf_tempfile", "w");
7331 #ifdef NCURSES_VERSION
7332 # ifdef NCURSES_VERSION_PATCH
7333 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7335 fprintf(fp, "%s\n", NCURSES_VERSION);
7339 fprintf(fp, "old\n");
7344 ${cf_cv_main_return:-return}(0);
7347 rm -f conftest$ac_exeext
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349 (eval $ac_link) 2>&5
7351 echo "$as_me:7351: \$? = $ac_status" >&5
7352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7353 { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7356 echo "$as_me:7356: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7359 cf_cv_ncurses_version=`cat $cf_tempfile`
7361 echo "$as_me: program exited with status $ac_status" >&5
7362 echo "$as_me: failed program was:" >&5
7363 cat conftest.$ac_ext >&5
7365 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7370 echo "$as_me:7370: result: $cf_cv_ncurses_version" >&5
7371 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7372 test "$cf_cv_ncurses_version" = no ||
7373 cat >>confdefs.h <<\EOF
7377 cf_nculib_root=$cf_cv_screen
7378 # This works, except for the special case where we find gpm, but
7379 # ncurses is in a nonstandard location via $LIBS, and we really want
7382 cf_ncurses_SAVE="$LIBS"
7383 echo "$as_me:7383: checking for Gpm_Open in -lgpm" >&5
7384 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7385 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7386 echo $ECHO_N "(cached) $ECHO_C" >&6
7388 ac_check_lib_save_LIBS=$LIBS
7390 cat >conftest.$ac_ext <<_ACEOF
7391 #line 7391 "configure"
7392 #include "confdefs.h"
7394 /* Override any gcc2 internal prototype to avoid an error. */
7398 /* We use char because int might match the return type of a gcc2
7399 builtin and then its argument prototype would still apply. */
7409 rm -f conftest.$ac_objext conftest$ac_exeext
7410 if { (eval echo "$as_me:7410: \"$ac_link\"") >&5
7411 (eval $ac_link) 2>&5
7413 echo "$as_me:7413: \$? = $ac_status" >&5
7414 (exit $ac_status); } &&
7415 { ac_try='test -s conftest$ac_exeext'
7416 { (eval echo "$as_me:7416: \"$ac_try\"") >&5
7419 echo "$as_me:7419: \$? = $ac_status" >&5
7420 (exit $ac_status); }; }; then
7421 ac_cv_lib_gpm_Gpm_Open=yes
7423 echo "$as_me: failed program was:" >&5
7424 cat conftest.$ac_ext >&5
7425 ac_cv_lib_gpm_Gpm_Open=no
7427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7428 LIBS=$ac_check_lib_save_LIBS
7430 echo "$as_me:7430: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7431 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7432 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7433 echo "$as_me:7433: checking for initscr in -lgpm" >&5
7434 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7435 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7436 echo $ECHO_N "(cached) $ECHO_C" >&6
7438 ac_check_lib_save_LIBS=$LIBS
7440 cat >conftest.$ac_ext <<_ACEOF
7441 #line 7441 "configure"
7442 #include "confdefs.h"
7444 /* Override any gcc2 internal prototype to avoid an error. */
7448 /* We use char because int might match the return type of a gcc2
7449 builtin and then its argument prototype would still apply. */
7459 rm -f conftest.$ac_objext conftest$ac_exeext
7460 if { (eval echo "$as_me:7460: \"$ac_link\"") >&5
7461 (eval $ac_link) 2>&5
7463 echo "$as_me:7463: \$? = $ac_status" >&5
7464 (exit $ac_status); } &&
7465 { ac_try='test -s conftest$ac_exeext'
7466 { (eval echo "$as_me:7466: \"$ac_try\"") >&5
7469 echo "$as_me:7469: \$? = $ac_status" >&5
7470 (exit $ac_status); }; }; then
7471 ac_cv_lib_gpm_initscr=yes
7473 echo "$as_me: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475 ac_cv_lib_gpm_initscr=no
7477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7478 LIBS=$ac_check_lib_save_LIBS
7480 echo "$as_me:7480: result: $ac_cv_lib_gpm_initscr" >&5
7481 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7482 if test $ac_cv_lib_gpm_initscr = yes; then
7483 LIBS="$cf_ncurses_SAVE"
7485 cf_ncurses_LIBS="-lgpm"
7492 # This is only necessary if you are linking against an obsolete
7493 # version of ncurses (but it should do no harm, since it's static).
7494 if test "$cf_nculib_root" = ncurses ; then
7495 echo "$as_me:7495: checking for tgoto in -lmytinfo" >&5
7496 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7497 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7498 echo $ECHO_N "(cached) $ECHO_C" >&6
7500 ac_check_lib_save_LIBS=$LIBS
7501 LIBS="-lmytinfo $LIBS"
7502 cat >conftest.$ac_ext <<_ACEOF
7503 #line 7503 "configure"
7504 #include "confdefs.h"
7506 /* Override any gcc2 internal prototype to avoid an error. */
7510 /* We use char because int might match the return type of a gcc2
7511 builtin and then its argument prototype would still apply. */
7521 rm -f conftest.$ac_objext conftest$ac_exeext
7522 if { (eval echo "$as_me:7522: \"$ac_link\"") >&5
7523 (eval $ac_link) 2>&5
7525 echo "$as_me:7525: \$? = $ac_status" >&5
7526 (exit $ac_status); } &&
7527 { ac_try='test -s conftest$ac_exeext'
7528 { (eval echo "$as_me:7528: \"$ac_try\"") >&5
7531 echo "$as_me:7531: \$? = $ac_status" >&5
7532 (exit $ac_status); }; }; then
7533 ac_cv_lib_mytinfo_tgoto=yes
7535 echo "$as_me: failed program was:" >&5
7536 cat conftest.$ac_ext >&5
7537 ac_cv_lib_mytinfo_tgoto=no
7539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7540 LIBS=$ac_check_lib_save_LIBS
7542 echo "$as_me:7542: result: $ac_cv_lib_mytinfo_tgoto" >&5
7543 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7544 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7545 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7552 cf_add_libs="$cf_ncurses_LIBS"
7553 # Filter out duplicates - this happens with badly-designed ".pc" files...
7554 for cf_add_1lib in $LIBS
7556 for cf_add_2lib in $cf_add_libs
7558 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7564 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7568 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7571 cf_add_libs="-l$cf_nculib_root"
7572 # Filter out duplicates - this happens with badly-designed ".pc" files...
7573 for cf_add_1lib in $LIBS
7575 for cf_add_2lib in $cf_add_libs
7577 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7583 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7589 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7591 echo "$as_me:7591: checking for initscr" >&5
7592 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7593 if test "${ac_cv_func_initscr+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7596 cat >conftest.$ac_ext <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599 /* System header to define __stub macros and hopefully few prototypes,
7600 which can conflict with char initscr (); below. */
7602 /* Override any gcc2 internal prototype to avoid an error. */
7606 /* We use char because int might match the return type of a gcc2
7607 builtin and then its argument prototype would still apply. */
7614 /* The GNU C library defines this for functions which it implements
7615 to always fail with ENOSYS. Some functions are actually named
7616 something starting with __ and the normal name is an alias. */
7617 #if defined (__stub_initscr) || defined (__stub___initscr)
7620 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7627 rm -f conftest.$ac_objext conftest$ac_exeext
7628 if { (eval echo "$as_me:7628: \"$ac_link\"") >&5
7629 (eval $ac_link) 2>&5
7631 echo "$as_me:7631: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
7633 { ac_try='test -s conftest$ac_exeext'
7634 { (eval echo "$as_me:7634: \"$ac_try\"") >&5
7637 echo "$as_me:7637: \$? = $ac_status" >&5
7638 (exit $ac_status); }; }; then
7639 ac_cv_func_initscr=yes
7641 echo "$as_me: failed program was:" >&5
7642 cat conftest.$ac_ext >&5
7643 ac_cv_func_initscr=no
7645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7647 echo "$as_me:7647: result: $ac_cv_func_initscr" >&5
7648 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7649 if test $ac_cv_func_initscr = yes; then
7650 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7653 cf_save_LIBS="$LIBS"
7654 echo "$as_me:7654: checking for initscr in -l$cf_nculib_root" >&5
7655 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7656 LIBS="-l$cf_nculib_root $LIBS"
7657 cat >conftest.$ac_ext <<_ACEOF
7658 #line 7658 "configure"
7659 #include "confdefs.h"
7660 #include <${cf_cv_ncurses_header:-curses.h}>
7669 rm -f conftest.$ac_objext conftest$ac_exeext
7670 if { (eval echo "$as_me:7670: \"$ac_link\"") >&5
7671 (eval $ac_link) 2>&5
7673 echo "$as_me:7673: \$? = $ac_status" >&5
7674 (exit $ac_status); } &&
7675 { ac_try='test -s conftest$ac_exeext'
7676 { (eval echo "$as_me:7676: \"$ac_try\"") >&5
7679 echo "$as_me:7679: \$? = $ac_status" >&5
7680 (exit $ac_status); }; }; then
7681 echo "$as_me:7681: result: yes" >&5
7682 echo "${ECHO_T}yes" >&6
7683 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7686 echo "$as_me: failed program was:" >&5
7687 cat conftest.$ac_ext >&5
7688 echo "$as_me:7688: result: no" >&5
7689 echo "${ECHO_T}no" >&6
7692 cf_library_path_list=""
7693 if test -n "${LDFLAGS}${LIBS}" ; then
7694 for cf_library_path in $LDFLAGS $LIBS
7696 case $cf_library_path in
7698 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7700 test "x$cf_library_path" != "xNONE" && \
7701 test -d "$cf_library_path" && \
7703 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7704 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7705 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7706 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7707 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7708 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"
7711 cf_library_path_list="$cf_library_path_list $cf_search"
7719 test "x$prefix" != "xNONE" && \
7720 test -d "$prefix" && \
7722 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7723 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7724 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7725 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7726 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7727 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7730 for cf_subdir_prefix in \
7739 test "x$cf_subdir_prefix" != "x$prefix" && \
7740 test -d "$cf_subdir_prefix" && \
7741 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7742 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7743 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7744 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7745 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7746 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7747 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"
7752 cf_search="$cf_library_path_list $cf_search"
7754 for cf_libdir in $cf_search
7756 echo "$as_me:7756: checking for -l$cf_nculib_root in $cf_libdir" >&5
7757 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7758 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7759 cat >conftest.$ac_ext <<_ACEOF
7760 #line 7760 "configure"
7761 #include "confdefs.h"
7762 #include <${cf_cv_ncurses_header:-curses.h}>
7771 rm -f conftest.$ac_objext conftest$ac_exeext
7772 if { (eval echo "$as_me:7772: \"$ac_link\"") >&5
7773 (eval $ac_link) 2>&5
7775 echo "$as_me:7775: \$? = $ac_status" >&5
7776 (exit $ac_status); } &&
7777 { ac_try='test -s conftest$ac_exeext'
7778 { (eval echo "$as_me:7778: \"$ac_try\"") >&5
7781 echo "$as_me:7781: \$? = $ac_status" >&5
7782 (exit $ac_status); }; }; then
7783 echo "$as_me:7783: result: yes" >&5
7784 echo "${ECHO_T}yes" >&6
7785 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7788 echo "$as_me: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7790 echo "$as_me:7790: result: no" >&5
7791 echo "${ECHO_T}no" >&6
7792 LIBS="$cf_save_LIBS"
7794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7804 if test $cf_found_library = no ; then
7805 { { echo "$as_me:7805: error: Cannot link $cf_nculib_root library" >&5
7806 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7807 { (exit 1); exit 1; }; }
7812 if test -n "$cf_ncurses_LIBS" ; then
7813 echo "$as_me:7813: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7814 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7815 cf_ncurses_SAVE="$LIBS"
7816 for p in $cf_ncurses_LIBS ; do
7817 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7818 if test "$q" != "$LIBS" ; then
7822 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825 #include <${cf_cv_ncurses_header:-curses.h}>
7829 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7834 rm -f conftest.$ac_objext conftest$ac_exeext
7835 if { (eval echo "$as_me:7835: \"$ac_link\"") >&5
7836 (eval $ac_link) 2>&5
7838 echo "$as_me:7838: \$? = $ac_status" >&5
7839 (exit $ac_status); } &&
7840 { ac_try='test -s conftest$ac_exeext'
7841 { (eval echo "$as_me:7841: \"$ac_try\"") >&5
7844 echo "$as_me:7844: \$? = $ac_status" >&5
7845 (exit $ac_status); }; }; then
7846 echo "$as_me:7846: result: yes" >&5
7847 echo "${ECHO_T}yes" >&6
7849 echo "$as_me: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7851 echo "$as_me:7851: result: no" >&5
7852 echo "${ECHO_T}no" >&6
7853 LIBS="$cf_ncurses_SAVE"
7855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7858 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7860 cat >>confdefs.h <<EOF
7861 #define $cf_nculib_ROOT 1
7872 cf_ncuconfig_root=$cf_cv_screen
7873 cf_have_ncuconfig=no
7875 if test "x${PKG_CONFIG:=none}" != xnone; then
7876 echo "$as_me:7876: checking pkg-config for $cf_ncuconfig_root" >&5
7877 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7878 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7879 echo "$as_me:7879: result: yes" >&5
7880 echo "${ECHO_T}yes" >&6
7882 echo "$as_me:7882: checking if the $cf_ncuconfig_root package files work" >&5
7883 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7884 cf_have_ncuconfig=unknown
7886 cf_save_CPPFLAGS="$CPPFLAGS"
7887 cf_save_LIBS="$LIBS"
7889 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7891 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7892 # Filter out duplicates - this happens with badly-designed ".pc" files...
7893 for cf_add_1lib in $LIBS
7895 for cf_add_2lib in $cf_add_libs
7897 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7907 cat >conftest.$ac_ext <<_ACEOF
7908 #line 7908 "configure"
7909 #include "confdefs.h"
7910 #include <${cf_cv_ncurses_header:-curses.h}>
7914 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7919 rm -f conftest.$ac_objext conftest$ac_exeext
7920 if { (eval echo "$as_me:7920: \"$ac_link\"") >&5
7921 (eval $ac_link) 2>&5
7923 echo "$as_me:7923: \$? = $ac_status" >&5
7924 (exit $ac_status); } &&
7925 { ac_try='test -s conftest$ac_exeext'
7926 { (eval echo "$as_me:7926: \"$ac_try\"") >&5
7929 echo "$as_me:7929: \$? = $ac_status" >&5
7930 (exit $ac_status); }; }; then
7931 if test "$cross_compiling" = yes; then
7932 cf_have_ncuconfig=maybe
7934 cat >conftest.$ac_ext <<_ACEOF
7935 #line 7935 "configure"
7936 #include "confdefs.h"
7937 #include <${cf_cv_ncurses_header:-curses.h}>
7939 { char *xx = curses_version(); return (xx == 0); }
7941 rm -f conftest$ac_exeext
7942 if { (eval echo "$as_me:7942: \"$ac_link\"") >&5
7943 (eval $ac_link) 2>&5
7945 echo "$as_me:7945: \$? = $ac_status" >&5
7946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7947 { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7950 echo "$as_me:7950: \$? = $ac_status" >&5
7951 (exit $ac_status); }; }; then
7952 cf_have_ncuconfig=yes
7954 echo "$as_me: program exited with status $ac_status" >&5
7955 echo "$as_me: failed program was:" >&5
7956 cat conftest.$ac_ext >&5
7957 cf_have_ncuconfig=no
7959 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7962 echo "$as_me: failed program was:" >&5
7963 cat conftest.$ac_ext >&5
7964 cf_have_ncuconfig=no
7966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7967 echo "$as_me:7967: result: $cf_have_ncuconfig" >&5
7968 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7969 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7970 if test "$cf_have_ncuconfig" != "yes"
7972 CPPFLAGS="$cf_save_CPPFLAGS"
7973 LIBS="$cf_save_LIBS"
7974 NCURSES_CONFIG_PKG=none
7977 cat >>confdefs.h <<\EOF
7981 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7985 echo "$as_me:7985: result: no" >&5
7986 echo "${ECHO_T}no" >&6
7987 NCURSES_CONFIG_PKG=none
7990 NCURSES_CONFIG_PKG=none
7993 if test "x$cf_have_ncuconfig" = "xno"; then
7994 echo "Looking for ${cf_ncuconfig_root}-config"
7996 if test -n "$ac_tool_prefix"; then
7997 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7999 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8000 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8001 echo "$as_me:8001: checking for $ac_word" >&5
8002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8003 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8004 echo $ECHO_N "(cached) $ECHO_C" >&6
8006 if test -n "$NCURSES_CONFIG"; then
8007 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8009 ac_save_IFS=$IFS; IFS=$ac_path_separator
8011 for ac_dir in $ac_dummy; do
8013 test -z "$ac_dir" && ac_dir=.
8014 $as_executable_p "$ac_dir/$ac_word" || continue
8015 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8016 echo "$as_me:8016: found $ac_dir/$ac_word" >&5
8022 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8023 if test -n "$NCURSES_CONFIG"; then
8024 echo "$as_me:8024: result: $NCURSES_CONFIG" >&5
8025 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8027 echo "$as_me:8027: result: no" >&5
8028 echo "${ECHO_T}no" >&6
8031 test -n "$NCURSES_CONFIG" && break
8034 if test -z "$NCURSES_CONFIG"; then
8035 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8036 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8038 # Extract the first word of "$ac_prog", so it can be a program name with args.
8039 set dummy $ac_prog; ac_word=$2
8040 echo "$as_me:8040: checking for $ac_word" >&5
8041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8042 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8043 echo $ECHO_N "(cached) $ECHO_C" >&6
8045 if test -n "$ac_ct_NCURSES_CONFIG"; then
8046 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8048 ac_save_IFS=$IFS; IFS=$ac_path_separator
8050 for ac_dir in $ac_dummy; do
8052 test -z "$ac_dir" && ac_dir=.
8053 $as_executable_p "$ac_dir/$ac_word" || continue
8054 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8055 echo "$as_me:8055: found $ac_dir/$ac_word" >&5
8061 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8062 if test -n "$ac_ct_NCURSES_CONFIG"; then
8063 echo "$as_me:8063: result: $ac_ct_NCURSES_CONFIG" >&5
8064 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8066 echo "$as_me:8066: result: no" >&5
8067 echo "${ECHO_T}no" >&6
8070 test -n "$ac_ct_NCURSES_CONFIG" && break
8072 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8074 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8077 if test "$NCURSES_CONFIG" != none ; then
8079 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8081 cf_add_libs="`$NCURSES_CONFIG --libs`"
8082 # Filter out duplicates - this happens with badly-designed ".pc" files...
8083 for cf_add_1lib in $LIBS
8085 for cf_add_2lib in $cf_add_libs
8087 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8093 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8097 # even with config script, some packages use no-override for curses.h
8099 echo "$as_me:8099: checking if we have identified curses headers" >&5
8100 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8101 if test "${cf_cv_ncurses_header+set}" = set; then
8102 echo $ECHO_N "(cached) $ECHO_C" >&6
8105 cf_cv_ncurses_header=none
8107 ncurses.h $cf_cv_screen/ncurses.h \
8108 curses.h $cf_cv_screen/curses.h
8110 cat >conftest.$ac_ext <<_ACEOF
8111 #line 8111 "configure"
8112 #include "confdefs.h"
8113 #include <${cf_header}>
8117 initscr(); tgoto("?", 0,0)
8122 rm -f conftest.$ac_objext
8123 if { (eval echo "$as_me:8123: \"$ac_compile\"") >&5
8124 (eval $ac_compile) 2>&5
8126 echo "$as_me:8126: \$? = $ac_status" >&5
8127 (exit $ac_status); } &&
8128 { ac_try='test -s conftest.$ac_objext'
8129 { (eval echo "$as_me:8129: \"$ac_try\"") >&5
8132 echo "$as_me:8132: \$? = $ac_status" >&5
8133 (exit $ac_status); }; }; then
8134 cf_cv_ncurses_header=$cf_header; break
8136 echo "$as_me: failed program was:" >&5
8137 cat conftest.$ac_ext >&5
8139 rm -f conftest.$ac_objext conftest.$ac_ext
8143 echo "$as_me:8143: result: $cf_cv_ncurses_header" >&5
8144 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8146 if test "$cf_cv_ncurses_header" = none ; then
8147 { { echo "$as_me:8147: error: No curses header-files found" >&5
8148 echo "$as_me: error: No curses header-files found" >&2;}
8149 { (exit 1); exit 1; }; }
8152 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8154 for ac_header in $cf_cv_ncurses_header
8156 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8157 echo "$as_me:8157: checking for $ac_header" >&5
8158 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8159 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8160 echo $ECHO_N "(cached) $ECHO_C" >&6
8162 cat >conftest.$ac_ext <<_ACEOF
8163 #line 8163 "configure"
8164 #include "confdefs.h"
8165 #include <$ac_header>
8167 if { (eval echo "$as_me:8167: \"$ac_cpp conftest.$ac_ext\"") >&5
8168 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8170 egrep -v '^ *\+' conftest.er1 >conftest.err
8172 cat conftest.err >&5
8173 echo "$as_me:8173: \$? = $ac_status" >&5
8174 (exit $ac_status); } >/dev/null; then
8175 if test -s conftest.err; then
8176 ac_cpp_err=$ac_c_preproc_warn_flag
8183 if test -z "$ac_cpp_err"; then
8184 eval "$as_ac_Header=yes"
8186 echo "$as_me: failed program was:" >&5
8187 cat conftest.$ac_ext >&5
8188 eval "$as_ac_Header=no"
8190 rm -f conftest.err conftest.$ac_ext
8192 echo "$as_me:8192: result: `eval echo '${'$as_ac_Header'}'`" >&5
8193 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8194 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8195 cat >>confdefs.h <<EOF
8196 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8202 cat >>confdefs.h <<\EOF
8206 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8208 cat >>confdefs.h <<EOF
8209 #define $cf_nculib_ROOT 1
8212 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8216 cf_ncuhdr_root=$cf_cv_screen
8218 test -n "$cf_cv_curses_dir" && \
8219 test "$cf_cv_curses_dir" != "no" && { \
8221 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8222 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8224 while test $cf_add_incdir != /usr/include
8226 if test -d $cf_add_incdir
8229 if test -n "$CFLAGS$CPPFLAGS" ; then
8230 # a loop is needed to ensure we can add subdirs of existing dirs
8231 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8232 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8233 cf_have_incdir=yes; break
8238 if test "$cf_have_incdir" = no ; then
8239 if test "$cf_add_incdir" = /usr/local/include ; then
8240 if test "$GCC" = yes
8242 cf_save_CPPFLAGS=$CPPFLAGS
8243 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8244 cat >conftest.$ac_ext <<_ACEOF
8245 #line 8245 "configure"
8246 #include "confdefs.h"
8256 rm -f conftest.$ac_objext
8257 if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
8258 (eval $ac_compile) 2>&5
8260 echo "$as_me:8260: \$? = $ac_status" >&5
8261 (exit $ac_status); } &&
8262 { ac_try='test -s conftest.$ac_objext'
8263 { (eval echo "$as_me:8263: \"$ac_try\"") >&5
8266 echo "$as_me:8266: \$? = $ac_status" >&5
8267 (exit $ac_status); }; }; then
8270 echo "$as_me: failed program was:" >&5
8271 cat conftest.$ac_ext >&5
8274 rm -f conftest.$ac_objext conftest.$ac_ext
8275 CPPFLAGS=$cf_save_CPPFLAGS
8280 if test "$cf_have_incdir" = no ; then
8281 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8283 echo "${as_me:-configure}:8283: testing adding $cf_add_incdir to include-path ..." 1>&5
8285 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8287 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8288 test "$cf_top_incdir" = "$cf_add_incdir" && break
8289 cf_add_incdir="$cf_top_incdir"
8302 echo "$as_me:8302: checking for $cf_ncuhdr_root header in include-path" >&5
8303 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8304 if test "${cf_cv_ncurses_h+set}" = set; then
8305 echo $ECHO_N "(cached) $ECHO_C" >&6
8308 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8309 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8310 for cf_header in $cf_header_list
8313 cat >conftest.$ac_ext <<_ACEOF
8314 #line 8314 "configure"
8315 #include "confdefs.h"
8317 #include <$cf_header>
8322 #ifdef NCURSES_VERSION
8324 printf("%s\n", NCURSES_VERSION);
8337 rm -f conftest.$ac_objext
8338 if { (eval echo "$as_me:8338: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8341 echo "$as_me:8341: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:8344: \"$ac_try\"") >&5
8347 echo "$as_me:8347: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349 cf_cv_ncurses_h=$cf_header
8352 echo "$as_me: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8356 rm -f conftest.$ac_objext conftest.$ac_ext
8358 test "$cf_cv_ncurses_h" != no && break
8362 echo "$as_me:8362: result: $cf_cv_ncurses_h" >&5
8363 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8365 if test "$cf_cv_ncurses_h" != no ; then
8366 cf_cv_ncurses_header=$cf_cv_ncurses_h
8369 echo "$as_me:8369: checking for $cf_ncuhdr_root include-path" >&5
8370 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8371 if test "${cf_cv_ncurses_h2+set}" = set; then
8372 echo $ECHO_N "(cached) $ECHO_C" >&6
8375 test -n "$verbose" && echo
8379 # collect the current set of include-directories from compiler flags
8380 cf_header_path_list=""
8381 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8382 for cf_header_path in $CPPFLAGS $CFLAGS
8384 case $cf_header_path in
8386 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8388 test "x$cf_header_path" != "xNONE" && \
8389 test -d "$cf_header_path" && \
8391 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8392 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8393 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8394 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8395 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8396 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"
8399 cf_header_path_list="$cf_header_path_list $cf_search"
8405 # add the variations for the package we are looking for
8409 test "x$prefix" != "xNONE" && \
8410 test -d "$prefix" && \
8412 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8413 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8414 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8415 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8416 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8417 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8420 for cf_subdir_prefix in \
8429 test "x$cf_subdir_prefix" != "x$prefix" && \
8430 test -d "$cf_subdir_prefix" && \
8431 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8432 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8433 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8434 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8435 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8436 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8437 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"
8442 test "$includedir" != NONE && \
8443 test "$includedir" != "/usr/include" && \
8444 test -d "$includedir" && {
8445 test -d $includedir && cf_search="$cf_search $includedir"
8446 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8449 test "$oldincludedir" != NONE && \
8450 test "$oldincludedir" != "/usr/include" && \
8451 test -d "$oldincludedir" && {
8452 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8453 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8456 cf_search="$cf_search $cf_header_path_list"
8458 test -n "$verbose" && echo search path $cf_search
8459 cf_save2_CPPFLAGS="$CPPFLAGS"
8460 for cf_incdir in $cf_search
8463 if test -n "$cf_incdir" ; then
8464 for cf_add_incdir in $cf_incdir
8466 while test $cf_add_incdir != /usr/include
8468 if test -d $cf_add_incdir
8471 if test -n "$CFLAGS$CPPFLAGS" ; then
8472 # a loop is needed to ensure we can add subdirs of existing dirs
8473 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8474 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8475 cf_have_incdir=yes; break
8480 if test "$cf_have_incdir" = no ; then
8481 if test "$cf_add_incdir" = /usr/local/include ; then
8482 if test "$GCC" = yes
8484 cf_save_CPPFLAGS=$CPPFLAGS
8485 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8486 cat >conftest.$ac_ext <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8498 rm -f conftest.$ac_objext
8499 if { (eval echo "$as_me:8499: \"$ac_compile\"") >&5
8500 (eval $ac_compile) 2>&5
8502 echo "$as_me:8502: \$? = $ac_status" >&5
8503 (exit $ac_status); } &&
8504 { ac_try='test -s conftest.$ac_objext'
8505 { (eval echo "$as_me:8505: \"$ac_try\"") >&5
8508 echo "$as_me:8508: \$? = $ac_status" >&5
8509 (exit $ac_status); }; }; then
8512 echo "$as_me: failed program was:" >&5
8513 cat conftest.$ac_ext >&5
8516 rm -f conftest.$ac_objext conftest.$ac_ext
8517 CPPFLAGS=$cf_save_CPPFLAGS
8522 if test "$cf_have_incdir" = no ; then
8523 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8525 echo "${as_me:-configure}:8525: testing adding $cf_add_incdir to include-path ..." 1>&5
8527 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8529 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8530 test "$cf_top_incdir" = "$cf_add_incdir" && break
8531 cf_add_incdir="$cf_top_incdir"
8547 cat >conftest.$ac_ext <<_ACEOF
8548 #line 8548 "configure"
8549 #include "confdefs.h"
8551 #include <$cf_header>
8556 #ifdef NCURSES_VERSION
8558 printf("%s\n", NCURSES_VERSION);
8571 rm -f conftest.$ac_objext
8572 if { (eval echo "$as_me:8572: \"$ac_compile\"") >&5
8573 (eval $ac_compile) 2>&5
8575 echo "$as_me:8575: \$? = $ac_status" >&5
8576 (exit $ac_status); } &&
8577 { ac_try='test -s conftest.$ac_objext'
8578 { (eval echo "$as_me:8578: \"$ac_try\"") >&5
8581 echo "$as_me:8581: \$? = $ac_status" >&5
8582 (exit $ac_status); }; }; then
8583 cf_cv_ncurses_h2=$cf_header
8586 echo "$as_me: failed program was:" >&5
8587 cat conftest.$ac_ext >&5
8590 rm -f conftest.$ac_objext conftest.$ac_ext
8592 if test "$cf_cv_ncurses_h2" != no ; then
8593 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8594 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8597 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8599 CPPFLAGS="$cf_save2_CPPFLAGS"
8600 test "$cf_cv_ncurses_h2" != no && break
8602 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8602: error: not found" >&5
8603 echo "$as_me: error: not found" >&2;}
8604 { (exit 1); exit 1; }; }
8607 echo "$as_me:8607: result: $cf_cv_ncurses_h2" >&5
8608 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8610 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8611 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8612 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8613 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8616 if test -n "$cf_1st_incdir" ; then
8617 for cf_add_incdir in $cf_1st_incdir
8619 while test $cf_add_incdir != /usr/include
8621 if test -d $cf_add_incdir
8624 if test -n "$CFLAGS$CPPFLAGS" ; then
8625 # a loop is needed to ensure we can add subdirs of existing dirs
8626 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8627 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8628 cf_have_incdir=yes; break
8633 if test "$cf_have_incdir" = no ; then
8634 if test "$cf_add_incdir" = /usr/local/include ; then
8635 if test "$GCC" = yes
8637 cf_save_CPPFLAGS=$CPPFLAGS
8638 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8639 cat >conftest.$ac_ext <<_ACEOF
8640 #line 8640 "configure"
8641 #include "confdefs.h"
8651 rm -f conftest.$ac_objext
8652 if { (eval echo "$as_me:8652: \"$ac_compile\"") >&5
8653 (eval $ac_compile) 2>&5
8655 echo "$as_me:8655: \$? = $ac_status" >&5
8656 (exit $ac_status); } &&
8657 { ac_try='test -s conftest.$ac_objext'
8658 { (eval echo "$as_me:8658: \"$ac_try\"") >&5
8661 echo "$as_me:8661: \$? = $ac_status" >&5
8662 (exit $ac_status); }; }; then
8665 echo "$as_me: failed program was:" >&5
8666 cat conftest.$ac_ext >&5
8669 rm -f conftest.$ac_objext conftest.$ac_ext
8670 CPPFLAGS=$cf_save_CPPFLAGS
8675 if test "$cf_have_incdir" = no ; then
8676 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8678 echo "${as_me:-configure}:8678: testing adding $cf_add_incdir to include-path ..." 1>&5
8680 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8682 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8683 test "$cf_top_incdir" = "$cf_add_incdir" && break
8684 cf_add_incdir="$cf_top_incdir"
8697 # Set definitions to allow ifdef'ing for ncurses.h
8699 case $cf_cv_ncurses_header in
8702 cat >>confdefs.h <<\EOF
8703 #define HAVE_NCURSES_H 1
8709 case $cf_cv_ncurses_header in
8710 (ncurses/curses.h|ncurses/ncurses.h)
8712 cat >>confdefs.h <<\EOF
8713 #define HAVE_NCURSES_NCURSES_H 1
8717 (ncursesw/curses.h|ncursesw/ncurses.h)
8719 cat >>confdefs.h <<\EOF
8720 #define HAVE_NCURSESW_NCURSES_H 1
8726 echo "$as_me:8726: checking for terminfo header" >&5
8727 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8728 if test "${cf_cv_term_header+set}" = set; then
8729 echo $ECHO_N "(cached) $ECHO_C" >&6
8732 case ${cf_cv_ncurses_header} in
8733 (*/ncurses.h|*/ncursesw.h)
8734 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8737 cf_term_header=term.h
8741 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8743 cat >conftest.$ac_ext <<_ACEOF
8744 #line 8744 "configure"
8745 #include "confdefs.h"
8747 #include <${cf_cv_ncurses_header:-curses.h}>
8753 int x = auto_left_margin
8758 rm -f conftest.$ac_objext
8759 if { (eval echo "$as_me:8759: \"$ac_compile\"") >&5
8760 (eval $ac_compile) 2>&5
8762 echo "$as_me:8762: \$? = $ac_status" >&5
8763 (exit $ac_status); } &&
8764 { ac_try='test -s conftest.$ac_objext'
8765 { (eval echo "$as_me:8765: \"$ac_try\"") >&5
8768 echo "$as_me:8768: \$? = $ac_status" >&5
8769 (exit $ac_status); }; }; then
8771 cf_cv_term_header="$cf_test"
8773 echo "$as_me: failed program was:" >&5
8774 cat conftest.$ac_ext >&5
8776 cf_cv_term_header=unknown
8779 rm -f conftest.$ac_objext conftest.$ac_ext
8780 test "$cf_cv_term_header" != unknown && break
8784 echo "$as_me:8784: result: $cf_cv_term_header" >&5
8785 echo "${ECHO_T}$cf_cv_term_header" >&6
8787 # Set definitions to allow ifdef'ing to accommodate subdirectories
8789 case $cf_cv_term_header in
8792 cat >>confdefs.h <<\EOF
8793 #define HAVE_TERM_H 1
8799 case $cf_cv_term_header in
8802 cat >>confdefs.h <<\EOF
8803 #define HAVE_NCURSES_TERM_H 1
8809 cat >>confdefs.h <<\EOF
8810 #define HAVE_NCURSESW_TERM_H 1
8816 # some applications need this, but should check for NCURSES_VERSION
8818 cat >>confdefs.h <<\EOF
8822 echo "$as_me:8822: checking for ncurses version" >&5
8823 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8824 if test "${cf_cv_ncurses_version+set}" = set; then
8825 echo $ECHO_N "(cached) $ECHO_C" >&6
8828 cf_cv_ncurses_version=no
8831 if test "$cross_compiling" = yes; then
8833 # This will not work if the preprocessor splits the line after the
8834 # Autoconf token. The 'unproto' program does that.
8835 cat > conftest.$ac_ext <<EOF
8836 #include <${cf_cv_ncurses_header:-curses.h}>
8838 #ifdef NCURSES_VERSION
8839 Autoconf NCURSES_VERSION
8847 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8848 { (eval echo "$as_me:8848: \"$cf_try\"") >&5
8851 echo "$as_me:8851: \$? = $ac_status" >&5
8852 (exit $ac_status); }
8853 if test -f conftest.out ; then
8854 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8855 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8860 cat >conftest.$ac_ext <<_ACEOF
8861 #line 8861 "configure"
8862 #include "confdefs.h"
8864 #include <${cf_cv_ncurses_header:-curses.h}>
8868 FILE *fp = fopen("$cf_tempfile", "w");
8869 #ifdef NCURSES_VERSION
8870 # ifdef NCURSES_VERSION_PATCH
8871 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8873 fprintf(fp, "%s\n", NCURSES_VERSION);
8877 fprintf(fp, "old\n");
8882 ${cf_cv_main_return:-return}(0);
8885 rm -f conftest$ac_exeext
8886 if { (eval echo "$as_me:8886: \"$ac_link\"") >&5
8887 (eval $ac_link) 2>&5
8889 echo "$as_me:8889: \$? = $ac_status" >&5
8890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8891 { (eval echo "$as_me:8891: \"$ac_try\"") >&5
8894 echo "$as_me:8894: \$? = $ac_status" >&5
8895 (exit $ac_status); }; }; then
8897 cf_cv_ncurses_version=`cat $cf_tempfile`
8899 echo "$as_me: program exited with status $ac_status" >&5
8900 echo "$as_me: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8903 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8908 echo "$as_me:8908: result: $cf_cv_ncurses_version" >&5
8909 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8910 test "$cf_cv_ncurses_version" = no ||
8911 cat >>confdefs.h <<\EOF
8915 cf_nculib_root=$cf_cv_screen
8916 # This works, except for the special case where we find gpm, but
8917 # ncurses is in a nonstandard location via $LIBS, and we really want
8920 cf_ncurses_SAVE="$LIBS"
8921 echo "$as_me:8921: checking for Gpm_Open in -lgpm" >&5
8922 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8923 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8924 echo $ECHO_N "(cached) $ECHO_C" >&6
8926 ac_check_lib_save_LIBS=$LIBS
8928 cat >conftest.$ac_ext <<_ACEOF
8929 #line 8929 "configure"
8930 #include "confdefs.h"
8932 /* Override any gcc2 internal prototype to avoid an error. */
8936 /* We use char because int might match the return type of a gcc2
8937 builtin and then its argument prototype would still apply. */
8947 rm -f conftest.$ac_objext conftest$ac_exeext
8948 if { (eval echo "$as_me:8948: \"$ac_link\"") >&5
8949 (eval $ac_link) 2>&5
8951 echo "$as_me:8951: \$? = $ac_status" >&5
8952 (exit $ac_status); } &&
8953 { ac_try='test -s conftest$ac_exeext'
8954 { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8957 echo "$as_me:8957: \$? = $ac_status" >&5
8958 (exit $ac_status); }; }; then
8959 ac_cv_lib_gpm_Gpm_Open=yes
8961 echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963 ac_cv_lib_gpm_Gpm_Open=no
8965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8966 LIBS=$ac_check_lib_save_LIBS
8968 echo "$as_me:8968: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8969 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8970 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8971 echo "$as_me:8971: checking for initscr in -lgpm" >&5
8972 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8973 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8974 echo $ECHO_N "(cached) $ECHO_C" >&6
8976 ac_check_lib_save_LIBS=$LIBS
8978 cat >conftest.$ac_ext <<_ACEOF
8979 #line 8979 "configure"
8980 #include "confdefs.h"
8982 /* Override any gcc2 internal prototype to avoid an error. */
8986 /* We use char because int might match the return type of a gcc2
8987 builtin and then its argument prototype would still apply. */
8997 rm -f conftest.$ac_objext conftest$ac_exeext
8998 if { (eval echo "$as_me:8998: \"$ac_link\"") >&5
8999 (eval $ac_link) 2>&5
9001 echo "$as_me:9001: \$? = $ac_status" >&5
9002 (exit $ac_status); } &&
9003 { ac_try='test -s conftest$ac_exeext'
9004 { (eval echo "$as_me:9004: \"$ac_try\"") >&5
9007 echo "$as_me:9007: \$? = $ac_status" >&5
9008 (exit $ac_status); }; }; then
9009 ac_cv_lib_gpm_initscr=yes
9011 echo "$as_me: failed program was:" >&5
9012 cat conftest.$ac_ext >&5
9013 ac_cv_lib_gpm_initscr=no
9015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9016 LIBS=$ac_check_lib_save_LIBS
9018 echo "$as_me:9018: result: $ac_cv_lib_gpm_initscr" >&5
9019 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9020 if test $ac_cv_lib_gpm_initscr = yes; then
9021 LIBS="$cf_ncurses_SAVE"
9023 cf_ncurses_LIBS="-lgpm"
9030 # This is only necessary if you are linking against an obsolete
9031 # version of ncurses (but it should do no harm, since it's static).
9032 if test "$cf_nculib_root" = ncurses ; then
9033 echo "$as_me:9033: checking for tgoto in -lmytinfo" >&5
9034 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9035 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9036 echo $ECHO_N "(cached) $ECHO_C" >&6
9038 ac_check_lib_save_LIBS=$LIBS
9039 LIBS="-lmytinfo $LIBS"
9040 cat >conftest.$ac_ext <<_ACEOF
9041 #line 9041 "configure"
9042 #include "confdefs.h"
9044 /* Override any gcc2 internal prototype to avoid an error. */
9048 /* We use char because int might match the return type of a gcc2
9049 builtin and then its argument prototype would still apply. */
9059 rm -f conftest.$ac_objext conftest$ac_exeext
9060 if { (eval echo "$as_me:9060: \"$ac_link\"") >&5
9061 (eval $ac_link) 2>&5
9063 echo "$as_me:9063: \$? = $ac_status" >&5
9064 (exit $ac_status); } &&
9065 { ac_try='test -s conftest$ac_exeext'
9066 { (eval echo "$as_me:9066: \"$ac_try\"") >&5
9069 echo "$as_me:9069: \$? = $ac_status" >&5
9070 (exit $ac_status); }; }; then
9071 ac_cv_lib_mytinfo_tgoto=yes
9073 echo "$as_me: failed program was:" >&5
9074 cat conftest.$ac_ext >&5
9075 ac_cv_lib_mytinfo_tgoto=no
9077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9078 LIBS=$ac_check_lib_save_LIBS
9080 echo "$as_me:9080: result: $ac_cv_lib_mytinfo_tgoto" >&5
9081 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9082 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9083 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9090 cf_add_libs="$cf_ncurses_LIBS"
9091 # Filter out duplicates - this happens with badly-designed ".pc" files...
9092 for cf_add_1lib in $LIBS
9094 for cf_add_2lib in $cf_add_libs
9096 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9102 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9106 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9109 cf_add_libs="-l$cf_nculib_root"
9110 # Filter out duplicates - this happens with badly-designed ".pc" files...
9111 for cf_add_1lib in $LIBS
9113 for cf_add_2lib in $cf_add_libs
9115 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9121 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9127 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9129 echo "$as_me:9129: checking for initscr" >&5
9130 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9131 if test "${ac_cv_func_initscr+set}" = set; then
9132 echo $ECHO_N "(cached) $ECHO_C" >&6
9134 cat >conftest.$ac_ext <<_ACEOF
9135 #line 9135 "configure"
9136 #include "confdefs.h"
9137 /* System header to define __stub macros and hopefully few prototypes,
9138 which can conflict with char initscr (); below. */
9140 /* Override any gcc2 internal prototype to avoid an error. */
9144 /* We use char because int might match the return type of a gcc2
9145 builtin and then its argument prototype would still apply. */
9152 /* The GNU C library defines this for functions which it implements
9153 to always fail with ENOSYS. Some functions are actually named
9154 something starting with __ and the normal name is an alias. */
9155 #if defined (__stub_initscr) || defined (__stub___initscr)
9158 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9165 rm -f conftest.$ac_objext conftest$ac_exeext
9166 if { (eval echo "$as_me:9166: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest$ac_exeext'
9172 { (eval echo "$as_me:9172: \"$ac_try\"") >&5
9175 echo "$as_me:9175: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
9177 ac_cv_func_initscr=yes
9179 echo "$as_me: failed program was:" >&5
9180 cat conftest.$ac_ext >&5
9181 ac_cv_func_initscr=no
9183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9185 echo "$as_me:9185: result: $ac_cv_func_initscr" >&5
9186 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9187 if test $ac_cv_func_initscr = yes; then
9188 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9191 cf_save_LIBS="$LIBS"
9192 echo "$as_me:9192: checking for initscr in -l$cf_nculib_root" >&5
9193 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9194 LIBS="-l$cf_nculib_root $LIBS"
9195 cat >conftest.$ac_ext <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 #include <${cf_cv_ncurses_header:-curses.h}>
9207 rm -f conftest.$ac_objext conftest$ac_exeext
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209 (eval $ac_link) 2>&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit $ac_status); } &&
9213 { ac_try='test -s conftest$ac_exeext'
9214 { (eval echo "$as_me:9214: \"$ac_try\"") >&5
9217 echo "$as_me:9217: \$? = $ac_status" >&5
9218 (exit $ac_status); }; }; then
9219 echo "$as_me:9219: result: yes" >&5
9220 echo "${ECHO_T}yes" >&6
9221 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9224 echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 echo "$as_me:9226: result: no" >&5
9227 echo "${ECHO_T}no" >&6
9230 cf_library_path_list=""
9231 if test -n "${LDFLAGS}${LIBS}" ; then
9232 for cf_library_path in $LDFLAGS $LIBS
9234 case $cf_library_path in
9236 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9238 test "x$cf_library_path" != "xNONE" && \
9239 test -d "$cf_library_path" && \
9241 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9242 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9243 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9244 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9245 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9246 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"
9249 cf_library_path_list="$cf_library_path_list $cf_search"
9257 test "x$prefix" != "xNONE" && \
9258 test -d "$prefix" && \
9260 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9261 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9262 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9263 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9264 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9265 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9268 for cf_subdir_prefix in \
9277 test "x$cf_subdir_prefix" != "x$prefix" && \
9278 test -d "$cf_subdir_prefix" && \
9279 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9280 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9281 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9282 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9283 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9284 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9285 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"
9290 cf_search="$cf_library_path_list $cf_search"
9292 for cf_libdir in $cf_search
9294 echo "$as_me:9294: checking for -l$cf_nculib_root in $cf_libdir" >&5
9295 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9296 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9297 cat >conftest.$ac_ext <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 #include <${cf_cv_ncurses_header:-curses.h}>
9309 rm -f conftest.$ac_objext conftest$ac_exeext
9310 if { (eval echo "$as_me:9310: \"$ac_link\"") >&5
9311 (eval $ac_link) 2>&5
9313 echo "$as_me:9313: \$? = $ac_status" >&5
9314 (exit $ac_status); } &&
9315 { ac_try='test -s conftest$ac_exeext'
9316 { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9319 echo "$as_me:9319: \$? = $ac_status" >&5
9320 (exit $ac_status); }; }; then
9321 echo "$as_me:9321: result: yes" >&5
9322 echo "${ECHO_T}yes" >&6
9323 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9326 echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 echo "$as_me:9328: result: no" >&5
9329 echo "${ECHO_T}no" >&6
9330 LIBS="$cf_save_LIBS"
9332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9340 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9342 if test $cf_found_library = no ; then
9343 { { echo "$as_me:9343: error: Cannot link $cf_nculib_root library" >&5
9344 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9345 { (exit 1); exit 1; }; }
9350 if test -n "$cf_ncurses_LIBS" ; then
9351 echo "$as_me:9351: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9352 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9353 cf_ncurses_SAVE="$LIBS"
9354 for p in $cf_ncurses_LIBS ; do
9355 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9356 if test "$q" != "$LIBS" ; then
9360 cat >conftest.$ac_ext <<_ACEOF
9361 #line 9361 "configure"
9362 #include "confdefs.h"
9363 #include <${cf_cv_ncurses_header:-curses.h}>
9367 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9372 rm -f conftest.$ac_objext conftest$ac_exeext
9373 if { (eval echo "$as_me:9373: \"$ac_link\"") >&5
9374 (eval $ac_link) 2>&5
9376 echo "$as_me:9376: \$? = $ac_status" >&5
9377 (exit $ac_status); } &&
9378 { ac_try='test -s conftest$ac_exeext'
9379 { (eval echo "$as_me:9379: \"$ac_try\"") >&5
9382 echo "$as_me:9382: \$? = $ac_status" >&5
9383 (exit $ac_status); }; }; then
9384 echo "$as_me:9384: result: yes" >&5
9385 echo "${ECHO_T}yes" >&6
9387 echo "$as_me: failed program was:" >&5
9388 cat conftest.$ac_ext >&5
9389 echo "$as_me:9389: result: no" >&5
9390 echo "${ECHO_T}no" >&6
9391 LIBS="$cf_ncurses_SAVE"
9393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9396 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9398 cat >>confdefs.h <<EOF
9399 #define $cf_nculib_ROOT 1
9409 echo "$as_me:9409: checking for X" >&5
9410 echo $ECHO_N "checking for X... $ECHO_C" >&6
9412 # Check whether --with-x or --without-x was given.
9413 if test "${with_x+set}" = set; then
9417 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9418 if test "x$with_x" = xno; then
9419 # The user explicitly disabled X.
9422 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9423 # Both variables are already set.
9426 if test "${ac_cv_have_x+set}" = set; then
9427 echo $ECHO_N "(cached) $ECHO_C" >&6
9429 # One or both of the vars are not set, and there is no cached value.
9430 ac_x_includes=no ac_x_libraries=no
9432 if mkdir conftest.dir; then
9434 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9435 cat >Imakefile <<'EOF'
9437 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9439 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9440 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9441 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9442 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9443 for ac_extension in a so sl dylib dll; do
9444 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9445 test -f $ac_im_libdir/libX11.$ac_extension; then
9446 ac_im_usrlibdir=$ac_im_libdir; break
9449 # Screen out bogus values from the imake configuration. They are
9450 # bogus both because they are the default anyway, and because
9451 # using them would break gcc on systems where it needs fixed includes.
9452 case $ac_im_incroot in
9454 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9456 case $ac_im_usrlibdir in
9458 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9465 # Standard set of common directories for X headers.
9466 # Check X11 before X11Rn because it is often a symlink to the current release.
9478 /usr/local/X11/include
9479 /usr/local/X11R6/include
9480 /usr/local/X11R5/include
9481 /usr/local/X11R4/include
9483 /usr/local/include/X11
9484 /usr/local/include/X11R6
9485 /usr/local/include/X11R5
9486 /usr/local/include/X11R4
9490 /usr/XFree86/include/X11
9494 /usr/unsupported/include
9496 /usr/local/x11r5/include
9497 /usr/lpp/Xamples/include
9499 /usr/openwin/include
9500 /usr/openwin/share/include'
9502 if test "$ac_x_includes" = no; then
9503 # Guess where to find include files, by looking for Intrinsic.h.
9504 # First, try using that file with no special directory specified.
9505 cat >conftest.$ac_ext <<_ACEOF
9506 #line 9506 "configure"
9507 #include "confdefs.h"
9508 #include <X11/Intrinsic.h>
9510 if { (eval echo "$as_me:9510: \"$ac_cpp conftest.$ac_ext\"") >&5
9511 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9513 egrep -v '^ *\+' conftest.er1 >conftest.err
9515 cat conftest.err >&5
9516 echo "$as_me:9516: \$? = $ac_status" >&5
9517 (exit $ac_status); } >/dev/null; then
9518 if test -s conftest.err; then
9519 ac_cpp_err=$ac_c_preproc_warn_flag
9526 if test -z "$ac_cpp_err"; then
9527 # We can compile using X headers with no special include directory.
9530 echo "$as_me: failed program was:" >&5
9531 cat conftest.$ac_ext >&5
9532 for ac_dir in $ac_x_header_dirs; do
9533 if test -r "$ac_dir/X11/Intrinsic.h"; then
9534 ac_x_includes=$ac_dir
9539 rm -f conftest.err conftest.$ac_ext
9540 fi # $ac_x_includes = no
9542 if test "$ac_x_libraries" = no; then
9543 # Check for the libraries.
9544 # See if we find them without any special options.
9545 # Don't add to $LIBS permanently.
9548 cat >conftest.$ac_ext <<_ACEOF
9549 #line 9549 "configure"
9550 #include "confdefs.h"
9551 #include <X11/Intrinsic.h>
9560 rm -f conftest.$ac_objext conftest$ac_exeext
9561 if { (eval echo "$as_me:9561: \"$ac_link\"") >&5
9562 (eval $ac_link) 2>&5
9564 echo "$as_me:9564: \$? = $ac_status" >&5
9565 (exit $ac_status); } &&
9566 { ac_try='test -s conftest$ac_exeext'
9567 { (eval echo "$as_me:9567: \"$ac_try\"") >&5
9570 echo "$as_me:9570: \$? = $ac_status" >&5
9571 (exit $ac_status); }; }; then
9573 # We can link X programs with no special library path.
9576 echo "$as_me: failed program was:" >&5
9577 cat conftest.$ac_ext >&5
9579 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9581 # Don't even attempt the hair of trying to link an X program!
9582 for ac_extension in a so sl dylib dll; do
9583 if test -r $ac_dir/libXt.$ac_extension; then
9584 ac_x_libraries=$ac_dir
9590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9591 fi # $ac_x_libraries = no
9593 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9594 # Didn't find X anywhere. Cache the known absence of X.
9595 ac_cv_have_x="have_x=no"
9597 # Record where we found X for the cache.
9598 ac_cv_have_x="have_x=yes \
9599 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9604 eval "$ac_cv_have_x"
9607 if test "$have_x" != yes; then
9608 echo "$as_me:9608: result: $have_x" >&5
9609 echo "${ECHO_T}$have_x" >&6
9612 # If each of the values was on the command line, it overrides each guess.
9613 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9614 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9615 # Update the cache value to reflect the command line values.
9616 ac_cv_have_x="have_x=yes \
9617 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9618 echo "$as_me:9618: result: libraries $x_libraries, headers $x_includes" >&5
9619 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9622 if test "$no_x" = yes; then
9623 # Not all programs may use this symbol, but it does not hurt to define it.
9625 cat >>confdefs.h <<\EOF
9626 #define X_DISPLAY_MISSING 1
9629 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9631 if test -n "$x_includes"; then
9632 X_CFLAGS="$X_CFLAGS -I$x_includes"
9635 # It would also be nice to do this for all -L options, not just this one.
9636 if test -n "$x_libraries"; then
9637 X_LIBS="$X_LIBS -L$x_libraries"
9638 # For Solaris; some versions of Sun CC require a space after -R and
9639 # others require no space. Words are not sufficient . . . .
9640 case `(uname -sr) 2>/dev/null` in
9642 echo "$as_me:9642: checking whether -R must be followed by a space" >&5
9643 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9644 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9645 cat >conftest.$ac_ext <<_ACEOF
9646 #line 9646 "configure"
9647 #include "confdefs.h"
9657 rm -f conftest.$ac_objext conftest$ac_exeext
9658 if { (eval echo "$as_me:9658: \"$ac_link\"") >&5
9659 (eval $ac_link) 2>&5
9661 echo "$as_me:9661: \$? = $ac_status" >&5
9662 (exit $ac_status); } &&
9663 { ac_try='test -s conftest$ac_exeext'
9664 { (eval echo "$as_me:9664: \"$ac_try\"") >&5
9667 echo "$as_me:9667: \$? = $ac_status" >&5
9668 (exit $ac_status); }; }; then
9671 echo "$as_me: failed program was:" >&5
9672 cat conftest.$ac_ext >&5
9675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9676 if test $ac_R_nospace = yes; then
9677 echo "$as_me:9677: result: no" >&5
9678 echo "${ECHO_T}no" >&6
9679 X_LIBS="$X_LIBS -R$x_libraries"
9681 LIBS="$ac_xsave_LIBS -R $x_libraries"
9682 cat >conftest.$ac_ext <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9694 rm -f conftest.$ac_objext conftest$ac_exeext
9695 if { (eval echo "$as_me:9695: \"$ac_link\"") >&5
9696 (eval $ac_link) 2>&5
9698 echo "$as_me:9698: \$? = $ac_status" >&5
9699 (exit $ac_status); } &&
9700 { ac_try='test -s conftest$ac_exeext'
9701 { (eval echo "$as_me:9701: \"$ac_try\"") >&5
9704 echo "$as_me:9704: \$? = $ac_status" >&5
9705 (exit $ac_status); }; }; then
9708 echo "$as_me: failed program was:" >&5
9709 cat conftest.$ac_ext >&5
9712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9713 if test $ac_R_space = yes; then
9714 echo "$as_me:9714: result: yes" >&5
9715 echo "${ECHO_T}yes" >&6
9716 X_LIBS="$X_LIBS -R $x_libraries"
9718 echo "$as_me:9718: result: neither works" >&5
9719 echo "${ECHO_T}neither works" >&6
9726 # Check for system-dependent libraries X programs must link with.
9727 # Do this before checking for the system-independent R6 libraries
9728 # (-lICE), since we may need -lsocket or whatever for X linking.
9730 if test "$ISC" = yes; then
9731 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9733 # Martyn Johnson says this is needed for Ultrix, if the X
9734 # libraries were built with DECnet support. And Karl Berry says
9735 # the Alpha needs dnet_stub (dnet does not exist).
9736 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9737 cat >conftest.$ac_ext <<_ACEOF
9738 #line 9738 "configure"
9739 #include "confdefs.h"
9741 /* Override any gcc2 internal prototype to avoid an error. */
9745 /* We use char because int might match the return type of a gcc2
9746 builtin and then its argument prototype would still apply. */
9747 char XOpenDisplay ();
9756 rm -f conftest.$ac_objext conftest$ac_exeext
9757 if { (eval echo "$as_me:9757: \"$ac_link\"") >&5
9758 (eval $ac_link) 2>&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); } &&
9762 { ac_try='test -s conftest$ac_exeext'
9763 { (eval echo "$as_me:9763: \"$ac_try\"") >&5
9766 echo "$as_me:9766: \$? = $ac_status" >&5
9767 (exit $ac_status); }; }; then
9770 echo "$as_me: failed program was:" >&5
9771 cat conftest.$ac_ext >&5
9772 echo "$as_me:9772: checking for dnet_ntoa in -ldnet" >&5
9773 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9774 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9775 echo $ECHO_N "(cached) $ECHO_C" >&6
9777 ac_check_lib_save_LIBS=$LIBS
9779 cat >conftest.$ac_ext <<_ACEOF
9780 #line 9780 "configure"
9781 #include "confdefs.h"
9783 /* Override any gcc2 internal prototype to avoid an error. */
9787 /* We use char because int might match the return type of a gcc2
9788 builtin and then its argument prototype would still apply. */
9798 rm -f conftest.$ac_objext conftest$ac_exeext
9799 if { (eval echo "$as_me:9799: \"$ac_link\"") >&5
9800 (eval $ac_link) 2>&5
9802 echo "$as_me:9802: \$? = $ac_status" >&5
9803 (exit $ac_status); } &&
9804 { ac_try='test -s conftest$ac_exeext'
9805 { (eval echo "$as_me:9805: \"$ac_try\"") >&5
9808 echo "$as_me:9808: \$? = $ac_status" >&5
9809 (exit $ac_status); }; }; then
9810 ac_cv_lib_dnet_dnet_ntoa=yes
9812 echo "$as_me: failed program was:" >&5
9813 cat conftest.$ac_ext >&5
9814 ac_cv_lib_dnet_dnet_ntoa=no
9816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9817 LIBS=$ac_check_lib_save_LIBS
9819 echo "$as_me:9819: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9820 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9821 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9822 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9825 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9826 echo "$as_me:9826: checking for dnet_ntoa in -ldnet_stub" >&5
9827 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9828 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9829 echo $ECHO_N "(cached) $ECHO_C" >&6
9831 ac_check_lib_save_LIBS=$LIBS
9832 LIBS="-ldnet_stub $LIBS"
9833 cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9837 /* Override any gcc2 internal prototype to avoid an error. */
9841 /* We use char because int might match the return type of a gcc2
9842 builtin and then its argument prototype would still apply. */
9852 rm -f conftest.$ac_objext conftest$ac_exeext
9853 if { (eval echo "$as_me:9853: \"$ac_link\"") >&5
9854 (eval $ac_link) 2>&5
9856 echo "$as_me:9856: \$? = $ac_status" >&5
9857 (exit $ac_status); } &&
9858 { ac_try='test -s conftest$ac_exeext'
9859 { (eval echo "$as_me:9859: \"$ac_try\"") >&5
9862 echo "$as_me:9862: \$? = $ac_status" >&5
9863 (exit $ac_status); }; }; then
9864 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9866 echo "$as_me: failed program was:" >&5
9867 cat conftest.$ac_ext >&5
9868 ac_cv_lib_dnet_stub_dnet_ntoa=no
9870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9871 LIBS=$ac_check_lib_save_LIBS
9873 echo "$as_me:9873: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9874 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9875 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9876 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9882 LIBS="$ac_xsave_LIBS"
9884 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9885 # to get the SysV transport functions.
9886 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9888 # The nsl library prevents programs from opening the X display
9889 # on Irix 5.2, according to T.E. Dickey.
9890 # The functions gethostbyname, getservbyname, and inet_addr are
9891 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9892 echo "$as_me:9892: checking for gethostbyname" >&5
9893 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9894 if test "${ac_cv_func_gethostbyname+set}" = set; then
9895 echo $ECHO_N "(cached) $ECHO_C" >&6
9897 cat >conftest.$ac_ext <<_ACEOF
9898 #line 9898 "configure"
9899 #include "confdefs.h"
9900 /* System header to define __stub macros and hopefully few prototypes,
9901 which can conflict with char gethostbyname (); below. */
9903 /* Override any gcc2 internal prototype to avoid an error. */
9907 /* We use char because int might match the return type of a gcc2
9908 builtin and then its argument prototype would still apply. */
9909 char gethostbyname ();
9915 /* The GNU C library defines this for functions which it implements
9916 to always fail with ENOSYS. Some functions are actually named
9917 something starting with __ and the normal name is an alias. */
9918 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9921 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9928 rm -f conftest.$ac_objext conftest$ac_exeext
9929 if { (eval echo "$as_me:9929: \"$ac_link\"") >&5
9930 (eval $ac_link) 2>&5
9932 echo "$as_me:9932: \$? = $ac_status" >&5
9933 (exit $ac_status); } &&
9934 { ac_try='test -s conftest$ac_exeext'
9935 { (eval echo "$as_me:9935: \"$ac_try\"") >&5
9938 echo "$as_me:9938: \$? = $ac_status" >&5
9939 (exit $ac_status); }; }; then
9940 ac_cv_func_gethostbyname=yes
9942 echo "$as_me: failed program was:" >&5
9943 cat conftest.$ac_ext >&5
9944 ac_cv_func_gethostbyname=no
9946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9948 echo "$as_me:9948: result: $ac_cv_func_gethostbyname" >&5
9949 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9951 if test $ac_cv_func_gethostbyname = no; then
9952 echo "$as_me:9952: checking for gethostbyname in -lnsl" >&5
9953 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9954 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9957 ac_check_lib_save_LIBS=$LIBS
9959 cat >conftest.$ac_ext <<_ACEOF
9960 #line 9960 "configure"
9961 #include "confdefs.h"
9963 /* Override any gcc2 internal prototype to avoid an error. */
9967 /* We use char because int might match the return type of a gcc2
9968 builtin and then its argument prototype would still apply. */
9969 char gethostbyname ();
9978 rm -f conftest.$ac_objext conftest$ac_exeext
9979 if { (eval echo "$as_me:9979: \"$ac_link\"") >&5
9980 (eval $ac_link) 2>&5
9982 echo "$as_me:9982: \$? = $ac_status" >&5
9983 (exit $ac_status); } &&
9984 { ac_try='test -s conftest$ac_exeext'
9985 { (eval echo "$as_me:9985: \"$ac_try\"") >&5
9988 echo "$as_me:9988: \$? = $ac_status" >&5
9989 (exit $ac_status); }; }; then
9990 ac_cv_lib_nsl_gethostbyname=yes
9992 echo "$as_me: failed program was:" >&5
9993 cat conftest.$ac_ext >&5
9994 ac_cv_lib_nsl_gethostbyname=no
9996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9997 LIBS=$ac_check_lib_save_LIBS
9999 echo "$as_me:9999: result: $ac_cv_lib_nsl_gethostbyname" >&5
10000 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10001 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10002 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10005 if test $ac_cv_lib_nsl_gethostbyname = no; then
10006 echo "$as_me:10006: checking for gethostbyname in -lbsd" >&5
10007 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10008 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10009 echo $ECHO_N "(cached) $ECHO_C" >&6
10011 ac_check_lib_save_LIBS=$LIBS
10013 cat >conftest.$ac_ext <<_ACEOF
10014 #line 10014 "configure"
10015 #include "confdefs.h"
10017 /* Override any gcc2 internal prototype to avoid an error. */
10021 /* We use char because int might match the return type of a gcc2
10022 builtin and then its argument prototype would still apply. */
10023 char gethostbyname ();
10032 rm -f conftest.$ac_objext conftest$ac_exeext
10033 if { (eval echo "$as_me:10033: \"$ac_link\"") >&5
10034 (eval $ac_link) 2>&5
10036 echo "$as_me:10036: \$? = $ac_status" >&5
10037 (exit $ac_status); } &&
10038 { ac_try='test -s conftest$ac_exeext'
10039 { (eval echo "$as_me:10039: \"$ac_try\"") >&5
10040 (eval $ac_try) 2>&5
10042 echo "$as_me:10042: \$? = $ac_status" >&5
10043 (exit $ac_status); }; }; then
10044 ac_cv_lib_bsd_gethostbyname=yes
10046 echo "$as_me: failed program was:" >&5
10047 cat conftest.$ac_ext >&5
10048 ac_cv_lib_bsd_gethostbyname=no
10050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10051 LIBS=$ac_check_lib_save_LIBS
10053 echo "$as_me:10053: result: $ac_cv_lib_bsd_gethostbyname" >&5
10054 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10055 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10056 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10062 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10063 # socket/setsockopt and other routines are undefined under SCO ODT
10064 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10065 # on later versions), says Simon Leinen: it contains gethostby*
10066 # variants that don't use the nameserver (or something). -lsocket
10067 # must be given before -lnsl if both are needed. We assume that
10068 # if connect needs -lnsl, so does gethostbyname.
10069 echo "$as_me:10069: checking for connect" >&5
10070 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10071 if test "${ac_cv_func_connect+set}" = set; then
10072 echo $ECHO_N "(cached) $ECHO_C" >&6
10074 cat >conftest.$ac_ext <<_ACEOF
10075 #line 10075 "configure"
10076 #include "confdefs.h"
10077 /* System header to define __stub macros and hopefully few prototypes,
10078 which can conflict with char connect (); below. */
10079 #include <assert.h>
10080 /* Override any gcc2 internal prototype to avoid an error. */
10084 /* We use char because int might match the return type of a gcc2
10085 builtin and then its argument prototype would still apply. */
10092 /* The GNU C library defines this for functions which it implements
10093 to always fail with ENOSYS. Some functions are actually named
10094 something starting with __ and the normal name is an alias. */
10095 #if defined (__stub_connect) || defined (__stub___connect)
10098 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10105 rm -f conftest.$ac_objext conftest$ac_exeext
10106 if { (eval echo "$as_me:10106: \"$ac_link\"") >&5
10107 (eval $ac_link) 2>&5
10109 echo "$as_me:10109: \$? = $ac_status" >&5
10110 (exit $ac_status); } &&
10111 { ac_try='test -s conftest$ac_exeext'
10112 { (eval echo "$as_me:10112: \"$ac_try\"") >&5
10113 (eval $ac_try) 2>&5
10115 echo "$as_me:10115: \$? = $ac_status" >&5
10116 (exit $ac_status); }; }; then
10117 ac_cv_func_connect=yes
10119 echo "$as_me: failed program was:" >&5
10120 cat conftest.$ac_ext >&5
10121 ac_cv_func_connect=no
10123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10125 echo "$as_me:10125: result: $ac_cv_func_connect" >&5
10126 echo "${ECHO_T}$ac_cv_func_connect" >&6
10128 if test $ac_cv_func_connect = no; then
10129 echo "$as_me:10129: checking for connect in -lsocket" >&5
10130 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10131 if test "${ac_cv_lib_socket_connect+set}" = set; then
10132 echo $ECHO_N "(cached) $ECHO_C" >&6
10134 ac_check_lib_save_LIBS=$LIBS
10135 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10136 cat >conftest.$ac_ext <<_ACEOF
10137 #line 10137 "configure"
10138 #include "confdefs.h"
10140 /* Override any gcc2 internal prototype to avoid an error. */
10144 /* We use char because int might match the return type of a gcc2
10145 builtin and then its argument prototype would still apply. */
10155 rm -f conftest.$ac_objext conftest$ac_exeext
10156 if { (eval echo "$as_me:10156: \"$ac_link\"") >&5
10157 (eval $ac_link) 2>&5
10159 echo "$as_me:10159: \$? = $ac_status" >&5
10160 (exit $ac_status); } &&
10161 { ac_try='test -s conftest$ac_exeext'
10162 { (eval echo "$as_me:10162: \"$ac_try\"") >&5
10163 (eval $ac_try) 2>&5
10165 echo "$as_me:10165: \$? = $ac_status" >&5
10166 (exit $ac_status); }; }; then
10167 ac_cv_lib_socket_connect=yes
10169 echo "$as_me: failed program was:" >&5
10170 cat conftest.$ac_ext >&5
10171 ac_cv_lib_socket_connect=no
10173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10174 LIBS=$ac_check_lib_save_LIBS
10176 echo "$as_me:10176: result: $ac_cv_lib_socket_connect" >&5
10177 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10178 if test $ac_cv_lib_socket_connect = yes; then
10179 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10184 # Guillermo Gomez says -lposix is necessary on A/UX.
10185 echo "$as_me:10185: checking for remove" >&5
10186 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10187 if test "${ac_cv_func_remove+set}" = set; then
10188 echo $ECHO_N "(cached) $ECHO_C" >&6
10190 cat >conftest.$ac_ext <<_ACEOF
10191 #line 10191 "configure"
10192 #include "confdefs.h"
10193 /* System header to define __stub macros and hopefully few prototypes,
10194 which can conflict with char remove (); below. */
10195 #include <assert.h>
10196 /* Override any gcc2 internal prototype to avoid an error. */
10200 /* We use char because int might match the return type of a gcc2
10201 builtin and then its argument prototype would still apply. */
10208 /* The GNU C library defines this for functions which it implements
10209 to always fail with ENOSYS. Some functions are actually named
10210 something starting with __ and the normal name is an alias. */
10211 #if defined (__stub_remove) || defined (__stub___remove)
10214 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10221 rm -f conftest.$ac_objext conftest$ac_exeext
10222 if { (eval echo "$as_me:10222: \"$ac_link\"") >&5
10223 (eval $ac_link) 2>&5
10225 echo "$as_me:10225: \$? = $ac_status" >&5
10226 (exit $ac_status); } &&
10227 { ac_try='test -s conftest$ac_exeext'
10228 { (eval echo "$as_me:10228: \"$ac_try\"") >&5
10229 (eval $ac_try) 2>&5
10231 echo "$as_me:10231: \$? = $ac_status" >&5
10232 (exit $ac_status); }; }; then
10233 ac_cv_func_remove=yes
10235 echo "$as_me: failed program was:" >&5
10236 cat conftest.$ac_ext >&5
10237 ac_cv_func_remove=no
10239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10241 echo "$as_me:10241: result: $ac_cv_func_remove" >&5
10242 echo "${ECHO_T}$ac_cv_func_remove" >&6
10244 if test $ac_cv_func_remove = no; then
10245 echo "$as_me:10245: checking for remove in -lposix" >&5
10246 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10247 if test "${ac_cv_lib_posix_remove+set}" = set; then
10248 echo $ECHO_N "(cached) $ECHO_C" >&6
10250 ac_check_lib_save_LIBS=$LIBS
10251 LIBS="-lposix $LIBS"
10252 cat >conftest.$ac_ext <<_ACEOF
10253 #line 10253 "configure"
10254 #include "confdefs.h"
10256 /* Override any gcc2 internal prototype to avoid an error. */
10260 /* We use char because int might match the return type of a gcc2
10261 builtin and then its argument prototype would still apply. */
10271 rm -f conftest.$ac_objext conftest$ac_exeext
10272 if { (eval echo "$as_me:10272: \"$ac_link\"") >&5
10273 (eval $ac_link) 2>&5
10275 echo "$as_me:10275: \$? = $ac_status" >&5
10276 (exit $ac_status); } &&
10277 { ac_try='test -s conftest$ac_exeext'
10278 { (eval echo "$as_me:10278: \"$ac_try\"") >&5
10279 (eval $ac_try) 2>&5
10281 echo "$as_me:10281: \$? = $ac_status" >&5
10282 (exit $ac_status); }; }; then
10283 ac_cv_lib_posix_remove=yes
10285 echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 ac_cv_lib_posix_remove=no
10289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10290 LIBS=$ac_check_lib_save_LIBS
10292 echo "$as_me:10292: result: $ac_cv_lib_posix_remove" >&5
10293 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10294 if test $ac_cv_lib_posix_remove = yes; then
10295 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10300 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10301 echo "$as_me:10301: checking for shmat" >&5
10302 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10303 if test "${ac_cv_func_shmat+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
10306 cat >conftest.$ac_ext <<_ACEOF
10307 #line 10307 "configure"
10308 #include "confdefs.h"
10309 /* System header to define __stub macros and hopefully few prototypes,
10310 which can conflict with char shmat (); below. */
10311 #include <assert.h>
10312 /* Override any gcc2 internal prototype to avoid an error. */
10316 /* We use char because int might match the return type of a gcc2
10317 builtin and then its argument prototype would still apply. */
10324 /* The GNU C library defines this for functions which it implements
10325 to always fail with ENOSYS. Some functions are actually named
10326 something starting with __ and the normal name is an alias. */
10327 #if defined (__stub_shmat) || defined (__stub___shmat)
10330 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10337 rm -f conftest.$ac_objext conftest$ac_exeext
10338 if { (eval echo "$as_me:10338: \"$ac_link\"") >&5
10339 (eval $ac_link) 2>&5
10341 echo "$as_me:10341: \$? = $ac_status" >&5
10342 (exit $ac_status); } &&
10343 { ac_try='test -s conftest$ac_exeext'
10344 { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345 (eval $ac_try) 2>&5
10347 echo "$as_me:10347: \$? = $ac_status" >&5
10348 (exit $ac_status); }; }; then
10349 ac_cv_func_shmat=yes
10351 echo "$as_me: failed program was:" >&5
10352 cat conftest.$ac_ext >&5
10353 ac_cv_func_shmat=no
10355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10357 echo "$as_me:10357: result: $ac_cv_func_shmat" >&5
10358 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10360 if test $ac_cv_func_shmat = no; then
10361 echo "$as_me:10361: checking for shmat in -lipc" >&5
10362 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10363 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10364 echo $ECHO_N "(cached) $ECHO_C" >&6
10366 ac_check_lib_save_LIBS=$LIBS
10368 cat >conftest.$ac_ext <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10372 /* Override any gcc2 internal prototype to avoid an error. */
10376 /* We use char because int might match the return type of a gcc2
10377 builtin and then its argument prototype would still apply. */
10387 rm -f conftest.$ac_objext conftest$ac_exeext
10388 if { (eval echo "$as_me:10388: \"$ac_link\"") >&5
10389 (eval $ac_link) 2>&5
10391 echo "$as_me:10391: \$? = $ac_status" >&5
10392 (exit $ac_status); } &&
10393 { ac_try='test -s conftest$ac_exeext'
10394 { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395 (eval $ac_try) 2>&5
10397 echo "$as_me:10397: \$? = $ac_status" >&5
10398 (exit $ac_status); }; }; then
10399 ac_cv_lib_ipc_shmat=yes
10401 echo "$as_me: failed program was:" >&5
10402 cat conftest.$ac_ext >&5
10403 ac_cv_lib_ipc_shmat=no
10405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10406 LIBS=$ac_check_lib_save_LIBS
10408 echo "$as_me:10408: result: $ac_cv_lib_ipc_shmat" >&5
10409 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10410 if test $ac_cv_lib_ipc_shmat = yes; then
10411 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10417 # Check for libraries that X11R6 Xt/Xaw programs need.
10418 ac_save_LDFLAGS=$LDFLAGS
10419 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10420 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10421 # check for ICE first), but we must link in the order -lSM -lICE or
10422 # we get undefined symbols. So assume we have SM if we have ICE.
10423 # These have to be linked with before -lX11, unlike the other
10424 # libraries we check for below, so use a different variable.
10425 # John Interrante, Karl Berry
10426 echo "$as_me:10426: checking for IceConnectionNumber in -lICE" >&5
10427 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10428 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10429 echo $ECHO_N "(cached) $ECHO_C" >&6
10431 ac_check_lib_save_LIBS=$LIBS
10432 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10433 cat >conftest.$ac_ext <<_ACEOF
10434 #line 10434 "configure"
10435 #include "confdefs.h"
10437 /* Override any gcc2 internal prototype to avoid an error. */
10441 /* We use char because int might match the return type of a gcc2
10442 builtin and then its argument prototype would still apply. */
10443 char IceConnectionNumber ();
10447 IceConnectionNumber ();
10452 rm -f conftest.$ac_objext conftest$ac_exeext
10453 if { (eval echo "$as_me:10453: \"$ac_link\"") >&5
10454 (eval $ac_link) 2>&5
10456 echo "$as_me:10456: \$? = $ac_status" >&5
10457 (exit $ac_status); } &&
10458 { ac_try='test -s conftest$ac_exeext'
10459 { (eval echo "$as_me:10459: \"$ac_try\"") >&5
10460 (eval $ac_try) 2>&5
10462 echo "$as_me:10462: \$? = $ac_status" >&5
10463 (exit $ac_status); }; }; then
10464 ac_cv_lib_ICE_IceConnectionNumber=yes
10466 echo "$as_me: failed program was:" >&5
10467 cat conftest.$ac_ext >&5
10468 ac_cv_lib_ICE_IceConnectionNumber=no
10470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10471 LIBS=$ac_check_lib_save_LIBS
10473 echo "$as_me:10473: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10474 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10475 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10476 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10479 LDFLAGS=$ac_save_LDFLAGS
10483 cf_x_athena=${cf_x_athena:-Xaw}
10485 echo "$as_me:10485: checking if you want to link with Xaw 3d library" >&5
10486 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10489 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10490 if test "${with_Xaw3d+set}" = set; then
10491 withval="$with_Xaw3d"
10494 if test "$withval" = yes ; then
10496 echo "$as_me:10496: result: yes" >&5
10497 echo "${ECHO_T}yes" >&6
10499 echo "$as_me:10499: result: no" >&5
10500 echo "${ECHO_T}no" >&6
10503 echo "$as_me:10503: checking if you want to link with Xaw 3d xft library" >&5
10504 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10507 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10508 if test "${with_Xaw3dxft+set}" = set; then
10509 withval="$with_Xaw3dxft"
10512 if test "$withval" = yes ; then
10513 cf_x_athena=Xaw3dxft
10514 echo "$as_me:10514: result: yes" >&5
10515 echo "${ECHO_T}yes" >&6
10517 echo "$as_me:10517: result: no" >&5
10518 echo "${ECHO_T}no" >&6
10521 echo "$as_me:10521: checking if you want to link with neXT Athena library" >&5
10522 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10525 # Check whether --with-neXtaw or --without-neXtaw was given.
10526 if test "${with_neXtaw+set}" = set; then
10527 withval="$with_neXtaw"
10530 if test "$withval" = yes ; then
10532 echo "$as_me:10532: result: yes" >&5
10533 echo "${ECHO_T}yes" >&6
10535 echo "$as_me:10535: result: no" >&5
10536 echo "${ECHO_T}no" >&6
10539 echo "$as_me:10539: checking if you want to link with Athena-Plus library" >&5
10540 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10543 # Check whether --with-XawPlus or --without-XawPlus was given.
10544 if test "${with_XawPlus+set}" = set; then
10545 withval="$with_XawPlus"
10548 if test "$withval" = yes ; then
10549 cf_x_athena=XawPlus
10550 echo "$as_me:10550: result: yes" >&5
10551 echo "${ECHO_T}yes" >&6
10553 echo "$as_me:10553: result: no" >&5
10554 echo "${ECHO_T}no" >&6
10559 if test "$PKG_CONFIG" != none ; then
10561 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10562 for cf_athena_pkg in \
10565 ${cf_x_athena}-devel \
10566 lib${cf_x_athena} \
10567 lib${cf_x_athena}-devel
10570 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10571 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10573 echo "${as_me:-configure}:10573: testing found package $cf_athena_pkg ..." 1>&5
10575 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10576 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10577 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10579 echo "${as_me:-configure}:10579: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10581 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10583 echo "${as_me:-configure}:10583: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10588 cf_new_extra_cppflags=
10590 for cf_add_cflags in $cf_pkgconfig_incs
10592 case $cf_fix_cppflags in
10594 case $cf_add_cflags in
10595 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10596 case $cf_add_cflags in
10598 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10600 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10601 && test -z "${cf_tst_cflags}" \
10602 && cf_fix_cppflags=yes
10604 if test $cf_fix_cppflags = yes ; then
10605 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10607 elif test "${cf_tst_cflags}" = "\"'" ; then
10608 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10613 case "$CPPFLAGS" in
10617 case $cf_add_cflags in
10619 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10621 CPPFLAGS=`echo "$CPPFLAGS" | \
10622 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10623 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10627 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10632 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10637 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10639 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10641 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10642 && test -z "${cf_tst_cflags}" \
10643 && cf_fix_cppflags=no
10648 if test -n "$cf_new_cflags" ; then
10650 CFLAGS="$CFLAGS $cf_new_cflags"
10653 if test -n "$cf_new_cppflags" ; then
10655 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10658 if test -n "$cf_new_extra_cppflags" ; then
10660 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10663 cf_add_libs="$cf_pkgconfig_libs"
10664 # Filter out duplicates - this happens with badly-designed ".pc" files...
10665 for cf_add_1lib in $LIBS
10667 for cf_add_2lib in $cf_add_libs
10669 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10675 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10677 LIBS="$cf_add_libs"
10679 cf_x_athena_lib="$cf_pkgconfig_libs"
10681 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10683 cat >>confdefs.h <<EOF
10684 #define $cf_x_athena_LIBS 1
10687 for cf_trim_lib in Xmu Xt X11
10690 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10691 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10692 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10694 echo "${as_me:-configure}:10694: testing ..trimmed $LIBS ..." 1>&5
10700 echo "$as_me:10700: checking for usable $cf_x_athena/Xmu package" >&5
10701 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10702 if test "${cf_cv_xaw_compat+set}" = set; then
10703 echo $ECHO_N "(cached) $ECHO_C" >&6
10706 cat >conftest.$ac_ext <<_ACEOF
10707 #line 10707 "configure"
10708 #include "confdefs.h"
10710 #include <X11/Xmu/CharSet.h>
10716 int check = XmuCompareISOLatin1("big", "small")
10722 rm -f conftest.$ac_objext conftest$ac_exeext
10723 if { (eval echo "$as_me:10723: \"$ac_link\"") >&5
10724 (eval $ac_link) 2>&5
10726 echo "$as_me:10726: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
10728 { ac_try='test -s conftest$ac_exeext'
10729 { (eval echo "$as_me:10729: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10732 echo "$as_me:10732: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }; then
10734 cf_cv_xaw_compat=yes
10736 echo "$as_me: failed program was:" >&5
10737 cat conftest.$ac_ext >&5
10738 cf_cv_xaw_compat=no
10740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10742 echo "$as_me:10742: result: $cf_cv_xaw_compat" >&5
10743 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10745 if test "$cf_cv_xaw_compat" = no
10747 # workaround for broken ".pc" files...
10748 case "$cf_x_athena_lib" in
10752 test -n "$verbose" && echo " work around broken package" 1>&6
10754 echo "${as_me:-configure}:10754: testing work around broken package ..." 1>&5
10756 cf_save_xmu="$LIBS"
10757 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10759 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10760 test -n "$verbose" && echo " found package xmu" 1>&6
10762 echo "${as_me:-configure}:10762: testing found package xmu ..." 1>&5
10764 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10765 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10766 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10768 echo "${as_me:-configure}:10768: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10770 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10772 echo "${as_me:-configure}:10772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10777 cf_new_extra_cppflags=
10779 for cf_add_cflags in $cf_pkgconfig_incs
10781 case $cf_fix_cppflags in
10783 case $cf_add_cflags in
10784 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10785 case $cf_add_cflags in
10787 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10790 && test -z "${cf_tst_cflags}" \
10791 && cf_fix_cppflags=yes
10793 if test $cf_fix_cppflags = yes ; then
10794 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10796 elif test "${cf_tst_cflags}" = "\"'" ; then
10797 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10802 case "$CPPFLAGS" in
10806 case $cf_add_cflags in
10808 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10810 CPPFLAGS=`echo "$CPPFLAGS" | \
10811 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10812 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10816 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10821 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10826 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10828 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10830 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10831 && test -z "${cf_tst_cflags}" \
10832 && cf_fix_cppflags=no
10837 if test -n "$cf_new_cflags" ; then
10839 CFLAGS="$CFLAGS $cf_new_cflags"
10842 if test -n "$cf_new_cppflags" ; then
10844 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10847 if test -n "$cf_new_extra_cppflags" ; then
10849 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10852 cf_add_libs="$cf_pkgconfig_libs"
10853 # Filter out duplicates - this happens with badly-designed ".pc" files...
10854 for cf_add_1lib in $LIBS
10856 for cf_add_2lib in $cf_add_libs
10858 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10864 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10866 LIBS="$cf_add_libs"
10868 LIBS="$cf_save_xmu"
10870 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10872 echo "${as_me:-configure}:10872: testing ...before $LIBS ..." 1>&5
10874 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10875 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10877 echo "${as_me:-configure}:10877: testing ...after $LIBS ..." 1>&5
10883 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10885 echo "${as_me:-configure}:10885: testing ...before $LIBS ..." 1>&5
10887 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10888 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10890 echo "${as_me:-configure}:10890: testing ...after $LIBS ..." 1>&5
10894 for cf_trim_lib in Xmu Xt X11
10897 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10898 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10899 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10901 echo "${as_me:-configure}:10901: testing ..trimmed $LIBS ..." 1>&5
10921 if test -z "$cf_x_athena_lib" ; then
10923 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10924 test -n "$verbose" && echo " found package Xext" 1>&6
10926 echo "${as_me:-configure}:10926: testing found package Xext ..." 1>&5
10928 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10929 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10930 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10932 echo "${as_me:-configure}:10932: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10934 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10936 echo "${as_me:-configure}:10936: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10941 cf_new_extra_cppflags=
10943 for cf_add_cflags in $cf_pkgconfig_incs
10945 case $cf_fix_cppflags in
10947 case $cf_add_cflags in
10948 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10949 case $cf_add_cflags in
10951 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10953 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10954 && test -z "${cf_tst_cflags}" \
10955 && cf_fix_cppflags=yes
10957 if test $cf_fix_cppflags = yes ; then
10958 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10960 elif test "${cf_tst_cflags}" = "\"'" ; then
10961 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10966 case "$CPPFLAGS" in
10970 case $cf_add_cflags in
10972 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10974 CPPFLAGS=`echo "$CPPFLAGS" | \
10975 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10976 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10980 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10985 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10990 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10992 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10994 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10995 && test -z "${cf_tst_cflags}" \
10996 && cf_fix_cppflags=no
11001 if test -n "$cf_new_cflags" ; then
11003 CFLAGS="$CFLAGS $cf_new_cflags"
11006 if test -n "$cf_new_cppflags" ; then
11008 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11011 if test -n "$cf_new_extra_cppflags" ; then
11013 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11016 cf_add_libs="$cf_pkgconfig_libs"
11017 # Filter out duplicates - this happens with badly-designed ".pc" files...
11018 for cf_add_1lib in $LIBS
11020 for cf_add_2lib in $cf_add_libs
11022 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11028 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11030 LIBS="$cf_add_libs"
11037 echo "$as_me:11037: checking for XextCreateExtension in -lXext" >&5
11038 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11039 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11040 echo $ECHO_N "(cached) $ECHO_C" >&6
11042 ac_check_lib_save_LIBS=$LIBS
11043 LIBS="-lXext $LIBS"
11044 cat >conftest.$ac_ext <<_ACEOF
11045 #line 11045 "configure"
11046 #include "confdefs.h"
11048 /* Override any gcc2 internal prototype to avoid an error. */
11052 /* We use char because int might match the return type of a gcc2
11053 builtin and then its argument prototype would still apply. */
11054 char XextCreateExtension ();
11058 XextCreateExtension ();
11063 rm -f conftest.$ac_objext conftest$ac_exeext
11064 if { (eval echo "$as_me:11064: \"$ac_link\"") >&5
11065 (eval $ac_link) 2>&5
11067 echo "$as_me:11067: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
11069 { ac_try='test -s conftest$ac_exeext'
11070 { (eval echo "$as_me:11070: \"$ac_try\"") >&5
11071 (eval $ac_try) 2>&5
11073 echo "$as_me:11073: \$? = $ac_status" >&5
11074 (exit $ac_status); }; }; then
11075 ac_cv_lib_Xext_XextCreateExtension=yes
11077 echo "$as_me: failed program was:" >&5
11078 cat conftest.$ac_ext >&5
11079 ac_cv_lib_Xext_XextCreateExtension=no
11081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11082 LIBS=$ac_check_lib_save_LIBS
11084 echo "$as_me:11084: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11085 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11086 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11088 cf_add_libs="-lXext"
11089 # Filter out duplicates - this happens with badly-designed ".pc" files...
11090 for cf_add_1lib in $LIBS
11092 for cf_add_2lib in $cf_add_libs
11094 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11100 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11102 LIBS="$cf_add_libs"
11108 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11109 # in some cases has installed dummy files in the former, other cases replaced
11110 # it with a link to the new location). This complicates the configure script.
11111 # Check for that pitfall, and recover using pkg-config
11113 # If none of these are set, the configuration is almost certainly broken.
11114 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11117 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11118 test -n "$verbose" && echo " found package x11" 1>&6
11120 echo "${as_me:-configure}:11120: testing found package x11 ..." 1>&5
11122 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11123 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11124 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11126 echo "${as_me:-configure}:11126: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11128 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11130 echo "${as_me:-configure}:11130: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11135 cf_new_extra_cppflags=
11137 for cf_add_cflags in $cf_pkgconfig_incs
11139 case $cf_fix_cppflags in
11141 case $cf_add_cflags in
11142 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11143 case $cf_add_cflags in
11145 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11147 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11148 && test -z "${cf_tst_cflags}" \
11149 && cf_fix_cppflags=yes
11151 if test $cf_fix_cppflags = yes ; then
11152 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11154 elif test "${cf_tst_cflags}" = "\"'" ; then
11155 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11160 case "$CPPFLAGS" in
11164 case $cf_add_cflags in
11166 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11168 CPPFLAGS=`echo "$CPPFLAGS" | \
11169 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11170 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11174 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11179 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11184 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11186 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11188 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11189 && test -z "${cf_tst_cflags}" \
11190 && cf_fix_cppflags=no
11195 if test -n "$cf_new_cflags" ; then
11197 CFLAGS="$CFLAGS $cf_new_cflags"
11200 if test -n "$cf_new_cppflags" ; then
11202 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11205 if test -n "$cf_new_extra_cppflags" ; then
11207 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11210 cf_add_libs="$cf_pkgconfig_libs"
11211 # Filter out duplicates - this happens with badly-designed ".pc" files...
11212 for cf_add_1lib in $LIBS
11214 for cf_add_2lib in $cf_add_libs
11216 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11224 LIBS="$cf_add_libs"
11230 { echo "$as_me:11230: WARNING: unable to find X11 library" >&5
11231 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11234 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11235 test -n "$verbose" && echo " found package ice" 1>&6
11237 echo "${as_me:-configure}:11237: testing found package ice ..." 1>&5
11239 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11240 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11241 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11243 echo "${as_me:-configure}:11243: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11245 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11247 echo "${as_me:-configure}:11247: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11252 cf_new_extra_cppflags=
11254 for cf_add_cflags in $cf_pkgconfig_incs
11256 case $cf_fix_cppflags in
11258 case $cf_add_cflags in
11259 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11260 case $cf_add_cflags in
11262 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11264 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11265 && test -z "${cf_tst_cflags}" \
11266 && cf_fix_cppflags=yes
11268 if test $cf_fix_cppflags = yes ; then
11269 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11271 elif test "${cf_tst_cflags}" = "\"'" ; then
11272 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11277 case "$CPPFLAGS" in
11281 case $cf_add_cflags in
11283 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11285 CPPFLAGS=`echo "$CPPFLAGS" | \
11286 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11287 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11291 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11296 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11301 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11303 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11306 && test -z "${cf_tst_cflags}" \
11307 && cf_fix_cppflags=no
11312 if test -n "$cf_new_cflags" ; then
11314 CFLAGS="$CFLAGS $cf_new_cflags"
11317 if test -n "$cf_new_cppflags" ; then
11319 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11322 if test -n "$cf_new_extra_cppflags" ; then
11324 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11327 cf_add_libs="$cf_pkgconfig_libs"
11328 # Filter out duplicates - this happens with badly-designed ".pc" files...
11329 for cf_add_1lib in $LIBS
11331 for cf_add_2lib in $cf_add_libs
11333 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11339 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11341 LIBS="$cf_add_libs"
11347 { echo "$as_me:11347: WARNING: unable to find ICE library" >&5
11348 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11351 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11352 test -n "$verbose" && echo " found package sm" 1>&6
11354 echo "${as_me:-configure}:11354: testing found package sm ..." 1>&5
11356 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11357 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11358 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11360 echo "${as_me:-configure}:11360: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11362 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11364 echo "${as_me:-configure}:11364: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11369 cf_new_extra_cppflags=
11371 for cf_add_cflags in $cf_pkgconfig_incs
11373 case $cf_fix_cppflags in
11375 case $cf_add_cflags in
11376 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11377 case $cf_add_cflags in
11379 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11381 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11382 && test -z "${cf_tst_cflags}" \
11383 && cf_fix_cppflags=yes
11385 if test $cf_fix_cppflags = yes ; then
11386 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11388 elif test "${cf_tst_cflags}" = "\"'" ; then
11389 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11394 case "$CPPFLAGS" in
11398 case $cf_add_cflags in
11400 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11402 CPPFLAGS=`echo "$CPPFLAGS" | \
11403 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11404 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11408 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11413 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11418 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11420 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11422 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11423 && test -z "${cf_tst_cflags}" \
11424 && cf_fix_cppflags=no
11429 if test -n "$cf_new_cflags" ; then
11431 CFLAGS="$CFLAGS $cf_new_cflags"
11434 if test -n "$cf_new_cppflags" ; then
11436 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11439 if test -n "$cf_new_extra_cppflags" ; then
11441 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11444 cf_add_libs="$cf_pkgconfig_libs"
11445 # Filter out duplicates - this happens with badly-designed ".pc" files...
11446 for cf_add_1lib in $LIBS
11448 for cf_add_2lib in $cf_add_libs
11450 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11458 LIBS="$cf_add_libs"
11464 { echo "$as_me:11464: WARNING: unable to find SM library" >&5
11465 echo "$as_me: WARNING: unable to find SM library" >&2;}
11468 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11469 test -n "$verbose" && echo " found package xt" 1>&6
11471 echo "${as_me:-configure}:11471: testing found package xt ..." 1>&5
11473 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11474 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11475 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11477 echo "${as_me:-configure}:11477: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11479 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11481 echo "${as_me:-configure}:11481: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11486 cf_new_extra_cppflags=
11488 for cf_add_cflags in $cf_pkgconfig_incs
11490 case $cf_fix_cppflags in
11492 case $cf_add_cflags in
11493 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11494 case $cf_add_cflags in
11496 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11498 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11499 && test -z "${cf_tst_cflags}" \
11500 && cf_fix_cppflags=yes
11502 if test $cf_fix_cppflags = yes ; then
11503 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11505 elif test "${cf_tst_cflags}" = "\"'" ; then
11506 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11511 case "$CPPFLAGS" in
11515 case $cf_add_cflags in
11517 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11519 CPPFLAGS=`echo "$CPPFLAGS" | \
11520 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11521 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11525 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11530 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11535 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11537 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11539 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11540 && test -z "${cf_tst_cflags}" \
11541 && cf_fix_cppflags=no
11546 if test -n "$cf_new_cflags" ; then
11548 CFLAGS="$CFLAGS $cf_new_cflags"
11551 if test -n "$cf_new_cppflags" ; then
11553 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11556 if test -n "$cf_new_extra_cppflags" ; then
11558 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11561 cf_add_libs="$cf_pkgconfig_libs"
11562 # Filter out duplicates - this happens with badly-designed ".pc" files...
11563 for cf_add_1lib in $LIBS
11565 for cf_add_2lib in $cf_add_libs
11567 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11573 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11575 LIBS="$cf_add_libs"
11581 { echo "$as_me:11581: WARNING: unable to find Xt library" >&5
11582 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11589 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11590 test -n "$verbose" && echo " found package xt" 1>&6
11592 echo "${as_me:-configure}:11592: testing found package xt ..." 1>&5
11594 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11595 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11596 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11598 echo "${as_me:-configure}:11598: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11600 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11602 echo "${as_me:-configure}:11602: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11607 cf_new_extra_cppflags=
11609 for cf_add_cflags in $cf_pkgconfig_incs
11611 case $cf_fix_cppflags in
11613 case $cf_add_cflags in
11614 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11615 case $cf_add_cflags in
11617 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11619 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11620 && test -z "${cf_tst_cflags}" \
11621 && cf_fix_cppflags=yes
11623 if test $cf_fix_cppflags = yes ; then
11624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11626 elif test "${cf_tst_cflags}" = "\"'" ; then
11627 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11632 case "$CPPFLAGS" in
11636 case $cf_add_cflags in
11638 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11640 CPPFLAGS=`echo "$CPPFLAGS" | \
11641 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11642 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11646 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11651 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11656 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11658 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11660 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11661 && test -z "${cf_tst_cflags}" \
11662 && cf_fix_cppflags=no
11667 if test -n "$cf_new_cflags" ; then
11669 CFLAGS="$CFLAGS $cf_new_cflags"
11672 if test -n "$cf_new_cppflags" ; then
11674 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11677 if test -n "$cf_new_extra_cppflags" ; then
11679 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11682 cf_add_libs="$cf_pkgconfig_libs"
11683 # Filter out duplicates - this happens with badly-designed ".pc" files...
11684 for cf_add_1lib in $LIBS
11686 for cf_add_2lib in $cf_add_libs
11688 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11694 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11696 LIBS="$cf_add_libs"
11702 # we have an "xt" package, but it may omit Xt's dependency on X11
11703 echo "$as_me:11703: checking for usable X dependency" >&5
11704 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11705 if test "${cf_cv_xt_x11_compat+set}" = set; then
11706 echo $ECHO_N "(cached) $ECHO_C" >&6
11709 cat >conftest.$ac_ext <<_ACEOF
11710 #line 11710 "configure"
11711 #include "confdefs.h"
11713 #include <X11/Xlib.h>
11719 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11720 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11721 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11722 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11728 rm -f conftest.$ac_objext conftest$ac_exeext
11729 if { (eval echo "$as_me:11729: \"$ac_link\"") >&5
11730 (eval $ac_link) 2>&5
11732 echo "$as_me:11732: \$? = $ac_status" >&5
11733 (exit $ac_status); } &&
11734 { ac_try='test -s conftest$ac_exeext'
11735 { (eval echo "$as_me:11735: \"$ac_try\"") >&5
11736 (eval $ac_try) 2>&5
11738 echo "$as_me:11738: \$? = $ac_status" >&5
11739 (exit $ac_status); }; }; then
11740 cf_cv_xt_x11_compat=yes
11742 echo "$as_me: failed program was:" >&5
11743 cat conftest.$ac_ext >&5
11744 cf_cv_xt_x11_compat=no
11746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11748 echo "$as_me:11748: result: $cf_cv_xt_x11_compat" >&5
11749 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11750 if test "$cf_cv_xt_x11_compat" = no
11752 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11754 echo "${as_me:-configure}:11754: testing work around broken X11 dependency ..." 1>&5
11756 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11758 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11759 test -n "$verbose" && echo " found package x11" 1>&6
11761 echo "${as_me:-configure}:11761: testing found package x11 ..." 1>&5
11763 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11764 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11765 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11767 echo "${as_me:-configure}:11767: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11769 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11771 echo "${as_me:-configure}:11771: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11776 cf_new_extra_cppflags=
11778 for cf_add_cflags in $cf_pkgconfig_incs
11780 case $cf_fix_cppflags in
11782 case $cf_add_cflags in
11783 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11784 case $cf_add_cflags in
11786 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11788 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11789 && test -z "${cf_tst_cflags}" \
11790 && cf_fix_cppflags=yes
11792 if test $cf_fix_cppflags = yes ; then
11793 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11795 elif test "${cf_tst_cflags}" = "\"'" ; then
11796 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11801 case "$CPPFLAGS" in
11805 case $cf_add_cflags in
11807 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11809 CPPFLAGS=`echo "$CPPFLAGS" | \
11810 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11811 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11815 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11820 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11825 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11827 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11830 && test -z "${cf_tst_cflags}" \
11831 && cf_fix_cppflags=no
11836 if test -n "$cf_new_cflags" ; then
11838 CFLAGS="$CFLAGS $cf_new_cflags"
11841 if test -n "$cf_new_cppflags" ; then
11843 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11846 if test -n "$cf_new_extra_cppflags" ; then
11848 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11851 cf_add_libs="$cf_pkgconfig_libs"
11852 # Filter out duplicates - this happens with badly-designed ".pc" files...
11853 for cf_add_1lib in $LIBS
11855 for cf_add_2lib in $cf_add_libs
11857 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11863 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11865 LIBS="$cf_add_libs"
11872 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11874 echo "${as_me:-configure}:11874: testing ...before $LIBS ..." 1>&5
11876 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11877 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11879 echo "${as_me:-configure}:11879: testing ...after $LIBS ..." 1>&5
11887 echo "$as_me:11887: checking for usable X Toolkit package" >&5
11888 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11889 if test "${cf_cv_xt_ice_compat+set}" = set; then
11890 echo $ECHO_N "(cached) $ECHO_C" >&6
11893 cat >conftest.$ac_ext <<_ACEOF
11894 #line 11894 "configure"
11895 #include "confdefs.h"
11897 #include <X11/Shell.h>
11902 int num = IceConnectionNumber(0)
11908 rm -f conftest.$ac_objext conftest$ac_exeext
11909 if { (eval echo "$as_me:11909: \"$ac_link\"") >&5
11910 (eval $ac_link) 2>&5
11912 echo "$as_me:11912: \$? = $ac_status" >&5
11913 (exit $ac_status); } &&
11914 { ac_try='test -s conftest$ac_exeext'
11915 { (eval echo "$as_me:11915: \"$ac_try\"") >&5
11916 (eval $ac_try) 2>&5
11918 echo "$as_me:11918: \$? = $ac_status" >&5
11919 (exit $ac_status); }; }; then
11920 cf_cv_xt_ice_compat=yes
11922 echo "$as_me: failed program was:" >&5
11923 cat conftest.$ac_ext >&5
11924 cf_cv_xt_ice_compat=no
11926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11928 echo "$as_me:11928: result: $cf_cv_xt_ice_compat" >&5
11929 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11931 if test "$cf_cv_xt_ice_compat" = no
11933 # workaround for broken ".pc" files used for X Toolkit.
11934 case "x$X_PRE_LIBS" in
11940 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11942 echo "${as_me:-configure}:11942: testing work around broken ICE dependency ..." 1>&5
11944 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11945 test -n "$verbose" && echo " found package ice" 1>&6
11947 echo "${as_me:-configure}:11947: testing found package ice ..." 1>&5
11949 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11950 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11951 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11953 echo "${as_me:-configure}:11953: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11955 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11957 echo "${as_me:-configure}:11957: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11962 cf_new_extra_cppflags=
11964 for cf_add_cflags in $cf_pkgconfig_incs
11966 case $cf_fix_cppflags in
11968 case $cf_add_cflags in
11969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11970 case $cf_add_cflags in
11972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11975 && test -z "${cf_tst_cflags}" \
11976 && cf_fix_cppflags=yes
11978 if test $cf_fix_cppflags = yes ; then
11979 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11981 elif test "${cf_tst_cflags}" = "\"'" ; then
11982 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11987 case "$CPPFLAGS" in
11991 case $cf_add_cflags in
11993 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11995 CPPFLAGS=`echo "$CPPFLAGS" | \
11996 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11997 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12001 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12006 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12011 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12013 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12015 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12016 && test -z "${cf_tst_cflags}" \
12017 && cf_fix_cppflags=no
12022 if test -n "$cf_new_cflags" ; then
12024 CFLAGS="$CFLAGS $cf_new_cflags"
12027 if test -n "$cf_new_cppflags" ; then
12029 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12032 if test -n "$cf_new_extra_cppflags" ; then
12034 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12037 cf_add_libs="$cf_pkgconfig_libs"
12038 # Filter out duplicates - this happens with badly-designed ".pc" files...
12039 for cf_add_1lib in $LIBS
12041 for cf_add_2lib in $cf_add_libs
12043 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12049 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12051 LIBS="$cf_add_libs"
12053 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12054 test -n "$verbose" && echo " found package sm" 1>&6
12056 echo "${as_me:-configure}:12056: testing found package sm ..." 1>&5
12058 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12059 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12060 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12062 echo "${as_me:-configure}:12062: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12064 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12066 echo "${as_me:-configure}:12066: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12071 cf_new_extra_cppflags=
12073 for cf_add_cflags in $cf_pkgconfig_incs
12075 case $cf_fix_cppflags in
12077 case $cf_add_cflags in
12078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12079 case $cf_add_cflags in
12081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12084 && test -z "${cf_tst_cflags}" \
12085 && cf_fix_cppflags=yes
12087 if test $cf_fix_cppflags = yes ; then
12088 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12090 elif test "${cf_tst_cflags}" = "\"'" ; then
12091 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12096 case "$CPPFLAGS" in
12100 case $cf_add_cflags in
12102 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12104 CPPFLAGS=`echo "$CPPFLAGS" | \
12105 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12106 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12110 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12115 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12120 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12122 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12125 && test -z "${cf_tst_cflags}" \
12126 && cf_fix_cppflags=no
12131 if test -n "$cf_new_cflags" ; then
12133 CFLAGS="$CFLAGS $cf_new_cflags"
12136 if test -n "$cf_new_cppflags" ; then
12138 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12141 if test -n "$cf_new_extra_cppflags" ; then
12143 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12146 cf_add_libs="$cf_pkgconfig_libs"
12147 # Filter out duplicates - this happens with badly-designed ".pc" files...
12148 for cf_add_1lib in $LIBS
12150 for cf_add_2lib in $cf_add_libs
12152 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12158 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12160 LIBS="$cf_add_libs"
12173 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12175 echo "${as_me:-configure}:12175: testing ...before $LIBS ..." 1>&5
12177 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12178 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12180 echo "${as_me:-configure}:12180: testing ...after $LIBS ..." 1>&5
12196 LDFLAGS="$X_LIBS $LDFLAGS"
12198 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12200 echo "${as_me:-configure}:12200: testing checking additions to CFLAGS ..." 1>&5
12202 cf_check_cflags="$CFLAGS"
12203 cf_check_cppflags="$CPPFLAGS"
12208 cf_new_extra_cppflags=
12210 for cf_add_cflags in $X_CFLAGS
12212 case $cf_fix_cppflags in
12214 case $cf_add_cflags in
12215 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12216 case $cf_add_cflags in
12218 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12220 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12221 && test -z "${cf_tst_cflags}" \
12222 && cf_fix_cppflags=yes
12224 if test $cf_fix_cppflags = yes ; then
12225 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12227 elif test "${cf_tst_cflags}" = "\"'" ; then
12228 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12233 case "$CPPFLAGS" in
12237 case $cf_add_cflags in
12239 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12241 CPPFLAGS=`echo "$CPPFLAGS" | \
12242 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12243 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12247 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12252 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12257 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12262 && test -z "${cf_tst_cflags}" \
12263 && cf_fix_cppflags=no
12268 if test -n "$cf_new_cflags" ; then
12269 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12271 echo "${as_me:-configure}:12271: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12273 CFLAGS="$CFLAGS $cf_new_cflags"
12276 if test -n "$cf_new_cppflags" ; then
12277 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12279 echo "${as_me:-configure}:12279: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12281 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12284 if test -n "$cf_new_extra_cppflags" ; then
12285 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12287 echo "${as_me:-configure}:12287: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12289 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12292 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12293 cat >conftest.$ac_ext <<_ACEOF
12294 #line 12294 "configure"
12295 #include "confdefs.h"
12300 printf("Hello world");
12305 rm -f conftest.$ac_objext conftest$ac_exeext
12306 if { (eval echo "$as_me:12306: \"$ac_link\"") >&5
12307 (eval $ac_link) 2>&5
12309 echo "$as_me:12309: \$? = $ac_status" >&5
12310 (exit $ac_status); } &&
12311 { ac_try='test -s conftest$ac_exeext'
12312 { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313 (eval $ac_try) 2>&5
12315 echo "$as_me:12315: \$? = $ac_status" >&5
12316 (exit $ac_status); }; }; then
12319 echo "$as_me: failed program was:" >&5
12320 cat conftest.$ac_ext >&5
12321 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12323 echo "${as_me:-configure}:12323: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12325 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12326 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12328 echo "${as_me:-configure}:12328: testing but keeping change to \$CPPFLAGS ..." 1>&5
12331 CFLAGS="$cf_check_flags"
12333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12336 echo "$as_me:12336: checking for XOpenDisplay" >&5
12337 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12338 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12339 echo $ECHO_N "(cached) $ECHO_C" >&6
12341 cat >conftest.$ac_ext <<_ACEOF
12342 #line 12342 "configure"
12343 #include "confdefs.h"
12344 /* System header to define __stub macros and hopefully few prototypes,
12345 which can conflict with char XOpenDisplay (); below. */
12346 #include <assert.h>
12347 /* Override any gcc2 internal prototype to avoid an error. */
12351 /* We use char because int might match the return type of a gcc2
12352 builtin and then its argument prototype would still apply. */
12353 char XOpenDisplay ();
12359 /* The GNU C library defines this for functions which it implements
12360 to always fail with ENOSYS. Some functions are actually named
12361 something starting with __ and the normal name is an alias. */
12362 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12365 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12372 rm -f conftest.$ac_objext conftest$ac_exeext
12373 if { (eval echo "$as_me:12373: \"$ac_link\"") >&5
12374 (eval $ac_link) 2>&5
12376 echo "$as_me:12376: \$? = $ac_status" >&5
12377 (exit $ac_status); } &&
12378 { ac_try='test -s conftest$ac_exeext'
12379 { (eval echo "$as_me:12379: \"$ac_try\"") >&5
12380 (eval $ac_try) 2>&5
12382 echo "$as_me:12382: \$? = $ac_status" >&5
12383 (exit $ac_status); }; }; then
12384 ac_cv_func_XOpenDisplay=yes
12386 echo "$as_me: failed program was:" >&5
12387 cat conftest.$ac_ext >&5
12388 ac_cv_func_XOpenDisplay=no
12390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12392 echo "$as_me:12392: result: $ac_cv_func_XOpenDisplay" >&5
12393 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12394 if test $ac_cv_func_XOpenDisplay = yes; then
12398 echo "$as_me:12398: checking for XOpenDisplay in -lX11" >&5
12399 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12400 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12401 echo $ECHO_N "(cached) $ECHO_C" >&6
12403 ac_check_lib_save_LIBS=$LIBS
12404 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12405 cat >conftest.$ac_ext <<_ACEOF
12406 #line 12406 "configure"
12407 #include "confdefs.h"
12409 /* Override any gcc2 internal prototype to avoid an error. */
12413 /* We use char because int might match the return type of a gcc2
12414 builtin and then its argument prototype would still apply. */
12415 char XOpenDisplay ();
12424 rm -f conftest.$ac_objext conftest$ac_exeext
12425 if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
12426 (eval $ac_link) 2>&5
12428 echo "$as_me:12428: \$? = $ac_status" >&5
12429 (exit $ac_status); } &&
12430 { ac_try='test -s conftest$ac_exeext'
12431 { (eval echo "$as_me:12431: \"$ac_try\"") >&5
12432 (eval $ac_try) 2>&5
12434 echo "$as_me:12434: \$? = $ac_status" >&5
12435 (exit $ac_status); }; }; then
12436 ac_cv_lib_X11_XOpenDisplay=yes
12438 echo "$as_me: failed program was:" >&5
12439 cat conftest.$ac_ext >&5
12440 ac_cv_lib_X11_XOpenDisplay=no
12442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12443 LIBS=$ac_check_lib_save_LIBS
12445 echo "$as_me:12445: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12446 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12447 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12449 cf_add_libs="-lX11"
12450 # Filter out duplicates - this happens with badly-designed ".pc" files...
12451 for cf_add_1lib in $LIBS
12453 for cf_add_2lib in $cf_add_libs
12455 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12461 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12463 LIBS="$cf_add_libs"
12469 echo "$as_me:12469: checking for XtAppInitialize" >&5
12470 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12471 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12472 echo $ECHO_N "(cached) $ECHO_C" >&6
12474 cat >conftest.$ac_ext <<_ACEOF
12475 #line 12475 "configure"
12476 #include "confdefs.h"
12477 /* System header to define __stub macros and hopefully few prototypes,
12478 which can conflict with char XtAppInitialize (); below. */
12479 #include <assert.h>
12480 /* Override any gcc2 internal prototype to avoid an error. */
12484 /* We use char because int might match the return type of a gcc2
12485 builtin and then its argument prototype would still apply. */
12486 char XtAppInitialize ();
12492 /* The GNU C library defines this for functions which it implements
12493 to always fail with ENOSYS. Some functions are actually named
12494 something starting with __ and the normal name is an alias. */
12495 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12498 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12505 rm -f conftest.$ac_objext conftest$ac_exeext
12506 if { (eval echo "$as_me:12506: \"$ac_link\"") >&5
12507 (eval $ac_link) 2>&5
12509 echo "$as_me:12509: \$? = $ac_status" >&5
12510 (exit $ac_status); } &&
12511 { ac_try='test -s conftest$ac_exeext'
12512 { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513 (eval $ac_try) 2>&5
12515 echo "$as_me:12515: \$? = $ac_status" >&5
12516 (exit $ac_status); }; }; then
12517 ac_cv_func_XtAppInitialize=yes
12519 echo "$as_me: failed program was:" >&5
12520 cat conftest.$ac_ext >&5
12521 ac_cv_func_XtAppInitialize=no
12523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12525 echo "$as_me:12525: result: $ac_cv_func_XtAppInitialize" >&5
12526 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12527 if test $ac_cv_func_XtAppInitialize = yes; then
12531 echo "$as_me:12531: checking for XtAppInitialize in -lXt" >&5
12532 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12533 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12534 echo $ECHO_N "(cached) $ECHO_C" >&6
12536 ac_check_lib_save_LIBS=$LIBS
12537 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12538 cat >conftest.$ac_ext <<_ACEOF
12539 #line 12539 "configure"
12540 #include "confdefs.h"
12542 /* Override any gcc2 internal prototype to avoid an error. */
12546 /* We use char because int might match the return type of a gcc2
12547 builtin and then its argument prototype would still apply. */
12548 char XtAppInitialize ();
12552 XtAppInitialize ();
12557 rm -f conftest.$ac_objext conftest$ac_exeext
12558 if { (eval echo "$as_me:12558: \"$ac_link\"") >&5
12559 (eval $ac_link) 2>&5
12561 echo "$as_me:12561: \$? = $ac_status" >&5
12562 (exit $ac_status); } &&
12563 { ac_try='test -s conftest$ac_exeext'
12564 { (eval echo "$as_me:12564: \"$ac_try\"") >&5
12565 (eval $ac_try) 2>&5
12567 echo "$as_me:12567: \$? = $ac_status" >&5
12568 (exit $ac_status); }; }; then
12569 ac_cv_lib_Xt_XtAppInitialize=yes
12571 echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 ac_cv_lib_Xt_XtAppInitialize=no
12575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12576 LIBS=$ac_check_lib_save_LIBS
12578 echo "$as_me:12578: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12579 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12580 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12582 cat >>confdefs.h <<\EOF
12583 #define HAVE_LIBXT 1
12587 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12594 if test $cf_have_X_LIBS = no ; then
12595 { echo "$as_me:12595: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12596 test program. You will have to check and add the proper libraries by hand
12598 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12599 test program. You will have to check and add the proper libraries by hand
12600 to makefile." >&2;}
12603 cf_x_athena_root=$cf_x_athena
12606 for cf_path in default \
12607 /usr/contrib/X11R6 \
12608 /usr/contrib/X11R5 \
12612 if test -z "$cf_x_athena_inc" ; then
12613 cf_save="$CPPFLAGS"
12614 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12615 if test $cf_path != default ; then
12616 CPPFLAGS="$cf_save -I$cf_path/include"
12617 echo "$as_me:12617: checking for $cf_test in $cf_path" >&5
12618 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12620 echo "$as_me:12620: checking for $cf_test" >&5
12621 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12623 cat >conftest.$ac_ext <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12627 #include <X11/Intrinsic.h>
12628 #include <$cf_test>
12637 rm -f conftest.$ac_objext
12638 if { (eval echo "$as_me:12638: \"$ac_compile\"") >&5
12639 (eval $ac_compile) 2>&5
12641 echo "$as_me:12641: \$? = $ac_status" >&5
12642 (exit $ac_status); } &&
12643 { ac_try='test -s conftest.$ac_objext'
12644 { (eval echo "$as_me:12644: \"$ac_try\"") >&5
12645 (eval $ac_try) 2>&5
12647 echo "$as_me:12647: \$? = $ac_status" >&5
12648 (exit $ac_status); }; }; then
12651 echo "$as_me: failed program was:" >&5
12652 cat conftest.$ac_ext >&5
12655 rm -f conftest.$ac_objext conftest.$ac_ext
12656 echo "$as_me:12656: result: $cf_result" >&5
12657 echo "${ECHO_T}$cf_result" >&6
12658 if test "$cf_result" = yes ; then
12659 cf_x_athena_inc=$cf_path
12662 CPPFLAGS="$cf_save"
12667 if test -z "$cf_x_athena_inc" ; then
12668 { echo "$as_me:12668: WARNING: Unable to successfully find Athena header files with test program" >&5
12669 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12670 elif test "$cf_x_athena_inc" != default ; then
12671 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12674 cf_x_athena_root=$cf_x_athena
12677 for cf_path in default \
12678 /usr/contrib/X11R6 \
12679 /usr/contrib/X11R5 \
12684 ${cf_x_athena_root} \
12685 ${cf_x_athena_root}7 \
12686 ${cf_x_athena_root}6
12689 "-l$cf_lib -lXmu" \
12690 "-l$cf_lib -lXpm -lXmu" \
12691 "-l${cf_lib}_s -lXmu_s"
12693 if test -z "$cf_x_athena_lib" ; then
12695 cf_test=XawSimpleMenuAddGlobalActions
12696 if test $cf_path != default ; then
12698 cf_add_libs="-L$cf_path/lib $cf_libs"
12699 # Filter out duplicates - this happens with badly-designed ".pc" files...
12700 for cf_add_1lib in $LIBS
12702 for cf_add_2lib in $cf_add_libs
12704 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12710 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12712 LIBS="$cf_add_libs"
12714 echo "$as_me:12714: checking for $cf_libs in $cf_path" >&5
12715 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12718 cf_add_libs="$cf_libs"
12719 # Filter out duplicates - this happens with badly-designed ".pc" files...
12720 for cf_add_1lib in $LIBS
12722 for cf_add_2lib in $cf_add_libs
12724 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12730 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12732 LIBS="$cf_add_libs"
12734 echo "$as_me:12734: checking for $cf_test in $cf_libs" >&5
12735 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12737 cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12741 #include <X11/Intrinsic.h>
12742 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12748 $cf_test((XtAppContext) 0)
12753 rm -f conftest.$ac_objext conftest$ac_exeext
12754 if { (eval echo "$as_me:12754: \"$ac_link\"") >&5
12755 (eval $ac_link) 2>&5
12757 echo "$as_me:12757: \$? = $ac_status" >&5
12758 (exit $ac_status); } &&
12759 { ac_try='test -s conftest$ac_exeext'
12760 { (eval echo "$as_me:12760: \"$ac_try\"") >&5
12761 (eval $ac_try) 2>&5
12763 echo "$as_me:12763: \$? = $ac_status" >&5
12764 (exit $ac_status); }; }; then
12767 echo "$as_me: failed program was:" >&5
12768 cat conftest.$ac_ext >&5
12771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12772 echo "$as_me:12772: result: $cf_result" >&5
12773 echo "${ECHO_T}$cf_result" >&6
12774 if test "$cf_result" = yes ; then
12775 cf_x_athena_lib="$cf_libs"
12781 test -n "$cf_x_athena_lib" && break
12785 if test -z "$cf_x_athena_lib" ; then
12786 { { echo "$as_me:12786: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12787 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12788 { (exit 1); exit 1; }; }
12791 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12793 cat >>confdefs.h <<EOF
12794 #define $cf_x_athena_LIBS 1
12799 if test -n "$ac_tool_prefix"; then
12800 for ac_prog in xcurses-config
12802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12803 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12804 echo "$as_me:12804: checking for $ac_word" >&5
12805 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12806 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12807 echo $ECHO_N "(cached) $ECHO_C" >&6
12809 if test -n "$XCURSES_CONFIG"; then
12810 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12812 ac_save_IFS=$IFS; IFS=$ac_path_separator
12814 for ac_dir in $ac_dummy; do
12816 test -z "$ac_dir" && ac_dir=.
12817 $as_executable_p "$ac_dir/$ac_word" || continue
12818 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12819 echo "$as_me:12819: found $ac_dir/$ac_word" >&5
12825 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12826 if test -n "$XCURSES_CONFIG"; then
12827 echo "$as_me:12827: result: $XCURSES_CONFIG" >&5
12828 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12830 echo "$as_me:12830: result: no" >&5
12831 echo "${ECHO_T}no" >&6
12834 test -n "$XCURSES_CONFIG" && break
12837 if test -z "$XCURSES_CONFIG"; then
12838 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12839 for ac_prog in xcurses-config
12841 # Extract the first word of "$ac_prog", so it can be a program name with args.
12842 set dummy $ac_prog; ac_word=$2
12843 echo "$as_me:12843: checking for $ac_word" >&5
12844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12845 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12846 echo $ECHO_N "(cached) $ECHO_C" >&6
12848 if test -n "$ac_ct_XCURSES_CONFIG"; then
12849 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12851 ac_save_IFS=$IFS; IFS=$ac_path_separator
12853 for ac_dir in $ac_dummy; do
12855 test -z "$ac_dir" && ac_dir=.
12856 $as_executable_p "$ac_dir/$ac_word" || continue
12857 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12858 echo "$as_me:12858: found $ac_dir/$ac_word" >&5
12864 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12865 if test -n "$ac_ct_XCURSES_CONFIG"; then
12866 echo "$as_me:12866: result: $ac_ct_XCURSES_CONFIG" >&5
12867 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12869 echo "$as_me:12869: result: no" >&5
12870 echo "${ECHO_T}no" >&6
12873 test -n "$ac_ct_XCURSES_CONFIG" && break
12875 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12877 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12880 if test "$XCURSES_CONFIG" != none ; then
12882 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12884 cf_add_libs="`$XCURSES_CONFIG --libs`"
12885 # Filter out duplicates - this happens with badly-designed ".pc" files...
12886 for cf_add_1lib in $LIBS
12888 for cf_add_2lib in $cf_add_libs
12890 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12896 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12898 LIBS="$cf_add_libs"
12900 cf_cv_lib_XCurses=yes
12904 LDFLAGS="$LDFLAGS $X_LIBS"
12906 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12908 echo "${as_me:-configure}:12908: testing checking additions to CFLAGS ..." 1>&5
12910 cf_check_cflags="$CFLAGS"
12911 cf_check_cppflags="$CPPFLAGS"
12916 cf_new_extra_cppflags=
12918 for cf_add_cflags in $X_CFLAGS
12920 case $cf_fix_cppflags in
12922 case $cf_add_cflags in
12923 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12924 case $cf_add_cflags in
12926 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12929 && test -z "${cf_tst_cflags}" \
12930 && cf_fix_cppflags=yes
12932 if test $cf_fix_cppflags = yes ; then
12933 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12935 elif test "${cf_tst_cflags}" = "\"'" ; then
12936 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12941 case "$CPPFLAGS" in
12945 case $cf_add_cflags in
12947 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12949 CPPFLAGS=`echo "$CPPFLAGS" | \
12950 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12951 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12955 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12960 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12965 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12967 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12970 && test -z "${cf_tst_cflags}" \
12971 && cf_fix_cppflags=no
12976 if test -n "$cf_new_cflags" ; then
12977 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12979 echo "${as_me:-configure}:12979: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12981 CFLAGS="$CFLAGS $cf_new_cflags"
12984 if test -n "$cf_new_cppflags" ; then
12985 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12987 echo "${as_me:-configure}:12987: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12989 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12992 if test -n "$cf_new_extra_cppflags" ; then
12993 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12995 echo "${as_me:-configure}:12995: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12997 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13000 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13001 cat >conftest.$ac_ext <<_ACEOF
13002 #line 13002 "configure"
13003 #include "confdefs.h"
13008 printf("Hello world");
13013 rm -f conftest.$ac_objext conftest$ac_exeext
13014 if { (eval echo "$as_me:13014: \"$ac_link\"") >&5
13015 (eval $ac_link) 2>&5
13017 echo "$as_me:13017: \$? = $ac_status" >&5
13018 (exit $ac_status); } &&
13019 { ac_try='test -s conftest$ac_exeext'
13020 { (eval echo "$as_me:13020: \"$ac_try\"") >&5
13021 (eval $ac_try) 2>&5
13023 echo "$as_me:13023: \$? = $ac_status" >&5
13024 (exit $ac_status); }; }; then
13027 echo "$as_me: failed program was:" >&5
13028 cat conftest.$ac_ext >&5
13029 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13031 echo "${as_me:-configure}:13031: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13033 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13034 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13036 echo "${as_me:-configure}:13036: testing but keeping change to \$CPPFLAGS ..." 1>&5
13039 CFLAGS="$cf_check_flags"
13041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13044 echo "$as_me:13044: checking for XOpenDisplay in -lX11" >&5
13045 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13046 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13047 echo $ECHO_N "(cached) $ECHO_C" >&6
13049 ac_check_lib_save_LIBS=$LIBS
13050 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13051 cat >conftest.$ac_ext <<_ACEOF
13052 #line 13052 "configure"
13053 #include "confdefs.h"
13055 /* Override any gcc2 internal prototype to avoid an error. */
13059 /* We use char because int might match the return type of a gcc2
13060 builtin and then its argument prototype would still apply. */
13061 char XOpenDisplay ();
13070 rm -f conftest.$ac_objext conftest$ac_exeext
13071 if { (eval echo "$as_me:13071: \"$ac_link\"") >&5
13072 (eval $ac_link) 2>&5
13074 echo "$as_me:13074: \$? = $ac_status" >&5
13075 (exit $ac_status); } &&
13076 { ac_try='test -s conftest$ac_exeext'
13077 { (eval echo "$as_me:13077: \"$ac_try\"") >&5
13078 (eval $ac_try) 2>&5
13080 echo "$as_me:13080: \$? = $ac_status" >&5
13081 (exit $ac_status); }; }; then
13082 ac_cv_lib_X11_XOpenDisplay=yes
13084 echo "$as_me: failed program was:" >&5
13085 cat conftest.$ac_ext >&5
13086 ac_cv_lib_X11_XOpenDisplay=no
13088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13089 LIBS=$ac_check_lib_save_LIBS
13091 echo "$as_me:13091: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13092 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13093 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13095 cf_add_libs="-lX11"
13096 # Filter out duplicates - this happens with badly-designed ".pc" files...
13097 for cf_add_1lib in $LIBS
13099 for cf_add_2lib in $cf_add_libs
13101 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13107 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13109 LIBS="$cf_add_libs"
13113 echo "$as_me:13113: checking for XCurses library" >&5
13114 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13115 if test "${cf_cv_lib_XCurses+set}" = set; then
13116 echo $ECHO_N "(cached) $ECHO_C" >&6
13119 cf_add_libs="-lXCurses"
13120 # Filter out duplicates - this happens with badly-designed ".pc" files...
13121 for cf_add_1lib in $LIBS
13123 for cf_add_2lib in $cf_add_libs
13125 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13131 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13133 LIBS="$cf_add_libs"
13135 cat >conftest.$ac_ext <<_ACEOF
13136 #line 13136 "configure"
13137 #include "confdefs.h"
13139 #include <xcurses.h>
13140 char *XCursesProgramName = "test";
13150 rm -f conftest.$ac_objext conftest$ac_exeext
13151 if { (eval echo "$as_me:13151: \"$ac_link\"") >&5
13152 (eval $ac_link) 2>&5
13154 echo "$as_me:13154: \$? = $ac_status" >&5
13155 (exit $ac_status); } &&
13156 { ac_try='test -s conftest$ac_exeext'
13157 { (eval echo "$as_me:13157: \"$ac_try\"") >&5
13158 (eval $ac_try) 2>&5
13160 echo "$as_me:13160: \$? = $ac_status" >&5
13161 (exit $ac_status); }; }; then
13162 cf_cv_lib_XCurses=yes
13164 echo "$as_me: failed program was:" >&5
13165 cat conftest.$ac_ext >&5
13166 cf_cv_lib_XCurses=no
13168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13171 echo "$as_me:13171: result: $cf_cv_lib_XCurses" >&5
13172 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13176 if test $cf_cv_lib_XCurses = yes ; then
13178 cat >>confdefs.h <<\EOF
13182 cat >>confdefs.h <<\EOF
13186 echo "$as_me:13186: checking for xcurses.h" >&5
13187 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13188 if test "${ac_cv_header_xcurses_h+set}" = set; then
13189 echo $ECHO_N "(cached) $ECHO_C" >&6
13191 cat >conftest.$ac_ext <<_ACEOF
13192 #line 13192 "configure"
13193 #include "confdefs.h"
13194 #include <xcurses.h>
13196 if { (eval echo "$as_me:13196: \"$ac_cpp conftest.$ac_ext\"") >&5
13197 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13199 egrep -v '^ *\+' conftest.er1 >conftest.err
13201 cat conftest.err >&5
13202 echo "$as_me:13202: \$? = $ac_status" >&5
13203 (exit $ac_status); } >/dev/null; then
13204 if test -s conftest.err; then
13205 ac_cpp_err=$ac_c_preproc_warn_flag
13212 if test -z "$ac_cpp_err"; then
13213 ac_cv_header_xcurses_h=yes
13215 echo "$as_me: failed program was:" >&5
13216 cat conftest.$ac_ext >&5
13217 ac_cv_header_xcurses_h=no
13219 rm -f conftest.err conftest.$ac_ext
13221 echo "$as_me:13221: result: $ac_cv_header_xcurses_h" >&5
13222 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13223 if test $ac_cv_header_xcurses_h = yes; then
13225 cat >>confdefs.h <<\EOF
13226 #define HAVE_XCURSES 1
13232 { { echo "$as_me:13232: error: Cannot link with XCurses" >&5
13233 echo "$as_me: error: Cannot link with XCurses" >&2;}
13234 { (exit 1); exit 1; }; }
13239 { { echo "$as_me:13239: error: unexpected screen-value: $cf_cv_screen" >&5
13240 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13241 { (exit 1); exit 1; }; }
13245 : ${cf_nculib_root:=$cf_cv_screen}
13246 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13247 echo "$as_me:13247: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13248 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13249 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
13252 ac_check_lib_save_LIBS=$LIBS
13253 LIBS="-l$cf_nculib_root $LIBS"
13254 cat >conftest.$ac_ext <<_ACEOF
13255 #line 13255 "configure"
13256 #include "confdefs.h"
13258 /* Override any gcc2 internal prototype to avoid an error. */
13262 /* We use char because int might match the return type of a gcc2
13263 builtin and then its argument prototype would still apply. */
13264 char _nc_init_pthreads ();
13268 _nc_init_pthreads ();
13273 rm -f conftest.$ac_objext conftest$ac_exeext
13274 if { (eval echo "$as_me:13274: \"$ac_link\"") >&5
13275 (eval $ac_link) 2>&5
13277 echo "$as_me:13277: \$? = $ac_status" >&5
13278 (exit $ac_status); } &&
13279 { ac_try='test -s conftest$ac_exeext'
13280 { (eval echo "$as_me:13280: \"$ac_try\"") >&5
13281 (eval $ac_try) 2>&5
13283 echo "$as_me:13283: \$? = $ac_status" >&5
13284 (exit $ac_status); }; }; then
13285 eval "$as_ac_Lib=yes"
13287 echo "$as_me: failed program was:" >&5
13288 cat conftest.$ac_ext >&5
13289 eval "$as_ac_Lib=no"
13291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13292 LIBS=$ac_check_lib_save_LIBS
13294 echo "$as_me:13294: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13295 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13296 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13297 cf_cv_ncurses_pthreads=yes
13299 cf_cv_ncurses_pthreads=no
13302 if test "$cf_cv_ncurses_pthreads" = yes
13305 cf_add_libs="-lpthread"
13306 # Filter out duplicates - this happens with badly-designed ".pc" files...
13307 for cf_add_1lib in $LIBS
13309 for cf_add_2lib in $cf_add_libs
13311 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13317 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13319 LIBS="$cf_add_libs"
13323 case $cf_cv_screen in
13325 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13329 echo "$as_me:13329: checking for NetBSD form.h" >&5
13330 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13331 if test "${cf_cv_netbsd_form_h+set}" = set; then
13332 echo $ECHO_N "(cached) $ECHO_C" >&6
13335 cat >conftest.$ac_ext <<_ACEOF
13336 #line 13336 "configure"
13337 #include "confdefs.h"
13339 #include <${cf_cv_ncurses_header:-curses.h}>
13347 int y = current_field(form)->cursor_ypos;
13348 int x = current_field(form)->cursor_xpos;
13354 rm -f conftest.$ac_objext
13355 if { (eval echo "$as_me:13355: \"$ac_compile\"") >&5
13356 (eval $ac_compile) 2>&5
13358 echo "$as_me:13358: \$? = $ac_status" >&5
13359 (exit $ac_status); } &&
13360 { ac_try='test -s conftest.$ac_objext'
13361 { (eval echo "$as_me:13361: \"$ac_try\"") >&5
13362 (eval $ac_try) 2>&5
13364 echo "$as_me:13364: \$? = $ac_status" >&5
13365 (exit $ac_status); }; }; then
13366 cf_cv_netbsd_form_h=yes
13369 echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 cf_cv_netbsd_form_h=no
13373 rm -f conftest.$ac_objext conftest.$ac_ext
13376 echo "$as_me:13376: result: $cf_cv_netbsd_form_h" >&5
13377 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13379 test "$cf_cv_netbsd_form_h" = yes &&
13380 cat >>confdefs.h <<\EOF
13381 #define HAVE_NETBSD_FORM_H 1
13384 echo "$as_me:13384: checking for NetBSD menu.h" >&5
13385 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13386 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13387 echo $ECHO_N "(cached) $ECHO_C" >&6
13390 cat >conftest.$ac_ext <<_ACEOF
13391 #line 13391 "configure"
13392 #include "confdefs.h"
13394 #include <${cf_cv_ncurses_header:-curses.h}>
13402 int y = menu->max_item_width;
13408 rm -f conftest.$ac_objext
13409 if { (eval echo "$as_me:13409: \"$ac_compile\"") >&5
13410 (eval $ac_compile) 2>&5
13412 echo "$as_me:13412: \$? = $ac_status" >&5
13413 (exit $ac_status); } &&
13414 { ac_try='test -s conftest.$ac_objext'
13415 { (eval echo "$as_me:13415: \"$ac_try\"") >&5
13416 (eval $ac_try) 2>&5
13418 echo "$as_me:13418: \$? = $ac_status" >&5
13419 (exit $ac_status); }; }; then
13420 cf_cv_netbsd_menu_h=yes
13423 echo "$as_me: failed program was:" >&5
13424 cat conftest.$ac_ext >&5
13425 cf_cv_netbsd_menu_h=no
13427 rm -f conftest.$ac_objext conftest.$ac_ext
13430 echo "$as_me:13430: result: $cf_cv_netbsd_menu_h" >&5
13431 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13433 test "$cf_cv_netbsd_menu_h" = yes &&
13434 cat >>confdefs.h <<\EOF
13435 #define HAVE_NETBSD_MENU_H 1
13441 case $cf_cv_screen in
13445 # look for curses-related libraries
13447 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13448 echo "$as_me:13448: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13449 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13450 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13451 echo $ECHO_N "(cached) $ECHO_C" >&6
13453 ac_check_lib_save_LIBS=$LIBS
13454 LIBS="-lpanel$cf_cv_libtype $LIBS"
13455 cat >conftest.$ac_ext <<_ACEOF
13456 #line 13456 "configure"
13457 #include "confdefs.h"
13459 /* Override any gcc2 internal prototype to avoid an error. */
13463 /* We use char because int might match the return type of a gcc2
13464 builtin and then its argument prototype would still apply. */
13474 rm -f conftest.$ac_objext conftest$ac_exeext
13475 if { (eval echo "$as_me:13475: \"$ac_link\"") >&5
13476 (eval $ac_link) 2>&5
13478 echo "$as_me:13478: \$? = $ac_status" >&5
13479 (exit $ac_status); } &&
13480 { ac_try='test -s conftest$ac_exeext'
13481 { (eval echo "$as_me:13481: \"$ac_try\"") >&5
13482 (eval $ac_try) 2>&5
13484 echo "$as_me:13484: \$? = $ac_status" >&5
13485 (exit $ac_status); }; }; then
13486 eval "$as_ac_Lib=yes"
13488 echo "$as_me: failed program was:" >&5
13489 cat conftest.$ac_ext >&5
13490 eval "$as_ac_Lib=no"
13492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13493 LIBS=$ac_check_lib_save_LIBS
13495 echo "$as_me:13495: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13496 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13497 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13499 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13501 cf_add_libs="-lpanel$cf_cv_libtype"
13502 # Filter out duplicates - this happens with badly-designed ".pc" files...
13503 for cf_add_1lib in $LIBS
13505 for cf_add_2lib in $cf_add_libs
13507 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13515 LIBS="$cf_add_libs"
13517 cat >>confdefs.h <<EOF
13518 #define $cf_upper 1
13523 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13524 echo "$as_me:13524: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13525 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13526 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13527 echo $ECHO_N "(cached) $ECHO_C" >&6
13529 ac_check_lib_save_LIBS=$LIBS
13530 LIBS="-lmenu$cf_cv_libtype $LIBS"
13531 cat >conftest.$ac_ext <<_ACEOF
13532 #line 13532 "configure"
13533 #include "confdefs.h"
13535 /* Override any gcc2 internal prototype to avoid an error. */
13539 /* We use char because int might match the return type of a gcc2
13540 builtin and then its argument prototype would still apply. */
13541 char menu_driver ();
13550 rm -f conftest.$ac_objext conftest$ac_exeext
13551 if { (eval echo "$as_me:13551: \"$ac_link\"") >&5
13552 (eval $ac_link) 2>&5
13554 echo "$as_me:13554: \$? = $ac_status" >&5
13555 (exit $ac_status); } &&
13556 { ac_try='test -s conftest$ac_exeext'
13557 { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558 (eval $ac_try) 2>&5
13560 echo "$as_me:13560: \$? = $ac_status" >&5
13561 (exit $ac_status); }; }; then
13562 eval "$as_ac_Lib=yes"
13564 echo "$as_me: failed program was:" >&5
13565 cat conftest.$ac_ext >&5
13566 eval "$as_ac_Lib=no"
13568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13569 LIBS=$ac_check_lib_save_LIBS
13571 echo "$as_me:13571: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13572 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13573 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13575 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13577 cf_add_libs="-lmenu$cf_cv_libtype"
13578 # Filter out duplicates - this happens with badly-designed ".pc" files...
13579 for cf_add_1lib in $LIBS
13581 for cf_add_2lib in $cf_add_libs
13583 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13589 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13591 LIBS="$cf_add_libs"
13593 cat >>confdefs.h <<EOF
13594 #define $cf_upper 1
13599 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13600 echo "$as_me:13600: checking for form_driver in -lform$cf_cv_libtype" >&5
13601 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13602 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13603 echo $ECHO_N "(cached) $ECHO_C" >&6
13605 ac_check_lib_save_LIBS=$LIBS
13606 LIBS="-lform$cf_cv_libtype $LIBS"
13607 cat >conftest.$ac_ext <<_ACEOF
13608 #line 13608 "configure"
13609 #include "confdefs.h"
13611 /* Override any gcc2 internal prototype to avoid an error. */
13615 /* We use char because int might match the return type of a gcc2
13616 builtin and then its argument prototype would still apply. */
13617 char form_driver ();
13626 rm -f conftest.$ac_objext conftest$ac_exeext
13627 if { (eval echo "$as_me:13627: \"$ac_link\"") >&5
13628 (eval $ac_link) 2>&5
13630 echo "$as_me:13630: \$? = $ac_status" >&5
13631 (exit $ac_status); } &&
13632 { ac_try='test -s conftest$ac_exeext'
13633 { (eval echo "$as_me:13633: \"$ac_try\"") >&5
13634 (eval $ac_try) 2>&5
13636 echo "$as_me:13636: \$? = $ac_status" >&5
13637 (exit $ac_status); }; }; then
13638 eval "$as_ac_Lib=yes"
13640 echo "$as_me: failed program was:" >&5
13641 cat conftest.$ac_ext >&5
13642 eval "$as_ac_Lib=no"
13644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13645 LIBS=$ac_check_lib_save_LIBS
13647 echo "$as_me:13647: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13648 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13649 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13651 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13653 cf_add_libs="-lform$cf_cv_libtype"
13654 # Filter out duplicates - this happens with badly-designed ".pc" files...
13655 for cf_add_1lib in $LIBS
13657 for cf_add_2lib in $cf_add_libs
13659 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13665 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13667 LIBS="$cf_add_libs"
13669 cat >>confdefs.h <<EOF
13670 #define $cf_upper 1
13675 # look for curses-related headers
13686 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13687 echo "$as_me:13687: checking for $ac_header" >&5
13688 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13689 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13690 echo $ECHO_N "(cached) $ECHO_C" >&6
13692 cat >conftest.$ac_ext <<_ACEOF
13693 #line 13693 "configure"
13694 #include "confdefs.h"
13695 #include <$ac_header>
13697 if { (eval echo "$as_me:13697: \"$ac_cpp conftest.$ac_ext\"") >&5
13698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13700 egrep -v '^ *\+' conftest.er1 >conftest.err
13702 cat conftest.err >&5
13703 echo "$as_me:13703: \$? = $ac_status" >&5
13704 (exit $ac_status); } >/dev/null; then
13705 if test -s conftest.err; then
13706 ac_cpp_err=$ac_c_preproc_warn_flag
13713 if test -z "$ac_cpp_err"; then
13714 eval "$as_ac_Header=yes"
13716 echo "$as_me: failed program was:" >&5
13717 cat conftest.$ac_ext >&5
13718 eval "$as_ac_Header=no"
13720 rm -f conftest.err conftest.$ac_ext
13722 echo "$as_me:13722: result: `eval echo '${'$as_ac_Header'}'`" >&5
13723 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13724 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13725 cat >>confdefs.h <<EOF
13726 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13735 echo "$as_me:13735: checking for ANSI C header files" >&5
13736 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13737 if test "${ac_cv_header_stdc+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
13740 cat >conftest.$ac_ext <<_ACEOF
13741 #line 13741 "configure"
13742 #include "confdefs.h"
13743 #include <stdlib.h>
13744 #include <stdarg.h>
13745 #include <string.h>
13749 if { (eval echo "$as_me:13749: \"$ac_cpp conftest.$ac_ext\"") >&5
13750 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13752 egrep -v '^ *\+' conftest.er1 >conftest.err
13754 cat conftest.err >&5
13755 echo "$as_me:13755: \$? = $ac_status" >&5
13756 (exit $ac_status); } >/dev/null; then
13757 if test -s conftest.err; then
13758 ac_cpp_err=$ac_c_preproc_warn_flag
13765 if test -z "$ac_cpp_err"; then
13766 ac_cv_header_stdc=yes
13768 echo "$as_me: failed program was:" >&5
13769 cat conftest.$ac_ext >&5
13770 ac_cv_header_stdc=no
13772 rm -f conftest.err conftest.$ac_ext
13774 if test $ac_cv_header_stdc = yes; then
13775 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13776 cat >conftest.$ac_ext <<_ACEOF
13777 #line 13777 "configure"
13778 #include "confdefs.h"
13779 #include <string.h>
13782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13783 egrep "memchr" >/dev/null 2>&1; then
13786 ac_cv_header_stdc=no
13792 if test $ac_cv_header_stdc = yes; then
13793 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13794 cat >conftest.$ac_ext <<_ACEOF
13795 #line 13795 "configure"
13796 #include "confdefs.h"
13797 #include <stdlib.h>
13800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13801 egrep "free" >/dev/null 2>&1; then
13804 ac_cv_header_stdc=no
13810 if test $ac_cv_header_stdc = yes; then
13811 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13812 if test "$cross_compiling" = yes; then
13815 cat >conftest.$ac_ext <<_ACEOF
13816 #line 13816 "configure"
13817 #include "confdefs.h"
13819 #if ((' ' & 0x0FF) == 0x020)
13820 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13821 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13823 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13824 || ('j' <= (c) && (c) <= 'r') \
13825 || ('s' <= (c) && (c) <= 'z'))
13826 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13829 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13834 for (i = 0; i < 256; i++)
13835 if (XOR (islower (i), ISLOWER (i))
13836 || toupper (i) != TOUPPER (i))
13837 $ac_main_return(2);
13838 $ac_main_return (0);
13841 rm -f conftest$ac_exeext
13842 if { (eval echo "$as_me:13842: \"$ac_link\"") >&5
13843 (eval $ac_link) 2>&5
13845 echo "$as_me:13845: \$? = $ac_status" >&5
13846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13847 { (eval echo "$as_me:13847: \"$ac_try\"") >&5
13848 (eval $ac_try) 2>&5
13850 echo "$as_me:13850: \$? = $ac_status" >&5
13851 (exit $ac_status); }; }; then
13854 echo "$as_me: program exited with status $ac_status" >&5
13855 echo "$as_me: failed program was:" >&5
13856 cat conftest.$ac_ext >&5
13857 ac_cv_header_stdc=no
13859 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13863 echo "$as_me:13863: result: $ac_cv_header_stdc" >&5
13864 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13865 if test $ac_cv_header_stdc = yes; then
13867 cat >>confdefs.h <<\EOF
13868 #define STDC_HEADERS 1
13873 echo "$as_me:13873: checking whether time.h and sys/time.h may both be included" >&5
13874 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13875 if test "${ac_cv_header_time+set}" = set; then
13876 echo $ECHO_N "(cached) $ECHO_C" >&6
13878 cat >conftest.$ac_ext <<_ACEOF
13879 #line 13879 "configure"
13880 #include "confdefs.h"
13881 #include <sys/types.h>
13882 #include <sys/time.h>
13888 if ((struct tm *) 0)
13894 rm -f conftest.$ac_objext
13895 if { (eval echo "$as_me:13895: \"$ac_compile\"") >&5
13896 (eval $ac_compile) 2>&5
13898 echo "$as_me:13898: \$? = $ac_status" >&5
13899 (exit $ac_status); } &&
13900 { ac_try='test -s conftest.$ac_objext'
13901 { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902 (eval $ac_try) 2>&5
13904 echo "$as_me:13904: \$? = $ac_status" >&5
13905 (exit $ac_status); }; }; then
13906 ac_cv_header_time=yes
13908 echo "$as_me: failed program was:" >&5
13909 cat conftest.$ac_ext >&5
13910 ac_cv_header_time=no
13912 rm -f conftest.$ac_objext conftest.$ac_ext
13914 echo "$as_me:13914: result: $ac_cv_header_time" >&5
13915 echo "${ECHO_T}$ac_cv_header_time" >&6
13916 if test $ac_cv_header_time = yes; then
13918 cat >>confdefs.h <<\EOF
13919 #define TIME_WITH_SYS_TIME 1
13936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13937 echo "$as_me:13937: checking for $ac_header" >&5
13938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13940 echo $ECHO_N "(cached) $ECHO_C" >&6
13942 cat >conftest.$ac_ext <<_ACEOF
13943 #line 13943 "configure"
13944 #include "confdefs.h"
13945 #include <$ac_header>
13947 if { (eval echo "$as_me:13947: \"$ac_cpp conftest.$ac_ext\"") >&5
13948 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13950 egrep -v '^ *\+' conftest.er1 >conftest.err
13952 cat conftest.err >&5
13953 echo "$as_me:13953: \$? = $ac_status" >&5
13954 (exit $ac_status); } >/dev/null; then
13955 if test -s conftest.err; then
13956 ac_cpp_err=$ac_c_preproc_warn_flag
13963 if test -z "$ac_cpp_err"; then
13964 eval "$as_ac_Header=yes"
13966 echo "$as_me: failed program was:" >&5
13967 cat conftest.$ac_ext >&5
13968 eval "$as_ac_Header=no"
13970 rm -f conftest.err conftest.$ac_ext
13972 echo "$as_me:13972: result: `eval echo '${'$as_ac_Header'}'`" >&5
13973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13974 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13975 cat >>confdefs.h <<EOF
13976 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13982 for ac_header in unistd.h getopt.h
13984 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13985 echo "$as_me:13985: checking for $ac_header" >&5
13986 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13987 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13988 echo $ECHO_N "(cached) $ECHO_C" >&6
13990 cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 #include <$ac_header>
13995 if { (eval echo "$as_me:13995: \"$ac_cpp conftest.$ac_ext\"") >&5
13996 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13998 egrep -v '^ *\+' conftest.er1 >conftest.err
14000 cat conftest.err >&5
14001 echo "$as_me:14001: \$? = $ac_status" >&5
14002 (exit $ac_status); } >/dev/null; then
14003 if test -s conftest.err; then
14004 ac_cpp_err=$ac_c_preproc_warn_flag
14011 if test -z "$ac_cpp_err"; then
14012 eval "$as_ac_Header=yes"
14014 echo "$as_me: failed program was:" >&5
14015 cat conftest.$ac_ext >&5
14016 eval "$as_ac_Header=no"
14018 rm -f conftest.err conftest.$ac_ext
14020 echo "$as_me:14020: result: `eval echo '${'$as_ac_Header'}'`" >&5
14021 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14022 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14023 cat >>confdefs.h <<EOF
14024 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14030 echo "$as_me:14030: checking for header declaring getopt variables" >&5
14031 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14032 if test "${cf_cv_getopt_header+set}" = set; then
14033 echo $ECHO_N "(cached) $ECHO_C" >&6
14036 cf_cv_getopt_header=none
14037 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14039 cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14043 #include <$cf_header>
14047 int x = optind; char *y = optarg
14052 rm -f conftest.$ac_objext
14053 if { (eval echo "$as_me:14053: \"$ac_compile\"") >&5
14054 (eval $ac_compile) 2>&5
14056 echo "$as_me:14056: \$? = $ac_status" >&5
14057 (exit $ac_status); } &&
14058 { ac_try='test -s conftest.$ac_objext'
14059 { (eval echo "$as_me:14059: \"$ac_try\"") >&5
14060 (eval $ac_try) 2>&5
14062 echo "$as_me:14062: \$? = $ac_status" >&5
14063 (exit $ac_status); }; }; then
14064 cf_cv_getopt_header=$cf_header
14067 echo "$as_me: failed program was:" >&5
14068 cat conftest.$ac_ext >&5
14070 rm -f conftest.$ac_objext conftest.$ac_ext
14074 echo "$as_me:14074: result: $cf_cv_getopt_header" >&5
14075 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14076 if test $cf_cv_getopt_header != none ; then
14078 cat >>confdefs.h <<\EOF
14079 #define HAVE_GETOPT_HEADER 1
14083 if test $cf_cv_getopt_header = getopt.h ; then
14085 cat >>confdefs.h <<\EOF
14086 #define NEED_GETOPT_H 1
14096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14097 echo "$as_me:14097: checking for $ac_func" >&5
14098 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14099 if eval "test \"\${$as_ac_var+set}\" = set"; then
14100 echo $ECHO_N "(cached) $ECHO_C" >&6
14102 cat >conftest.$ac_ext <<_ACEOF
14103 #line 14103 "configure"
14104 #include "confdefs.h"
14105 /* System header to define __stub macros and hopefully few prototypes,
14106 which can conflict with char $ac_func (); below. */
14107 #include <assert.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. */
14120 /* The GNU C library defines this for functions which it implements
14121 to always fail with ENOSYS. Some functions are actually named
14122 something starting with __ and the normal name is an alias. */
14123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14126 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14133 rm -f conftest.$ac_objext conftest$ac_exeext
14134 if { (eval echo "$as_me:14134: \"$ac_link\"") >&5
14135 (eval $ac_link) 2>&5
14137 echo "$as_me:14137: \$? = $ac_status" >&5
14138 (exit $ac_status); } &&
14139 { ac_try='test -s conftest$ac_exeext'
14140 { (eval echo "$as_me:14140: \"$ac_try\"") >&5
14141 (eval $ac_try) 2>&5
14143 echo "$as_me:14143: \$? = $ac_status" >&5
14144 (exit $ac_status); }; }; then
14145 eval "$as_ac_var=yes"
14147 echo "$as_me: failed program was:" >&5
14148 cat conftest.$ac_ext >&5
14149 eval "$as_ac_var=no"
14151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14153 echo "$as_me:14153: result: `eval echo '${'$as_ac_var'}'`" >&5
14154 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14155 if test `eval echo '${'$as_ac_var'}'` = yes; then
14156 cat >>confdefs.h <<EOF
14157 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14163 if test "x$ac_cv_func_getopt" = xno; then
14164 { { echo "$as_me:14164: error: getopt is required for building programs" >&5
14165 echo "$as_me: error: getopt is required for building programs" >&2;}
14166 { (exit 1); exit 1; }; }
14169 if test "$cf_enable_widec" = yes; then
14182 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14183 echo "$as_me:14183: checking for $ac_func" >&5
14184 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14185 if eval "test \"\${$as_ac_var+set}\" = set"; then
14186 echo $ECHO_N "(cached) $ECHO_C" >&6
14188 cat >conftest.$ac_ext <<_ACEOF
14189 #line 14189 "configure"
14190 #include "confdefs.h"
14191 /* System header to define __stub macros and hopefully few prototypes,
14192 which can conflict with char $ac_func (); below. */
14193 #include <assert.h>
14194 /* Override any gcc2 internal prototype to avoid an error. */
14198 /* We use char because int might match the return type of a gcc2
14199 builtin and then its argument prototype would still apply. */
14206 /* The GNU C library defines this for functions which it implements
14207 to always fail with ENOSYS. Some functions are actually named
14208 something starting with __ and the normal name is an alias. */
14209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14212 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14219 rm -f conftest.$ac_objext conftest$ac_exeext
14220 if { (eval echo "$as_me:14220: \"$ac_link\"") >&5
14221 (eval $ac_link) 2>&5
14223 echo "$as_me:14223: \$? = $ac_status" >&5
14224 (exit $ac_status); } &&
14225 { ac_try='test -s conftest$ac_exeext'
14226 { (eval echo "$as_me:14226: \"$ac_try\"") >&5
14227 (eval $ac_try) 2>&5
14229 echo "$as_me:14229: \$? = $ac_status" >&5
14230 (exit $ac_status); }; }; then
14231 eval "$as_ac_var=yes"
14233 echo "$as_me: failed program was:" >&5
14234 cat conftest.$ac_ext >&5
14235 eval "$as_ac_var=no"
14237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14239 echo "$as_me:14239: result: `eval echo '${'$as_ac_var'}'`" >&5
14240 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14241 if test `eval echo '${'$as_ac_var'}'` = yes; then
14242 cat >>confdefs.h <<EOF
14243 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14251 echo "$as_me:14251: checking definition to turn on extended curses functions" >&5
14252 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14253 if test "${cf_cv_need_xopen_extension+set}" = set; then
14254 echo $ECHO_N "(cached) $ECHO_C" >&6
14257 cf_cv_need_xopen_extension=unknown
14258 cat >conftest.$ac_ext <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14262 #include <stdlib.h>
14263 #include <${cf_cv_ncurses_header:-curses.h}>
14268 #if defined(NCURSES_VERSION_PATCH)
14269 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14273 #ifdef NCURSES_VERSION
14275 int check2 = curs_set((int)sizeof(check));
14277 long x = winnstr(stdscr, "", 0);
14279 getbegyx(stdscr, y1, x1)
14284 rm -f conftest.$ac_objext conftest$ac_exeext
14285 if { (eval echo "$as_me:14285: \"$ac_link\"") >&5
14286 (eval $ac_link) 2>&5
14288 echo "$as_me:14288: \$? = $ac_status" >&5
14289 (exit $ac_status); } &&
14290 { ac_try='test -s conftest$ac_exeext'
14291 { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292 (eval $ac_try) 2>&5
14294 echo "$as_me:14294: \$? = $ac_status" >&5
14295 (exit $ac_status); }; }; then
14296 cf_cv_need_xopen_extension=none
14298 echo "$as_me: failed program was:" >&5
14299 cat conftest.$ac_ext >&5
14301 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14303 cat >conftest.$ac_ext <<_ACEOF
14304 #line 14304 "configure"
14305 #include "confdefs.h"
14307 #define $cf_try_xopen_extension 1
14308 #include <stdlib.h>
14309 #include <${cf_cv_ncurses_header:-curses.h}>
14314 #ifdef NCURSES_VERSION
14316 int check2 = curs_set((int)sizeof(check));
14318 long x = winnstr(stdscr, "", 0);
14320 getbegyx(stdscr, y1, x1)
14325 rm -f conftest.$ac_objext conftest$ac_exeext
14326 if { (eval echo "$as_me:14326: \"$ac_link\"") >&5
14327 (eval $ac_link) 2>&5
14329 echo "$as_me:14329: \$? = $ac_status" >&5
14330 (exit $ac_status); } &&
14331 { ac_try='test -s conftest$ac_exeext'
14332 { (eval echo "$as_me:14332: \"$ac_try\"") >&5
14333 (eval $ac_try) 2>&5
14335 echo "$as_me:14335: \$? = $ac_status" >&5
14336 (exit $ac_status); }; }; then
14337 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14339 echo "$as_me: failed program was:" >&5
14340 cat conftest.$ac_ext >&5
14342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14349 echo "$as_me:14349: result: $cf_cv_need_xopen_extension" >&5
14350 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14352 case $cf_cv_need_xopen_extension in
14354 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14358 echo "$as_me:14358: checking for term.h" >&5
14359 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14360 if test "${cf_cv_term_header+set}" = set; then
14361 echo $ECHO_N "(cached) $ECHO_C" >&6
14364 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14365 # for <term.h> if we do not find the variant.
14367 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14369 case ${cf_cv_ncurses_header:-curses.h} in
14371 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14372 cf_header_list="$cf_header_item $cf_header_list"
14376 for cf_header in $cf_header_list
14378 cat >conftest.$ac_ext <<_ACEOF
14379 #line 14379 "configure"
14380 #include "confdefs.h"
14382 #include <${cf_cv_ncurses_header:-curses.h}>
14383 #include <${cf_header}>
14392 rm -f conftest.$ac_objext
14393 if { (eval echo "$as_me:14393: \"$ac_compile\"") >&5
14394 (eval $ac_compile) 2>&5
14396 echo "$as_me:14396: \$? = $ac_status" >&5
14397 (exit $ac_status); } &&
14398 { ac_try='test -s conftest.$ac_objext'
14399 { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400 (eval $ac_try) 2>&5
14402 echo "$as_me:14402: \$? = $ac_status" >&5
14403 (exit $ac_status); }; }; then
14404 cf_cv_term_header=$cf_header
14407 echo "$as_me: failed program was:" >&5
14408 cat conftest.$ac_ext >&5
14409 cf_cv_term_header=no
14411 rm -f conftest.$ac_objext conftest.$ac_ext
14414 case $cf_cv_term_header in
14416 # If curses is ncurses, some packagers still mess it up by trying to make
14417 # us use GNU termcap. This handles the most common case.
14418 for cf_header in ncurses/term.h ncursesw/term.h
14420 cat >conftest.$ac_ext <<_ACEOF
14421 #line 14421 "configure"
14422 #include "confdefs.h"
14424 #include <${cf_cv_ncurses_header:-curses.h}>
14425 #ifdef NCURSES_VERSION
14426 #include <${cf_header}>
14438 rm -f conftest.$ac_objext
14439 if { (eval echo "$as_me:14439: \"$ac_compile\"") >&5
14440 (eval $ac_compile) 2>&5
14442 echo "$as_me:14442: \$? = $ac_status" >&5
14443 (exit $ac_status); } &&
14444 { ac_try='test -s conftest.$ac_objext'
14445 { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446 (eval $ac_try) 2>&5
14448 echo "$as_me:14448: \$? = $ac_status" >&5
14449 (exit $ac_status); }; }; then
14450 cf_cv_term_header=$cf_header
14453 echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 cf_cv_term_header=no
14457 rm -f conftest.$ac_objext conftest.$ac_ext
14463 echo "$as_me:14463: result: $cf_cv_term_header" >&5
14464 echo "${ECHO_T}$cf_cv_term_header" >&6
14466 case $cf_cv_term_header in
14469 cat >>confdefs.h <<\EOF
14470 #define HAVE_TERM_H 1
14476 cat >>confdefs.h <<\EOF
14477 #define HAVE_NCURSES_TERM_H 1
14483 cat >>confdefs.h <<\EOF
14484 #define HAVE_NCURSESW_TERM_H 1
14490 echo "$as_me:14490: checking for unctrl.h" >&5
14491 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14492 if test "${cf_cv_unctrl_header+set}" = set; then
14493 echo $ECHO_N "(cached) $ECHO_C" >&6
14496 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14497 # for <unctrl.h> if we do not find the variant.
14499 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14501 case ${cf_cv_ncurses_header:-curses.h} in
14503 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14504 cf_header_list="$cf_header_item $cf_header_list"
14508 for cf_header in $cf_header_list
14510 cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14514 #include <${cf_cv_ncurses_header:-curses.h}>
14515 #include <${cf_header}>
14524 rm -f conftest.$ac_objext
14525 if { (eval echo "$as_me:14525: \"$ac_compile\"") >&5
14526 (eval $ac_compile) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit $ac_status); } &&
14530 { ac_try='test -s conftest.$ac_objext'
14531 { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532 (eval $ac_try) 2>&5
14534 echo "$as_me:14534: \$? = $ac_status" >&5
14535 (exit $ac_status); }; }; then
14536 cf_cv_unctrl_header=$cf_header
14539 echo "$as_me: failed program was:" >&5
14540 cat conftest.$ac_ext >&5
14541 cf_cv_unctrl_header=no
14543 rm -f conftest.$ac_objext conftest.$ac_ext
14547 echo "$as_me:14547: result: $cf_cv_unctrl_header" >&5
14548 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14550 case $cf_cv_unctrl_header in
14552 { echo "$as_me:14552: WARNING: unctrl.h header not found" >&5
14553 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14557 case $cf_cv_unctrl_header in
14560 cat >>confdefs.h <<\EOF
14561 #define HAVE_UNCTRL_H 1
14567 cat >>confdefs.h <<\EOF
14568 #define HAVE_NCURSES_UNCTRL_H 1
14572 (ncursesw/unctrl.h)
14574 cat >>confdefs.h <<\EOF
14575 #define HAVE_NCURSESW_UNCTRL_H 1
14582 assume_default_colors \
14609 use_default_colors \
14611 use_extended_names \
14625 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14627 echo "$as_me:14627: checking for ${cf_func}" >&5
14628 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14630 echo "${as_me:-configure}:14630: testing ${cf_func} ..." 1>&5
14632 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14633 echo $ECHO_N "(cached) $ECHO_C" >&6
14636 eval cf_result='$ac_cv_func_'$cf_func
14637 if test ".$cf_result" != ".no"; then
14638 cat >conftest.$ac_ext <<_ACEOF
14639 #line 14639 "configure"
14640 #include "confdefs.h"
14642 #ifdef HAVE_XCURSES
14643 #include <xcurses.h>
14644 char * XCursesProgramName = "test";
14646 #include <${cf_cv_ncurses_header:-curses.h}>
14647 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14648 #include <ncursesw/term.h>
14649 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14650 #include <ncurses/term.h>
14651 #elif defined(HAVE_TERM_H)
14661 long foo = (long)(&${cf_func});
14662 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14663 if (foo + 1234 > 5678)
14664 ${cf_cv_main_return:-return}(foo);
14671 rm -f conftest.$ac_objext conftest$ac_exeext
14672 if { (eval echo "$as_me:14672: \"$ac_link\"") >&5
14673 (eval $ac_link) 2>&5
14675 echo "$as_me:14675: \$? = $ac_status" >&5
14676 (exit $ac_status); } &&
14677 { ac_try='test -s conftest$ac_exeext'
14678 { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14681 echo "$as_me:14681: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }; then
14685 echo "$as_me: failed program was:" >&5
14686 cat conftest.$ac_ext >&5
14689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14691 eval 'cf_cv_func_'$cf_func'=$cf_result'
14695 # use the computed/retrieved cache-value:
14696 eval 'cf_result=$cf_cv_func_'$cf_func
14697 echo "$as_me:14697: result: $cf_result" >&5
14698 echo "${ECHO_T}$cf_result" >&6
14699 if test $cf_result != no; then
14700 cat >>confdefs.h <<EOF
14701 #define HAVE_${cf_tr_func} 1
14707 for cf_func in tputs
14710 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14712 echo "$as_me:14712: checking for ${cf_func}" >&5
14713 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14715 echo "${as_me:-configure}:14715: testing ${cf_func} ..." 1>&5
14717 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14718 echo $ECHO_N "(cached) $ECHO_C" >&6
14721 eval cf_result='$ac_cv_func_'$cf_func
14722 if test ".$cf_result" != ".no"; then
14723 cat >conftest.$ac_ext <<_ACEOF
14724 #line 14724 "configure"
14725 #include "confdefs.h"
14727 #ifdef HAVE_XCURSES
14728 #include <xcurses.h>
14729 char * XCursesProgramName = "test";
14731 #include <${cf_cv_ncurses_header:-curses.h}>
14732 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14733 #include <ncursesw/term.h>
14734 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14735 #include <ncurses/term.h>
14736 #elif defined(HAVE_TERM_H)
14746 long foo = (long)(&${cf_func});
14747 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14748 if (foo + 1234 > 5678)
14749 ${cf_cv_main_return:-return}(foo);
14756 rm -f conftest.$ac_objext conftest$ac_exeext
14757 if { (eval echo "$as_me:14757: \"$ac_link\"") >&5
14758 (eval $ac_link) 2>&5
14760 echo "$as_me:14760: \$? = $ac_status" >&5
14761 (exit $ac_status); } &&
14762 { ac_try='test -s conftest$ac_exeext'
14763 { (eval echo "$as_me:14763: \"$ac_try\"") >&5
14764 (eval $ac_try) 2>&5
14766 echo "$as_me:14766: \$? = $ac_status" >&5
14767 (exit $ac_status); }; }; then
14770 echo "$as_me: failed program was:" >&5
14771 cat conftest.$ac_ext >&5
14774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14776 eval 'cf_cv_func_'$cf_func'=$cf_result'
14780 # use the computed/retrieved cache-value:
14781 eval 'cf_result=$cf_cv_func_'$cf_func
14782 echo "$as_me:14782: result: $cf_result" >&5
14783 echo "${ECHO_T}$cf_result" >&6
14784 if test $cf_result != no; then
14785 cat >>confdefs.h <<EOF
14786 #define HAVE_${cf_tr_func} 1
14792 if test x$cf_cv_func_tputs = xyes
14795 for cf_arg in int char
14797 for cf_ret in int void
14799 if test $cf_ret = void
14801 cf_return="/* nothing */"
14803 cf_return="return value"
14805 cat >conftest.$ac_ext <<_ACEOF
14806 #line 14806 "configure"
14807 #include "confdefs.h"
14809 #include <${cf_cv_ncurses_header:-curses.h}>
14810 #include <$cf_cv_term_header>
14812 static $cf_ret outc($cf_arg value) { $cf_return; }
14818 tputs("hello", 0, outc);
14819 ${cf_cv_main_return:-return}(0);
14825 rm -f conftest.$ac_objext
14826 if { (eval echo "$as_me:14826: \"$ac_compile\"") >&5
14827 (eval $ac_compile) 2>&5
14829 echo "$as_me:14829: \$? = $ac_status" >&5
14830 (exit $ac_status); } &&
14831 { ac_try='test -s conftest.$ac_objext'
14832 { (eval echo "$as_me:14832: \"$ac_try\"") >&5
14833 (eval $ac_try) 2>&5
14835 echo "$as_me:14835: \$? = $ac_status" >&5
14836 (exit $ac_status); }; }; then
14838 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14840 echo "${as_me:-configure}:14840: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14842 cat >>confdefs.h <<EOF
14843 #define TPUTS_ARG $cf_arg
14844 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14845 #define TPUTS_RETURN(value) $cf_return
14851 echo "$as_me: failed program was:" >&5
14852 cat conftest.$ac_ext >&5
14854 rm -f conftest.$ac_objext conftest.$ac_ext
14856 test $cf_done = yes && break
14860 echo "$as_me:14860: checking for ncurses extended functions" >&5
14861 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14862 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14863 echo $ECHO_N "(cached) $ECHO_C" >&6
14866 cat >conftest.$ac_ext <<_ACEOF
14867 #line 14867 "configure"
14868 #include "confdefs.h"
14870 #include <${cf_cv_ncurses_header:-curses.h}>
14875 int x = NCURSES_EXT_FUNCS
14881 rm -f conftest.$ac_objext
14882 if { (eval echo "$as_me:14882: \"$ac_compile\"") >&5
14883 (eval $ac_compile) 2>&5
14885 echo "$as_me:14885: \$? = $ac_status" >&5
14886 (exit $ac_status); } &&
14887 { ac_try='test -s conftest.$ac_objext'
14888 { (eval echo "$as_me:14888: \"$ac_try\"") >&5
14889 (eval $ac_try) 2>&5
14891 echo "$as_me:14891: \$? = $ac_status" >&5
14892 (exit $ac_status); }; }; then
14893 cf_cv_ncurses_ext_funcs=defined
14895 echo "$as_me: failed program was:" >&5
14896 cat conftest.$ac_ext >&5
14898 cat >conftest.$ac_ext <<_ACEOF
14899 #line 14899 "configure"
14900 #include "confdefs.h"
14902 #include <${cf_cv_ncurses_header:-curses.h}>
14907 (void) assume_default_colors (0, 0);
14908 (void) curses_version ();
14909 (void) define_key (0, 0);
14910 (void) is_term_resized (0, 0);
14911 (void) key_defined (0);
14912 (void) keybound (0, 0);
14913 (void) keyok (0, 0);
14914 (void) resize_term (0, 0);
14915 (void) resizeterm (0, 0);
14916 (void) use_default_colors ();
14917 (void) use_extended_names (0);
14918 (void) wresize (0, 0, 0);
14923 rm -f conftest.$ac_objext conftest$ac_exeext
14924 if { (eval echo "$as_me:14924: \"$ac_link\"") >&5
14925 (eval $ac_link) 2>&5
14927 echo "$as_me:14927: \$? = $ac_status" >&5
14928 (exit $ac_status); } &&
14929 { ac_try='test -s conftest$ac_exeext'
14930 { (eval echo "$as_me:14930: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14933 echo "$as_me:14933: \$? = $ac_status" >&5
14934 (exit $ac_status); }; }; then
14935 cf_cv_ncurses_ext_funcs=yes
14937 echo "$as_me: failed program was:" >&5
14938 cat conftest.$ac_ext >&5
14939 cf_cv_ncurses_ext_funcs=no
14941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14944 rm -f conftest.$ac_objext conftest.$ac_ext
14947 echo "$as_me:14947: result: $cf_cv_ncurses_ext_funcs" >&5
14948 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14949 test "$cf_cv_ncurses_ext_funcs" = yes &&
14950 cat >>confdefs.h <<\EOF
14951 #define NCURSES_EXT_FUNCS 1
14954 if test "$cf_enable_widec" = yes
14956 # workaround for systems with ncurses before 20111029, due to change of
14957 # feature test macro from _XPG5 to _XOPEN_SOURCE
14958 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14961 echo "$as_me:14961: checking if _XPG5 should be defined to enable wide-characters" >&5
14962 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14964 cat >conftest.$ac_ext <<_ACEOF
14965 #line 14965 "configure"
14966 #include "confdefs.h"
14968 #include <${cf_cv_ncurses_header:-curses.h}>
14977 rm -f conftest.$ac_objext
14978 if { (eval echo "$as_me:14978: \"$ac_compile\"") >&5
14979 (eval $ac_compile) 2>&5
14981 echo "$as_me:14981: \$? = $ac_status" >&5
14982 (exit $ac_status); } &&
14983 { ac_try='test -s conftest.$ac_objext'
14984 { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985 (eval $ac_try) 2>&5
14987 echo "$as_me:14987: \$? = $ac_status" >&5
14988 (exit $ac_status); }; }; then
14991 echo "$as_me: failed program was:" >&5
14992 cat conftest.$ac_ext >&5
14993 cf_save_cppflags="$CPPFLAGS"
14994 CPPFLAGS="$CPPFLAGS -D_XPG5"
14995 cat >conftest.$ac_ext <<_ACEOF
14996 #line 14996 "configure"
14997 #include "confdefs.h"
14999 #include <${cf_cv_ncurses_header:-curses.h}>
15008 rm -f conftest.$ac_objext
15009 if { (eval echo "$as_me:15009: \"$ac_compile\"") >&5
15010 (eval $ac_compile) 2>&5
15012 echo "$as_me:15012: \$? = $ac_status" >&5
15013 (exit $ac_status); } &&
15014 { ac_try='test -s conftest.$ac_objext'
15015 { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016 (eval $ac_try) 2>&5
15018 echo "$as_me:15018: \$? = $ac_status" >&5
15019 (exit $ac_status); }; }; then
15022 echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15025 rm -f conftest.$ac_objext conftest.$ac_ext
15026 CPPFLAGS="$cf_save_cppflags"
15028 rm -f conftest.$ac_objext conftest.$ac_ext
15029 echo "$as_me:15029: result: $cf_define_xpg5" >&5
15030 echo "${ECHO_T}$cf_define_xpg5" >&6
15032 if test "$cf_define_xpg5" = yes
15034 CPPFLAGS="$CPPFLAGS -D_XPG5"
15038 echo "$as_me:15038: checking for wide-character functions" >&5
15039 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
15040 if test "${cf_cv_widechar_funcs+set}" = set; then
15041 echo $ECHO_N "(cached) $ECHO_C" >&6
15044 cat >conftest.$ac_ext <<_ACEOF
15045 #line 15045 "configure"
15046 #include "confdefs.h"
15048 #include <${cf_cv_ncurses_header:-curses.h}>
15053 static wchar_t src_wchar[2];
15054 static cchar_t dst_cchar;
15055 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15061 rm -f conftest.$ac_objext conftest$ac_exeext
15062 if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063 (eval $ac_link) 2>&5
15065 echo "$as_me:15065: \$? = $ac_status" >&5
15066 (exit $ac_status); } &&
15067 { ac_try='test -s conftest$ac_exeext'
15068 { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069 (eval $ac_try) 2>&5
15071 echo "$as_me:15071: \$? = $ac_status" >&5
15072 (exit $ac_status); }; }; then
15073 cf_cv_widechar_funcs=yes
15075 echo "$as_me: failed program was:" >&5
15076 cat conftest.$ac_ext >&5
15077 cf_cv_widechar_funcs=no
15079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15082 echo "$as_me:15082: result: $cf_cv_widechar_funcs" >&5
15083 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15084 if test "$cf_cv_widechar_funcs" != no ; then
15086 cat >>confdefs.h <<\EOF
15087 #define USE_WIDEC_SUPPORT 1
15091 cat >>confdefs.h <<\EOF
15092 #define USE_WIDEC_SUPPORT 0
15097 cat >>confdefs.h <<\EOF
15098 #define USE_WIDEC_SUPPORT 0
15103 echo "$as_me:15103: checking if $cf_cv_screen library uses pthreads" >&5
15104 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15105 if test "${cf_cv_use_pthreads+set}" = set; then
15106 echo $ECHO_N "(cached) $ECHO_C" >&6
15109 cat >conftest.$ac_ext <<_ACEOF
15110 #line 15110 "configure"
15111 #include "confdefs.h"
15113 #include <${cf_cv_ncurses_header:-curses.h}>
15114 extern void _nc_init_pthreads(void);
15121 _nc_init_pthreads();
15127 rm -f conftest.$ac_objext conftest$ac_exeext
15128 if { (eval echo "$as_me:15128: \"$ac_link\"") >&5
15129 (eval $ac_link) 2>&5
15131 echo "$as_me:15131: \$? = $ac_status" >&5
15132 (exit $ac_status); } &&
15133 { ac_try='test -s conftest$ac_exeext'
15134 { (eval echo "$as_me:15134: \"$ac_try\"") >&5
15135 (eval $ac_try) 2>&5
15137 echo "$as_me:15137: \$? = $ac_status" >&5
15138 (exit $ac_status); }; }; then
15139 cf_cv_use_pthreads=yes
15141 echo "$as_me: failed program was:" >&5
15142 cat conftest.$ac_ext >&5
15143 cf_cv_use_pthreads=no
15145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15148 echo "$as_me:15148: result: $cf_cv_use_pthreads" >&5
15149 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15150 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15151 #define USE_PTHREADS 1
15154 echo "$as_me:15154: checking if sys/time.h works with sys/select.h" >&5
15155 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15156 if test "${cf_cv_sys_time_select+set}" = set; then
15157 echo $ECHO_N "(cached) $ECHO_C" >&6
15160 cat >conftest.$ac_ext <<_ACEOF
15161 #line 15161 "configure"
15162 #include "confdefs.h"
15164 #include <sys/types.h>
15165 #ifdef HAVE_SYS_TIME_H
15166 #include <sys/time.h>
15168 #ifdef HAVE_SYS_SELECT_H
15169 #include <sys/select.h>
15180 rm -f conftest.$ac_objext
15181 if { (eval echo "$as_me:15181: \"$ac_compile\"") >&5
15182 (eval $ac_compile) 2>&5
15184 echo "$as_me:15184: \$? = $ac_status" >&5
15185 (exit $ac_status); } &&
15186 { ac_try='test -s conftest.$ac_objext'
15187 { (eval echo "$as_me:15187: \"$ac_try\"") >&5
15188 (eval $ac_try) 2>&5
15190 echo "$as_me:15190: \$? = $ac_status" >&5
15191 (exit $ac_status); }; }; then
15192 cf_cv_sys_time_select=yes
15194 echo "$as_me: failed program was:" >&5
15195 cat conftest.$ac_ext >&5
15196 cf_cv_sys_time_select=no
15198 rm -f conftest.$ac_objext conftest.$ac_ext
15202 echo "$as_me:15202: result: $cf_cv_sys_time_select" >&5
15203 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15204 test "$cf_cv_sys_time_select" = yes &&
15205 cat >>confdefs.h <<\EOF
15206 #define HAVE_SYS_TIME_SELECT 1
15209 # special check for test/ditto.c
15211 echo "$as_me:15211: checking for openpty in -lutil" >&5
15212 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15213 if test "${ac_cv_lib_util_openpty+set}" = set; then
15214 echo $ECHO_N "(cached) $ECHO_C" >&6
15216 ac_check_lib_save_LIBS=$LIBS
15217 LIBS="-lutil $LIBS"
15218 cat >conftest.$ac_ext <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15222 /* Override any gcc2 internal prototype to avoid an error. */
15226 /* We use char because int might match the return type of a gcc2
15227 builtin and then its argument prototype would still apply. */
15237 rm -f conftest.$ac_objext conftest$ac_exeext
15238 if { (eval echo "$as_me:15238: \"$ac_link\"") >&5
15239 (eval $ac_link) 2>&5
15241 echo "$as_me:15241: \$? = $ac_status" >&5
15242 (exit $ac_status); } &&
15243 { ac_try='test -s conftest$ac_exeext'
15244 { (eval echo "$as_me:15244: \"$ac_try\"") >&5
15245 (eval $ac_try) 2>&5
15247 echo "$as_me:15247: \$? = $ac_status" >&5
15248 (exit $ac_status); }; }; then
15249 ac_cv_lib_util_openpty=yes
15251 echo "$as_me: failed program was:" >&5
15252 cat conftest.$ac_ext >&5
15253 ac_cv_lib_util_openpty=no
15255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15256 LIBS=$ac_check_lib_save_LIBS
15258 echo "$as_me:15258: result: $ac_cv_lib_util_openpty" >&5
15259 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15260 if test $ac_cv_lib_util_openpty = yes; then
15266 echo "$as_me:15266: checking for openpty header" >&5
15267 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15268 if test "${cf_cv_func_openpty+set}" = set; then
15269 echo $ECHO_N "(cached) $ECHO_C" >&6
15272 cf_save_LIBS="$LIBS"
15273 test $cf_cv_lib_util = yes && {
15274 cf_add_libs="-lutil"
15275 # Filter out duplicates - this happens with badly-designed ".pc" files...
15276 for cf_add_1lib in $LIBS
15278 for cf_add_2lib in $cf_add_libs
15280 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15286 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15288 LIBS="$cf_add_libs"
15290 for cf_header in pty.h libutil.h util.h
15292 cat >conftest.$ac_ext <<_ACEOF
15293 #line 15293 "configure"
15294 #include "confdefs.h"
15296 #include <$cf_header>
15302 int x = openpty((int *)0, (int *)0, (char *)0,
15303 (struct termios *)0, (struct winsize *)0);
15309 rm -f conftest.$ac_objext conftest$ac_exeext
15310 if { (eval echo "$as_me:15310: \"$ac_link\"") >&5
15311 (eval $ac_link) 2>&5
15313 echo "$as_me:15313: \$? = $ac_status" >&5
15314 (exit $ac_status); } &&
15315 { ac_try='test -s conftest$ac_exeext'
15316 { (eval echo "$as_me:15316: \"$ac_try\"") >&5
15317 (eval $ac_try) 2>&5
15319 echo "$as_me:15319: \$? = $ac_status" >&5
15320 (exit $ac_status); }; }; then
15322 cf_cv_func_openpty=$cf_header
15326 echo "$as_me: failed program was:" >&5
15327 cat conftest.$ac_ext >&5
15329 cf_cv_func_openpty=no
15332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15334 LIBS="$cf_save_LIBS"
15337 echo "$as_me:15337: result: $cf_cv_func_openpty" >&5
15338 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15340 if test "$cf_cv_func_openpty" != no ; then
15342 cat >>confdefs.h <<EOF
15343 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15346 cat >>confdefs.h <<\EOF
15347 #define USE_XTERM_PTY 1
15350 if test "x$cf_cv_lib_util" = xyes ; then
15352 cf_add_libs="-lutil"
15353 # Filter out duplicates - this happens with badly-designed ".pc" files...
15354 for cf_add_1lib in $TEST_LIBS
15356 for cf_add_2lib in $cf_add_libs
15358 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15364 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15366 TEST_LIBS="$cf_add_libs"
15371 echo "$as_me:15371: checking for function curses_version" >&5
15372 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15373 if test "${cf_cv_func_curses_version+set}" = set; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15377 if test "$cross_compiling" = yes; then
15378 cf_cv_func_curses_version=unknown
15380 cat >conftest.$ac_ext <<_ACEOF
15381 #line 15381 "configure"
15382 #include "confdefs.h"
15384 #include <${cf_cv_ncurses_header:-curses.h}>
15388 sprintf(temp, "%s\n", curses_version());
15389 ${cf_cv_main_return:-return}(0);
15393 rm -f conftest$ac_exeext
15394 if { (eval echo "$as_me:15394: \"$ac_link\"") >&5
15395 (eval $ac_link) 2>&5
15397 echo "$as_me:15397: \$? = $ac_status" >&5
15398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15399 { (eval echo "$as_me:15399: \"$ac_try\"") >&5
15400 (eval $ac_try) 2>&5
15402 echo "$as_me:15402: \$? = $ac_status" >&5
15403 (exit $ac_status); }; }; then
15404 cf_cv_func_curses_version=yes
15407 echo "$as_me: program exited with status $ac_status" >&5
15408 echo "$as_me: failed program was:" >&5
15409 cat conftest.$ac_ext >&5
15410 cf_cv_func_curses_version=no
15413 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15417 echo "$as_me:15417: result: $cf_cv_func_curses_version" >&5
15418 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15419 test "$cf_cv_func_curses_version" = yes &&
15420 cat >>confdefs.h <<\EOF
15421 #define HAVE_CURSES_VERSION 1
15424 echo "$as_me:15424: checking for alternate character set array" >&5
15425 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15426 if test "${cf_cv_curses_acs_map+set}" = set; then
15427 echo $ECHO_N "(cached) $ECHO_C" >&6
15430 cf_cv_curses_acs_map=unknown
15431 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15433 cat >conftest.$ac_ext <<_ACEOF
15434 #line 15434 "configure"
15435 #include "confdefs.h"
15437 #include <${cf_cv_ncurses_header:-curses.h}>
15443 $name['k'] = ACS_PLUS
15449 rm -f conftest.$ac_objext conftest$ac_exeext
15450 if { (eval echo "$as_me:15450: \"$ac_link\"") >&5
15451 (eval $ac_link) 2>&5
15453 echo "$as_me:15453: \$? = $ac_status" >&5
15454 (exit $ac_status); } &&
15455 { ac_try='test -s conftest$ac_exeext'
15456 { (eval echo "$as_me:15456: \"$ac_try\"") >&5
15457 (eval $ac_try) 2>&5
15459 echo "$as_me:15459: \$? = $ac_status" >&5
15460 (exit $ac_status); }; }; then
15461 cf_cv_curses_acs_map=$name; break
15463 echo "$as_me: failed program was:" >&5
15464 cat conftest.$ac_ext >&5
15466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15470 echo "$as_me:15470: result: $cf_cv_curses_acs_map" >&5
15471 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15473 test "$cf_cv_curses_acs_map" != unknown &&
15474 cat >>confdefs.h <<EOF
15475 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15478 if test "$cf_enable_widec" = yes; then
15480 echo "$as_me:15480: checking for wide alternate character set array" >&5
15481 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15482 if test "${cf_cv_curses_wacs_map+set}" = set; then
15483 echo $ECHO_N "(cached) $ECHO_C" >&6
15486 cf_cv_curses_wacs_map=unknown
15487 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15489 cat >conftest.$ac_ext <<_ACEOF
15490 #line 15490 "configure"
15491 #include "confdefs.h"
15493 #ifndef _XOPEN_SOURCE_EXTENDED
15494 #define _XOPEN_SOURCE_EXTENDED
15496 #include <${cf_cv_ncurses_header:-curses.h}>
15500 void *foo = &($name['k'])
15505 rm -f conftest.$ac_objext conftest$ac_exeext
15506 if { (eval echo "$as_me:15506: \"$ac_link\"") >&5
15507 (eval $ac_link) 2>&5
15509 echo "$as_me:15509: \$? = $ac_status" >&5
15510 (exit $ac_status); } &&
15511 { ac_try='test -s conftest$ac_exeext'
15512 { (eval echo "$as_me:15512: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15515 echo "$as_me:15515: \$? = $ac_status" >&5
15516 (exit $ac_status); }; }; then
15517 cf_cv_curses_wacs_map=$name
15520 echo "$as_me: failed program was:" >&5
15521 cat conftest.$ac_ext >&5
15523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15526 echo "$as_me:15526: result: $cf_cv_curses_wacs_map" >&5
15527 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15529 test "$cf_cv_curses_wacs_map" != unknown &&
15530 cat >>confdefs.h <<EOF
15531 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15534 echo "$as_me:15534: checking for wide alternate character constants" >&5
15535 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15536 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15537 echo $ECHO_N "(cached) $ECHO_C" >&6
15540 cf_cv_curses_wacs_symbols=no
15541 if test "$cf_cv_curses_wacs_map" != unknown
15543 cat >conftest.$ac_ext <<_ACEOF
15544 #line 15544 "configure"
15545 #include "confdefs.h"
15547 #ifndef _XOPEN_SOURCE_EXTENDED
15548 #define _XOPEN_SOURCE_EXTENDED
15550 #include <${cf_cv_ncurses_header:-curses.h}>
15554 cchar_t *foo = WACS_PLUS;
15555 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15560 rm -f conftest.$ac_objext conftest$ac_exeext
15561 if { (eval echo "$as_me:15561: \"$ac_link\"") >&5
15562 (eval $ac_link) 2>&5
15564 echo "$as_me:15564: \$? = $ac_status" >&5
15565 (exit $ac_status); } &&
15566 { ac_try='test -s conftest$ac_exeext'
15567 { (eval echo "$as_me:15567: \"$ac_try\"") >&5
15568 (eval $ac_try) 2>&5
15570 echo "$as_me:15570: \$? = $ac_status" >&5
15571 (exit $ac_status); }; }; then
15572 cf_cv_curses_wacs_symbols=yes
15574 echo "$as_me: failed program was:" >&5
15575 cat conftest.$ac_ext >&5
15577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15579 cat >conftest.$ac_ext <<_ACEOF
15580 #line 15580 "configure"
15581 #include "confdefs.h"
15583 #ifndef _XOPEN_SOURCE_EXTENDED
15584 #define _XOPEN_SOURCE_EXTENDED
15586 #include <${cf_cv_ncurses_header:-curses.h}>
15590 cchar_t *foo = WACS_PLUS
15595 rm -f conftest.$ac_objext conftest$ac_exeext
15596 if { (eval echo "$as_me:15596: \"$ac_link\"") >&5
15597 (eval $ac_link) 2>&5
15599 echo "$as_me:15599: \$? = $ac_status" >&5
15600 (exit $ac_status); } &&
15601 { ac_try='test -s conftest$ac_exeext'
15602 { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603 (eval $ac_try) 2>&5
15605 echo "$as_me:15605: \$? = $ac_status" >&5
15606 (exit $ac_status); }; }; then
15607 cf_cv_curses_wacs_symbols=yes
15609 echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15616 echo "$as_me:15616: result: $cf_cv_curses_wacs_symbols" >&5
15617 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15619 test "$cf_cv_curses_wacs_symbols" != no &&
15620 cat >>confdefs.h <<\EOF
15621 #define CURSES_WACS_SYMBOLS 1
15626 echo "$as_me:15626: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15627 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15628 cat >conftest.$ac_ext <<_ACEOF
15629 #line 15629 "configure"
15630 #include "confdefs.h"
15632 #ifndef _XOPEN_SOURCE_EXTENDED
15633 #define _XOPEN_SOURCE_EXTENDED
15635 #include <${cf_cv_ncurses_header:-curses.h}>
15646 rm -f conftest.$ac_objext
15647 if { (eval echo "$as_me:15647: \"$ac_compile\"") >&5
15648 (eval $ac_compile) 2>&5
15650 echo "$as_me:15650: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -s conftest.$ac_objext'
15653 { (eval echo "$as_me:15653: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15656 echo "$as_me:15656: \$? = $ac_status" >&5
15657 (exit $ac_status); }; }; then
15660 echo "$as_me: failed program was:" >&5
15661 cat conftest.$ac_ext >&5
15664 rm -f conftest.$ac_objext conftest.$ac_ext
15665 echo "$as_me:15665: result: $cf_result" >&5
15666 echo "${ECHO_T}$cf_result" >&6
15667 if test $cf_result = yes ; then
15669 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15671 cat >>confdefs.h <<EOF
15672 #define $cf_result 1
15677 cat >>confdefs.h <<EOF
15678 #define attr_t long
15683 if test "$cf_enable_widec" = yes; then
15685 # This is needed on Tru64 5.0 to declare mbstate_t
15686 echo "$as_me:15686: checking if we must include wchar.h to declare mbstate_t" >&5
15687 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15688 if test "${cf_cv_mbstate_t+set}" = set; then
15689 echo $ECHO_N "(cached) $ECHO_C" >&6
15692 cat >conftest.$ac_ext <<_ACEOF
15693 #line 15693 "configure"
15694 #include "confdefs.h"
15696 #include <stdlib.h>
15697 #include <stdarg.h>
15699 #ifdef HAVE_LIBUTF8_H
15700 #include <libutf8.h>
15710 rm -f conftest.$ac_objext
15711 if { (eval echo "$as_me:15711: \"$ac_compile\"") >&5
15712 (eval $ac_compile) 2>&5
15714 echo "$as_me:15714: \$? = $ac_status" >&5
15715 (exit $ac_status); } &&
15716 { ac_try='test -s conftest.$ac_objext'
15717 { (eval echo "$as_me:15717: \"$ac_try\"") >&5
15718 (eval $ac_try) 2>&5
15720 echo "$as_me:15720: \$? = $ac_status" >&5
15721 (exit $ac_status); }; }; then
15724 echo "$as_me: failed program was:" >&5
15725 cat conftest.$ac_ext >&5
15726 cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15730 #include <stdlib.h>
15731 #include <stdarg.h>
15734 #ifdef HAVE_LIBUTF8_H
15735 #include <libutf8.h>
15745 rm -f conftest.$ac_objext
15746 if { (eval echo "$as_me:15746: \"$ac_compile\"") >&5
15747 (eval $ac_compile) 2>&5
15749 echo "$as_me:15749: \$? = $ac_status" >&5
15750 (exit $ac_status); } &&
15751 { ac_try='test -s conftest.$ac_objext'
15752 { (eval echo "$as_me:15752: \"$ac_try\"") >&5
15753 (eval $ac_try) 2>&5
15755 echo "$as_me:15755: \$? = $ac_status" >&5
15756 (exit $ac_status); }; }; then
15757 cf_cv_mbstate_t=yes
15759 echo "$as_me: failed program was:" >&5
15760 cat conftest.$ac_ext >&5
15761 cf_cv_mbstate_t=unknown
15763 rm -f conftest.$ac_objext conftest.$ac_ext
15765 rm -f conftest.$ac_objext conftest.$ac_ext
15767 echo "$as_me:15767: result: $cf_cv_mbstate_t" >&5
15768 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15770 if test "$cf_cv_mbstate_t" = yes ; then
15772 cat >>confdefs.h <<\EOF
15773 #define NEED_WCHAR_H 1
15779 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15780 if test "$cf_cv_mbstate_t" = unknown ; then
15781 NCURSES_MBSTATE_T=1
15784 # if we find mbstate_t in either place, use substitution to provide a fallback.
15785 if test "$cf_cv_mbstate_t" != unknown ; then
15786 NCURSES_OK_MBSTATE_T=1
15789 # This is needed on Tru64 5.0 to declare wchar_t
15790 echo "$as_me:15790: checking if we must include wchar.h to declare wchar_t" >&5
15791 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15792 if test "${cf_cv_wchar_t+set}" = set; then
15793 echo $ECHO_N "(cached) $ECHO_C" >&6
15796 cat >conftest.$ac_ext <<_ACEOF
15797 #line 15797 "configure"
15798 #include "confdefs.h"
15800 #include <stdlib.h>
15801 #include <stdarg.h>
15803 #ifdef HAVE_LIBUTF8_H
15804 #include <libutf8.h>
15814 rm -f conftest.$ac_objext
15815 if { (eval echo "$as_me:15815: \"$ac_compile\"") >&5
15816 (eval $ac_compile) 2>&5
15818 echo "$as_me:15818: \$? = $ac_status" >&5
15819 (exit $ac_status); } &&
15820 { ac_try='test -s conftest.$ac_objext'
15821 { (eval echo "$as_me:15821: \"$ac_try\"") >&5
15822 (eval $ac_try) 2>&5
15824 echo "$as_me:15824: \$? = $ac_status" >&5
15825 (exit $ac_status); }; }; then
15828 echo "$as_me: failed program was:" >&5
15829 cat conftest.$ac_ext >&5
15830 cat >conftest.$ac_ext <<_ACEOF
15831 #line 15831 "configure"
15832 #include "confdefs.h"
15834 #include <stdlib.h>
15835 #include <stdarg.h>
15838 #ifdef HAVE_LIBUTF8_H
15839 #include <libutf8.h>
15849 rm -f conftest.$ac_objext
15850 if { (eval echo "$as_me:15850: \"$ac_compile\"") >&5
15851 (eval $ac_compile) 2>&5
15853 echo "$as_me:15853: \$? = $ac_status" >&5
15854 (exit $ac_status); } &&
15855 { ac_try='test -s conftest.$ac_objext'
15856 { (eval echo "$as_me:15856: \"$ac_try\"") >&5
15857 (eval $ac_try) 2>&5
15859 echo "$as_me:15859: \$? = $ac_status" >&5
15860 (exit $ac_status); }; }; then
15863 echo "$as_me: failed program was:" >&5
15864 cat conftest.$ac_ext >&5
15865 cf_cv_wchar_t=unknown
15867 rm -f conftest.$ac_objext conftest.$ac_ext
15869 rm -f conftest.$ac_objext conftest.$ac_ext
15871 echo "$as_me:15871: result: $cf_cv_wchar_t" >&5
15872 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15874 if test "$cf_cv_wchar_t" = yes ; then
15876 cat >>confdefs.h <<\EOF
15877 #define NEED_WCHAR_H 1
15883 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15884 if test "$cf_cv_wchar_t" = unknown ; then
15888 # if we find wchar_t in either place, use substitution to provide a fallback.
15889 if test "$cf_cv_wchar_t" != unknown ; then
15890 NCURSES_OK_WCHAR_T=1
15893 # This is needed on Tru64 5.0 to declare wint_t
15894 echo "$as_me:15894: checking if we must include wchar.h to declare wint_t" >&5
15895 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15896 if test "${cf_cv_wint_t+set}" = set; then
15897 echo $ECHO_N "(cached) $ECHO_C" >&6
15900 cat >conftest.$ac_ext <<_ACEOF
15901 #line 15901 "configure"
15902 #include "confdefs.h"
15904 #include <stdlib.h>
15905 #include <stdarg.h>
15907 #ifdef HAVE_LIBUTF8_H
15908 #include <libutf8.h>
15918 rm -f conftest.$ac_objext
15919 if { (eval echo "$as_me:15919: \"$ac_compile\"") >&5
15920 (eval $ac_compile) 2>&5
15922 echo "$as_me:15922: \$? = $ac_status" >&5
15923 (exit $ac_status); } &&
15924 { ac_try='test -s conftest.$ac_objext'
15925 { (eval echo "$as_me:15925: \"$ac_try\"") >&5
15926 (eval $ac_try) 2>&5
15928 echo "$as_me:15928: \$? = $ac_status" >&5
15929 (exit $ac_status); }; }; then
15932 echo "$as_me: failed program was:" >&5
15933 cat conftest.$ac_ext >&5
15934 cat >conftest.$ac_ext <<_ACEOF
15935 #line 15935 "configure"
15936 #include "confdefs.h"
15938 #include <stdlib.h>
15939 #include <stdarg.h>
15942 #ifdef HAVE_LIBUTF8_H
15943 #include <libutf8.h>
15953 rm -f conftest.$ac_objext
15954 if { (eval echo "$as_me:15954: \"$ac_compile\"") >&5
15955 (eval $ac_compile) 2>&5
15957 echo "$as_me:15957: \$? = $ac_status" >&5
15958 (exit $ac_status); } &&
15959 { ac_try='test -s conftest.$ac_objext'
15960 { (eval echo "$as_me:15960: \"$ac_try\"") >&5
15961 (eval $ac_try) 2>&5
15963 echo "$as_me:15963: \$? = $ac_status" >&5
15964 (exit $ac_status); }; }; then
15967 echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969 cf_cv_wint_t=unknown
15971 rm -f conftest.$ac_objext conftest.$ac_ext
15973 rm -f conftest.$ac_objext conftest.$ac_ext
15975 echo "$as_me:15975: result: $cf_cv_wint_t" >&5
15976 echo "${ECHO_T}$cf_cv_wint_t" >&6
15978 if test "$cf_cv_wint_t" = yes ; then
15980 cat >>confdefs.h <<\EOF
15981 #define NEED_WCHAR_H 1
15987 # if we do not find wint_t in either place, use substitution to provide a fallback.
15988 if test "$cf_cv_wint_t" = unknown ; then
15992 # if we find wint_t in either place, use substitution to provide a fallback.
15993 if test "$cf_cv_wint_t" != unknown ; then
15994 NCURSES_OK_WINT_T=1
15997 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15999 echo "$as_me:15999: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16000 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16001 cat >conftest.$ac_ext <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16005 #ifndef _XOPEN_SOURCE_EXTENDED
16006 #define _XOPEN_SOURCE_EXTENDED
16008 #include <${cf_cv_ncurses_header:-curses.h}>
16019 rm -f conftest.$ac_objext
16020 if { (eval echo "$as_me:16020: \"$ac_compile\"") >&5
16021 (eval $ac_compile) 2>&5
16023 echo "$as_me:16023: \$? = $ac_status" >&5
16024 (exit $ac_status); } &&
16025 { ac_try='test -s conftest.$ac_objext'
16026 { (eval echo "$as_me:16026: \"$ac_try\"") >&5
16027 (eval $ac_try) 2>&5
16029 echo "$as_me:16029: \$? = $ac_status" >&5
16030 (exit $ac_status); }; }; then
16033 echo "$as_me: failed program was:" >&5
16034 cat conftest.$ac_ext >&5
16037 rm -f conftest.$ac_objext conftest.$ac_ext
16038 echo "$as_me:16038: result: $cf_result" >&5
16039 echo "${ECHO_T}$cf_result" >&6
16040 if test $cf_result = yes ; then
16042 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16044 cat >>confdefs.h <<EOF
16045 #define $cf_result 1
16050 cat >>confdefs.h <<EOF
16051 #define mbstate_t long
16058 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16060 echo "$as_me:16060: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16061 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16062 cat >conftest.$ac_ext <<_ACEOF
16063 #line 16063 "configure"
16064 #include "confdefs.h"
16066 #ifndef _XOPEN_SOURCE_EXTENDED
16067 #define _XOPEN_SOURCE_EXTENDED
16069 #include <${cf_cv_ncurses_header:-curses.h}>
16080 rm -f conftest.$ac_objext
16081 if { (eval echo "$as_me:16081: \"$ac_compile\"") >&5
16082 (eval $ac_compile) 2>&5
16084 echo "$as_me:16084: \$? = $ac_status" >&5
16085 (exit $ac_status); } &&
16086 { ac_try='test -s conftest.$ac_objext'
16087 { (eval echo "$as_me:16087: \"$ac_try\"") >&5
16088 (eval $ac_try) 2>&5
16090 echo "$as_me:16090: \$? = $ac_status" >&5
16091 (exit $ac_status); }; }; then
16094 echo "$as_me: failed program was:" >&5
16095 cat conftest.$ac_ext >&5
16098 rm -f conftest.$ac_objext conftest.$ac_ext
16099 echo "$as_me:16099: result: $cf_result" >&5
16100 echo "${ECHO_T}$cf_result" >&6
16101 if test $cf_result = yes ; then
16103 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16105 cat >>confdefs.h <<EOF
16106 #define $cf_result 1
16111 cat >>confdefs.h <<EOF
16112 #define wchar_t long
16119 if test "$NCURSES_OK_WINT_T" = 0 ; then
16121 echo "$as_me:16121: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16122 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16123 cat >conftest.$ac_ext <<_ACEOF
16124 #line 16124 "configure"
16125 #include "confdefs.h"
16127 #ifndef _XOPEN_SOURCE_EXTENDED
16128 #define _XOPEN_SOURCE_EXTENDED
16130 #include <${cf_cv_ncurses_header:-curses.h}>
16141 rm -f conftest.$ac_objext
16142 if { (eval echo "$as_me:16142: \"$ac_compile\"") >&5
16143 (eval $ac_compile) 2>&5
16145 echo "$as_me:16145: \$? = $ac_status" >&5
16146 (exit $ac_status); } &&
16147 { ac_try='test -s conftest.$ac_objext'
16148 { (eval echo "$as_me:16148: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16151 echo "$as_me:16151: \$? = $ac_status" >&5
16152 (exit $ac_status); }; }; then
16155 echo "$as_me: failed program was:" >&5
16156 cat conftest.$ac_ext >&5
16159 rm -f conftest.$ac_objext conftest.$ac_ext
16160 echo "$as_me:16160: result: $cf_result" >&5
16161 echo "${ECHO_T}$cf_result" >&6
16162 if test $cf_result = yes ; then
16164 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16166 cat >>confdefs.h <<EOF
16167 #define $cf_result 1
16172 cat >>confdefs.h <<EOF
16173 #define wint_t long
16181 echo "$as_me:16181: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16182 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16184 cat >conftest.$ac_ext <<_ACEOF
16185 #line 16185 "configure"
16186 #include "confdefs.h"
16188 #ifdef HAVE_XCURSES
16189 #include <xcurses.h>
16190 char * XCursesProgramName = "test";
16192 #include <${cf_cv_ncurses_header:-curses.h}>
16193 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16194 #include <ncursesw/term.h>
16195 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16196 #include <ncurses/term.h>
16197 #elif defined(HAVE_TERM_H)
16206 void *foo = &(ospeed)
16212 rm -f conftest.$ac_objext
16213 if { (eval echo "$as_me:16213: \"$ac_compile\"") >&5
16214 (eval $ac_compile) 2>&5
16216 echo "$as_me:16216: \$? = $ac_status" >&5
16217 (exit $ac_status); } &&
16218 { ac_try='test -s conftest.$ac_objext'
16219 { (eval echo "$as_me:16219: \"$ac_try\"") >&5
16220 (eval $ac_try) 2>&5
16222 echo "$as_me:16222: \$? = $ac_status" >&5
16223 (exit $ac_status); }; }; then
16226 echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16230 rm -f conftest.$ac_objext conftest.$ac_ext
16231 echo "$as_me:16231: result: $cf_result" >&5
16232 echo "${ECHO_T}$cf_result" >&6
16234 if test $cf_result = yes ; then
16236 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16238 cat >>confdefs.h <<EOF
16239 #define $cf_result 1
16243 echo "$as_me:16243: checking for data ospeed in library" >&5
16244 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16245 # BSD linkers insist on making weak linkage, but resolve at runtime.
16246 if test "$cross_compiling" = yes; then
16249 cat >conftest.$ac_ext <<_ACEOF
16250 #line 16250 "configure"
16251 #include "confdefs.h"
16253 #ifdef HAVE_XCURSES
16254 #include <xcurses.h>
16255 char * XCursesProgramName = "test";
16257 #include <${cf_cv_ncurses_header:-curses.h}>
16258 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16259 #include <ncursesw/term.h>
16260 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16261 #include <ncurses/term.h>
16262 #elif defined(HAVE_TERM_H)
16267 extern char ospeed;
16273 void *foo = &(ospeed);
16274 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16275 ${cf_cv_main_return:-return}(foo == 0);
16282 rm -f conftest.$ac_objext conftest$ac_exeext
16283 if { (eval echo "$as_me:16283: \"$ac_link\"") >&5
16284 (eval $ac_link) 2>&5
16286 echo "$as_me:16286: \$? = $ac_status" >&5
16287 (exit $ac_status); } &&
16288 { ac_try='test -s conftest$ac_exeext'
16289 { (eval echo "$as_me:16289: \"$ac_try\"") >&5
16290 (eval $ac_try) 2>&5
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit $ac_status); }; }; then
16296 echo "$as_me: failed program was:" >&5
16297 cat conftest.$ac_ext >&5
16300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16303 cat >conftest.$ac_ext <<_ACEOF
16304 #line 16304 "configure"
16305 #include "confdefs.h"
16307 #ifdef HAVE_XCURSES
16308 #include <xcurses.h>
16309 char * XCursesProgramName = "test";
16311 #include <${cf_cv_ncurses_header:-curses.h}>
16312 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16313 #include <ncursesw/term.h>
16314 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16315 #include <ncurses/term.h>
16316 #elif defined(HAVE_TERM_H)
16321 extern char ospeed;
16324 void *foo = &(ospeed);
16325 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16326 ${cf_cv_main_return:-return}(foo == 0);
16329 rm -f conftest$ac_exeext
16330 if { (eval echo "$as_me:16330: \"$ac_link\"") >&5
16331 (eval $ac_link) 2>&5
16333 echo "$as_me:16333: \$? = $ac_status" >&5
16334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16335 { (eval echo "$as_me:16335: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
16342 echo "$as_me: program exited with status $ac_status" >&5
16343 echo "$as_me: failed program was:" >&5
16344 cat conftest.$ac_ext >&5
16347 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16349 echo "$as_me:16349: result: $cf_result" >&5
16350 echo "${ECHO_T}$cf_result" >&6
16351 if test $cf_result = yes ; then
16353 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16355 cat >>confdefs.h <<EOF
16356 #define $cf_result 1
16362 echo "$as_me:16362: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16363 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16365 cat >conftest.$ac_ext <<_ACEOF
16366 #line 16366 "configure"
16367 #include "confdefs.h"
16369 #ifdef HAVE_XCURSES
16370 #include <xcurses.h>
16371 char * XCursesProgramName = "test";
16373 #include <${cf_cv_ncurses_header:-curses.h}>
16374 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16375 #include <ncursesw/term.h>
16376 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16377 #include <ncurses/term.h>
16378 #elif defined(HAVE_TERM_H)
16387 void *foo = &(boolnames)
16393 rm -f conftest.$ac_objext
16394 if { (eval echo "$as_me:16394: \"$ac_compile\"") >&5
16395 (eval $ac_compile) 2>&5
16397 echo "$as_me:16397: \$? = $ac_status" >&5
16398 (exit $ac_status); } &&
16399 { ac_try='test -s conftest.$ac_objext'
16400 { (eval echo "$as_me:16400: \"$ac_try\"") >&5
16401 (eval $ac_try) 2>&5
16403 echo "$as_me:16403: \$? = $ac_status" >&5
16404 (exit $ac_status); }; }; then
16407 echo "$as_me: failed program was:" >&5
16408 cat conftest.$ac_ext >&5
16411 rm -f conftest.$ac_objext conftest.$ac_ext
16412 echo "$as_me:16412: result: $cf_result" >&5
16413 echo "${ECHO_T}$cf_result" >&6
16415 if test $cf_result = yes ; then
16417 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16419 cat >>confdefs.h <<EOF
16420 #define $cf_result 1
16424 echo "$as_me:16424: checking for data boolnames in library" >&5
16425 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16426 # BSD linkers insist on making weak linkage, but resolve at runtime.
16427 if test "$cross_compiling" = yes; then
16430 cat >conftest.$ac_ext <<_ACEOF
16431 #line 16431 "configure"
16432 #include "confdefs.h"
16434 #ifdef HAVE_XCURSES
16435 #include <xcurses.h>
16436 char * XCursesProgramName = "test";
16438 #include <${cf_cv_ncurses_header:-curses.h}>
16439 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16440 #include <ncursesw/term.h>
16441 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16442 #include <ncurses/term.h>
16443 #elif defined(HAVE_TERM_H)
16448 extern char boolnames;
16454 void *foo = &(boolnames);
16455 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16456 ${cf_cv_main_return:-return}(foo == 0);
16463 rm -f conftest.$ac_objext conftest$ac_exeext
16464 if { (eval echo "$as_me:16464: \"$ac_link\"") >&5
16465 (eval $ac_link) 2>&5
16467 echo "$as_me:16467: \$? = $ac_status" >&5
16468 (exit $ac_status); } &&
16469 { ac_try='test -s conftest$ac_exeext'
16470 { (eval echo "$as_me:16470: \"$ac_try\"") >&5
16471 (eval $ac_try) 2>&5
16473 echo "$as_me:16473: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
16477 echo "$as_me: failed program was:" >&5
16478 cat conftest.$ac_ext >&5
16481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16484 cat >conftest.$ac_ext <<_ACEOF
16485 #line 16485 "configure"
16486 #include "confdefs.h"
16488 #ifdef HAVE_XCURSES
16489 #include <xcurses.h>
16490 char * XCursesProgramName = "test";
16492 #include <${cf_cv_ncurses_header:-curses.h}>
16493 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16494 #include <ncursesw/term.h>
16495 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16496 #include <ncurses/term.h>
16497 #elif defined(HAVE_TERM_H)
16502 extern char boolnames;
16505 void *foo = &(boolnames);
16506 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16507 ${cf_cv_main_return:-return}(foo == 0);
16510 rm -f conftest$ac_exeext
16511 if { (eval echo "$as_me:16511: \"$ac_link\"") >&5
16512 (eval $ac_link) 2>&5
16514 echo "$as_me:16514: \$? = $ac_status" >&5
16515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16516 { (eval echo "$as_me:16516: \"$ac_try\"") >&5
16517 (eval $ac_try) 2>&5
16519 echo "$as_me:16519: \$? = $ac_status" >&5
16520 (exit $ac_status); }; }; then
16523 echo "$as_me: program exited with status $ac_status" >&5
16524 echo "$as_me: failed program was:" >&5
16525 cat conftest.$ac_ext >&5
16528 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16530 echo "$as_me:16530: result: $cf_result" >&5
16531 echo "${ECHO_T}$cf_result" >&6
16532 if test $cf_result = yes ; then
16534 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16536 cat >>confdefs.h <<EOF
16537 #define $cf_result 1
16543 echo "$as_me:16543: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16544 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16546 cat >conftest.$ac_ext <<_ACEOF
16547 #line 16547 "configure"
16548 #include "confdefs.h"
16550 #ifdef HAVE_XCURSES
16551 #include <xcurses.h>
16552 char * XCursesProgramName = "test";
16554 #include <${cf_cv_ncurses_header:-curses.h}>
16555 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16556 #include <ncursesw/term.h>
16557 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16558 #include <ncurses/term.h>
16559 #elif defined(HAVE_TERM_H)
16568 void *foo = &(boolfnames)
16574 rm -f conftest.$ac_objext
16575 if { (eval echo "$as_me:16575: \"$ac_compile\"") >&5
16576 (eval $ac_compile) 2>&5
16578 echo "$as_me:16578: \$? = $ac_status" >&5
16579 (exit $ac_status); } &&
16580 { ac_try='test -s conftest.$ac_objext'
16581 { (eval echo "$as_me:16581: \"$ac_try\"") >&5
16582 (eval $ac_try) 2>&5
16584 echo "$as_me:16584: \$? = $ac_status" >&5
16585 (exit $ac_status); }; }; then
16588 echo "$as_me: failed program was:" >&5
16589 cat conftest.$ac_ext >&5
16592 rm -f conftest.$ac_objext conftest.$ac_ext
16593 echo "$as_me:16593: result: $cf_result" >&5
16594 echo "${ECHO_T}$cf_result" >&6
16596 if test $cf_result = yes ; then
16598 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16600 cat >>confdefs.h <<EOF
16601 #define $cf_result 1
16605 echo "$as_me:16605: checking for data boolfnames in library" >&5
16606 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16607 # BSD linkers insist on making weak linkage, but resolve at runtime.
16608 if test "$cross_compiling" = yes; then
16611 cat >conftest.$ac_ext <<_ACEOF
16612 #line 16612 "configure"
16613 #include "confdefs.h"
16615 #ifdef HAVE_XCURSES
16616 #include <xcurses.h>
16617 char * XCursesProgramName = "test";
16619 #include <${cf_cv_ncurses_header:-curses.h}>
16620 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16621 #include <ncursesw/term.h>
16622 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16623 #include <ncurses/term.h>
16624 #elif defined(HAVE_TERM_H)
16629 extern char boolfnames;
16635 void *foo = &(boolfnames);
16636 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16637 ${cf_cv_main_return:-return}(foo == 0);
16644 rm -f conftest.$ac_objext conftest$ac_exeext
16645 if { (eval echo "$as_me:16645: \"$ac_link\"") >&5
16646 (eval $ac_link) 2>&5
16648 echo "$as_me:16648: \$? = $ac_status" >&5
16649 (exit $ac_status); } &&
16650 { ac_try='test -s conftest$ac_exeext'
16651 { (eval echo "$as_me:16651: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16654 echo "$as_me:16654: \$? = $ac_status" >&5
16655 (exit $ac_status); }; }; then
16658 echo "$as_me: failed program was:" >&5
16659 cat conftest.$ac_ext >&5
16662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16665 cat >conftest.$ac_ext <<_ACEOF
16666 #line 16666 "configure"
16667 #include "confdefs.h"
16669 #ifdef HAVE_XCURSES
16670 #include <xcurses.h>
16671 char * XCursesProgramName = "test";
16673 #include <${cf_cv_ncurses_header:-curses.h}>
16674 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16675 #include <ncursesw/term.h>
16676 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16677 #include <ncurses/term.h>
16678 #elif defined(HAVE_TERM_H)
16683 extern char boolfnames;
16686 void *foo = &(boolfnames);
16687 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16688 ${cf_cv_main_return:-return}(foo == 0);
16691 rm -f conftest$ac_exeext
16692 if { (eval echo "$as_me:16692: \"$ac_link\"") >&5
16693 (eval $ac_link) 2>&5
16695 echo "$as_me:16695: \$? = $ac_status" >&5
16696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16697 { (eval echo "$as_me:16697: \"$ac_try\"") >&5
16698 (eval $ac_try) 2>&5
16700 echo "$as_me:16700: \$? = $ac_status" >&5
16701 (exit $ac_status); }; }; then
16704 echo "$as_me: program exited with status $ac_status" >&5
16705 echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16709 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16711 echo "$as_me:16711: result: $cf_result" >&5
16712 echo "${ECHO_T}$cf_result" >&6
16713 if test $cf_result = yes ; then
16715 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16717 cat >>confdefs.h <<EOF
16718 #define $cf_result 1
16724 echo "$as_me:16724: checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16725 echo $ECHO_N "checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16727 cat >conftest.$ac_ext <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16731 #ifdef HAVE_XCURSES
16732 #include <xcurses.h>
16733 char * XCursesProgramName = "test";
16735 #include <${cf_cv_ncurses_header:-curses.h}>
16736 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16737 #include <ncursesw/term.h>
16738 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16739 #include <ncurses/term.h>
16740 #elif defined(HAVE_TERM_H)
16749 void *foo = &(ttytype)
16755 rm -f conftest.$ac_objext
16756 if { (eval echo "$as_me:16756: \"$ac_compile\"") >&5
16757 (eval $ac_compile) 2>&5
16759 echo "$as_me:16759: \$? = $ac_status" >&5
16760 (exit $ac_status); } &&
16761 { ac_try='test -s conftest.$ac_objext'
16762 { (eval echo "$as_me:16762: \"$ac_try\"") >&5
16763 (eval $ac_try) 2>&5
16765 echo "$as_me:16765: \$? = $ac_status" >&5
16766 (exit $ac_status); }; }; then
16769 echo "$as_me: failed program was:" >&5
16770 cat conftest.$ac_ext >&5
16773 rm -f conftest.$ac_objext conftest.$ac_ext
16774 echo "$as_me:16774: result: $cf_result" >&5
16775 echo "${ECHO_T}$cf_result" >&6
16777 if test $cf_result = yes ; then
16779 cf_result=`echo "have_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16781 cat >>confdefs.h <<EOF
16782 #define $cf_result 1
16786 echo "$as_me:16786: checking for data ttytype in library" >&5
16787 echo $ECHO_N "checking for data ttytype in library... $ECHO_C" >&6
16788 # BSD linkers insist on making weak linkage, but resolve at runtime.
16789 if test "$cross_compiling" = yes; then
16792 cat >conftest.$ac_ext <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16796 #ifdef HAVE_XCURSES
16797 #include <xcurses.h>
16798 char * XCursesProgramName = "test";
16800 #include <${cf_cv_ncurses_header:-curses.h}>
16801 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16802 #include <ncursesw/term.h>
16803 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16804 #include <ncurses/term.h>
16805 #elif defined(HAVE_TERM_H)
16810 extern char ttytype;
16816 void *foo = &(ttytype);
16817 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16818 ${cf_cv_main_return:-return}(foo == 0);
16825 rm -f conftest.$ac_objext conftest$ac_exeext
16826 if { (eval echo "$as_me:16826: \"$ac_link\"") >&5
16827 (eval $ac_link) 2>&5
16829 echo "$as_me:16829: \$? = $ac_status" >&5
16830 (exit $ac_status); } &&
16831 { ac_try='test -s conftest$ac_exeext'
16832 { (eval echo "$as_me:16832: \"$ac_try\"") >&5
16833 (eval $ac_try) 2>&5
16835 echo "$as_me:16835: \$? = $ac_status" >&5
16836 (exit $ac_status); }; }; then
16839 echo "$as_me: failed program was:" >&5
16840 cat conftest.$ac_ext >&5
16843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16846 cat >conftest.$ac_ext <<_ACEOF
16847 #line 16847 "configure"
16848 #include "confdefs.h"
16850 #ifdef HAVE_XCURSES
16851 #include <xcurses.h>
16852 char * XCursesProgramName = "test";
16854 #include <${cf_cv_ncurses_header:-curses.h}>
16855 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16856 #include <ncursesw/term.h>
16857 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16858 #include <ncurses/term.h>
16859 #elif defined(HAVE_TERM_H)
16864 extern char ttytype;
16867 void *foo = &(ttytype);
16868 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16869 ${cf_cv_main_return:-return}(foo == 0);
16872 rm -f conftest$ac_exeext
16873 if { (eval echo "$as_me:16873: \"$ac_link\"") >&5
16874 (eval $ac_link) 2>&5
16876 echo "$as_me:16876: \$? = $ac_status" >&5
16877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16878 { (eval echo "$as_me:16878: \"$ac_try\"") >&5
16879 (eval $ac_try) 2>&5
16881 echo "$as_me:16881: \$? = $ac_status" >&5
16882 (exit $ac_status); }; }; then
16885 echo "$as_me: program exited with status $ac_status" >&5
16886 echo "$as_me: failed program was:" >&5
16887 cat conftest.$ac_ext >&5
16890 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16892 echo "$as_me:16892: result: $cf_result" >&5
16893 echo "${ECHO_T}$cf_result" >&6
16894 if test $cf_result = yes ; then
16896 cf_result=`echo "decl_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16898 cat >>confdefs.h <<EOF
16899 #define $cf_result 1
16905 if ( test "$GCC" = yes || test "$GXX" = yes )
16907 echo "$as_me:16907: checking if you want to turn on gcc warnings" >&5
16908 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16910 # Check whether --enable-warnings or --disable-warnings was given.
16911 if test "${enable_warnings+set}" = set; then
16912 enableval="$enable_warnings"
16913 test "$enableval" != yes && enableval=no
16914 if test "$enableval" != "no" ; then
16924 echo "$as_me:16924: result: $with_warnings" >&5
16925 echo "${ECHO_T}$with_warnings" >&6
16926 if test "$with_warnings" = "yes"
16929 if test "$GCC" = yes
16931 cat > conftest.i <<EOF
16933 #define GCC_PRINTF 0
16936 #define GCC_SCANF 0
16938 #ifndef GCC_NORETURN
16939 #define GCC_NORETURN /* nothing */
16942 #define GCC_UNUSED /* nothing */
16945 if test "$GCC" = yes
16947 { echo "$as_me:16947: checking for $CC __attribute__ directives..." >&5
16948 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16949 cat > conftest.$ac_ext <<EOF
16950 #line 16950 "${as_me:-configure}"
16951 #include "confdefs.h"
16952 #include "conftest.h"
16953 #include "conftest.i"
16955 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16957 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16960 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16962 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16964 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16965 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16966 extern void foo(void) GCC_NORETURN;
16967 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16969 cf_printf_attribute=no
16970 cf_scanf_attribute=no
16971 for cf_attribute in scanf printf unused noreturn
16974 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16976 cf_directive="__attribute__(($cf_attribute))"
16977 echo "checking for $CC $cf_directive" 1>&5
16979 case $cf_attribute in
16981 cf_printf_attribute=yes
16982 cat >conftest.h <<EOF
16983 #define GCC_$cf_ATTRIBUTE 1
16987 cf_scanf_attribute=yes
16988 cat >conftest.h <<EOF
16989 #define GCC_$cf_ATTRIBUTE 1
16993 cat >conftest.h <<EOF
16994 #define GCC_$cf_ATTRIBUTE $cf_directive
16999 if { (eval echo "$as_me:16999: \"$ac_compile\"") >&5
17000 (eval $ac_compile) 2>&5
17002 echo "$as_me:17002: \$? = $ac_status" >&5
17003 (exit $ac_status); }; then
17004 test -n "$verbose" && echo "$as_me:17004: result: ... $cf_attribute" >&5
17005 echo "${ECHO_T}... $cf_attribute" >&6
17006 cat conftest.h >>confdefs.h
17007 case $cf_attribute in
17010 cat >>confdefs.h <<EOF
17011 #define GCC_NORETURN $cf_directive
17016 cf_value='/* nothing */'
17017 if test "$cf_printf_attribute" != no ; then
17018 cf_value='__attribute__((format(printf,fmt,var)))'
17020 cat >>confdefs.h <<\EOF
17021 #define GCC_PRINTF 1
17026 cat >>confdefs.h <<EOF
17027 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17032 cf_value='/* nothing */'
17033 if test "$cf_scanf_attribute" != no ; then
17034 cf_value='__attribute__((format(scanf,fmt,var)))'
17036 cat >>confdefs.h <<\EOF
17037 #define GCC_SCANF 1
17042 cat >>confdefs.h <<EOF
17043 #define GCC_SCANFLIKE(fmt,var) $cf_value
17049 cat >>confdefs.h <<EOF
17050 #define GCC_UNUSED $cf_directive
17058 fgrep define conftest.i >>confdefs.h
17065 if test "$GCC" = yes ; then
17068 echo "$as_me:17068: checking if this is really Intel C compiler" >&5
17069 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17070 cf_save_CFLAGS="$CFLAGS"
17071 CFLAGS="$CFLAGS -no-gcc"
17072 cat >conftest.$ac_ext <<_ACEOF
17073 #line 17073 "configure"
17074 #include "confdefs.h"
17080 #ifdef __INTEL_COMPILER
17089 rm -f conftest.$ac_objext
17090 if { (eval echo "$as_me:17090: \"$ac_compile\"") >&5
17091 (eval $ac_compile) 2>&5
17093 echo "$as_me:17093: \$? = $ac_status" >&5
17094 (exit $ac_status); } &&
17095 { ac_try='test -s conftest.$ac_objext'
17096 { (eval echo "$as_me:17096: \"$ac_try\"") >&5
17097 (eval $ac_try) 2>&5
17099 echo "$as_me:17099: \$? = $ac_status" >&5
17100 (exit $ac_status); }; }; then
17102 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17105 echo "$as_me: failed program was:" >&5
17106 cat conftest.$ac_ext >&5
17108 rm -f conftest.$ac_objext conftest.$ac_ext
17109 CFLAGS="$cf_save_CFLAGS"
17110 echo "$as_me:17110: result: $INTEL_COMPILER" >&5
17111 echo "${ECHO_T}$INTEL_COMPILER" >&6
17118 if test "$GCC" = yes ; then
17119 echo "$as_me:17119: checking if this is really Clang C compiler" >&5
17120 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17121 cf_save_CFLAGS="$CFLAGS"
17122 CFLAGS="$CFLAGS -Qunused-arguments"
17123 cat >conftest.$ac_ext <<_ACEOF
17124 #line 17124 "configure"
17125 #include "confdefs.h"
17140 rm -f conftest.$ac_objext
17141 if { (eval echo "$as_me:17141: \"$ac_compile\"") >&5
17142 (eval $ac_compile) 2>&5
17144 echo "$as_me:17144: \$? = $ac_status" >&5
17145 (exit $ac_status); } &&
17146 { ac_try='test -s conftest.$ac_objext'
17147 { (eval echo "$as_me:17147: \"$ac_try\"") >&5
17148 (eval $ac_try) 2>&5
17150 echo "$as_me:17150: \$? = $ac_status" >&5
17151 (exit $ac_status); }; }; then
17153 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17156 echo "$as_me: failed program was:" >&5
17157 cat conftest.$ac_ext >&5
17159 rm -f conftest.$ac_objext conftest.$ac_ext
17160 CFLAGS="$cf_save_CFLAGS"
17161 echo "$as_me:17161: result: $CLANG_COMPILER" >&5
17162 echo "${ECHO_T}$CLANG_COMPILER" >&6
17165 cat > conftest.$ac_ext <<EOF
17166 #line 17166 "${as_me:-configure}"
17167 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17170 if test "$INTEL_COMPILER" = yes
17172 # The "-wdXXX" options suppress warnings:
17173 # remark #1419: external declaration in primary source file
17174 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17175 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17176 # remark #193: zero used for undefined preprocessing identifier
17177 # remark #593: variable "curs_sb_left_arrow" was set but never used
17178 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17179 # remark #869: parameter "tw" was never referenced
17180 # remark #981: operands are evaluated in unspecified order
17181 # warning #279: controlling expression is constant
17183 { echo "$as_me:17183: checking for $CC warning options..." >&5
17184 echo "$as_me: checking for $CC warning options..." >&6;}
17185 cf_save_CFLAGS="$CFLAGS"
17186 EXTRA_CFLAGS="-Wall"
17198 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17199 if { (eval echo "$as_me:17199: \"$ac_compile\"") >&5
17200 (eval $ac_compile) 2>&5
17202 echo "$as_me:17202: \$? = $ac_status" >&5
17203 (exit $ac_status); }; then
17204 test -n "$verbose" && echo "$as_me:17204: result: ... -$cf_opt" >&5
17205 echo "${ECHO_T}... -$cf_opt" >&6
17206 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17209 CFLAGS="$cf_save_CFLAGS"
17211 elif test "$GCC" = yes
17213 { echo "$as_me:17213: checking for $CC warning options..." >&5
17214 echo "$as_me: checking for $CC warning options..." >&6;}
17215 cf_save_CFLAGS="$CFLAGS"
17218 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17219 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17220 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17221 for cf_opt in W Wall \
17222 Wbad-function-cast \
17225 Wdeclaration-after-statement \
17228 Wmissing-declarations \
17229 Wmissing-prototypes \
17233 Wstrict-prototypes \
17234 Wundef $cf_gcc_warnings $cf_warn_CONST
17236 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17237 if { (eval echo "$as_me:17237: \"$ac_compile\"") >&5
17238 (eval $ac_compile) 2>&5
17240 echo "$as_me:17240: \$? = $ac_status" >&5
17241 (exit $ac_status); }; then
17242 test -n "$verbose" && echo "$as_me:17242: result: ... -$cf_opt" >&5
17243 echo "${ECHO_T}... -$cf_opt" >&6
17246 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17249 case $GCC_VERSION in
17251 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17253 echo "${as_me:-configure}:17253: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17259 case $GCC_VERSION in
17261 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17263 echo "${as_me:-configure}:17263: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17269 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17272 CFLAGS="$cf_save_CFLAGS"
17279 echo "$as_me:17279: checking if you want to use dmalloc for testing" >&5
17280 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17282 # Check whether --with-dmalloc or --without-dmalloc was given.
17283 if test "${with_dmalloc+set}" = set; then
17284 withval="$with_dmalloc"
17286 cat >>confdefs.h <<EOF
17287 #define USE_DMALLOC 1
17290 : ${with_cflags:=-g}
17291 : ${with_no_leaks:=yes}
17296 echo "$as_me:17296: result: ${with_dmalloc:-no}" >&5
17297 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17299 case .$with_cflags in
17309 cf_new_extra_cppflags=
17311 for cf_add_cflags in -g
17313 case $cf_fix_cppflags in
17315 case $cf_add_cflags in
17316 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17317 case $cf_add_cflags in
17319 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17321 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17322 && test -z "${cf_tst_cflags}" \
17323 && cf_fix_cppflags=yes
17325 if test $cf_fix_cppflags = yes ; then
17326 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17328 elif test "${cf_tst_cflags}" = "\"'" ; then
17329 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17334 case "$CPPFLAGS" in
17338 case $cf_add_cflags in
17340 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17342 CPPFLAGS=`echo "$CPPFLAGS" | \
17343 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17344 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17348 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17353 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17358 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17360 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17362 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17363 && test -z "${cf_tst_cflags}" \
17364 && cf_fix_cppflags=no
17369 if test -n "$cf_new_cflags" ; then
17371 CFLAGS="$CFLAGS $cf_new_cflags"
17374 if test -n "$cf_new_cppflags" ; then
17376 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17379 if test -n "$cf_new_extra_cppflags" ; then
17381 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17389 if test "$with_dmalloc" = yes ; then
17390 echo "$as_me:17390: checking for dmalloc.h" >&5
17391 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17392 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17393 echo $ECHO_N "(cached) $ECHO_C" >&6
17395 cat >conftest.$ac_ext <<_ACEOF
17396 #line 17396 "configure"
17397 #include "confdefs.h"
17398 #include <dmalloc.h>
17400 if { (eval echo "$as_me:17400: \"$ac_cpp conftest.$ac_ext\"") >&5
17401 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17403 egrep -v '^ *\+' conftest.er1 >conftest.err
17405 cat conftest.err >&5
17406 echo "$as_me:17406: \$? = $ac_status" >&5
17407 (exit $ac_status); } >/dev/null; then
17408 if test -s conftest.err; then
17409 ac_cpp_err=$ac_c_preproc_warn_flag
17416 if test -z "$ac_cpp_err"; then
17417 ac_cv_header_dmalloc_h=yes
17419 echo "$as_me: failed program was:" >&5
17420 cat conftest.$ac_ext >&5
17421 ac_cv_header_dmalloc_h=no
17423 rm -f conftest.err conftest.$ac_ext
17425 echo "$as_me:17425: result: $ac_cv_header_dmalloc_h" >&5
17426 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17427 if test $ac_cv_header_dmalloc_h = yes; then
17429 echo "$as_me:17429: checking for dmalloc_debug in -ldmalloc" >&5
17430 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17431 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17432 echo $ECHO_N "(cached) $ECHO_C" >&6
17434 ac_check_lib_save_LIBS=$LIBS
17435 LIBS="-ldmalloc $LIBS"
17436 cat >conftest.$ac_ext <<_ACEOF
17437 #line 17437 "configure"
17438 #include "confdefs.h"
17440 /* Override any gcc2 internal prototype to avoid an error. */
17444 /* We use char because int might match the return type of a gcc2
17445 builtin and then its argument prototype would still apply. */
17446 char dmalloc_debug ();
17455 rm -f conftest.$ac_objext conftest$ac_exeext
17456 if { (eval echo "$as_me:17456: \"$ac_link\"") >&5
17457 (eval $ac_link) 2>&5
17459 echo "$as_me:17459: \$? = $ac_status" >&5
17460 (exit $ac_status); } &&
17461 { ac_try='test -s conftest$ac_exeext'
17462 { (eval echo "$as_me:17462: \"$ac_try\"") >&5
17463 (eval $ac_try) 2>&5
17465 echo "$as_me:17465: \$? = $ac_status" >&5
17466 (exit $ac_status); }; }; then
17467 ac_cv_lib_dmalloc_dmalloc_debug=yes
17469 echo "$as_me: failed program was:" >&5
17470 cat conftest.$ac_ext >&5
17471 ac_cv_lib_dmalloc_dmalloc_debug=no
17473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17474 LIBS=$ac_check_lib_save_LIBS
17476 echo "$as_me:17476: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17477 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17478 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17479 cat >>confdefs.h <<EOF
17480 #define HAVE_LIBDMALLOC 1
17483 LIBS="-ldmalloc $LIBS"
17491 echo "$as_me:17491: checking if you want to use dbmalloc for testing" >&5
17492 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17494 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17495 if test "${with_dbmalloc+set}" = set; then
17496 withval="$with_dbmalloc"
17498 cat >>confdefs.h <<EOF
17499 #define USE_DBMALLOC 1
17502 : ${with_cflags:=-g}
17503 : ${with_no_leaks:=yes}
17508 echo "$as_me:17508: result: ${with_dbmalloc:-no}" >&5
17509 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17511 case .$with_cflags in
17521 cf_new_extra_cppflags=
17523 for cf_add_cflags in -g
17525 case $cf_fix_cppflags in
17527 case $cf_add_cflags in
17528 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17529 case $cf_add_cflags in
17531 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17533 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17534 && test -z "${cf_tst_cflags}" \
17535 && cf_fix_cppflags=yes
17537 if test $cf_fix_cppflags = yes ; then
17538 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17540 elif test "${cf_tst_cflags}" = "\"'" ; then
17541 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17546 case "$CPPFLAGS" in
17550 case $cf_add_cflags in
17552 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17554 CPPFLAGS=`echo "$CPPFLAGS" | \
17555 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17556 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17560 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17565 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17570 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17572 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17574 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17575 && test -z "${cf_tst_cflags}" \
17576 && cf_fix_cppflags=no
17581 if test -n "$cf_new_cflags" ; then
17583 CFLAGS="$CFLAGS $cf_new_cflags"
17586 if test -n "$cf_new_cppflags" ; then
17588 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17591 if test -n "$cf_new_extra_cppflags" ; then
17593 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17601 if test "$with_dbmalloc" = yes ; then
17602 echo "$as_me:17602: checking for dbmalloc.h" >&5
17603 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17604 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17605 echo $ECHO_N "(cached) $ECHO_C" >&6
17607 cat >conftest.$ac_ext <<_ACEOF
17608 #line 17608 "configure"
17609 #include "confdefs.h"
17610 #include <dbmalloc.h>
17612 if { (eval echo "$as_me:17612: \"$ac_cpp conftest.$ac_ext\"") >&5
17613 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17615 egrep -v '^ *\+' conftest.er1 >conftest.err
17617 cat conftest.err >&5
17618 echo "$as_me:17618: \$? = $ac_status" >&5
17619 (exit $ac_status); } >/dev/null; then
17620 if test -s conftest.err; then
17621 ac_cpp_err=$ac_c_preproc_warn_flag
17628 if test -z "$ac_cpp_err"; then
17629 ac_cv_header_dbmalloc_h=yes
17631 echo "$as_me: failed program was:" >&5
17632 cat conftest.$ac_ext >&5
17633 ac_cv_header_dbmalloc_h=no
17635 rm -f conftest.err conftest.$ac_ext
17637 echo "$as_me:17637: result: $ac_cv_header_dbmalloc_h" >&5
17638 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17639 if test $ac_cv_header_dbmalloc_h = yes; then
17641 echo "$as_me:17641: checking for debug_malloc in -ldbmalloc" >&5
17642 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17643 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17644 echo $ECHO_N "(cached) $ECHO_C" >&6
17646 ac_check_lib_save_LIBS=$LIBS
17647 LIBS="-ldbmalloc $LIBS"
17648 cat >conftest.$ac_ext <<_ACEOF
17649 #line 17649 "configure"
17650 #include "confdefs.h"
17652 /* Override any gcc2 internal prototype to avoid an error. */
17656 /* We use char because int might match the return type of a gcc2
17657 builtin and then its argument prototype would still apply. */
17658 char debug_malloc ();
17667 rm -f conftest.$ac_objext conftest$ac_exeext
17668 if { (eval echo "$as_me:17668: \"$ac_link\"") >&5
17669 (eval $ac_link) 2>&5
17671 echo "$as_me:17671: \$? = $ac_status" >&5
17672 (exit $ac_status); } &&
17673 { ac_try='test -s conftest$ac_exeext'
17674 { (eval echo "$as_me:17674: \"$ac_try\"") >&5
17675 (eval $ac_try) 2>&5
17677 echo "$as_me:17677: \$? = $ac_status" >&5
17678 (exit $ac_status); }; }; then
17679 ac_cv_lib_dbmalloc_debug_malloc=yes
17681 echo "$as_me: failed program was:" >&5
17682 cat conftest.$ac_ext >&5
17683 ac_cv_lib_dbmalloc_debug_malloc=no
17685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17686 LIBS=$ac_check_lib_save_LIBS
17688 echo "$as_me:17688: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17689 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17690 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17691 cat >>confdefs.h <<EOF
17692 #define HAVE_LIBDBMALLOC 1
17695 LIBS="-ldbmalloc $LIBS"
17703 echo "$as_me:17703: checking if you want to use valgrind for testing" >&5
17704 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17706 # Check whether --with-valgrind or --without-valgrind was given.
17707 if test "${with_valgrind+set}" = set; then
17708 withval="$with_valgrind"
17710 cat >>confdefs.h <<EOF
17711 #define USE_VALGRIND 1
17714 : ${with_cflags:=-g}
17715 : ${with_no_leaks:=yes}
17720 echo "$as_me:17720: result: ${with_valgrind:-no}" >&5
17721 echo "${ECHO_T}${with_valgrind:-no}" >&6
17723 case .$with_cflags in
17733 cf_new_extra_cppflags=
17735 for cf_add_cflags in -g
17737 case $cf_fix_cppflags in
17739 case $cf_add_cflags in
17740 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17741 case $cf_add_cflags in
17743 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17746 && test -z "${cf_tst_cflags}" \
17747 && cf_fix_cppflags=yes
17749 if test $cf_fix_cppflags = yes ; then
17750 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17752 elif test "${cf_tst_cflags}" = "\"'" ; then
17753 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17758 case "$CPPFLAGS" in
17762 case $cf_add_cflags in
17764 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17766 CPPFLAGS=`echo "$CPPFLAGS" | \
17767 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17768 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17772 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17777 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17782 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17784 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17786 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17787 && test -z "${cf_tst_cflags}" \
17788 && cf_fix_cppflags=no
17793 if test -n "$cf_new_cflags" ; then
17795 CFLAGS="$CFLAGS $cf_new_cflags"
17798 if test -n "$cf_new_cppflags" ; then
17800 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17803 if test -n "$cf_new_extra_cppflags" ; then
17805 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17813 echo "$as_me:17813: checking if you want to perform memory-leak testing" >&5
17814 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17816 # Check whether --enable-leaks or --disable-leaks was given.
17817 if test "${enable_leaks+set}" = set; then
17818 enableval="$enable_leaks"
17819 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17821 : ${with_no_leaks:=no}
17823 echo "$as_me:17823: result: $with_no_leaks" >&5
17824 echo "${ECHO_T}$with_no_leaks" >&6
17826 if test "$with_no_leaks" = yes ; then
17828 cat >>confdefs.h <<\EOF
17832 cat >>confdefs.h <<\EOF
17833 #define YY_NO_LEAKS 1
17839 echo "$as_me:17839: checking for an rpath option" >&5
17840 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17841 case $cf_cv_system_name in
17843 if test "$GCC" = yes; then
17844 LD_RPATH_OPT="-Wl,-rpath,"
17846 LD_RPATH_OPT="-rpath "
17849 (linux*|gnu*|k*bsd*-gnu|freebsd*)
17850 LD_RPATH_OPT="-Wl,-rpath,"
17852 (openbsd[2-9].*|mirbsd*)
17853 LD_RPATH_OPT="-Wl,-rpath,"
17856 LD_RPATH_OPT="-rpath "
17859 LD_RPATH_OPT="-Wl,-rpath,"
17862 LD_RPATH_OPT="-rpath "
17870 echo "$as_me:17870: result: $LD_RPATH_OPT" >&5
17871 echo "${ECHO_T}$LD_RPATH_OPT" >&6
17873 case "x$LD_RPATH_OPT" in
17875 echo "$as_me:17875: checking if we need a space after rpath option" >&5
17876 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17877 cf_save_LIBS="$LIBS"
17879 cf_add_libs="${LD_RPATH_OPT}$libdir"
17880 # Filter out duplicates - this happens with badly-designed ".pc" files...
17881 for cf_add_1lib in $LIBS
17883 for cf_add_2lib in $cf_add_libs
17885 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17891 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17893 LIBS="$cf_add_libs"
17895 cat >conftest.$ac_ext <<_ACEOF
17896 #line 17896 "configure"
17897 #include "confdefs.h"
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
17921 echo "$as_me: failed program was:" >&5
17922 cat conftest.$ac_ext >&5
17925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17926 LIBS="$cf_save_LIBS"
17927 echo "$as_me:17927: result: $cf_rpath_space" >&5
17928 echo "${ECHO_T}$cf_rpath_space" >&6
17929 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17933 echo "$as_me:17933: checking if rpath-hack should be disabled" >&5
17934 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17936 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17937 if test "${enable_rpath_hack+set}" = set; then
17938 enableval="$enable_rpath_hack"
17939 test "$enableval" != no && enableval=yes
17940 if test "$enableval" != "yes" ; then
17941 cf_disable_rpath_hack=yes
17943 cf_disable_rpath_hack=no
17947 cf_disable_rpath_hack=no
17950 echo "$as_me:17950: result: $cf_disable_rpath_hack" >&5
17951 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17952 if test "$cf_disable_rpath_hack" = no ; then
17954 echo "$as_me:17954: checking for updated LDFLAGS" >&5
17955 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17956 if test -n "$LD_RPATH_OPT" ; then
17957 echo "$as_me:17957: result: maybe" >&5
17958 echo "${ECHO_T}maybe" >&6
17962 # Extract the first word of "$ac_prog", so it can be a program name with args.
17963 set dummy $ac_prog; ac_word=$2
17964 echo "$as_me:17964: checking for $ac_word" >&5
17965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17966 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17967 echo $ECHO_N "(cached) $ECHO_C" >&6
17969 if test -n "$cf_ldd_prog"; then
17970 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17972 ac_save_IFS=$IFS; IFS=$ac_path_separator
17974 for ac_dir in $ac_dummy; do
17976 test -z "$ac_dir" && ac_dir=.
17977 $as_executable_p "$ac_dir/$ac_word" || continue
17978 ac_cv_prog_cf_ldd_prog="$ac_prog"
17979 echo "$as_me:17979: found $ac_dir/$ac_word" >&5
17985 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17986 if test -n "$cf_ldd_prog"; then
17987 echo "$as_me:17987: result: $cf_ldd_prog" >&5
17988 echo "${ECHO_T}$cf_ldd_prog" >&6
17990 echo "$as_me:17990: result: no" >&5
17991 echo "${ECHO_T}no" >&6
17994 test -n "$cf_ldd_prog" && break
17996 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
17998 cf_rpath_list="/usr/lib /lib"
17999 if test "$cf_ldd_prog" != no
18003 cat >conftest.$ac_ext <<_ACEOF
18004 #line 18004 "configure"
18005 #include "confdefs.h"
18015 rm -f conftest.$ac_objext conftest$ac_exeext
18016 if { (eval echo "$as_me:18016: \"$ac_link\"") >&5
18017 (eval $ac_link) 2>&5
18019 echo "$as_me:18019: \$? = $ac_status" >&5
18020 (exit $ac_status); } &&
18021 { ac_try='test -s conftest$ac_exeext'
18022 { (eval echo "$as_me:18022: \"$ac_try\"") >&5
18023 (eval $ac_try) 2>&5
18025 echo "$as_me:18025: \$? = $ac_status" >&5
18026 (exit $ac_status); }; }; then
18027 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
18028 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
18030 echo "$as_me: failed program was:" >&5
18031 cat conftest.$ac_ext >&5
18033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18035 # If we passed the link-test, but get a "not found" on a given library,
18036 # this could be due to inept reconfiguration of gcc to make it only
18037 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
18038 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
18039 # /usr/local libraries.
18040 if test -n "$cf_rpath_oops"
18042 for cf_rpath_src in $cf_rpath_oops
18044 for cf_rpath_dir in \
18049 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18051 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18053 echo "${as_me:-configure}:18053: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18055 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18063 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18065 echo "${as_me:-configure}:18065: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18067 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18069 echo "${as_me:-configure}:18069: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18072 for cf_rpath_src in $LDFLAGS
18074 case $cf_rpath_src in
18077 # check if this refers to a directory which we will ignore
18079 if test -n "$cf_rpath_list"
18081 for cf_rpath_item in $cf_rpath_list
18083 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18091 if test "$cf_rpath_skip" = no
18093 # transform the option
18094 if test "$LD_RPATH_OPT" = "-R " ; then
18095 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18097 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18100 # if we have not already added this, add it now
18101 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18102 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18104 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18106 echo "${as_me:-configure}:18106: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18108 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18113 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18115 LDFLAGS=$cf_rpath_dst
18117 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18119 echo "${as_me:-configure}:18119: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18121 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18123 echo "${as_me:-configure}:18123: testing ...checking LIBS $LIBS ..." 1>&5
18126 for cf_rpath_src in $LIBS
18128 case $cf_rpath_src in
18131 # check if this refers to a directory which we will ignore
18133 if test -n "$cf_rpath_list"
18135 for cf_rpath_item in $cf_rpath_list
18137 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18145 if test "$cf_rpath_skip" = no
18147 # transform the option
18148 if test "$LD_RPATH_OPT" = "-R " ; then
18149 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18151 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18154 # if we have not already added this, add it now
18155 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18156 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18158 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18160 echo "${as_me:-configure}:18160: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18162 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18167 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18171 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18173 echo "${as_me:-configure}:18173: testing ...checked LIBS $LIBS ..." 1>&5
18175 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18177 echo "${as_me:-configure}:18177: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18180 echo "$as_me:18180: result: no" >&5
18181 echo "${ECHO_T}no" >&6
18189 ac_config_files="$ac_config_files Makefile"
18190 ac_config_commands="$ac_config_commands default"
18191 cat >confcache <<\_ACEOF
18192 # This file is a shell script that caches the results of configure
18193 # tests run on this system so they can be shared between configure
18194 # scripts and configure runs, see configure's option --config-cache.
18195 # It is not useful on other systems. If it contains results you don't
18196 # want to keep, you may remove or edit it.
18198 # config.status only pays attention to the cache file if you give it
18199 # the --recheck option to rerun configure.
18201 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18202 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18203 # following values.
18207 # The following way of writing the cache mishandles newlines in values,
18208 # but we know of no workaround that is simple, portable, and efficient.
18209 # So, don't put newlines in cache variables' values.
18210 # Ultrix sh set writes to stderr and can't be redirected directly,
18211 # and sets the high bit in the cache file unless we assign to the vars.
18214 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18216 # `set' does not quote correctly, so add quotes (double-quote
18217 # substitution turns \\\\ into \\, and sed turns \\ into \).
18220 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18223 # `set' quotes correctly as required by POSIX, so do not add quotes.
18225 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18232 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18234 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18236 if cmp -s $cache_file confcache; then :; else
18237 if test -w $cache_file; then
18238 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18239 cat confcache >$cache_file
18241 echo "not updating unwritable cache $cache_file"
18246 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18247 # Let make expand exec_prefix.
18248 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18250 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18251 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18252 # trailing colons and then remove the whole line if VPATH becomes empty
18253 # (actually we leave an empty line to preserve line numbers).
18254 if test "x$srcdir" = x.; then
18255 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18256 s/:*\$(srcdir):*/:/;
18257 s/:*\${srcdir}:*/:/;
18259 s/^\([^=]*=[ ]*\):*/\1/;
18265 DEFS=-DHAVE_CONFIG_H
18267 : ${CONFIG_STATUS=./config.status}
18268 ac_clean_files_save=$ac_clean_files
18269 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18270 { echo "$as_me:18270: creating $CONFIG_STATUS" >&5
18271 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18272 cat >$CONFIG_STATUS <<_ACEOF
18274 # Generated automatically by configure.
18275 # Run this file to recreate the current configuration.
18276 # Compiler output produced by configure, useful for debugging
18277 # configure, is in config.log if it exists.
18280 SHELL=\${CONFIG_SHELL-$SHELL}
18281 ac_cs_invocation="\$0 \$@"
18285 cat >>$CONFIG_STATUS <<\_ACEOF
18286 # Be Bourne compatible
18287 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18290 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18294 # Name of the executable.
18295 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18297 if expr a : '\(a\)' >/dev/null 2>&1; then
18303 rm -f conf$$ conf$$.exe conf$$.file
18305 if ln -s conf$$.file conf$$ 2>/dev/null; then
18306 # We could just check for DJGPP; but this test a) works b) is more generic
18307 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18308 if test -f conf$$.exe; then
18309 # Don't use ln at all; we don't have any links
18314 elif ln conf$$.file conf$$ 2>/dev/null; then
18319 rm -f conf$$ conf$$.exe conf$$.file
18321 as_executable_p="test -f"
18323 # Support unset when possible.
18324 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18331 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18332 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18333 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18334 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18335 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18336 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18337 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18338 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18341 # We need space, tab and new line, in precisely that order.
18347 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18353 # Files that config.status was made for.
18354 if test -n "$ac_config_files"; then
18355 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18358 if test -n "$ac_config_headers"; then
18359 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18362 if test -n "$ac_config_links"; then
18363 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18366 if test -n "$ac_config_commands"; then
18367 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18370 cat >>$CONFIG_STATUS <<\EOF
18373 \`$as_me' instantiates files from templates according to the
18374 current configuration.
18376 Usage: $0 [OPTIONS] [FILE]...
18378 -h, --help print this help, then exit
18379 -V, --version print version number, then exit
18380 -d, --debug don't remove temporary files
18381 --recheck update $as_me by reconfiguring in the same conditions
18382 --file=FILE[:TEMPLATE]
18383 instantiate the configuration file FILE
18384 --header=FILE[:TEMPLATE]
18385 instantiate the configuration header FILE
18387 Configuration files:
18390 Configuration headers:
18393 Configuration commands:
18396 Report bugs to <dickey@invisible-island.net>."
18399 cat >>$CONFIG_STATUS <<EOF
18402 configured by $0, generated by GNU Autoconf 2.52.20150926,
18403 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18405 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18406 Free Software Foundation, Inc.
18407 This config.status script is free software; the Free Software Foundation
18408 gives unlimited permission to copy, distribute and modify it."
18413 cat >>$CONFIG_STATUS <<\EOF
18414 # If no file are specified by the user, then we need to provide default
18415 # value. By we need to know if files were specified by the user.
18421 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18422 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18424 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18428 *) # This is not an option, so the user has probably given explicit
18430 ac_need_defaults=false;;
18434 # Handling of the options.
18436 cat >>$CONFIG_STATUS <<EOF
18437 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18438 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18439 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18441 cat >>$CONFIG_STATUS <<\EOF
18442 --version | --vers* | -V )
18443 echo "$ac_cs_version"; exit 0 ;;
18445 # Conflict between --help and --header
18446 { { echo "$as_me:18446: error: ambiguous option: $1
18447 Try \`$0 --help' for more information." >&5
18448 echo "$as_me: error: ambiguous option: $1
18449 Try \`$0 --help' for more information." >&2;}
18450 { (exit 1); exit 1; }; };;
18451 --help | --hel | -h )
18452 echo "$ac_cs_usage"; exit 0 ;;
18453 --debug | --d* | -d )
18455 --file | --fil | --fi | --f )
18457 CONFIG_FILES="$CONFIG_FILES $1"
18458 ac_need_defaults=false;;
18459 --header | --heade | --head | --hea )
18461 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18462 ac_need_defaults=false;;
18464 # This is an error.
18465 -*) { { echo "$as_me:18465: error: unrecognized option: $1
18466 Try \`$0 --help' for more information." >&5
18467 echo "$as_me: error: unrecognized option: $1
18468 Try \`$0 --help' for more information." >&2;}
18469 { (exit 1); exit 1; }; } ;;
18471 *) ac_config_targets="$ac_config_targets $1" ;;
18480 ## ----------------------- ##
18481 ## Running config.status. ##
18482 ## ----------------------- ##
18484 This file was extended by $as_me 2.52.20150926, executed with
18485 CONFIG_FILES = $CONFIG_FILES
18486 CONFIG_HEADERS = $CONFIG_HEADERS
18487 CONFIG_LINKS = $CONFIG_LINKS
18488 CONFIG_COMMANDS = $CONFIG_COMMANDS
18489 > $ac_cs_invocation
18490 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18495 cat >>$CONFIG_STATUS <<EOF
18497 # INIT-COMMANDS section.
18507 cat >>$CONFIG_STATUS <<\EOF
18508 for ac_config_target in $ac_config_targets
18510 case "$ac_config_target" in
18511 # Handling of arguments.
18512 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18513 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18514 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18515 *) { { echo "$as_me:18515: error: invalid argument: $ac_config_target" >&5
18516 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18517 { (exit 1); exit 1; }; };;
18521 # If the user did not use the arguments to specify the items to instantiate,
18522 # then the envvar interface is used. Set only those that are not.
18523 # We use the long form for the default assignment because of an extremely
18524 # bizarre bug on SunOS 4.1.3.
18525 if $ac_need_defaults; then
18526 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18527 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18528 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18531 # Create a temporary directory, and hook for its removal unless debugging.
18534 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18535 trap '{ (exit 1); exit 1; }' 1 2 13 15
18538 # Create a (secure) tmp directory for tmp files.
18541 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18542 test -n "$tmp" && test -d "$tmp"
18545 tmp=$TMPDIR/cs$$-$RANDOM
18546 (umask 077 && mkdir $tmp)
18549 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18550 { (exit 1); exit 1; }
18555 cat >>$CONFIG_STATUS <<EOF
18558 # CONFIG_FILES section.
18561 # No need to generate the scripts if there are no CONFIG_FILES.
18562 # This happens for instance when ./config.status config.h
18563 if test -n "\$CONFIG_FILES"; then
18564 # Protect against being on the right side of a sed subst in config.status.
18565 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18566 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18567 s,@SHELL@,$SHELL,;t t
18568 s,@exec_prefix@,$exec_prefix,;t t
18569 s,@prefix@,$prefix,;t t
18570 s,@program_transform_name@,$program_transform_name,;t t
18571 s,@bindir@,$bindir,;t t
18572 s,@sbindir@,$sbindir,;t t
18573 s,@libexecdir@,$libexecdir,;t t
18574 s,@datarootdir@,$datarootdir,;t t
18575 s,@datadir@,$datadir,;t t
18576 s,@sysconfdir@,$sysconfdir,;t t
18577 s,@sharedstatedir@,$sharedstatedir,;t t
18578 s,@localstatedir@,$localstatedir,;t t
18579 s,@libdir@,$libdir,;t t
18580 s,@includedir@,$includedir,;t t
18581 s,@oldincludedir@,$oldincludedir,;t t
18582 s,@infodir@,$infodir,;t t
18583 s,@mandir@,$mandir,;t t
18584 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18585 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18586 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18587 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18588 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18589 s,@build_alias@,$build_alias,;t t
18590 s,@host_alias@,$host_alias,;t t
18591 s,@target_alias@,$target_alias,;t t
18592 s,@ECHO_C@,$ECHO_C,;t t
18593 s,@ECHO_N@,$ECHO_N,;t t
18594 s,@ECHO_T@,$ECHO_T,;t t
18595 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18596 s,@DEFS@,$DEFS,;t t
18597 s,@LIBS@,$LIBS,;t t
18598 s,@build@,$build,;t t
18599 s,@build_cpu@,$build_cpu,;t t
18600 s,@build_vendor@,$build_vendor,;t t
18601 s,@build_os@,$build_os,;t t
18602 s,@host@,$host,;t t
18603 s,@host_cpu@,$host_cpu,;t t
18604 s,@host_vendor@,$host_vendor,;t t
18605 s,@host_os@,$host_os,;t t
18606 s,@SET_MAKE@,$SET_MAKE,;t t
18608 s,@CFLAGS@,$CFLAGS,;t t
18609 s,@LDFLAGS@,$LDFLAGS,;t t
18610 s,@CPPFLAGS@,$CPPFLAGS,;t t
18611 s,@ac_ct_CC@,$ac_ct_CC,;t t
18612 s,@EXEEXT@,$EXEEXT,;t t
18613 s,@OBJEXT@,$OBJEXT,;t t
18614 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18617 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18618 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18619 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18620 s,@LINT@,$LINT,;t t
18621 s,@LINT_OPTS@,$LINT_OPTS,;t t
18622 s,@CTAGS@,$CTAGS,;t t
18623 s,@ETAGS@,$ETAGS,;t t
18624 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18625 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18626 s,@MATH_LIB@,$MATH_LIB,;t t
18627 s,@top_builddir@,$top_builddir,;t t
18628 s,@CC_G_OPT@,$CC_G_OPT,;t t
18629 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18630 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18631 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18632 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18634 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18635 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18636 s,@LD_MODEL@,$LD_MODEL,;t t
18637 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18638 s,@LIBTOOL@,$LIBTOOL,;t t
18639 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18640 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18641 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18642 s,@LIB_LINK@,$LIB_LINK,;t t
18643 s,@LINK_TESTS@,$LINK_TESTS,;t t
18644 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18645 s,@PACKAGE@,$PACKAGE,;t t
18646 s,@PTHREAD@,$PTHREAD,;t t
18647 s,@TEST_ARGS@,$TEST_ARGS,;t t
18648 s,@TEST_DEPS@,$TEST_DEPS,;t t
18649 s,@TEST_LIBS@,$TEST_LIBS,;t t
18650 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18651 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18652 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18653 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18654 s,@includesubdir@,$includesubdir,;t t
18655 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18656 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18657 s,@ECHO_LT@,$ECHO_LT,;t t
18658 s,@ECHO_LD@,$ECHO_LD,;t t
18659 s,@RULE_CC@,$RULE_CC,;t t
18660 s,@SHOW_CC@,$SHOW_CC,;t t
18661 s,@ECHO_CC@,$ECHO_CC,;t t
18662 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18663 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18664 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18665 s,@X_CFLAGS@,$X_CFLAGS,;t t
18666 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18667 s,@X_LIBS@,$X_LIBS,;t t
18668 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18669 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18670 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18671 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18672 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18673 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18678 cat >>$CONFIG_STATUS <<\EOF
18679 # Split the substitutions into bite-sized pieces for seds with
18680 # small command number limits, like on Digital OSF/1 and HP-UX.
18681 ac_max_sed_lines=48
18682 ac_sed_frag=1 # Number of current file.
18683 ac_beg=1 # First line for current file.
18684 ac_end=$ac_max_sed_lines # Line after last line for current file.
18687 while $ac_more_lines; do
18688 if test $ac_beg -gt 1; then
18689 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18691 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18693 if test ! -s $tmp/subs.frag; then
18694 ac_more_lines=false
18696 # The purpose of the label and of the branching condition is to
18697 # speed up the sed processing (if there are no `@' at all, there
18698 # is no need to browse any of the substitutions).
18699 # These are the two extra sed commands mentioned above.
18701 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18702 # It is possible to make a multiline substitution using escaped newlines.
18703 # Ensure that we do not split the substitution between script fragments.
18705 ac_END=`expr $ac_end + $ac_max_sed_lines`
18706 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18707 if test -s $tmp/subs.next; then
18708 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18709 if test ! -s $tmp/subs.edit; then
18710 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18711 if test ! -s $tmp/subs.edit; then
18712 if test $ac_beg -gt 1; then
18713 ac_end=`expr $ac_end - 1`
18720 if test -z "$ac_sed_cmds"; then
18721 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18723 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18725 ac_sed_frag=`expr $ac_sed_frag + 1`
18727 ac_end=`expr $ac_end + $ac_max_sed_lines`
18730 if test -z "$ac_sed_cmds"; then
18733 fi # test -n "$CONFIG_FILES"
18736 cat >>$CONFIG_STATUS <<\EOF
18737 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18738 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18740 - | *:- | *:-:* ) # input from stdin
18742 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18743 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18744 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18745 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18746 * ) ac_file_in=$ac_file.in ;;
18749 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18750 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18751 X"$ac_file" : 'X\(//\)[^/]' \| \
18752 X"$ac_file" : 'X\(//\)$' \| \
18753 X"$ac_file" : 'X\(/\)' \| \
18754 . : '\(.\)' 2>/dev/null ||
18756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18757 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18758 /^X\(\/\/\)$/{ s//\1/; q; }
18759 /^X\(\/\).*/{ s//\1/; q; }
18761 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18762 { case "$ac_dir" in
18763 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18767 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18768 case $as_mkdir_dir in
18769 # Skip DOS drivespec
18770 ?:) as_incr_dir=$as_mkdir_dir ;;
18772 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18773 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18778 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18779 # A "../" for each directory in $ac_dir_suffix.
18780 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18782 ac_dir_suffix= ac_dots=
18787 if test -z "$ac_dots"; then
18790 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18792 [\\/]* | ?:[\\/]* )
18793 ac_srcdir=$srcdir$ac_dir_suffix;
18794 ac_top_srcdir=$srcdir ;;
18795 *) # Relative path.
18796 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18797 ac_top_srcdir=$ac_dots$srcdir ;;
18801 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18802 *) ac_INSTALL=$ac_dots$INSTALL ;;
18805 if test x"$ac_file" != x-; then
18806 { echo "$as_me:18806: creating $ac_file" >&5
18807 echo "$as_me: creating $ac_file" >&6;}
18810 # Let's still pretend it is `configure' which instantiates (i.e., don't
18811 # use $as_me), people would be surprised to read:
18812 # /* config.h. Generated automatically by config.status. */
18813 configure_input="Generated automatically from `echo $ac_file_in |
18814 sed 's,.*/,,'` by configure."
18816 # First look for the input files in the build tree, otherwise in the
18818 ac_file_inputs=`IFS=:
18819 for f in $ac_file_in; do
18821 -) echo $tmp/stdin ;;
18823 # Absolute (can't be DOS-style, as IFS=:)
18824 test -f "$f" || { { echo "$as_me:18824: error: cannot find input file: $f" >&5
18825 echo "$as_me: error: cannot find input file: $f" >&2;}
18826 { (exit 1); exit 1; }; }
18829 if test -f "$f"; then
18832 elif test -f "$srcdir/$f"; then
18837 { { echo "$as_me:18837: error: cannot find input file: $f" >&5
18838 echo "$as_me: error: cannot find input file: $f" >&2;}
18839 { (exit 1); exit 1; }; }
18842 done` || { (exit 1); exit 1; }
18844 cat >>$CONFIG_STATUS <<\EOF
18845 ac_warn_datarootdir=no
18846 if test x"$ac_file" != x-; then
18847 for ac_item in $ac_file_inputs
18849 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18850 if test -n "$ac_seen"; then
18851 ac_used=`grep '@datarootdir@' $ac_item`
18852 if test -z "$ac_used"; then
18853 { echo "$as_me:18853: WARNING: datarootdir was used implicitly but not set:
18855 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18857 ac_warn_datarootdir=yes
18860 ac_seen=`grep '${datarootdir}' $ac_item`
18861 if test -n "$ac_seen"; then
18862 { echo "$as_me:18862: WARNING: datarootdir was used explicitly but not set:
18864 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18866 ac_warn_datarootdir=yes
18871 if test "x$ac_warn_datarootdir" = xyes; then
18872 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18876 cat >>$CONFIG_STATUS <<EOF
18880 cat >>$CONFIG_STATUS <<\EOF
18882 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18883 s,@configure_input@,$configure_input,;t t
18884 s,@srcdir@,$ac_srcdir,;t t
18885 s,@top_srcdir@,$ac_top_srcdir,;t t
18886 s,@INSTALL@,$ac_INSTALL,;t t
18887 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18889 if test x"$ac_file" != x-; then
18890 cp $tmp/out $ac_file
18892 for ac_name in prefix exec_prefix datarootdir
18894 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18895 if test -n "$ac_seen"; then
18896 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18897 if test -z "$ac_init"; then
18898 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18899 { echo "$as_me:18899: WARNING: Variable $ac_name is used but was not set:
18901 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18906 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18907 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18908 if test -s $tmp/out; then
18909 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18910 { echo "$as_me:18910: WARNING: Some variables may not be substituted:
18912 echo "$as_me: WARNING: Some variables may not be substituted:
18922 cat >>$CONFIG_STATUS <<\EOF
18925 # CONFIG_HEADER section.
18928 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18929 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18931 # ac_d sets the value in "#define NAME VALUE" lines.
18932 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18933 ac_dB='[ ].*$,\1#\2'
18936 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18937 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18938 ac_iB='\([ ]\),\1#\2define\3'
18941 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18942 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18943 ac_uB='$,\1#\2define\3'
18947 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18948 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18950 - | *:- | *:-:* ) # input from stdin
18952 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18953 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18954 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18955 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18956 * ) ac_file_in=$ac_file.in ;;
18959 test x"$ac_file" != x- && { echo "$as_me:18959: creating $ac_file" >&5
18960 echo "$as_me: creating $ac_file" >&6;}
18962 # First look for the input files in the build tree, otherwise in the
18964 ac_file_inputs=`IFS=:
18965 for f in $ac_file_in; do
18967 -) echo $tmp/stdin ;;
18969 # Absolute (can't be DOS-style, as IFS=:)
18970 test -f "$f" || { { echo "$as_me:18970: error: cannot find input file: $f" >&5
18971 echo "$as_me: error: cannot find input file: $f" >&2;}
18972 { (exit 1); exit 1; }; }
18975 if test -f "$f"; then
18978 elif test -f "$srcdir/$f"; then
18983 { { echo "$as_me:18983: error: cannot find input file: $f" >&5
18984 echo "$as_me: error: cannot find input file: $f" >&2;}
18985 { (exit 1); exit 1; }; }
18988 done` || { (exit 1); exit 1; }
18989 # Remove the trailing spaces.
18990 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18994 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18995 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18996 # be either 'cat' or 'sort'.
18997 cat confdefs.h | uniq >conftest.vals
18999 # Break up conftest.vals because some shells have a limit on
19000 # the size of here documents, and old seds have small limits too.
19002 rm -f conftest.tail
19003 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
19004 while grep . conftest.vals >/dev/null
19006 # Write chunks of a limited-size here document to conftest.frag.
19007 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19008 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19009 echo 'CEOF' >> $CONFIG_STATUS
19010 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19011 rm -f conftest.vals
19012 mv conftest.tail conftest.vals
19014 rm -f conftest.vals
19016 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19018 echo ' cat >> conftest.edit <<CEOF
19019 /@DEFS@/r conftest.frag
19022 sed -f conftest.edit $tmp/in > $tmp/out
19024 mv $tmp/out $tmp/in
19025 rm -f conftest.edit conftest.frag
19026 ' >> $CONFIG_STATUS
19028 cat >>$CONFIG_STATUS <<\EOF
19029 # Let's still pretend it is `configure' which instantiates (i.e., don't
19030 # use $as_me), people would be surprised to read:
19031 # /* config.h. Generated automatically by config.status. */
19032 if test x"$ac_file" = x-; then
19033 echo "/* Generated automatically by configure. */" >$tmp/config.h
19035 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19037 cat $tmp/in >>$tmp/config.h
19039 if test x"$ac_file" != x-; then
19040 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19041 { echo "$as_me:19041: $ac_file is unchanged" >&5
19042 echo "$as_me: $ac_file is unchanged" >&6;}
19044 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19045 X"$ac_file" : 'X\(//\)[^/]' \| \
19046 X"$ac_file" : 'X\(//\)$' \| \
19047 X"$ac_file" : 'X\(/\)' \| \
19048 . : '\(.\)' 2>/dev/null ||
19050 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19051 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19052 /^X\(\/\/\)$/{ s//\1/; q; }
19053 /^X\(\/\).*/{ s//\1/; q; }
19055 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19056 { case "$ac_dir" in
19057 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19061 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19062 case $as_mkdir_dir in
19063 # Skip DOS drivespec
19064 ?:) as_incr_dir=$as_mkdir_dir ;;
19066 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19067 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19074 mv $tmp/config.h $ac_file
19078 rm -f $tmp/config.h
19082 cat >>$CONFIG_STATUS <<\EOF
19084 # CONFIG_COMMANDS section.
19086 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19087 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19088 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19095 if test ! -d $srcdir/$cf_dir; then
19097 elif test -f $srcdir/$cf_dir/programs; then
19098 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19102 cat >>Makefile <<TEST_EOF
19104 # These rules are generated so we do not rely on suffix rules, which do not
19105 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19106 # some, and the '\$x' confuses others).
19109 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19112 cat >>Makefile <<TEST_EOF
19114 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19115 \$(srcdir)/test.priv.h \\
19118 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
19122 if test -f ../config.guess && test -f ../config.sub
19124 cat >>Makefile <<TEST_EOF
19126 # if we used CF_INHERIT for getting these files, we can remove them
19128 rm -f config.guess config.sub
19136 cat >>$CONFIG_STATUS <<\EOF
19138 { (exit 0); exit 0; }
19140 chmod +x $CONFIG_STATUS
19141 ac_clean_files=$ac_clean_files_save
19143 # configure is writing to config.log, and then calls config.status.
19144 # config.status does its own redirection, appending to config.log.
19145 # Unfortunately, on DOS this fails, as config.log is still kept open
19146 # by configure, so config.status won't be able to write to it; its
19147 # output is simply discarded. So we exec the FD to /dev/null,
19148 # effectively closing config.log, so it can be properly (re)opened and
19149 # appended to by config.status. When coming back to configure, we
19150 # need to make the FD available again.
19151 if test "$no_create" != yes; then
19154 $SHELL $CONFIG_STATUS || ac_cs_success=false
19156 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19157 # would make configure fail if this is the last instruction.
19158 $ac_cs_success || { (exit 1); exit 1; }