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/^.*[ ]\(-[^ ]\)/\1/'`
1946 CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
1947 for cf_arg in $cf_flags
1955 cf_new_extra_cppflags=
1957 for cf_add_cflags in $cf_flags
1959 case $cf_fix_cppflags in
1961 case $cf_add_cflags in
1962 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1963 case $cf_add_cflags in
1965 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1967 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1968 && test -z "${cf_tst_cflags}" \
1969 && cf_fix_cppflags=yes
1971 if test $cf_fix_cppflags = yes ; then
1972 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1974 elif test "${cf_tst_cflags}" = "\"'" ; then
1975 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1984 case $cf_add_cflags in
1986 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1988 CPPFLAGS=`echo "$CPPFLAGS" | \
1989 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1990 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1994 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1999 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2004 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2006 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2009 && test -z "${cf_tst_cflags}" \
2010 && cf_fix_cppflags=no
2015 if test -n "$cf_new_cflags" ; then
2017 CFLAGS="$CFLAGS $cf_new_cflags"
2020 if test -n "$cf_new_cppflags" ; then
2022 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2025 if test -n "$cf_new_extra_cppflags" ; then
2027 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2036 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2038 echo "${as_me:-configure}:2038: testing resulting CC: '$CC' ..." 1>&5
2040 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2042 echo "${as_me:-configure}:2042: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2044 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2046 echo "${as_me:-configure}:2046: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2050 echo "$as_me:2050: result: ok" >&5
2051 echo "${ECHO_T}ok" >&6
2056 ac_cpp='$CPP $CPPFLAGS'
2057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2060 ac_main_return=return
2061 echo "$as_me:2061: checking how to run the C preprocessor" >&5
2062 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2063 # On Suns, sometimes $CPP names a directory.
2064 if test -n "$CPP" && test -d "$CPP"; then
2067 if test -z "$CPP"; then
2068 if test "${ac_cv_prog_CPP+set}" = set; then
2069 echo $ECHO_N "(cached) $ECHO_C" >&6
2071 # Double quotes because CPP needs to be expanded
2072 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2075 for ac_c_preproc_warn_flag in '' yes
2077 # Use a header file that comes with gcc, so configuring glibc
2078 # with a fresh cross-compiler works.
2079 # On the NeXT, cc -E runs the code through the compiler's parser,
2080 # not just through cpp. "Syntax error" is here to catch this case.
2081 cat >conftest.$ac_ext <<_ACEOF
2082 #line 2082 "configure"
2083 #include "confdefs.h"
2087 if { (eval echo "$as_me:2087: \"$ac_cpp conftest.$ac_ext\"") >&5
2088 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2090 egrep -v '^ *\+' conftest.er1 >conftest.err
2092 cat conftest.err >&5
2093 echo "$as_me:2093: \$? = $ac_status" >&5
2094 (exit $ac_status); } >/dev/null; then
2095 if test -s conftest.err; then
2096 ac_cpp_err=$ac_c_preproc_warn_flag
2103 if test -z "$ac_cpp_err"; then
2106 echo "$as_me: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 # Broken: fails on valid input.
2111 rm -f conftest.err conftest.$ac_ext
2113 # OK, works on sane cases. Now check whether non-existent headers
2114 # can be detected and how.
2115 cat >conftest.$ac_ext <<_ACEOF
2116 #line 2116 "configure"
2117 #include "confdefs.h"
2118 #include <ac_nonexistent.h>
2120 if { (eval echo "$as_me:2120: \"$ac_cpp conftest.$ac_ext\"") >&5
2121 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2123 egrep -v '^ *\+' conftest.er1 >conftest.err
2125 cat conftest.err >&5
2126 echo "$as_me:2126: \$? = $ac_status" >&5
2127 (exit $ac_status); } >/dev/null; then
2128 if test -s conftest.err; then
2129 ac_cpp_err=$ac_c_preproc_warn_flag
2136 if test -z "$ac_cpp_err"; then
2137 # Broken: success on invalid input.
2140 echo "$as_me: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 # Passes both tests.
2146 rm -f conftest.err conftest.$ac_ext
2149 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2150 rm -f conftest.err conftest.$ac_ext
2151 if $ac_preproc_ok; then
2163 echo "$as_me:2163: result: $CPP" >&5
2164 echo "${ECHO_T}$CPP" >&6
2166 for ac_c_preproc_warn_flag in '' yes
2168 # Use a header file that comes with gcc, so configuring glibc
2169 # with a fresh cross-compiler works.
2170 # On the NeXT, cc -E runs the code through the compiler's parser,
2171 # not just through cpp. "Syntax error" is here to catch this case.
2172 cat >conftest.$ac_ext <<_ACEOF
2173 #line 2173 "configure"
2174 #include "confdefs.h"
2178 if { (eval echo "$as_me:2178: \"$ac_cpp conftest.$ac_ext\"") >&5
2179 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181 egrep -v '^ *\+' conftest.er1 >conftest.err
2183 cat conftest.err >&5
2184 echo "$as_me:2184: \$? = $ac_status" >&5
2185 (exit $ac_status); } >/dev/null; then
2186 if test -s conftest.err; then
2187 ac_cpp_err=$ac_c_preproc_warn_flag
2194 if test -z "$ac_cpp_err"; then
2197 echo "$as_me: failed program was:" >&5
2198 cat conftest.$ac_ext >&5
2199 # Broken: fails on valid input.
2202 rm -f conftest.err conftest.$ac_ext
2204 # OK, works on sane cases. Now check whether non-existent headers
2205 # can be detected and how.
2206 cat >conftest.$ac_ext <<_ACEOF
2207 #line 2207 "configure"
2208 #include "confdefs.h"
2209 #include <ac_nonexistent.h>
2211 if { (eval echo "$as_me:2211: \"$ac_cpp conftest.$ac_ext\"") >&5
2212 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2214 egrep -v '^ *\+' conftest.er1 >conftest.err
2216 cat conftest.err >&5
2217 echo "$as_me:2217: \$? = $ac_status" >&5
2218 (exit $ac_status); } >/dev/null; then
2219 if test -s conftest.err; then
2220 ac_cpp_err=$ac_c_preproc_warn_flag
2227 if test -z "$ac_cpp_err"; then
2228 # Broken: success on invalid input.
2231 echo "$as_me: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
2233 # Passes both tests.
2237 rm -f conftest.err conftest.$ac_ext
2240 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2241 rm -f conftest.err conftest.$ac_ext
2242 if $ac_preproc_ok; then
2245 { { echo "$as_me:2245: error: C preprocessor \"$CPP\" fails sanity check" >&5
2246 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2247 { (exit 1); exit 1; }; }
2251 ac_cpp='$CPP $CPPFLAGS'
2252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2255 ac_main_return=return
2257 for ac_prog in mawk gawk nawk awk
2259 # Extract the first word of "$ac_prog", so it can be a program name with args.
2260 set dummy $ac_prog; ac_word=$2
2261 echo "$as_me:2261: checking for $ac_word" >&5
2262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2263 if test "${ac_cv_prog_AWK+set}" = set; then
2264 echo $ECHO_N "(cached) $ECHO_C" >&6
2266 if test -n "$AWK"; then
2267 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2269 ac_save_IFS=$IFS; IFS=$ac_path_separator
2271 for ac_dir in $ac_dummy; do
2273 test -z "$ac_dir" && ac_dir=.
2274 $as_executable_p "$ac_dir/$ac_word" || continue
2275 ac_cv_prog_AWK="$ac_prog"
2276 echo "$as_me:2276: found $ac_dir/$ac_word" >&5
2283 if test -n "$AWK"; then
2284 echo "$as_me:2284: result: $AWK" >&5
2285 echo "${ECHO_T}$AWK" >&6
2287 echo "$as_me:2287: result: no" >&5
2288 echo "${ECHO_T}no" >&6
2291 test -n "$AWK" && break
2294 # Find a good install program. We prefer a C program (faster),
2295 # so one script is as good as another. But avoid the broken or
2296 # incompatible versions:
2297 # SysV /etc/install, /usr/sbin/install
2298 # SunOS /usr/etc/install
2299 # IRIX /sbin/install
2301 # AmigaOS /C/install, which installs bootblocks on floppy discs
2302 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2303 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2304 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2305 # ./install, which can be erroneously created by make from ./install.sh.
2306 echo "$as_me:2306: checking for a BSD compatible install" >&5
2307 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2308 if test -z "$INSTALL"; then
2309 if test "${ac_cv_path_install+set}" = set; then
2310 echo $ECHO_N "(cached) $ECHO_C" >&6
2312 ac_save_IFS=$IFS; IFS=$ac_path_separator
2313 for ac_dir in $PATH; do
2315 # Account for people who put trailing slashes in PATH elements.
2317 / | ./ | .// | /cC/* \
2318 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2321 # OSF1 and SCO ODT 3.0 have their own names for install.
2322 # Don't use installbsd from OSF since it installs stuff as root
2324 for ac_prog in ginstall scoinst install; do
2325 if $as_executable_p "$ac_dir/$ac_prog"; then
2326 if test $ac_prog = install &&
2327 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2328 # AIX install. It has an incompatible calling convention.
2330 elif test $ac_prog = install &&
2331 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2332 # program-specific install script used by HP pwplus--don't use.
2335 ac_cv_path_install="$ac_dir/$ac_prog -c"
2345 if test "${ac_cv_path_install+set}" = set; then
2346 INSTALL=$ac_cv_path_install
2348 # As a last resort, use the slow shell script. We don't cache a
2349 # path for INSTALL within a source directory, because that will
2350 # break other packages using the cache if that directory is
2351 # removed, or if the path is relative.
2352 INSTALL=$ac_install_sh
2355 echo "$as_me:2355: result: $INSTALL" >&5
2356 echo "${ECHO_T}$INSTALL" >&6
2358 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2359 # It thinks the first close brace ends the variable substitution.
2360 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2362 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2364 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2370 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2371 test -z "$cf_dir" && cf_dir=.
2372 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2376 for ac_prog in lint cppcheck splint
2378 # Extract the first word of "$ac_prog", so it can be a program name with args.
2379 set dummy $ac_prog; ac_word=$2
2380 echo "$as_me:2380: checking for $ac_word" >&5
2381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2382 if test "${ac_cv_prog_LINT+set}" = set; then
2383 echo $ECHO_N "(cached) $ECHO_C" >&6
2385 if test -n "$LINT"; then
2386 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2388 ac_save_IFS=$IFS; IFS=$ac_path_separator
2390 for ac_dir in $ac_dummy; do
2392 test -z "$ac_dir" && ac_dir=.
2393 $as_executable_p "$ac_dir/$ac_word" || continue
2394 ac_cv_prog_LINT="$ac_prog"
2395 echo "$as_me:2395: found $ac_dir/$ac_word" >&5
2401 LINT=$ac_cv_prog_LINT
2402 if test -n "$LINT"; then
2403 echo "$as_me:2403: result: $LINT" >&5
2404 echo "${ECHO_T}$LINT" >&6
2406 echo "$as_me:2406: result: no" >&5
2407 echo "${ECHO_T}no" >&6
2410 test -n "$LINT" && break
2413 echo "$as_me:2413: checking if filesystem supports mixed-case filenames" >&5
2414 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2415 if test "${cf_cv_mixedcase+set}" = set; then
2416 echo $ECHO_N "(cached) $ECHO_C" >&6
2419 if test "$cross_compiling" = yes ; then
2420 case $target_alias in
2421 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2429 rm -f conftest CONFTEST
2431 if test -f CONFTEST ; then
2436 rm -f conftest CONFTEST
2440 echo "$as_me:2440: result: $cf_cv_mixedcase" >&5
2441 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2442 test "$cf_cv_mixedcase" = yes &&
2443 cat >>confdefs.h <<\EOF
2444 #define MIXEDCASE_FILENAMES 1
2447 for ac_prog in exctags ctags
2449 # Extract the first word of "$ac_prog", so it can be a program name with args.
2450 set dummy $ac_prog; ac_word=$2
2451 echo "$as_me:2451: checking for $ac_word" >&5
2452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2453 if test "${ac_cv_prog_CTAGS+set}" = set; then
2454 echo $ECHO_N "(cached) $ECHO_C" >&6
2456 if test -n "$CTAGS"; then
2457 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2459 ac_save_IFS=$IFS; IFS=$ac_path_separator
2461 for ac_dir in $ac_dummy; do
2463 test -z "$ac_dir" && ac_dir=.
2464 $as_executable_p "$ac_dir/$ac_word" || continue
2465 ac_cv_prog_CTAGS="$ac_prog"
2466 echo "$as_me:2466: found $ac_dir/$ac_word" >&5
2472 CTAGS=$ac_cv_prog_CTAGS
2473 if test -n "$CTAGS"; then
2474 echo "$as_me:2474: result: $CTAGS" >&5
2475 echo "${ECHO_T}$CTAGS" >&6
2477 echo "$as_me:2477: result: no" >&5
2478 echo "${ECHO_T}no" >&6
2481 test -n "$CTAGS" && break
2484 for ac_prog in exetags etags
2486 # Extract the first word of "$ac_prog", so it can be a program name with args.
2487 set dummy $ac_prog; ac_word=$2
2488 echo "$as_me:2488: checking for $ac_word" >&5
2489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2490 if test "${ac_cv_prog_ETAGS+set}" = set; then
2491 echo $ECHO_N "(cached) $ECHO_C" >&6
2493 if test -n "$ETAGS"; then
2494 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2496 ac_save_IFS=$IFS; IFS=$ac_path_separator
2498 for ac_dir in $ac_dummy; do
2500 test -z "$ac_dir" && ac_dir=.
2501 $as_executable_p "$ac_dir/$ac_word" || continue
2502 ac_cv_prog_ETAGS="$ac_prog"
2503 echo "$as_me:2503: found $ac_dir/$ac_word" >&5
2509 ETAGS=$ac_cv_prog_ETAGS
2510 if test -n "$ETAGS"; then
2511 echo "$as_me:2511: result: $ETAGS" >&5
2512 echo "${ECHO_T}$ETAGS" >&6
2514 echo "$as_me:2514: result: no" >&5
2515 echo "${ECHO_T}no" >&6
2518 test -n "$ETAGS" && break
2521 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2522 set dummy ${CTAGS:-ctags}; ac_word=$2
2523 echo "$as_me:2523: checking for $ac_word" >&5
2524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2525 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2526 echo $ECHO_N "(cached) $ECHO_C" >&6
2528 if test -n "$MAKE_LOWER_TAGS"; then
2529 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2531 ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 for ac_dir in $ac_dummy; do
2535 test -z "$ac_dir" && ac_dir=.
2536 $as_executable_p "$ac_dir/$ac_word" || continue
2537 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2538 echo "$as_me:2538: found $ac_dir/$ac_word" >&5
2542 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2545 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2546 if test -n "$MAKE_LOWER_TAGS"; then
2547 echo "$as_me:2547: result: $MAKE_LOWER_TAGS" >&5
2548 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2550 echo "$as_me:2550: result: no" >&5
2551 echo "${ECHO_T}no" >&6
2554 if test "$cf_cv_mixedcase" = yes ; then
2555 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2556 set dummy ${ETAGS:-etags}; ac_word=$2
2557 echo "$as_me:2557: checking for $ac_word" >&5
2558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2559 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2560 echo $ECHO_N "(cached) $ECHO_C" >&6
2562 if test -n "$MAKE_UPPER_TAGS"; then
2563 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2565 ac_save_IFS=$IFS; IFS=$ac_path_separator
2567 for ac_dir in $ac_dummy; do
2569 test -z "$ac_dir" && ac_dir=.
2570 $as_executable_p "$ac_dir/$ac_word" || continue
2571 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2572 echo "$as_me:2572: found $ac_dir/$ac_word" >&5
2576 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2579 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2580 if test -n "$MAKE_UPPER_TAGS"; then
2581 echo "$as_me:2581: result: $MAKE_UPPER_TAGS" >&5
2582 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2584 echo "$as_me:2584: result: no" >&5
2585 echo "${ECHO_T}no" >&6
2592 if test "$MAKE_UPPER_TAGS" = yes ; then
2598 if test "$MAKE_LOWER_TAGS" = yes ; then
2604 echo "$as_me:2604: checking if -lm needed for math functions" >&5
2605 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2606 if test "${cf_cv_need_libm+set}" = set; then
2607 echo $ECHO_N "(cached) $ECHO_C" >&6
2610 cat >conftest.$ac_ext <<_ACEOF
2611 #line 2611 "configure"
2612 #include "confdefs.h"
2620 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2625 rm -f conftest.$ac_objext conftest$ac_exeext
2626 if { (eval echo "$as_me:2626: \"$ac_link\"") >&5
2627 (eval $ac_link) 2>&5
2629 echo "$as_me:2629: \$? = $ac_status" >&5
2630 (exit $ac_status); } &&
2631 { ac_try='test -s conftest$ac_exeext'
2632 { (eval echo "$as_me:2632: \"$ac_try\"") >&5
2635 echo "$as_me:2635: \$? = $ac_status" >&5
2636 (exit $ac_status); }; }; then
2639 echo "$as_me: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2645 echo "$as_me:2645: result: $cf_cv_need_libm" >&5
2646 echo "${ECHO_T}$cf_cv_need_libm" >&6
2647 if test "$cf_cv_need_libm" = yes
2655 CC_SHARED_OPTS=unknown
2656 CPPFLAGS="$CPPFLAGS"
2658 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2659 DFT_UPR_MODEL="NORMAL"
2672 PACKAGE="ncurses-examples"
2678 TINFO_LIBS='$(LIBS_CURSES)'
2679 cf_cv_abi_version=""
2680 cf_cv_rel_version=""
2686 if test "$GCC" = yes
2688 cat > conftest.i <<EOF
2690 #define GCC_PRINTF 0
2695 #ifndef GCC_NORETURN
2696 #define GCC_NORETURN /* nothing */
2699 #define GCC_UNUSED /* nothing */
2702 if test "$GCC" = yes
2704 { echo "$as_me:2704: checking for $CC __attribute__ directives..." >&5
2705 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2707 "${as_me:-configure}"
2708 #include "confdefs.h"
2709 #include "conftest.h"
2710 #include "conftest.i"
2712 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2714 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2717 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2719 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2721 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2722 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2723 extern void foo(void) GCC_NORETURN;
2724 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2726 cf_printf_attribute=no
2727 cf_scanf_attribute=no
2728 for cf_attribute in scanf printf unused noreturn
2731 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2733 cf_directive="__attribute__(($cf_attribute))"
2734 echo "checking for $CC $cf_directive" 1>&5
2736 case $cf_attribute in
2738 cf_printf_attribute=yes
2739 cat >conftest.h <<EOF
2740 #define GCC_$cf_ATTRIBUTE 1
2744 cf_scanf_attribute=yes
2745 cat >conftest.h <<EOF
2746 #define GCC_$cf_ATTRIBUTE 1
2750 cat >conftest.h <<EOF
2751 #define GCC_$cf_ATTRIBUTE $cf_directive
2756 if { (eval echo "$as_me:2756: \"$ac_compile\"") >&5
2757 (eval $ac_compile) 2>&5
2759 echo "$as_me:2759: \$? = $ac_status" >&5
2760 (exit $ac_status); }; then
2761 test -n "$verbose" && echo "$as_me:2761: result: ... $cf_attribute" >&5
2762 echo "${ECHO_T}... $cf_attribute" >&6
2763 cat conftest.h >>confdefs.h
2764 case $cf_attribute in
2767 cat >>confdefs.h <<EOF
2768 #define GCC_NORETURN $cf_directive
2773 cf_value='/* nothing */'
2774 if test "$cf_printf_attribute" != no ; then
2775 cf_value='__attribute__((format(printf,fmt,var)))'
2777 cat >>confdefs.h <<\EOF
2778 #define GCC_PRINTF 1
2783 cat >>confdefs.h <<EOF
2784 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2789 cf_value='/* nothing */'
2790 if test "$cf_scanf_attribute" != no ; then
2791 cf_value='__attribute__((format(scanf,fmt,var)))'
2793 cat >>confdefs.h <<\EOF
2799 cat >>confdefs.h <<EOF
2800 #define GCC_SCANFLIKE(fmt,var) $cf_value
2806 cat >>confdefs.h <<EOF
2807 #define GCC_UNUSED $cf_directive
2815 fgrep define conftest.i >>confdefs.h
2821 cf_POSIX_C_SOURCE=199506L
2826 cf_xopen_source="-D_ALL_SOURCE"
2832 cf_xopen_source="-D_APPLE_C_SOURCE"
2835 cf_xopen_source="-D_DARWIN_C_SOURCE"
2838 (freebsd*|dragonfly*)
2839 # 5.x headers associate
2840 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2841 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2842 cf_POSIX_C_SOURCE=200112L
2844 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2847 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2850 cf_xopen_source="-D_HPUX_SOURCE"
2853 cf_xopen_source="-D_SGI_SOURCE"
2856 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
2858 echo "$as_me:2858: checking if we must define _GNU_SOURCE" >&5
2859 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2860 if test "${cf_cv_gnu_source+set}" = set; then
2861 echo $ECHO_N "(cached) $ECHO_C" >&6
2864 cat >conftest.$ac_ext <<_ACEOF
2865 #line 2865 "configure"
2866 #include "confdefs.h"
2867 #include <sys/types.h>
2872 #ifndef _XOPEN_SOURCE
2879 rm -f conftest.$ac_objext
2880 if { (eval echo "$as_me:2880: \"$ac_compile\"") >&5
2881 (eval $ac_compile) 2>&5
2883 echo "$as_me:2883: \$? = $ac_status" >&5
2884 (exit $ac_status); } &&
2885 { ac_try='test -s conftest.$ac_objext'
2886 { (eval echo "$as_me:2886: \"$ac_try\"") >&5
2889 echo "$as_me:2889: \$? = $ac_status" >&5
2890 (exit $ac_status); }; }; then
2893 echo "$as_me: failed program was:" >&5
2894 cat conftest.$ac_ext >&5
2896 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2897 cat >conftest.$ac_ext <<_ACEOF
2898 #line 2898 "configure"
2899 #include "confdefs.h"
2900 #include <sys/types.h>
2905 #ifdef _XOPEN_SOURCE
2912 rm -f conftest.$ac_objext
2913 if { (eval echo "$as_me:2913: \"$ac_compile\"") >&5
2914 (eval $ac_compile) 2>&5
2916 echo "$as_me:2916: \$? = $ac_status" >&5
2917 (exit $ac_status); } &&
2918 { ac_try='test -s conftest.$ac_objext'
2919 { (eval echo "$as_me:2919: \"$ac_try\"") >&5
2922 echo "$as_me:2922: \$? = $ac_status" >&5
2923 (exit $ac_status); }; }; then
2926 echo "$as_me: failed program was:" >&5
2927 cat conftest.$ac_ext >&5
2928 cf_cv_gnu_source=yes
2930 rm -f conftest.$ac_objext conftest.$ac_ext
2934 rm -f conftest.$ac_objext conftest.$ac_ext
2937 echo "$as_me:2937: result: $cf_cv_gnu_source" >&5
2938 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2940 if test "$cf_cv_gnu_source" = yes
2942 echo "$as_me:2942: checking if we should also define _DEFAULT_SOURCE" >&5
2943 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
2944 if test "${cf_cv_default_source+set}" = set; then
2945 echo $ECHO_N "(cached) $ECHO_C" >&6
2948 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2949 cat >conftest.$ac_ext <<_ACEOF
2950 #line 2950 "configure"
2951 #include "confdefs.h"
2952 #include <sys/types.h>
2957 #ifdef _DEFAULT_SOURCE
2964 rm -f conftest.$ac_objext
2965 if { (eval echo "$as_me:2965: \"$ac_compile\"") >&5
2966 (eval $ac_compile) 2>&5
2968 echo "$as_me:2968: \$? = $ac_status" >&5
2969 (exit $ac_status); } &&
2970 { ac_try='test -s conftest.$ac_objext'
2971 { (eval echo "$as_me:2971: \"$ac_try\"") >&5
2974 echo "$as_me:2974: \$? = $ac_status" >&5
2975 (exit $ac_status); }; }; then
2976 cf_cv_default_source=no
2978 echo "$as_me: failed program was:" >&5
2979 cat conftest.$ac_ext >&5
2980 cf_cv_default_source=yes
2982 rm -f conftest.$ac_objext conftest.$ac_ext
2985 echo "$as_me:2985: result: $cf_cv_default_source" >&5
2986 echo "${ECHO_T}$cf_cv_default_source" >&6
2987 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
2992 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2995 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2998 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3000 cf_save_CFLAGS="$CFLAGS"
3001 cf_save_CPPFLAGS="$CPPFLAGS"
3003 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3004 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3005 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3007 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3008 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3009 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3011 echo "$as_me:3011: checking if we should define _POSIX_C_SOURCE" >&5
3012 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3013 if test "${cf_cv_posix_c_source+set}" = set; then
3014 echo $ECHO_N "(cached) $ECHO_C" >&6
3017 echo "${as_me:-configure}:3017: testing if the symbol is already defined go no further ..." 1>&5
3019 cat >conftest.$ac_ext <<_ACEOF
3020 #line 3020 "configure"
3021 #include "confdefs.h"
3022 #include <sys/types.h>
3027 #ifndef _POSIX_C_SOURCE
3034 rm -f conftest.$ac_objext
3035 if { (eval echo "$as_me:3035: \"$ac_compile\"") >&5
3036 (eval $ac_compile) 2>&5
3038 echo "$as_me:3038: \$? = $ac_status" >&5
3039 (exit $ac_status); } &&
3040 { ac_try='test -s conftest.$ac_objext'
3041 { (eval echo "$as_me:3041: \"$ac_try\"") >&5
3044 echo "$as_me:3044: \$? = $ac_status" >&5
3045 (exit $ac_status); }; }; then
3046 cf_cv_posix_c_source=no
3048 echo "$as_me: failed program was:" >&5
3049 cat conftest.$ac_ext >&5
3050 cf_want_posix_source=no
3051 case .$cf_POSIX_C_SOURCE in
3053 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3056 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3057 cf_want_posix_source=yes
3060 cf_want_posix_source=yes
3063 if test "$cf_want_posix_source" = yes ; then
3064 cat >conftest.$ac_ext <<_ACEOF
3065 #line 3065 "configure"
3066 #include "confdefs.h"
3067 #include <sys/types.h>
3072 #ifdef _POSIX_SOURCE
3079 rm -f conftest.$ac_objext
3080 if { (eval echo "$as_me:3080: \"$ac_compile\"") >&5
3081 (eval $ac_compile) 2>&5
3083 echo "$as_me:3083: \$? = $ac_status" >&5
3084 (exit $ac_status); } &&
3085 { ac_try='test -s conftest.$ac_objext'
3086 { (eval echo "$as_me:3086: \"$ac_try\"") >&5
3089 echo "$as_me:3089: \$? = $ac_status" >&5
3090 (exit $ac_status); }; }; then
3093 echo "$as_me: failed program was:" >&5
3094 cat conftest.$ac_ext >&5
3095 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3097 rm -f conftest.$ac_objext conftest.$ac_ext
3100 echo "${as_me:-configure}:3100: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3102 CFLAGS="$cf_trim_CFLAGS"
3103 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3105 echo "${as_me:-configure}:3105: testing if the second compile does not leave our definition intact error ..." 1>&5
3107 cat >conftest.$ac_ext <<_ACEOF
3108 #line 3108 "configure"
3109 #include "confdefs.h"
3110 #include <sys/types.h>
3115 #ifndef _POSIX_C_SOURCE
3122 rm -f conftest.$ac_objext
3123 if { (eval echo "$as_me:3123: \"$ac_compile\"") >&5
3124 (eval $ac_compile) 2>&5
3126 echo "$as_me:3126: \$? = $ac_status" >&5
3127 (exit $ac_status); } &&
3128 { ac_try='test -s conftest.$ac_objext'
3129 { (eval echo "$as_me:3129: \"$ac_try\"") >&5
3132 echo "$as_me:3132: \$? = $ac_status" >&5
3133 (exit $ac_status); }; }; then
3136 echo "$as_me: failed program was:" >&5
3137 cat conftest.$ac_ext >&5
3138 cf_cv_posix_c_source=no
3140 rm -f conftest.$ac_objext conftest.$ac_ext
3141 CFLAGS="$cf_save_CFLAGS"
3142 CPPFLAGS="$cf_save_CPPFLAGS"
3145 rm -f conftest.$ac_objext conftest.$ac_ext
3148 echo "$as_me:3148: result: $cf_cv_posix_c_source" >&5
3149 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3151 if test "$cf_cv_posix_c_source" != no ; then
3152 CFLAGS="$cf_trim_CFLAGS"
3153 CPPFLAGS="$cf_trim_CPPFLAGS"
3158 cf_new_extra_cppflags=
3160 for cf_add_cflags in $cf_cv_posix_c_source
3162 case $cf_fix_cppflags in
3164 case $cf_add_cflags in
3165 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3166 case $cf_add_cflags in
3168 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3170 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3171 && test -z "${cf_tst_cflags}" \
3172 && cf_fix_cppflags=yes
3174 if test $cf_fix_cppflags = yes ; then
3175 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3177 elif test "${cf_tst_cflags}" = "\"'" ; then
3178 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3187 case $cf_add_cflags in
3189 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3191 CPPFLAGS=`echo "$CPPFLAGS" | \
3192 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3193 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3197 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3202 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3207 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3211 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3212 && test -z "${cf_tst_cflags}" \
3213 && cf_fix_cppflags=no
3218 if test -n "$cf_new_cflags" ; then
3220 CFLAGS="$CFLAGS $cf_new_cflags"
3223 if test -n "$cf_new_cppflags" ; then
3225 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3228 if test -n "$cf_new_extra_cppflags" ; then
3230 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3237 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3240 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3241 cf_xopen_source="-D_BSD_SOURCE"
3245 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3248 cf_xopen_source="-D_OSF_SOURCE"
3251 cf_xopen_source="-D_QNX_SOURCE"
3254 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3257 cf_xopen_source="-D__EXTENSIONS__"
3258 cf_cv_xopen_source=broken
3260 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3266 echo "$as_me:3266: checking if we should define _XOPEN_SOURCE" >&5
3267 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3268 if test "${cf_cv_xopen_source+set}" = set; then
3269 echo $ECHO_N "(cached) $ECHO_C" >&6
3272 cat >conftest.$ac_ext <<_ACEOF
3273 #line 3273 "configure"
3274 #include "confdefs.h"
3278 #include <sys/types.h>
3284 #ifndef _XOPEN_SOURCE
3291 rm -f conftest.$ac_objext
3292 if { (eval echo "$as_me:3292: \"$ac_compile\"") >&5
3293 (eval $ac_compile) 2>&5
3295 echo "$as_me:3295: \$? = $ac_status" >&5
3296 (exit $ac_status); } &&
3297 { ac_try='test -s conftest.$ac_objext'
3298 { (eval echo "$as_me:3298: \"$ac_try\"") >&5
3301 echo "$as_me:3301: \$? = $ac_status" >&5
3302 (exit $ac_status); }; }; then
3303 cf_cv_xopen_source=no
3305 echo "$as_me: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3308 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3309 cat >conftest.$ac_ext <<_ACEOF
3310 #line 3310 "configure"
3311 #include "confdefs.h"
3315 #include <sys/types.h>
3321 #ifdef _XOPEN_SOURCE
3328 rm -f conftest.$ac_objext
3329 if { (eval echo "$as_me:3329: \"$ac_compile\"") >&5
3330 (eval $ac_compile) 2>&5
3332 echo "$as_me:3332: \$? = $ac_status" >&5
3333 (exit $ac_status); } &&
3334 { ac_try='test -s conftest.$ac_objext'
3335 { (eval echo "$as_me:3335: \"$ac_try\"") >&5
3338 echo "$as_me:3338: \$? = $ac_status" >&5
3339 (exit $ac_status); }; }; then
3340 cf_cv_xopen_source=no
3342 echo "$as_me: failed program was:" >&5
3343 cat conftest.$ac_ext >&5
3344 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3346 rm -f conftest.$ac_objext conftest.$ac_ext
3350 rm -f conftest.$ac_objext conftest.$ac_ext
3353 echo "$as_me:3353: result: $cf_cv_xopen_source" >&5
3354 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3356 if test "$cf_cv_xopen_source" != no ; then
3358 CFLAGS=`echo "$CFLAGS" | \
3359 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3360 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3362 CPPFLAGS=`echo "$CPPFLAGS" | \
3363 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3364 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3366 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3371 cf_new_extra_cppflags=
3373 for cf_add_cflags in $cf_temp_xopen_source
3375 case $cf_fix_cppflags in
3377 case $cf_add_cflags in
3378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3379 case $cf_add_cflags in
3381 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3384 && test -z "${cf_tst_cflags}" \
3385 && cf_fix_cppflags=yes
3387 if test $cf_fix_cppflags = yes ; then
3388 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3390 elif test "${cf_tst_cflags}" = "\"'" ; then
3391 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3400 case $cf_add_cflags in
3402 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3404 CPPFLAGS=`echo "$CPPFLAGS" | \
3405 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3406 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3410 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3415 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3420 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3422 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3425 && test -z "${cf_tst_cflags}" \
3426 && cf_fix_cppflags=no
3431 if test -n "$cf_new_cflags" ; then
3433 CFLAGS="$CFLAGS $cf_new_cflags"
3436 if test -n "$cf_new_cppflags" ; then
3438 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3441 if test -n "$cf_new_extra_cppflags" ; then
3443 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3448 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3450 cf_save_CFLAGS="$CFLAGS"
3451 cf_save_CPPFLAGS="$CPPFLAGS"
3453 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3454 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3455 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3457 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3458 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3459 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3461 echo "$as_me:3461: checking if we should define _POSIX_C_SOURCE" >&5
3462 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3463 if test "${cf_cv_posix_c_source+set}" = set; then
3464 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 echo "${as_me:-configure}:3467: testing if the symbol is already defined go no further ..." 1>&5
3469 cat >conftest.$ac_ext <<_ACEOF
3470 #line 3470 "configure"
3471 #include "confdefs.h"
3472 #include <sys/types.h>
3477 #ifndef _POSIX_C_SOURCE
3484 rm -f conftest.$ac_objext
3485 if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
3486 (eval $ac_compile) 2>&5
3488 echo "$as_me:3488: \$? = $ac_status" >&5
3489 (exit $ac_status); } &&
3490 { ac_try='test -s conftest.$ac_objext'
3491 { (eval echo "$as_me:3491: \"$ac_try\"") >&5
3494 echo "$as_me:3494: \$? = $ac_status" >&5
3495 (exit $ac_status); }; }; then
3496 cf_cv_posix_c_source=no
3498 echo "$as_me: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3500 cf_want_posix_source=no
3501 case .$cf_POSIX_C_SOURCE in
3503 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3506 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3507 cf_want_posix_source=yes
3510 cf_want_posix_source=yes
3513 if test "$cf_want_posix_source" = yes ; then
3514 cat >conftest.$ac_ext <<_ACEOF
3515 #line 3515 "configure"
3516 #include "confdefs.h"
3517 #include <sys/types.h>
3522 #ifdef _POSIX_SOURCE
3529 rm -f conftest.$ac_objext
3530 if { (eval echo "$as_me:3530: \"$ac_compile\"") >&5
3531 (eval $ac_compile) 2>&5
3533 echo "$as_me:3533: \$? = $ac_status" >&5
3534 (exit $ac_status); } &&
3535 { ac_try='test -s conftest.$ac_objext'
3536 { (eval echo "$as_me:3536: \"$ac_try\"") >&5
3539 echo "$as_me:3539: \$? = $ac_status" >&5
3540 (exit $ac_status); }; }; then
3543 echo "$as_me: failed program was:" >&5
3544 cat conftest.$ac_ext >&5
3545 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3547 rm -f conftest.$ac_objext conftest.$ac_ext
3550 echo "${as_me:-configure}:3550: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3552 CFLAGS="$cf_trim_CFLAGS"
3553 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3555 echo "${as_me:-configure}:3555: testing if the second compile does not leave our definition intact error ..." 1>&5
3557 cat >conftest.$ac_ext <<_ACEOF
3558 #line 3558 "configure"
3559 #include "confdefs.h"
3560 #include <sys/types.h>
3565 #ifndef _POSIX_C_SOURCE
3572 rm -f conftest.$ac_objext
3573 if { (eval echo "$as_me:3573: \"$ac_compile\"") >&5
3574 (eval $ac_compile) 2>&5
3576 echo "$as_me:3576: \$? = $ac_status" >&5
3577 (exit $ac_status); } &&
3578 { ac_try='test -s conftest.$ac_objext'
3579 { (eval echo "$as_me:3579: \"$ac_try\"") >&5
3582 echo "$as_me:3582: \$? = $ac_status" >&5
3583 (exit $ac_status); }; }; then
3586 echo "$as_me: failed program was:" >&5
3587 cat conftest.$ac_ext >&5
3588 cf_cv_posix_c_source=no
3590 rm -f conftest.$ac_objext conftest.$ac_ext
3591 CFLAGS="$cf_save_CFLAGS"
3592 CPPFLAGS="$cf_save_CPPFLAGS"
3595 rm -f conftest.$ac_objext conftest.$ac_ext
3598 echo "$as_me:3598: result: $cf_cv_posix_c_source" >&5
3599 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3601 if test "$cf_cv_posix_c_source" != no ; then
3602 CFLAGS="$cf_trim_CFLAGS"
3603 CPPFLAGS="$cf_trim_CPPFLAGS"
3608 cf_new_extra_cppflags=
3610 for cf_add_cflags in $cf_cv_posix_c_source
3612 case $cf_fix_cppflags in
3614 case $cf_add_cflags in
3615 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3616 case $cf_add_cflags in
3618 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3620 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3621 && test -z "${cf_tst_cflags}" \
3622 && cf_fix_cppflags=yes
3624 if test $cf_fix_cppflags = yes ; then
3625 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3627 elif test "${cf_tst_cflags}" = "\"'" ; then
3628 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3637 case $cf_add_cflags in
3639 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3641 CPPFLAGS=`echo "$CPPFLAGS" | \
3642 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3643 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3647 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3652 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3657 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3659 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3661 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3662 && test -z "${cf_tst_cflags}" \
3663 && cf_fix_cppflags=no
3668 if test -n "$cf_new_cflags" ; then
3670 CFLAGS="$CFLAGS $cf_new_cflags"
3673 if test -n "$cf_new_cppflags" ; then
3675 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3678 if test -n "$cf_new_extra_cppflags" ; then
3680 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3688 if test -n "$cf_xopen_source" ; then
3693 cf_new_extra_cppflags=
3695 for cf_add_cflags in $cf_xopen_source
3697 case $cf_fix_cppflags in
3699 case $cf_add_cflags in
3700 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3701 case $cf_add_cflags in
3703 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3705 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3706 && test -z "${cf_tst_cflags}" \
3707 && cf_fix_cppflags=yes
3709 if test $cf_fix_cppflags = yes ; then
3710 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3712 elif test "${cf_tst_cflags}" = "\"'" ; then
3713 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3722 case $cf_add_cflags in
3724 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3726 CPPFLAGS=`echo "$CPPFLAGS" | \
3727 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3728 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3732 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3737 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3742 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3744 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3747 && test -z "${cf_tst_cflags}" \
3748 && cf_fix_cppflags=no
3753 if test -n "$cf_new_cflags" ; then
3754 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3756 echo "${as_me:-configure}:3756: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3758 CFLAGS="$CFLAGS $cf_new_cflags"
3761 if test -n "$cf_new_cppflags" ; then
3762 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3764 echo "${as_me:-configure}:3764: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3766 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3769 if test -n "$cf_new_extra_cppflags" ; then
3770 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3772 echo "${as_me:-configure}:3772: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3774 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3779 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3780 echo "$as_me:3780: checking if _XOPEN_SOURCE really is set" >&5
3781 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3782 cat >conftest.$ac_ext <<_ACEOF
3783 #line 3783 "configure"
3784 #include "confdefs.h"
3790 #ifndef _XOPEN_SOURCE
3797 rm -f conftest.$ac_objext
3798 if { (eval echo "$as_me:3798: \"$ac_compile\"") >&5
3799 (eval $ac_compile) 2>&5
3801 echo "$as_me:3801: \$? = $ac_status" >&5
3802 (exit $ac_status); } &&
3803 { ac_try='test -s conftest.$ac_objext'
3804 { (eval echo "$as_me:3804: \"$ac_try\"") >&5
3807 echo "$as_me:3807: \$? = $ac_status" >&5
3808 (exit $ac_status); }; }; then
3809 cf_XOPEN_SOURCE_set=yes
3811 echo "$as_me: failed program was:" >&5
3812 cat conftest.$ac_ext >&5
3813 cf_XOPEN_SOURCE_set=no
3815 rm -f conftest.$ac_objext conftest.$ac_ext
3816 echo "$as_me:3816: result: $cf_XOPEN_SOURCE_set" >&5
3817 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3818 if test $cf_XOPEN_SOURCE_set = yes
3820 cat >conftest.$ac_ext <<_ACEOF
3821 #line 3821 "configure"
3822 #include "confdefs.h"
3828 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3835 rm -f conftest.$ac_objext
3836 if { (eval echo "$as_me:3836: \"$ac_compile\"") >&5
3837 (eval $ac_compile) 2>&5
3839 echo "$as_me:3839: \$? = $ac_status" >&5
3840 (exit $ac_status); } &&
3841 { ac_try='test -s conftest.$ac_objext'
3842 { (eval echo "$as_me:3842: \"$ac_try\"") >&5
3845 echo "$as_me:3845: \$? = $ac_status" >&5
3846 (exit $ac_status); }; }; then
3847 cf_XOPEN_SOURCE_set_ok=yes
3849 echo "$as_me: failed program was:" >&5
3850 cat conftest.$ac_ext >&5
3851 cf_XOPEN_SOURCE_set_ok=no
3853 rm -f conftest.$ac_objext conftest.$ac_ext
3854 if test $cf_XOPEN_SOURCE_set_ok = no
3856 { echo "$as_me:3856: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3857 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3861 echo "$as_me:3861: checking if we should define _XOPEN_SOURCE" >&5
3862 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3863 if test "${cf_cv_xopen_source+set}" = set; then
3864 echo $ECHO_N "(cached) $ECHO_C" >&6
3867 cat >conftest.$ac_ext <<_ACEOF
3868 #line 3868 "configure"
3869 #include "confdefs.h"
3873 #include <sys/types.h>
3879 #ifndef _XOPEN_SOURCE
3886 rm -f conftest.$ac_objext
3887 if { (eval echo "$as_me:3887: \"$ac_compile\"") >&5
3888 (eval $ac_compile) 2>&5
3890 echo "$as_me:3890: \$? = $ac_status" >&5
3891 (exit $ac_status); } &&
3892 { ac_try='test -s conftest.$ac_objext'
3893 { (eval echo "$as_me:3893: \"$ac_try\"") >&5
3896 echo "$as_me:3896: \$? = $ac_status" >&5
3897 (exit $ac_status); }; }; then
3898 cf_cv_xopen_source=no
3900 echo "$as_me: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3903 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3904 cat >conftest.$ac_ext <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3910 #include <sys/types.h>
3916 #ifdef _XOPEN_SOURCE
3923 rm -f conftest.$ac_objext
3924 if { (eval echo "$as_me:3924: \"$ac_compile\"") >&5
3925 (eval $ac_compile) 2>&5
3927 echo "$as_me:3927: \$? = $ac_status" >&5
3928 (exit $ac_status); } &&
3929 { ac_try='test -s conftest.$ac_objext'
3930 { (eval echo "$as_me:3930: \"$ac_try\"") >&5
3933 echo "$as_me:3933: \$? = $ac_status" >&5
3934 (exit $ac_status); }; }; then
3935 cf_cv_xopen_source=no
3937 echo "$as_me: failed program was:" >&5
3938 cat conftest.$ac_ext >&5
3939 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3941 rm -f conftest.$ac_objext conftest.$ac_ext
3945 rm -f conftest.$ac_objext conftest.$ac_ext
3948 echo "$as_me:3948: result: $cf_cv_xopen_source" >&5
3949 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3951 if test "$cf_cv_xopen_source" != no ; then
3953 CFLAGS=`echo "$CFLAGS" | \
3954 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3955 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3957 CPPFLAGS=`echo "$CPPFLAGS" | \
3958 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3959 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3961 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3966 cf_new_extra_cppflags=
3968 for cf_add_cflags in $cf_temp_xopen_source
3970 case $cf_fix_cppflags in
3972 case $cf_add_cflags in
3973 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3974 case $cf_add_cflags in
3976 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3978 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3979 && test -z "${cf_tst_cflags}" \
3980 && cf_fix_cppflags=yes
3982 if test $cf_fix_cppflags = yes ; then
3983 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3985 elif test "${cf_tst_cflags}" = "\"'" ; then
3986 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3995 case $cf_add_cflags in
3997 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3999 CPPFLAGS=`echo "$CPPFLAGS" | \
4000 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4001 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4005 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4010 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4015 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4017 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4020 && test -z "${cf_tst_cflags}" \
4021 && cf_fix_cppflags=no
4026 if test -n "$cf_new_cflags" ; then
4028 CFLAGS="$CFLAGS $cf_new_cflags"
4031 if test -n "$cf_new_cppflags" ; then
4033 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4036 if test -n "$cf_new_extra_cppflags" ; then
4038 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4046 echo "$as_me:4046: checking for signal global datatype" >&5
4047 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4048 if test "${cf_cv_sig_atomic_t+set}" = set; then
4049 echo $ECHO_N "(cached) $ECHO_C" >&6
4053 "volatile sig_atomic_t" \
4057 cat >conftest.$ac_ext <<_ACEOF
4058 #line 4058 "configure"
4059 #include "confdefs.h"
4061 #include <sys/types.h>
4067 static void handler(int sig)
4074 signal(SIGINT, handler);
4080 rm -f conftest.$ac_objext
4081 if { (eval echo "$as_me:4081: \"$ac_compile\"") >&5
4082 (eval $ac_compile) 2>&5
4084 echo "$as_me:4084: \$? = $ac_status" >&5
4085 (exit $ac_status); } &&
4086 { ac_try='test -s conftest.$ac_objext'
4087 { (eval echo "$as_me:4087: \"$ac_try\"") >&5
4090 echo "$as_me:4090: \$? = $ac_status" >&5
4091 (exit $ac_status); }; }; then
4092 cf_cv_sig_atomic_t=$cf_type
4094 echo "$as_me: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 cf_cv_sig_atomic_t=no
4098 rm -f conftest.$ac_objext conftest.$ac_ext
4099 test "$cf_cv_sig_atomic_t" != no && break
4104 echo "$as_me:4104: result: $cf_cv_sig_atomic_t" >&5
4105 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4106 test "$cf_cv_sig_atomic_t" != no &&
4107 cat >>confdefs.h <<EOF
4108 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4111 # Work around breakage on OS X
4113 echo "$as_me:4113: checking if SIGWINCH is defined" >&5
4114 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4115 if test "${cf_cv_define_sigwinch+set}" = set; then
4116 echo $ECHO_N "(cached) $ECHO_C" >&6
4119 cat >conftest.$ac_ext <<_ACEOF
4120 #line 4120 "configure"
4121 #include "confdefs.h"
4123 #include <sys/types.h>
4124 #include <sys/signal.h>
4134 rm -f conftest.$ac_objext
4135 if { (eval echo "$as_me:4135: \"$ac_compile\"") >&5
4136 (eval $ac_compile) 2>&5
4138 echo "$as_me:4138: \$? = $ac_status" >&5
4139 (exit $ac_status); } &&
4140 { ac_try='test -s conftest.$ac_objext'
4141 { (eval echo "$as_me:4141: \"$ac_try\"") >&5
4144 echo "$as_me:4144: \$? = $ac_status" >&5
4145 (exit $ac_status); }; }; then
4146 cf_cv_define_sigwinch=yes
4148 echo "$as_me: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 cat >conftest.$ac_ext <<_ACEOF
4151 #line 4151 "configure"
4152 #include "confdefs.h"
4154 #undef _XOPEN_SOURCE
4155 #undef _POSIX_SOURCE
4156 #undef _POSIX_C_SOURCE
4157 #include <sys/types.h>
4158 #include <sys/signal.h>
4168 rm -f conftest.$ac_objext
4169 if { (eval echo "$as_me:4169: \"$ac_compile\"") >&5
4170 (eval $ac_compile) 2>&5
4172 echo "$as_me:4172: \$? = $ac_status" >&5
4173 (exit $ac_status); } &&
4174 { ac_try='test -s conftest.$ac_objext'
4175 { (eval echo "$as_me:4175: \"$ac_try\"") >&5
4178 echo "$as_me:4178: \$? = $ac_status" >&5
4179 (exit $ac_status); }; }; then
4180 cf_cv_define_sigwinch=maybe
4182 echo "$as_me: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
4184 cf_cv_define_sigwinch=no
4186 rm -f conftest.$ac_objext conftest.$ac_ext
4189 rm -f conftest.$ac_objext conftest.$ac_ext
4192 echo "$as_me:4192: result: $cf_cv_define_sigwinch" >&5
4193 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4195 if test "$cf_cv_define_sigwinch" = maybe ; then
4196 echo "$as_me:4196: checking for actual SIGWINCH definition" >&5
4197 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4198 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4199 echo $ECHO_N "(cached) $ECHO_C" >&6
4202 cf_cv_fixup_sigwinch=unknown
4204 while test $cf_sigwinch != 1
4206 cat >conftest.$ac_ext <<_ACEOF
4207 #line 4207 "configure"
4208 #include "confdefs.h"
4210 #undef _XOPEN_SOURCE
4211 #undef _POSIX_SOURCE
4212 #undef _POSIX_C_SOURCE
4213 #include <sys/types.h>
4214 #include <sys/signal.h>
4220 #if SIGWINCH != $cf_sigwinch
4228 rm -f conftest.$ac_objext
4229 if { (eval echo "$as_me:4229: \"$ac_compile\"") >&5
4230 (eval $ac_compile) 2>&5
4232 echo "$as_me:4232: \$? = $ac_status" >&5
4233 (exit $ac_status); } &&
4234 { ac_try='test -s conftest.$ac_objext'
4235 { (eval echo "$as_me:4235: \"$ac_try\"") >&5
4238 echo "$as_me:4238: \$? = $ac_status" >&5
4239 (exit $ac_status); }; }; then
4240 cf_cv_fixup_sigwinch=$cf_sigwinch
4243 echo "$as_me: failed program was:" >&5
4244 cat conftest.$ac_ext >&5
4246 rm -f conftest.$ac_objext conftest.$ac_ext
4248 cf_sigwinch=`expr $cf_sigwinch - 1`
4252 echo "$as_me:4252: result: $cf_cv_fixup_sigwinch" >&5
4253 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4255 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4256 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4260 # Checks for CODESET support.
4262 echo "$as_me:4262: checking for nl_langinfo and CODESET" >&5
4263 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4264 if test "${am_cv_langinfo_codeset+set}" = set; then
4265 echo $ECHO_N "(cached) $ECHO_C" >&6
4267 cat >conftest.$ac_ext <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4270 #include <langinfo.h>
4274 char* cs = nl_langinfo(CODESET);
4279 rm -f conftest.$ac_objext conftest$ac_exeext
4280 if { (eval echo "$as_me:4280: \"$ac_link\"") >&5
4281 (eval $ac_link) 2>&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest$ac_exeext'
4286 { (eval echo "$as_me:4286: \"$ac_try\"") >&5
4289 echo "$as_me:4289: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4291 am_cv_langinfo_codeset=yes
4293 echo "$as_me: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
4295 am_cv_langinfo_codeset=no
4297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4300 echo "$as_me:4300: result: $am_cv_langinfo_codeset" >&5
4301 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4302 if test $am_cv_langinfo_codeset = yes; then
4304 cat >>confdefs.h <<\EOF
4305 #define HAVE_LANGINFO_CODESET 1
4310 echo "$as_me:4310: checking if you want to use pkg-config" >&5
4311 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4313 # Check whether --with-pkg-config or --without-pkg-config was given.
4314 if test "${with_pkg_config+set}" = set; then
4315 withval="$with_pkg_config"
4316 cf_pkg_config=$withval
4320 echo "$as_me:4320: result: $cf_pkg_config" >&5
4321 echo "${ECHO_T}$cf_pkg_config" >&6
4323 case $cf_pkg_config in
4329 if test -n "$ac_tool_prefix"; then
4330 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4331 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4335 echo $ECHO_N "(cached) $ECHO_C" >&6
4339 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4342 ac_save_IFS=$IFS; IFS=$ac_path_separator
4344 for ac_dir in $ac_dummy; do
4346 test -z "$ac_dir" && ac_dir=.
4347 if $as_executable_p "$ac_dir/$ac_word"; then
4348 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4349 echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4357 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4359 if test -n "$PKG_CONFIG"; then
4360 echo "$as_me:4360: result: $PKG_CONFIG" >&5
4361 echo "${ECHO_T}$PKG_CONFIG" >&6
4363 echo "$as_me:4363: result: no" >&5
4364 echo "${ECHO_T}no" >&6
4368 if test -z "$ac_cv_path_PKG_CONFIG"; then
4369 ac_pt_PKG_CONFIG=$PKG_CONFIG
4370 # Extract the first word of "pkg-config", so it can be a program name with args.
4371 set dummy pkg-config; ac_word=$2
4372 echo "$as_me:4372: checking for $ac_word" >&5
4373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4374 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4375 echo $ECHO_N "(cached) $ECHO_C" >&6
4377 case $ac_pt_PKG_CONFIG in
4379 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4382 ac_save_IFS=$IFS; IFS=$ac_path_separator
4384 for ac_dir in $ac_dummy; do
4386 test -z "$ac_dir" && ac_dir=.
4387 if $as_executable_p "$ac_dir/$ac_word"; then
4388 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4389 echo "$as_me:4389: found $ac_dir/$ac_word" >&5
4394 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4398 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4400 if test -n "$ac_pt_PKG_CONFIG"; then
4401 echo "$as_me:4401: result: $ac_pt_PKG_CONFIG" >&5
4402 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4404 echo "$as_me:4404: result: no" >&5
4405 echo "${ECHO_T}no" >&6
4408 PKG_CONFIG=$ac_pt_PKG_CONFIG
4410 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4419 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4420 if test "$PKG_CONFIG" != none ; then
4422 if test "x$prefix" != xNONE; then
4423 cf_path_syntax="$prefix"
4425 cf_path_syntax="$ac_default_prefix"
4428 case ".$PKG_CONFIG" in
4433 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4435 (.\${*prefix}*|.\${*dir}*)
4436 eval PKG_CONFIG="$PKG_CONFIG"
4437 case ".$PKG_CONFIG" in
4439 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4444 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4447 { { echo "$as_me:4447: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4448 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4449 { (exit 1); exit 1; }; }
4453 elif test "x$cf_pkg_config" != xno ; then
4454 { echo "$as_me:4454: WARNING: pkg-config is not installed" >&5
4455 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4458 echo "$as_me:4458: checking if you want to see long compiling messages" >&5
4459 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4461 # Check whether --enable-echo or --disable-echo was given.
4462 if test "${enable_echo+set}" = set; then
4463 enableval="$enable_echo"
4464 test "$enableval" != no && enableval=yes
4465 if test "$enableval" != "yes" ; then
4468 ECHO_LD='@echo linking $@;'
4469 RULE_CC='@echo compiling $<'
4470 SHOW_CC='@echo compiling $@'
4492 echo "$as_me:4492: result: $enableval" >&5
4493 echo "${ECHO_T}$enableval" >&6
4495 echo "$as_me:4495: checking for ncurses wrap-prefix" >&5
4496 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4498 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4499 if test "${with_ncurses_wrap_prefix+set}" = set; then
4500 withval="$with_ncurses_wrap_prefix"
4501 NCURSES_WRAP_PREFIX=$withval
4503 NCURSES_WRAP_PREFIX=_nc_
4505 echo "$as_me:4505: result: $NCURSES_WRAP_PREFIX" >&5
4506 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4508 echo "$as_me:4508: checking if you want to check for wide-character functions" >&5
4509 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4511 # Check whether --enable-widec or --disable-widec was given.
4512 if test "${enable_widec+set}" = set; then
4513 enableval="$enable_widec"
4514 test "$enableval" != no && enableval=yes
4515 if test "$enableval" != "yes" ; then
4525 echo "$as_me:4525: result: $cf_enable_widec" >&5
4526 echo "${ECHO_T}$cf_enable_widec" >&6
4528 echo "$as_me:4528: checking for specific curses-directory" >&5
4529 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4531 # Check whether --with-curses-dir or --without-curses-dir was given.
4532 if test "${with_curses_dir+set}" = set; then
4533 withval="$with_curses_dir"
4534 cf_cv_curses_dir=$withval
4538 echo "$as_me:4538: result: $cf_cv_curses_dir" >&5
4539 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4541 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4544 if test "x$prefix" != xNONE; then
4545 cf_path_syntax="$prefix"
4547 cf_path_syntax="$ac_default_prefix"
4555 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4557 (.\${*prefix}*|.\${*dir}*)
4558 eval withval="$withval"
4561 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4566 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4569 { { echo "$as_me:4569: error: expected a pathname, not \"$withval\"" >&5
4570 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4571 { (exit 1); exit 1; }; }
4575 if test -d "$cf_cv_curses_dir"
4578 if test -n "$cf_cv_curses_dir/include" ; then
4579 for cf_add_incdir in $cf_cv_curses_dir/include
4581 while test $cf_add_incdir != /usr/include
4583 if test -d $cf_add_incdir
4586 if test -n "$CFLAGS$CPPFLAGS" ; then
4587 # a loop is needed to ensure we can add subdirs of existing dirs
4588 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4589 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4590 cf_have_incdir=yes; break
4595 if test "$cf_have_incdir" = no ; then
4596 if test "$cf_add_incdir" = /usr/local/include ; then
4597 if test "$GCC" = yes
4599 cf_save_CPPFLAGS=$CPPFLAGS
4600 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4601 cat >conftest.$ac_ext <<_ACEOF
4602 #line 4602 "configure"
4603 #include "confdefs.h"
4613 rm -f conftest.$ac_objext
4614 if { (eval echo "$as_me:4614: \"$ac_compile\"") >&5
4615 (eval $ac_compile) 2>&5
4617 echo "$as_me:4617: \$? = $ac_status" >&5
4618 (exit $ac_status); } &&
4619 { ac_try='test -s conftest.$ac_objext'
4620 { (eval echo "$as_me:4620: \"$ac_try\"") >&5
4623 echo "$as_me:4623: \$? = $ac_status" >&5
4624 (exit $ac_status); }; }; then
4627 echo "$as_me: failed program was:" >&5
4628 cat conftest.$ac_ext >&5
4631 rm -f conftest.$ac_objext conftest.$ac_ext
4632 CPPFLAGS=$cf_save_CPPFLAGS
4637 if test "$cf_have_incdir" = no ; then
4638 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4640 echo "${as_me:-configure}:4640: testing adding $cf_add_incdir to include-path ..." 1>&5
4642 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4644 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4645 test "$cf_top_incdir" = "$cf_add_incdir" && break
4646 cf_add_incdir="$cf_top_incdir"
4657 if test -n "$cf_cv_curses_dir/lib" ; then
4658 for cf_add_libdir in $cf_cv_curses_dir/lib
4660 if test $cf_add_libdir = /usr/lib ; then
4662 elif test -d $cf_add_libdir
4665 if test -n "$LDFLAGS$LIBS" ; then
4666 # a loop is needed to ensure we can add subdirs of existing dirs
4667 for cf_test_libdir in $LDFLAGS $LIBS ; do
4668 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4669 cf_have_libdir=yes; break
4673 if test "$cf_have_libdir" = no ; then
4674 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4676 echo "${as_me:-configure}:4676: testing adding $cf_add_libdir to library-path ..." 1>&5
4678 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4689 echo "$as_me:4689: checking for specified curses library type" >&5
4690 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4692 # Check whether --with-screen or --without-screen was given.
4693 if test "${with_screen+set}" = set; then
4694 withval="$with_screen"
4695 cf_cv_screen=$withval
4698 # Check whether --with-ncursesw or --without-ncursesw was given.
4699 if test "${with_ncursesw+set}" = set; then
4700 withval="$with_ncursesw"
4701 cf_cv_screen=ncursesw
4704 # Check whether --with-ncurses or --without-ncurses was given.
4705 if test "${with_ncurses+set}" = set; then
4706 withval="$with_ncurses"
4707 cf_cv_screen=ncurses
4710 # Check whether --with-pdcurses or --without-pdcurses was given.
4711 if test "${with_pdcurses+set}" = set; then
4712 withval="$with_pdcurses"
4713 cf_cv_screen=pdcurses
4716 # Check whether --with-curses-colr or --without-curses-colr was given.
4717 if test "${with_curses_colr+set}" = set; then
4718 withval="$with_curses_colr"
4719 cf_cv_screen=curses_colr
4722 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4723 if test "${with_curses_5lib+set}" = set; then
4724 withval="$with_curses_5lib"
4725 cf_cv_screen=curses_5lib
4733 echo "$as_me:4733: result: $cf_cv_screen" >&5
4734 echo "${ECHO_T}$cf_cv_screen" >&6
4736 case $cf_cv_screen in
4739 echo "$as_me:4739: checking for extra include directories" >&5
4740 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4741 if test "${cf_cv_curses_incdir+set}" = set; then
4742 echo $ECHO_N "(cached) $ECHO_C" >&6
4745 cf_cv_curses_incdir=no
4748 if test "x$cf_cv_screen" = "xcurses_colr"
4750 test -d /usr/include/curses_colr && \
4751 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4755 if test "x$cf_cv_screen" = "xcurses_5lib"
4757 test -d /usr/5lib && \
4758 test -d /usr/5include && \
4759 cf_cv_curses_incdir="-I/usr/5include"
4765 echo "$as_me:4765: result: $cf_cv_curses_incdir" >&5
4766 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4767 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4769 echo "$as_me:4769: checking if we have identified curses headers" >&5
4770 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4771 if test "${cf_cv_ncurses_header+set}" = set; then
4772 echo $ECHO_N "(cached) $ECHO_C" >&6
4775 cf_cv_ncurses_header=none
4778 curses.h ncurses/ncurses.h ncurses/curses.h
4780 cat >conftest.$ac_ext <<_ACEOF
4781 #line 4781 "configure"
4782 #include "confdefs.h"
4783 #include <${cf_header}>
4787 initscr(); tgoto("?", 0,0)
4792 rm -f conftest.$ac_objext
4793 if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794 (eval $ac_compile) 2>&5
4796 echo "$as_me:4796: \$? = $ac_status" >&5
4797 (exit $ac_status); } &&
4798 { ac_try='test -s conftest.$ac_objext'
4799 { (eval echo "$as_me:4799: \"$ac_try\"") >&5
4802 echo "$as_me:4802: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4804 cf_cv_ncurses_header=$cf_header; break
4806 echo "$as_me: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4809 rm -f conftest.$ac_objext conftest.$ac_ext
4813 echo "$as_me:4813: result: $cf_cv_ncurses_header" >&5
4814 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4816 if test "$cf_cv_ncurses_header" = none ; then
4817 { { echo "$as_me:4817: error: No curses header-files found" >&5
4818 echo "$as_me: error: No curses header-files found" >&2;}
4819 { (exit 1); exit 1; }; }
4822 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4824 for ac_header in $cf_cv_ncurses_header
4826 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4827 echo "$as_me:4827: checking for $ac_header" >&5
4828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4830 echo $ECHO_N "(cached) $ECHO_C" >&6
4832 cat >conftest.$ac_ext <<_ACEOF
4833 #line 4833 "configure"
4834 #include "confdefs.h"
4835 #include <$ac_header>
4837 if { (eval echo "$as_me:4837: \"$ac_cpp conftest.$ac_ext\"") >&5
4838 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4840 egrep -v '^ *\+' conftest.er1 >conftest.err
4842 cat conftest.err >&5
4843 echo "$as_me:4843: \$? = $ac_status" >&5
4844 (exit $ac_status); } >/dev/null; then
4845 if test -s conftest.err; then
4846 ac_cpp_err=$ac_c_preproc_warn_flag
4853 if test -z "$ac_cpp_err"; then
4854 eval "$as_ac_Header=yes"
4856 echo "$as_me: failed program was:" >&5
4857 cat conftest.$ac_ext >&5
4858 eval "$as_ac_Header=no"
4860 rm -f conftest.err conftest.$ac_ext
4862 echo "$as_me:4862: result: `eval echo '${'$as_ac_Header'}'`" >&5
4863 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4864 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4865 cat >>confdefs.h <<EOF
4866 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4872 echo "$as_me:4872: checking for terminfo header" >&5
4873 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4874 if test "${cf_cv_term_header+set}" = set; then
4875 echo $ECHO_N "(cached) $ECHO_C" >&6
4878 case ${cf_cv_ncurses_header} in
4879 (*/ncurses.h|*/ncursesw.h)
4880 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4883 cf_term_header=term.h
4887 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4889 cat >conftest.$ac_ext <<_ACEOF
4890 #line 4890 "configure"
4891 #include "confdefs.h"
4893 #include <${cf_cv_ncurses_header:-curses.h}>
4899 int x = auto_left_margin
4904 rm -f conftest.$ac_objext
4905 if { (eval echo "$as_me:4905: \"$ac_compile\"") >&5
4906 (eval $ac_compile) 2>&5
4908 echo "$as_me:4908: \$? = $ac_status" >&5
4909 (exit $ac_status); } &&
4910 { ac_try='test -s conftest.$ac_objext'
4911 { (eval echo "$as_me:4911: \"$ac_try\"") >&5
4914 echo "$as_me:4914: \$? = $ac_status" >&5
4915 (exit $ac_status); }; }; then
4917 cf_cv_term_header="$cf_test"
4919 echo "$as_me: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4922 cf_cv_term_header=unknown
4925 rm -f conftest.$ac_objext conftest.$ac_ext
4926 test "$cf_cv_term_header" != unknown && break
4930 echo "$as_me:4930: result: $cf_cv_term_header" >&5
4931 echo "${ECHO_T}$cf_cv_term_header" >&6
4933 # Set definitions to allow ifdef'ing to accommodate subdirectories
4935 case $cf_cv_term_header in
4938 cat >>confdefs.h <<\EOF
4939 #define HAVE_TERM_H 1
4945 case $cf_cv_term_header in
4948 cat >>confdefs.h <<\EOF
4949 #define HAVE_NCURSES_TERM_H 1
4955 cat >>confdefs.h <<\EOF
4956 #define HAVE_NCURSESW_TERM_H 1
4962 echo "$as_me:4962: checking for ncurses version" >&5
4963 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4964 if test "${cf_cv_ncurses_version+set}" = set; then
4965 echo $ECHO_N "(cached) $ECHO_C" >&6
4968 cf_cv_ncurses_version=no
4971 if test "$cross_compiling" = yes; then
4973 # This will not work if the preprocessor splits the line after the
4974 # Autoconf token. The 'unproto' program does that.
4975 cat > conftest.$ac_ext <<EOF
4976 #include <${cf_cv_ncurses_header:-curses.h}>
4978 #ifdef NCURSES_VERSION
4979 Autoconf NCURSES_VERSION
4987 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4988 { (eval echo "$as_me:4988: \"$cf_try\"") >&5
4991 echo "$as_me:4991: \$? = $ac_status" >&5
4992 (exit $ac_status); }
4993 if test -f conftest.out ; then
4994 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4995 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5000 cat >conftest.$ac_ext <<_ACEOF
5001 #line 5001 "configure"
5002 #include "confdefs.h"
5004 #include <${cf_cv_ncurses_header:-curses.h}>
5008 FILE *fp = fopen("$cf_tempfile", "w");
5009 #ifdef NCURSES_VERSION
5010 # ifdef NCURSES_VERSION_PATCH
5011 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5013 fprintf(fp, "%s\n", NCURSES_VERSION);
5017 fprintf(fp, "old\n");
5022 ${cf_cv_main_return:-return}(0);
5025 rm -f conftest$ac_exeext
5026 if { (eval echo "$as_me:5026: \"$ac_link\"") >&5
5027 (eval $ac_link) 2>&5
5029 echo "$as_me:5029: \$? = $ac_status" >&5
5030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5031 { (eval echo "$as_me:5031: \"$ac_try\"") >&5
5034 echo "$as_me:5034: \$? = $ac_status" >&5
5035 (exit $ac_status); }; }; then
5037 cf_cv_ncurses_version=`cat $cf_tempfile`
5039 echo "$as_me: program exited with status $ac_status" >&5
5040 echo "$as_me: failed program was:" >&5
5041 cat conftest.$ac_ext >&5
5043 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5048 echo "$as_me:5048: result: $cf_cv_ncurses_version" >&5
5049 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5050 test "$cf_cv_ncurses_version" = no ||
5051 cat >>confdefs.h <<\EOF
5055 echo "$as_me:5055: checking if we have identified curses libraries" >&5
5056 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5057 cat >conftest.$ac_ext <<_ACEOF
5058 #line 5058 "configure"
5059 #include "confdefs.h"
5060 #include <${cf_cv_ncurses_header:-curses.h}>
5064 initscr(); tgoto("?", 0,0)
5069 rm -f conftest.$ac_objext conftest$ac_exeext
5070 if { (eval echo "$as_me:5070: \"$ac_link\"") >&5
5071 (eval $ac_link) 2>&5
5073 echo "$as_me:5073: \$? = $ac_status" >&5
5074 (exit $ac_status); } &&
5075 { ac_try='test -s conftest$ac_exeext'
5076 { (eval echo "$as_me:5076: \"$ac_try\"") >&5
5079 echo "$as_me:5079: \$? = $ac_status" >&5
5080 (exit $ac_status); }; }; then
5083 echo "$as_me: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5088 echo "$as_me:5088: result: $cf_result" >&5
5089 echo "${ECHO_T}$cf_result" >&6
5091 if test "$cf_result" = no ; then
5094 echo "$as_me:5094: checking for tgoto in -lmytinfo" >&5
5095 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5096 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5097 echo $ECHO_N "(cached) $ECHO_C" >&6
5099 ac_check_lib_save_LIBS=$LIBS
5100 LIBS="-lmytinfo $LIBS"
5101 cat >conftest.$ac_ext <<_ACEOF
5102 #line 5102 "configure"
5103 #include "confdefs.h"
5105 /* Override any gcc2 internal prototype to avoid an error. */
5109 /* We use char because int might match the return type of a gcc2
5110 builtin and then its argument prototype would still apply. */
5120 rm -f conftest.$ac_objext conftest$ac_exeext
5121 if { (eval echo "$as_me:5121: \"$ac_link\"") >&5
5122 (eval $ac_link) 2>&5
5124 echo "$as_me:5124: \$? = $ac_status" >&5
5125 (exit $ac_status); } &&
5126 { ac_try='test -s conftest$ac_exeext'
5127 { (eval echo "$as_me:5127: \"$ac_try\"") >&5
5130 echo "$as_me:5130: \$? = $ac_status" >&5
5131 (exit $ac_status); }; }; then
5132 ac_cv_lib_mytinfo_tgoto=yes
5134 echo "$as_me: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 ac_cv_lib_mytinfo_tgoto=no
5138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5139 LIBS=$ac_check_lib_save_LIBS
5141 echo "$as_me:5141: result: $ac_cv_lib_mytinfo_tgoto" >&5
5142 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5143 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5145 cf_add_libs="-lmytinfo"
5146 # Filter out duplicates - this happens with badly-designed ".pc" files...
5147 for cf_add_1lib in $LIBS
5149 for cf_add_2lib in $cf_add_libs
5151 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5157 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5165 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5166 # next (1998), and xcurses "newer" (2000). There is no header file for
5167 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5168 # term.h) for cur_colr
5169 if test "x$cf_cv_screen" = "xcurses_colr"
5171 echo "$as_me:5171: checking for initscr in -lcur_colr" >&5
5172 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5173 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5174 echo $ECHO_N "(cached) $ECHO_C" >&6
5176 ac_check_lib_save_LIBS=$LIBS
5177 LIBS="-lcur_colr $LIBS"
5178 cat >conftest.$ac_ext <<_ACEOF
5179 #line 5179 "configure"
5180 #include "confdefs.h"
5182 /* Override any gcc2 internal prototype to avoid an error. */
5186 /* We use char because int might match the return type of a gcc2
5187 builtin and then its argument prototype would still apply. */
5197 rm -f conftest.$ac_objext conftest$ac_exeext
5198 if { (eval echo "$as_me:5198: \"$ac_link\"") >&5
5199 (eval $ac_link) 2>&5
5201 echo "$as_me:5201: \$? = $ac_status" >&5
5202 (exit $ac_status); } &&
5203 { ac_try='test -s conftest$ac_exeext'
5204 { (eval echo "$as_me:5204: \"$ac_try\"") >&5
5207 echo "$as_me:5207: \$? = $ac_status" >&5
5208 (exit $ac_status); }; }; then
5209 ac_cv_lib_cur_colr_initscr=yes
5211 echo "$as_me: failed program was:" >&5
5212 cat conftest.$ac_ext >&5
5213 ac_cv_lib_cur_colr_initscr=no
5215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5216 LIBS=$ac_check_lib_save_LIBS
5218 echo "$as_me:5218: result: $ac_cv_lib_cur_colr_initscr" >&5
5219 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5220 if test $ac_cv_lib_cur_colr_initscr = yes; then
5222 cf_add_libs="-lcur_colr"
5223 # Filter out duplicates - this happens with badly-designed ".pc" files...
5224 for cf_add_1lib in $LIBS
5226 for cf_add_2lib in $cf_add_libs
5228 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5234 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5238 ac_cv_func_initscr=yes
5242 echo "$as_me:5242: checking for initscr in -lHcurses" >&5
5243 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5244 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5245 echo $ECHO_N "(cached) $ECHO_C" >&6
5247 ac_check_lib_save_LIBS=$LIBS
5248 LIBS="-lHcurses $LIBS"
5249 cat >conftest.$ac_ext <<_ACEOF
5250 #line 5250 "configure"
5251 #include "confdefs.h"
5253 /* Override any gcc2 internal prototype to avoid an error. */
5257 /* We use char because int might match the return type of a gcc2
5258 builtin and then its argument prototype would still apply. */
5268 rm -f conftest.$ac_objext conftest$ac_exeext
5269 if { (eval echo "$as_me:5269: \"$ac_link\"") >&5
5270 (eval $ac_link) 2>&5
5272 echo "$as_me:5272: \$? = $ac_status" >&5
5273 (exit $ac_status); } &&
5274 { ac_try='test -s conftest$ac_exeext'
5275 { (eval echo "$as_me:5275: \"$ac_try\"") >&5
5278 echo "$as_me:5278: \$? = $ac_status" >&5
5279 (exit $ac_status); }; }; then
5280 ac_cv_lib_Hcurses_initscr=yes
5282 echo "$as_me: failed program was:" >&5
5283 cat conftest.$ac_ext >&5
5284 ac_cv_lib_Hcurses_initscr=no
5286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5287 LIBS=$ac_check_lib_save_LIBS
5289 echo "$as_me:5289: result: $ac_cv_lib_Hcurses_initscr" >&5
5290 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5291 if test $ac_cv_lib_Hcurses_initscr = yes; then
5293 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5295 cf_add_libs="-lHcurses"
5296 # Filter out duplicates - this happens with badly-designed ".pc" files...
5297 for cf_add_1lib in $LIBS
5299 for cf_add_2lib in $cf_add_libs
5301 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5307 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5311 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5312 ac_cv_func_initscr=yes
5321 case `arch 2>/dev/null` in
5326 if test -n "/lib64" ; then
5327 for cf_add_libdir in /lib64
5329 if test $cf_add_libdir = /usr/lib ; then
5331 elif test -d $cf_add_libdir
5334 if test -n "$LDFLAGS$LIBS" ; then
5335 # a loop is needed to ensure we can add subdirs of existing dirs
5336 for cf_test_libdir in $LDFLAGS $LIBS ; do
5337 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5338 cf_have_libdir=yes; break
5342 if test "$cf_have_libdir" = no ; then
5343 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5345 echo "${as_me:-configure}:5345: testing adding $cf_add_libdir to library-path ..." 1>&5
5347 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5355 if test -n "/lib" ; then
5356 for cf_add_libdir in /lib
5358 if test $cf_add_libdir = /usr/lib ; then
5360 elif test -d $cf_add_libdir
5363 if test -n "$LDFLAGS$LIBS" ; then
5364 # a loop is needed to ensure we can add subdirs of existing dirs
5365 for cf_test_libdir in $LDFLAGS $LIBS ; do
5366 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5367 cf_have_libdir=yes; break
5371 if test "$cf_have_libdir" = no ; then
5372 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5374 echo "${as_me:-configure}:5374: testing adding $cf_add_libdir to library-path ..." 1>&5
5376 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5386 if test -n "/lib" ; then
5387 for cf_add_libdir in /lib
5389 if test $cf_add_libdir = /usr/lib ; then
5391 elif test -d $cf_add_libdir
5394 if test -n "$LDFLAGS$LIBS" ; then
5395 # a loop is needed to ensure we can add subdirs of existing dirs
5396 for cf_test_libdir in $LDFLAGS $LIBS ; do
5397 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5398 cf_have_libdir=yes; break
5402 if test "$cf_have_libdir" = no ; then
5403 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5405 echo "${as_me:-configure}:5405: testing adding $cf_add_libdir to library-path ..." 1>&5
5407 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5417 if test "x$cf_cv_screen" = "xcurses_5lib"
5419 if test -d /usr/5lib ; then
5421 if test -n "/usr/5lib" ; then
5422 for cf_add_libdir in /usr/5lib
5424 if test $cf_add_libdir = /usr/lib ; then
5426 elif test -d $cf_add_libdir
5429 if test -n "$LDFLAGS$LIBS" ; then
5430 # a loop is needed to ensure we can add subdirs of existing dirs
5431 for cf_test_libdir in $LDFLAGS $LIBS ; do
5432 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5433 cf_have_libdir=yes; break
5437 if test "$cf_have_libdir" = no ; then
5438 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5440 echo "${as_me:-configure}:5440: testing adding $cf_add_libdir to library-path ..." 1>&5
5442 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5448 cf_add_libs="-lcurses -ltermcap"
5449 # Filter out duplicates - this happens with badly-designed ".pc" files...
5450 for cf_add_1lib in $LIBS
5452 for cf_add_2lib in $cf_add_libs
5454 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5460 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5466 ac_cv_func_initscr=yes
5470 if test ".$ac_cv_func_initscr" != .yes ; then
5471 cf_save_LIBS="$LIBS"
5473 if test ".${cf_cv_ncurses_version:-no}" != .no
5475 cf_check_list="ncurses curses cursesX"
5477 cf_check_list="cursesX curses ncurses"
5480 # Check for library containing tgoto. Do this before curses library
5481 # because it may be needed to link the test-case for initscr.
5482 if test "x$cf_term_lib" = x
5484 echo "$as_me:5484: checking for tgoto" >&5
5485 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5486 if test "${ac_cv_func_tgoto+set}" = set; then
5487 echo $ECHO_N "(cached) $ECHO_C" >&6
5489 cat >conftest.$ac_ext <<_ACEOF
5490 #line 5490 "configure"
5491 #include "confdefs.h"
5492 /* System header to define __stub macros and hopefully few prototypes,
5493 which can conflict with char tgoto (); below. */
5495 /* Override any gcc2 internal prototype to avoid an error. */
5499 /* We use char because int might match the return type of a gcc2
5500 builtin and then its argument prototype would still apply. */
5507 /* The GNU C library defines this for functions which it implements
5508 to always fail with ENOSYS. Some functions are actually named
5509 something starting with __ and the normal name is an alias. */
5510 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5513 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5520 rm -f conftest.$ac_objext conftest$ac_exeext
5521 if { (eval echo "$as_me:5521: \"$ac_link\"") >&5
5522 (eval $ac_link) 2>&5
5524 echo "$as_me:5524: \$? = $ac_status" >&5
5525 (exit $ac_status); } &&
5526 { ac_try='test -s conftest$ac_exeext'
5527 { (eval echo "$as_me:5527: \"$ac_try\"") >&5
5530 echo "$as_me:5530: \$? = $ac_status" >&5
5531 (exit $ac_status); }; }; then
5532 ac_cv_func_tgoto=yes
5534 echo "$as_me: failed program was:" >&5
5535 cat conftest.$ac_ext >&5
5538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5540 echo "$as_me:5540: result: $ac_cv_func_tgoto" >&5
5541 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5542 if test $ac_cv_func_tgoto = yes; then
5543 cf_term_lib=predefined
5546 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5548 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5549 echo "$as_me:5549: checking for tgoto in -l$cf_term_lib" >&5
5550 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5551 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5552 echo $ECHO_N "(cached) $ECHO_C" >&6
5554 ac_check_lib_save_LIBS=$LIBS
5555 LIBS="-l$cf_term_lib $LIBS"
5556 cat >conftest.$ac_ext <<_ACEOF
5557 #line 5557 "configure"
5558 #include "confdefs.h"
5560 /* Override any gcc2 internal prototype to avoid an error. */
5564 /* We use char because int might match the return type of a gcc2
5565 builtin and then its argument prototype would still apply. */
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
5577 (eval $ac_link) 2>&5
5579 echo "$as_me:5579: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest$ac_exeext'
5582 { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5585 echo "$as_me:5585: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
5587 eval "$as_ac_Lib=yes"
5589 echo "$as_me: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 eval "$as_ac_Lib=no"
5593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5594 LIBS=$ac_check_lib_save_LIBS
5596 echo "$as_me:5596: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5597 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5598 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5608 # Check for library containing initscr
5609 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5610 if test "x$cf_curs_lib" = x
5612 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5614 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5615 echo "$as_me:5615: checking for initscr in -l$cf_curs_lib" >&5
5616 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5617 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5618 echo $ECHO_N "(cached) $ECHO_C" >&6
5620 ac_check_lib_save_LIBS=$LIBS
5621 LIBS="-l$cf_curs_lib $LIBS"
5622 cat >conftest.$ac_ext <<_ACEOF
5623 #line 5623 "configure"
5624 #include "confdefs.h"
5626 /* Override any gcc2 internal prototype to avoid an error. */
5630 /* We use char because int might match the return type of a gcc2
5631 builtin and then its argument prototype would still apply. */
5641 rm -f conftest.$ac_objext conftest$ac_exeext
5642 if { (eval echo "$as_me:5642: \"$ac_link\"") >&5
5643 (eval $ac_link) 2>&5
5645 echo "$as_me:5645: \$? = $ac_status" >&5
5646 (exit $ac_status); } &&
5647 { ac_try='test -s conftest$ac_exeext'
5648 { (eval echo "$as_me:5648: \"$ac_try\"") >&5
5651 echo "$as_me:5651: \$? = $ac_status" >&5
5652 (exit $ac_status); }; }; then
5653 eval "$as_ac_Lib=yes"
5655 echo "$as_me: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 eval "$as_ac_Lib=no"
5659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5660 LIBS=$ac_check_lib_save_LIBS
5662 echo "$as_me:5662: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5663 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5664 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5670 test $cf_curs_lib = unknown && { { echo "$as_me:5670: error: no curses library found" >&5
5671 echo "$as_me: error: no curses library found" >&2;}
5672 { (exit 1); exit 1; }; }
5674 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5675 if test "$cf_term_lib" = unknown ; then
5676 echo "$as_me:5676: checking if we can link with $cf_curs_lib library" >&5
5677 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5678 cat >conftest.$ac_ext <<_ACEOF
5679 #line 5679 "configure"
5680 #include "confdefs.h"
5681 #include <${cf_cv_ncurses_header:-curses.h}>
5690 rm -f conftest.$ac_objext conftest$ac_exeext
5691 if { (eval echo "$as_me:5691: \"$ac_link\"") >&5
5692 (eval $ac_link) 2>&5
5694 echo "$as_me:5694: \$? = $ac_status" >&5
5695 (exit $ac_status); } &&
5696 { ac_try='test -s conftest$ac_exeext'
5697 { (eval echo "$as_me:5697: \"$ac_try\"") >&5
5700 echo "$as_me:5700: \$? = $ac_status" >&5
5701 (exit $ac_status); }; }; then
5704 echo "$as_me: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5709 echo "$as_me:5709: result: $cf_result" >&5
5710 echo "${ECHO_T}$cf_result" >&6
5711 test $cf_result = no && { { echo "$as_me:5711: error: Cannot link curses library" >&5
5712 echo "$as_me: error: Cannot link curses library" >&2;}
5713 { (exit 1); exit 1; }; }
5714 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5716 elif test "$cf_term_lib" != predefined ; then
5717 echo "$as_me:5717: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5718 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5719 cat >conftest.$ac_ext <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5722 #include <${cf_cv_ncurses_header:-curses.h}>
5726 initscr(); tgoto((char *)0, 0, 0);
5731 rm -f conftest.$ac_objext conftest$ac_exeext
5732 if { (eval echo "$as_me:5732: \"$ac_link\"") >&5
5733 (eval $ac_link) 2>&5
5735 echo "$as_me:5735: \$? = $ac_status" >&5
5736 (exit $ac_status); } &&
5737 { ac_try='test -s conftest$ac_exeext'
5738 { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit $ac_status); }; }; then
5745 echo "$as_me: failed program was:" >&5
5746 cat conftest.$ac_ext >&5
5748 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5749 cat >conftest.$ac_ext <<_ACEOF
5750 #line 5750 "configure"
5751 #include "confdefs.h"
5752 #include <${cf_cv_ncurses_header:-curses.h}>
5761 rm -f conftest.$ac_objext conftest$ac_exeext
5762 if { (eval echo "$as_me:5762: \"$ac_link\"") >&5
5763 (eval $ac_link) 2>&5
5765 echo "$as_me:5765: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest$ac_exeext'
5768 { (eval echo "$as_me:5768: \"$ac_try\"") >&5
5771 echo "$as_me:5771: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5775 echo "$as_me: failed program was:" >&5
5776 cat conftest.$ac_ext >&5
5779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783 echo "$as_me:5783: result: $cf_result" >&5
5784 echo "${ECHO_T}$cf_result" >&6
5792 echo "$as_me:5792: checking for multibyte character support" >&5
5793 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5794 if test "${cf_cv_utf8_lib+set}" = set; then
5795 echo $ECHO_N "(cached) $ECHO_C" >&6
5798 cf_save_LIBS="$LIBS"
5799 cat >conftest.$ac_ext <<_ACEOF
5800 #line 5800 "configure"
5801 #include "confdefs.h"
5812 rm -f conftest.$ac_objext conftest$ac_exeext
5813 if { (eval echo "$as_me:5813: \"$ac_link\"") >&5
5814 (eval $ac_link) 2>&5
5816 echo "$as_me:5816: \$? = $ac_status" >&5
5817 (exit $ac_status); } &&
5818 { ac_try='test -s conftest$ac_exeext'
5819 { (eval echo "$as_me:5819: \"$ac_try\"") >&5
5822 echo "$as_me:5822: \$? = $ac_status" >&5
5823 (exit $ac_status); }; }; then
5826 echo "$as_me: failed program was:" >&5
5827 cat conftest.$ac_ext >&5
5829 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5830 # will be set on completion of the AC_TRY_LINK below.
5831 cf_cv_header_path_utf8=
5832 cf_cv_library_path_utf8=
5834 echo "${as_me:-configure}:5834: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5836 cf_save_LIBS="$LIBS"
5838 cat >conftest.$ac_ext <<_ACEOF
5839 #line 5839 "configure"
5840 #include "confdefs.h"
5842 #include <libutf8.h>
5851 rm -f conftest.$ac_objext conftest$ac_exeext
5852 if { (eval echo "$as_me:5852: \"$ac_link\"") >&5
5853 (eval $ac_link) 2>&5
5855 echo "$as_me:5855: \$? = $ac_status" >&5
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest$ac_exeext'
5858 { (eval echo "$as_me:5858: \"$ac_try\"") >&5
5861 echo "$as_me:5861: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
5864 cf_cv_find_linkage_utf8=yes
5865 cf_cv_header_path_utf8=/usr/include
5866 cf_cv_library_path_utf8=/usr/lib
5869 echo "$as_me: failed program was:" >&5
5870 cat conftest.$ac_ext >&5
5872 LIBS="-lutf8 $cf_save_LIBS"
5874 cat >conftest.$ac_ext <<_ACEOF
5875 #line 5875 "configure"
5876 #include "confdefs.h"
5878 #include <libutf8.h>
5887 rm -f conftest.$ac_objext conftest$ac_exeext
5888 if { (eval echo "$as_me:5888: \"$ac_link\"") >&5
5889 (eval $ac_link) 2>&5
5891 echo "$as_me:5891: \$? = $ac_status" >&5
5892 (exit $ac_status); } &&
5893 { ac_try='test -s conftest$ac_exeext'
5894 { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit $ac_status); }; }; then
5900 cf_cv_find_linkage_utf8=yes
5901 cf_cv_header_path_utf8=/usr/include
5902 cf_cv_library_path_utf8=/usr/lib
5903 cf_cv_library_file_utf8="-lutf8"
5906 echo "$as_me: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5909 cf_cv_find_linkage_utf8=no
5910 LIBS="$cf_save_LIBS"
5912 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5914 echo "${as_me:-configure}:5914: testing find linkage for utf8 library ..." 1>&5
5916 echo "${as_me:-configure}:5916: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5918 cf_save_CPPFLAGS="$CPPFLAGS"
5919 cf_test_CPPFLAGS="$CPPFLAGS"
5923 # collect the current set of include-directories from compiler flags
5924 cf_header_path_list=""
5925 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5926 for cf_header_path in $CPPFLAGS $CFLAGS
5928 case $cf_header_path in
5930 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5932 test "x$cf_header_path" != "xNONE" && \
5933 test -d "$cf_header_path" && \
5935 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5936 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5937 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5938 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5939 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5940 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5943 cf_header_path_list="$cf_header_path_list $cf_search"
5949 # add the variations for the package we are looking for
5953 test "x$prefix" != "xNONE" && \
5954 test -d "$prefix" && \
5956 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5957 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5958 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5959 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5960 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5961 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5964 for cf_subdir_prefix in \
5973 test "x$cf_subdir_prefix" != "x$prefix" && \
5974 test -d "$cf_subdir_prefix" && \
5975 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5976 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5977 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5978 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5979 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5980 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5981 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5986 test "$includedir" != NONE && \
5987 test "$includedir" != "/usr/include" && \
5988 test -d "$includedir" && {
5989 test -d $includedir && cf_search="$cf_search $includedir"
5990 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5993 test "$oldincludedir" != NONE && \
5994 test "$oldincludedir" != "/usr/include" && \
5995 test -d "$oldincludedir" && {
5996 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5997 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6000 cf_search="$cf_search $cf_header_path_list"
6002 for cf_cv_header_path_utf8 in $cf_search
6004 if test -d $cf_cv_header_path_utf8 ; then
6005 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6007 echo "${as_me:-configure}:6007: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6009 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6010 cat >conftest.$ac_ext <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6014 #include <libutf8.h>
6023 rm -f conftest.$ac_objext
6024 if { (eval echo "$as_me:6024: \"$ac_compile\"") >&5
6025 (eval $ac_compile) 2>&5
6027 echo "$as_me:6027: \$? = $ac_status" >&5
6028 (exit $ac_status); } &&
6029 { ac_try='test -s conftest.$ac_objext'
6030 { (eval echo "$as_me:6030: \"$ac_try\"") >&5
6033 echo "$as_me:6033: \$? = $ac_status" >&5
6034 (exit $ac_status); }; }; then
6036 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6038 echo "${as_me:-configure}:6038: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6040 cf_cv_find_linkage_utf8=maybe
6041 cf_test_CPPFLAGS="$CPPFLAGS"
6044 echo "$as_me: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6047 CPPFLAGS="$cf_save_CPPFLAGS"
6050 rm -f conftest.$ac_objext conftest.$ac_ext
6054 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6056 echo "${as_me:-configure}:6056: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6058 cf_save_LIBS="$LIBS"
6059 cf_save_LDFLAGS="$LDFLAGS"
6061 if test "$cf_cv_find_linkage_utf8" != yes ; then
6064 cf_library_path_list=""
6065 if test -n "${LDFLAGS}${LIBS}" ; then
6066 for cf_library_path in $LDFLAGS $LIBS
6068 case $cf_library_path in
6070 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6072 test "x$cf_library_path" != "xNONE" && \
6073 test -d "$cf_library_path" && \
6075 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6076 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6077 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6078 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6079 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6080 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6083 cf_library_path_list="$cf_library_path_list $cf_search"
6091 test "x$prefix" != "xNONE" && \
6092 test -d "$prefix" && \
6094 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6095 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6096 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6097 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6098 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6099 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6102 for cf_subdir_prefix in \
6111 test "x$cf_subdir_prefix" != "x$prefix" && \
6112 test -d "$cf_subdir_prefix" && \
6113 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6114 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6115 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6116 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6117 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6118 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6119 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6124 cf_search="$cf_library_path_list $cf_search"
6126 for cf_cv_library_path_utf8 in $cf_search
6128 if test -d $cf_cv_library_path_utf8 ; then
6129 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6131 echo "${as_me:-configure}:6131: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6133 CPPFLAGS="$cf_test_CPPFLAGS"
6134 LIBS="-lutf8 $cf_save_LIBS"
6135 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6136 cat >conftest.$ac_ext <<_ACEOF
6137 #line 6137 "configure"
6138 #include "confdefs.h"
6140 #include <libutf8.h>
6149 rm -f conftest.$ac_objext conftest$ac_exeext
6150 if { (eval echo "$as_me:6150: \"$ac_link\"") >&5
6151 (eval $ac_link) 2>&5
6153 echo "$as_me:6153: \$? = $ac_status" >&5
6154 (exit $ac_status); } &&
6155 { ac_try='test -s conftest$ac_exeext'
6156 { (eval echo "$as_me:6156: \"$ac_try\"") >&5
6159 echo "$as_me:6159: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6162 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6164 echo "${as_me:-configure}:6164: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6166 cf_cv_find_linkage_utf8=yes
6167 cf_cv_library_file_utf8="-lutf8"
6170 echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6173 CPPFLAGS="$cf_save_CPPFLAGS"
6174 LIBS="$cf_save_LIBS"
6175 LDFLAGS="$cf_save_LDFLAGS"
6178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6181 CPPFLAGS="$cf_save_CPPFLAGS"
6182 LDFLAGS="$cf_save_LDFLAGS"
6186 cf_cv_find_linkage_utf8=no
6190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6195 LIBS="$cf_save_LIBS"
6197 if test "$cf_cv_find_linkage_utf8" = yes ; then
6198 cf_cv_utf8_lib=add-on
6204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6206 echo "$as_me:6206: result: $cf_cv_utf8_lib" >&5
6207 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6209 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6211 if test "$cf_cv_utf8_lib" = "add-on" ; then
6213 cat >>confdefs.h <<\EOF
6214 #define HAVE_LIBUTF8_H 1
6217 if test -n "$cf_cv_header_path_utf8" ; then
6218 for cf_add_incdir in $cf_cv_header_path_utf8
6220 while test $cf_add_incdir != /usr/include
6222 if test -d $cf_add_incdir
6225 if test -n "$CFLAGS$CPPFLAGS" ; then
6226 # a loop is needed to ensure we can add subdirs of existing dirs
6227 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6228 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6229 cf_have_incdir=yes; break
6234 if test "$cf_have_incdir" = no ; then
6235 if test "$cf_add_incdir" = /usr/local/include ; then
6236 if test "$GCC" = yes
6238 cf_save_CPPFLAGS=$CPPFLAGS
6239 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6240 cat >conftest.$ac_ext <<_ACEOF
6241 #line 6241 "configure"
6242 #include "confdefs.h"
6252 rm -f conftest.$ac_objext
6253 if { (eval echo "$as_me:6253: \"$ac_compile\"") >&5
6254 (eval $ac_compile) 2>&5
6256 echo "$as_me:6256: \$? = $ac_status" >&5
6257 (exit $ac_status); } &&
6258 { ac_try='test -s conftest.$ac_objext'
6259 { (eval echo "$as_me:6259: \"$ac_try\"") >&5
6262 echo "$as_me:6262: \$? = $ac_status" >&5
6263 (exit $ac_status); }; }; then
6266 echo "$as_me: failed program was:" >&5
6267 cat conftest.$ac_ext >&5
6270 rm -f conftest.$ac_objext conftest.$ac_ext
6271 CPPFLAGS=$cf_save_CPPFLAGS
6276 if test "$cf_have_incdir" = no ; then
6277 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6279 echo "${as_me:-configure}:6279: testing adding $cf_add_incdir to include-path ..." 1>&5
6281 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6283 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6284 test "$cf_top_incdir" = "$cf_add_incdir" && break
6285 cf_add_incdir="$cf_top_incdir"
6296 if test -n "$cf_cv_library_path_utf8" ; then
6297 for cf_add_libdir in $cf_cv_library_path_utf8
6299 if test $cf_add_libdir = /usr/lib ; then
6301 elif test -d $cf_add_libdir
6304 if test -n "$LDFLAGS$LIBS" ; then
6305 # a loop is needed to ensure we can add subdirs of existing dirs
6306 for cf_test_libdir in $LDFLAGS $LIBS ; do
6307 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6308 cf_have_libdir=yes; break
6312 if test "$cf_have_libdir" = no ; then
6313 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6315 echo "${as_me:-configure}:6315: testing adding $cf_add_libdir to library-path ..." 1>&5
6317 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6323 cf_add_libs="$cf_cv_library_file_utf8"
6324 # Filter out duplicates - this happens with badly-designed ".pc" files...
6325 for cf_add_1lib in $LIBS
6327 for cf_add_2lib in $cf_add_libs
6329 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6335 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6341 cf_ncuconfig_root=$cf_cv_screen
6342 cf_have_ncuconfig=no
6344 if test "x${PKG_CONFIG:=none}" != xnone; then
6345 echo "$as_me:6345: checking pkg-config for $cf_ncuconfig_root" >&5
6346 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6347 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6348 echo "$as_me:6348: result: yes" >&5
6349 echo "${ECHO_T}yes" >&6
6351 echo "$as_me:6351: checking if the $cf_ncuconfig_root package files work" >&5
6352 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6353 cf_have_ncuconfig=unknown
6355 cf_save_CPPFLAGS="$CPPFLAGS"
6356 cf_save_LIBS="$LIBS"
6358 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6360 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6361 # Filter out duplicates - this happens with badly-designed ".pc" files...
6362 for cf_add_1lib in $LIBS
6364 for cf_add_2lib in $cf_add_libs
6366 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6372 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6376 cat >conftest.$ac_ext <<_ACEOF
6377 #line 6377 "configure"
6378 #include "confdefs.h"
6379 #include <${cf_cv_ncurses_header:-curses.h}>
6383 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6388 rm -f conftest.$ac_objext conftest$ac_exeext
6389 if { (eval echo "$as_me:6389: \"$ac_link\"") >&5
6390 (eval $ac_link) 2>&5
6392 echo "$as_me:6392: \$? = $ac_status" >&5
6393 (exit $ac_status); } &&
6394 { ac_try='test -s conftest$ac_exeext'
6395 { (eval echo "$as_me:6395: \"$ac_try\"") >&5
6398 echo "$as_me:6398: \$? = $ac_status" >&5
6399 (exit $ac_status); }; }; then
6400 if test "$cross_compiling" = yes; then
6401 cf_have_ncuconfig=maybe
6403 cat >conftest.$ac_ext <<_ACEOF
6404 #line 6404 "configure"
6405 #include "confdefs.h"
6406 #include <${cf_cv_ncurses_header:-curses.h}>
6408 { char *xx = curses_version(); return (xx == 0); }
6410 rm -f conftest$ac_exeext
6411 if { (eval echo "$as_me:6411: \"$ac_link\"") >&5
6412 (eval $ac_link) 2>&5
6414 echo "$as_me:6414: \$? = $ac_status" >&5
6415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6416 { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6419 echo "$as_me:6419: \$? = $ac_status" >&5
6420 (exit $ac_status); }; }; then
6421 cf_have_ncuconfig=yes
6423 echo "$as_me: program exited with status $ac_status" >&5
6424 echo "$as_me: failed program was:" >&5
6425 cat conftest.$ac_ext >&5
6426 cf_have_ncuconfig=no
6428 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6431 echo "$as_me: failed program was:" >&5
6432 cat conftest.$ac_ext >&5
6433 cf_have_ncuconfig=no
6435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6436 echo "$as_me:6436: result: $cf_have_ncuconfig" >&5
6437 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6438 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6439 if test "$cf_have_ncuconfig" != "yes"
6441 CPPFLAGS="$cf_save_CPPFLAGS"
6442 LIBS="$cf_save_LIBS"
6443 NCURSES_CONFIG_PKG=none
6446 cat >>confdefs.h <<\EOF
6450 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6454 echo "$as_me:6454: result: no" >&5
6455 echo "${ECHO_T}no" >&6
6456 NCURSES_CONFIG_PKG=none
6459 NCURSES_CONFIG_PKG=none
6462 if test "x$cf_have_ncuconfig" = "xno"; then
6463 echo "Looking for ${cf_ncuconfig_root}-config"
6465 if test -n "$ac_tool_prefix"; then
6466 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6468 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6469 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6470 echo "$as_me:6470: checking for $ac_word" >&5
6471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6472 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6475 if test -n "$NCURSES_CONFIG"; then
6476 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6478 ac_save_IFS=$IFS; IFS=$ac_path_separator
6480 for ac_dir in $ac_dummy; do
6482 test -z "$ac_dir" && ac_dir=.
6483 $as_executable_p "$ac_dir/$ac_word" || continue
6484 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6485 echo "$as_me:6485: found $ac_dir/$ac_word" >&5
6491 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6492 if test -n "$NCURSES_CONFIG"; then
6493 echo "$as_me:6493: result: $NCURSES_CONFIG" >&5
6494 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6496 echo "$as_me:6496: result: no" >&5
6497 echo "${ECHO_T}no" >&6
6500 test -n "$NCURSES_CONFIG" && break
6503 if test -z "$NCURSES_CONFIG"; then
6504 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6505 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6507 # Extract the first word of "$ac_prog", so it can be a program name with args.
6508 set dummy $ac_prog; ac_word=$2
6509 echo "$as_me:6509: checking for $ac_word" >&5
6510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6511 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6512 echo $ECHO_N "(cached) $ECHO_C" >&6
6514 if test -n "$ac_ct_NCURSES_CONFIG"; then
6515 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6517 ac_save_IFS=$IFS; IFS=$ac_path_separator
6519 for ac_dir in $ac_dummy; do
6521 test -z "$ac_dir" && ac_dir=.
6522 $as_executable_p "$ac_dir/$ac_word" || continue
6523 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6524 echo "$as_me:6524: found $ac_dir/$ac_word" >&5
6530 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6531 if test -n "$ac_ct_NCURSES_CONFIG"; then
6532 echo "$as_me:6532: result: $ac_ct_NCURSES_CONFIG" >&5
6533 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6535 echo "$as_me:6535: result: no" >&5
6536 echo "${ECHO_T}no" >&6
6539 test -n "$ac_ct_NCURSES_CONFIG" && break
6541 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6543 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6546 if test "$NCURSES_CONFIG" != none ; then
6548 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6550 cf_add_libs="`$NCURSES_CONFIG --libs`"
6551 # Filter out duplicates - this happens with badly-designed ".pc" files...
6552 for cf_add_1lib in $LIBS
6554 for cf_add_2lib in $cf_add_libs
6556 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6562 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6566 # even with config script, some packages use no-override for curses.h
6568 echo "$as_me:6568: checking if we have identified curses headers" >&5
6569 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6570 if test "${cf_cv_ncurses_header+set}" = set; then
6571 echo $ECHO_N "(cached) $ECHO_C" >&6
6574 cf_cv_ncurses_header=none
6576 ncurses.h $cf_cv_screen/ncurses.h \
6577 curses.h $cf_cv_screen/curses.h
6579 cat >conftest.$ac_ext <<_ACEOF
6580 #line 6580 "configure"
6581 #include "confdefs.h"
6582 #include <${cf_header}>
6586 initscr(); tgoto("?", 0,0)
6591 rm -f conftest.$ac_objext
6592 if { (eval echo "$as_me:6592: \"$ac_compile\"") >&5
6593 (eval $ac_compile) 2>&5
6595 echo "$as_me:6595: \$? = $ac_status" >&5
6596 (exit $ac_status); } &&
6597 { ac_try='test -s conftest.$ac_objext'
6598 { (eval echo "$as_me:6598: \"$ac_try\"") >&5
6601 echo "$as_me:6601: \$? = $ac_status" >&5
6602 (exit $ac_status); }; }; then
6603 cf_cv_ncurses_header=$cf_header; break
6605 echo "$as_me: failed program was:" >&5
6606 cat conftest.$ac_ext >&5
6608 rm -f conftest.$ac_objext conftest.$ac_ext
6612 echo "$as_me:6612: result: $cf_cv_ncurses_header" >&5
6613 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6615 if test "$cf_cv_ncurses_header" = none ; then
6616 { { echo "$as_me:6616: error: No curses header-files found" >&5
6617 echo "$as_me: error: No curses header-files found" >&2;}
6618 { (exit 1); exit 1; }; }
6621 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6623 for ac_header in $cf_cv_ncurses_header
6625 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6626 echo "$as_me:6626: checking for $ac_header" >&5
6627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6629 echo $ECHO_N "(cached) $ECHO_C" >&6
6631 cat >conftest.$ac_ext <<_ACEOF
6632 #line 6632 "configure"
6633 #include "confdefs.h"
6634 #include <$ac_header>
6636 if { (eval echo "$as_me:6636: \"$ac_cpp conftest.$ac_ext\"") >&5
6637 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6639 egrep -v '^ *\+' conftest.er1 >conftest.err
6641 cat conftest.err >&5
6642 echo "$as_me:6642: \$? = $ac_status" >&5
6643 (exit $ac_status); } >/dev/null; then
6644 if test -s conftest.err; then
6645 ac_cpp_err=$ac_c_preproc_warn_flag
6652 if test -z "$ac_cpp_err"; then
6653 eval "$as_ac_Header=yes"
6655 echo "$as_me: failed program was:" >&5
6656 cat conftest.$ac_ext >&5
6657 eval "$as_ac_Header=no"
6659 rm -f conftest.err conftest.$ac_ext
6661 echo "$as_me:6661: result: `eval echo '${'$as_ac_Header'}'`" >&5
6662 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6663 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6664 cat >>confdefs.h <<EOF
6665 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6671 cat >>confdefs.h <<\EOF
6675 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6677 cat >>confdefs.h <<EOF
6678 #define $cf_nculib_ROOT 1
6681 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6685 cf_ncuhdr_root=$cf_cv_screen
6687 test -n "$cf_cv_curses_dir" && \
6688 test "$cf_cv_curses_dir" != "no" && { \
6690 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6691 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6693 while test $cf_add_incdir != /usr/include
6695 if test -d $cf_add_incdir
6698 if test -n "$CFLAGS$CPPFLAGS" ; then
6699 # a loop is needed to ensure we can add subdirs of existing dirs
6700 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6701 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6702 cf_have_incdir=yes; break
6707 if test "$cf_have_incdir" = no ; then
6708 if test "$cf_add_incdir" = /usr/local/include ; then
6709 if test "$GCC" = yes
6711 cf_save_CPPFLAGS=$CPPFLAGS
6712 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6713 cat >conftest.$ac_ext <<_ACEOF
6714 #line 6714 "configure"
6715 #include "confdefs.h"
6725 rm -f conftest.$ac_objext
6726 if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
6727 (eval $ac_compile) 2>&5
6729 echo "$as_me:6729: \$? = $ac_status" >&5
6730 (exit $ac_status); } &&
6731 { ac_try='test -s conftest.$ac_objext'
6732 { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6735 echo "$as_me:6735: \$? = $ac_status" >&5
6736 (exit $ac_status); }; }; then
6739 echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744 CPPFLAGS=$cf_save_CPPFLAGS
6749 if test "$cf_have_incdir" = no ; then
6750 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6752 echo "${as_me:-configure}:6752: testing adding $cf_add_incdir to include-path ..." 1>&5
6754 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6756 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6757 test "$cf_top_incdir" = "$cf_add_incdir" && break
6758 cf_add_incdir="$cf_top_incdir"
6771 echo "$as_me:6771: checking for $cf_ncuhdr_root header in include-path" >&5
6772 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6773 if test "${cf_cv_ncurses_h+set}" = set; then
6774 echo $ECHO_N "(cached) $ECHO_C" >&6
6777 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6778 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6779 for cf_header in $cf_header_list
6782 cat >conftest.$ac_ext <<_ACEOF
6783 #line 6783 "configure"
6784 #include "confdefs.h"
6786 #include <$cf_header>
6791 #ifdef NCURSES_VERSION
6793 printf("%s\n", NCURSES_VERSION);
6806 rm -f conftest.$ac_objext
6807 if { (eval echo "$as_me:6807: \"$ac_compile\"") >&5
6808 (eval $ac_compile) 2>&5
6810 echo "$as_me:6810: \$? = $ac_status" >&5
6811 (exit $ac_status); } &&
6812 { ac_try='test -s conftest.$ac_objext'
6813 { (eval echo "$as_me:6813: \"$ac_try\"") >&5
6816 echo "$as_me:6816: \$? = $ac_status" >&5
6817 (exit $ac_status); }; }; then
6818 cf_cv_ncurses_h=$cf_header
6821 echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6825 rm -f conftest.$ac_objext conftest.$ac_ext
6827 test "$cf_cv_ncurses_h" != no && break
6831 echo "$as_me:6831: result: $cf_cv_ncurses_h" >&5
6832 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6834 if test "$cf_cv_ncurses_h" != no ; then
6835 cf_cv_ncurses_header=$cf_cv_ncurses_h
6838 echo "$as_me:6838: checking for $cf_ncuhdr_root include-path" >&5
6839 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6840 if test "${cf_cv_ncurses_h2+set}" = set; then
6841 echo $ECHO_N "(cached) $ECHO_C" >&6
6844 test -n "$verbose" && echo
6848 # collect the current set of include-directories from compiler flags
6849 cf_header_path_list=""
6850 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6851 for cf_header_path in $CPPFLAGS $CFLAGS
6853 case $cf_header_path in
6855 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6857 test "x$cf_header_path" != "xNONE" && \
6858 test -d "$cf_header_path" && \
6860 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6861 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6862 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6863 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6864 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6865 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"
6868 cf_header_path_list="$cf_header_path_list $cf_search"
6874 # add the variations for the package we are looking for
6878 test "x$prefix" != "xNONE" && \
6879 test -d "$prefix" && \
6881 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6882 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6883 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6884 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6885 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6886 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6889 for cf_subdir_prefix in \
6898 test "x$cf_subdir_prefix" != "x$prefix" && \
6899 test -d "$cf_subdir_prefix" && \
6900 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6901 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6902 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6903 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6904 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6905 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6906 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"
6911 test "$includedir" != NONE && \
6912 test "$includedir" != "/usr/include" && \
6913 test -d "$includedir" && {
6914 test -d $includedir && cf_search="$cf_search $includedir"
6915 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6918 test "$oldincludedir" != NONE && \
6919 test "$oldincludedir" != "/usr/include" && \
6920 test -d "$oldincludedir" && {
6921 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6922 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6925 cf_search="$cf_search $cf_header_path_list"
6927 test -n "$verbose" && echo search path $cf_search
6928 cf_save2_CPPFLAGS="$CPPFLAGS"
6929 for cf_incdir in $cf_search
6932 if test -n "$cf_incdir" ; then
6933 for cf_add_incdir in $cf_incdir
6935 while test $cf_add_incdir != /usr/include
6937 if test -d $cf_add_incdir
6940 if test -n "$CFLAGS$CPPFLAGS" ; then
6941 # a loop is needed to ensure we can add subdirs of existing dirs
6942 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6943 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6944 cf_have_incdir=yes; break
6949 if test "$cf_have_incdir" = no ; then
6950 if test "$cf_add_incdir" = /usr/local/include ; then
6951 if test "$GCC" = yes
6953 cf_save_CPPFLAGS=$CPPFLAGS
6954 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6955 cat >conftest.$ac_ext <<_ACEOF
6956 #line 6956 "configure"
6957 #include "confdefs.h"
6967 rm -f conftest.$ac_objext
6968 if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
6969 (eval $ac_compile) 2>&5
6971 echo "$as_me:6971: \$? = $ac_status" >&5
6972 (exit $ac_status); } &&
6973 { ac_try='test -s conftest.$ac_objext'
6974 { (eval echo "$as_me:6974: \"$ac_try\"") >&5
6977 echo "$as_me:6977: \$? = $ac_status" >&5
6978 (exit $ac_status); }; }; then
6981 echo "$as_me: failed program was:" >&5
6982 cat conftest.$ac_ext >&5
6985 rm -f conftest.$ac_objext conftest.$ac_ext
6986 CPPFLAGS=$cf_save_CPPFLAGS
6991 if test "$cf_have_incdir" = no ; then
6992 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6994 echo "${as_me:-configure}:6994: testing adding $cf_add_incdir to include-path ..." 1>&5
6996 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6998 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6999 test "$cf_top_incdir" = "$cf_add_incdir" && break
7000 cf_add_incdir="$cf_top_incdir"
7016 cat >conftest.$ac_ext <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7020 #include <$cf_header>
7025 #ifdef NCURSES_VERSION
7027 printf("%s\n", NCURSES_VERSION);
7040 rm -f conftest.$ac_objext
7041 if { (eval echo "$as_me:7041: \"$ac_compile\"") >&5
7042 (eval $ac_compile) 2>&5
7044 echo "$as_me:7044: \$? = $ac_status" >&5
7045 (exit $ac_status); } &&
7046 { ac_try='test -s conftest.$ac_objext'
7047 { (eval echo "$as_me:7047: \"$ac_try\"") >&5
7050 echo "$as_me:7050: \$? = $ac_status" >&5
7051 (exit $ac_status); }; }; then
7052 cf_cv_ncurses_h2=$cf_header
7055 echo "$as_me: failed program was:" >&5
7056 cat conftest.$ac_ext >&5
7059 rm -f conftest.$ac_objext conftest.$ac_ext
7061 if test "$cf_cv_ncurses_h2" != no ; then
7062 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7063 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7066 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7068 CPPFLAGS="$cf_save2_CPPFLAGS"
7069 test "$cf_cv_ncurses_h2" != no && break
7071 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7071: error: not found" >&5
7072 echo "$as_me: error: not found" >&2;}
7073 { (exit 1); exit 1; }; }
7076 echo "$as_me:7076: result: $cf_cv_ncurses_h2" >&5
7077 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7079 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7080 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7081 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7082 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7085 if test -n "$cf_1st_incdir" ; then
7086 for cf_add_incdir in $cf_1st_incdir
7088 while test $cf_add_incdir != /usr/include
7090 if test -d $cf_add_incdir
7093 if test -n "$CFLAGS$CPPFLAGS" ; then
7094 # a loop is needed to ensure we can add subdirs of existing dirs
7095 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7096 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7097 cf_have_incdir=yes; break
7102 if test "$cf_have_incdir" = no ; then
7103 if test "$cf_add_incdir" = /usr/local/include ; then
7104 if test "$GCC" = yes
7106 cf_save_CPPFLAGS=$CPPFLAGS
7107 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7108 cat >conftest.$ac_ext <<_ACEOF
7109 #line 7109 "configure"
7110 #include "confdefs.h"
7120 rm -f conftest.$ac_objext
7121 if { (eval echo "$as_me:7121: \"$ac_compile\"") >&5
7122 (eval $ac_compile) 2>&5
7124 echo "$as_me:7124: \$? = $ac_status" >&5
7125 (exit $ac_status); } &&
7126 { ac_try='test -s conftest.$ac_objext'
7127 { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7130 echo "$as_me:7130: \$? = $ac_status" >&5
7131 (exit $ac_status); }; }; then
7134 echo "$as_me: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7138 rm -f conftest.$ac_objext conftest.$ac_ext
7139 CPPFLAGS=$cf_save_CPPFLAGS
7144 if test "$cf_have_incdir" = no ; then
7145 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7147 echo "${as_me:-configure}:7147: testing adding $cf_add_incdir to include-path ..." 1>&5
7149 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7151 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7152 test "$cf_top_incdir" = "$cf_add_incdir" && break
7153 cf_add_incdir="$cf_top_incdir"
7166 # Set definitions to allow ifdef'ing for ncurses.h
7168 case $cf_cv_ncurses_header in
7171 cat >>confdefs.h <<\EOF
7172 #define HAVE_NCURSES_H 1
7178 case $cf_cv_ncurses_header in
7179 (ncurses/curses.h|ncurses/ncurses.h)
7181 cat >>confdefs.h <<\EOF
7182 #define HAVE_NCURSES_NCURSES_H 1
7186 (ncursesw/curses.h|ncursesw/ncurses.h)
7188 cat >>confdefs.h <<\EOF
7189 #define HAVE_NCURSESW_NCURSES_H 1
7195 echo "$as_me:7195: checking for terminfo header" >&5
7196 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7197 if test "${cf_cv_term_header+set}" = set; then
7198 echo $ECHO_N "(cached) $ECHO_C" >&6
7201 case ${cf_cv_ncurses_header} in
7202 (*/ncurses.h|*/ncursesw.h)
7203 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7206 cf_term_header=term.h
7210 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7212 cat >conftest.$ac_ext <<_ACEOF
7213 #line 7213 "configure"
7214 #include "confdefs.h"
7216 #include <${cf_cv_ncurses_header:-curses.h}>
7222 int x = auto_left_margin
7227 rm -f conftest.$ac_objext
7228 if { (eval echo "$as_me:7228: \"$ac_compile\"") >&5
7229 (eval $ac_compile) 2>&5
7231 echo "$as_me:7231: \$? = $ac_status" >&5
7232 (exit $ac_status); } &&
7233 { ac_try='test -s conftest.$ac_objext'
7234 { (eval echo "$as_me:7234: \"$ac_try\"") >&5
7237 echo "$as_me:7237: \$? = $ac_status" >&5
7238 (exit $ac_status); }; }; then
7240 cf_cv_term_header="$cf_test"
7242 echo "$as_me: failed program was:" >&5
7243 cat conftest.$ac_ext >&5
7245 cf_cv_term_header=unknown
7248 rm -f conftest.$ac_objext conftest.$ac_ext
7249 test "$cf_cv_term_header" != unknown && break
7253 echo "$as_me:7253: result: $cf_cv_term_header" >&5
7254 echo "${ECHO_T}$cf_cv_term_header" >&6
7256 # Set definitions to allow ifdef'ing to accommodate subdirectories
7258 case $cf_cv_term_header in
7261 cat >>confdefs.h <<\EOF
7262 #define HAVE_TERM_H 1
7268 case $cf_cv_term_header in
7271 cat >>confdefs.h <<\EOF
7272 #define HAVE_NCURSES_TERM_H 1
7278 cat >>confdefs.h <<\EOF
7279 #define HAVE_NCURSESW_TERM_H 1
7285 # some applications need this, but should check for NCURSES_VERSION
7287 cat >>confdefs.h <<\EOF
7291 echo "$as_me:7291: checking for ncurses version" >&5
7292 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7293 if test "${cf_cv_ncurses_version+set}" = set; then
7294 echo $ECHO_N "(cached) $ECHO_C" >&6
7297 cf_cv_ncurses_version=no
7300 if test "$cross_compiling" = yes; then
7302 # This will not work if the preprocessor splits the line after the
7303 # Autoconf token. The 'unproto' program does that.
7304 cat > conftest.$ac_ext <<EOF
7305 #include <${cf_cv_ncurses_header:-curses.h}>
7307 #ifdef NCURSES_VERSION
7308 Autoconf NCURSES_VERSION
7316 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7317 { (eval echo "$as_me:7317: \"$cf_try\"") >&5
7320 echo "$as_me:7320: \$? = $ac_status" >&5
7321 (exit $ac_status); }
7322 if test -f conftest.out ; then
7323 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7324 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7329 cat >conftest.$ac_ext <<_ACEOF
7330 #line 7330 "configure"
7331 #include "confdefs.h"
7333 #include <${cf_cv_ncurses_header:-curses.h}>
7337 FILE *fp = fopen("$cf_tempfile", "w");
7338 #ifdef NCURSES_VERSION
7339 # ifdef NCURSES_VERSION_PATCH
7340 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7342 fprintf(fp, "%s\n", NCURSES_VERSION);
7346 fprintf(fp, "old\n");
7351 ${cf_cv_main_return:-return}(0);
7354 rm -f conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356 (eval $ac_link) 2>&5
7358 echo "$as_me:7358: \$? = $ac_status" >&5
7359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7360 { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit $ac_status); }; }; then
7366 cf_cv_ncurses_version=`cat $cf_tempfile`
7368 echo "$as_me: program exited with status $ac_status" >&5
7369 echo "$as_me: failed program was:" >&5
7370 cat conftest.$ac_ext >&5
7372 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7377 echo "$as_me:7377: result: $cf_cv_ncurses_version" >&5
7378 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7379 test "$cf_cv_ncurses_version" = no ||
7380 cat >>confdefs.h <<\EOF
7384 cf_nculib_root=$cf_cv_screen
7385 # This works, except for the special case where we find gpm, but
7386 # ncurses is in a nonstandard location via $LIBS, and we really want
7389 cf_ncurses_SAVE="$LIBS"
7390 echo "$as_me:7390: checking for Gpm_Open in -lgpm" >&5
7391 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7392 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7393 echo $ECHO_N "(cached) $ECHO_C" >&6
7395 ac_check_lib_save_LIBS=$LIBS
7397 cat >conftest.$ac_ext <<_ACEOF
7398 #line 7398 "configure"
7399 #include "confdefs.h"
7401 /* Override any gcc2 internal prototype to avoid an error. */
7405 /* We use char because int might match the return type of a gcc2
7406 builtin and then its argument prototype would still apply. */
7416 rm -f conftest.$ac_objext conftest$ac_exeext
7417 if { (eval echo "$as_me:7417: \"$ac_link\"") >&5
7418 (eval $ac_link) 2>&5
7420 echo "$as_me:7420: \$? = $ac_status" >&5
7421 (exit $ac_status); } &&
7422 { ac_try='test -s conftest$ac_exeext'
7423 { (eval echo "$as_me:7423: \"$ac_try\"") >&5
7426 echo "$as_me:7426: \$? = $ac_status" >&5
7427 (exit $ac_status); }; }; then
7428 ac_cv_lib_gpm_Gpm_Open=yes
7430 echo "$as_me: failed program was:" >&5
7431 cat conftest.$ac_ext >&5
7432 ac_cv_lib_gpm_Gpm_Open=no
7434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7435 LIBS=$ac_check_lib_save_LIBS
7437 echo "$as_me:7437: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7438 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7439 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7440 echo "$as_me:7440: checking for initscr in -lgpm" >&5
7441 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7442 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7443 echo $ECHO_N "(cached) $ECHO_C" >&6
7445 ac_check_lib_save_LIBS=$LIBS
7447 cat >conftest.$ac_ext <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7451 /* Override any gcc2 internal prototype to avoid an error. */
7455 /* We use char because int might match the return type of a gcc2
7456 builtin and then its argument prototype would still apply. */
7466 rm -f conftest.$ac_objext conftest$ac_exeext
7467 if { (eval echo "$as_me:7467: \"$ac_link\"") >&5
7468 (eval $ac_link) 2>&5
7470 echo "$as_me:7470: \$? = $ac_status" >&5
7471 (exit $ac_status); } &&
7472 { ac_try='test -s conftest$ac_exeext'
7473 { (eval echo "$as_me:7473: \"$ac_try\"") >&5
7476 echo "$as_me:7476: \$? = $ac_status" >&5
7477 (exit $ac_status); }; }; then
7478 ac_cv_lib_gpm_initscr=yes
7480 echo "$as_me: failed program was:" >&5
7481 cat conftest.$ac_ext >&5
7482 ac_cv_lib_gpm_initscr=no
7484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7485 LIBS=$ac_check_lib_save_LIBS
7487 echo "$as_me:7487: result: $ac_cv_lib_gpm_initscr" >&5
7488 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7489 if test $ac_cv_lib_gpm_initscr = yes; then
7490 LIBS="$cf_ncurses_SAVE"
7492 cf_ncurses_LIBS="-lgpm"
7499 # This is only necessary if you are linking against an obsolete
7500 # version of ncurses (but it should do no harm, since it's static).
7501 if test "$cf_nculib_root" = ncurses ; then
7502 echo "$as_me:7502: checking for tgoto in -lmytinfo" >&5
7503 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7504 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7505 echo $ECHO_N "(cached) $ECHO_C" >&6
7507 ac_check_lib_save_LIBS=$LIBS
7508 LIBS="-lmytinfo $LIBS"
7509 cat >conftest.$ac_ext <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7513 /* Override any gcc2 internal prototype to avoid an error. */
7517 /* We use char because int might match the return type of a gcc2
7518 builtin and then its argument prototype would still apply. */
7528 rm -f conftest.$ac_objext conftest$ac_exeext
7529 if { (eval echo "$as_me:7529: \"$ac_link\"") >&5
7530 (eval $ac_link) 2>&5
7532 echo "$as_me:7532: \$? = $ac_status" >&5
7533 (exit $ac_status); } &&
7534 { ac_try='test -s conftest$ac_exeext'
7535 { (eval echo "$as_me:7535: \"$ac_try\"") >&5
7538 echo "$as_me:7538: \$? = $ac_status" >&5
7539 (exit $ac_status); }; }; then
7540 ac_cv_lib_mytinfo_tgoto=yes
7542 echo "$as_me: failed program was:" >&5
7543 cat conftest.$ac_ext >&5
7544 ac_cv_lib_mytinfo_tgoto=no
7546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7547 LIBS=$ac_check_lib_save_LIBS
7549 echo "$as_me:7549: result: $ac_cv_lib_mytinfo_tgoto" >&5
7550 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7551 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7552 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7559 cf_add_libs="$cf_ncurses_LIBS"
7560 # Filter out duplicates - this happens with badly-designed ".pc" files...
7561 for cf_add_1lib in $LIBS
7563 for cf_add_2lib in $cf_add_libs
7565 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7575 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7578 cf_add_libs="-l$cf_nculib_root"
7579 # Filter out duplicates - this happens with badly-designed ".pc" files...
7580 for cf_add_1lib in $LIBS
7582 for cf_add_2lib in $cf_add_libs
7584 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7590 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7596 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7598 echo "$as_me:7598: checking for initscr" >&5
7599 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7600 if test "${ac_cv_func_initscr+set}" = set; then
7601 echo $ECHO_N "(cached) $ECHO_C" >&6
7603 cat >conftest.$ac_ext <<_ACEOF
7604 #line 7604 "configure"
7605 #include "confdefs.h"
7606 /* System header to define __stub macros and hopefully few prototypes,
7607 which can conflict with char initscr (); below. */
7609 /* Override any gcc2 internal prototype to avoid an error. */
7613 /* We use char because int might match the return type of a gcc2
7614 builtin and then its argument prototype would still apply. */
7621 /* The GNU C library defines this for functions which it implements
7622 to always fail with ENOSYS. Some functions are actually named
7623 something starting with __ and the normal name is an alias. */
7624 #if defined (__stub_initscr) || defined (__stub___initscr)
7627 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7634 rm -f conftest.$ac_objext conftest$ac_exeext
7635 if { (eval echo "$as_me:7635: \"$ac_link\"") >&5
7636 (eval $ac_link) 2>&5
7638 echo "$as_me:7638: \$? = $ac_status" >&5
7639 (exit $ac_status); } &&
7640 { ac_try='test -s conftest$ac_exeext'
7641 { (eval echo "$as_me:7641: \"$ac_try\"") >&5
7644 echo "$as_me:7644: \$? = $ac_status" >&5
7645 (exit $ac_status); }; }; then
7646 ac_cv_func_initscr=yes
7648 echo "$as_me: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7650 ac_cv_func_initscr=no
7652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7654 echo "$as_me:7654: result: $ac_cv_func_initscr" >&5
7655 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7656 if test $ac_cv_func_initscr = yes; then
7657 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7660 cf_save_LIBS="$LIBS"
7661 echo "$as_me:7661: checking for initscr in -l$cf_nculib_root" >&5
7662 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7663 LIBS="-l$cf_nculib_root $LIBS"
7664 cat >conftest.$ac_ext <<_ACEOF
7665 #line 7665 "configure"
7666 #include "confdefs.h"
7667 #include <${cf_cv_ncurses_header:-curses.h}>
7676 rm -f conftest.$ac_objext conftest$ac_exeext
7677 if { (eval echo "$as_me:7677: \"$ac_link\"") >&5
7678 (eval $ac_link) 2>&5
7680 echo "$as_me:7680: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest$ac_exeext'
7683 { (eval echo "$as_me:7683: \"$ac_try\"") >&5
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 echo "$as_me:7688: result: yes" >&5
7689 echo "${ECHO_T}yes" >&6
7690 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7693 echo "$as_me: failed program was:" >&5
7694 cat conftest.$ac_ext >&5
7695 echo "$as_me:7695: result: no" >&5
7696 echo "${ECHO_T}no" >&6
7699 cf_library_path_list=""
7700 if test -n "${LDFLAGS}${LIBS}" ; then
7701 for cf_library_path in $LDFLAGS $LIBS
7703 case $cf_library_path in
7705 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7707 test "x$cf_library_path" != "xNONE" && \
7708 test -d "$cf_library_path" && \
7710 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7711 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7712 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7713 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7714 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7715 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"
7718 cf_library_path_list="$cf_library_path_list $cf_search"
7726 test "x$prefix" != "xNONE" && \
7727 test -d "$prefix" && \
7729 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7730 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7731 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7732 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7733 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7734 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7737 for cf_subdir_prefix in \
7746 test "x$cf_subdir_prefix" != "x$prefix" && \
7747 test -d "$cf_subdir_prefix" && \
7748 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7749 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7750 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7751 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7752 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7753 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7754 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"
7759 cf_search="$cf_library_path_list $cf_search"
7761 for cf_libdir in $cf_search
7763 echo "$as_me:7763: checking for -l$cf_nculib_root in $cf_libdir" >&5
7764 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7765 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7766 cat >conftest.$ac_ext <<_ACEOF
7767 #line 7767 "configure"
7768 #include "confdefs.h"
7769 #include <${cf_cv_ncurses_header:-curses.h}>
7778 rm -f conftest.$ac_objext conftest$ac_exeext
7779 if { (eval echo "$as_me:7779: \"$ac_link\"") >&5
7780 (eval $ac_link) 2>&5
7782 echo "$as_me:7782: \$? = $ac_status" >&5
7783 (exit $ac_status); } &&
7784 { ac_try='test -s conftest$ac_exeext'
7785 { (eval echo "$as_me:7785: \"$ac_try\"") >&5
7788 echo "$as_me:7788: \$? = $ac_status" >&5
7789 (exit $ac_status); }; }; then
7790 echo "$as_me:7790: result: yes" >&5
7791 echo "${ECHO_T}yes" >&6
7792 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7795 echo "$as_me: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 echo "$as_me:7797: result: no" >&5
7798 echo "${ECHO_T}no" >&6
7799 LIBS="$cf_save_LIBS"
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7809 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7811 if test $cf_found_library = no ; then
7812 { { echo "$as_me:7812: error: Cannot link $cf_nculib_root library" >&5
7813 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7814 { (exit 1); exit 1; }; }
7819 if test -n "$cf_ncurses_LIBS" ; then
7820 echo "$as_me:7820: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7821 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7822 cf_ncurses_SAVE="$LIBS"
7823 for p in $cf_ncurses_LIBS ; do
7824 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7825 if test "$q" != "$LIBS" ; then
7829 cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7832 #include <${cf_cv_ncurses_header:-curses.h}>
7836 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7841 rm -f conftest.$ac_objext conftest$ac_exeext
7842 if { (eval echo "$as_me:7842: \"$ac_link\"") >&5
7843 (eval $ac_link) 2>&5
7845 echo "$as_me:7845: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest$ac_exeext'
7848 { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7851 echo "$as_me:7851: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 echo "$as_me:7853: result: yes" >&5
7854 echo "${ECHO_T}yes" >&6
7856 echo "$as_me: failed program was:" >&5
7857 cat conftest.$ac_ext >&5
7858 echo "$as_me:7858: result: no" >&5
7859 echo "${ECHO_T}no" >&6
7860 LIBS="$cf_ncurses_SAVE"
7862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7865 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7867 cat >>confdefs.h <<EOF
7868 #define $cf_nculib_ROOT 1
7879 cf_ncuconfig_root=$cf_cv_screen
7880 cf_have_ncuconfig=no
7882 if test "x${PKG_CONFIG:=none}" != xnone; then
7883 echo "$as_me:7883: checking pkg-config for $cf_ncuconfig_root" >&5
7884 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7885 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7886 echo "$as_me:7886: result: yes" >&5
7887 echo "${ECHO_T}yes" >&6
7889 echo "$as_me:7889: checking if the $cf_ncuconfig_root package files work" >&5
7890 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7891 cf_have_ncuconfig=unknown
7893 cf_save_CPPFLAGS="$CPPFLAGS"
7894 cf_save_LIBS="$LIBS"
7896 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7898 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7899 # Filter out duplicates - this happens with badly-designed ".pc" files...
7900 for cf_add_1lib in $LIBS
7902 for cf_add_2lib in $cf_add_libs
7904 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7910 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7914 cat >conftest.$ac_ext <<_ACEOF
7915 #line 7915 "configure"
7916 #include "confdefs.h"
7917 #include <${cf_cv_ncurses_header:-curses.h}>
7921 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7926 rm -f conftest.$ac_objext conftest$ac_exeext
7927 if { (eval echo "$as_me:7927: \"$ac_link\"") >&5
7928 (eval $ac_link) 2>&5
7930 echo "$as_me:7930: \$? = $ac_status" >&5
7931 (exit $ac_status); } &&
7932 { ac_try='test -s conftest$ac_exeext'
7933 { (eval echo "$as_me:7933: \"$ac_try\"") >&5
7936 echo "$as_me:7936: \$? = $ac_status" >&5
7937 (exit $ac_status); }; }; then
7938 if test "$cross_compiling" = yes; then
7939 cf_have_ncuconfig=maybe
7941 cat >conftest.$ac_ext <<_ACEOF
7942 #line 7942 "configure"
7943 #include "confdefs.h"
7944 #include <${cf_cv_ncurses_header:-curses.h}>
7946 { char *xx = curses_version(); return (xx == 0); }
7948 rm -f conftest$ac_exeext
7949 if { (eval echo "$as_me:7949: \"$ac_link\"") >&5
7950 (eval $ac_link) 2>&5
7952 echo "$as_me:7952: \$? = $ac_status" >&5
7953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7954 { (eval echo "$as_me:7954: \"$ac_try\"") >&5
7957 echo "$as_me:7957: \$? = $ac_status" >&5
7958 (exit $ac_status); }; }; then
7959 cf_have_ncuconfig=yes
7961 echo "$as_me: program exited with status $ac_status" >&5
7962 echo "$as_me: failed program was:" >&5
7963 cat conftest.$ac_ext >&5
7964 cf_have_ncuconfig=no
7966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7969 echo "$as_me: failed program was:" >&5
7970 cat conftest.$ac_ext >&5
7971 cf_have_ncuconfig=no
7973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7974 echo "$as_me:7974: result: $cf_have_ncuconfig" >&5
7975 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7976 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7977 if test "$cf_have_ncuconfig" != "yes"
7979 CPPFLAGS="$cf_save_CPPFLAGS"
7980 LIBS="$cf_save_LIBS"
7981 NCURSES_CONFIG_PKG=none
7984 cat >>confdefs.h <<\EOF
7988 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7992 echo "$as_me:7992: result: no" >&5
7993 echo "${ECHO_T}no" >&6
7994 NCURSES_CONFIG_PKG=none
7997 NCURSES_CONFIG_PKG=none
8000 if test "x$cf_have_ncuconfig" = "xno"; then
8001 echo "Looking for ${cf_ncuconfig_root}-config"
8003 if test -n "$ac_tool_prefix"; then
8004 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8006 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8007 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8008 echo "$as_me:8008: checking for $ac_word" >&5
8009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8010 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8013 if test -n "$NCURSES_CONFIG"; then
8014 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8016 ac_save_IFS=$IFS; IFS=$ac_path_separator
8018 for ac_dir in $ac_dummy; do
8020 test -z "$ac_dir" && ac_dir=.
8021 $as_executable_p "$ac_dir/$ac_word" || continue
8022 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8023 echo "$as_me:8023: found $ac_dir/$ac_word" >&5
8029 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8030 if test -n "$NCURSES_CONFIG"; then
8031 echo "$as_me:8031: result: $NCURSES_CONFIG" >&5
8032 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8034 echo "$as_me:8034: result: no" >&5
8035 echo "${ECHO_T}no" >&6
8038 test -n "$NCURSES_CONFIG" && break
8041 if test -z "$NCURSES_CONFIG"; then
8042 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8043 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8045 # Extract the first word of "$ac_prog", so it can be a program name with args.
8046 set dummy $ac_prog; ac_word=$2
8047 echo "$as_me:8047: checking for $ac_word" >&5
8048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8049 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8050 echo $ECHO_N "(cached) $ECHO_C" >&6
8052 if test -n "$ac_ct_NCURSES_CONFIG"; then
8053 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8055 ac_save_IFS=$IFS; IFS=$ac_path_separator
8057 for ac_dir in $ac_dummy; do
8059 test -z "$ac_dir" && ac_dir=.
8060 $as_executable_p "$ac_dir/$ac_word" || continue
8061 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8062 echo "$as_me:8062: found $ac_dir/$ac_word" >&5
8068 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8069 if test -n "$ac_ct_NCURSES_CONFIG"; then
8070 echo "$as_me:8070: result: $ac_ct_NCURSES_CONFIG" >&5
8071 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8073 echo "$as_me:8073: result: no" >&5
8074 echo "${ECHO_T}no" >&6
8077 test -n "$ac_ct_NCURSES_CONFIG" && break
8079 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8081 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8084 if test "$NCURSES_CONFIG" != none ; then
8086 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8088 cf_add_libs="`$NCURSES_CONFIG --libs`"
8089 # Filter out duplicates - this happens with badly-designed ".pc" files...
8090 for cf_add_1lib in $LIBS
8092 for cf_add_2lib in $cf_add_libs
8094 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8100 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8104 # even with config script, some packages use no-override for curses.h
8106 echo "$as_me:8106: checking if we have identified curses headers" >&5
8107 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8108 if test "${cf_cv_ncurses_header+set}" = set; then
8109 echo $ECHO_N "(cached) $ECHO_C" >&6
8112 cf_cv_ncurses_header=none
8114 ncurses.h $cf_cv_screen/ncurses.h \
8115 curses.h $cf_cv_screen/curses.h
8117 cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120 #include <${cf_header}>
8124 initscr(); tgoto("?", 0,0)
8129 rm -f conftest.$ac_objext
8130 if { (eval echo "$as_me:8130: \"$ac_compile\"") >&5
8131 (eval $ac_compile) 2>&5
8133 echo "$as_me:8133: \$? = $ac_status" >&5
8134 (exit $ac_status); } &&
8135 { ac_try='test -s conftest.$ac_objext'
8136 { (eval echo "$as_me:8136: \"$ac_try\"") >&5
8139 echo "$as_me:8139: \$? = $ac_status" >&5
8140 (exit $ac_status); }; }; then
8141 cf_cv_ncurses_header=$cf_header; break
8143 echo "$as_me: failed program was:" >&5
8144 cat conftest.$ac_ext >&5
8146 rm -f conftest.$ac_objext conftest.$ac_ext
8150 echo "$as_me:8150: result: $cf_cv_ncurses_header" >&5
8151 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8153 if test "$cf_cv_ncurses_header" = none ; then
8154 { { echo "$as_me:8154: error: No curses header-files found" >&5
8155 echo "$as_me: error: No curses header-files found" >&2;}
8156 { (exit 1); exit 1; }; }
8159 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8161 for ac_header in $cf_cv_ncurses_header
8163 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8164 echo "$as_me:8164: checking for $ac_header" >&5
8165 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8166 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8167 echo $ECHO_N "(cached) $ECHO_C" >&6
8169 cat >conftest.$ac_ext <<_ACEOF
8170 #line 8170 "configure"
8171 #include "confdefs.h"
8172 #include <$ac_header>
8174 if { (eval echo "$as_me:8174: \"$ac_cpp conftest.$ac_ext\"") >&5
8175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8177 egrep -v '^ *\+' conftest.er1 >conftest.err
8179 cat conftest.err >&5
8180 echo "$as_me:8180: \$? = $ac_status" >&5
8181 (exit $ac_status); } >/dev/null; then
8182 if test -s conftest.err; then
8183 ac_cpp_err=$ac_c_preproc_warn_flag
8190 if test -z "$ac_cpp_err"; then
8191 eval "$as_ac_Header=yes"
8193 echo "$as_me: failed program was:" >&5
8194 cat conftest.$ac_ext >&5
8195 eval "$as_ac_Header=no"
8197 rm -f conftest.err conftest.$ac_ext
8199 echo "$as_me:8199: result: `eval echo '${'$as_ac_Header'}'`" >&5
8200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8202 cat >>confdefs.h <<EOF
8203 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8209 cat >>confdefs.h <<\EOF
8213 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8215 cat >>confdefs.h <<EOF
8216 #define $cf_nculib_ROOT 1
8219 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8223 cf_ncuhdr_root=$cf_cv_screen
8225 test -n "$cf_cv_curses_dir" && \
8226 test "$cf_cv_curses_dir" != "no" && { \
8228 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8229 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8231 while test $cf_add_incdir != /usr/include
8233 if test -d $cf_add_incdir
8236 if test -n "$CFLAGS$CPPFLAGS" ; then
8237 # a loop is needed to ensure we can add subdirs of existing dirs
8238 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8239 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8240 cf_have_incdir=yes; break
8245 if test "$cf_have_incdir" = no ; then
8246 if test "$cf_add_incdir" = /usr/local/include ; then
8247 if test "$GCC" = yes
8249 cf_save_CPPFLAGS=$CPPFLAGS
8250 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8251 cat >conftest.$ac_ext <<_ACEOF
8252 #line 8252 "configure"
8253 #include "confdefs.h"
8263 rm -f conftest.$ac_objext
8264 if { (eval echo "$as_me:8264: \"$ac_compile\"") >&5
8265 (eval $ac_compile) 2>&5
8267 echo "$as_me:8267: \$? = $ac_status" >&5
8268 (exit $ac_status); } &&
8269 { ac_try='test -s conftest.$ac_objext'
8270 { (eval echo "$as_me:8270: \"$ac_try\"") >&5
8273 echo "$as_me:8273: \$? = $ac_status" >&5
8274 (exit $ac_status); }; }; then
8277 echo "$as_me: failed program was:" >&5
8278 cat conftest.$ac_ext >&5
8281 rm -f conftest.$ac_objext conftest.$ac_ext
8282 CPPFLAGS=$cf_save_CPPFLAGS
8287 if test "$cf_have_incdir" = no ; then
8288 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8290 echo "${as_me:-configure}:8290: testing adding $cf_add_incdir to include-path ..." 1>&5
8292 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8294 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8295 test "$cf_top_incdir" = "$cf_add_incdir" && break
8296 cf_add_incdir="$cf_top_incdir"
8309 echo "$as_me:8309: checking for $cf_ncuhdr_root header in include-path" >&5
8310 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8311 if test "${cf_cv_ncurses_h+set}" = set; then
8312 echo $ECHO_N "(cached) $ECHO_C" >&6
8315 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8316 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8317 for cf_header in $cf_header_list
8320 cat >conftest.$ac_ext <<_ACEOF
8321 #line 8321 "configure"
8322 #include "confdefs.h"
8324 #include <$cf_header>
8329 #ifdef NCURSES_VERSION
8331 printf("%s\n", NCURSES_VERSION);
8344 rm -f conftest.$ac_objext
8345 if { (eval echo "$as_me:8345: \"$ac_compile\"") >&5
8346 (eval $ac_compile) 2>&5
8348 echo "$as_me:8348: \$? = $ac_status" >&5
8349 (exit $ac_status); } &&
8350 { ac_try='test -s conftest.$ac_objext'
8351 { (eval echo "$as_me:8351: \"$ac_try\"") >&5
8354 echo "$as_me:8354: \$? = $ac_status" >&5
8355 (exit $ac_status); }; }; then
8356 cf_cv_ncurses_h=$cf_header
8359 echo "$as_me: failed program was:" >&5
8360 cat conftest.$ac_ext >&5
8363 rm -f conftest.$ac_objext conftest.$ac_ext
8365 test "$cf_cv_ncurses_h" != no && break
8369 echo "$as_me:8369: result: $cf_cv_ncurses_h" >&5
8370 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8372 if test "$cf_cv_ncurses_h" != no ; then
8373 cf_cv_ncurses_header=$cf_cv_ncurses_h
8376 echo "$as_me:8376: checking for $cf_ncuhdr_root include-path" >&5
8377 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8378 if test "${cf_cv_ncurses_h2+set}" = set; then
8379 echo $ECHO_N "(cached) $ECHO_C" >&6
8382 test -n "$verbose" && echo
8386 # collect the current set of include-directories from compiler flags
8387 cf_header_path_list=""
8388 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8389 for cf_header_path in $CPPFLAGS $CFLAGS
8391 case $cf_header_path in
8393 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8395 test "x$cf_header_path" != "xNONE" && \
8396 test -d "$cf_header_path" && \
8398 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8399 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8400 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8401 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8402 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8403 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"
8406 cf_header_path_list="$cf_header_path_list $cf_search"
8412 # add the variations for the package we are looking for
8416 test "x$prefix" != "xNONE" && \
8417 test -d "$prefix" && \
8419 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8420 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8421 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8422 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8423 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8424 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8427 for cf_subdir_prefix in \
8436 test "x$cf_subdir_prefix" != "x$prefix" && \
8437 test -d "$cf_subdir_prefix" && \
8438 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8439 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8440 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8441 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8442 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8443 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8444 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"
8449 test "$includedir" != NONE && \
8450 test "$includedir" != "/usr/include" && \
8451 test -d "$includedir" && {
8452 test -d $includedir && cf_search="$cf_search $includedir"
8453 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8456 test "$oldincludedir" != NONE && \
8457 test "$oldincludedir" != "/usr/include" && \
8458 test -d "$oldincludedir" && {
8459 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8460 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8463 cf_search="$cf_search $cf_header_path_list"
8465 test -n "$verbose" && echo search path $cf_search
8466 cf_save2_CPPFLAGS="$CPPFLAGS"
8467 for cf_incdir in $cf_search
8470 if test -n "$cf_incdir" ; then
8471 for cf_add_incdir in $cf_incdir
8473 while test $cf_add_incdir != /usr/include
8475 if test -d $cf_add_incdir
8478 if test -n "$CFLAGS$CPPFLAGS" ; then
8479 # a loop is needed to ensure we can add subdirs of existing dirs
8480 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8481 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8482 cf_have_incdir=yes; break
8487 if test "$cf_have_incdir" = no ; then
8488 if test "$cf_add_incdir" = /usr/local/include ; then
8489 if test "$GCC" = yes
8491 cf_save_CPPFLAGS=$CPPFLAGS
8492 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8493 cat >conftest.$ac_ext <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507 (eval $ac_compile) 2>&5
8509 echo "$as_me:8509: \$? = $ac_status" >&5
8510 (exit $ac_status); } &&
8511 { ac_try='test -s conftest.$ac_objext'
8512 { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8515 echo "$as_me:8515: \$? = $ac_status" >&5
8516 (exit $ac_status); }; }; then
8519 echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8523 rm -f conftest.$ac_objext conftest.$ac_ext
8524 CPPFLAGS=$cf_save_CPPFLAGS
8529 if test "$cf_have_incdir" = no ; then
8530 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8532 echo "${as_me:-configure}:8532: testing adding $cf_add_incdir to include-path ..." 1>&5
8534 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8536 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8537 test "$cf_top_incdir" = "$cf_add_incdir" && break
8538 cf_add_incdir="$cf_top_incdir"
8554 cat >conftest.$ac_ext <<_ACEOF
8555 #line 8555 "configure"
8556 #include "confdefs.h"
8558 #include <$cf_header>
8563 #ifdef NCURSES_VERSION
8565 printf("%s\n", NCURSES_VERSION);
8578 rm -f conftest.$ac_objext
8579 if { (eval echo "$as_me:8579: \"$ac_compile\"") >&5
8580 (eval $ac_compile) 2>&5
8582 echo "$as_me:8582: \$? = $ac_status" >&5
8583 (exit $ac_status); } &&
8584 { ac_try='test -s conftest.$ac_objext'
8585 { (eval echo "$as_me:8585: \"$ac_try\"") >&5
8588 echo "$as_me:8588: \$? = $ac_status" >&5
8589 (exit $ac_status); }; }; then
8590 cf_cv_ncurses_h2=$cf_header
8593 echo "$as_me: failed program was:" >&5
8594 cat conftest.$ac_ext >&5
8597 rm -f conftest.$ac_objext conftest.$ac_ext
8599 if test "$cf_cv_ncurses_h2" != no ; then
8600 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8601 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8604 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8606 CPPFLAGS="$cf_save2_CPPFLAGS"
8607 test "$cf_cv_ncurses_h2" != no && break
8609 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8609: error: not found" >&5
8610 echo "$as_me: error: not found" >&2;}
8611 { (exit 1); exit 1; }; }
8614 echo "$as_me:8614: result: $cf_cv_ncurses_h2" >&5
8615 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8617 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8618 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8619 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8620 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8623 if test -n "$cf_1st_incdir" ; then
8624 for cf_add_incdir in $cf_1st_incdir
8626 while test $cf_add_incdir != /usr/include
8628 if test -d $cf_add_incdir
8631 if test -n "$CFLAGS$CPPFLAGS" ; then
8632 # a loop is needed to ensure we can add subdirs of existing dirs
8633 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8634 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8635 cf_have_incdir=yes; break
8640 if test "$cf_have_incdir" = no ; then
8641 if test "$cf_add_incdir" = /usr/local/include ; then
8642 if test "$GCC" = yes
8644 cf_save_CPPFLAGS=$CPPFLAGS
8645 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8646 cat >conftest.$ac_ext <<_ACEOF
8647 #line 8647 "configure"
8648 #include "confdefs.h"
8658 rm -f conftest.$ac_objext
8659 if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
8660 (eval $ac_compile) 2>&5
8662 echo "$as_me:8662: \$? = $ac_status" >&5
8663 (exit $ac_status); } &&
8664 { ac_try='test -s conftest.$ac_objext'
8665 { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8668 echo "$as_me:8668: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8672 echo "$as_me: failed program was:" >&5
8673 cat conftest.$ac_ext >&5
8676 rm -f conftest.$ac_objext conftest.$ac_ext
8677 CPPFLAGS=$cf_save_CPPFLAGS
8682 if test "$cf_have_incdir" = no ; then
8683 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8685 echo "${as_me:-configure}:8685: testing adding $cf_add_incdir to include-path ..." 1>&5
8687 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8689 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8690 test "$cf_top_incdir" = "$cf_add_incdir" && break
8691 cf_add_incdir="$cf_top_incdir"
8704 # Set definitions to allow ifdef'ing for ncurses.h
8706 case $cf_cv_ncurses_header in
8709 cat >>confdefs.h <<\EOF
8710 #define HAVE_NCURSES_H 1
8716 case $cf_cv_ncurses_header in
8717 (ncurses/curses.h|ncurses/ncurses.h)
8719 cat >>confdefs.h <<\EOF
8720 #define HAVE_NCURSES_NCURSES_H 1
8724 (ncursesw/curses.h|ncursesw/ncurses.h)
8726 cat >>confdefs.h <<\EOF
8727 #define HAVE_NCURSESW_NCURSES_H 1
8733 echo "$as_me:8733: checking for terminfo header" >&5
8734 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8735 if test "${cf_cv_term_header+set}" = set; then
8736 echo $ECHO_N "(cached) $ECHO_C" >&6
8739 case ${cf_cv_ncurses_header} in
8740 (*/ncurses.h|*/ncursesw.h)
8741 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8744 cf_term_header=term.h
8748 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8750 cat >conftest.$ac_ext <<_ACEOF
8751 #line 8751 "configure"
8752 #include "confdefs.h"
8754 #include <${cf_cv_ncurses_header:-curses.h}>
8760 int x = auto_left_margin
8765 rm -f conftest.$ac_objext
8766 if { (eval echo "$as_me:8766: \"$ac_compile\"") >&5
8767 (eval $ac_compile) 2>&5
8769 echo "$as_me:8769: \$? = $ac_status" >&5
8770 (exit $ac_status); } &&
8771 { ac_try='test -s conftest.$ac_objext'
8772 { (eval echo "$as_me:8772: \"$ac_try\"") >&5
8775 echo "$as_me:8775: \$? = $ac_status" >&5
8776 (exit $ac_status); }; }; then
8778 cf_cv_term_header="$cf_test"
8780 echo "$as_me: failed program was:" >&5
8781 cat conftest.$ac_ext >&5
8783 cf_cv_term_header=unknown
8786 rm -f conftest.$ac_objext conftest.$ac_ext
8787 test "$cf_cv_term_header" != unknown && break
8791 echo "$as_me:8791: result: $cf_cv_term_header" >&5
8792 echo "${ECHO_T}$cf_cv_term_header" >&6
8794 # Set definitions to allow ifdef'ing to accommodate subdirectories
8796 case $cf_cv_term_header in
8799 cat >>confdefs.h <<\EOF
8800 #define HAVE_TERM_H 1
8806 case $cf_cv_term_header in
8809 cat >>confdefs.h <<\EOF
8810 #define HAVE_NCURSES_TERM_H 1
8816 cat >>confdefs.h <<\EOF
8817 #define HAVE_NCURSESW_TERM_H 1
8823 # some applications need this, but should check for NCURSES_VERSION
8825 cat >>confdefs.h <<\EOF
8829 echo "$as_me:8829: checking for ncurses version" >&5
8830 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8831 if test "${cf_cv_ncurses_version+set}" = set; then
8832 echo $ECHO_N "(cached) $ECHO_C" >&6
8835 cf_cv_ncurses_version=no
8838 if test "$cross_compiling" = yes; then
8840 # This will not work if the preprocessor splits the line after the
8841 # Autoconf token. The 'unproto' program does that.
8842 cat > conftest.$ac_ext <<EOF
8843 #include <${cf_cv_ncurses_header:-curses.h}>
8845 #ifdef NCURSES_VERSION
8846 Autoconf NCURSES_VERSION
8854 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8855 { (eval echo "$as_me:8855: \"$cf_try\"") >&5
8858 echo "$as_me:8858: \$? = $ac_status" >&5
8859 (exit $ac_status); }
8860 if test -f conftest.out ; then
8861 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8862 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8867 cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8871 #include <${cf_cv_ncurses_header:-curses.h}>
8875 FILE *fp = fopen("$cf_tempfile", "w");
8876 #ifdef NCURSES_VERSION
8877 # ifdef NCURSES_VERSION_PATCH
8878 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8880 fprintf(fp, "%s\n", NCURSES_VERSION);
8884 fprintf(fp, "old\n");
8889 ${cf_cv_main_return:-return}(0);
8892 rm -f conftest$ac_exeext
8893 if { (eval echo "$as_me:8893: \"$ac_link\"") >&5
8894 (eval $ac_link) 2>&5
8896 echo "$as_me:8896: \$? = $ac_status" >&5
8897 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8898 { (eval echo "$as_me:8898: \"$ac_try\"") >&5
8901 echo "$as_me:8901: \$? = $ac_status" >&5
8902 (exit $ac_status); }; }; then
8904 cf_cv_ncurses_version=`cat $cf_tempfile`
8906 echo "$as_me: program exited with status $ac_status" >&5
8907 echo "$as_me: failed program was:" >&5
8908 cat conftest.$ac_ext >&5
8910 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8915 echo "$as_me:8915: result: $cf_cv_ncurses_version" >&5
8916 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8917 test "$cf_cv_ncurses_version" = no ||
8918 cat >>confdefs.h <<\EOF
8922 cf_nculib_root=$cf_cv_screen
8923 # This works, except for the special case where we find gpm, but
8924 # ncurses is in a nonstandard location via $LIBS, and we really want
8927 cf_ncurses_SAVE="$LIBS"
8928 echo "$as_me:8928: checking for Gpm_Open in -lgpm" >&5
8929 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8930 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8931 echo $ECHO_N "(cached) $ECHO_C" >&6
8933 ac_check_lib_save_LIBS=$LIBS
8935 cat >conftest.$ac_ext <<_ACEOF
8936 #line 8936 "configure"
8937 #include "confdefs.h"
8939 /* Override any gcc2 internal prototype to avoid an error. */
8943 /* We use char because int might match the return type of a gcc2
8944 builtin and then its argument prototype would still apply. */
8954 rm -f conftest.$ac_objext conftest$ac_exeext
8955 if { (eval echo "$as_me:8955: \"$ac_link\"") >&5
8956 (eval $ac_link) 2>&5
8958 echo "$as_me:8958: \$? = $ac_status" >&5
8959 (exit $ac_status); } &&
8960 { ac_try='test -s conftest$ac_exeext'
8961 { (eval echo "$as_me:8961: \"$ac_try\"") >&5
8964 echo "$as_me:8964: \$? = $ac_status" >&5
8965 (exit $ac_status); }; }; then
8966 ac_cv_lib_gpm_Gpm_Open=yes
8968 echo "$as_me: failed program was:" >&5
8969 cat conftest.$ac_ext >&5
8970 ac_cv_lib_gpm_Gpm_Open=no
8972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8973 LIBS=$ac_check_lib_save_LIBS
8975 echo "$as_me:8975: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8976 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8977 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8978 echo "$as_me:8978: checking for initscr in -lgpm" >&5
8979 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8980 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8981 echo $ECHO_N "(cached) $ECHO_C" >&6
8983 ac_check_lib_save_LIBS=$LIBS
8985 cat >conftest.$ac_ext <<_ACEOF
8986 #line 8986 "configure"
8987 #include "confdefs.h"
8989 /* Override any gcc2 internal prototype to avoid an error. */
8993 /* We use char because int might match the return type of a gcc2
8994 builtin and then its argument prototype would still apply. */
9004 rm -f conftest.$ac_objext conftest$ac_exeext
9005 if { (eval echo "$as_me:9005: \"$ac_link\"") >&5
9006 (eval $ac_link) 2>&5
9008 echo "$as_me:9008: \$? = $ac_status" >&5
9009 (exit $ac_status); } &&
9010 { ac_try='test -s conftest$ac_exeext'
9011 { (eval echo "$as_me:9011: \"$ac_try\"") >&5
9014 echo "$as_me:9014: \$? = $ac_status" >&5
9015 (exit $ac_status); }; }; then
9016 ac_cv_lib_gpm_initscr=yes
9018 echo "$as_me: failed program was:" >&5
9019 cat conftest.$ac_ext >&5
9020 ac_cv_lib_gpm_initscr=no
9022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9023 LIBS=$ac_check_lib_save_LIBS
9025 echo "$as_me:9025: result: $ac_cv_lib_gpm_initscr" >&5
9026 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9027 if test $ac_cv_lib_gpm_initscr = yes; then
9028 LIBS="$cf_ncurses_SAVE"
9030 cf_ncurses_LIBS="-lgpm"
9037 # This is only necessary if you are linking against an obsolete
9038 # version of ncurses (but it should do no harm, since it's static).
9039 if test "$cf_nculib_root" = ncurses ; then
9040 echo "$as_me:9040: checking for tgoto in -lmytinfo" >&5
9041 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9042 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9043 echo $ECHO_N "(cached) $ECHO_C" >&6
9045 ac_check_lib_save_LIBS=$LIBS
9046 LIBS="-lmytinfo $LIBS"
9047 cat >conftest.$ac_ext <<_ACEOF
9048 #line 9048 "configure"
9049 #include "confdefs.h"
9051 /* Override any gcc2 internal prototype to avoid an error. */
9055 /* We use char because int might match the return type of a gcc2
9056 builtin and then its argument prototype would still apply. */
9066 rm -f conftest.$ac_objext conftest$ac_exeext
9067 if { (eval echo "$as_me:9067: \"$ac_link\"") >&5
9068 (eval $ac_link) 2>&5
9070 echo "$as_me:9070: \$? = $ac_status" >&5
9071 (exit $ac_status); } &&
9072 { ac_try='test -s conftest$ac_exeext'
9073 { (eval echo "$as_me:9073: \"$ac_try\"") >&5
9076 echo "$as_me:9076: \$? = $ac_status" >&5
9077 (exit $ac_status); }; }; then
9078 ac_cv_lib_mytinfo_tgoto=yes
9080 echo "$as_me: failed program was:" >&5
9081 cat conftest.$ac_ext >&5
9082 ac_cv_lib_mytinfo_tgoto=no
9084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9085 LIBS=$ac_check_lib_save_LIBS
9087 echo "$as_me:9087: result: $ac_cv_lib_mytinfo_tgoto" >&5
9088 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9089 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9090 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9097 cf_add_libs="$cf_ncurses_LIBS"
9098 # Filter out duplicates - this happens with badly-designed ".pc" files...
9099 for cf_add_1lib in $LIBS
9101 for cf_add_2lib in $cf_add_libs
9103 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9109 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9113 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9116 cf_add_libs="-l$cf_nculib_root"
9117 # Filter out duplicates - this happens with badly-designed ".pc" files...
9118 for cf_add_1lib in $LIBS
9120 for cf_add_2lib in $cf_add_libs
9122 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9128 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9134 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9136 echo "$as_me:9136: checking for initscr" >&5
9137 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9138 if test "${ac_cv_func_initscr+set}" = set; then
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
9141 cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 /* System header to define __stub macros and hopefully few prototypes,
9145 which can conflict with char initscr (); below. */
9147 /* Override any gcc2 internal prototype to avoid an error. */
9151 /* We use char because int might match the return type of a gcc2
9152 builtin and then its argument prototype would still apply. */
9159 /* The GNU C library defines this for functions which it implements
9160 to always fail with ENOSYS. Some functions are actually named
9161 something starting with __ and the normal name is an alias. */
9162 #if defined (__stub_initscr) || defined (__stub___initscr)
9165 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9172 rm -f conftest.$ac_objext conftest$ac_exeext
9173 if { (eval echo "$as_me:9173: \"$ac_link\"") >&5
9174 (eval $ac_link) 2>&5
9176 echo "$as_me:9176: \$? = $ac_status" >&5
9177 (exit $ac_status); } &&
9178 { ac_try='test -s conftest$ac_exeext'
9179 { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9182 echo "$as_me:9182: \$? = $ac_status" >&5
9183 (exit $ac_status); }; }; then
9184 ac_cv_func_initscr=yes
9186 echo "$as_me: failed program was:" >&5
9187 cat conftest.$ac_ext >&5
9188 ac_cv_func_initscr=no
9190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9192 echo "$as_me:9192: result: $ac_cv_func_initscr" >&5
9193 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9194 if test $ac_cv_func_initscr = yes; then
9195 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9198 cf_save_LIBS="$LIBS"
9199 echo "$as_me:9199: checking for initscr in -l$cf_nculib_root" >&5
9200 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9201 LIBS="-l$cf_nculib_root $LIBS"
9202 cat >conftest.$ac_ext <<_ACEOF
9203 #line 9203 "configure"
9204 #include "confdefs.h"
9205 #include <${cf_cv_ncurses_header:-curses.h}>
9214 rm -f conftest.$ac_objext conftest$ac_exeext
9215 if { (eval echo "$as_me:9215: \"$ac_link\"") >&5
9216 (eval $ac_link) 2>&5
9218 echo "$as_me:9218: \$? = $ac_status" >&5
9219 (exit $ac_status); } &&
9220 { ac_try='test -s conftest$ac_exeext'
9221 { (eval echo "$as_me:9221: \"$ac_try\"") >&5
9224 echo "$as_me:9224: \$? = $ac_status" >&5
9225 (exit $ac_status); }; }; then
9226 echo "$as_me:9226: result: yes" >&5
9227 echo "${ECHO_T}yes" >&6
9228 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9231 echo "$as_me: failed program was:" >&5
9232 cat conftest.$ac_ext >&5
9233 echo "$as_me:9233: result: no" >&5
9234 echo "${ECHO_T}no" >&6
9237 cf_library_path_list=""
9238 if test -n "${LDFLAGS}${LIBS}" ; then
9239 for cf_library_path in $LDFLAGS $LIBS
9241 case $cf_library_path in
9243 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9245 test "x$cf_library_path" != "xNONE" && \
9246 test -d "$cf_library_path" && \
9248 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9249 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9250 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9251 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9252 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9253 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"
9256 cf_library_path_list="$cf_library_path_list $cf_search"
9264 test "x$prefix" != "xNONE" && \
9265 test -d "$prefix" && \
9267 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9268 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9269 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9270 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9271 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9272 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9275 for cf_subdir_prefix in \
9284 test "x$cf_subdir_prefix" != "x$prefix" && \
9285 test -d "$cf_subdir_prefix" && \
9286 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9287 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9288 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9289 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9290 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9291 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9292 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"
9297 cf_search="$cf_library_path_list $cf_search"
9299 for cf_libdir in $cf_search
9301 echo "$as_me:9301: checking for -l$cf_nculib_root in $cf_libdir" >&5
9302 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9303 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9304 cat >conftest.$ac_ext <<_ACEOF
9305 #line 9305 "configure"
9306 #include "confdefs.h"
9307 #include <${cf_cv_ncurses_header:-curses.h}>
9316 rm -f conftest.$ac_objext conftest$ac_exeext
9317 if { (eval echo "$as_me:9317: \"$ac_link\"") >&5
9318 (eval $ac_link) 2>&5
9320 echo "$as_me:9320: \$? = $ac_status" >&5
9321 (exit $ac_status); } &&
9322 { ac_try='test -s conftest$ac_exeext'
9323 { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9326 echo "$as_me:9326: \$? = $ac_status" >&5
9327 (exit $ac_status); }; }; then
9328 echo "$as_me:9328: result: yes" >&5
9329 echo "${ECHO_T}yes" >&6
9330 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9333 echo "$as_me: failed program was:" >&5
9334 cat conftest.$ac_ext >&5
9335 echo "$as_me:9335: result: no" >&5
9336 echo "${ECHO_T}no" >&6
9337 LIBS="$cf_save_LIBS"
9339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9347 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9349 if test $cf_found_library = no ; then
9350 { { echo "$as_me:9350: error: Cannot link $cf_nculib_root library" >&5
9351 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9352 { (exit 1); exit 1; }; }
9357 if test -n "$cf_ncurses_LIBS" ; then
9358 echo "$as_me:9358: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9359 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9360 cf_ncurses_SAVE="$LIBS"
9361 for p in $cf_ncurses_LIBS ; do
9362 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9363 if test "$q" != "$LIBS" ; then
9367 cat >conftest.$ac_ext <<_ACEOF
9368 #line 9368 "configure"
9369 #include "confdefs.h"
9370 #include <${cf_cv_ncurses_header:-curses.h}>
9374 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9379 rm -f conftest.$ac_objext conftest$ac_exeext
9380 if { (eval echo "$as_me:9380: \"$ac_link\"") >&5
9381 (eval $ac_link) 2>&5
9383 echo "$as_me:9383: \$? = $ac_status" >&5
9384 (exit $ac_status); } &&
9385 { ac_try='test -s conftest$ac_exeext'
9386 { (eval echo "$as_me:9386: \"$ac_try\"") >&5
9389 echo "$as_me:9389: \$? = $ac_status" >&5
9390 (exit $ac_status); }; }; then
9391 echo "$as_me:9391: result: yes" >&5
9392 echo "${ECHO_T}yes" >&6
9394 echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 echo "$as_me:9396: result: no" >&5
9397 echo "${ECHO_T}no" >&6
9398 LIBS="$cf_ncurses_SAVE"
9400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9403 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9405 cat >>confdefs.h <<EOF
9406 #define $cf_nculib_ROOT 1
9416 echo "$as_me:9416: checking for X" >&5
9417 echo $ECHO_N "checking for X... $ECHO_C" >&6
9419 # Check whether --with-x or --without-x was given.
9420 if test "${with_x+set}" = set; then
9424 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9425 if test "x$with_x" = xno; then
9426 # The user explicitly disabled X.
9429 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9430 # Both variables are already set.
9433 if test "${ac_cv_have_x+set}" = set; then
9434 echo $ECHO_N "(cached) $ECHO_C" >&6
9436 # One or both of the vars are not set, and there is no cached value.
9437 ac_x_includes=no ac_x_libraries=no
9439 if mkdir conftest.dir; then
9441 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9442 cat >Imakefile <<'EOF'
9444 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9446 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9447 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9448 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9449 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9450 for ac_extension in a so sl dylib dll; do
9451 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9452 test -f $ac_im_libdir/libX11.$ac_extension; then
9453 ac_im_usrlibdir=$ac_im_libdir; break
9456 # Screen out bogus values from the imake configuration. They are
9457 # bogus both because they are the default anyway, and because
9458 # using them would break gcc on systems where it needs fixed includes.
9459 case $ac_im_incroot in
9461 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9463 case $ac_im_usrlibdir in
9465 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9472 # Standard set of common directories for X headers.
9473 # Check X11 before X11Rn because it is often a symlink to the current release.
9485 /usr/local/X11/include
9486 /usr/local/X11R6/include
9487 /usr/local/X11R5/include
9488 /usr/local/X11R4/include
9490 /usr/local/include/X11
9491 /usr/local/include/X11R6
9492 /usr/local/include/X11R5
9493 /usr/local/include/X11R4
9497 /usr/XFree86/include/X11
9501 /usr/unsupported/include
9503 /usr/local/x11r5/include
9504 /usr/lpp/Xamples/include
9506 /usr/openwin/include
9507 /usr/openwin/share/include'
9509 if test "$ac_x_includes" = no; then
9510 # Guess where to find include files, by looking for Intrinsic.h.
9511 # First, try using that file with no special directory specified.
9512 cat >conftest.$ac_ext <<_ACEOF
9513 #line 9513 "configure"
9514 #include "confdefs.h"
9515 #include <X11/Intrinsic.h>
9517 if { (eval echo "$as_me:9517: \"$ac_cpp conftest.$ac_ext\"") >&5
9518 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9520 egrep -v '^ *\+' conftest.er1 >conftest.err
9522 cat conftest.err >&5
9523 echo "$as_me:9523: \$? = $ac_status" >&5
9524 (exit $ac_status); } >/dev/null; then
9525 if test -s conftest.err; then
9526 ac_cpp_err=$ac_c_preproc_warn_flag
9533 if test -z "$ac_cpp_err"; then
9534 # We can compile using X headers with no special include directory.
9537 echo "$as_me: failed program was:" >&5
9538 cat conftest.$ac_ext >&5
9539 for ac_dir in $ac_x_header_dirs; do
9540 if test -r "$ac_dir/X11/Intrinsic.h"; then
9541 ac_x_includes=$ac_dir
9546 rm -f conftest.err conftest.$ac_ext
9547 fi # $ac_x_includes = no
9549 if test "$ac_x_libraries" = no; then
9550 # Check for the libraries.
9551 # See if we find them without any special options.
9552 # Don't add to $LIBS permanently.
9555 cat >conftest.$ac_ext <<_ACEOF
9556 #line 9556 "configure"
9557 #include "confdefs.h"
9558 #include <X11/Intrinsic.h>
9567 rm -f conftest.$ac_objext conftest$ac_exeext
9568 if { (eval echo "$as_me:9568: \"$ac_link\"") >&5
9569 (eval $ac_link) 2>&5
9571 echo "$as_me:9571: \$? = $ac_status" >&5
9572 (exit $ac_status); } &&
9573 { ac_try='test -s conftest$ac_exeext'
9574 { (eval echo "$as_me:9574: \"$ac_try\"") >&5
9577 echo "$as_me:9577: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
9580 # We can link X programs with no special library path.
9583 echo "$as_me: failed program was:" >&5
9584 cat conftest.$ac_ext >&5
9586 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9588 # Don't even attempt the hair of trying to link an X program!
9589 for ac_extension in a so sl dylib dll; do
9590 if test -r $ac_dir/libXt.$ac_extension; then
9591 ac_x_libraries=$ac_dir
9597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9598 fi # $ac_x_libraries = no
9600 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9601 # Didn't find X anywhere. Cache the known absence of X.
9602 ac_cv_have_x="have_x=no"
9604 # Record where we found X for the cache.
9605 ac_cv_have_x="have_x=yes \
9606 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9611 eval "$ac_cv_have_x"
9614 if test "$have_x" != yes; then
9615 echo "$as_me:9615: result: $have_x" >&5
9616 echo "${ECHO_T}$have_x" >&6
9619 # If each of the values was on the command line, it overrides each guess.
9620 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9621 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9622 # Update the cache value to reflect the command line values.
9623 ac_cv_have_x="have_x=yes \
9624 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9625 echo "$as_me:9625: result: libraries $x_libraries, headers $x_includes" >&5
9626 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9629 if test "$no_x" = yes; then
9630 # Not all programs may use this symbol, but it does not hurt to define it.
9632 cat >>confdefs.h <<\EOF
9633 #define X_DISPLAY_MISSING 1
9636 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9638 if test -n "$x_includes"; then
9639 X_CFLAGS="$X_CFLAGS -I$x_includes"
9642 # It would also be nice to do this for all -L options, not just this one.
9643 if test -n "$x_libraries"; then
9644 X_LIBS="$X_LIBS -L$x_libraries"
9645 # For Solaris; some versions of Sun CC require a space after -R and
9646 # others require no space. Words are not sufficient . . . .
9647 case `(uname -sr) 2>/dev/null` in
9649 echo "$as_me:9649: checking whether -R must be followed by a space" >&5
9650 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9651 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9652 cat >conftest.$ac_ext <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9664 rm -f conftest.$ac_objext conftest$ac_exeext
9665 if { (eval echo "$as_me:9665: \"$ac_link\"") >&5
9666 (eval $ac_link) 2>&5
9668 echo "$as_me:9668: \$? = $ac_status" >&5
9669 (exit $ac_status); } &&
9670 { ac_try='test -s conftest$ac_exeext'
9671 { (eval echo "$as_me:9671: \"$ac_try\"") >&5
9674 echo "$as_me:9674: \$? = $ac_status" >&5
9675 (exit $ac_status); }; }; then
9678 echo "$as_me: failed program was:" >&5
9679 cat conftest.$ac_ext >&5
9682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9683 if test $ac_R_nospace = yes; then
9684 echo "$as_me:9684: result: no" >&5
9685 echo "${ECHO_T}no" >&6
9686 X_LIBS="$X_LIBS -R$x_libraries"
9688 LIBS="$ac_xsave_LIBS -R $x_libraries"
9689 cat >conftest.$ac_ext <<_ACEOF
9690 #line 9690 "configure"
9691 #include "confdefs.h"
9701 rm -f conftest.$ac_objext conftest$ac_exeext
9702 if { (eval echo "$as_me:9702: \"$ac_link\"") >&5
9703 (eval $ac_link) 2>&5
9705 echo "$as_me:9705: \$? = $ac_status" >&5
9706 (exit $ac_status); } &&
9707 { ac_try='test -s conftest$ac_exeext'
9708 { (eval echo "$as_me:9708: \"$ac_try\"") >&5
9711 echo "$as_me:9711: \$? = $ac_status" >&5
9712 (exit $ac_status); }; }; then
9715 echo "$as_me: failed program was:" >&5
9716 cat conftest.$ac_ext >&5
9719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9720 if test $ac_R_space = yes; then
9721 echo "$as_me:9721: result: yes" >&5
9722 echo "${ECHO_T}yes" >&6
9723 X_LIBS="$X_LIBS -R $x_libraries"
9725 echo "$as_me:9725: result: neither works" >&5
9726 echo "${ECHO_T}neither works" >&6
9733 # Check for system-dependent libraries X programs must link with.
9734 # Do this before checking for the system-independent R6 libraries
9735 # (-lICE), since we may need -lsocket or whatever for X linking.
9737 if test "$ISC" = yes; then
9738 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9740 # Martyn Johnson says this is needed for Ultrix, if the X
9741 # libraries were built with DECnet support. And Karl Berry says
9742 # the Alpha needs dnet_stub (dnet does not exist).
9743 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9744 cat >conftest.$ac_ext <<_ACEOF
9745 #line 9745 "configure"
9746 #include "confdefs.h"
9748 /* Override any gcc2 internal prototype to avoid an error. */
9752 /* We use char because int might match the return type of a gcc2
9753 builtin and then its argument prototype would still apply. */
9754 char XOpenDisplay ();
9763 rm -f conftest.$ac_objext conftest$ac_exeext
9764 if { (eval echo "$as_me:9764: \"$ac_link\"") >&5
9765 (eval $ac_link) 2>&5
9767 echo "$as_me:9767: \$? = $ac_status" >&5
9768 (exit $ac_status); } &&
9769 { ac_try='test -s conftest$ac_exeext'
9770 { (eval echo "$as_me:9770: \"$ac_try\"") >&5
9773 echo "$as_me:9773: \$? = $ac_status" >&5
9774 (exit $ac_status); }; }; then
9777 echo "$as_me: failed program was:" >&5
9778 cat conftest.$ac_ext >&5
9779 echo "$as_me:9779: checking for dnet_ntoa in -ldnet" >&5
9780 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9781 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
9784 ac_check_lib_save_LIBS=$LIBS
9786 cat >conftest.$ac_ext <<_ACEOF
9787 #line 9787 "configure"
9788 #include "confdefs.h"
9790 /* Override any gcc2 internal prototype to avoid an error. */
9794 /* We use char because int might match the return type of a gcc2
9795 builtin and then its argument prototype would still apply. */
9805 rm -f conftest.$ac_objext conftest$ac_exeext
9806 if { (eval echo "$as_me:9806: \"$ac_link\"") >&5
9807 (eval $ac_link) 2>&5
9809 echo "$as_me:9809: \$? = $ac_status" >&5
9810 (exit $ac_status); } &&
9811 { ac_try='test -s conftest$ac_exeext'
9812 { (eval echo "$as_me:9812: \"$ac_try\"") >&5
9815 echo "$as_me:9815: \$? = $ac_status" >&5
9816 (exit $ac_status); }; }; then
9817 ac_cv_lib_dnet_dnet_ntoa=yes
9819 echo "$as_me: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9821 ac_cv_lib_dnet_dnet_ntoa=no
9823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9824 LIBS=$ac_check_lib_save_LIBS
9826 echo "$as_me:9826: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9827 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9828 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9829 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9832 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9833 echo "$as_me:9833: checking for dnet_ntoa in -ldnet_stub" >&5
9834 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9835 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9836 echo $ECHO_N "(cached) $ECHO_C" >&6
9838 ac_check_lib_save_LIBS=$LIBS
9839 LIBS="-ldnet_stub $LIBS"
9840 cat >conftest.$ac_ext <<_ACEOF
9841 #line 9841 "configure"
9842 #include "confdefs.h"
9844 /* Override any gcc2 internal prototype to avoid an error. */
9848 /* We use char because int might match the return type of a gcc2
9849 builtin and then its argument prototype would still apply. */
9859 rm -f conftest.$ac_objext conftest$ac_exeext
9860 if { (eval echo "$as_me:9860: \"$ac_link\"") >&5
9861 (eval $ac_link) 2>&5
9863 echo "$as_me:9863: \$? = $ac_status" >&5
9864 (exit $ac_status); } &&
9865 { ac_try='test -s conftest$ac_exeext'
9866 { (eval echo "$as_me:9866: \"$ac_try\"") >&5
9869 echo "$as_me:9869: \$? = $ac_status" >&5
9870 (exit $ac_status); }; }; then
9871 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9873 echo "$as_me: failed program was:" >&5
9874 cat conftest.$ac_ext >&5
9875 ac_cv_lib_dnet_stub_dnet_ntoa=no
9877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9878 LIBS=$ac_check_lib_save_LIBS
9880 echo "$as_me:9880: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9881 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9882 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9883 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9889 LIBS="$ac_xsave_LIBS"
9891 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9892 # to get the SysV transport functions.
9893 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9895 # The nsl library prevents programs from opening the X display
9896 # on Irix 5.2, according to T.E. Dickey.
9897 # The functions gethostbyname, getservbyname, and inet_addr are
9898 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9899 echo "$as_me:9899: checking for gethostbyname" >&5
9900 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9901 if test "${ac_cv_func_gethostbyname+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9904 cat >conftest.$ac_ext <<_ACEOF
9905 #line 9905 "configure"
9906 #include "confdefs.h"
9907 /* System header to define __stub macros and hopefully few prototypes,
9908 which can conflict with char gethostbyname (); below. */
9910 /* Override any gcc2 internal prototype to avoid an error. */
9914 /* We use char because int might match the return type of a gcc2
9915 builtin and then its argument prototype would still apply. */
9916 char gethostbyname ();
9922 /* The GNU C library defines this for functions which it implements
9923 to always fail with ENOSYS. Some functions are actually named
9924 something starting with __ and the normal name is an alias. */
9925 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9928 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9935 rm -f conftest.$ac_objext conftest$ac_exeext
9936 if { (eval echo "$as_me:9936: \"$ac_link\"") >&5
9937 (eval $ac_link) 2>&5
9939 echo "$as_me:9939: \$? = $ac_status" >&5
9940 (exit $ac_status); } &&
9941 { ac_try='test -s conftest$ac_exeext'
9942 { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9945 echo "$as_me:9945: \$? = $ac_status" >&5
9946 (exit $ac_status); }; }; then
9947 ac_cv_func_gethostbyname=yes
9949 echo "$as_me: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9951 ac_cv_func_gethostbyname=no
9953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9955 echo "$as_me:9955: result: $ac_cv_func_gethostbyname" >&5
9956 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9958 if test $ac_cv_func_gethostbyname = no; then
9959 echo "$as_me:9959: checking for gethostbyname in -lnsl" >&5
9960 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9961 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9962 echo $ECHO_N "(cached) $ECHO_C" >&6
9964 ac_check_lib_save_LIBS=$LIBS
9966 cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9970 /* Override any gcc2 internal prototype to avoid an error. */
9974 /* We use char because int might match the return type of a gcc2
9975 builtin and then its argument prototype would still apply. */
9976 char gethostbyname ();
9985 rm -f conftest.$ac_objext conftest$ac_exeext
9986 if { (eval echo "$as_me:9986: \"$ac_link\"") >&5
9987 (eval $ac_link) 2>&5
9989 echo "$as_me:9989: \$? = $ac_status" >&5
9990 (exit $ac_status); } &&
9991 { ac_try='test -s conftest$ac_exeext'
9992 { (eval echo "$as_me:9992: \"$ac_try\"") >&5
9995 echo "$as_me:9995: \$? = $ac_status" >&5
9996 (exit $ac_status); }; }; then
9997 ac_cv_lib_nsl_gethostbyname=yes
9999 echo "$as_me: failed program was:" >&5
10000 cat conftest.$ac_ext >&5
10001 ac_cv_lib_nsl_gethostbyname=no
10003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10004 LIBS=$ac_check_lib_save_LIBS
10006 echo "$as_me:10006: result: $ac_cv_lib_nsl_gethostbyname" >&5
10007 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10008 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10009 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10012 if test $ac_cv_lib_nsl_gethostbyname = no; then
10013 echo "$as_me:10013: checking for gethostbyname in -lbsd" >&5
10014 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10015 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10018 ac_check_lib_save_LIBS=$LIBS
10020 cat >conftest.$ac_ext <<_ACEOF
10021 #line 10021 "configure"
10022 #include "confdefs.h"
10024 /* Override any gcc2 internal prototype to avoid an error. */
10028 /* We use char because int might match the return type of a gcc2
10029 builtin and then its argument prototype would still apply. */
10030 char gethostbyname ();
10039 rm -f conftest.$ac_objext conftest$ac_exeext
10040 if { (eval echo "$as_me:10040: \"$ac_link\"") >&5
10041 (eval $ac_link) 2>&5
10043 echo "$as_me:10043: \$? = $ac_status" >&5
10044 (exit $ac_status); } &&
10045 { ac_try='test -s conftest$ac_exeext'
10046 { (eval echo "$as_me:10046: \"$ac_try\"") >&5
10047 (eval $ac_try) 2>&5
10049 echo "$as_me:10049: \$? = $ac_status" >&5
10050 (exit $ac_status); }; }; then
10051 ac_cv_lib_bsd_gethostbyname=yes
10053 echo "$as_me: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055 ac_cv_lib_bsd_gethostbyname=no
10057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10058 LIBS=$ac_check_lib_save_LIBS
10060 echo "$as_me:10060: result: $ac_cv_lib_bsd_gethostbyname" >&5
10061 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10062 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10063 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10069 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10070 # socket/setsockopt and other routines are undefined under SCO ODT
10071 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10072 # on later versions), says Simon Leinen: it contains gethostby*
10073 # variants that don't use the nameserver (or something). -lsocket
10074 # must be given before -lnsl if both are needed. We assume that
10075 # if connect needs -lnsl, so does gethostbyname.
10076 echo "$as_me:10076: checking for connect" >&5
10077 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10078 if test "${ac_cv_func_connect+set}" = set; then
10079 echo $ECHO_N "(cached) $ECHO_C" >&6
10081 cat >conftest.$ac_ext <<_ACEOF
10082 #line 10082 "configure"
10083 #include "confdefs.h"
10084 /* System header to define __stub macros and hopefully few prototypes,
10085 which can conflict with char connect (); below. */
10086 #include <assert.h>
10087 /* Override any gcc2 internal prototype to avoid an error. */
10091 /* We use char because int might match the return type of a gcc2
10092 builtin and then its argument prototype would still apply. */
10099 /* The GNU C library defines this for functions which it implements
10100 to always fail with ENOSYS. Some functions are actually named
10101 something starting with __ and the normal name is an alias. */
10102 #if defined (__stub_connect) || defined (__stub___connect)
10105 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10112 rm -f conftest.$ac_objext conftest$ac_exeext
10113 if { (eval echo "$as_me:10113: \"$ac_link\"") >&5
10114 (eval $ac_link) 2>&5
10116 echo "$as_me:10116: \$? = $ac_status" >&5
10117 (exit $ac_status); } &&
10118 { ac_try='test -s conftest$ac_exeext'
10119 { (eval echo "$as_me:10119: \"$ac_try\"") >&5
10120 (eval $ac_try) 2>&5
10122 echo "$as_me:10122: \$? = $ac_status" >&5
10123 (exit $ac_status); }; }; then
10124 ac_cv_func_connect=yes
10126 echo "$as_me: failed program was:" >&5
10127 cat conftest.$ac_ext >&5
10128 ac_cv_func_connect=no
10130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10132 echo "$as_me:10132: result: $ac_cv_func_connect" >&5
10133 echo "${ECHO_T}$ac_cv_func_connect" >&6
10135 if test $ac_cv_func_connect = no; then
10136 echo "$as_me:10136: checking for connect in -lsocket" >&5
10137 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10138 if test "${ac_cv_lib_socket_connect+set}" = set; then
10139 echo $ECHO_N "(cached) $ECHO_C" >&6
10141 ac_check_lib_save_LIBS=$LIBS
10142 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10143 cat >conftest.$ac_ext <<_ACEOF
10144 #line 10144 "configure"
10145 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error. */
10151 /* We use char because int might match the return type of a gcc2
10152 builtin and then its argument prototype would still apply. */
10162 rm -f conftest.$ac_objext conftest$ac_exeext
10163 if { (eval echo "$as_me:10163: \"$ac_link\"") >&5
10164 (eval $ac_link) 2>&5
10166 echo "$as_me:10166: \$? = $ac_status" >&5
10167 (exit $ac_status); } &&
10168 { ac_try='test -s conftest$ac_exeext'
10169 { (eval echo "$as_me:10169: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10172 echo "$as_me:10172: \$? = $ac_status" >&5
10173 (exit $ac_status); }; }; then
10174 ac_cv_lib_socket_connect=yes
10176 echo "$as_me: failed program was:" >&5
10177 cat conftest.$ac_ext >&5
10178 ac_cv_lib_socket_connect=no
10180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10181 LIBS=$ac_check_lib_save_LIBS
10183 echo "$as_me:10183: result: $ac_cv_lib_socket_connect" >&5
10184 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10185 if test $ac_cv_lib_socket_connect = yes; then
10186 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10191 # Guillermo Gomez says -lposix is necessary on A/UX.
10192 echo "$as_me:10192: checking for remove" >&5
10193 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10194 if test "${ac_cv_func_remove+set}" = set; then
10195 echo $ECHO_N "(cached) $ECHO_C" >&6
10197 cat >conftest.$ac_ext <<_ACEOF
10198 #line 10198 "configure"
10199 #include "confdefs.h"
10200 /* System header to define __stub macros and hopefully few prototypes,
10201 which can conflict with char remove (); below. */
10202 #include <assert.h>
10203 /* Override any gcc2 internal prototype to avoid an error. */
10207 /* We use char because int might match the return type of a gcc2
10208 builtin and then its argument prototype would still apply. */
10215 /* The GNU C library defines this for functions which it implements
10216 to always fail with ENOSYS. Some functions are actually named
10217 something starting with __ and the normal name is an alias. */
10218 #if defined (__stub_remove) || defined (__stub___remove)
10221 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10228 rm -f conftest.$ac_objext conftest$ac_exeext
10229 if { (eval echo "$as_me:10229: \"$ac_link\"") >&5
10230 (eval $ac_link) 2>&5
10232 echo "$as_me:10232: \$? = $ac_status" >&5
10233 (exit $ac_status); } &&
10234 { ac_try='test -s conftest$ac_exeext'
10235 { (eval echo "$as_me:10235: \"$ac_try\"") >&5
10236 (eval $ac_try) 2>&5
10238 echo "$as_me:10238: \$? = $ac_status" >&5
10239 (exit $ac_status); }; }; then
10240 ac_cv_func_remove=yes
10242 echo "$as_me: failed program was:" >&5
10243 cat conftest.$ac_ext >&5
10244 ac_cv_func_remove=no
10246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10248 echo "$as_me:10248: result: $ac_cv_func_remove" >&5
10249 echo "${ECHO_T}$ac_cv_func_remove" >&6
10251 if test $ac_cv_func_remove = no; then
10252 echo "$as_me:10252: checking for remove in -lposix" >&5
10253 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10254 if test "${ac_cv_lib_posix_remove+set}" = set; then
10255 echo $ECHO_N "(cached) $ECHO_C" >&6
10257 ac_check_lib_save_LIBS=$LIBS
10258 LIBS="-lposix $LIBS"
10259 cat >conftest.$ac_ext <<_ACEOF
10260 #line 10260 "configure"
10261 #include "confdefs.h"
10263 /* Override any gcc2 internal prototype to avoid an error. */
10267 /* We use char because int might match the return type of a gcc2
10268 builtin and then its argument prototype would still apply. */
10278 rm -f conftest.$ac_objext conftest$ac_exeext
10279 if { (eval echo "$as_me:10279: \"$ac_link\"") >&5
10280 (eval $ac_link) 2>&5
10282 echo "$as_me:10282: \$? = $ac_status" >&5
10283 (exit $ac_status); } &&
10284 { ac_try='test -s conftest$ac_exeext'
10285 { (eval echo "$as_me:10285: \"$ac_try\"") >&5
10286 (eval $ac_try) 2>&5
10288 echo "$as_me:10288: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_lib_posix_remove=yes
10292 echo "$as_me: failed program was:" >&5
10293 cat conftest.$ac_ext >&5
10294 ac_cv_lib_posix_remove=no
10296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10297 LIBS=$ac_check_lib_save_LIBS
10299 echo "$as_me:10299: result: $ac_cv_lib_posix_remove" >&5
10300 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10301 if test $ac_cv_lib_posix_remove = yes; then
10302 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10307 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10308 echo "$as_me:10308: checking for shmat" >&5
10309 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10310 if test "${ac_cv_func_shmat+set}" = set; then
10311 echo $ECHO_N "(cached) $ECHO_C" >&6
10313 cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316 /* System header to define __stub macros and hopefully few prototypes,
10317 which can conflict with char shmat (); below. */
10318 #include <assert.h>
10319 /* Override any gcc2 internal prototype to avoid an error. */
10323 /* We use char because int might match the return type of a gcc2
10324 builtin and then its argument prototype would still apply. */
10331 /* The GNU C library defines this for functions which it implements
10332 to always fail with ENOSYS. Some functions are actually named
10333 something starting with __ and the normal name is an alias. */
10334 #if defined (__stub_shmat) || defined (__stub___shmat)
10337 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10344 rm -f conftest.$ac_objext conftest$ac_exeext
10345 if { (eval echo "$as_me:10345: \"$ac_link\"") >&5
10346 (eval $ac_link) 2>&5
10348 echo "$as_me:10348: \$? = $ac_status" >&5
10349 (exit $ac_status); } &&
10350 { ac_try='test -s conftest$ac_exeext'
10351 { (eval echo "$as_me:10351: \"$ac_try\"") >&5
10352 (eval $ac_try) 2>&5
10354 echo "$as_me:10354: \$? = $ac_status" >&5
10355 (exit $ac_status); }; }; then
10356 ac_cv_func_shmat=yes
10358 echo "$as_me: failed program was:" >&5
10359 cat conftest.$ac_ext >&5
10360 ac_cv_func_shmat=no
10362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10364 echo "$as_me:10364: result: $ac_cv_func_shmat" >&5
10365 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10367 if test $ac_cv_func_shmat = no; then
10368 echo "$as_me:10368: checking for shmat in -lipc" >&5
10369 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10370 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10373 ac_check_lib_save_LIBS=$LIBS
10375 cat >conftest.$ac_ext <<_ACEOF
10376 #line 10376 "configure"
10377 #include "confdefs.h"
10379 /* Override any gcc2 internal prototype to avoid an error. */
10383 /* We use char because int might match the return type of a gcc2
10384 builtin and then its argument prototype would still apply. */
10394 rm -f conftest.$ac_objext conftest$ac_exeext
10395 if { (eval echo "$as_me:10395: \"$ac_link\"") >&5
10396 (eval $ac_link) 2>&5
10398 echo "$as_me:10398: \$? = $ac_status" >&5
10399 (exit $ac_status); } &&
10400 { ac_try='test -s conftest$ac_exeext'
10401 { (eval echo "$as_me:10401: \"$ac_try\"") >&5
10402 (eval $ac_try) 2>&5
10404 echo "$as_me:10404: \$? = $ac_status" >&5
10405 (exit $ac_status); }; }; then
10406 ac_cv_lib_ipc_shmat=yes
10408 echo "$as_me: failed program was:" >&5
10409 cat conftest.$ac_ext >&5
10410 ac_cv_lib_ipc_shmat=no
10412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10413 LIBS=$ac_check_lib_save_LIBS
10415 echo "$as_me:10415: result: $ac_cv_lib_ipc_shmat" >&5
10416 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10417 if test $ac_cv_lib_ipc_shmat = yes; then
10418 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10424 # Check for libraries that X11R6 Xt/Xaw programs need.
10425 ac_save_LDFLAGS=$LDFLAGS
10426 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10427 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10428 # check for ICE first), but we must link in the order -lSM -lICE or
10429 # we get undefined symbols. So assume we have SM if we have ICE.
10430 # These have to be linked with before -lX11, unlike the other
10431 # libraries we check for below, so use a different variable.
10432 # John Interrante, Karl Berry
10433 echo "$as_me:10433: checking for IceConnectionNumber in -lICE" >&5
10434 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10435 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10436 echo $ECHO_N "(cached) $ECHO_C" >&6
10438 ac_check_lib_save_LIBS=$LIBS
10439 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10440 cat >conftest.$ac_ext <<_ACEOF
10441 #line 10441 "configure"
10442 #include "confdefs.h"
10444 /* Override any gcc2 internal prototype to avoid an error. */
10448 /* We use char because int might match the return type of a gcc2
10449 builtin and then its argument prototype would still apply. */
10450 char IceConnectionNumber ();
10454 IceConnectionNumber ();
10459 rm -f conftest.$ac_objext conftest$ac_exeext
10460 if { (eval echo "$as_me:10460: \"$ac_link\"") >&5
10461 (eval $ac_link) 2>&5
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit $ac_status); } &&
10465 { ac_try='test -s conftest$ac_exeext'
10466 { (eval echo "$as_me:10466: \"$ac_try\"") >&5
10467 (eval $ac_try) 2>&5
10469 echo "$as_me:10469: \$? = $ac_status" >&5
10470 (exit $ac_status); }; }; then
10471 ac_cv_lib_ICE_IceConnectionNumber=yes
10473 echo "$as_me: failed program was:" >&5
10474 cat conftest.$ac_ext >&5
10475 ac_cv_lib_ICE_IceConnectionNumber=no
10477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10478 LIBS=$ac_check_lib_save_LIBS
10480 echo "$as_me:10480: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10481 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10482 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10483 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10486 LDFLAGS=$ac_save_LDFLAGS
10490 cf_x_athena=${cf_x_athena:-Xaw}
10492 echo "$as_me:10492: checking if you want to link with Xaw 3d library" >&5
10493 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10496 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10497 if test "${with_Xaw3d+set}" = set; then
10498 withval="$with_Xaw3d"
10501 if test "$withval" = yes ; then
10503 echo "$as_me:10503: result: yes" >&5
10504 echo "${ECHO_T}yes" >&6
10506 echo "$as_me:10506: result: no" >&5
10507 echo "${ECHO_T}no" >&6
10510 echo "$as_me:10510: checking if you want to link with Xaw 3d xft library" >&5
10511 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10514 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10515 if test "${with_Xaw3dxft+set}" = set; then
10516 withval="$with_Xaw3dxft"
10519 if test "$withval" = yes ; then
10520 cf_x_athena=Xaw3dxft
10521 echo "$as_me:10521: result: yes" >&5
10522 echo "${ECHO_T}yes" >&6
10524 echo "$as_me:10524: result: no" >&5
10525 echo "${ECHO_T}no" >&6
10528 echo "$as_me:10528: checking if you want to link with neXT Athena library" >&5
10529 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10532 # Check whether --with-neXtaw or --without-neXtaw was given.
10533 if test "${with_neXtaw+set}" = set; then
10534 withval="$with_neXtaw"
10537 if test "$withval" = yes ; then
10539 echo "$as_me:10539: result: yes" >&5
10540 echo "${ECHO_T}yes" >&6
10542 echo "$as_me:10542: result: no" >&5
10543 echo "${ECHO_T}no" >&6
10546 echo "$as_me:10546: checking if you want to link with Athena-Plus library" >&5
10547 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10550 # Check whether --with-XawPlus or --without-XawPlus was given.
10551 if test "${with_XawPlus+set}" = set; then
10552 withval="$with_XawPlus"
10555 if test "$withval" = yes ; then
10556 cf_x_athena=XawPlus
10557 echo "$as_me:10557: result: yes" >&5
10558 echo "${ECHO_T}yes" >&6
10560 echo "$as_me:10560: result: no" >&5
10561 echo "${ECHO_T}no" >&6
10566 if test "$PKG_CONFIG" != none ; then
10568 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10569 for cf_athena_pkg in \
10572 ${cf_x_athena}-devel \
10573 lib${cf_x_athena} \
10574 lib${cf_x_athena}-devel
10577 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10578 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10580 echo "${as_me:-configure}:10580: testing found package $cf_athena_pkg ..." 1>&5
10582 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10583 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10584 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10586 echo "${as_me:-configure}:10586: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10588 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10590 echo "${as_me:-configure}:10590: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10595 cf_new_extra_cppflags=
10597 for cf_add_cflags in $cf_pkgconfig_incs
10599 case $cf_fix_cppflags in
10601 case $cf_add_cflags in
10602 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10603 case $cf_add_cflags in
10605 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10607 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10608 && test -z "${cf_tst_cflags}" \
10609 && cf_fix_cppflags=yes
10611 if test $cf_fix_cppflags = yes ; then
10612 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10614 elif test "${cf_tst_cflags}" = "\"'" ; then
10615 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10620 case "$CPPFLAGS" in
10624 case $cf_add_cflags in
10626 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10628 CPPFLAGS=`echo "$CPPFLAGS" | \
10629 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10630 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10634 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10639 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10644 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10646 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10648 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10649 && test -z "${cf_tst_cflags}" \
10650 && cf_fix_cppflags=no
10655 if test -n "$cf_new_cflags" ; then
10657 CFLAGS="$CFLAGS $cf_new_cflags"
10660 if test -n "$cf_new_cppflags" ; then
10662 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10665 if test -n "$cf_new_extra_cppflags" ; then
10667 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10670 cf_add_libs="$cf_pkgconfig_libs"
10671 # Filter out duplicates - this happens with badly-designed ".pc" files...
10672 for cf_add_1lib in $LIBS
10674 for cf_add_2lib in $cf_add_libs
10676 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10682 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10684 LIBS="$cf_add_libs"
10686 cf_x_athena_lib="$cf_pkgconfig_libs"
10688 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10690 cat >>confdefs.h <<EOF
10691 #define $cf_x_athena_LIBS 1
10694 for cf_trim_lib in Xmu Xt X11
10697 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10698 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10699 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10701 echo "${as_me:-configure}:10701: testing ..trimmed $LIBS ..." 1>&5
10707 echo "$as_me:10707: checking for usable $cf_x_athena/Xmu package" >&5
10708 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10709 if test "${cf_cv_xaw_compat+set}" = set; then
10710 echo $ECHO_N "(cached) $ECHO_C" >&6
10713 cat >conftest.$ac_ext <<_ACEOF
10714 #line 10714 "configure"
10715 #include "confdefs.h"
10717 #include <X11/Xmu/CharSet.h>
10723 int check = XmuCompareISOLatin1("big", "small")
10729 rm -f conftest.$ac_objext conftest$ac_exeext
10730 if { (eval echo "$as_me:10730: \"$ac_link\"") >&5
10731 (eval $ac_link) 2>&5
10733 echo "$as_me:10733: \$? = $ac_status" >&5
10734 (exit $ac_status); } &&
10735 { ac_try='test -s conftest$ac_exeext'
10736 { (eval echo "$as_me:10736: \"$ac_try\"") >&5
10737 (eval $ac_try) 2>&5
10739 echo "$as_me:10739: \$? = $ac_status" >&5
10740 (exit $ac_status); }; }; then
10741 cf_cv_xaw_compat=yes
10743 echo "$as_me: failed program was:" >&5
10744 cat conftest.$ac_ext >&5
10745 cf_cv_xaw_compat=no
10747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10749 echo "$as_me:10749: result: $cf_cv_xaw_compat" >&5
10750 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10752 if test "$cf_cv_xaw_compat" = no
10754 # workaround for broken ".pc" files...
10755 case "$cf_x_athena_lib" in
10759 test -n "$verbose" && echo " work around broken package" 1>&6
10761 echo "${as_me:-configure}:10761: testing work around broken package ..." 1>&5
10763 cf_save_xmu="$LIBS"
10764 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10766 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10767 test -n "$verbose" && echo " found package xmu" 1>&6
10769 echo "${as_me:-configure}:10769: testing found package xmu ..." 1>&5
10771 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10772 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10773 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10775 echo "${as_me:-configure}:10775: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10777 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10779 echo "${as_me:-configure}:10779: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10784 cf_new_extra_cppflags=
10786 for cf_add_cflags in $cf_pkgconfig_incs
10788 case $cf_fix_cppflags in
10790 case $cf_add_cflags in
10791 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10792 case $cf_add_cflags in
10794 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10797 && test -z "${cf_tst_cflags}" \
10798 && cf_fix_cppflags=yes
10800 if test $cf_fix_cppflags = yes ; then
10801 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10803 elif test "${cf_tst_cflags}" = "\"'" ; then
10804 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10809 case "$CPPFLAGS" in
10813 case $cf_add_cflags in
10815 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10817 CPPFLAGS=`echo "$CPPFLAGS" | \
10818 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10819 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10823 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10828 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10833 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10835 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10837 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10838 && test -z "${cf_tst_cflags}" \
10839 && cf_fix_cppflags=no
10844 if test -n "$cf_new_cflags" ; then
10846 CFLAGS="$CFLAGS $cf_new_cflags"
10849 if test -n "$cf_new_cppflags" ; then
10851 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10854 if test -n "$cf_new_extra_cppflags" ; then
10856 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10859 cf_add_libs="$cf_pkgconfig_libs"
10860 # Filter out duplicates - this happens with badly-designed ".pc" files...
10861 for cf_add_1lib in $LIBS
10863 for cf_add_2lib in $cf_add_libs
10865 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10871 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10873 LIBS="$cf_add_libs"
10875 LIBS="$cf_save_xmu"
10877 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10879 echo "${as_me:-configure}:10879: testing ...before $LIBS ..." 1>&5
10881 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10882 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10884 echo "${as_me:-configure}:10884: testing ...after $LIBS ..." 1>&5
10890 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10892 echo "${as_me:-configure}:10892: testing ...before $LIBS ..." 1>&5
10894 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10895 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10897 echo "${as_me:-configure}:10897: testing ...after $LIBS ..." 1>&5
10901 for cf_trim_lib in Xmu Xt X11
10904 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10905 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10906 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10908 echo "${as_me:-configure}:10908: testing ..trimmed $LIBS ..." 1>&5
10928 if test -z "$cf_x_athena_lib" ; then
10930 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10931 test -n "$verbose" && echo " found package Xext" 1>&6
10933 echo "${as_me:-configure}:10933: testing found package Xext ..." 1>&5
10935 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10936 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10937 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10939 echo "${as_me:-configure}:10939: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10941 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10943 echo "${as_me:-configure}:10943: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10948 cf_new_extra_cppflags=
10950 for cf_add_cflags in $cf_pkgconfig_incs
10952 case $cf_fix_cppflags in
10954 case $cf_add_cflags in
10955 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10956 case $cf_add_cflags in
10958 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10960 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10961 && test -z "${cf_tst_cflags}" \
10962 && cf_fix_cppflags=yes
10964 if test $cf_fix_cppflags = yes ; then
10965 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10967 elif test "${cf_tst_cflags}" = "\"'" ; then
10968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10973 case "$CPPFLAGS" in
10977 case $cf_add_cflags in
10979 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10981 CPPFLAGS=`echo "$CPPFLAGS" | \
10982 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10983 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10987 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10992 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10997 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10999 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11001 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11002 && test -z "${cf_tst_cflags}" \
11003 && cf_fix_cppflags=no
11008 if test -n "$cf_new_cflags" ; then
11010 CFLAGS="$CFLAGS $cf_new_cflags"
11013 if test -n "$cf_new_cppflags" ; then
11015 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11018 if test -n "$cf_new_extra_cppflags" ; then
11020 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11023 cf_add_libs="$cf_pkgconfig_libs"
11024 # Filter out duplicates - this happens with badly-designed ".pc" files...
11025 for cf_add_1lib in $LIBS
11027 for cf_add_2lib in $cf_add_libs
11029 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11035 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11037 LIBS="$cf_add_libs"
11044 echo "$as_me:11044: checking for XextCreateExtension in -lXext" >&5
11045 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11046 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11047 echo $ECHO_N "(cached) $ECHO_C" >&6
11049 ac_check_lib_save_LIBS=$LIBS
11050 LIBS="-lXext $LIBS"
11051 cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11055 /* Override any gcc2 internal prototype to avoid an error. */
11059 /* We use char because int might match the return type of a gcc2
11060 builtin and then its argument prototype would still apply. */
11061 char XextCreateExtension ();
11065 XextCreateExtension ();
11070 rm -f conftest.$ac_objext conftest$ac_exeext
11071 if { (eval echo "$as_me:11071: \"$ac_link\"") >&5
11072 (eval $ac_link) 2>&5
11074 echo "$as_me:11074: \$? = $ac_status" >&5
11075 (exit $ac_status); } &&
11076 { ac_try='test -s conftest$ac_exeext'
11077 { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11080 echo "$as_me:11080: \$? = $ac_status" >&5
11081 (exit $ac_status); }; }; then
11082 ac_cv_lib_Xext_XextCreateExtension=yes
11084 echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 ac_cv_lib_Xext_XextCreateExtension=no
11088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11089 LIBS=$ac_check_lib_save_LIBS
11091 echo "$as_me:11091: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11092 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11093 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11095 cf_add_libs="-lXext"
11096 # Filter out duplicates - this happens with badly-designed ".pc" files...
11097 for cf_add_1lib in $LIBS
11099 for cf_add_2lib in $cf_add_libs
11101 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11107 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11109 LIBS="$cf_add_libs"
11115 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11116 # in some cases has installed dummy files in the former, other cases replaced
11117 # it with a link to the new location). This complicates the configure script.
11118 # Check for that pitfall, and recover using pkg-config
11120 # If none of these are set, the configuration is almost certainly broken.
11121 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11124 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11125 test -n "$verbose" && echo " found package x11" 1>&6
11127 echo "${as_me:-configure}:11127: testing found package x11 ..." 1>&5
11129 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11130 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11131 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11133 echo "${as_me:-configure}:11133: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11135 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11137 echo "${as_me:-configure}:11137: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11142 cf_new_extra_cppflags=
11144 for cf_add_cflags in $cf_pkgconfig_incs
11146 case $cf_fix_cppflags in
11148 case $cf_add_cflags in
11149 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11150 case $cf_add_cflags in
11152 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11155 && test -z "${cf_tst_cflags}" \
11156 && cf_fix_cppflags=yes
11158 if test $cf_fix_cppflags = yes ; then
11159 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11161 elif test "${cf_tst_cflags}" = "\"'" ; then
11162 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11167 case "$CPPFLAGS" in
11171 case $cf_add_cflags in
11173 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11175 CPPFLAGS=`echo "$CPPFLAGS" | \
11176 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11177 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11181 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11186 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11191 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11193 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11195 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11196 && test -z "${cf_tst_cflags}" \
11197 && cf_fix_cppflags=no
11202 if test -n "$cf_new_cflags" ; then
11204 CFLAGS="$CFLAGS $cf_new_cflags"
11207 if test -n "$cf_new_cppflags" ; then
11209 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11212 if test -n "$cf_new_extra_cppflags" ; then
11214 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11217 cf_add_libs="$cf_pkgconfig_libs"
11218 # Filter out duplicates - this happens with badly-designed ".pc" files...
11219 for cf_add_1lib in $LIBS
11221 for cf_add_2lib in $cf_add_libs
11223 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11229 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11231 LIBS="$cf_add_libs"
11237 { echo "$as_me:11237: WARNING: unable to find X11 library" >&5
11238 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11241 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11242 test -n "$verbose" && echo " found package ice" 1>&6
11244 echo "${as_me:-configure}:11244: testing found package ice ..." 1>&5
11246 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11247 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11248 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11250 echo "${as_me:-configure}:11250: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11252 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11254 echo "${as_me:-configure}:11254: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11259 cf_new_extra_cppflags=
11261 for cf_add_cflags in $cf_pkgconfig_incs
11263 case $cf_fix_cppflags in
11265 case $cf_add_cflags in
11266 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11267 case $cf_add_cflags in
11269 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11271 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11272 && test -z "${cf_tst_cflags}" \
11273 && cf_fix_cppflags=yes
11275 if test $cf_fix_cppflags = yes ; then
11276 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11278 elif test "${cf_tst_cflags}" = "\"'" ; then
11279 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11284 case "$CPPFLAGS" in
11288 case $cf_add_cflags in
11290 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11292 CPPFLAGS=`echo "$CPPFLAGS" | \
11293 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11294 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11298 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11303 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11308 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11310 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11313 && test -z "${cf_tst_cflags}" \
11314 && cf_fix_cppflags=no
11319 if test -n "$cf_new_cflags" ; then
11321 CFLAGS="$CFLAGS $cf_new_cflags"
11324 if test -n "$cf_new_cppflags" ; then
11326 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11329 if test -n "$cf_new_extra_cppflags" ; then
11331 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11334 cf_add_libs="$cf_pkgconfig_libs"
11335 # Filter out duplicates - this happens with badly-designed ".pc" files...
11336 for cf_add_1lib in $LIBS
11338 for cf_add_2lib in $cf_add_libs
11340 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11346 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11348 LIBS="$cf_add_libs"
11354 { echo "$as_me:11354: WARNING: unable to find ICE library" >&5
11355 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11358 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11359 test -n "$verbose" && echo " found package sm" 1>&6
11361 echo "${as_me:-configure}:11361: testing found package sm ..." 1>&5
11363 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11364 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11365 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11367 echo "${as_me:-configure}:11367: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11369 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11371 echo "${as_me:-configure}:11371: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11376 cf_new_extra_cppflags=
11378 for cf_add_cflags in $cf_pkgconfig_incs
11380 case $cf_fix_cppflags in
11382 case $cf_add_cflags in
11383 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11384 case $cf_add_cflags in
11386 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11388 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11389 && test -z "${cf_tst_cflags}" \
11390 && cf_fix_cppflags=yes
11392 if test $cf_fix_cppflags = yes ; then
11393 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11395 elif test "${cf_tst_cflags}" = "\"'" ; then
11396 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11401 case "$CPPFLAGS" in
11405 case $cf_add_cflags in
11407 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11409 CPPFLAGS=`echo "$CPPFLAGS" | \
11410 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11411 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11415 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11420 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11425 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11427 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11429 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11430 && test -z "${cf_tst_cflags}" \
11431 && cf_fix_cppflags=no
11436 if test -n "$cf_new_cflags" ; then
11438 CFLAGS="$CFLAGS $cf_new_cflags"
11441 if test -n "$cf_new_cppflags" ; then
11443 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11446 if test -n "$cf_new_extra_cppflags" ; then
11448 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11451 cf_add_libs="$cf_pkgconfig_libs"
11452 # Filter out duplicates - this happens with badly-designed ".pc" files...
11453 for cf_add_1lib in $LIBS
11455 for cf_add_2lib in $cf_add_libs
11457 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11463 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11465 LIBS="$cf_add_libs"
11471 { echo "$as_me:11471: WARNING: unable to find SM library" >&5
11472 echo "$as_me: WARNING: unable to find SM library" >&2;}
11475 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11476 test -n "$verbose" && echo " found package xt" 1>&6
11478 echo "${as_me:-configure}:11478: testing found package xt ..." 1>&5
11480 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11481 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11482 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11484 echo "${as_me:-configure}:11484: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11486 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11488 echo "${as_me:-configure}:11488: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11493 cf_new_extra_cppflags=
11495 for cf_add_cflags in $cf_pkgconfig_incs
11497 case $cf_fix_cppflags in
11499 case $cf_add_cflags in
11500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11501 case $cf_add_cflags in
11503 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11506 && test -z "${cf_tst_cflags}" \
11507 && cf_fix_cppflags=yes
11509 if test $cf_fix_cppflags = yes ; then
11510 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11512 elif test "${cf_tst_cflags}" = "\"'" ; then
11513 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11518 case "$CPPFLAGS" in
11522 case $cf_add_cflags in
11524 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11526 CPPFLAGS=`echo "$CPPFLAGS" | \
11527 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11528 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11532 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11537 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11542 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11544 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11547 && test -z "${cf_tst_cflags}" \
11548 && cf_fix_cppflags=no
11553 if test -n "$cf_new_cflags" ; then
11555 CFLAGS="$CFLAGS $cf_new_cflags"
11558 if test -n "$cf_new_cppflags" ; then
11560 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11563 if test -n "$cf_new_extra_cppflags" ; then
11565 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11568 cf_add_libs="$cf_pkgconfig_libs"
11569 # Filter out duplicates - this happens with badly-designed ".pc" files...
11570 for cf_add_1lib in $LIBS
11572 for cf_add_2lib in $cf_add_libs
11574 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11580 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11582 LIBS="$cf_add_libs"
11588 { echo "$as_me:11588: WARNING: unable to find Xt library" >&5
11589 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11596 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11597 test -n "$verbose" && echo " found package xt" 1>&6
11599 echo "${as_me:-configure}:11599: testing found package xt ..." 1>&5
11601 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11602 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11603 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11605 echo "${as_me:-configure}:11605: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11607 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11609 echo "${as_me:-configure}:11609: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11614 cf_new_extra_cppflags=
11616 for cf_add_cflags in $cf_pkgconfig_incs
11618 case $cf_fix_cppflags in
11620 case $cf_add_cflags in
11621 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11622 case $cf_add_cflags in
11624 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11626 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11627 && test -z "${cf_tst_cflags}" \
11628 && cf_fix_cppflags=yes
11630 if test $cf_fix_cppflags = yes ; then
11631 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11633 elif test "${cf_tst_cflags}" = "\"'" ; then
11634 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11639 case "$CPPFLAGS" in
11643 case $cf_add_cflags in
11645 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11647 CPPFLAGS=`echo "$CPPFLAGS" | \
11648 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11649 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11653 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11658 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11663 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11665 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11667 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11668 && test -z "${cf_tst_cflags}" \
11669 && cf_fix_cppflags=no
11674 if test -n "$cf_new_cflags" ; then
11676 CFLAGS="$CFLAGS $cf_new_cflags"
11679 if test -n "$cf_new_cppflags" ; then
11681 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11684 if test -n "$cf_new_extra_cppflags" ; then
11686 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11689 cf_add_libs="$cf_pkgconfig_libs"
11690 # Filter out duplicates - this happens with badly-designed ".pc" files...
11691 for cf_add_1lib in $LIBS
11693 for cf_add_2lib in $cf_add_libs
11695 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11701 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11703 LIBS="$cf_add_libs"
11709 # we have an "xt" package, but it may omit Xt's dependency on X11
11710 echo "$as_me:11710: checking for usable X dependency" >&5
11711 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11712 if test "${cf_cv_xt_x11_compat+set}" = set; then
11713 echo $ECHO_N "(cached) $ECHO_C" >&6
11716 cat >conftest.$ac_ext <<_ACEOF
11717 #line 11717 "configure"
11718 #include "confdefs.h"
11720 #include <X11/Xlib.h>
11726 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11727 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11728 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11729 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11735 rm -f conftest.$ac_objext conftest$ac_exeext
11736 if { (eval echo "$as_me:11736: \"$ac_link\"") >&5
11737 (eval $ac_link) 2>&5
11739 echo "$as_me:11739: \$? = $ac_status" >&5
11740 (exit $ac_status); } &&
11741 { ac_try='test -s conftest$ac_exeext'
11742 { (eval echo "$as_me:11742: \"$ac_try\"") >&5
11743 (eval $ac_try) 2>&5
11745 echo "$as_me:11745: \$? = $ac_status" >&5
11746 (exit $ac_status); }; }; then
11747 cf_cv_xt_x11_compat=yes
11749 echo "$as_me: failed program was:" >&5
11750 cat conftest.$ac_ext >&5
11751 cf_cv_xt_x11_compat=no
11753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11755 echo "$as_me:11755: result: $cf_cv_xt_x11_compat" >&5
11756 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11757 if test "$cf_cv_xt_x11_compat" = no
11759 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11761 echo "${as_me:-configure}:11761: testing work around broken X11 dependency ..." 1>&5
11763 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11765 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11766 test -n "$verbose" && echo " found package x11" 1>&6
11768 echo "${as_me:-configure}:11768: testing found package x11 ..." 1>&5
11770 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11771 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11772 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11774 echo "${as_me:-configure}:11774: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11776 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11778 echo "${as_me:-configure}:11778: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11783 cf_new_extra_cppflags=
11785 for cf_add_cflags in $cf_pkgconfig_incs
11787 case $cf_fix_cppflags in
11789 case $cf_add_cflags in
11790 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11791 case $cf_add_cflags in
11793 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11795 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11796 && test -z "${cf_tst_cflags}" \
11797 && cf_fix_cppflags=yes
11799 if test $cf_fix_cppflags = yes ; then
11800 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11802 elif test "${cf_tst_cflags}" = "\"'" ; then
11803 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11808 case "$CPPFLAGS" in
11812 case $cf_add_cflags in
11814 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11816 CPPFLAGS=`echo "$CPPFLAGS" | \
11817 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11818 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11822 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11827 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11832 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11834 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11836 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11837 && test -z "${cf_tst_cflags}" \
11838 && cf_fix_cppflags=no
11843 if test -n "$cf_new_cflags" ; then
11845 CFLAGS="$CFLAGS $cf_new_cflags"
11848 if test -n "$cf_new_cppflags" ; then
11850 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11853 if test -n "$cf_new_extra_cppflags" ; then
11855 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11858 cf_add_libs="$cf_pkgconfig_libs"
11859 # Filter out duplicates - this happens with badly-designed ".pc" files...
11860 for cf_add_1lib in $LIBS
11862 for cf_add_2lib in $cf_add_libs
11864 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11872 LIBS="$cf_add_libs"
11879 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11881 echo "${as_me:-configure}:11881: testing ...before $LIBS ..." 1>&5
11883 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11884 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11886 echo "${as_me:-configure}:11886: testing ...after $LIBS ..." 1>&5
11894 echo "$as_me:11894: checking for usable X Toolkit package" >&5
11895 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11896 if test "${cf_cv_xt_ice_compat+set}" = set; then
11897 echo $ECHO_N "(cached) $ECHO_C" >&6
11900 cat >conftest.$ac_ext <<_ACEOF
11901 #line 11901 "configure"
11902 #include "confdefs.h"
11904 #include <X11/Shell.h>
11909 int num = IceConnectionNumber(0)
11915 rm -f conftest.$ac_objext conftest$ac_exeext
11916 if { (eval echo "$as_me:11916: \"$ac_link\"") >&5
11917 (eval $ac_link) 2>&5
11919 echo "$as_me:11919: \$? = $ac_status" >&5
11920 (exit $ac_status); } &&
11921 { ac_try='test -s conftest$ac_exeext'
11922 { (eval echo "$as_me:11922: \"$ac_try\"") >&5
11923 (eval $ac_try) 2>&5
11925 echo "$as_me:11925: \$? = $ac_status" >&5
11926 (exit $ac_status); }; }; then
11927 cf_cv_xt_ice_compat=yes
11929 echo "$as_me: failed program was:" >&5
11930 cat conftest.$ac_ext >&5
11931 cf_cv_xt_ice_compat=no
11933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11935 echo "$as_me:11935: result: $cf_cv_xt_ice_compat" >&5
11936 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11938 if test "$cf_cv_xt_ice_compat" = no
11940 # workaround for broken ".pc" files used for X Toolkit.
11941 case "x$X_PRE_LIBS" in
11947 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11949 echo "${as_me:-configure}:11949: testing work around broken ICE dependency ..." 1>&5
11951 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11952 test -n "$verbose" && echo " found package ice" 1>&6
11954 echo "${as_me:-configure}:11954: testing found package ice ..." 1>&5
11956 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11957 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11958 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11960 echo "${as_me:-configure}:11960: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11962 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11964 echo "${as_me:-configure}:11964: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11969 cf_new_extra_cppflags=
11971 for cf_add_cflags in $cf_pkgconfig_incs
11973 case $cf_fix_cppflags in
11975 case $cf_add_cflags in
11976 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11977 case $cf_add_cflags in
11979 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11981 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11982 && test -z "${cf_tst_cflags}" \
11983 && cf_fix_cppflags=yes
11985 if test $cf_fix_cppflags = yes ; then
11986 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11988 elif test "${cf_tst_cflags}" = "\"'" ; then
11989 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11994 case "$CPPFLAGS" in
11998 case $cf_add_cflags in
12000 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12002 CPPFLAGS=`echo "$CPPFLAGS" | \
12003 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12004 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12008 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12013 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12018 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12020 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12022 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12023 && test -z "${cf_tst_cflags}" \
12024 && cf_fix_cppflags=no
12029 if test -n "$cf_new_cflags" ; then
12031 CFLAGS="$CFLAGS $cf_new_cflags"
12034 if test -n "$cf_new_cppflags" ; then
12036 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12039 if test -n "$cf_new_extra_cppflags" ; then
12041 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12044 cf_add_libs="$cf_pkgconfig_libs"
12045 # Filter out duplicates - this happens with badly-designed ".pc" files...
12046 for cf_add_1lib in $LIBS
12048 for cf_add_2lib in $cf_add_libs
12050 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12056 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12058 LIBS="$cf_add_libs"
12060 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12061 test -n "$verbose" && echo " found package sm" 1>&6
12063 echo "${as_me:-configure}:12063: testing found package sm ..." 1>&5
12065 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12066 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12067 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12069 echo "${as_me:-configure}:12069: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12071 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12073 echo "${as_me:-configure}:12073: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12078 cf_new_extra_cppflags=
12080 for cf_add_cflags in $cf_pkgconfig_incs
12082 case $cf_fix_cppflags in
12084 case $cf_add_cflags in
12085 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12086 case $cf_add_cflags in
12088 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12091 && test -z "${cf_tst_cflags}" \
12092 && cf_fix_cppflags=yes
12094 if test $cf_fix_cppflags = yes ; then
12095 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12097 elif test "${cf_tst_cflags}" = "\"'" ; then
12098 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12103 case "$CPPFLAGS" in
12107 case $cf_add_cflags in
12109 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12111 CPPFLAGS=`echo "$CPPFLAGS" | \
12112 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12113 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12117 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12122 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12127 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12129 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12131 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12132 && test -z "${cf_tst_cflags}" \
12133 && cf_fix_cppflags=no
12138 if test -n "$cf_new_cflags" ; then
12140 CFLAGS="$CFLAGS $cf_new_cflags"
12143 if test -n "$cf_new_cppflags" ; then
12145 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12148 if test -n "$cf_new_extra_cppflags" ; then
12150 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12153 cf_add_libs="$cf_pkgconfig_libs"
12154 # Filter out duplicates - this happens with badly-designed ".pc" files...
12155 for cf_add_1lib in $LIBS
12157 for cf_add_2lib in $cf_add_libs
12159 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12165 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12167 LIBS="$cf_add_libs"
12180 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12182 echo "${as_me:-configure}:12182: testing ...before $LIBS ..." 1>&5
12184 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12185 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12187 echo "${as_me:-configure}:12187: testing ...after $LIBS ..." 1>&5
12203 LDFLAGS="$X_LIBS $LDFLAGS"
12205 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12207 echo "${as_me:-configure}:12207: testing checking additions to CFLAGS ..." 1>&5
12209 cf_check_cflags="$CFLAGS"
12210 cf_check_cppflags="$CPPFLAGS"
12215 cf_new_extra_cppflags=
12217 for cf_add_cflags in $X_CFLAGS
12219 case $cf_fix_cppflags in
12221 case $cf_add_cflags in
12222 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12223 case $cf_add_cflags in
12225 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12228 && test -z "${cf_tst_cflags}" \
12229 && cf_fix_cppflags=yes
12231 if test $cf_fix_cppflags = yes ; then
12232 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12234 elif test "${cf_tst_cflags}" = "\"'" ; then
12235 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12240 case "$CPPFLAGS" in
12244 case $cf_add_cflags in
12246 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12248 CPPFLAGS=`echo "$CPPFLAGS" | \
12249 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12250 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12254 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12259 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12264 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12266 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12268 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12269 && test -z "${cf_tst_cflags}" \
12270 && cf_fix_cppflags=no
12275 if test -n "$cf_new_cflags" ; then
12276 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12278 echo "${as_me:-configure}:12278: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12280 CFLAGS="$CFLAGS $cf_new_cflags"
12283 if test -n "$cf_new_cppflags" ; then
12284 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12286 echo "${as_me:-configure}:12286: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12288 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12291 if test -n "$cf_new_extra_cppflags" ; then
12292 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12294 echo "${as_me:-configure}:12294: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12296 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12299 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12300 cat >conftest.$ac_ext <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12307 printf("Hello world");
12312 rm -f conftest.$ac_objext conftest$ac_exeext
12313 if { (eval echo "$as_me:12313: \"$ac_link\"") >&5
12314 (eval $ac_link) 2>&5
12316 echo "$as_me:12316: \$? = $ac_status" >&5
12317 (exit $ac_status); } &&
12318 { ac_try='test -s conftest$ac_exeext'
12319 { (eval echo "$as_me:12319: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12322 echo "$as_me:12322: \$? = $ac_status" >&5
12323 (exit $ac_status); }; }; then
12326 echo "$as_me: failed program was:" >&5
12327 cat conftest.$ac_ext >&5
12328 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12330 echo "${as_me:-configure}:12330: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12332 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12333 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12335 echo "${as_me:-configure}:12335: testing but keeping change to \$CPPFLAGS ..." 1>&5
12338 CFLAGS="$cf_check_flags"
12340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12343 echo "$as_me:12343: checking for XOpenDisplay" >&5
12344 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12345 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12346 echo $ECHO_N "(cached) $ECHO_C" >&6
12348 cat >conftest.$ac_ext <<_ACEOF
12349 #line 12349 "configure"
12350 #include "confdefs.h"
12351 /* System header to define __stub macros and hopefully few prototypes,
12352 which can conflict with char XOpenDisplay (); below. */
12353 #include <assert.h>
12354 /* Override any gcc2 internal prototype to avoid an error. */
12358 /* We use char because int might match the return type of a gcc2
12359 builtin and then its argument prototype would still apply. */
12360 char XOpenDisplay ();
12366 /* The GNU C library defines this for functions which it implements
12367 to always fail with ENOSYS. Some functions are actually named
12368 something starting with __ and the normal name is an alias. */
12369 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12372 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12379 rm -f conftest.$ac_objext conftest$ac_exeext
12380 if { (eval echo "$as_me:12380: \"$ac_link\"") >&5
12381 (eval $ac_link) 2>&5
12383 echo "$as_me:12383: \$? = $ac_status" >&5
12384 (exit $ac_status); } &&
12385 { ac_try='test -s conftest$ac_exeext'
12386 { (eval echo "$as_me:12386: \"$ac_try\"") >&5
12387 (eval $ac_try) 2>&5
12389 echo "$as_me:12389: \$? = $ac_status" >&5
12390 (exit $ac_status); }; }; then
12391 ac_cv_func_XOpenDisplay=yes
12393 echo "$as_me: failed program was:" >&5
12394 cat conftest.$ac_ext >&5
12395 ac_cv_func_XOpenDisplay=no
12397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12399 echo "$as_me:12399: result: $ac_cv_func_XOpenDisplay" >&5
12400 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12401 if test $ac_cv_func_XOpenDisplay = yes; then
12405 echo "$as_me:12405: checking for XOpenDisplay in -lX11" >&5
12406 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12407 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12408 echo $ECHO_N "(cached) $ECHO_C" >&6
12410 ac_check_lib_save_LIBS=$LIBS
12411 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12412 cat >conftest.$ac_ext <<_ACEOF
12413 #line 12413 "configure"
12414 #include "confdefs.h"
12416 /* Override any gcc2 internal prototype to avoid an error. */
12420 /* We use char because int might match the return type of a gcc2
12421 builtin and then its argument prototype would still apply. */
12422 char XOpenDisplay ();
12431 rm -f conftest.$ac_objext conftest$ac_exeext
12432 if { (eval echo "$as_me:12432: \"$ac_link\"") >&5
12433 (eval $ac_link) 2>&5
12435 echo "$as_me:12435: \$? = $ac_status" >&5
12436 (exit $ac_status); } &&
12437 { ac_try='test -s conftest$ac_exeext'
12438 { (eval echo "$as_me:12438: \"$ac_try\"") >&5
12439 (eval $ac_try) 2>&5
12441 echo "$as_me:12441: \$? = $ac_status" >&5
12442 (exit $ac_status); }; }; then
12443 ac_cv_lib_X11_XOpenDisplay=yes
12445 echo "$as_me: failed program was:" >&5
12446 cat conftest.$ac_ext >&5
12447 ac_cv_lib_X11_XOpenDisplay=no
12449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12450 LIBS=$ac_check_lib_save_LIBS
12452 echo "$as_me:12452: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12453 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12454 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12456 cf_add_libs="-lX11"
12457 # Filter out duplicates - this happens with badly-designed ".pc" files...
12458 for cf_add_1lib in $LIBS
12460 for cf_add_2lib in $cf_add_libs
12462 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12468 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12470 LIBS="$cf_add_libs"
12476 echo "$as_me:12476: checking for XtAppInitialize" >&5
12477 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12478 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12479 echo $ECHO_N "(cached) $ECHO_C" >&6
12481 cat >conftest.$ac_ext <<_ACEOF
12482 #line 12482 "configure"
12483 #include "confdefs.h"
12484 /* System header to define __stub macros and hopefully few prototypes,
12485 which can conflict with char XtAppInitialize (); below. */
12486 #include <assert.h>
12487 /* Override any gcc2 internal prototype to avoid an error. */
12491 /* We use char because int might match the return type of a gcc2
12492 builtin and then its argument prototype would still apply. */
12493 char XtAppInitialize ();
12499 /* The GNU C library defines this for functions which it implements
12500 to always fail with ENOSYS. Some functions are actually named
12501 something starting with __ and the normal name is an alias. */
12502 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12505 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12512 rm -f conftest.$ac_objext conftest$ac_exeext
12513 if { (eval echo "$as_me:12513: \"$ac_link\"") >&5
12514 (eval $ac_link) 2>&5
12516 echo "$as_me:12516: \$? = $ac_status" >&5
12517 (exit $ac_status); } &&
12518 { ac_try='test -s conftest$ac_exeext'
12519 { (eval echo "$as_me:12519: \"$ac_try\"") >&5
12520 (eval $ac_try) 2>&5
12522 echo "$as_me:12522: \$? = $ac_status" >&5
12523 (exit $ac_status); }; }; then
12524 ac_cv_func_XtAppInitialize=yes
12526 echo "$as_me: failed program was:" >&5
12527 cat conftest.$ac_ext >&5
12528 ac_cv_func_XtAppInitialize=no
12530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12532 echo "$as_me:12532: result: $ac_cv_func_XtAppInitialize" >&5
12533 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12534 if test $ac_cv_func_XtAppInitialize = yes; then
12538 echo "$as_me:12538: checking for XtAppInitialize in -lXt" >&5
12539 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12540 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12541 echo $ECHO_N "(cached) $ECHO_C" >&6
12543 ac_check_lib_save_LIBS=$LIBS
12544 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12545 cat >conftest.$ac_ext <<_ACEOF
12546 #line 12546 "configure"
12547 #include "confdefs.h"
12549 /* Override any gcc2 internal prototype to avoid an error. */
12553 /* We use char because int might match the return type of a gcc2
12554 builtin and then its argument prototype would still apply. */
12555 char XtAppInitialize ();
12559 XtAppInitialize ();
12564 rm -f conftest.$ac_objext conftest$ac_exeext
12565 if { (eval echo "$as_me:12565: \"$ac_link\"") >&5
12566 (eval $ac_link) 2>&5
12568 echo "$as_me:12568: \$? = $ac_status" >&5
12569 (exit $ac_status); } &&
12570 { ac_try='test -s conftest$ac_exeext'
12571 { (eval echo "$as_me:12571: \"$ac_try\"") >&5
12572 (eval $ac_try) 2>&5
12574 echo "$as_me:12574: \$? = $ac_status" >&5
12575 (exit $ac_status); }; }; then
12576 ac_cv_lib_Xt_XtAppInitialize=yes
12578 echo "$as_me: failed program was:" >&5
12579 cat conftest.$ac_ext >&5
12580 ac_cv_lib_Xt_XtAppInitialize=no
12582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12583 LIBS=$ac_check_lib_save_LIBS
12585 echo "$as_me:12585: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12586 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12587 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12589 cat >>confdefs.h <<\EOF
12590 #define HAVE_LIBXT 1
12594 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12601 if test $cf_have_X_LIBS = no ; then
12602 { echo "$as_me:12602: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12603 test program. You will have to check and add the proper libraries by hand
12605 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12606 test program. You will have to check and add the proper libraries by hand
12607 to makefile." >&2;}
12610 cf_x_athena_root=$cf_x_athena
12613 for cf_path in default \
12614 /usr/contrib/X11R6 \
12615 /usr/contrib/X11R5 \
12619 if test -z "$cf_x_athena_inc" ; then
12620 cf_save="$CPPFLAGS"
12621 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12622 if test $cf_path != default ; then
12623 CPPFLAGS="$cf_save -I$cf_path/include"
12624 echo "$as_me:12624: checking for $cf_test in $cf_path" >&5
12625 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12627 echo "$as_me:12627: checking for $cf_test" >&5
12628 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12630 cat >conftest.$ac_ext <<_ACEOF
12631 #line 12631 "configure"
12632 #include "confdefs.h"
12634 #include <X11/Intrinsic.h>
12635 #include <$cf_test>
12644 rm -f conftest.$ac_objext
12645 if { (eval echo "$as_me:12645: \"$ac_compile\"") >&5
12646 (eval $ac_compile) 2>&5
12648 echo "$as_me:12648: \$? = $ac_status" >&5
12649 (exit $ac_status); } &&
12650 { ac_try='test -s conftest.$ac_objext'
12651 { (eval echo "$as_me:12651: \"$ac_try\"") >&5
12652 (eval $ac_try) 2>&5
12654 echo "$as_me:12654: \$? = $ac_status" >&5
12655 (exit $ac_status); }; }; then
12658 echo "$as_me: failed program was:" >&5
12659 cat conftest.$ac_ext >&5
12662 rm -f conftest.$ac_objext conftest.$ac_ext
12663 echo "$as_me:12663: result: $cf_result" >&5
12664 echo "${ECHO_T}$cf_result" >&6
12665 if test "$cf_result" = yes ; then
12666 cf_x_athena_inc=$cf_path
12669 CPPFLAGS="$cf_save"
12674 if test -z "$cf_x_athena_inc" ; then
12675 { echo "$as_me:12675: WARNING: Unable to successfully find Athena header files with test program" >&5
12676 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12677 elif test "$cf_x_athena_inc" != default ; then
12678 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12681 cf_x_athena_root=$cf_x_athena
12684 for cf_path in default \
12685 /usr/contrib/X11R6 \
12686 /usr/contrib/X11R5 \
12691 ${cf_x_athena_root} \
12692 ${cf_x_athena_root}7 \
12693 ${cf_x_athena_root}6
12696 "-l$cf_lib -lXmu" \
12697 "-l$cf_lib -lXpm -lXmu" \
12698 "-l${cf_lib}_s -lXmu_s"
12700 if test -z "$cf_x_athena_lib" ; then
12702 cf_test=XawSimpleMenuAddGlobalActions
12703 if test $cf_path != default ; then
12705 cf_add_libs="-L$cf_path/lib $cf_libs"
12706 # Filter out duplicates - this happens with badly-designed ".pc" files...
12707 for cf_add_1lib in $LIBS
12709 for cf_add_2lib in $cf_add_libs
12711 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12717 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12719 LIBS="$cf_add_libs"
12721 echo "$as_me:12721: checking for $cf_libs in $cf_path" >&5
12722 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12725 cf_add_libs="$cf_libs"
12726 # Filter out duplicates - this happens with badly-designed ".pc" files...
12727 for cf_add_1lib in $LIBS
12729 for cf_add_2lib in $cf_add_libs
12731 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12737 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12739 LIBS="$cf_add_libs"
12741 echo "$as_me:12741: checking for $cf_test in $cf_libs" >&5
12742 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12744 cat >conftest.$ac_ext <<_ACEOF
12745 #line 12745 "configure"
12746 #include "confdefs.h"
12748 #include <X11/Intrinsic.h>
12749 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12755 $cf_test((XtAppContext) 0)
12760 rm -f conftest.$ac_objext conftest$ac_exeext
12761 if { (eval echo "$as_me:12761: \"$ac_link\"") >&5
12762 (eval $ac_link) 2>&5
12764 echo "$as_me:12764: \$? = $ac_status" >&5
12765 (exit $ac_status); } &&
12766 { ac_try='test -s conftest$ac_exeext'
12767 { (eval echo "$as_me:12767: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12770 echo "$as_me:12770: \$? = $ac_status" >&5
12771 (exit $ac_status); }; }; then
12774 echo "$as_me: failed program was:" >&5
12775 cat conftest.$ac_ext >&5
12778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12779 echo "$as_me:12779: result: $cf_result" >&5
12780 echo "${ECHO_T}$cf_result" >&6
12781 if test "$cf_result" = yes ; then
12782 cf_x_athena_lib="$cf_libs"
12788 test -n "$cf_x_athena_lib" && break
12792 if test -z "$cf_x_athena_lib" ; then
12793 { { echo "$as_me:12793: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12794 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12795 { (exit 1); exit 1; }; }
12798 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12800 cat >>confdefs.h <<EOF
12801 #define $cf_x_athena_LIBS 1
12806 if test -n "$ac_tool_prefix"; then
12807 for ac_prog in xcurses-config
12809 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12810 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12811 echo "$as_me:12811: checking for $ac_word" >&5
12812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12813 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12814 echo $ECHO_N "(cached) $ECHO_C" >&6
12816 if test -n "$XCURSES_CONFIG"; then
12817 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12819 ac_save_IFS=$IFS; IFS=$ac_path_separator
12821 for ac_dir in $ac_dummy; do
12823 test -z "$ac_dir" && ac_dir=.
12824 $as_executable_p "$ac_dir/$ac_word" || continue
12825 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12826 echo "$as_me:12826: found $ac_dir/$ac_word" >&5
12832 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12833 if test -n "$XCURSES_CONFIG"; then
12834 echo "$as_me:12834: result: $XCURSES_CONFIG" >&5
12835 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12837 echo "$as_me:12837: result: no" >&5
12838 echo "${ECHO_T}no" >&6
12841 test -n "$XCURSES_CONFIG" && break
12844 if test -z "$XCURSES_CONFIG"; then
12845 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12846 for ac_prog in xcurses-config
12848 # Extract the first word of "$ac_prog", so it can be a program name with args.
12849 set dummy $ac_prog; ac_word=$2
12850 echo "$as_me:12850: checking for $ac_word" >&5
12851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12852 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12853 echo $ECHO_N "(cached) $ECHO_C" >&6
12855 if test -n "$ac_ct_XCURSES_CONFIG"; then
12856 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12858 ac_save_IFS=$IFS; IFS=$ac_path_separator
12860 for ac_dir in $ac_dummy; do
12862 test -z "$ac_dir" && ac_dir=.
12863 $as_executable_p "$ac_dir/$ac_word" || continue
12864 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12865 echo "$as_me:12865: found $ac_dir/$ac_word" >&5
12871 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12872 if test -n "$ac_ct_XCURSES_CONFIG"; then
12873 echo "$as_me:12873: result: $ac_ct_XCURSES_CONFIG" >&5
12874 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12876 echo "$as_me:12876: result: no" >&5
12877 echo "${ECHO_T}no" >&6
12880 test -n "$ac_ct_XCURSES_CONFIG" && break
12882 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12884 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12887 if test "$XCURSES_CONFIG" != none ; then
12889 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12891 cf_add_libs="`$XCURSES_CONFIG --libs`"
12892 # Filter out duplicates - this happens with badly-designed ".pc" files...
12893 for cf_add_1lib in $LIBS
12895 for cf_add_2lib in $cf_add_libs
12897 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12905 LIBS="$cf_add_libs"
12907 cf_cv_lib_XCurses=yes
12911 LDFLAGS="$LDFLAGS $X_LIBS"
12913 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12915 echo "${as_me:-configure}:12915: testing checking additions to CFLAGS ..." 1>&5
12917 cf_check_cflags="$CFLAGS"
12918 cf_check_cppflags="$CPPFLAGS"
12923 cf_new_extra_cppflags=
12925 for cf_add_cflags in $X_CFLAGS
12927 case $cf_fix_cppflags in
12929 case $cf_add_cflags in
12930 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12931 case $cf_add_cflags in
12933 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12935 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12936 && test -z "${cf_tst_cflags}" \
12937 && cf_fix_cppflags=yes
12939 if test $cf_fix_cppflags = yes ; then
12940 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12942 elif test "${cf_tst_cflags}" = "\"'" ; then
12943 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12948 case "$CPPFLAGS" in
12952 case $cf_add_cflags in
12954 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12956 CPPFLAGS=`echo "$CPPFLAGS" | \
12957 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12958 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12962 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12967 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12972 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12974 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12976 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12977 && test -z "${cf_tst_cflags}" \
12978 && cf_fix_cppflags=no
12983 if test -n "$cf_new_cflags" ; then
12984 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12986 echo "${as_me:-configure}:12986: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12988 CFLAGS="$CFLAGS $cf_new_cflags"
12991 if test -n "$cf_new_cppflags" ; then
12992 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12994 echo "${as_me:-configure}:12994: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12996 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12999 if test -n "$cf_new_extra_cppflags" ; then
13000 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13002 echo "${as_me:-configure}:13002: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13004 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13007 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13008 cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13015 printf("Hello world");
13020 rm -f conftest.$ac_objext conftest$ac_exeext
13021 if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
13022 (eval $ac_link) 2>&5
13024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit $ac_status); } &&
13026 { ac_try='test -s conftest$ac_exeext'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028 (eval $ac_try) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit $ac_status); }; }; then
13034 echo "$as_me: failed program was:" >&5
13035 cat conftest.$ac_ext >&5
13036 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13038 echo "${as_me:-configure}:13038: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13040 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13041 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13043 echo "${as_me:-configure}:13043: testing but keeping change to \$CPPFLAGS ..." 1>&5
13046 CFLAGS="$cf_check_flags"
13048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13051 echo "$as_me:13051: checking for XOpenDisplay in -lX11" >&5
13052 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13053 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13054 echo $ECHO_N "(cached) $ECHO_C" >&6
13056 ac_check_lib_save_LIBS=$LIBS
13057 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13058 cat >conftest.$ac_ext <<_ACEOF
13059 #line 13059 "configure"
13060 #include "confdefs.h"
13062 /* Override any gcc2 internal prototype to avoid an error. */
13066 /* We use char because int might match the return type of a gcc2
13067 builtin and then its argument prototype would still apply. */
13068 char XOpenDisplay ();
13077 rm -f conftest.$ac_objext conftest$ac_exeext
13078 if { (eval echo "$as_me:13078: \"$ac_link\"") >&5
13079 (eval $ac_link) 2>&5
13081 echo "$as_me:13081: \$? = $ac_status" >&5
13082 (exit $ac_status); } &&
13083 { ac_try='test -s conftest$ac_exeext'
13084 { (eval echo "$as_me:13084: \"$ac_try\"") >&5
13085 (eval $ac_try) 2>&5
13087 echo "$as_me:13087: \$? = $ac_status" >&5
13088 (exit $ac_status); }; }; then
13089 ac_cv_lib_X11_XOpenDisplay=yes
13091 echo "$as_me: failed program was:" >&5
13092 cat conftest.$ac_ext >&5
13093 ac_cv_lib_X11_XOpenDisplay=no
13095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13096 LIBS=$ac_check_lib_save_LIBS
13098 echo "$as_me:13098: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13099 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13100 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13102 cf_add_libs="-lX11"
13103 # Filter out duplicates - this happens with badly-designed ".pc" files...
13104 for cf_add_1lib in $LIBS
13106 for cf_add_2lib in $cf_add_libs
13108 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13114 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13116 LIBS="$cf_add_libs"
13120 echo "$as_me:13120: checking for XCurses library" >&5
13121 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13122 if test "${cf_cv_lib_XCurses+set}" = set; then
13123 echo $ECHO_N "(cached) $ECHO_C" >&6
13126 cf_add_libs="-lXCurses"
13127 # Filter out duplicates - this happens with badly-designed ".pc" files...
13128 for cf_add_1lib in $LIBS
13130 for cf_add_2lib in $cf_add_libs
13132 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13138 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13140 LIBS="$cf_add_libs"
13142 cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13146 #include <xcurses.h>
13147 char *XCursesProgramName = "test";
13157 rm -f conftest.$ac_objext conftest$ac_exeext
13158 if { (eval echo "$as_me:13158: \"$ac_link\"") >&5
13159 (eval $ac_link) 2>&5
13161 echo "$as_me:13161: \$? = $ac_status" >&5
13162 (exit $ac_status); } &&
13163 { ac_try='test -s conftest$ac_exeext'
13164 { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165 (eval $ac_try) 2>&5
13167 echo "$as_me:13167: \$? = $ac_status" >&5
13168 (exit $ac_status); }; }; then
13169 cf_cv_lib_XCurses=yes
13171 echo "$as_me: failed program was:" >&5
13172 cat conftest.$ac_ext >&5
13173 cf_cv_lib_XCurses=no
13175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13178 echo "$as_me:13178: result: $cf_cv_lib_XCurses" >&5
13179 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13183 if test $cf_cv_lib_XCurses = yes ; then
13185 cat >>confdefs.h <<\EOF
13189 cat >>confdefs.h <<\EOF
13193 echo "$as_me:13193: checking for xcurses.h" >&5
13194 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13195 if test "${ac_cv_header_xcurses_h+set}" = set; then
13196 echo $ECHO_N "(cached) $ECHO_C" >&6
13198 cat >conftest.$ac_ext <<_ACEOF
13199 #line 13199 "configure"
13200 #include "confdefs.h"
13201 #include <xcurses.h>
13203 if { (eval echo "$as_me:13203: \"$ac_cpp conftest.$ac_ext\"") >&5
13204 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13206 egrep -v '^ *\+' conftest.er1 >conftest.err
13208 cat conftest.err >&5
13209 echo "$as_me:13209: \$? = $ac_status" >&5
13210 (exit $ac_status); } >/dev/null; then
13211 if test -s conftest.err; then
13212 ac_cpp_err=$ac_c_preproc_warn_flag
13219 if test -z "$ac_cpp_err"; then
13220 ac_cv_header_xcurses_h=yes
13222 echo "$as_me: failed program was:" >&5
13223 cat conftest.$ac_ext >&5
13224 ac_cv_header_xcurses_h=no
13226 rm -f conftest.err conftest.$ac_ext
13228 echo "$as_me:13228: result: $ac_cv_header_xcurses_h" >&5
13229 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13230 if test $ac_cv_header_xcurses_h = yes; then
13232 cat >>confdefs.h <<\EOF
13233 #define HAVE_XCURSES 1
13239 { { echo "$as_me:13239: error: Cannot link with XCurses" >&5
13240 echo "$as_me: error: Cannot link with XCurses" >&2;}
13241 { (exit 1); exit 1; }; }
13246 { { echo "$as_me:13246: error: unexpected screen-value: $cf_cv_screen" >&5
13247 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13248 { (exit 1); exit 1; }; }
13252 : ${cf_nculib_root:=$cf_cv_screen}
13253 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13254 echo "$as_me:13254: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13255 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13256 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13257 echo $ECHO_N "(cached) $ECHO_C" >&6
13259 ac_check_lib_save_LIBS=$LIBS
13260 LIBS="-l$cf_nculib_root $LIBS"
13261 cat >conftest.$ac_ext <<_ACEOF
13262 #line 13262 "configure"
13263 #include "confdefs.h"
13265 /* Override any gcc2 internal prototype to avoid an error. */
13269 /* We use char because int might match the return type of a gcc2
13270 builtin and then its argument prototype would still apply. */
13271 char _nc_init_pthreads ();
13275 _nc_init_pthreads ();
13280 rm -f conftest.$ac_objext conftest$ac_exeext
13281 if { (eval echo "$as_me:13281: \"$ac_link\"") >&5
13282 (eval $ac_link) 2>&5
13284 echo "$as_me:13284: \$? = $ac_status" >&5
13285 (exit $ac_status); } &&
13286 { ac_try='test -s conftest$ac_exeext'
13287 { (eval echo "$as_me:13287: \"$ac_try\"") >&5
13288 (eval $ac_try) 2>&5
13290 echo "$as_me:13290: \$? = $ac_status" >&5
13291 (exit $ac_status); }; }; then
13292 eval "$as_ac_Lib=yes"
13294 echo "$as_me: failed program was:" >&5
13295 cat conftest.$ac_ext >&5
13296 eval "$as_ac_Lib=no"
13298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13299 LIBS=$ac_check_lib_save_LIBS
13301 echo "$as_me:13301: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13302 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13303 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13304 cf_cv_ncurses_pthreads=yes
13306 cf_cv_ncurses_pthreads=no
13309 if test "$cf_cv_ncurses_pthreads" = yes
13312 cf_add_libs="-lpthread"
13313 # Filter out duplicates - this happens with badly-designed ".pc" files...
13314 for cf_add_1lib in $LIBS
13316 for cf_add_2lib in $cf_add_libs
13318 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13324 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13326 LIBS="$cf_add_libs"
13330 case $cf_cv_screen in
13332 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13336 echo "$as_me:13336: checking for NetBSD form.h" >&5
13337 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13338 if test "${cf_cv_netbsd_form_h+set}" = set; then
13339 echo $ECHO_N "(cached) $ECHO_C" >&6
13342 cat >conftest.$ac_ext <<_ACEOF
13343 #line 13343 "configure"
13344 #include "confdefs.h"
13346 #include <${cf_cv_ncurses_header:-curses.h}>
13354 int y = current_field(form)->cursor_ypos;
13355 int x = current_field(form)->cursor_xpos;
13361 rm -f conftest.$ac_objext
13362 if { (eval echo "$as_me:13362: \"$ac_compile\"") >&5
13363 (eval $ac_compile) 2>&5
13365 echo "$as_me:13365: \$? = $ac_status" >&5
13366 (exit $ac_status); } &&
13367 { ac_try='test -s conftest.$ac_objext'
13368 { (eval echo "$as_me:13368: \"$ac_try\"") >&5
13369 (eval $ac_try) 2>&5
13371 echo "$as_me:13371: \$? = $ac_status" >&5
13372 (exit $ac_status); }; }; then
13373 cf_cv_netbsd_form_h=yes
13376 echo "$as_me: failed program was:" >&5
13377 cat conftest.$ac_ext >&5
13378 cf_cv_netbsd_form_h=no
13380 rm -f conftest.$ac_objext conftest.$ac_ext
13383 echo "$as_me:13383: result: $cf_cv_netbsd_form_h" >&5
13384 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13386 test "$cf_cv_netbsd_form_h" = yes &&
13387 cat >>confdefs.h <<\EOF
13388 #define HAVE_NETBSD_FORM_H 1
13391 echo "$as_me:13391: checking for NetBSD menu.h" >&5
13392 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13393 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13394 echo $ECHO_N "(cached) $ECHO_C" >&6
13397 cat >conftest.$ac_ext <<_ACEOF
13398 #line 13398 "configure"
13399 #include "confdefs.h"
13401 #include <${cf_cv_ncurses_header:-curses.h}>
13409 int y = menu->max_item_width;
13415 rm -f conftest.$ac_objext
13416 if { (eval echo "$as_me:13416: \"$ac_compile\"") >&5
13417 (eval $ac_compile) 2>&5
13419 echo "$as_me:13419: \$? = $ac_status" >&5
13420 (exit $ac_status); } &&
13421 { ac_try='test -s conftest.$ac_objext'
13422 { (eval echo "$as_me:13422: \"$ac_try\"") >&5
13423 (eval $ac_try) 2>&5
13425 echo "$as_me:13425: \$? = $ac_status" >&5
13426 (exit $ac_status); }; }; then
13427 cf_cv_netbsd_menu_h=yes
13430 echo "$as_me: failed program was:" >&5
13431 cat conftest.$ac_ext >&5
13432 cf_cv_netbsd_menu_h=no
13434 rm -f conftest.$ac_objext conftest.$ac_ext
13437 echo "$as_me:13437: result: $cf_cv_netbsd_menu_h" >&5
13438 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13440 test "$cf_cv_netbsd_menu_h" = yes &&
13441 cat >>confdefs.h <<\EOF
13442 #define HAVE_NETBSD_MENU_H 1
13448 case $cf_cv_screen in
13452 # look for curses-related libraries
13454 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13455 echo "$as_me:13455: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13456 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13457 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13458 echo $ECHO_N "(cached) $ECHO_C" >&6
13460 ac_check_lib_save_LIBS=$LIBS
13461 LIBS="-lpanel$cf_cv_libtype $LIBS"
13462 cat >conftest.$ac_ext <<_ACEOF
13463 #line 13463 "configure"
13464 #include "confdefs.h"
13466 /* Override any gcc2 internal prototype to avoid an error. */
13470 /* We use char because int might match the return type of a gcc2
13471 builtin and then its argument prototype would still apply. */
13481 rm -f conftest.$ac_objext conftest$ac_exeext
13482 if { (eval echo "$as_me:13482: \"$ac_link\"") >&5
13483 (eval $ac_link) 2>&5
13485 echo "$as_me:13485: \$? = $ac_status" >&5
13486 (exit $ac_status); } &&
13487 { ac_try='test -s conftest$ac_exeext'
13488 { (eval echo "$as_me:13488: \"$ac_try\"") >&5
13489 (eval $ac_try) 2>&5
13491 echo "$as_me:13491: \$? = $ac_status" >&5
13492 (exit $ac_status); }; }; then
13493 eval "$as_ac_Lib=yes"
13495 echo "$as_me: failed program was:" >&5
13496 cat conftest.$ac_ext >&5
13497 eval "$as_ac_Lib=no"
13499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13500 LIBS=$ac_check_lib_save_LIBS
13502 echo "$as_me:13502: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13503 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13504 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13506 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13508 cf_add_libs="-lpanel$cf_cv_libtype"
13509 # Filter out duplicates - this happens with badly-designed ".pc" files...
13510 for cf_add_1lib in $LIBS
13512 for cf_add_2lib in $cf_add_libs
13514 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13520 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13522 LIBS="$cf_add_libs"
13524 cat >>confdefs.h <<EOF
13525 #define $cf_upper 1
13530 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13531 echo "$as_me:13531: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13532 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13533 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13534 echo $ECHO_N "(cached) $ECHO_C" >&6
13536 ac_check_lib_save_LIBS=$LIBS
13537 LIBS="-lmenu$cf_cv_libtype $LIBS"
13538 cat >conftest.$ac_ext <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13542 /* Override any gcc2 internal prototype to avoid an error. */
13546 /* We use char because int might match the return type of a gcc2
13547 builtin and then its argument prototype would still apply. */
13548 char menu_driver ();
13557 rm -f conftest.$ac_objext conftest$ac_exeext
13558 if { (eval echo "$as_me:13558: \"$ac_link\"") >&5
13559 (eval $ac_link) 2>&5
13561 echo "$as_me:13561: \$? = $ac_status" >&5
13562 (exit $ac_status); } &&
13563 { ac_try='test -s conftest$ac_exeext'
13564 { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565 (eval $ac_try) 2>&5
13567 echo "$as_me:13567: \$? = $ac_status" >&5
13568 (exit $ac_status); }; }; then
13569 eval "$as_ac_Lib=yes"
13571 echo "$as_me: failed program was:" >&5
13572 cat conftest.$ac_ext >&5
13573 eval "$as_ac_Lib=no"
13575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13576 LIBS=$ac_check_lib_save_LIBS
13578 echo "$as_me:13578: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13579 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13580 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13582 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13584 cf_add_libs="-lmenu$cf_cv_libtype"
13585 # Filter out duplicates - this happens with badly-designed ".pc" files...
13586 for cf_add_1lib in $LIBS
13588 for cf_add_2lib in $cf_add_libs
13590 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13596 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13598 LIBS="$cf_add_libs"
13600 cat >>confdefs.h <<EOF
13601 #define $cf_upper 1
13606 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13607 echo "$as_me:13607: checking for form_driver in -lform$cf_cv_libtype" >&5
13608 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13609 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13610 echo $ECHO_N "(cached) $ECHO_C" >&6
13612 ac_check_lib_save_LIBS=$LIBS
13613 LIBS="-lform$cf_cv_libtype $LIBS"
13614 cat >conftest.$ac_ext <<_ACEOF
13615 #line 13615 "configure"
13616 #include "confdefs.h"
13618 /* Override any gcc2 internal prototype to avoid an error. */
13622 /* We use char because int might match the return type of a gcc2
13623 builtin and then its argument prototype would still apply. */
13624 char form_driver ();
13633 rm -f conftest.$ac_objext conftest$ac_exeext
13634 if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
13635 (eval $ac_link) 2>&5
13637 echo "$as_me:13637: \$? = $ac_status" >&5
13638 (exit $ac_status); } &&
13639 { ac_try='test -s conftest$ac_exeext'
13640 { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641 (eval $ac_try) 2>&5
13643 echo "$as_me:13643: \$? = $ac_status" >&5
13644 (exit $ac_status); }; }; then
13645 eval "$as_ac_Lib=yes"
13647 echo "$as_me: failed program was:" >&5
13648 cat conftest.$ac_ext >&5
13649 eval "$as_ac_Lib=no"
13651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13652 LIBS=$ac_check_lib_save_LIBS
13654 echo "$as_me:13654: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13655 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13656 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13658 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13660 cf_add_libs="-lform$cf_cv_libtype"
13661 # Filter out duplicates - this happens with badly-designed ".pc" files...
13662 for cf_add_1lib in $LIBS
13664 for cf_add_2lib in $cf_add_libs
13666 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13672 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13674 LIBS="$cf_add_libs"
13676 cat >>confdefs.h <<EOF
13677 #define $cf_upper 1
13682 # look for curses-related headers
13693 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13694 echo "$as_me:13694: checking for $ac_header" >&5
13695 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13696 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13697 echo $ECHO_N "(cached) $ECHO_C" >&6
13699 cat >conftest.$ac_ext <<_ACEOF
13700 #line 13700 "configure"
13701 #include "confdefs.h"
13702 #include <$ac_header>
13704 if { (eval echo "$as_me:13704: \"$ac_cpp conftest.$ac_ext\"") >&5
13705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13707 egrep -v '^ *\+' conftest.er1 >conftest.err
13709 cat conftest.err >&5
13710 echo "$as_me:13710: \$? = $ac_status" >&5
13711 (exit $ac_status); } >/dev/null; then
13712 if test -s conftest.err; then
13713 ac_cpp_err=$ac_c_preproc_warn_flag
13720 if test -z "$ac_cpp_err"; then
13721 eval "$as_ac_Header=yes"
13723 echo "$as_me: failed program was:" >&5
13724 cat conftest.$ac_ext >&5
13725 eval "$as_ac_Header=no"
13727 rm -f conftest.err conftest.$ac_ext
13729 echo "$as_me:13729: result: `eval echo '${'$as_ac_Header'}'`" >&5
13730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13732 cat >>confdefs.h <<EOF
13733 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13742 echo "$as_me:13742: checking for ANSI C header files" >&5
13743 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13744 if test "${ac_cv_header_stdc+set}" = set; then
13745 echo $ECHO_N "(cached) $ECHO_C" >&6
13747 cat >conftest.$ac_ext <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13750 #include <stdlib.h>
13751 #include <stdarg.h>
13752 #include <string.h>
13756 if { (eval echo "$as_me:13756: \"$ac_cpp conftest.$ac_ext\"") >&5
13757 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13759 egrep -v '^ *\+' conftest.er1 >conftest.err
13761 cat conftest.err >&5
13762 echo "$as_me:13762: \$? = $ac_status" >&5
13763 (exit $ac_status); } >/dev/null; then
13764 if test -s conftest.err; then
13765 ac_cpp_err=$ac_c_preproc_warn_flag
13772 if test -z "$ac_cpp_err"; then
13773 ac_cv_header_stdc=yes
13775 echo "$as_me: failed program was:" >&5
13776 cat conftest.$ac_ext >&5
13777 ac_cv_header_stdc=no
13779 rm -f conftest.err conftest.$ac_ext
13781 if test $ac_cv_header_stdc = yes; then
13782 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13783 cat >conftest.$ac_ext <<_ACEOF
13784 #line 13784 "configure"
13785 #include "confdefs.h"
13786 #include <string.h>
13789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13790 egrep "memchr" >/dev/null 2>&1; then
13793 ac_cv_header_stdc=no
13799 if test $ac_cv_header_stdc = yes; then
13800 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13801 cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804 #include <stdlib.h>
13807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13808 egrep "free" >/dev/null 2>&1; then
13811 ac_cv_header_stdc=no
13817 if test $ac_cv_header_stdc = yes; then
13818 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13819 if test "$cross_compiling" = yes; then
13822 cat >conftest.$ac_ext <<_ACEOF
13823 #line 13823 "configure"
13824 #include "confdefs.h"
13826 #if ((' ' & 0x0FF) == 0x020)
13827 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13828 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13830 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13831 || ('j' <= (c) && (c) <= 'r') \
13832 || ('s' <= (c) && (c) <= 'z'))
13833 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13836 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13841 for (i = 0; i < 256; i++)
13842 if (XOR (islower (i), ISLOWER (i))
13843 || toupper (i) != TOUPPER (i))
13844 $ac_main_return(2);
13845 $ac_main_return (0);
13848 rm -f conftest$ac_exeext
13849 if { (eval echo "$as_me:13849: \"$ac_link\"") >&5
13850 (eval $ac_link) 2>&5
13852 echo "$as_me:13852: \$? = $ac_status" >&5
13853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13854 { (eval echo "$as_me:13854: \"$ac_try\"") >&5
13855 (eval $ac_try) 2>&5
13857 echo "$as_me:13857: \$? = $ac_status" >&5
13858 (exit $ac_status); }; }; then
13861 echo "$as_me: program exited with status $ac_status" >&5
13862 echo "$as_me: failed program was:" >&5
13863 cat conftest.$ac_ext >&5
13864 ac_cv_header_stdc=no
13866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13870 echo "$as_me:13870: result: $ac_cv_header_stdc" >&5
13871 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13872 if test $ac_cv_header_stdc = yes; then
13874 cat >>confdefs.h <<\EOF
13875 #define STDC_HEADERS 1
13880 echo "$as_me:13880: checking whether time.h and sys/time.h may both be included" >&5
13881 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13882 if test "${ac_cv_header_time+set}" = set; then
13883 echo $ECHO_N "(cached) $ECHO_C" >&6
13885 cat >conftest.$ac_ext <<_ACEOF
13886 #line 13886 "configure"
13887 #include "confdefs.h"
13888 #include <sys/types.h>
13889 #include <sys/time.h>
13895 if ((struct tm *) 0)
13901 rm -f conftest.$ac_objext
13902 if { (eval echo "$as_me:13902: \"$ac_compile\"") >&5
13903 (eval $ac_compile) 2>&5
13905 echo "$as_me:13905: \$? = $ac_status" >&5
13906 (exit $ac_status); } &&
13907 { ac_try='test -s conftest.$ac_objext'
13908 { (eval echo "$as_me:13908: \"$ac_try\"") >&5
13909 (eval $ac_try) 2>&5
13911 echo "$as_me:13911: \$? = $ac_status" >&5
13912 (exit $ac_status); }; }; then
13913 ac_cv_header_time=yes
13915 echo "$as_me: failed program was:" >&5
13916 cat conftest.$ac_ext >&5
13917 ac_cv_header_time=no
13919 rm -f conftest.$ac_objext conftest.$ac_ext
13921 echo "$as_me:13921: result: $ac_cv_header_time" >&5
13922 echo "${ECHO_T}$ac_cv_header_time" >&6
13923 if test $ac_cv_header_time = yes; then
13925 cat >>confdefs.h <<\EOF
13926 #define TIME_WITH_SYS_TIME 1
13943 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13944 echo "$as_me:13944: checking for $ac_header" >&5
13945 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13947 echo $ECHO_N "(cached) $ECHO_C" >&6
13949 cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952 #include <$ac_header>
13954 if { (eval echo "$as_me:13954: \"$ac_cpp conftest.$ac_ext\"") >&5
13955 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13957 egrep -v '^ *\+' conftest.er1 >conftest.err
13959 cat conftest.err >&5
13960 echo "$as_me:13960: \$? = $ac_status" >&5
13961 (exit $ac_status); } >/dev/null; then
13962 if test -s conftest.err; then
13963 ac_cpp_err=$ac_c_preproc_warn_flag
13970 if test -z "$ac_cpp_err"; then
13971 eval "$as_ac_Header=yes"
13973 echo "$as_me: failed program was:" >&5
13974 cat conftest.$ac_ext >&5
13975 eval "$as_ac_Header=no"
13977 rm -f conftest.err conftest.$ac_ext
13979 echo "$as_me:13979: result: `eval echo '${'$as_ac_Header'}'`" >&5
13980 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13981 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13982 cat >>confdefs.h <<EOF
13983 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13989 for ac_header in unistd.h getopt.h
13991 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13992 echo "$as_me:13992: checking for $ac_header" >&5
13993 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13994 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13995 echo $ECHO_N "(cached) $ECHO_C" >&6
13997 cat >conftest.$ac_ext <<_ACEOF
13998 #line 13998 "configure"
13999 #include "confdefs.h"
14000 #include <$ac_header>
14002 if { (eval echo "$as_me:14002: \"$ac_cpp conftest.$ac_ext\"") >&5
14003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14005 egrep -v '^ *\+' conftest.er1 >conftest.err
14007 cat conftest.err >&5
14008 echo "$as_me:14008: \$? = $ac_status" >&5
14009 (exit $ac_status); } >/dev/null; then
14010 if test -s conftest.err; then
14011 ac_cpp_err=$ac_c_preproc_warn_flag
14018 if test -z "$ac_cpp_err"; then
14019 eval "$as_ac_Header=yes"
14021 echo "$as_me: failed program was:" >&5
14022 cat conftest.$ac_ext >&5
14023 eval "$as_ac_Header=no"
14025 rm -f conftest.err conftest.$ac_ext
14027 echo "$as_me:14027: result: `eval echo '${'$as_ac_Header'}'`" >&5
14028 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14029 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14030 cat >>confdefs.h <<EOF
14031 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14037 echo "$as_me:14037: checking for header declaring getopt variables" >&5
14038 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14039 if test "${cf_cv_getopt_header+set}" = set; then
14040 echo $ECHO_N "(cached) $ECHO_C" >&6
14043 cf_cv_getopt_header=none
14044 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14046 cat >conftest.$ac_ext <<_ACEOF
14047 #line 14047 "configure"
14048 #include "confdefs.h"
14050 #include <$cf_header>
14054 int x = optind; char *y = optarg
14059 rm -f conftest.$ac_objext
14060 if { (eval echo "$as_me:14060: \"$ac_compile\"") >&5
14061 (eval $ac_compile) 2>&5
14063 echo "$as_me:14063: \$? = $ac_status" >&5
14064 (exit $ac_status); } &&
14065 { ac_try='test -s conftest.$ac_objext'
14066 { (eval echo "$as_me:14066: \"$ac_try\"") >&5
14067 (eval $ac_try) 2>&5
14069 echo "$as_me:14069: \$? = $ac_status" >&5
14070 (exit $ac_status); }; }; then
14071 cf_cv_getopt_header=$cf_header
14074 echo "$as_me: failed program was:" >&5
14075 cat conftest.$ac_ext >&5
14077 rm -f conftest.$ac_objext conftest.$ac_ext
14081 echo "$as_me:14081: result: $cf_cv_getopt_header" >&5
14082 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14083 if test $cf_cv_getopt_header != none ; then
14085 cat >>confdefs.h <<\EOF
14086 #define HAVE_GETOPT_HEADER 1
14090 if test $cf_cv_getopt_header = getopt.h ; then
14092 cat >>confdefs.h <<\EOF
14093 #define NEED_GETOPT_H 1
14103 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14104 echo "$as_me:14104: checking for $ac_func" >&5
14105 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14106 if eval "test \"\${$as_ac_var+set}\" = set"; then
14107 echo $ECHO_N "(cached) $ECHO_C" >&6
14109 cat >conftest.$ac_ext <<_ACEOF
14110 #line 14110 "configure"
14111 #include "confdefs.h"
14112 /* System header to define __stub macros and hopefully few prototypes,
14113 which can conflict with char $ac_func (); below. */
14114 #include <assert.h>
14115 /* Override any gcc2 internal prototype to avoid an error. */
14119 /* We use char because int might match the return type of a gcc2
14120 builtin and then its argument prototype would still apply. */
14127 /* The GNU C library defines this for functions which it implements
14128 to always fail with ENOSYS. Some functions are actually named
14129 something starting with __ and the normal name is an alias. */
14130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14133 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14140 rm -f conftest.$ac_objext conftest$ac_exeext
14141 if { (eval echo "$as_me:14141: \"$ac_link\"") >&5
14142 (eval $ac_link) 2>&5
14144 echo "$as_me:14144: \$? = $ac_status" >&5
14145 (exit $ac_status); } &&
14146 { ac_try='test -s conftest$ac_exeext'
14147 { (eval echo "$as_me:14147: \"$ac_try\"") >&5
14148 (eval $ac_try) 2>&5
14150 echo "$as_me:14150: \$? = $ac_status" >&5
14151 (exit $ac_status); }; }; then
14152 eval "$as_ac_var=yes"
14154 echo "$as_me: failed program was:" >&5
14155 cat conftest.$ac_ext >&5
14156 eval "$as_ac_var=no"
14158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14160 echo "$as_me:14160: result: `eval echo '${'$as_ac_var'}'`" >&5
14161 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14162 if test `eval echo '${'$as_ac_var'}'` = yes; then
14163 cat >>confdefs.h <<EOF
14164 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14170 if test "x$ac_cv_func_getopt" = xno; then
14171 { { echo "$as_me:14171: error: getopt is required for building programs" >&5
14172 echo "$as_me: error: getopt is required for building programs" >&2;}
14173 { (exit 1); exit 1; }; }
14176 if test "$cf_enable_widec" = yes; then
14189 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14190 echo "$as_me:14190: checking for $ac_func" >&5
14191 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14192 if eval "test \"\${$as_ac_var+set}\" = set"; then
14193 echo $ECHO_N "(cached) $ECHO_C" >&6
14195 cat >conftest.$ac_ext <<_ACEOF
14196 #line 14196 "configure"
14197 #include "confdefs.h"
14198 /* System header to define __stub macros and hopefully few prototypes,
14199 which can conflict with char $ac_func (); below. */
14200 #include <assert.h>
14201 /* Override any gcc2 internal prototype to avoid an error. */
14205 /* We use char because int might match the return type of a gcc2
14206 builtin and then its argument prototype would still apply. */
14213 /* The GNU C library defines this for functions which it implements
14214 to always fail with ENOSYS. Some functions are actually named
14215 something starting with __ and the normal name is an alias. */
14216 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14219 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14226 rm -f conftest.$ac_objext conftest$ac_exeext
14227 if { (eval echo "$as_me:14227: \"$ac_link\"") >&5
14228 (eval $ac_link) 2>&5
14230 echo "$as_me:14230: \$? = $ac_status" >&5
14231 (exit $ac_status); } &&
14232 { ac_try='test -s conftest$ac_exeext'
14233 { (eval echo "$as_me:14233: \"$ac_try\"") >&5
14234 (eval $ac_try) 2>&5
14236 echo "$as_me:14236: \$? = $ac_status" >&5
14237 (exit $ac_status); }; }; then
14238 eval "$as_ac_var=yes"
14240 echo "$as_me: failed program was:" >&5
14241 cat conftest.$ac_ext >&5
14242 eval "$as_ac_var=no"
14244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246 echo "$as_me:14246: result: `eval echo '${'$as_ac_var'}'`" >&5
14247 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14248 if test `eval echo '${'$as_ac_var'}'` = yes; then
14249 cat >>confdefs.h <<EOF
14250 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14258 echo "$as_me:14258: checking definition to turn on extended curses functions" >&5
14259 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14260 if test "${cf_cv_need_xopen_extension+set}" = set; then
14261 echo $ECHO_N "(cached) $ECHO_C" >&6
14264 cf_cv_need_xopen_extension=unknown
14265 cat >conftest.$ac_ext <<_ACEOF
14266 #line 14266 "configure"
14267 #include "confdefs.h"
14269 #include <stdlib.h>
14270 #include <${cf_cv_ncurses_header:-curses.h}>
14275 #if defined(NCURSES_VERSION_PATCH)
14276 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14280 #ifdef NCURSES_VERSION
14282 int check2 = curs_set((int)sizeof(check));
14284 long x = winnstr(stdscr, "", 0);
14286 getbegyx(stdscr, y1, x1)
14291 rm -f conftest.$ac_objext conftest$ac_exeext
14292 if { (eval echo "$as_me:14292: \"$ac_link\"") >&5
14293 (eval $ac_link) 2>&5
14295 echo "$as_me:14295: \$? = $ac_status" >&5
14296 (exit $ac_status); } &&
14297 { ac_try='test -s conftest$ac_exeext'
14298 { (eval echo "$as_me:14298: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14301 echo "$as_me:14301: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303 cf_cv_need_xopen_extension=none
14305 echo "$as_me: failed program was:" >&5
14306 cat conftest.$ac_ext >&5
14308 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14310 cat >conftest.$ac_ext <<_ACEOF
14311 #line 14311 "configure"
14312 #include "confdefs.h"
14314 #define $cf_try_xopen_extension 1
14315 #include <stdlib.h>
14316 #include <${cf_cv_ncurses_header:-curses.h}>
14321 #ifdef NCURSES_VERSION
14323 int check2 = curs_set((int)sizeof(check));
14325 long x = winnstr(stdscr, "", 0);
14327 getbegyx(stdscr, y1, x1)
14332 rm -f conftest.$ac_objext conftest$ac_exeext
14333 if { (eval echo "$as_me:14333: \"$ac_link\"") >&5
14334 (eval $ac_link) 2>&5
14336 echo "$as_me:14336: \$? = $ac_status" >&5
14337 (exit $ac_status); } &&
14338 { ac_try='test -s conftest$ac_exeext'
14339 { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340 (eval $ac_try) 2>&5
14342 echo "$as_me:14342: \$? = $ac_status" >&5
14343 (exit $ac_status); }; }; then
14344 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14346 echo "$as_me: failed program was:" >&5
14347 cat conftest.$ac_ext >&5
14349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14356 echo "$as_me:14356: result: $cf_cv_need_xopen_extension" >&5
14357 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14359 case $cf_cv_need_xopen_extension in
14361 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14365 echo "$as_me:14365: checking for term.h" >&5
14366 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14367 if test "${cf_cv_term_header+set}" = set; then
14368 echo $ECHO_N "(cached) $ECHO_C" >&6
14371 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14372 # for <term.h> if we do not find the variant.
14374 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14376 case ${cf_cv_ncurses_header:-curses.h} in
14378 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14379 cf_header_list="$cf_header_item $cf_header_list"
14383 for cf_header in $cf_header_list
14385 cat >conftest.$ac_ext <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14389 #include <${cf_cv_ncurses_header:-curses.h}>
14390 #include <${cf_header}>
14399 rm -f conftest.$ac_objext
14400 if { (eval echo "$as_me:14400: \"$ac_compile\"") >&5
14401 (eval $ac_compile) 2>&5
14403 echo "$as_me:14403: \$? = $ac_status" >&5
14404 (exit $ac_status); } &&
14405 { ac_try='test -s conftest.$ac_objext'
14406 { (eval echo "$as_me:14406: \"$ac_try\"") >&5
14407 (eval $ac_try) 2>&5
14409 echo "$as_me:14409: \$? = $ac_status" >&5
14410 (exit $ac_status); }; }; then
14411 cf_cv_term_header=$cf_header
14414 echo "$as_me: failed program was:" >&5
14415 cat conftest.$ac_ext >&5
14416 cf_cv_term_header=no
14418 rm -f conftest.$ac_objext conftest.$ac_ext
14421 case $cf_cv_term_header in
14423 # If curses is ncurses, some packagers still mess it up by trying to make
14424 # us use GNU termcap. This handles the most common case.
14425 for cf_header in ncurses/term.h ncursesw/term.h
14427 cat >conftest.$ac_ext <<_ACEOF
14428 #line 14428 "configure"
14429 #include "confdefs.h"
14431 #include <${cf_cv_ncurses_header:-curses.h}>
14432 #ifdef NCURSES_VERSION
14433 #include <${cf_header}>
14445 rm -f conftest.$ac_objext
14446 if { (eval echo "$as_me:14446: \"$ac_compile\"") >&5
14447 (eval $ac_compile) 2>&5
14449 echo "$as_me:14449: \$? = $ac_status" >&5
14450 (exit $ac_status); } &&
14451 { ac_try='test -s conftest.$ac_objext'
14452 { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5
14455 echo "$as_me:14455: \$? = $ac_status" >&5
14456 (exit $ac_status); }; }; then
14457 cf_cv_term_header=$cf_header
14460 echo "$as_me: failed program was:" >&5
14461 cat conftest.$ac_ext >&5
14462 cf_cv_term_header=no
14464 rm -f conftest.$ac_objext conftest.$ac_ext
14470 echo "$as_me:14470: result: $cf_cv_term_header" >&5
14471 echo "${ECHO_T}$cf_cv_term_header" >&6
14473 case $cf_cv_term_header in
14476 cat >>confdefs.h <<\EOF
14477 #define HAVE_TERM_H 1
14483 cat >>confdefs.h <<\EOF
14484 #define HAVE_NCURSES_TERM_H 1
14490 cat >>confdefs.h <<\EOF
14491 #define HAVE_NCURSESW_TERM_H 1
14497 echo "$as_me:14497: checking for unctrl.h" >&5
14498 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14499 if test "${cf_cv_unctrl_header+set}" = set; then
14500 echo $ECHO_N "(cached) $ECHO_C" >&6
14503 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14504 # for <unctrl.h> if we do not find the variant.
14506 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14508 case ${cf_cv_ncurses_header:-curses.h} in
14510 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14511 cf_header_list="$cf_header_item $cf_header_list"
14515 for cf_header in $cf_header_list
14517 cat >conftest.$ac_ext <<_ACEOF
14518 #line 14518 "configure"
14519 #include "confdefs.h"
14521 #include <${cf_cv_ncurses_header:-curses.h}>
14522 #include <${cf_header}>
14531 rm -f conftest.$ac_objext
14532 if { (eval echo "$as_me:14532: \"$ac_compile\"") >&5
14533 (eval $ac_compile) 2>&5
14535 echo "$as_me:14535: \$? = $ac_status" >&5
14536 (exit $ac_status); } &&
14537 { ac_try='test -s conftest.$ac_objext'
14538 { (eval echo "$as_me:14538: \"$ac_try\"") >&5
14539 (eval $ac_try) 2>&5
14541 echo "$as_me:14541: \$? = $ac_status" >&5
14542 (exit $ac_status); }; }; then
14543 cf_cv_unctrl_header=$cf_header
14546 echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 cf_cv_unctrl_header=no
14550 rm -f conftest.$ac_objext conftest.$ac_ext
14554 echo "$as_me:14554: result: $cf_cv_unctrl_header" >&5
14555 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14557 case $cf_cv_unctrl_header in
14559 { echo "$as_me:14559: WARNING: unctrl.h header not found" >&5
14560 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14564 case $cf_cv_unctrl_header in
14567 cat >>confdefs.h <<\EOF
14568 #define HAVE_UNCTRL_H 1
14574 cat >>confdefs.h <<\EOF
14575 #define HAVE_NCURSES_UNCTRL_H 1
14579 (ncursesw/unctrl.h)
14581 cat >>confdefs.h <<\EOF
14582 #define HAVE_NCURSESW_UNCTRL_H 1
14589 assume_default_colors \
14616 use_default_colors \
14618 use_extended_names \
14632 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14634 echo "$as_me:14634: checking for ${cf_func}" >&5
14635 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14637 echo "${as_me:-configure}:14637: testing ${cf_func} ..." 1>&5
14639 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14640 echo $ECHO_N "(cached) $ECHO_C" >&6
14643 eval cf_result='$ac_cv_func_'$cf_func
14644 if test ".$cf_result" != ".no"; then
14645 cat >conftest.$ac_ext <<_ACEOF
14646 #line 14646 "configure"
14647 #include "confdefs.h"
14649 #ifdef HAVE_XCURSES
14650 #include <xcurses.h>
14651 char * XCursesProgramName = "test";
14653 #include <${cf_cv_ncurses_header:-curses.h}>
14654 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14655 #include <ncursesw/term.h>
14656 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14657 #include <ncurses/term.h>
14658 #elif defined(HAVE_TERM_H)
14668 long foo = (long)(&${cf_func});
14669 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14670 if (foo + 1234 > 5678)
14671 ${cf_cv_main_return:-return}(foo);
14678 rm -f conftest.$ac_objext conftest$ac_exeext
14679 if { (eval echo "$as_me:14679: \"$ac_link\"") >&5
14680 (eval $ac_link) 2>&5
14682 echo "$as_me:14682: \$? = $ac_status" >&5
14683 (exit $ac_status); } &&
14684 { ac_try='test -s conftest$ac_exeext'
14685 { (eval echo "$as_me:14685: \"$ac_try\"") >&5
14686 (eval $ac_try) 2>&5
14688 echo "$as_me:14688: \$? = $ac_status" >&5
14689 (exit $ac_status); }; }; then
14692 echo "$as_me: failed program was:" >&5
14693 cat conftest.$ac_ext >&5
14696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14698 eval 'cf_cv_func_'$cf_func'=$cf_result'
14702 # use the computed/retrieved cache-value:
14703 eval 'cf_result=$cf_cv_func_'$cf_func
14704 echo "$as_me:14704: result: $cf_result" >&5
14705 echo "${ECHO_T}$cf_result" >&6
14706 if test $cf_result != no; then
14707 cat >>confdefs.h <<EOF
14708 #define HAVE_${cf_tr_func} 1
14714 for cf_func in tputs
14717 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14719 echo "$as_me:14719: checking for ${cf_func}" >&5
14720 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14722 echo "${as_me:-configure}:14722: testing ${cf_func} ..." 1>&5
14724 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14725 echo $ECHO_N "(cached) $ECHO_C" >&6
14728 eval cf_result='$ac_cv_func_'$cf_func
14729 if test ".$cf_result" != ".no"; then
14730 cat >conftest.$ac_ext <<_ACEOF
14731 #line 14731 "configure"
14732 #include "confdefs.h"
14734 #ifdef HAVE_XCURSES
14735 #include <xcurses.h>
14736 char * XCursesProgramName = "test";
14738 #include <${cf_cv_ncurses_header:-curses.h}>
14739 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14740 #include <ncursesw/term.h>
14741 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14742 #include <ncurses/term.h>
14743 #elif defined(HAVE_TERM_H)
14753 long foo = (long)(&${cf_func});
14754 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14755 if (foo + 1234 > 5678)
14756 ${cf_cv_main_return:-return}(foo);
14763 rm -f conftest.$ac_objext conftest$ac_exeext
14764 if { (eval echo "$as_me:14764: \"$ac_link\"") >&5
14765 (eval $ac_link) 2>&5
14767 echo "$as_me:14767: \$? = $ac_status" >&5
14768 (exit $ac_status); } &&
14769 { ac_try='test -s conftest$ac_exeext'
14770 { (eval echo "$as_me:14770: \"$ac_try\"") >&5
14771 (eval $ac_try) 2>&5
14773 echo "$as_me:14773: \$? = $ac_status" >&5
14774 (exit $ac_status); }; }; then
14777 echo "$as_me: failed program was:" >&5
14778 cat conftest.$ac_ext >&5
14781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14783 eval 'cf_cv_func_'$cf_func'=$cf_result'
14787 # use the computed/retrieved cache-value:
14788 eval 'cf_result=$cf_cv_func_'$cf_func
14789 echo "$as_me:14789: result: $cf_result" >&5
14790 echo "${ECHO_T}$cf_result" >&6
14791 if test $cf_result != no; then
14792 cat >>confdefs.h <<EOF
14793 #define HAVE_${cf_tr_func} 1
14799 if test x$cf_cv_func_tputs = xyes
14802 for cf_arg in int char
14804 for cf_ret in int void
14806 if test $cf_ret = void
14808 cf_return="/* nothing */"
14810 cf_return="return value"
14812 cat >conftest.$ac_ext <<_ACEOF
14813 #line 14813 "configure"
14814 #include "confdefs.h"
14816 #include <${cf_cv_ncurses_header:-curses.h}>
14817 #include <$cf_cv_term_header>
14819 static $cf_ret outc($cf_arg value) { $cf_return; }
14825 tputs("hello", 0, outc);
14826 ${cf_cv_main_return:-return}(0);
14832 rm -f conftest.$ac_objext
14833 if { (eval echo "$as_me:14833: \"$ac_compile\"") >&5
14834 (eval $ac_compile) 2>&5
14836 echo "$as_me:14836: \$? = $ac_status" >&5
14837 (exit $ac_status); } &&
14838 { ac_try='test -s conftest.$ac_objext'
14839 { (eval echo "$as_me:14839: \"$ac_try\"") >&5
14840 (eval $ac_try) 2>&5
14842 echo "$as_me:14842: \$? = $ac_status" >&5
14843 (exit $ac_status); }; }; then
14845 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14847 echo "${as_me:-configure}:14847: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14849 cat >>confdefs.h <<EOF
14850 #define TPUTS_ARG $cf_arg
14851 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14852 #define TPUTS_RETURN(value) $cf_return
14858 echo "$as_me: failed program was:" >&5
14859 cat conftest.$ac_ext >&5
14861 rm -f conftest.$ac_objext conftest.$ac_ext
14863 test $cf_done = yes && break
14867 echo "$as_me:14867: checking for ncurses extended functions" >&5
14868 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14869 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14870 echo $ECHO_N "(cached) $ECHO_C" >&6
14873 cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14877 #include <${cf_cv_ncurses_header:-curses.h}>
14882 int x = NCURSES_EXT_FUNCS
14888 rm -f conftest.$ac_objext
14889 if { (eval echo "$as_me:14889: \"$ac_compile\"") >&5
14890 (eval $ac_compile) 2>&5
14892 echo "$as_me:14892: \$? = $ac_status" >&5
14893 (exit $ac_status); } &&
14894 { ac_try='test -s conftest.$ac_objext'
14895 { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14896 (eval $ac_try) 2>&5
14898 echo "$as_me:14898: \$? = $ac_status" >&5
14899 (exit $ac_status); }; }; then
14900 cf_cv_ncurses_ext_funcs=defined
14902 echo "$as_me: failed program was:" >&5
14903 cat conftest.$ac_ext >&5
14905 cat >conftest.$ac_ext <<_ACEOF
14906 #line 14906 "configure"
14907 #include "confdefs.h"
14909 #include <${cf_cv_ncurses_header:-curses.h}>
14914 (void) assume_default_colors (0, 0);
14915 (void) curses_version ();
14916 (void) define_key (0, 0);
14917 (void) is_term_resized (0, 0);
14918 (void) key_defined (0);
14919 (void) keybound (0, 0);
14920 (void) keyok (0, 0);
14921 (void) resize_term (0, 0);
14922 (void) resizeterm (0, 0);
14923 (void) use_default_colors ();
14924 (void) use_extended_names (0);
14925 (void) wresize (0, 0, 0);
14930 rm -f conftest.$ac_objext conftest$ac_exeext
14931 if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932 (eval $ac_link) 2>&5
14934 echo "$as_me:14934: \$? = $ac_status" >&5
14935 (exit $ac_status); } &&
14936 { ac_try='test -s conftest$ac_exeext'
14937 { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938 (eval $ac_try) 2>&5
14940 echo "$as_me:14940: \$? = $ac_status" >&5
14941 (exit $ac_status); }; }; then
14942 cf_cv_ncurses_ext_funcs=yes
14944 echo "$as_me: failed program was:" >&5
14945 cat conftest.$ac_ext >&5
14946 cf_cv_ncurses_ext_funcs=no
14948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14951 rm -f conftest.$ac_objext conftest.$ac_ext
14954 echo "$as_me:14954: result: $cf_cv_ncurses_ext_funcs" >&5
14955 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14956 test "$cf_cv_ncurses_ext_funcs" = yes &&
14957 cat >>confdefs.h <<\EOF
14958 #define NCURSES_EXT_FUNCS 1
14961 if test "$cf_enable_widec" = yes
14963 # workaround for systems with ncurses before 20111029, due to change of
14964 # feature test macro from _XPG5 to _XOPEN_SOURCE
14965 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14968 echo "$as_me:14968: checking if _XPG5 should be defined to enable wide-characters" >&5
14969 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14971 cat >conftest.$ac_ext <<_ACEOF
14972 #line 14972 "configure"
14973 #include "confdefs.h"
14975 #include <${cf_cv_ncurses_header:-curses.h}>
14984 rm -f conftest.$ac_objext
14985 if { (eval echo "$as_me:14985: \"$ac_compile\"") >&5
14986 (eval $ac_compile) 2>&5
14988 echo "$as_me:14988: \$? = $ac_status" >&5
14989 (exit $ac_status); } &&
14990 { ac_try='test -s conftest.$ac_objext'
14991 { (eval echo "$as_me:14991: \"$ac_try\"") >&5
14992 (eval $ac_try) 2>&5
14994 echo "$as_me:14994: \$? = $ac_status" >&5
14995 (exit $ac_status); }; }; then
14998 echo "$as_me: failed program was:" >&5
14999 cat conftest.$ac_ext >&5
15000 cf_save_cppflags="$CPPFLAGS"
15001 CPPFLAGS="$CPPFLAGS -D_XPG5"
15002 cat >conftest.$ac_ext <<_ACEOF
15003 #line 15003 "configure"
15004 #include "confdefs.h"
15006 #include <${cf_cv_ncurses_header:-curses.h}>
15015 rm -f conftest.$ac_objext
15016 if { (eval echo "$as_me:15016: \"$ac_compile\"") >&5
15017 (eval $ac_compile) 2>&5
15019 echo "$as_me:15019: \$? = $ac_status" >&5
15020 (exit $ac_status); } &&
15021 { ac_try='test -s conftest.$ac_objext'
15022 { (eval echo "$as_me:15022: \"$ac_try\"") >&5
15023 (eval $ac_try) 2>&5
15025 echo "$as_me:15025: \$? = $ac_status" >&5
15026 (exit $ac_status); }; }; then
15029 echo "$as_me: failed program was:" >&5
15030 cat conftest.$ac_ext >&5
15032 rm -f conftest.$ac_objext conftest.$ac_ext
15033 CPPFLAGS="$cf_save_cppflags"
15035 rm -f conftest.$ac_objext conftest.$ac_ext
15036 echo "$as_me:15036: result: $cf_define_xpg5" >&5
15037 echo "${ECHO_T}$cf_define_xpg5" >&6
15039 if test "$cf_define_xpg5" = yes
15041 CPPFLAGS="$CPPFLAGS -D_XPG5"
15045 echo "$as_me:15045: checking for wide-character functions" >&5
15046 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
15047 if test "${cf_cv_widechar_funcs+set}" = set; then
15048 echo $ECHO_N "(cached) $ECHO_C" >&6
15051 cat >conftest.$ac_ext <<_ACEOF
15052 #line 15052 "configure"
15053 #include "confdefs.h"
15055 #include <${cf_cv_ncurses_header:-curses.h}>
15060 static wchar_t src_wchar[2];
15061 static cchar_t dst_cchar;
15062 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15068 rm -f conftest.$ac_objext conftest$ac_exeext
15069 if { (eval echo "$as_me:15069: \"$ac_link\"") >&5
15070 (eval $ac_link) 2>&5
15072 echo "$as_me:15072: \$? = $ac_status" >&5
15073 (exit $ac_status); } &&
15074 { ac_try='test -s conftest$ac_exeext'
15075 { (eval echo "$as_me:15075: \"$ac_try\"") >&5
15076 (eval $ac_try) 2>&5
15078 echo "$as_me:15078: \$? = $ac_status" >&5
15079 (exit $ac_status); }; }; then
15080 cf_cv_widechar_funcs=yes
15082 echo "$as_me: failed program was:" >&5
15083 cat conftest.$ac_ext >&5
15084 cf_cv_widechar_funcs=no
15086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15089 echo "$as_me:15089: result: $cf_cv_widechar_funcs" >&5
15090 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15091 if test "$cf_cv_widechar_funcs" != no ; then
15093 cat >>confdefs.h <<\EOF
15094 #define USE_WIDEC_SUPPORT 1
15098 cat >>confdefs.h <<\EOF
15099 #define USE_WIDEC_SUPPORT 0
15104 cat >>confdefs.h <<\EOF
15105 #define USE_WIDEC_SUPPORT 0
15110 echo "$as_me:15110: checking if $cf_cv_screen library uses pthreads" >&5
15111 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15112 if test "${cf_cv_use_pthreads+set}" = set; then
15113 echo $ECHO_N "(cached) $ECHO_C" >&6
15116 cat >conftest.$ac_ext <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15120 #include <${cf_cv_ncurses_header:-curses.h}>
15121 extern void _nc_init_pthreads(void);
15128 _nc_init_pthreads();
15134 rm -f conftest.$ac_objext conftest$ac_exeext
15135 if { (eval echo "$as_me:15135: \"$ac_link\"") >&5
15136 (eval $ac_link) 2>&5
15138 echo "$as_me:15138: \$? = $ac_status" >&5
15139 (exit $ac_status); } &&
15140 { ac_try='test -s conftest$ac_exeext'
15141 { (eval echo "$as_me:15141: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15144 echo "$as_me:15144: \$? = $ac_status" >&5
15145 (exit $ac_status); }; }; then
15146 cf_cv_use_pthreads=yes
15148 echo "$as_me: failed program was:" >&5
15149 cat conftest.$ac_ext >&5
15150 cf_cv_use_pthreads=no
15152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15155 echo "$as_me:15155: result: $cf_cv_use_pthreads" >&5
15156 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15157 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15158 #define USE_PTHREADS 1
15161 echo "$as_me:15161: checking if sys/time.h works with sys/select.h" >&5
15162 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15163 if test "${cf_cv_sys_time_select+set}" = set; then
15164 echo $ECHO_N "(cached) $ECHO_C" >&6
15167 cat >conftest.$ac_ext <<_ACEOF
15168 #line 15168 "configure"
15169 #include "confdefs.h"
15171 #include <sys/types.h>
15172 #ifdef HAVE_SYS_TIME_H
15173 #include <sys/time.h>
15175 #ifdef HAVE_SYS_SELECT_H
15176 #include <sys/select.h>
15187 rm -f conftest.$ac_objext
15188 if { (eval echo "$as_me:15188: \"$ac_compile\"") >&5
15189 (eval $ac_compile) 2>&5
15191 echo "$as_me:15191: \$? = $ac_status" >&5
15192 (exit $ac_status); } &&
15193 { ac_try='test -s conftest.$ac_objext'
15194 { (eval echo "$as_me:15194: \"$ac_try\"") >&5
15195 (eval $ac_try) 2>&5
15197 echo "$as_me:15197: \$? = $ac_status" >&5
15198 (exit $ac_status); }; }; then
15199 cf_cv_sys_time_select=yes
15201 echo "$as_me: failed program was:" >&5
15202 cat conftest.$ac_ext >&5
15203 cf_cv_sys_time_select=no
15205 rm -f conftest.$ac_objext conftest.$ac_ext
15209 echo "$as_me:15209: result: $cf_cv_sys_time_select" >&5
15210 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15211 test "$cf_cv_sys_time_select" = yes &&
15212 cat >>confdefs.h <<\EOF
15213 #define HAVE_SYS_TIME_SELECT 1
15216 # special check for test/ditto.c
15218 echo "$as_me:15218: checking for openpty in -lutil" >&5
15219 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15220 if test "${ac_cv_lib_util_openpty+set}" = set; then
15221 echo $ECHO_N "(cached) $ECHO_C" >&6
15223 ac_check_lib_save_LIBS=$LIBS
15224 LIBS="-lutil $LIBS"
15225 cat >conftest.$ac_ext <<_ACEOF
15226 #line 15226 "configure"
15227 #include "confdefs.h"
15229 /* Override any gcc2 internal prototype to avoid an error. */
15233 /* We use char because int might match the return type of a gcc2
15234 builtin and then its argument prototype would still apply. */
15244 rm -f conftest.$ac_objext conftest$ac_exeext
15245 if { (eval echo "$as_me:15245: \"$ac_link\"") >&5
15246 (eval $ac_link) 2>&5
15248 echo "$as_me:15248: \$? = $ac_status" >&5
15249 (exit $ac_status); } &&
15250 { ac_try='test -s conftest$ac_exeext'
15251 { (eval echo "$as_me:15251: \"$ac_try\"") >&5
15252 (eval $ac_try) 2>&5
15254 echo "$as_me:15254: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }; then
15256 ac_cv_lib_util_openpty=yes
15258 echo "$as_me: failed program was:" >&5
15259 cat conftest.$ac_ext >&5
15260 ac_cv_lib_util_openpty=no
15262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15263 LIBS=$ac_check_lib_save_LIBS
15265 echo "$as_me:15265: result: $ac_cv_lib_util_openpty" >&5
15266 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15267 if test $ac_cv_lib_util_openpty = yes; then
15273 echo "$as_me:15273: checking for openpty header" >&5
15274 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15275 if test "${cf_cv_func_openpty+set}" = set; then
15276 echo $ECHO_N "(cached) $ECHO_C" >&6
15279 cf_save_LIBS="$LIBS"
15280 test $cf_cv_lib_util = yes && {
15281 cf_add_libs="-lutil"
15282 # Filter out duplicates - this happens with badly-designed ".pc" files...
15283 for cf_add_1lib in $LIBS
15285 for cf_add_2lib in $cf_add_libs
15287 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15293 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15295 LIBS="$cf_add_libs"
15297 for cf_header in pty.h libutil.h util.h
15299 cat >conftest.$ac_ext <<_ACEOF
15300 #line 15300 "configure"
15301 #include "confdefs.h"
15303 #include <$cf_header>
15309 int x = openpty((int *)0, (int *)0, (char *)0,
15310 (struct termios *)0, (struct winsize *)0);
15316 rm -f conftest.$ac_objext conftest$ac_exeext
15317 if { (eval echo "$as_me:15317: \"$ac_link\"") >&5
15318 (eval $ac_link) 2>&5
15320 echo "$as_me:15320: \$? = $ac_status" >&5
15321 (exit $ac_status); } &&
15322 { ac_try='test -s conftest$ac_exeext'
15323 { (eval echo "$as_me:15323: \"$ac_try\"") >&5
15324 (eval $ac_try) 2>&5
15326 echo "$as_me:15326: \$? = $ac_status" >&5
15327 (exit $ac_status); }; }; then
15329 cf_cv_func_openpty=$cf_header
15333 echo "$as_me: failed program was:" >&5
15334 cat conftest.$ac_ext >&5
15336 cf_cv_func_openpty=no
15339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15341 LIBS="$cf_save_LIBS"
15344 echo "$as_me:15344: result: $cf_cv_func_openpty" >&5
15345 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15347 if test "$cf_cv_func_openpty" != no ; then
15349 cat >>confdefs.h <<EOF
15350 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15353 cat >>confdefs.h <<\EOF
15354 #define USE_XTERM_PTY 1
15357 if test "x$cf_cv_lib_util" = xyes ; then
15359 cf_add_libs="-lutil"
15360 # Filter out duplicates - this happens with badly-designed ".pc" files...
15361 for cf_add_1lib in $TEST_LIBS
15363 for cf_add_2lib in $cf_add_libs
15365 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15371 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15373 TEST_LIBS="$cf_add_libs"
15378 echo "$as_me:15378: checking for function curses_version" >&5
15379 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15380 if test "${cf_cv_func_curses_version+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15384 if test "$cross_compiling" = yes; then
15385 cf_cv_func_curses_version=unknown
15387 cat >conftest.$ac_ext <<_ACEOF
15388 #line 15388 "configure"
15389 #include "confdefs.h"
15391 #include <${cf_cv_ncurses_header:-curses.h}>
15395 sprintf(temp, "%s\n", curses_version());
15396 ${cf_cv_main_return:-return}(0);
15400 rm -f conftest$ac_exeext
15401 if { (eval echo "$as_me:15401: \"$ac_link\"") >&5
15402 (eval $ac_link) 2>&5
15404 echo "$as_me:15404: \$? = $ac_status" >&5
15405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15406 { (eval echo "$as_me:15406: \"$ac_try\"") >&5
15407 (eval $ac_try) 2>&5
15409 echo "$as_me:15409: \$? = $ac_status" >&5
15410 (exit $ac_status); }; }; then
15411 cf_cv_func_curses_version=yes
15414 echo "$as_me: program exited with status $ac_status" >&5
15415 echo "$as_me: failed program was:" >&5
15416 cat conftest.$ac_ext >&5
15417 cf_cv_func_curses_version=no
15420 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15424 echo "$as_me:15424: result: $cf_cv_func_curses_version" >&5
15425 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15426 test "$cf_cv_func_curses_version" = yes &&
15427 cat >>confdefs.h <<\EOF
15428 #define HAVE_CURSES_VERSION 1
15431 echo "$as_me:15431: checking for alternate character set array" >&5
15432 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15433 if test "${cf_cv_curses_acs_map+set}" = set; then
15434 echo $ECHO_N "(cached) $ECHO_C" >&6
15437 cf_cv_curses_acs_map=unknown
15438 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15440 cat >conftest.$ac_ext <<_ACEOF
15441 #line 15441 "configure"
15442 #include "confdefs.h"
15444 #include <${cf_cv_ncurses_header:-curses.h}>
15450 $name['k'] = ACS_PLUS
15456 rm -f conftest.$ac_objext conftest$ac_exeext
15457 if { (eval echo "$as_me:15457: \"$ac_link\"") >&5
15458 (eval $ac_link) 2>&5
15460 echo "$as_me:15460: \$? = $ac_status" >&5
15461 (exit $ac_status); } &&
15462 { ac_try='test -s conftest$ac_exeext'
15463 { (eval echo "$as_me:15463: \"$ac_try\"") >&5
15464 (eval $ac_try) 2>&5
15466 echo "$as_me:15466: \$? = $ac_status" >&5
15467 (exit $ac_status); }; }; then
15468 cf_cv_curses_acs_map=$name; break
15470 echo "$as_me: failed program was:" >&5
15471 cat conftest.$ac_ext >&5
15473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15477 echo "$as_me:15477: result: $cf_cv_curses_acs_map" >&5
15478 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15480 test "$cf_cv_curses_acs_map" != unknown &&
15481 cat >>confdefs.h <<EOF
15482 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15485 if test "$cf_enable_widec" = yes; then
15487 echo "$as_me:15487: checking for wide alternate character set array" >&5
15488 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15489 if test "${cf_cv_curses_wacs_map+set}" = set; then
15490 echo $ECHO_N "(cached) $ECHO_C" >&6
15493 cf_cv_curses_wacs_map=unknown
15494 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15496 cat >conftest.$ac_ext <<_ACEOF
15497 #line 15497 "configure"
15498 #include "confdefs.h"
15500 #ifndef _XOPEN_SOURCE_EXTENDED
15501 #define _XOPEN_SOURCE_EXTENDED
15503 #include <${cf_cv_ncurses_header:-curses.h}>
15507 void *foo = &($name['k'])
15512 rm -f conftest.$ac_objext conftest$ac_exeext
15513 if { (eval echo "$as_me:15513: \"$ac_link\"") >&5
15514 (eval $ac_link) 2>&5
15516 echo "$as_me:15516: \$? = $ac_status" >&5
15517 (exit $ac_status); } &&
15518 { ac_try='test -s conftest$ac_exeext'
15519 { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520 (eval $ac_try) 2>&5
15522 echo "$as_me:15522: \$? = $ac_status" >&5
15523 (exit $ac_status); }; }; then
15524 cf_cv_curses_wacs_map=$name
15527 echo "$as_me: failed program was:" >&5
15528 cat conftest.$ac_ext >&5
15530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15533 echo "$as_me:15533: result: $cf_cv_curses_wacs_map" >&5
15534 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15536 test "$cf_cv_curses_wacs_map" != unknown &&
15537 cat >>confdefs.h <<EOF
15538 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15541 echo "$as_me:15541: checking for wide alternate character constants" >&5
15542 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15543 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15544 echo $ECHO_N "(cached) $ECHO_C" >&6
15547 cf_cv_curses_wacs_symbols=no
15548 if test "$cf_cv_curses_wacs_map" != unknown
15550 cat >conftest.$ac_ext <<_ACEOF
15551 #line 15551 "configure"
15552 #include "confdefs.h"
15554 #ifndef _XOPEN_SOURCE_EXTENDED
15555 #define _XOPEN_SOURCE_EXTENDED
15557 #include <${cf_cv_ncurses_header:-curses.h}>
15561 cchar_t *foo = WACS_PLUS;
15562 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15567 rm -f conftest.$ac_objext conftest$ac_exeext
15568 if { (eval echo "$as_me:15568: \"$ac_link\"") >&5
15569 (eval $ac_link) 2>&5
15571 echo "$as_me:15571: \$? = $ac_status" >&5
15572 (exit $ac_status); } &&
15573 { ac_try='test -s conftest$ac_exeext'
15574 { (eval echo "$as_me:15574: \"$ac_try\"") >&5
15575 (eval $ac_try) 2>&5
15577 echo "$as_me:15577: \$? = $ac_status" >&5
15578 (exit $ac_status); }; }; then
15579 cf_cv_curses_wacs_symbols=yes
15581 echo "$as_me: failed program was:" >&5
15582 cat conftest.$ac_ext >&5
15584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15586 cat >conftest.$ac_ext <<_ACEOF
15587 #line 15587 "configure"
15588 #include "confdefs.h"
15590 #ifndef _XOPEN_SOURCE_EXTENDED
15591 #define _XOPEN_SOURCE_EXTENDED
15593 #include <${cf_cv_ncurses_header:-curses.h}>
15597 cchar_t *foo = WACS_PLUS
15602 rm -f conftest.$ac_objext conftest$ac_exeext
15603 if { (eval echo "$as_me:15603: \"$ac_link\"") >&5
15604 (eval $ac_link) 2>&5
15606 echo "$as_me:15606: \$? = $ac_status" >&5
15607 (exit $ac_status); } &&
15608 { ac_try='test -s conftest$ac_exeext'
15609 { (eval echo "$as_me:15609: \"$ac_try\"") >&5
15610 (eval $ac_try) 2>&5
15612 echo "$as_me:15612: \$? = $ac_status" >&5
15613 (exit $ac_status); }; }; then
15614 cf_cv_curses_wacs_symbols=yes
15616 echo "$as_me: failed program was:" >&5
15617 cat conftest.$ac_ext >&5
15619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15623 echo "$as_me:15623: result: $cf_cv_curses_wacs_symbols" >&5
15624 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15626 test "$cf_cv_curses_wacs_symbols" != no &&
15627 cat >>confdefs.h <<\EOF
15628 #define CURSES_WACS_SYMBOLS 1
15633 echo "$as_me:15633: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15634 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15635 cat >conftest.$ac_ext <<_ACEOF
15636 #line 15636 "configure"
15637 #include "confdefs.h"
15639 #ifndef _XOPEN_SOURCE_EXTENDED
15640 #define _XOPEN_SOURCE_EXTENDED
15642 #include <${cf_cv_ncurses_header:-curses.h}>
15653 rm -f conftest.$ac_objext
15654 if { (eval echo "$as_me:15654: \"$ac_compile\"") >&5
15655 (eval $ac_compile) 2>&5
15657 echo "$as_me:15657: \$? = $ac_status" >&5
15658 (exit $ac_status); } &&
15659 { ac_try='test -s conftest.$ac_objext'
15660 { (eval echo "$as_me:15660: \"$ac_try\"") >&5
15661 (eval $ac_try) 2>&5
15663 echo "$as_me:15663: \$? = $ac_status" >&5
15664 (exit $ac_status); }; }; then
15667 echo "$as_me: failed program was:" >&5
15668 cat conftest.$ac_ext >&5
15671 rm -f conftest.$ac_objext conftest.$ac_ext
15672 echo "$as_me:15672: result: $cf_result" >&5
15673 echo "${ECHO_T}$cf_result" >&6
15674 if test $cf_result = yes ; then
15676 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15678 cat >>confdefs.h <<EOF
15679 #define $cf_result 1
15684 cat >>confdefs.h <<EOF
15685 #define attr_t long
15690 if test "$cf_enable_widec" = yes; then
15692 # This is needed on Tru64 5.0 to declare mbstate_t
15693 echo "$as_me:15693: checking if we must include wchar.h to declare mbstate_t" >&5
15694 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15695 if test "${cf_cv_mbstate_t+set}" = set; then
15696 echo $ECHO_N "(cached) $ECHO_C" >&6
15699 cat >conftest.$ac_ext <<_ACEOF
15700 #line 15700 "configure"
15701 #include "confdefs.h"
15703 #include <stdlib.h>
15704 #include <stdarg.h>
15706 #ifdef HAVE_LIBUTF8_H
15707 #include <libutf8.h>
15717 rm -f conftest.$ac_objext
15718 if { (eval echo "$as_me:15718: \"$ac_compile\"") >&5
15719 (eval $ac_compile) 2>&5
15721 echo "$as_me:15721: \$? = $ac_status" >&5
15722 (exit $ac_status); } &&
15723 { ac_try='test -s conftest.$ac_objext'
15724 { (eval echo "$as_me:15724: \"$ac_try\"") >&5
15725 (eval $ac_try) 2>&5
15727 echo "$as_me:15727: \$? = $ac_status" >&5
15728 (exit $ac_status); }; }; then
15731 echo "$as_me: failed program was:" >&5
15732 cat conftest.$ac_ext >&5
15733 cat >conftest.$ac_ext <<_ACEOF
15734 #line 15734 "configure"
15735 #include "confdefs.h"
15737 #include <stdlib.h>
15738 #include <stdarg.h>
15741 #ifdef HAVE_LIBUTF8_H
15742 #include <libutf8.h>
15752 rm -f conftest.$ac_objext
15753 if { (eval echo "$as_me:15753: \"$ac_compile\"") >&5
15754 (eval $ac_compile) 2>&5
15756 echo "$as_me:15756: \$? = $ac_status" >&5
15757 (exit $ac_status); } &&
15758 { ac_try='test -s conftest.$ac_objext'
15759 { (eval echo "$as_me:15759: \"$ac_try\"") >&5
15760 (eval $ac_try) 2>&5
15762 echo "$as_me:15762: \$? = $ac_status" >&5
15763 (exit $ac_status); }; }; then
15764 cf_cv_mbstate_t=yes
15766 echo "$as_me: failed program was:" >&5
15767 cat conftest.$ac_ext >&5
15768 cf_cv_mbstate_t=unknown
15770 rm -f conftest.$ac_objext conftest.$ac_ext
15772 rm -f conftest.$ac_objext conftest.$ac_ext
15774 echo "$as_me:15774: result: $cf_cv_mbstate_t" >&5
15775 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15777 if test "$cf_cv_mbstate_t" = yes ; then
15779 cat >>confdefs.h <<\EOF
15780 #define NEED_WCHAR_H 1
15786 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15787 if test "$cf_cv_mbstate_t" = unknown ; then
15788 NCURSES_MBSTATE_T=1
15791 # if we find mbstate_t in either place, use substitution to provide a fallback.
15792 if test "$cf_cv_mbstate_t" != unknown ; then
15793 NCURSES_OK_MBSTATE_T=1
15796 # This is needed on Tru64 5.0 to declare wchar_t
15797 echo "$as_me:15797: checking if we must include wchar.h to declare wchar_t" >&5
15798 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15799 if test "${cf_cv_wchar_t+set}" = set; then
15800 echo $ECHO_N "(cached) $ECHO_C" >&6
15803 cat >conftest.$ac_ext <<_ACEOF
15804 #line 15804 "configure"
15805 #include "confdefs.h"
15807 #include <stdlib.h>
15808 #include <stdarg.h>
15810 #ifdef HAVE_LIBUTF8_H
15811 #include <libutf8.h>
15821 rm -f conftest.$ac_objext
15822 if { (eval echo "$as_me:15822: \"$ac_compile\"") >&5
15823 (eval $ac_compile) 2>&5
15825 echo "$as_me:15825: \$? = $ac_status" >&5
15826 (exit $ac_status); } &&
15827 { ac_try='test -s conftest.$ac_objext'
15828 { (eval echo "$as_me:15828: \"$ac_try\"") >&5
15829 (eval $ac_try) 2>&5
15831 echo "$as_me:15831: \$? = $ac_status" >&5
15832 (exit $ac_status); }; }; then
15835 echo "$as_me: failed program was:" >&5
15836 cat conftest.$ac_ext >&5
15837 cat >conftest.$ac_ext <<_ACEOF
15838 #line 15838 "configure"
15839 #include "confdefs.h"
15841 #include <stdlib.h>
15842 #include <stdarg.h>
15845 #ifdef HAVE_LIBUTF8_H
15846 #include <libutf8.h>
15856 rm -f conftest.$ac_objext
15857 if { (eval echo "$as_me:15857: \"$ac_compile\"") >&5
15858 (eval $ac_compile) 2>&5
15860 echo "$as_me:15860: \$? = $ac_status" >&5
15861 (exit $ac_status); } &&
15862 { ac_try='test -s conftest.$ac_objext'
15863 { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864 (eval $ac_try) 2>&5
15866 echo "$as_me:15866: \$? = $ac_status" >&5
15867 (exit $ac_status); }; }; then
15870 echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 cf_cv_wchar_t=unknown
15874 rm -f conftest.$ac_objext conftest.$ac_ext
15876 rm -f conftest.$ac_objext conftest.$ac_ext
15878 echo "$as_me:15878: result: $cf_cv_wchar_t" >&5
15879 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15881 if test "$cf_cv_wchar_t" = yes ; then
15883 cat >>confdefs.h <<\EOF
15884 #define NEED_WCHAR_H 1
15890 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15891 if test "$cf_cv_wchar_t" = unknown ; then
15895 # if we find wchar_t in either place, use substitution to provide a fallback.
15896 if test "$cf_cv_wchar_t" != unknown ; then
15897 NCURSES_OK_WCHAR_T=1
15900 # This is needed on Tru64 5.0 to declare wint_t
15901 echo "$as_me:15901: checking if we must include wchar.h to declare wint_t" >&5
15902 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15903 if test "${cf_cv_wint_t+set}" = set; then
15904 echo $ECHO_N "(cached) $ECHO_C" >&6
15907 cat >conftest.$ac_ext <<_ACEOF
15908 #line 15908 "configure"
15909 #include "confdefs.h"
15911 #include <stdlib.h>
15912 #include <stdarg.h>
15914 #ifdef HAVE_LIBUTF8_H
15915 #include <libutf8.h>
15925 rm -f conftest.$ac_objext
15926 if { (eval echo "$as_me:15926: \"$ac_compile\"") >&5
15927 (eval $ac_compile) 2>&5
15929 echo "$as_me:15929: \$? = $ac_status" >&5
15930 (exit $ac_status); } &&
15931 { ac_try='test -s conftest.$ac_objext'
15932 { (eval echo "$as_me:15932: \"$ac_try\"") >&5
15933 (eval $ac_try) 2>&5
15935 echo "$as_me:15935: \$? = $ac_status" >&5
15936 (exit $ac_status); }; }; then
15939 echo "$as_me: failed program was:" >&5
15940 cat conftest.$ac_ext >&5
15941 cat >conftest.$ac_ext <<_ACEOF
15942 #line 15942 "configure"
15943 #include "confdefs.h"
15945 #include <stdlib.h>
15946 #include <stdarg.h>
15949 #ifdef HAVE_LIBUTF8_H
15950 #include <libutf8.h>
15960 rm -f conftest.$ac_objext
15961 if { (eval echo "$as_me:15961: \"$ac_compile\"") >&5
15962 (eval $ac_compile) 2>&5
15964 echo "$as_me:15964: \$? = $ac_status" >&5
15965 (exit $ac_status); } &&
15966 { ac_try='test -s conftest.$ac_objext'
15967 { (eval echo "$as_me:15967: \"$ac_try\"") >&5
15968 (eval $ac_try) 2>&5
15970 echo "$as_me:15970: \$? = $ac_status" >&5
15971 (exit $ac_status); }; }; then
15974 echo "$as_me: failed program was:" >&5
15975 cat conftest.$ac_ext >&5
15976 cf_cv_wint_t=unknown
15978 rm -f conftest.$ac_objext conftest.$ac_ext
15980 rm -f conftest.$ac_objext conftest.$ac_ext
15982 echo "$as_me:15982: result: $cf_cv_wint_t" >&5
15983 echo "${ECHO_T}$cf_cv_wint_t" >&6
15985 if test "$cf_cv_wint_t" = yes ; then
15987 cat >>confdefs.h <<\EOF
15988 #define NEED_WCHAR_H 1
15994 # if we do not find wint_t in either place, use substitution to provide a fallback.
15995 if test "$cf_cv_wint_t" = unknown ; then
15999 # if we find wint_t in either place, use substitution to provide a fallback.
16000 if test "$cf_cv_wint_t" != unknown ; then
16001 NCURSES_OK_WINT_T=1
16004 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
16006 echo "$as_me:16006: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16007 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16008 cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16012 #ifndef _XOPEN_SOURCE_EXTENDED
16013 #define _XOPEN_SOURCE_EXTENDED
16015 #include <${cf_cv_ncurses_header:-curses.h}>
16026 rm -f conftest.$ac_objext
16027 if { (eval echo "$as_me:16027: \"$ac_compile\"") >&5
16028 (eval $ac_compile) 2>&5
16030 echo "$as_me:16030: \$? = $ac_status" >&5
16031 (exit $ac_status); } &&
16032 { ac_try='test -s conftest.$ac_objext'
16033 { (eval echo "$as_me:16033: \"$ac_try\"") >&5
16034 (eval $ac_try) 2>&5
16036 echo "$as_me:16036: \$? = $ac_status" >&5
16037 (exit $ac_status); }; }; then
16040 echo "$as_me: failed program was:" >&5
16041 cat conftest.$ac_ext >&5
16044 rm -f conftest.$ac_objext conftest.$ac_ext
16045 echo "$as_me:16045: result: $cf_result" >&5
16046 echo "${ECHO_T}$cf_result" >&6
16047 if test $cf_result = yes ; then
16049 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16051 cat >>confdefs.h <<EOF
16052 #define $cf_result 1
16057 cat >>confdefs.h <<EOF
16058 #define mbstate_t long
16065 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16067 echo "$as_me:16067: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16068 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16069 cat >conftest.$ac_ext <<_ACEOF
16070 #line 16070 "configure"
16071 #include "confdefs.h"
16073 #ifndef _XOPEN_SOURCE_EXTENDED
16074 #define _XOPEN_SOURCE_EXTENDED
16076 #include <${cf_cv_ncurses_header:-curses.h}>
16087 rm -f conftest.$ac_objext
16088 if { (eval echo "$as_me:16088: \"$ac_compile\"") >&5
16089 (eval $ac_compile) 2>&5
16091 echo "$as_me:16091: \$? = $ac_status" >&5
16092 (exit $ac_status); } &&
16093 { ac_try='test -s conftest.$ac_objext'
16094 { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095 (eval $ac_try) 2>&5
16097 echo "$as_me:16097: \$? = $ac_status" >&5
16098 (exit $ac_status); }; }; then
16101 echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16105 rm -f conftest.$ac_objext conftest.$ac_ext
16106 echo "$as_me:16106: result: $cf_result" >&5
16107 echo "${ECHO_T}$cf_result" >&6
16108 if test $cf_result = yes ; then
16110 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16112 cat >>confdefs.h <<EOF
16113 #define $cf_result 1
16118 cat >>confdefs.h <<EOF
16119 #define wchar_t long
16126 if test "$NCURSES_OK_WINT_T" = 0 ; then
16128 echo "$as_me:16128: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16129 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16130 cat >conftest.$ac_ext <<_ACEOF
16131 #line 16131 "configure"
16132 #include "confdefs.h"
16134 #ifndef _XOPEN_SOURCE_EXTENDED
16135 #define _XOPEN_SOURCE_EXTENDED
16137 #include <${cf_cv_ncurses_header:-curses.h}>
16148 rm -f conftest.$ac_objext
16149 if { (eval echo "$as_me:16149: \"$ac_compile\"") >&5
16150 (eval $ac_compile) 2>&5
16152 echo "$as_me:16152: \$? = $ac_status" >&5
16153 (exit $ac_status); } &&
16154 { ac_try='test -s conftest.$ac_objext'
16155 { (eval echo "$as_me:16155: \"$ac_try\"") >&5
16156 (eval $ac_try) 2>&5
16158 echo "$as_me:16158: \$? = $ac_status" >&5
16159 (exit $ac_status); }; }; then
16162 echo "$as_me: failed program was:" >&5
16163 cat conftest.$ac_ext >&5
16166 rm -f conftest.$ac_objext conftest.$ac_ext
16167 echo "$as_me:16167: result: $cf_result" >&5
16168 echo "${ECHO_T}$cf_result" >&6
16169 if test $cf_result = yes ; then
16171 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16173 cat >>confdefs.h <<EOF
16174 #define $cf_result 1
16179 cat >>confdefs.h <<EOF
16180 #define wint_t long
16188 echo "$as_me:16188: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16189 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16191 cat >conftest.$ac_ext <<_ACEOF
16192 #line 16192 "configure"
16193 #include "confdefs.h"
16195 #ifdef HAVE_XCURSES
16196 #include <xcurses.h>
16197 char * XCursesProgramName = "test";
16199 #include <${cf_cv_ncurses_header:-curses.h}>
16200 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16201 #include <ncursesw/term.h>
16202 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16203 #include <ncurses/term.h>
16204 #elif defined(HAVE_TERM_H)
16213 void *foo = &(ospeed)
16219 rm -f conftest.$ac_objext
16220 if { (eval echo "$as_me:16220: \"$ac_compile\"") >&5
16221 (eval $ac_compile) 2>&5
16223 echo "$as_me:16223: \$? = $ac_status" >&5
16224 (exit $ac_status); } &&
16225 { ac_try='test -s conftest.$ac_objext'
16226 { (eval echo "$as_me:16226: \"$ac_try\"") >&5
16227 (eval $ac_try) 2>&5
16229 echo "$as_me:16229: \$? = $ac_status" >&5
16230 (exit $ac_status); }; }; then
16233 echo "$as_me: failed program was:" >&5
16234 cat conftest.$ac_ext >&5
16237 rm -f conftest.$ac_objext conftest.$ac_ext
16238 echo "$as_me:16238: result: $cf_result" >&5
16239 echo "${ECHO_T}$cf_result" >&6
16241 if test $cf_result = yes ; then
16243 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16245 cat >>confdefs.h <<EOF
16246 #define $cf_result 1
16250 echo "$as_me:16250: checking for data ospeed in library" >&5
16251 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16252 # BSD linkers insist on making weak linkage, but resolve at runtime.
16253 if test "$cross_compiling" = yes; then
16256 cat >conftest.$ac_ext <<_ACEOF
16257 #line 16257 "configure"
16258 #include "confdefs.h"
16260 #ifdef HAVE_XCURSES
16261 #include <xcurses.h>
16262 char * XCursesProgramName = "test";
16264 #include <${cf_cv_ncurses_header:-curses.h}>
16265 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16266 #include <ncursesw/term.h>
16267 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16268 #include <ncurses/term.h>
16269 #elif defined(HAVE_TERM_H)
16274 extern char ospeed;
16280 void *foo = &(ospeed);
16281 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16282 ${cf_cv_main_return:-return}(foo == 0);
16289 rm -f conftest.$ac_objext conftest$ac_exeext
16290 if { (eval echo "$as_me:16290: \"$ac_link\"") >&5
16291 (eval $ac_link) 2>&5
16293 echo "$as_me:16293: \$? = $ac_status" >&5
16294 (exit $ac_status); } &&
16295 { ac_try='test -s conftest$ac_exeext'
16296 { (eval echo "$as_me:16296: \"$ac_try\"") >&5
16297 (eval $ac_try) 2>&5
16299 echo "$as_me:16299: \$? = $ac_status" >&5
16300 (exit $ac_status); }; }; then
16303 echo "$as_me: failed program was:" >&5
16304 cat conftest.$ac_ext >&5
16307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16310 cat >conftest.$ac_ext <<_ACEOF
16311 #line 16311 "configure"
16312 #include "confdefs.h"
16314 #ifdef HAVE_XCURSES
16315 #include <xcurses.h>
16316 char * XCursesProgramName = "test";
16318 #include <${cf_cv_ncurses_header:-curses.h}>
16319 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16320 #include <ncursesw/term.h>
16321 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16322 #include <ncurses/term.h>
16323 #elif defined(HAVE_TERM_H)
16328 extern char ospeed;
16331 void *foo = &(ospeed);
16332 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16333 ${cf_cv_main_return:-return}(foo == 0);
16336 rm -f conftest$ac_exeext
16337 if { (eval echo "$as_me:16337: \"$ac_link\"") >&5
16338 (eval $ac_link) 2>&5
16340 echo "$as_me:16340: \$? = $ac_status" >&5
16341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16342 { (eval echo "$as_me:16342: \"$ac_try\"") >&5
16343 (eval $ac_try) 2>&5
16345 echo "$as_me:16345: \$? = $ac_status" >&5
16346 (exit $ac_status); }; }; then
16349 echo "$as_me: program exited with status $ac_status" >&5
16350 echo "$as_me: failed program was:" >&5
16351 cat conftest.$ac_ext >&5
16354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16356 echo "$as_me:16356: result: $cf_result" >&5
16357 echo "${ECHO_T}$cf_result" >&6
16358 if test $cf_result = yes ; then
16360 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16362 cat >>confdefs.h <<EOF
16363 #define $cf_result 1
16369 echo "$as_me:16369: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16370 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16372 cat >conftest.$ac_ext <<_ACEOF
16373 #line 16373 "configure"
16374 #include "confdefs.h"
16376 #ifdef HAVE_XCURSES
16377 #include <xcurses.h>
16378 char * XCursesProgramName = "test";
16380 #include <${cf_cv_ncurses_header:-curses.h}>
16381 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16382 #include <ncursesw/term.h>
16383 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16384 #include <ncurses/term.h>
16385 #elif defined(HAVE_TERM_H)
16394 void *foo = &(boolnames)
16400 rm -f conftest.$ac_objext
16401 if { (eval echo "$as_me:16401: \"$ac_compile\"") >&5
16402 (eval $ac_compile) 2>&5
16404 echo "$as_me:16404: \$? = $ac_status" >&5
16405 (exit $ac_status); } &&
16406 { ac_try='test -s conftest.$ac_objext'
16407 { (eval echo "$as_me:16407: \"$ac_try\"") >&5
16408 (eval $ac_try) 2>&5
16410 echo "$as_me:16410: \$? = $ac_status" >&5
16411 (exit $ac_status); }; }; then
16414 echo "$as_me: failed program was:" >&5
16415 cat conftest.$ac_ext >&5
16418 rm -f conftest.$ac_objext conftest.$ac_ext
16419 echo "$as_me:16419: result: $cf_result" >&5
16420 echo "${ECHO_T}$cf_result" >&6
16422 if test $cf_result = yes ; then
16424 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16426 cat >>confdefs.h <<EOF
16427 #define $cf_result 1
16431 echo "$as_me:16431: checking for data boolnames in library" >&5
16432 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16433 # BSD linkers insist on making weak linkage, but resolve at runtime.
16434 if test "$cross_compiling" = yes; then
16437 cat >conftest.$ac_ext <<_ACEOF
16438 #line 16438 "configure"
16439 #include "confdefs.h"
16441 #ifdef HAVE_XCURSES
16442 #include <xcurses.h>
16443 char * XCursesProgramName = "test";
16445 #include <${cf_cv_ncurses_header:-curses.h}>
16446 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16447 #include <ncursesw/term.h>
16448 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16449 #include <ncurses/term.h>
16450 #elif defined(HAVE_TERM_H)
16455 extern char boolnames;
16461 void *foo = &(boolnames);
16462 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16463 ${cf_cv_main_return:-return}(foo == 0);
16470 rm -f conftest.$ac_objext conftest$ac_exeext
16471 if { (eval echo "$as_me:16471: \"$ac_link\"") >&5
16472 (eval $ac_link) 2>&5
16474 echo "$as_me:16474: \$? = $ac_status" >&5
16475 (exit $ac_status); } &&
16476 { ac_try='test -s conftest$ac_exeext'
16477 { (eval echo "$as_me:16477: \"$ac_try\"") >&5
16478 (eval $ac_try) 2>&5
16480 echo "$as_me:16480: \$? = $ac_status" >&5
16481 (exit $ac_status); }; }; then
16484 echo "$as_me: failed program was:" >&5
16485 cat conftest.$ac_ext >&5
16488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16491 cat >conftest.$ac_ext <<_ACEOF
16492 #line 16492 "configure"
16493 #include "confdefs.h"
16495 #ifdef HAVE_XCURSES
16496 #include <xcurses.h>
16497 char * XCursesProgramName = "test";
16499 #include <${cf_cv_ncurses_header:-curses.h}>
16500 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16501 #include <ncursesw/term.h>
16502 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16503 #include <ncurses/term.h>
16504 #elif defined(HAVE_TERM_H)
16509 extern char boolnames;
16512 void *foo = &(boolnames);
16513 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16514 ${cf_cv_main_return:-return}(foo == 0);
16517 rm -f conftest$ac_exeext
16518 if { (eval echo "$as_me:16518: \"$ac_link\"") >&5
16519 (eval $ac_link) 2>&5
16521 echo "$as_me:16521: \$? = $ac_status" >&5
16522 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16523 { (eval echo "$as_me:16523: \"$ac_try\"") >&5
16524 (eval $ac_try) 2>&5
16526 echo "$as_me:16526: \$? = $ac_status" >&5
16527 (exit $ac_status); }; }; then
16530 echo "$as_me: program exited with status $ac_status" >&5
16531 echo "$as_me: failed program was:" >&5
16532 cat conftest.$ac_ext >&5
16535 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16537 echo "$as_me:16537: result: $cf_result" >&5
16538 echo "${ECHO_T}$cf_result" >&6
16539 if test $cf_result = yes ; then
16541 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16543 cat >>confdefs.h <<EOF
16544 #define $cf_result 1
16550 echo "$as_me:16550: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16551 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16553 cat >conftest.$ac_ext <<_ACEOF
16554 #line 16554 "configure"
16555 #include "confdefs.h"
16557 #ifdef HAVE_XCURSES
16558 #include <xcurses.h>
16559 char * XCursesProgramName = "test";
16561 #include <${cf_cv_ncurses_header:-curses.h}>
16562 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16563 #include <ncursesw/term.h>
16564 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16565 #include <ncurses/term.h>
16566 #elif defined(HAVE_TERM_H)
16575 void *foo = &(boolfnames)
16581 rm -f conftest.$ac_objext
16582 if { (eval echo "$as_me:16582: \"$ac_compile\"") >&5
16583 (eval $ac_compile) 2>&5
16585 echo "$as_me:16585: \$? = $ac_status" >&5
16586 (exit $ac_status); } &&
16587 { ac_try='test -s conftest.$ac_objext'
16588 { (eval echo "$as_me:16588: \"$ac_try\"") >&5
16589 (eval $ac_try) 2>&5
16591 echo "$as_me:16591: \$? = $ac_status" >&5
16592 (exit $ac_status); }; }; then
16595 echo "$as_me: failed program was:" >&5
16596 cat conftest.$ac_ext >&5
16599 rm -f conftest.$ac_objext conftest.$ac_ext
16600 echo "$as_me:16600: result: $cf_result" >&5
16601 echo "${ECHO_T}$cf_result" >&6
16603 if test $cf_result = yes ; then
16605 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16607 cat >>confdefs.h <<EOF
16608 #define $cf_result 1
16612 echo "$as_me:16612: checking for data boolfnames in library" >&5
16613 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16614 # BSD linkers insist on making weak linkage, but resolve at runtime.
16615 if test "$cross_compiling" = yes; then
16618 cat >conftest.$ac_ext <<_ACEOF
16619 #line 16619 "configure"
16620 #include "confdefs.h"
16622 #ifdef HAVE_XCURSES
16623 #include <xcurses.h>
16624 char * XCursesProgramName = "test";
16626 #include <${cf_cv_ncurses_header:-curses.h}>
16627 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16628 #include <ncursesw/term.h>
16629 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16630 #include <ncurses/term.h>
16631 #elif defined(HAVE_TERM_H)
16636 extern char boolfnames;
16642 void *foo = &(boolfnames);
16643 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16644 ${cf_cv_main_return:-return}(foo == 0);
16651 rm -f conftest.$ac_objext conftest$ac_exeext
16652 if { (eval echo "$as_me:16652: \"$ac_link\"") >&5
16653 (eval $ac_link) 2>&5
16655 echo "$as_me:16655: \$? = $ac_status" >&5
16656 (exit $ac_status); } &&
16657 { ac_try='test -s conftest$ac_exeext'
16658 { (eval echo "$as_me:16658: \"$ac_try\"") >&5
16659 (eval $ac_try) 2>&5
16661 echo "$as_me:16661: \$? = $ac_status" >&5
16662 (exit $ac_status); }; }; then
16665 echo "$as_me: failed program was:" >&5
16666 cat conftest.$ac_ext >&5
16669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16672 cat >conftest.$ac_ext <<_ACEOF
16673 #line 16673 "configure"
16674 #include "confdefs.h"
16676 #ifdef HAVE_XCURSES
16677 #include <xcurses.h>
16678 char * XCursesProgramName = "test";
16680 #include <${cf_cv_ncurses_header:-curses.h}>
16681 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16682 #include <ncursesw/term.h>
16683 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16684 #include <ncurses/term.h>
16685 #elif defined(HAVE_TERM_H)
16690 extern char boolfnames;
16693 void *foo = &(boolfnames);
16694 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16695 ${cf_cv_main_return:-return}(foo == 0);
16698 rm -f conftest$ac_exeext
16699 if { (eval echo "$as_me:16699: \"$ac_link\"") >&5
16700 (eval $ac_link) 2>&5
16702 echo "$as_me:16702: \$? = $ac_status" >&5
16703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16704 { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705 (eval $ac_try) 2>&5
16707 echo "$as_me:16707: \$? = $ac_status" >&5
16708 (exit $ac_status); }; }; then
16711 echo "$as_me: program exited with status $ac_status" >&5
16712 echo "$as_me: failed program was:" >&5
16713 cat conftest.$ac_ext >&5
16716 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16718 echo "$as_me:16718: result: $cf_result" >&5
16719 echo "${ECHO_T}$cf_result" >&6
16720 if test $cf_result = yes ; then
16722 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16724 cat >>confdefs.h <<EOF
16725 #define $cf_result 1
16731 echo "$as_me:16731: checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16732 echo $ECHO_N "checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16734 cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16738 #ifdef HAVE_XCURSES
16739 #include <xcurses.h>
16740 char * XCursesProgramName = "test";
16742 #include <${cf_cv_ncurses_header:-curses.h}>
16743 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16744 #include <ncursesw/term.h>
16745 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16746 #include <ncurses/term.h>
16747 #elif defined(HAVE_TERM_H)
16756 void *foo = &(ttytype)
16762 rm -f conftest.$ac_objext
16763 if { (eval echo "$as_me:16763: \"$ac_compile\"") >&5
16764 (eval $ac_compile) 2>&5
16766 echo "$as_me:16766: \$? = $ac_status" >&5
16767 (exit $ac_status); } &&
16768 { ac_try='test -s conftest.$ac_objext'
16769 { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770 (eval $ac_try) 2>&5
16772 echo "$as_me:16772: \$? = $ac_status" >&5
16773 (exit $ac_status); }; }; then
16776 echo "$as_me: failed program was:" >&5
16777 cat conftest.$ac_ext >&5
16780 rm -f conftest.$ac_objext conftest.$ac_ext
16781 echo "$as_me:16781: result: $cf_result" >&5
16782 echo "${ECHO_T}$cf_result" >&6
16784 if test $cf_result = yes ; then
16786 cf_result=`echo "have_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16788 cat >>confdefs.h <<EOF
16789 #define $cf_result 1
16793 echo "$as_me:16793: checking for data ttytype in library" >&5
16794 echo $ECHO_N "checking for data ttytype in library... $ECHO_C" >&6
16795 # BSD linkers insist on making weak linkage, but resolve at runtime.
16796 if test "$cross_compiling" = yes; then
16799 cat >conftest.$ac_ext <<_ACEOF
16800 #line 16800 "configure"
16801 #include "confdefs.h"
16803 #ifdef HAVE_XCURSES
16804 #include <xcurses.h>
16805 char * XCursesProgramName = "test";
16807 #include <${cf_cv_ncurses_header:-curses.h}>
16808 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16809 #include <ncursesw/term.h>
16810 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16811 #include <ncurses/term.h>
16812 #elif defined(HAVE_TERM_H)
16817 extern char ttytype;
16823 void *foo = &(ttytype);
16824 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16825 ${cf_cv_main_return:-return}(foo == 0);
16832 rm -f conftest.$ac_objext conftest$ac_exeext
16833 if { (eval echo "$as_me:16833: \"$ac_link\"") >&5
16834 (eval $ac_link) 2>&5
16836 echo "$as_me:16836: \$? = $ac_status" >&5
16837 (exit $ac_status); } &&
16838 { ac_try='test -s conftest$ac_exeext'
16839 { (eval echo "$as_me:16839: \"$ac_try\"") >&5
16840 (eval $ac_try) 2>&5
16842 echo "$as_me:16842: \$? = $ac_status" >&5
16843 (exit $ac_status); }; }; then
16846 echo "$as_me: failed program was:" >&5
16847 cat conftest.$ac_ext >&5
16850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16853 cat >conftest.$ac_ext <<_ACEOF
16854 #line 16854 "configure"
16855 #include "confdefs.h"
16857 #ifdef HAVE_XCURSES
16858 #include <xcurses.h>
16859 char * XCursesProgramName = "test";
16861 #include <${cf_cv_ncurses_header:-curses.h}>
16862 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16863 #include <ncursesw/term.h>
16864 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16865 #include <ncurses/term.h>
16866 #elif defined(HAVE_TERM_H)
16871 extern char ttytype;
16874 void *foo = &(ttytype);
16875 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16876 ${cf_cv_main_return:-return}(foo == 0);
16879 rm -f conftest$ac_exeext
16880 if { (eval echo "$as_me:16880: \"$ac_link\"") >&5
16881 (eval $ac_link) 2>&5
16883 echo "$as_me:16883: \$? = $ac_status" >&5
16884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16885 { (eval echo "$as_me:16885: \"$ac_try\"") >&5
16886 (eval $ac_try) 2>&5
16888 echo "$as_me:16888: \$? = $ac_status" >&5
16889 (exit $ac_status); }; }; then
16892 echo "$as_me: program exited with status $ac_status" >&5
16893 echo "$as_me: failed program was:" >&5
16894 cat conftest.$ac_ext >&5
16897 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16899 echo "$as_me:16899: result: $cf_result" >&5
16900 echo "${ECHO_T}$cf_result" >&6
16901 if test $cf_result = yes ; then
16903 cf_result=`echo "decl_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16905 cat >>confdefs.h <<EOF
16906 #define $cf_result 1
16912 if ( test "$GCC" = yes || test "$GXX" = yes )
16914 echo "$as_me:16914: checking if you want to turn on gcc warnings" >&5
16915 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16917 # Check whether --enable-warnings or --disable-warnings was given.
16918 if test "${enable_warnings+set}" = set; then
16919 enableval="$enable_warnings"
16920 test "$enableval" != yes && enableval=no
16921 if test "$enableval" != "no" ; then
16931 echo "$as_me:16931: result: $with_warnings" >&5
16932 echo "${ECHO_T}$with_warnings" >&6
16933 if test "$with_warnings" = "yes"
16936 if test "$GCC" = yes
16938 cat > conftest.i <<EOF
16940 #define GCC_PRINTF 0
16943 #define GCC_SCANF 0
16945 #ifndef GCC_NORETURN
16946 #define GCC_NORETURN /* nothing */
16949 #define GCC_UNUSED /* nothing */
16952 if test "$GCC" = yes
16954 { echo "$as_me:16954: checking for $CC __attribute__ directives..." >&5
16955 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16956 cat > conftest.$ac_ext <<EOF
16957 #line 16957 "${as_me:-configure}"
16958 #include "confdefs.h"
16959 #include "conftest.h"
16960 #include "conftest.i"
16962 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16964 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16967 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16969 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16971 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16972 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16973 extern void foo(void) GCC_NORETURN;
16974 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16976 cf_printf_attribute=no
16977 cf_scanf_attribute=no
16978 for cf_attribute in scanf printf unused noreturn
16981 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16983 cf_directive="__attribute__(($cf_attribute))"
16984 echo "checking for $CC $cf_directive" 1>&5
16986 case $cf_attribute in
16988 cf_printf_attribute=yes
16989 cat >conftest.h <<EOF
16990 #define GCC_$cf_ATTRIBUTE 1
16994 cf_scanf_attribute=yes
16995 cat >conftest.h <<EOF
16996 #define GCC_$cf_ATTRIBUTE 1
17000 cat >conftest.h <<EOF
17001 #define GCC_$cf_ATTRIBUTE $cf_directive
17006 if { (eval echo "$as_me:17006: \"$ac_compile\"") >&5
17007 (eval $ac_compile) 2>&5
17009 echo "$as_me:17009: \$? = $ac_status" >&5
17010 (exit $ac_status); }; then
17011 test -n "$verbose" && echo "$as_me:17011: result: ... $cf_attribute" >&5
17012 echo "${ECHO_T}... $cf_attribute" >&6
17013 cat conftest.h >>confdefs.h
17014 case $cf_attribute in
17017 cat >>confdefs.h <<EOF
17018 #define GCC_NORETURN $cf_directive
17023 cf_value='/* nothing */'
17024 if test "$cf_printf_attribute" != no ; then
17025 cf_value='__attribute__((format(printf,fmt,var)))'
17027 cat >>confdefs.h <<\EOF
17028 #define GCC_PRINTF 1
17033 cat >>confdefs.h <<EOF
17034 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17039 cf_value='/* nothing */'
17040 if test "$cf_scanf_attribute" != no ; then
17041 cf_value='__attribute__((format(scanf,fmt,var)))'
17043 cat >>confdefs.h <<\EOF
17044 #define GCC_SCANF 1
17049 cat >>confdefs.h <<EOF
17050 #define GCC_SCANFLIKE(fmt,var) $cf_value
17056 cat >>confdefs.h <<EOF
17057 #define GCC_UNUSED $cf_directive
17065 fgrep define conftest.i >>confdefs.h
17072 if test "$GCC" = yes ; then
17075 echo "$as_me:17075: checking if this is really Intel C compiler" >&5
17076 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17077 cf_save_CFLAGS="$CFLAGS"
17078 CFLAGS="$CFLAGS -no-gcc"
17079 cat >conftest.$ac_ext <<_ACEOF
17080 #line 17080 "configure"
17081 #include "confdefs.h"
17087 #ifdef __INTEL_COMPILER
17096 rm -f conftest.$ac_objext
17097 if { (eval echo "$as_me:17097: \"$ac_compile\"") >&5
17098 (eval $ac_compile) 2>&5
17100 echo "$as_me:17100: \$? = $ac_status" >&5
17101 (exit $ac_status); } &&
17102 { ac_try='test -s conftest.$ac_objext'
17103 { (eval echo "$as_me:17103: \"$ac_try\"") >&5
17104 (eval $ac_try) 2>&5
17106 echo "$as_me:17106: \$? = $ac_status" >&5
17107 (exit $ac_status); }; }; then
17109 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17112 echo "$as_me: failed program was:" >&5
17113 cat conftest.$ac_ext >&5
17115 rm -f conftest.$ac_objext conftest.$ac_ext
17116 CFLAGS="$cf_save_CFLAGS"
17117 echo "$as_me:17117: result: $INTEL_COMPILER" >&5
17118 echo "${ECHO_T}$INTEL_COMPILER" >&6
17125 if test "$GCC" = yes ; then
17126 echo "$as_me:17126: checking if this is really Clang C compiler" >&5
17127 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17128 cf_save_CFLAGS="$CFLAGS"
17129 CFLAGS="$CFLAGS -Qunused-arguments"
17130 cat >conftest.$ac_ext <<_ACEOF
17131 #line 17131 "configure"
17132 #include "confdefs.h"
17147 rm -f conftest.$ac_objext
17148 if { (eval echo "$as_me:17148: \"$ac_compile\"") >&5
17149 (eval $ac_compile) 2>&5
17151 echo "$as_me:17151: \$? = $ac_status" >&5
17152 (exit $ac_status); } &&
17153 { ac_try='test -s conftest.$ac_objext'
17154 { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155 (eval $ac_try) 2>&5
17157 echo "$as_me:17157: \$? = $ac_status" >&5
17158 (exit $ac_status); }; }; then
17160 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17163 echo "$as_me: failed program was:" >&5
17164 cat conftest.$ac_ext >&5
17166 rm -f conftest.$ac_objext conftest.$ac_ext
17167 CFLAGS="$cf_save_CFLAGS"
17168 echo "$as_me:17168: result: $CLANG_COMPILER" >&5
17169 echo "${ECHO_T}$CLANG_COMPILER" >&6
17172 cat > conftest.$ac_ext <<EOF
17173 #line 17173 "${as_me:-configure}"
17174 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17177 if test "$INTEL_COMPILER" = yes
17179 # The "-wdXXX" options suppress warnings:
17180 # remark #1419: external declaration in primary source file
17181 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17182 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17183 # remark #193: zero used for undefined preprocessing identifier
17184 # remark #593: variable "curs_sb_left_arrow" was set but never used
17185 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17186 # remark #869: parameter "tw" was never referenced
17187 # remark #981: operands are evaluated in unspecified order
17188 # warning #279: controlling expression is constant
17190 { echo "$as_me:17190: checking for $CC warning options..." >&5
17191 echo "$as_me: checking for $CC warning options..." >&6;}
17192 cf_save_CFLAGS="$CFLAGS"
17193 EXTRA_CFLAGS="-Wall"
17205 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17206 if { (eval echo "$as_me:17206: \"$ac_compile\"") >&5
17207 (eval $ac_compile) 2>&5
17209 echo "$as_me:17209: \$? = $ac_status" >&5
17210 (exit $ac_status); }; then
17211 test -n "$verbose" && echo "$as_me:17211: result: ... -$cf_opt" >&5
17212 echo "${ECHO_T}... -$cf_opt" >&6
17213 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17216 CFLAGS="$cf_save_CFLAGS"
17218 elif test "$GCC" = yes
17220 { echo "$as_me:17220: checking for $CC warning options..." >&5
17221 echo "$as_me: checking for $CC warning options..." >&6;}
17222 cf_save_CFLAGS="$CFLAGS"
17225 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17226 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17227 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17228 for cf_opt in W Wall \
17229 Wbad-function-cast \
17232 Wdeclaration-after-statement \
17235 Wmissing-declarations \
17236 Wmissing-prototypes \
17240 Wstrict-prototypes \
17241 Wundef $cf_gcc_warnings $cf_warn_CONST
17243 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17244 if { (eval echo "$as_me:17244: \"$ac_compile\"") >&5
17245 (eval $ac_compile) 2>&5
17247 echo "$as_me:17247: \$? = $ac_status" >&5
17248 (exit $ac_status); }; then
17249 test -n "$verbose" && echo "$as_me:17249: result: ... -$cf_opt" >&5
17250 echo "${ECHO_T}... -$cf_opt" >&6
17253 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17256 case $GCC_VERSION in
17258 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17260 echo "${as_me:-configure}:17260: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17266 case $GCC_VERSION in
17268 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17270 echo "${as_me:-configure}:17270: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17276 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17279 CFLAGS="$cf_save_CFLAGS"
17286 echo "$as_me:17286: checking if you want to use dmalloc for testing" >&5
17287 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17289 # Check whether --with-dmalloc or --without-dmalloc was given.
17290 if test "${with_dmalloc+set}" = set; then
17291 withval="$with_dmalloc"
17293 cat >>confdefs.h <<EOF
17294 #define USE_DMALLOC 1
17297 : ${with_cflags:=-g}
17298 : ${with_no_leaks:=yes}
17303 echo "$as_me:17303: result: ${with_dmalloc:-no}" >&5
17304 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17306 case .$with_cflags in
17316 cf_new_extra_cppflags=
17318 for cf_add_cflags in -g
17320 case $cf_fix_cppflags in
17322 case $cf_add_cflags in
17323 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17324 case $cf_add_cflags in
17326 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17328 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17329 && test -z "${cf_tst_cflags}" \
17330 && cf_fix_cppflags=yes
17332 if test $cf_fix_cppflags = yes ; then
17333 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17335 elif test "${cf_tst_cflags}" = "\"'" ; then
17336 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17341 case "$CPPFLAGS" in
17345 case $cf_add_cflags in
17347 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17349 CPPFLAGS=`echo "$CPPFLAGS" | \
17350 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17351 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17355 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17360 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17365 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17367 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17369 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17370 && test -z "${cf_tst_cflags}" \
17371 && cf_fix_cppflags=no
17376 if test -n "$cf_new_cflags" ; then
17378 CFLAGS="$CFLAGS $cf_new_cflags"
17381 if test -n "$cf_new_cppflags" ; then
17383 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17386 if test -n "$cf_new_extra_cppflags" ; then
17388 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17396 if test "$with_dmalloc" = yes ; then
17397 echo "$as_me:17397: checking for dmalloc.h" >&5
17398 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17399 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17400 echo $ECHO_N "(cached) $ECHO_C" >&6
17402 cat >conftest.$ac_ext <<_ACEOF
17403 #line 17403 "configure"
17404 #include "confdefs.h"
17405 #include <dmalloc.h>
17407 if { (eval echo "$as_me:17407: \"$ac_cpp conftest.$ac_ext\"") >&5
17408 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17410 egrep -v '^ *\+' conftest.er1 >conftest.err
17412 cat conftest.err >&5
17413 echo "$as_me:17413: \$? = $ac_status" >&5
17414 (exit $ac_status); } >/dev/null; then
17415 if test -s conftest.err; then
17416 ac_cpp_err=$ac_c_preproc_warn_flag
17423 if test -z "$ac_cpp_err"; then
17424 ac_cv_header_dmalloc_h=yes
17426 echo "$as_me: failed program was:" >&5
17427 cat conftest.$ac_ext >&5
17428 ac_cv_header_dmalloc_h=no
17430 rm -f conftest.err conftest.$ac_ext
17432 echo "$as_me:17432: result: $ac_cv_header_dmalloc_h" >&5
17433 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17434 if test $ac_cv_header_dmalloc_h = yes; then
17436 echo "$as_me:17436: checking for dmalloc_debug in -ldmalloc" >&5
17437 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17438 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17439 echo $ECHO_N "(cached) $ECHO_C" >&6
17441 ac_check_lib_save_LIBS=$LIBS
17442 LIBS="-ldmalloc $LIBS"
17443 cat >conftest.$ac_ext <<_ACEOF
17444 #line 17444 "configure"
17445 #include "confdefs.h"
17447 /* Override any gcc2 internal prototype to avoid an error. */
17451 /* We use char because int might match the return type of a gcc2
17452 builtin and then its argument prototype would still apply. */
17453 char dmalloc_debug ();
17462 rm -f conftest.$ac_objext conftest$ac_exeext
17463 if { (eval echo "$as_me:17463: \"$ac_link\"") >&5
17464 (eval $ac_link) 2>&5
17466 echo "$as_me:17466: \$? = $ac_status" >&5
17467 (exit $ac_status); } &&
17468 { ac_try='test -s conftest$ac_exeext'
17469 { (eval echo "$as_me:17469: \"$ac_try\"") >&5
17470 (eval $ac_try) 2>&5
17472 echo "$as_me:17472: \$? = $ac_status" >&5
17473 (exit $ac_status); }; }; then
17474 ac_cv_lib_dmalloc_dmalloc_debug=yes
17476 echo "$as_me: failed program was:" >&5
17477 cat conftest.$ac_ext >&5
17478 ac_cv_lib_dmalloc_dmalloc_debug=no
17480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17481 LIBS=$ac_check_lib_save_LIBS
17483 echo "$as_me:17483: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17484 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17485 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17486 cat >>confdefs.h <<EOF
17487 #define HAVE_LIBDMALLOC 1
17490 LIBS="-ldmalloc $LIBS"
17498 echo "$as_me:17498: checking if you want to use dbmalloc for testing" >&5
17499 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17501 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17502 if test "${with_dbmalloc+set}" = set; then
17503 withval="$with_dbmalloc"
17505 cat >>confdefs.h <<EOF
17506 #define USE_DBMALLOC 1
17509 : ${with_cflags:=-g}
17510 : ${with_no_leaks:=yes}
17515 echo "$as_me:17515: result: ${with_dbmalloc:-no}" >&5
17516 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17518 case .$with_cflags in
17528 cf_new_extra_cppflags=
17530 for cf_add_cflags in -g
17532 case $cf_fix_cppflags in
17534 case $cf_add_cflags in
17535 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17536 case $cf_add_cflags in
17538 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17540 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17541 && test -z "${cf_tst_cflags}" \
17542 && cf_fix_cppflags=yes
17544 if test $cf_fix_cppflags = yes ; then
17545 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17547 elif test "${cf_tst_cflags}" = "\"'" ; then
17548 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17553 case "$CPPFLAGS" in
17557 case $cf_add_cflags in
17559 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17561 CPPFLAGS=`echo "$CPPFLAGS" | \
17562 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17563 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17567 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17572 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17577 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17579 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17581 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17582 && test -z "${cf_tst_cflags}" \
17583 && cf_fix_cppflags=no
17588 if test -n "$cf_new_cflags" ; then
17590 CFLAGS="$CFLAGS $cf_new_cflags"
17593 if test -n "$cf_new_cppflags" ; then
17595 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17598 if test -n "$cf_new_extra_cppflags" ; then
17600 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17608 if test "$with_dbmalloc" = yes ; then
17609 echo "$as_me:17609: checking for dbmalloc.h" >&5
17610 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17611 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17612 echo $ECHO_N "(cached) $ECHO_C" >&6
17614 cat >conftest.$ac_ext <<_ACEOF
17615 #line 17615 "configure"
17616 #include "confdefs.h"
17617 #include <dbmalloc.h>
17619 if { (eval echo "$as_me:17619: \"$ac_cpp conftest.$ac_ext\"") >&5
17620 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17622 egrep -v '^ *\+' conftest.er1 >conftest.err
17624 cat conftest.err >&5
17625 echo "$as_me:17625: \$? = $ac_status" >&5
17626 (exit $ac_status); } >/dev/null; then
17627 if test -s conftest.err; then
17628 ac_cpp_err=$ac_c_preproc_warn_flag
17635 if test -z "$ac_cpp_err"; then
17636 ac_cv_header_dbmalloc_h=yes
17638 echo "$as_me: failed program was:" >&5
17639 cat conftest.$ac_ext >&5
17640 ac_cv_header_dbmalloc_h=no
17642 rm -f conftest.err conftest.$ac_ext
17644 echo "$as_me:17644: result: $ac_cv_header_dbmalloc_h" >&5
17645 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17646 if test $ac_cv_header_dbmalloc_h = yes; then
17648 echo "$as_me:17648: checking for debug_malloc in -ldbmalloc" >&5
17649 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17650 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17651 echo $ECHO_N "(cached) $ECHO_C" >&6
17653 ac_check_lib_save_LIBS=$LIBS
17654 LIBS="-ldbmalloc $LIBS"
17655 cat >conftest.$ac_ext <<_ACEOF
17656 #line 17656 "configure"
17657 #include "confdefs.h"
17659 /* Override any gcc2 internal prototype to avoid an error. */
17663 /* We use char because int might match the return type of a gcc2
17664 builtin and then its argument prototype would still apply. */
17665 char debug_malloc ();
17674 rm -f conftest.$ac_objext conftest$ac_exeext
17675 if { (eval echo "$as_me:17675: \"$ac_link\"") >&5
17676 (eval $ac_link) 2>&5
17678 echo "$as_me:17678: \$? = $ac_status" >&5
17679 (exit $ac_status); } &&
17680 { ac_try='test -s conftest$ac_exeext'
17681 { (eval echo "$as_me:17681: \"$ac_try\"") >&5
17682 (eval $ac_try) 2>&5
17684 echo "$as_me:17684: \$? = $ac_status" >&5
17685 (exit $ac_status); }; }; then
17686 ac_cv_lib_dbmalloc_debug_malloc=yes
17688 echo "$as_me: failed program was:" >&5
17689 cat conftest.$ac_ext >&5
17690 ac_cv_lib_dbmalloc_debug_malloc=no
17692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17693 LIBS=$ac_check_lib_save_LIBS
17695 echo "$as_me:17695: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17696 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17697 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17698 cat >>confdefs.h <<EOF
17699 #define HAVE_LIBDBMALLOC 1
17702 LIBS="-ldbmalloc $LIBS"
17710 echo "$as_me:17710: checking if you want to use valgrind for testing" >&5
17711 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17713 # Check whether --with-valgrind or --without-valgrind was given.
17714 if test "${with_valgrind+set}" = set; then
17715 withval="$with_valgrind"
17717 cat >>confdefs.h <<EOF
17718 #define USE_VALGRIND 1
17721 : ${with_cflags:=-g}
17722 : ${with_no_leaks:=yes}
17727 echo "$as_me:17727: result: ${with_valgrind:-no}" >&5
17728 echo "${ECHO_T}${with_valgrind:-no}" >&6
17730 case .$with_cflags in
17740 cf_new_extra_cppflags=
17742 for cf_add_cflags in -g
17744 case $cf_fix_cppflags in
17746 case $cf_add_cflags in
17747 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17748 case $cf_add_cflags in
17750 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17752 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17753 && test -z "${cf_tst_cflags}" \
17754 && cf_fix_cppflags=yes
17756 if test $cf_fix_cppflags = yes ; then
17757 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17759 elif test "${cf_tst_cflags}" = "\"'" ; then
17760 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17765 case "$CPPFLAGS" in
17769 case $cf_add_cflags in
17771 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17773 CPPFLAGS=`echo "$CPPFLAGS" | \
17774 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17775 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17779 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17784 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17789 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17791 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17793 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17794 && test -z "${cf_tst_cflags}" \
17795 && cf_fix_cppflags=no
17800 if test -n "$cf_new_cflags" ; then
17802 CFLAGS="$CFLAGS $cf_new_cflags"
17805 if test -n "$cf_new_cppflags" ; then
17807 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17810 if test -n "$cf_new_extra_cppflags" ; then
17812 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17820 echo "$as_me:17820: checking if you want to perform memory-leak testing" >&5
17821 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17823 # Check whether --enable-leaks or --disable-leaks was given.
17824 if test "${enable_leaks+set}" = set; then
17825 enableval="$enable_leaks"
17826 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17828 : ${with_no_leaks:=no}
17830 echo "$as_me:17830: result: $with_no_leaks" >&5
17831 echo "${ECHO_T}$with_no_leaks" >&6
17833 if test "$with_no_leaks" = yes ; then
17835 cat >>confdefs.h <<\EOF
17839 cat >>confdefs.h <<\EOF
17840 #define YY_NO_LEAKS 1
17846 echo "$as_me:17846: checking for an rpath option" >&5
17847 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17848 case $cf_cv_system_name in
17850 if test "$GCC" = yes; then
17851 LD_RPATH_OPT="-Wl,-rpath,"
17853 LD_RPATH_OPT="-rpath "
17856 (linux*|gnu*|k*bsd*-gnu|freebsd*)
17857 LD_RPATH_OPT="-Wl,-rpath,"
17859 (openbsd[2-9].*|mirbsd*)
17860 LD_RPATH_OPT="-Wl,-rpath,"
17863 LD_RPATH_OPT="-rpath "
17866 LD_RPATH_OPT="-Wl,-rpath,"
17869 LD_RPATH_OPT="-rpath "
17877 echo "$as_me:17877: result: $LD_RPATH_OPT" >&5
17878 echo "${ECHO_T}$LD_RPATH_OPT" >&6
17880 case "x$LD_RPATH_OPT" in
17882 echo "$as_me:17882: checking if we need a space after rpath option" >&5
17883 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17884 cf_save_LIBS="$LIBS"
17886 cf_add_libs="${LD_RPATH_OPT}$libdir"
17887 # Filter out duplicates - this happens with badly-designed ".pc" files...
17888 for cf_add_1lib in $LIBS
17890 for cf_add_2lib in $cf_add_libs
17892 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17898 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17900 LIBS="$cf_add_libs"
17902 cat >conftest.$ac_ext <<_ACEOF
17903 #line 17903 "configure"
17904 #include "confdefs.h"
17914 rm -f conftest.$ac_objext conftest$ac_exeext
17915 if { (eval echo "$as_me:17915: \"$ac_link\"") >&5
17916 (eval $ac_link) 2>&5
17918 echo "$as_me:17918: \$? = $ac_status" >&5
17919 (exit $ac_status); } &&
17920 { ac_try='test -s conftest$ac_exeext'
17921 { (eval echo "$as_me:17921: \"$ac_try\"") >&5
17922 (eval $ac_try) 2>&5
17924 echo "$as_me:17924: \$? = $ac_status" >&5
17925 (exit $ac_status); }; }; then
17928 echo "$as_me: failed program was:" >&5
17929 cat conftest.$ac_ext >&5
17932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17933 LIBS="$cf_save_LIBS"
17934 echo "$as_me:17934: result: $cf_rpath_space" >&5
17935 echo "${ECHO_T}$cf_rpath_space" >&6
17936 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17940 echo "$as_me:17940: checking if rpath-hack should be disabled" >&5
17941 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17943 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17944 if test "${enable_rpath_hack+set}" = set; then
17945 enableval="$enable_rpath_hack"
17946 test "$enableval" != no && enableval=yes
17947 if test "$enableval" != "yes" ; then
17948 cf_disable_rpath_hack=yes
17950 cf_disable_rpath_hack=no
17954 cf_disable_rpath_hack=no
17957 echo "$as_me:17957: result: $cf_disable_rpath_hack" >&5
17958 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17959 if test "$cf_disable_rpath_hack" = no ; then
17961 echo "$as_me:17961: checking for updated LDFLAGS" >&5
17962 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17963 if test -n "$LD_RPATH_OPT" ; then
17964 echo "$as_me:17964: result: maybe" >&5
17965 echo "${ECHO_T}maybe" >&6
17969 # Extract the first word of "$ac_prog", so it can be a program name with args.
17970 set dummy $ac_prog; ac_word=$2
17971 echo "$as_me:17971: checking for $ac_word" >&5
17972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17973 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17974 echo $ECHO_N "(cached) $ECHO_C" >&6
17976 if test -n "$cf_ldd_prog"; then
17977 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17979 ac_save_IFS=$IFS; IFS=$ac_path_separator
17981 for ac_dir in $ac_dummy; do
17983 test -z "$ac_dir" && ac_dir=.
17984 $as_executable_p "$ac_dir/$ac_word" || continue
17985 ac_cv_prog_cf_ldd_prog="$ac_prog"
17986 echo "$as_me:17986: found $ac_dir/$ac_word" >&5
17992 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17993 if test -n "$cf_ldd_prog"; then
17994 echo "$as_me:17994: result: $cf_ldd_prog" >&5
17995 echo "${ECHO_T}$cf_ldd_prog" >&6
17997 echo "$as_me:17997: result: no" >&5
17998 echo "${ECHO_T}no" >&6
18001 test -n "$cf_ldd_prog" && break
18003 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18005 cf_rpath_list="/usr/lib /lib"
18006 if test "$cf_ldd_prog" != no
18010 cat >conftest.$ac_ext <<_ACEOF
18011 #line 18011 "configure"
18012 #include "confdefs.h"
18022 rm -f conftest.$ac_objext conftest$ac_exeext
18023 if { (eval echo "$as_me:18023: \"$ac_link\"") >&5
18024 (eval $ac_link) 2>&5
18026 echo "$as_me:18026: \$? = $ac_status" >&5
18027 (exit $ac_status); } &&
18028 { ac_try='test -s conftest$ac_exeext'
18029 { (eval echo "$as_me:18029: \"$ac_try\"") >&5
18030 (eval $ac_try) 2>&5
18032 echo "$as_me:18032: \$? = $ac_status" >&5
18033 (exit $ac_status); }; }; then
18034 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
18035 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
18037 echo "$as_me: failed program was:" >&5
18038 cat conftest.$ac_ext >&5
18040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18042 # If we passed the link-test, but get a "not found" on a given library,
18043 # this could be due to inept reconfiguration of gcc to make it only
18044 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
18045 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
18046 # /usr/local libraries.
18047 if test -n "$cf_rpath_oops"
18049 for cf_rpath_src in $cf_rpath_oops
18051 for cf_rpath_dir in \
18056 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18058 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18060 echo "${as_me:-configure}:18060: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18062 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18070 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18072 echo "${as_me:-configure}:18072: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18074 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18076 echo "${as_me:-configure}:18076: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18079 for cf_rpath_src in $LDFLAGS
18081 case $cf_rpath_src in
18084 # check if this refers to a directory which we will ignore
18086 if test -n "$cf_rpath_list"
18088 for cf_rpath_item in $cf_rpath_list
18090 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18098 if test "$cf_rpath_skip" = no
18100 # transform the option
18101 if test "$LD_RPATH_OPT" = "-R " ; then
18102 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18104 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18107 # if we have not already added this, add it now
18108 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18109 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18111 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18113 echo "${as_me:-configure}:18113: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18115 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18120 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18122 LDFLAGS=$cf_rpath_dst
18124 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18126 echo "${as_me:-configure}:18126: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18128 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18130 echo "${as_me:-configure}:18130: testing ...checking LIBS $LIBS ..." 1>&5
18133 for cf_rpath_src in $LIBS
18135 case $cf_rpath_src in
18138 # check if this refers to a directory which we will ignore
18140 if test -n "$cf_rpath_list"
18142 for cf_rpath_item in $cf_rpath_list
18144 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18152 if test "$cf_rpath_skip" = no
18154 # transform the option
18155 if test "$LD_RPATH_OPT" = "-R " ; then
18156 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18158 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18161 # if we have not already added this, add it now
18162 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18163 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18165 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18167 echo "${as_me:-configure}:18167: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18169 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18174 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18178 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18180 echo "${as_me:-configure}:18180: testing ...checked LIBS $LIBS ..." 1>&5
18182 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18184 echo "${as_me:-configure}:18184: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18187 echo "$as_me:18187: result: no" >&5
18188 echo "${ECHO_T}no" >&6
18196 ac_config_files="$ac_config_files Makefile"
18197 ac_config_commands="$ac_config_commands default"
18198 cat >confcache <<\_ACEOF
18199 # This file is a shell script that caches the results of configure
18200 # tests run on this system so they can be shared between configure
18201 # scripts and configure runs, see configure's option --config-cache.
18202 # It is not useful on other systems. If it contains results you don't
18203 # want to keep, you may remove or edit it.
18205 # config.status only pays attention to the cache file if you give it
18206 # the --recheck option to rerun configure.
18208 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18209 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18210 # following values.
18214 # The following way of writing the cache mishandles newlines in values,
18215 # but we know of no workaround that is simple, portable, and efficient.
18216 # So, don't put newlines in cache variables' values.
18217 # Ultrix sh set writes to stderr and can't be redirected directly,
18218 # and sets the high bit in the cache file unless we assign to the vars.
18221 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18223 # `set' does not quote correctly, so add quotes (double-quote
18224 # substitution turns \\\\ into \\, and sed turns \\ into \).
18227 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18230 # `set' quotes correctly as required by POSIX, so do not add quotes.
18232 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18239 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18241 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18243 if cmp -s $cache_file confcache; then :; else
18244 if test -w $cache_file; then
18245 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18246 cat confcache >$cache_file
18248 echo "not updating unwritable cache $cache_file"
18253 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18254 # Let make expand exec_prefix.
18255 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18257 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18258 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18259 # trailing colons and then remove the whole line if VPATH becomes empty
18260 # (actually we leave an empty line to preserve line numbers).
18261 if test "x$srcdir" = x.; then
18262 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18263 s/:*\$(srcdir):*/:/;
18264 s/:*\${srcdir}:*/:/;
18266 s/^\([^=]*=[ ]*\):*/\1/;
18272 DEFS=-DHAVE_CONFIG_H
18274 : ${CONFIG_STATUS=./config.status}
18275 ac_clean_files_save=$ac_clean_files
18276 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18277 { echo "$as_me:18277: creating $CONFIG_STATUS" >&5
18278 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18279 cat >$CONFIG_STATUS <<_ACEOF
18281 # Generated automatically by configure.
18282 # Run this file to recreate the current configuration.
18283 # Compiler output produced by configure, useful for debugging
18284 # configure, is in config.log if it exists.
18287 SHELL=\${CONFIG_SHELL-$SHELL}
18288 ac_cs_invocation="\$0 \$@"
18292 cat >>$CONFIG_STATUS <<\_ACEOF
18293 # Be Bourne compatible
18294 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18297 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18301 # Name of the executable.
18302 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18304 if expr a : '\(a\)' >/dev/null 2>&1; then
18310 rm -f conf$$ conf$$.exe conf$$.file
18312 if ln -s conf$$.file conf$$ 2>/dev/null; then
18313 # We could just check for DJGPP; but this test a) works b) is more generic
18314 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18315 if test -f conf$$.exe; then
18316 # Don't use ln at all; we don't have any links
18321 elif ln conf$$.file conf$$ 2>/dev/null; then
18326 rm -f conf$$ conf$$.exe conf$$.file
18328 as_executable_p="test -f"
18330 # Support unset when possible.
18331 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18338 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18339 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18340 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18341 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18342 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18343 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18344 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18345 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18348 # We need space, tab and new line, in precisely that order.
18354 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18360 # Files that config.status was made for.
18361 if test -n "$ac_config_files"; then
18362 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18365 if test -n "$ac_config_headers"; then
18366 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18369 if test -n "$ac_config_links"; then
18370 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18373 if test -n "$ac_config_commands"; then
18374 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18377 cat >>$CONFIG_STATUS <<\EOF
18380 \`$as_me' instantiates files from templates according to the
18381 current configuration.
18383 Usage: $0 [OPTIONS] [FILE]...
18385 -h, --help print this help, then exit
18386 -V, --version print version number, then exit
18387 -d, --debug don't remove temporary files
18388 --recheck update $as_me by reconfiguring in the same conditions
18389 --file=FILE[:TEMPLATE]
18390 instantiate the configuration file FILE
18391 --header=FILE[:TEMPLATE]
18392 instantiate the configuration header FILE
18394 Configuration files:
18397 Configuration headers:
18400 Configuration commands:
18403 Report bugs to <dickey@invisible-island.net>."
18406 cat >>$CONFIG_STATUS <<EOF
18409 configured by $0, generated by GNU Autoconf 2.52.20150926,
18410 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18412 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18413 Free Software Foundation, Inc.
18414 This config.status script is free software; the Free Software Foundation
18415 gives unlimited permission to copy, distribute and modify it."
18420 cat >>$CONFIG_STATUS <<\EOF
18421 # If no file are specified by the user, then we need to provide default
18422 # value. By we need to know if files were specified by the user.
18428 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18429 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18431 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18435 *) # This is not an option, so the user has probably given explicit
18437 ac_need_defaults=false;;
18441 # Handling of the options.
18443 cat >>$CONFIG_STATUS <<EOF
18444 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18445 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18446 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18448 cat >>$CONFIG_STATUS <<\EOF
18449 --version | --vers* | -V )
18450 echo "$ac_cs_version"; exit 0 ;;
18452 # Conflict between --help and --header
18453 { { echo "$as_me:18453: error: ambiguous option: $1
18454 Try \`$0 --help' for more information." >&5
18455 echo "$as_me: error: ambiguous option: $1
18456 Try \`$0 --help' for more information." >&2;}
18457 { (exit 1); exit 1; }; };;
18458 --help | --hel | -h )
18459 echo "$ac_cs_usage"; exit 0 ;;
18460 --debug | --d* | -d )
18462 --file | --fil | --fi | --f )
18464 CONFIG_FILES="$CONFIG_FILES $1"
18465 ac_need_defaults=false;;
18466 --header | --heade | --head | --hea )
18468 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18469 ac_need_defaults=false;;
18471 # This is an error.
18472 -*) { { echo "$as_me:18472: error: unrecognized option: $1
18473 Try \`$0 --help' for more information." >&5
18474 echo "$as_me: error: unrecognized option: $1
18475 Try \`$0 --help' for more information." >&2;}
18476 { (exit 1); exit 1; }; } ;;
18478 *) ac_config_targets="$ac_config_targets $1" ;;
18487 ## ----------------------- ##
18488 ## Running config.status. ##
18489 ## ----------------------- ##
18491 This file was extended by $as_me 2.52.20150926, executed with
18492 CONFIG_FILES = $CONFIG_FILES
18493 CONFIG_HEADERS = $CONFIG_HEADERS
18494 CONFIG_LINKS = $CONFIG_LINKS
18495 CONFIG_COMMANDS = $CONFIG_COMMANDS
18496 > $ac_cs_invocation
18497 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18502 cat >>$CONFIG_STATUS <<EOF
18504 # INIT-COMMANDS section.
18514 cat >>$CONFIG_STATUS <<\EOF
18515 for ac_config_target in $ac_config_targets
18517 case "$ac_config_target" in
18518 # Handling of arguments.
18519 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18520 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18521 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18522 *) { { echo "$as_me:18522: error: invalid argument: $ac_config_target" >&5
18523 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18524 { (exit 1); exit 1; }; };;
18528 # If the user did not use the arguments to specify the items to instantiate,
18529 # then the envvar interface is used. Set only those that are not.
18530 # We use the long form for the default assignment because of an extremely
18531 # bizarre bug on SunOS 4.1.3.
18532 if $ac_need_defaults; then
18533 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18534 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18535 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18538 # Create a temporary directory, and hook for its removal unless debugging.
18541 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18542 trap '{ (exit 1); exit 1; }' 1 2 13 15
18545 # Create a (secure) tmp directory for tmp files.
18548 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18549 test -n "$tmp" && test -d "$tmp"
18552 tmp=$TMPDIR/cs$$-$RANDOM
18553 (umask 077 && mkdir $tmp)
18556 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18557 { (exit 1); exit 1; }
18562 cat >>$CONFIG_STATUS <<EOF
18565 # CONFIG_FILES section.
18568 # No need to generate the scripts if there are no CONFIG_FILES.
18569 # This happens for instance when ./config.status config.h
18570 if test -n "\$CONFIG_FILES"; then
18571 # Protect against being on the right side of a sed subst in config.status.
18572 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18573 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18574 s,@SHELL@,$SHELL,;t t
18575 s,@exec_prefix@,$exec_prefix,;t t
18576 s,@prefix@,$prefix,;t t
18577 s,@program_transform_name@,$program_transform_name,;t t
18578 s,@bindir@,$bindir,;t t
18579 s,@sbindir@,$sbindir,;t t
18580 s,@libexecdir@,$libexecdir,;t t
18581 s,@datarootdir@,$datarootdir,;t t
18582 s,@datadir@,$datadir,;t t
18583 s,@sysconfdir@,$sysconfdir,;t t
18584 s,@sharedstatedir@,$sharedstatedir,;t t
18585 s,@localstatedir@,$localstatedir,;t t
18586 s,@libdir@,$libdir,;t t
18587 s,@includedir@,$includedir,;t t
18588 s,@oldincludedir@,$oldincludedir,;t t
18589 s,@infodir@,$infodir,;t t
18590 s,@mandir@,$mandir,;t t
18591 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18592 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18593 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18594 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18595 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18596 s,@build_alias@,$build_alias,;t t
18597 s,@host_alias@,$host_alias,;t t
18598 s,@target_alias@,$target_alias,;t t
18599 s,@ECHO_C@,$ECHO_C,;t t
18600 s,@ECHO_N@,$ECHO_N,;t t
18601 s,@ECHO_T@,$ECHO_T,;t t
18602 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18603 s,@DEFS@,$DEFS,;t t
18604 s,@LIBS@,$LIBS,;t t
18605 s,@build@,$build,;t t
18606 s,@build_cpu@,$build_cpu,;t t
18607 s,@build_vendor@,$build_vendor,;t t
18608 s,@build_os@,$build_os,;t t
18609 s,@host@,$host,;t t
18610 s,@host_cpu@,$host_cpu,;t t
18611 s,@host_vendor@,$host_vendor,;t t
18612 s,@host_os@,$host_os,;t t
18613 s,@SET_MAKE@,$SET_MAKE,;t t
18615 s,@CFLAGS@,$CFLAGS,;t t
18616 s,@LDFLAGS@,$LDFLAGS,;t t
18617 s,@CPPFLAGS@,$CPPFLAGS,;t t
18618 s,@ac_ct_CC@,$ac_ct_CC,;t t
18619 s,@EXEEXT@,$EXEEXT,;t t
18620 s,@OBJEXT@,$OBJEXT,;t t
18621 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18624 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18625 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18626 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18627 s,@LINT@,$LINT,;t t
18628 s,@LINT_OPTS@,$LINT_OPTS,;t t
18629 s,@CTAGS@,$CTAGS,;t t
18630 s,@ETAGS@,$ETAGS,;t t
18631 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18632 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18633 s,@MATH_LIB@,$MATH_LIB,;t t
18634 s,@top_builddir@,$top_builddir,;t t
18635 s,@CC_G_OPT@,$CC_G_OPT,;t t
18636 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18637 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18638 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18639 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18641 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18642 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18643 s,@LD_MODEL@,$LD_MODEL,;t t
18644 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18645 s,@LIBTOOL@,$LIBTOOL,;t t
18646 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18647 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18648 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18649 s,@LIB_LINK@,$LIB_LINK,;t t
18650 s,@LINK_TESTS@,$LINK_TESTS,;t t
18651 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18652 s,@PACKAGE@,$PACKAGE,;t t
18653 s,@PTHREAD@,$PTHREAD,;t t
18654 s,@TEST_ARGS@,$TEST_ARGS,;t t
18655 s,@TEST_DEPS@,$TEST_DEPS,;t t
18656 s,@TEST_LIBS@,$TEST_LIBS,;t t
18657 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18658 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18659 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18660 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18661 s,@includesubdir@,$includesubdir,;t t
18662 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18663 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18664 s,@ECHO_LT@,$ECHO_LT,;t t
18665 s,@ECHO_LD@,$ECHO_LD,;t t
18666 s,@RULE_CC@,$RULE_CC,;t t
18667 s,@SHOW_CC@,$SHOW_CC,;t t
18668 s,@ECHO_CC@,$ECHO_CC,;t t
18669 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18670 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18671 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18672 s,@X_CFLAGS@,$X_CFLAGS,;t t
18673 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18674 s,@X_LIBS@,$X_LIBS,;t t
18675 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18676 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18677 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18678 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18679 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18680 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18685 cat >>$CONFIG_STATUS <<\EOF
18686 # Split the substitutions into bite-sized pieces for seds with
18687 # small command number limits, like on Digital OSF/1 and HP-UX.
18688 ac_max_sed_lines=48
18689 ac_sed_frag=1 # Number of current file.
18690 ac_beg=1 # First line for current file.
18691 ac_end=$ac_max_sed_lines # Line after last line for current file.
18694 while $ac_more_lines; do
18695 if test $ac_beg -gt 1; then
18696 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18698 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18700 if test ! -s $tmp/subs.frag; then
18701 ac_more_lines=false
18703 # The purpose of the label and of the branching condition is to
18704 # speed up the sed processing (if there are no `@' at all, there
18705 # is no need to browse any of the substitutions).
18706 # These are the two extra sed commands mentioned above.
18708 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18709 # It is possible to make a multiline substitution using escaped newlines.
18710 # Ensure that we do not split the substitution between script fragments.
18712 ac_END=`expr $ac_end + $ac_max_sed_lines`
18713 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18714 if test -s $tmp/subs.next; then
18715 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18716 if test ! -s $tmp/subs.edit; then
18717 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18718 if test ! -s $tmp/subs.edit; then
18719 if test $ac_beg -gt 1; then
18720 ac_end=`expr $ac_end - 1`
18727 if test -z "$ac_sed_cmds"; then
18728 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18730 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18732 ac_sed_frag=`expr $ac_sed_frag + 1`
18734 ac_end=`expr $ac_end + $ac_max_sed_lines`
18737 if test -z "$ac_sed_cmds"; then
18740 fi # test -n "$CONFIG_FILES"
18743 cat >>$CONFIG_STATUS <<\EOF
18744 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18745 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18747 - | *:- | *:-:* ) # input from stdin
18749 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18750 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18751 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18752 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18753 * ) ac_file_in=$ac_file.in ;;
18756 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18757 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18758 X"$ac_file" : 'X\(//\)[^/]' \| \
18759 X"$ac_file" : 'X\(//\)$' \| \
18760 X"$ac_file" : 'X\(/\)' \| \
18761 . : '\(.\)' 2>/dev/null ||
18763 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18764 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18765 /^X\(\/\/\)$/{ s//\1/; q; }
18766 /^X\(\/\).*/{ s//\1/; q; }
18768 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18769 { case "$ac_dir" in
18770 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18774 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18775 case $as_mkdir_dir in
18776 # Skip DOS drivespec
18777 ?:) as_incr_dir=$as_mkdir_dir ;;
18779 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18780 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18785 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18786 # A "../" for each directory in $ac_dir_suffix.
18787 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18789 ac_dir_suffix= ac_dots=
18794 if test -z "$ac_dots"; then
18797 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18799 [\\/]* | ?:[\\/]* )
18800 ac_srcdir=$srcdir$ac_dir_suffix;
18801 ac_top_srcdir=$srcdir ;;
18802 *) # Relative path.
18803 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18804 ac_top_srcdir=$ac_dots$srcdir ;;
18808 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18809 *) ac_INSTALL=$ac_dots$INSTALL ;;
18812 if test x"$ac_file" != x-; then
18813 { echo "$as_me:18813: creating $ac_file" >&5
18814 echo "$as_me: creating $ac_file" >&6;}
18817 # Let's still pretend it is `configure' which instantiates (i.e., don't
18818 # use $as_me), people would be surprised to read:
18819 # /* config.h. Generated automatically by config.status. */
18820 configure_input="Generated automatically from `echo $ac_file_in |
18821 sed 's,.*/,,'` by configure."
18823 # First look for the input files in the build tree, otherwise in the
18825 ac_file_inputs=`IFS=:
18826 for f in $ac_file_in; do
18828 -) echo $tmp/stdin ;;
18830 # Absolute (can't be DOS-style, as IFS=:)
18831 test -f "$f" || { { echo "$as_me:18831: error: cannot find input file: $f" >&5
18832 echo "$as_me: error: cannot find input file: $f" >&2;}
18833 { (exit 1); exit 1; }; }
18836 if test -f "$f"; then
18839 elif test -f "$srcdir/$f"; then
18844 { { echo "$as_me:18844: error: cannot find input file: $f" >&5
18845 echo "$as_me: error: cannot find input file: $f" >&2;}
18846 { (exit 1); exit 1; }; }
18849 done` || { (exit 1); exit 1; }
18851 cat >>$CONFIG_STATUS <<\EOF
18852 ac_warn_datarootdir=no
18853 if test x"$ac_file" != x-; then
18854 for ac_item in $ac_file_inputs
18856 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18857 if test -n "$ac_seen"; then
18858 ac_used=`grep '@datarootdir@' $ac_item`
18859 if test -z "$ac_used"; then
18860 { echo "$as_me:18860: WARNING: datarootdir was used implicitly but not set:
18862 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18864 ac_warn_datarootdir=yes
18867 ac_seen=`grep '${datarootdir}' $ac_item`
18868 if test -n "$ac_seen"; then
18869 { echo "$as_me:18869: WARNING: datarootdir was used explicitly but not set:
18871 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18873 ac_warn_datarootdir=yes
18878 if test "x$ac_warn_datarootdir" = xyes; then
18879 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18883 cat >>$CONFIG_STATUS <<EOF
18887 cat >>$CONFIG_STATUS <<\EOF
18889 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18890 s,@configure_input@,$configure_input,;t t
18891 s,@srcdir@,$ac_srcdir,;t t
18892 s,@top_srcdir@,$ac_top_srcdir,;t t
18893 s,@INSTALL@,$ac_INSTALL,;t t
18894 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18896 if test x"$ac_file" != x-; then
18897 cp $tmp/out $ac_file
18899 for ac_name in prefix exec_prefix datarootdir
18901 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18902 if test -n "$ac_seen"; then
18903 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18904 if test -z "$ac_init"; then
18905 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18906 { echo "$as_me:18906: WARNING: Variable $ac_name is used but was not set:
18908 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18913 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18914 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18915 if test -s $tmp/out; then
18916 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18917 { echo "$as_me:18917: WARNING: Some variables may not be substituted:
18919 echo "$as_me: WARNING: Some variables may not be substituted:
18929 cat >>$CONFIG_STATUS <<\EOF
18932 # CONFIG_HEADER section.
18935 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18936 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18938 # ac_d sets the value in "#define NAME VALUE" lines.
18939 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18940 ac_dB='[ ].*$,\1#\2'
18943 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18944 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18945 ac_iB='\([ ]\),\1#\2define\3'
18948 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18949 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18950 ac_uB='$,\1#\2define\3'
18954 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18955 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18957 - | *:- | *:-:* ) # input from stdin
18959 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18960 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18961 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18962 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18963 * ) ac_file_in=$ac_file.in ;;
18966 test x"$ac_file" != x- && { echo "$as_me:18966: creating $ac_file" >&5
18967 echo "$as_me: creating $ac_file" >&6;}
18969 # First look for the input files in the build tree, otherwise in the
18971 ac_file_inputs=`IFS=:
18972 for f in $ac_file_in; do
18974 -) echo $tmp/stdin ;;
18976 # Absolute (can't be DOS-style, as IFS=:)
18977 test -f "$f" || { { echo "$as_me:18977: error: cannot find input file: $f" >&5
18978 echo "$as_me: error: cannot find input file: $f" >&2;}
18979 { (exit 1); exit 1; }; }
18982 if test -f "$f"; then
18985 elif test -f "$srcdir/$f"; then
18990 { { echo "$as_me:18990: error: cannot find input file: $f" >&5
18991 echo "$as_me: error: cannot find input file: $f" >&2;}
18992 { (exit 1); exit 1; }; }
18995 done` || { (exit 1); exit 1; }
18996 # Remove the trailing spaces.
18997 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19001 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19002 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19003 # be either 'cat' or 'sort'.
19004 cat confdefs.h | uniq >conftest.vals
19006 # Break up conftest.vals because some shells have a limit on
19007 # the size of here documents, and old seds have small limits too.
19009 rm -f conftest.tail
19010 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
19011 while grep . conftest.vals >/dev/null
19013 # Write chunks of a limited-size here document to conftest.frag.
19014 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19015 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19016 echo 'CEOF' >> $CONFIG_STATUS
19017 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19018 rm -f conftest.vals
19019 mv conftest.tail conftest.vals
19021 rm -f conftest.vals
19023 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19025 echo ' cat >> conftest.edit <<CEOF
19026 /@DEFS@/r conftest.frag
19029 sed -f conftest.edit $tmp/in > $tmp/out
19031 mv $tmp/out $tmp/in
19032 rm -f conftest.edit conftest.frag
19033 ' >> $CONFIG_STATUS
19035 cat >>$CONFIG_STATUS <<\EOF
19036 # Let's still pretend it is `configure' which instantiates (i.e., don't
19037 # use $as_me), people would be surprised to read:
19038 # /* config.h. Generated automatically by config.status. */
19039 if test x"$ac_file" = x-; then
19040 echo "/* Generated automatically by configure. */" >$tmp/config.h
19042 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19044 cat $tmp/in >>$tmp/config.h
19046 if test x"$ac_file" != x-; then
19047 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19048 { echo "$as_me:19048: $ac_file is unchanged" >&5
19049 echo "$as_me: $ac_file is unchanged" >&6;}
19051 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19052 X"$ac_file" : 'X\(//\)[^/]' \| \
19053 X"$ac_file" : 'X\(//\)$' \| \
19054 X"$ac_file" : 'X\(/\)' \| \
19055 . : '\(.\)' 2>/dev/null ||
19057 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19058 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19059 /^X\(\/\/\)$/{ s//\1/; q; }
19060 /^X\(\/\).*/{ s//\1/; q; }
19062 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19063 { case "$ac_dir" in
19064 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19068 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19069 case $as_mkdir_dir in
19070 # Skip DOS drivespec
19071 ?:) as_incr_dir=$as_mkdir_dir ;;
19073 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19074 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19081 mv $tmp/config.h $ac_file
19085 rm -f $tmp/config.h
19089 cat >>$CONFIG_STATUS <<\EOF
19091 # CONFIG_COMMANDS section.
19093 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19094 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19095 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19102 if test ! -d $srcdir/$cf_dir; then
19104 elif test -f $srcdir/$cf_dir/programs; then
19105 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19109 cat >>Makefile <<TEST_EOF
19111 # These rules are generated so we do not rely on suffix rules, which do not
19112 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19113 # some, and the '\$x' confuses others).
19116 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19119 cat >>Makefile <<TEST_EOF
19121 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19122 \$(srcdir)/test.priv.h \\
19125 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
19129 if test -f ../config.guess && test -f ../config.sub
19131 cat >>Makefile <<TEST_EOF
19133 # if we used CF_INHERIT for getting these files, we can remove them
19135 rm -f config.guess config.sub
19143 cat >>$CONFIG_STATUS <<\EOF
19145 { (exit 0); exit 0; }
19147 chmod +x $CONFIG_STATUS
19148 ac_clean_files=$ac_clean_files_save
19150 # configure is writing to config.log, and then calls config.status.
19151 # config.status does its own redirection, appending to config.log.
19152 # Unfortunately, on DOS this fails, as config.log is still kept open
19153 # by configure, so config.status won't be able to write to it; its
19154 # output is simply discarded. So we exec the FD to /dev/null,
19155 # effectively closing config.log, so it can be properly (re)opened and
19156 # appended to by config.status. When coming back to configure, we
19157 # need to make the FD available again.
19158 if test "$no_create" != yes; then
19161 $SHELL $CONFIG_STATUS || ac_cs_success=false
19163 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19164 # would make configure fail if this is the last instruction.
19165 $ac_cs_success || { (exit 1); exit 1; }