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/[ ]*$//'`
1951 cf_new_extra_cppflags=
1953 for cf_add_cflags in $cf_flags
1955 case $cf_fix_cppflags in
1957 case $cf_add_cflags in
1958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1959 case $cf_add_cflags in
1961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1964 && test -z "${cf_tst_cflags}" \
1965 && cf_fix_cppflags=yes
1967 if test $cf_fix_cppflags = yes ; then
1968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1970 elif test "${cf_tst_cflags}" = "\"'" ; then
1971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1980 case $cf_add_cflags in
1982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1984 CPPFLAGS=`echo "$CPPFLAGS" | \
1985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2005 && test -z "${cf_tst_cflags}" \
2006 && cf_fix_cppflags=no
2011 if test -n "$cf_new_cflags" ; then
2013 CFLAGS="$CFLAGS $cf_new_cflags"
2016 if test -n "$cf_new_cppflags" ; then
2018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2021 if test -n "$cf_new_extra_cppflags" ; then
2023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2026 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2028 echo "${as_me:-configure}:2028: testing resulting CC: '$CC' ..." 1>&5
2030 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2032 echo "${as_me:-configure}:2032: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2034 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2036 echo "${as_me:-configure}:2036: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2040 echo "$as_me:2040: result: ok" >&5
2041 echo "${ECHO_T}ok" >&6
2046 ac_cpp='$CPP $CPPFLAGS'
2047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2050 ac_main_return=return
2051 echo "$as_me:2051: checking how to run the C preprocessor" >&5
2052 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2053 # On Suns, sometimes $CPP names a directory.
2054 if test -n "$CPP" && test -d "$CPP"; then
2057 if test -z "$CPP"; then
2058 if test "${ac_cv_prog_CPP+set}" = set; then
2059 echo $ECHO_N "(cached) $ECHO_C" >&6
2061 # Double quotes because CPP needs to be expanded
2062 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2065 for ac_c_preproc_warn_flag in '' yes
2067 # Use a header file that comes with gcc, so configuring glibc
2068 # with a fresh cross-compiler works.
2069 # On the NeXT, cc -E runs the code through the compiler's parser,
2070 # not just through cpp. "Syntax error" is here to catch this case.
2071 cat >conftest.$ac_ext <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2077 if { (eval echo "$as_me:2077: \"$ac_cpp conftest.$ac_ext\"") >&5
2078 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2080 egrep -v '^ *\+' conftest.er1 >conftest.err
2082 cat conftest.err >&5
2083 echo "$as_me:2083: \$? = $ac_status" >&5
2084 (exit $ac_status); } >/dev/null; then
2085 if test -s conftest.err; then
2086 ac_cpp_err=$ac_c_preproc_warn_flag
2093 if test -z "$ac_cpp_err"; then
2096 echo "$as_me: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 # Broken: fails on valid input.
2101 rm -f conftest.err conftest.$ac_ext
2103 # OK, works on sane cases. Now check whether non-existent headers
2104 # can be detected and how.
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <ac_nonexistent.h>
2110 if { (eval echo "$as_me:2110: \"$ac_cpp conftest.$ac_ext\"") >&5
2111 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2113 egrep -v '^ *\+' conftest.er1 >conftest.err
2115 cat conftest.err >&5
2116 echo "$as_me:2116: \$? = $ac_status" >&5
2117 (exit $ac_status); } >/dev/null; then
2118 if test -s conftest.err; then
2119 ac_cpp_err=$ac_c_preproc_warn_flag
2126 if test -z "$ac_cpp_err"; then
2127 # Broken: success on invalid input.
2130 echo "$as_me: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2132 # Passes both tests.
2136 rm -f conftest.err conftest.$ac_ext
2139 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2140 rm -f conftest.err conftest.$ac_ext
2141 if $ac_preproc_ok; then
2153 echo "$as_me:2153: result: $CPP" >&5
2154 echo "${ECHO_T}$CPP" >&6
2156 for ac_c_preproc_warn_flag in '' yes
2158 # Use a header file that comes with gcc, so configuring glibc
2159 # with a fresh cross-compiler works.
2160 # On the NeXT, cc -E runs the code through the compiler's parser,
2161 # not just through cpp. "Syntax error" is here to catch this case.
2162 cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171 egrep -v '^ *\+' conftest.er1 >conftest.err
2173 cat conftest.err >&5
2174 echo "$as_me:2174: \$? = $ac_status" >&5
2175 (exit $ac_status); } >/dev/null; then
2176 if test -s conftest.err; then
2177 ac_cpp_err=$ac_c_preproc_warn_flag
2184 if test -z "$ac_cpp_err"; then
2187 echo "$as_me: failed program was:" >&5
2188 cat conftest.$ac_ext >&5
2189 # Broken: fails on valid input.
2192 rm -f conftest.err conftest.$ac_ext
2194 # OK, works on sane cases. Now check whether non-existent headers
2195 # can be detected and how.
2196 cat >conftest.$ac_ext <<_ACEOF
2197 #line 2197 "configure"
2198 #include "confdefs.h"
2199 #include <ac_nonexistent.h>
2201 if { (eval echo "$as_me:2201: \"$ac_cpp conftest.$ac_ext\"") >&5
2202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204 egrep -v '^ *\+' conftest.er1 >conftest.err
2206 cat conftest.err >&5
2207 echo "$as_me:2207: \$? = $ac_status" >&5
2208 (exit $ac_status); } >/dev/null; then
2209 if test -s conftest.err; then
2210 ac_cpp_err=$ac_c_preproc_warn_flag
2217 if test -z "$ac_cpp_err"; then
2218 # Broken: success on invalid input.
2221 echo "$as_me: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2223 # Passes both tests.
2227 rm -f conftest.err conftest.$ac_ext
2230 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2231 rm -f conftest.err conftest.$ac_ext
2232 if $ac_preproc_ok; then
2235 { { echo "$as_me:2235: error: C preprocessor \"$CPP\" fails sanity check" >&5
2236 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2237 { (exit 1); exit 1; }; }
2241 ac_cpp='$CPP $CPPFLAGS'
2242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2245 ac_main_return=return
2247 for ac_prog in mawk gawk nawk awk
2249 # Extract the first word of "$ac_prog", so it can be a program name with args.
2250 set dummy $ac_prog; ac_word=$2
2251 echo "$as_me:2251: checking for $ac_word" >&5
2252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2253 if test "${ac_cv_prog_AWK+set}" = set; then
2254 echo $ECHO_N "(cached) $ECHO_C" >&6
2256 if test -n "$AWK"; then
2257 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2259 ac_save_IFS=$IFS; IFS=$ac_path_separator
2261 for ac_dir in $ac_dummy; do
2263 test -z "$ac_dir" && ac_dir=.
2264 $as_executable_p "$ac_dir/$ac_word" || continue
2265 ac_cv_prog_AWK="$ac_prog"
2266 echo "$as_me:2266: found $ac_dir/$ac_word" >&5
2273 if test -n "$AWK"; then
2274 echo "$as_me:2274: result: $AWK" >&5
2275 echo "${ECHO_T}$AWK" >&6
2277 echo "$as_me:2277: result: no" >&5
2278 echo "${ECHO_T}no" >&6
2281 test -n "$AWK" && break
2284 # Find a good install program. We prefer a C program (faster),
2285 # so one script is as good as another. But avoid the broken or
2286 # incompatible versions:
2287 # SysV /etc/install, /usr/sbin/install
2288 # SunOS /usr/etc/install
2289 # IRIX /sbin/install
2291 # AmigaOS /C/install, which installs bootblocks on floppy discs
2292 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2293 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2294 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2295 # ./install, which can be erroneously created by make from ./install.sh.
2296 echo "$as_me:2296: checking for a BSD compatible install" >&5
2297 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2298 if test -z "$INSTALL"; then
2299 if test "${ac_cv_path_install+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
2302 ac_save_IFS=$IFS; IFS=$ac_path_separator
2303 for ac_dir in $PATH; do
2305 # Account for people who put trailing slashes in PATH elements.
2307 / | ./ | .// | /cC/* \
2308 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2311 # OSF1 and SCO ODT 3.0 have their own names for install.
2312 # Don't use installbsd from OSF since it installs stuff as root
2314 for ac_prog in ginstall scoinst install; do
2315 if $as_executable_p "$ac_dir/$ac_prog"; then
2316 if test $ac_prog = install &&
2317 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2318 # AIX install. It has an incompatible calling convention.
2320 elif test $ac_prog = install &&
2321 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2322 # program-specific install script used by HP pwplus--don't use.
2325 ac_cv_path_install="$ac_dir/$ac_prog -c"
2335 if test "${ac_cv_path_install+set}" = set; then
2336 INSTALL=$ac_cv_path_install
2338 # As a last resort, use the slow shell script. We don't cache a
2339 # path for INSTALL within a source directory, because that will
2340 # break other packages using the cache if that directory is
2341 # removed, or if the path is relative.
2342 INSTALL=$ac_install_sh
2345 echo "$as_me:2345: result: $INSTALL" >&5
2346 echo "${ECHO_T}$INSTALL" >&6
2348 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2349 # It thinks the first close brace ends the variable substitution.
2350 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2352 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2354 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2360 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2361 test -z "$cf_dir" && cf_dir=.
2362 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2366 for ac_prog in lint cppcheck splint
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo "$as_me:2370: checking for $ac_word" >&5
2371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2372 if test "${ac_cv_prog_LINT+set}" = set; then
2373 echo $ECHO_N "(cached) $ECHO_C" >&6
2375 if test -n "$LINT"; then
2376 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2378 ac_save_IFS=$IFS; IFS=$ac_path_separator
2380 for ac_dir in $ac_dummy; do
2382 test -z "$ac_dir" && ac_dir=.
2383 $as_executable_p "$ac_dir/$ac_word" || continue
2384 ac_cv_prog_LINT="$ac_prog"
2385 echo "$as_me:2385: found $ac_dir/$ac_word" >&5
2391 LINT=$ac_cv_prog_LINT
2392 if test -n "$LINT"; then
2393 echo "$as_me:2393: result: $LINT" >&5
2394 echo "${ECHO_T}$LINT" >&6
2396 echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2400 test -n "$LINT" && break
2403 echo "$as_me:2403: checking if filesystem supports mixed-case filenames" >&5
2404 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2405 if test "${cf_cv_mixedcase+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 if test "$cross_compiling" = yes ; then
2410 case $target_alias in
2411 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2419 rm -f conftest CONFTEST
2421 if test -f CONFTEST ; then
2426 rm -f conftest CONFTEST
2430 echo "$as_me:2430: result: $cf_cv_mixedcase" >&5
2431 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2432 test "$cf_cv_mixedcase" = yes &&
2433 cat >>confdefs.h <<\EOF
2434 #define MIXEDCASE_FILENAMES 1
2437 for ac_prog in exctags ctags
2439 # Extract the first word of "$ac_prog", so it can be a program name with args.
2440 set dummy $ac_prog; ac_word=$2
2441 echo "$as_me:2441: checking for $ac_word" >&5
2442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2443 if test "${ac_cv_prog_CTAGS+set}" = set; then
2444 echo $ECHO_N "(cached) $ECHO_C" >&6
2446 if test -n "$CTAGS"; then
2447 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2449 ac_save_IFS=$IFS; IFS=$ac_path_separator
2451 for ac_dir in $ac_dummy; do
2453 test -z "$ac_dir" && ac_dir=.
2454 $as_executable_p "$ac_dir/$ac_word" || continue
2455 ac_cv_prog_CTAGS="$ac_prog"
2456 echo "$as_me:2456: found $ac_dir/$ac_word" >&5
2462 CTAGS=$ac_cv_prog_CTAGS
2463 if test -n "$CTAGS"; then
2464 echo "$as_me:2464: result: $CTAGS" >&5
2465 echo "${ECHO_T}$CTAGS" >&6
2467 echo "$as_me:2467: result: no" >&5
2468 echo "${ECHO_T}no" >&6
2471 test -n "$CTAGS" && break
2474 for ac_prog in exetags etags
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477 set dummy $ac_prog; ac_word=$2
2478 echo "$as_me:2478: checking for $ac_word" >&5
2479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2480 if test "${ac_cv_prog_ETAGS+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2483 if test -n "$ETAGS"; then
2484 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2486 ac_save_IFS=$IFS; IFS=$ac_path_separator
2488 for ac_dir in $ac_dummy; do
2490 test -z "$ac_dir" && ac_dir=.
2491 $as_executable_p "$ac_dir/$ac_word" || continue
2492 ac_cv_prog_ETAGS="$ac_prog"
2493 echo "$as_me:2493: found $ac_dir/$ac_word" >&5
2499 ETAGS=$ac_cv_prog_ETAGS
2500 if test -n "$ETAGS"; then
2501 echo "$as_me:2501: result: $ETAGS" >&5
2502 echo "${ECHO_T}$ETAGS" >&6
2504 echo "$as_me:2504: result: no" >&5
2505 echo "${ECHO_T}no" >&6
2508 test -n "$ETAGS" && break
2511 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2512 set dummy ${CTAGS:-ctags}; ac_word=$2
2513 echo "$as_me:2513: checking for $ac_word" >&5
2514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2515 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2518 if test -n "$MAKE_LOWER_TAGS"; then
2519 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2523 for ac_dir in $ac_dummy; do
2525 test -z "$ac_dir" && ac_dir=.
2526 $as_executable_p "$ac_dir/$ac_word" || continue
2527 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2528 echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2532 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2535 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2536 if test -n "$MAKE_LOWER_TAGS"; then
2537 echo "$as_me:2537: result: $MAKE_LOWER_TAGS" >&5
2538 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2540 echo "$as_me:2540: result: no" >&5
2541 echo "${ECHO_T}no" >&6
2544 if test "$cf_cv_mixedcase" = yes ; then
2545 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2546 set dummy ${ETAGS:-etags}; ac_word=$2
2547 echo "$as_me:2547: checking for $ac_word" >&5
2548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2549 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2550 echo $ECHO_N "(cached) $ECHO_C" >&6
2552 if test -n "$MAKE_UPPER_TAGS"; then
2553 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2555 ac_save_IFS=$IFS; IFS=$ac_path_separator
2557 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 $as_executable_p "$ac_dir/$ac_word" || continue
2561 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2562 echo "$as_me:2562: found $ac_dir/$ac_word" >&5
2566 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2569 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2570 if test -n "$MAKE_UPPER_TAGS"; then
2571 echo "$as_me:2571: result: $MAKE_UPPER_TAGS" >&5
2572 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2574 echo "$as_me:2574: result: no" >&5
2575 echo "${ECHO_T}no" >&6
2582 if test "$MAKE_UPPER_TAGS" = yes ; then
2588 if test "$MAKE_LOWER_TAGS" = yes ; then
2594 echo "$as_me:2594: checking if -lm needed for math functions" >&5
2595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2596 if test "${cf_cv_need_libm+set}" = set; then
2597 echo $ECHO_N "(cached) $ECHO_C" >&6
2600 cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2610 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2615 rm -f conftest.$ac_objext conftest$ac_exeext
2616 if { (eval echo "$as_me:2616: \"$ac_link\"") >&5
2617 (eval $ac_link) 2>&5
2619 echo "$as_me:2619: \$? = $ac_status" >&5
2620 (exit $ac_status); } &&
2621 { ac_try='test -s conftest$ac_exeext'
2622 { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit $ac_status); }; }; then
2629 echo "$as_me: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2635 echo "$as_me:2635: result: $cf_cv_need_libm" >&5
2636 echo "${ECHO_T}$cf_cv_need_libm" >&6
2637 if test "$cf_cv_need_libm" = yes
2645 CC_SHARED_OPTS=unknown
2646 CPPFLAGS="$CPPFLAGS"
2648 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2649 DFT_UPR_MODEL="NORMAL"
2662 PACKAGE="ncurses-examples"
2668 TINFO_LIBS='$(LIBS_CURSES)'
2669 cf_cv_abi_version=""
2670 cf_cv_rel_version=""
2676 if test "$GCC" = yes
2678 cat > conftest.i <<EOF
2680 #define GCC_PRINTF 0
2685 #ifndef GCC_NORETURN
2686 #define GCC_NORETURN /* nothing */
2689 #define GCC_UNUSED /* nothing */
2692 if test "$GCC" = yes
2694 { echo "$as_me:2694: checking for $CC __attribute__ directives..." >&5
2695 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2697 "${as_me:-configure}"
2698 #include "confdefs.h"
2699 #include "conftest.h"
2700 #include "conftest.i"
2702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2707 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2709 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2712 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2713 extern void foo(void) GCC_NORETURN;
2714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2716 cf_printf_attribute=no
2717 cf_scanf_attribute=no
2718 for cf_attribute in scanf printf unused noreturn
2721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2723 cf_directive="__attribute__(($cf_attribute))"
2724 echo "checking for $CC $cf_directive" 1>&5
2726 case $cf_attribute in
2728 cf_printf_attribute=yes
2729 cat >conftest.h <<EOF
2730 #define GCC_$cf_ATTRIBUTE 1
2734 cf_scanf_attribute=yes
2735 cat >conftest.h <<EOF
2736 #define GCC_$cf_ATTRIBUTE 1
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE $cf_directive
2746 if { (eval echo "$as_me:2746: \"$ac_compile\"") >&5
2747 (eval $ac_compile) 2>&5
2749 echo "$as_me:2749: \$? = $ac_status" >&5
2750 (exit $ac_status); }; then
2751 test -n "$verbose" && echo "$as_me:2751: result: ... $cf_attribute" >&5
2752 echo "${ECHO_T}... $cf_attribute" >&6
2753 cat conftest.h >>confdefs.h
2754 case $cf_attribute in
2757 cat >>confdefs.h <<EOF
2758 #define GCC_NORETURN $cf_directive
2763 cf_value='/* nothing */'
2764 if test "$cf_printf_attribute" != no ; then
2765 cf_value='__attribute__((format(printf,fmt,var)))'
2767 cat >>confdefs.h <<\EOF
2768 #define GCC_PRINTF 1
2773 cat >>confdefs.h <<EOF
2774 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2779 cf_value='/* nothing */'
2780 if test "$cf_scanf_attribute" != no ; then
2781 cf_value='__attribute__((format(scanf,fmt,var)))'
2783 cat >>confdefs.h <<\EOF
2789 cat >>confdefs.h <<EOF
2790 #define GCC_SCANFLIKE(fmt,var) $cf_value
2796 cat >>confdefs.h <<EOF
2797 #define GCC_UNUSED $cf_directive
2805 fgrep define conftest.i >>confdefs.h
2811 cf_POSIX_C_SOURCE=199506L
2816 cf_xopen_source="-D_ALL_SOURCE"
2822 cf_xopen_source="-D_APPLE_C_SOURCE"
2825 cf_xopen_source="-D_DARWIN_C_SOURCE"
2828 (freebsd*|dragonfly*)
2829 # 5.x headers associate
2830 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2831 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2832 cf_POSIX_C_SOURCE=200112L
2834 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2837 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2840 cf_xopen_source="-D_HPUX_SOURCE"
2843 cf_xopen_source="-D_SGI_SOURCE"
2846 (linux*|gnu*|mint*|k*bsd*-gnu|cygwin)
2848 echo "$as_me:2848: checking if we must define _GNU_SOURCE" >&5
2849 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2850 if test "${cf_cv_gnu_source+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2854 cat >conftest.$ac_ext <<_ACEOF
2855 #line 2855 "configure"
2856 #include "confdefs.h"
2857 #include <sys/types.h>
2862 #ifndef _XOPEN_SOURCE
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871 (eval $ac_compile) 2>&5
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); } &&
2875 { ac_try='test -s conftest.$ac_objext'
2876 { (eval echo "$as_me:2876: \"$ac_try\"") >&5
2879 echo "$as_me:2879: \$? = $ac_status" >&5
2880 (exit $ac_status); }; }; then
2883 echo "$as_me: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2886 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2887 cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890 #include <sys/types.h>
2895 #ifdef _XOPEN_SOURCE
2902 rm -f conftest.$ac_objext
2903 if { (eval echo "$as_me:2903: \"$ac_compile\"") >&5
2904 (eval $ac_compile) 2>&5
2906 echo "$as_me:2906: \$? = $ac_status" >&5
2907 (exit $ac_status); } &&
2908 { ac_try='test -s conftest.$ac_objext'
2909 { (eval echo "$as_me:2909: \"$ac_try\"") >&5
2912 echo "$as_me:2912: \$? = $ac_status" >&5
2913 (exit $ac_status); }; }; then
2916 echo "$as_me: failed program was:" >&5
2917 cat conftest.$ac_ext >&5
2918 cf_cv_gnu_source=yes
2920 rm -f conftest.$ac_objext conftest.$ac_ext
2924 rm -f conftest.$ac_objext conftest.$ac_ext
2927 echo "$as_me:2927: result: $cf_cv_gnu_source" >&5
2928 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2930 if test "$cf_cv_gnu_source" = yes
2932 echo "$as_me:2932: checking if we should also define _DEFAULT_SOURCE" >&5
2933 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
2934 if test "${cf_cv_default_source+set}" = set; then
2935 echo $ECHO_N "(cached) $ECHO_C" >&6
2938 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2939 cat >conftest.$ac_ext <<_ACEOF
2940 #line 2940 "configure"
2941 #include "confdefs.h"
2942 #include <sys/types.h>
2947 #ifdef _DEFAULT_SOURCE
2954 rm -f conftest.$ac_objext
2955 if { (eval echo "$as_me:2955: \"$ac_compile\"") >&5
2956 (eval $ac_compile) 2>&5
2958 echo "$as_me:2958: \$? = $ac_status" >&5
2959 (exit $ac_status); } &&
2960 { ac_try='test -s conftest.$ac_objext'
2961 { (eval echo "$as_me:2961: \"$ac_try\"") >&5
2964 echo "$as_me:2964: \$? = $ac_status" >&5
2965 (exit $ac_status); }; }; then
2966 cf_cv_default_source=no
2968 echo "$as_me: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 cf_cv_default_source=yes
2972 rm -f conftest.$ac_objext conftest.$ac_ext
2975 echo "$as_me:2975: result: $cf_cv_default_source" >&5
2976 echo "${ECHO_T}$cf_cv_default_source" >&6
2977 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
2982 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2985 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2988 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2990 cf_save_CFLAGS="$CFLAGS"
2991 cf_save_CPPFLAGS="$CPPFLAGS"
2993 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2994 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2995 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2997 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2998 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2999 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3001 echo "$as_me:3001: checking if we should define _POSIX_C_SOURCE" >&5
3002 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3003 if test "${cf_cv_posix_c_source+set}" = set; then
3004 echo $ECHO_N "(cached) $ECHO_C" >&6
3007 echo "${as_me:-configure}:3007: testing if the symbol is already defined go no further ..." 1>&5
3009 cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3012 #include <sys/types.h>
3017 #ifndef _POSIX_C_SOURCE
3024 rm -f conftest.$ac_objext
3025 if { (eval echo "$as_me:3025: \"$ac_compile\"") >&5
3026 (eval $ac_compile) 2>&5
3028 echo "$as_me:3028: \$? = $ac_status" >&5
3029 (exit $ac_status); } &&
3030 { ac_try='test -s conftest.$ac_objext'
3031 { (eval echo "$as_me:3031: \"$ac_try\"") >&5
3034 echo "$as_me:3034: \$? = $ac_status" >&5
3035 (exit $ac_status); }; }; then
3036 cf_cv_posix_c_source=no
3038 echo "$as_me: failed program was:" >&5
3039 cat conftest.$ac_ext >&5
3040 cf_want_posix_source=no
3041 case .$cf_POSIX_C_SOURCE in
3043 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3046 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3047 cf_want_posix_source=yes
3050 cf_want_posix_source=yes
3053 if test "$cf_want_posix_source" = yes ; then
3054 cat >conftest.$ac_ext <<_ACEOF
3055 #line 3055 "configure"
3056 #include "confdefs.h"
3057 #include <sys/types.h>
3062 #ifdef _POSIX_SOURCE
3069 rm -f conftest.$ac_objext
3070 if { (eval echo "$as_me:3070: \"$ac_compile\"") >&5
3071 (eval $ac_compile) 2>&5
3073 echo "$as_me:3073: \$? = $ac_status" >&5
3074 (exit $ac_status); } &&
3075 { ac_try='test -s conftest.$ac_objext'
3076 { (eval echo "$as_me:3076: \"$ac_try\"") >&5
3079 echo "$as_me:3079: \$? = $ac_status" >&5
3080 (exit $ac_status); }; }; then
3083 echo "$as_me: failed program was:" >&5
3084 cat conftest.$ac_ext >&5
3085 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3087 rm -f conftest.$ac_objext conftest.$ac_ext
3090 echo "${as_me:-configure}:3090: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3092 CFLAGS="$cf_trim_CFLAGS"
3093 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3095 echo "${as_me:-configure}:3095: testing if the second compile does not leave our definition intact error ..." 1>&5
3097 cat >conftest.$ac_ext <<_ACEOF
3098 #line 3098 "configure"
3099 #include "confdefs.h"
3100 #include <sys/types.h>
3105 #ifndef _POSIX_C_SOURCE
3112 rm -f conftest.$ac_objext
3113 if { (eval echo "$as_me:3113: \"$ac_compile\"") >&5
3114 (eval $ac_compile) 2>&5
3116 echo "$as_me:3116: \$? = $ac_status" >&5
3117 (exit $ac_status); } &&
3118 { ac_try='test -s conftest.$ac_objext'
3119 { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3122 echo "$as_me:3122: \$? = $ac_status" >&5
3123 (exit $ac_status); }; }; then
3126 echo "$as_me: failed program was:" >&5
3127 cat conftest.$ac_ext >&5
3128 cf_cv_posix_c_source=no
3130 rm -f conftest.$ac_objext conftest.$ac_ext
3131 CFLAGS="$cf_save_CFLAGS"
3132 CPPFLAGS="$cf_save_CPPFLAGS"
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3138 echo "$as_me:3138: result: $cf_cv_posix_c_source" >&5
3139 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3141 if test "$cf_cv_posix_c_source" != no ; then
3142 CFLAGS="$cf_trim_CFLAGS"
3143 CPPFLAGS="$cf_trim_CPPFLAGS"
3148 cf_new_extra_cppflags=
3150 for cf_add_cflags in $cf_cv_posix_c_source
3152 case $cf_fix_cppflags in
3154 case $cf_add_cflags in
3155 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3156 case $cf_add_cflags in
3158 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3160 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3161 && test -z "${cf_tst_cflags}" \
3162 && cf_fix_cppflags=yes
3164 if test $cf_fix_cppflags = yes ; then
3165 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3167 elif test "${cf_tst_cflags}" = "\"'" ; then
3168 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3177 case $cf_add_cflags in
3179 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3181 CPPFLAGS=`echo "$CPPFLAGS" | \
3182 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3183 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3187 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3192 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3197 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3199 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3202 && test -z "${cf_tst_cflags}" \
3203 && cf_fix_cppflags=no
3208 if test -n "$cf_new_cflags" ; then
3210 CFLAGS="$CFLAGS $cf_new_cflags"
3213 if test -n "$cf_new_cppflags" ; then
3215 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3218 if test -n "$cf_new_extra_cppflags" ; then
3220 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3227 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3230 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3231 cf_xopen_source="-D_BSD_SOURCE"
3235 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3238 cf_xopen_source="-D_OSF_SOURCE"
3241 cf_xopen_source="-D_QNX_SOURCE"
3244 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3247 cf_xopen_source="-D__EXTENSIONS__"
3248 cf_cv_xopen_source=broken
3250 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3256 echo "$as_me:3256: checking if we should define _XOPEN_SOURCE" >&5
3257 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3258 if test "${cf_cv_xopen_source+set}" = set; then
3259 echo $ECHO_N "(cached) $ECHO_C" >&6
3262 cat >conftest.$ac_ext <<_ACEOF
3263 #line 3263 "configure"
3264 #include "confdefs.h"
3268 #include <sys/types.h>
3274 #ifndef _XOPEN_SOURCE
3281 rm -f conftest.$ac_objext
3282 if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283 (eval $ac_compile) 2>&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit $ac_status); } &&
3287 { ac_try='test -s conftest.$ac_objext'
3288 { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3291 echo "$as_me:3291: \$? = $ac_status" >&5
3292 (exit $ac_status); }; }; then
3293 cf_cv_xopen_source=no
3295 echo "$as_me: failed program was:" >&5
3296 cat conftest.$ac_ext >&5
3298 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3299 cat >conftest.$ac_ext <<_ACEOF
3300 #line 3300 "configure"
3301 #include "confdefs.h"
3305 #include <sys/types.h>
3311 #ifdef _XOPEN_SOURCE
3318 rm -f conftest.$ac_objext
3319 if { (eval echo "$as_me:3319: \"$ac_compile\"") >&5
3320 (eval $ac_compile) 2>&5
3322 echo "$as_me:3322: \$? = $ac_status" >&5
3323 (exit $ac_status); } &&
3324 { ac_try='test -s conftest.$ac_objext'
3325 { (eval echo "$as_me:3325: \"$ac_try\"") >&5
3328 echo "$as_me:3328: \$? = $ac_status" >&5
3329 (exit $ac_status); }; }; then
3330 cf_cv_xopen_source=no
3332 echo "$as_me: failed program was:" >&5
3333 cat conftest.$ac_ext >&5
3334 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3336 rm -f conftest.$ac_objext conftest.$ac_ext
3340 rm -f conftest.$ac_objext conftest.$ac_ext
3343 echo "$as_me:3343: result: $cf_cv_xopen_source" >&5
3344 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3346 if test "$cf_cv_xopen_source" != no ; then
3348 CFLAGS=`echo "$CFLAGS" | \
3349 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3350 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3352 CPPFLAGS=`echo "$CPPFLAGS" | \
3353 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3354 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3356 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3361 cf_new_extra_cppflags=
3363 for cf_add_cflags in $cf_temp_xopen_source
3365 case $cf_fix_cppflags in
3367 case $cf_add_cflags in
3368 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3369 case $cf_add_cflags in
3371 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3373 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3374 && test -z "${cf_tst_cflags}" \
3375 && cf_fix_cppflags=yes
3377 if test $cf_fix_cppflags = yes ; then
3378 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3380 elif test "${cf_tst_cflags}" = "\"'" ; then
3381 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3390 case $cf_add_cflags in
3392 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3394 CPPFLAGS=`echo "$CPPFLAGS" | \
3395 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3396 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3400 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3405 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3410 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3412 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3414 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3415 && test -z "${cf_tst_cflags}" \
3416 && cf_fix_cppflags=no
3421 if test -n "$cf_new_cflags" ; then
3423 CFLAGS="$CFLAGS $cf_new_cflags"
3426 if test -n "$cf_new_cppflags" ; then
3428 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3431 if test -n "$cf_new_extra_cppflags" ; then
3433 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3438 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3440 cf_save_CFLAGS="$CFLAGS"
3441 cf_save_CPPFLAGS="$CPPFLAGS"
3443 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3444 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3445 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3447 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3448 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3449 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3451 echo "$as_me:3451: checking if we should define _POSIX_C_SOURCE" >&5
3452 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3453 if test "${cf_cv_posix_c_source+set}" = set; then
3454 echo $ECHO_N "(cached) $ECHO_C" >&6
3457 echo "${as_me:-configure}:3457: testing if the symbol is already defined go no further ..." 1>&5
3459 cat >conftest.$ac_ext <<_ACEOF
3460 #line 3460 "configure"
3461 #include "confdefs.h"
3462 #include <sys/types.h>
3467 #ifndef _POSIX_C_SOURCE
3474 rm -f conftest.$ac_objext
3475 if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476 (eval $ac_compile) 2>&5
3478 echo "$as_me:3478: \$? = $ac_status" >&5
3479 (exit $ac_status); } &&
3480 { ac_try='test -s conftest.$ac_objext'
3481 { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3484 echo "$as_me:3484: \$? = $ac_status" >&5
3485 (exit $ac_status); }; }; then
3486 cf_cv_posix_c_source=no
3488 echo "$as_me: failed program was:" >&5
3489 cat conftest.$ac_ext >&5
3490 cf_want_posix_source=no
3491 case .$cf_POSIX_C_SOURCE in
3493 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3496 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3497 cf_want_posix_source=yes
3500 cf_want_posix_source=yes
3503 if test "$cf_want_posix_source" = yes ; then
3504 cat >conftest.$ac_ext <<_ACEOF
3505 #line 3505 "configure"
3506 #include "confdefs.h"
3507 #include <sys/types.h>
3512 #ifdef _POSIX_SOURCE
3519 rm -f conftest.$ac_objext
3520 if { (eval echo "$as_me:3520: \"$ac_compile\"") >&5
3521 (eval $ac_compile) 2>&5
3523 echo "$as_me:3523: \$? = $ac_status" >&5
3524 (exit $ac_status); } &&
3525 { ac_try='test -s conftest.$ac_objext'
3526 { (eval echo "$as_me:3526: \"$ac_try\"") >&5
3529 echo "$as_me:3529: \$? = $ac_status" >&5
3530 (exit $ac_status); }; }; then
3533 echo "$as_me: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3535 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3537 rm -f conftest.$ac_objext conftest.$ac_ext
3540 echo "${as_me:-configure}:3540: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3542 CFLAGS="$cf_trim_CFLAGS"
3543 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3545 echo "${as_me:-configure}:3545: testing if the second compile does not leave our definition intact error ..." 1>&5
3547 cat >conftest.$ac_ext <<_ACEOF
3548 #line 3548 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3555 #ifndef _POSIX_C_SOURCE
3562 rm -f conftest.$ac_objext
3563 if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564 (eval $ac_compile) 2>&5
3566 echo "$as_me:3566: \$? = $ac_status" >&5
3567 (exit $ac_status); } &&
3568 { ac_try='test -s conftest.$ac_objext'
3569 { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3572 echo "$as_me:3572: \$? = $ac_status" >&5
3573 (exit $ac_status); }; }; then
3576 echo "$as_me: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 cf_cv_posix_c_source=no
3580 rm -f conftest.$ac_objext conftest.$ac_ext
3581 CFLAGS="$cf_save_CFLAGS"
3582 CPPFLAGS="$cf_save_CPPFLAGS"
3585 rm -f conftest.$ac_objext conftest.$ac_ext
3588 echo "$as_me:3588: result: $cf_cv_posix_c_source" >&5
3589 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3591 if test "$cf_cv_posix_c_source" != no ; then
3592 CFLAGS="$cf_trim_CFLAGS"
3593 CPPFLAGS="$cf_trim_CPPFLAGS"
3598 cf_new_extra_cppflags=
3600 for cf_add_cflags in $cf_cv_posix_c_source
3602 case $cf_fix_cppflags in
3604 case $cf_add_cflags in
3605 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3606 case $cf_add_cflags in
3608 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3611 && test -z "${cf_tst_cflags}" \
3612 && cf_fix_cppflags=yes
3614 if test $cf_fix_cppflags = yes ; then
3615 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3617 elif test "${cf_tst_cflags}" = "\"'" ; then
3618 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3627 case $cf_add_cflags in
3629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3631 CPPFLAGS=`echo "$CPPFLAGS" | \
3632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3637 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3642 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3647 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3649 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3651 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3652 && test -z "${cf_tst_cflags}" \
3653 && cf_fix_cppflags=no
3658 if test -n "$cf_new_cflags" ; then
3660 CFLAGS="$CFLAGS $cf_new_cflags"
3663 if test -n "$cf_new_cppflags" ; then
3665 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3668 if test -n "$cf_new_extra_cppflags" ; then
3670 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3678 if test -n "$cf_xopen_source" ; then
3683 cf_new_extra_cppflags=
3685 for cf_add_cflags in $cf_xopen_source
3687 case $cf_fix_cppflags in
3689 case $cf_add_cflags in
3690 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3691 case $cf_add_cflags in
3693 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3695 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3696 && test -z "${cf_tst_cflags}" \
3697 && cf_fix_cppflags=yes
3699 if test $cf_fix_cppflags = yes ; then
3700 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3702 elif test "${cf_tst_cflags}" = "\"'" ; then
3703 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3712 case $cf_add_cflags in
3714 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3716 CPPFLAGS=`echo "$CPPFLAGS" | \
3717 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3718 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3722 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3727 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3732 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3734 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3737 && test -z "${cf_tst_cflags}" \
3738 && cf_fix_cppflags=no
3743 if test -n "$cf_new_cflags" ; then
3744 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3746 echo "${as_me:-configure}:3746: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3748 CFLAGS="$CFLAGS $cf_new_cflags"
3751 if test -n "$cf_new_cppflags" ; then
3752 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3754 echo "${as_me:-configure}:3754: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3756 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3759 if test -n "$cf_new_extra_cppflags" ; then
3760 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3762 echo "${as_me:-configure}:3762: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3764 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3769 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3770 echo "$as_me:3770: checking if _XOPEN_SOURCE really is set" >&5
3771 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3772 cat >conftest.$ac_ext <<_ACEOF
3773 #line 3773 "configure"
3774 #include "confdefs.h"
3780 #ifndef _XOPEN_SOURCE
3787 rm -f conftest.$ac_objext
3788 if { (eval echo "$as_me:3788: \"$ac_compile\"") >&5
3789 (eval $ac_compile) 2>&5
3791 echo "$as_me:3791: \$? = $ac_status" >&5
3792 (exit $ac_status); } &&
3793 { ac_try='test -s conftest.$ac_objext'
3794 { (eval echo "$as_me:3794: \"$ac_try\"") >&5
3797 echo "$as_me:3797: \$? = $ac_status" >&5
3798 (exit $ac_status); }; }; then
3799 cf_XOPEN_SOURCE_set=yes
3801 echo "$as_me: failed program was:" >&5
3802 cat conftest.$ac_ext >&5
3803 cf_XOPEN_SOURCE_set=no
3805 rm -f conftest.$ac_objext conftest.$ac_ext
3806 echo "$as_me:3806: result: $cf_XOPEN_SOURCE_set" >&5
3807 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3808 if test $cf_XOPEN_SOURCE_set = yes
3810 cat >conftest.$ac_ext <<_ACEOF
3811 #line 3811 "configure"
3812 #include "confdefs.h"
3818 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3825 rm -f conftest.$ac_objext
3826 if { (eval echo "$as_me:3826: \"$ac_compile\"") >&5
3827 (eval $ac_compile) 2>&5
3829 echo "$as_me:3829: \$? = $ac_status" >&5
3830 (exit $ac_status); } &&
3831 { ac_try='test -s conftest.$ac_objext'
3832 { (eval echo "$as_me:3832: \"$ac_try\"") >&5
3835 echo "$as_me:3835: \$? = $ac_status" >&5
3836 (exit $ac_status); }; }; then
3837 cf_XOPEN_SOURCE_set_ok=yes
3839 echo "$as_me: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3841 cf_XOPEN_SOURCE_set_ok=no
3843 rm -f conftest.$ac_objext conftest.$ac_ext
3844 if test $cf_XOPEN_SOURCE_set_ok = no
3846 { echo "$as_me:3846: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3847 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3851 echo "$as_me:3851: checking if we should define _XOPEN_SOURCE" >&5
3852 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3853 if test "${cf_cv_xopen_source+set}" = set; then
3854 echo $ECHO_N "(cached) $ECHO_C" >&6
3857 cat >conftest.$ac_ext <<_ACEOF
3858 #line 3858 "configure"
3859 #include "confdefs.h"
3863 #include <sys/types.h>
3869 #ifndef _XOPEN_SOURCE
3876 rm -f conftest.$ac_objext
3877 if { (eval echo "$as_me:3877: \"$ac_compile\"") >&5
3878 (eval $ac_compile) 2>&5
3880 echo "$as_me:3880: \$? = $ac_status" >&5
3881 (exit $ac_status); } &&
3882 { ac_try='test -s conftest.$ac_objext'
3883 { (eval echo "$as_me:3883: \"$ac_try\"") >&5
3886 echo "$as_me:3886: \$? = $ac_status" >&5
3887 (exit $ac_status); }; }; then
3888 cf_cv_xopen_source=no
3890 echo "$as_me: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3893 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3894 cat >conftest.$ac_ext <<_ACEOF
3895 #line 3895 "configure"
3896 #include "confdefs.h"
3900 #include <sys/types.h>
3906 #ifdef _XOPEN_SOURCE
3913 rm -f conftest.$ac_objext
3914 if { (eval echo "$as_me:3914: \"$ac_compile\"") >&5
3915 (eval $ac_compile) 2>&5
3917 echo "$as_me:3917: \$? = $ac_status" >&5
3918 (exit $ac_status); } &&
3919 { ac_try='test -s conftest.$ac_objext'
3920 { (eval echo "$as_me:3920: \"$ac_try\"") >&5
3923 echo "$as_me:3923: \$? = $ac_status" >&5
3924 (exit $ac_status); }; }; then
3925 cf_cv_xopen_source=no
3927 echo "$as_me: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3931 rm -f conftest.$ac_objext conftest.$ac_ext
3935 rm -f conftest.$ac_objext conftest.$ac_ext
3938 echo "$as_me:3938: result: $cf_cv_xopen_source" >&5
3939 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3941 if test "$cf_cv_xopen_source" != no ; then
3943 CFLAGS=`echo "$CFLAGS" | \
3944 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3945 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3947 CPPFLAGS=`echo "$CPPFLAGS" | \
3948 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3949 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3951 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3956 cf_new_extra_cppflags=
3958 for cf_add_cflags in $cf_temp_xopen_source
3960 case $cf_fix_cppflags in
3962 case $cf_add_cflags in
3963 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3964 case $cf_add_cflags in
3966 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3968 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3969 && test -z "${cf_tst_cflags}" \
3970 && cf_fix_cppflags=yes
3972 if test $cf_fix_cppflags = yes ; then
3973 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3975 elif test "${cf_tst_cflags}" = "\"'" ; then
3976 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3985 case $cf_add_cflags in
3987 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3989 CPPFLAGS=`echo "$CPPFLAGS" | \
3990 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3991 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3995 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4000 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4005 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4007 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4009 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4010 && test -z "${cf_tst_cflags}" \
4011 && cf_fix_cppflags=no
4016 if test -n "$cf_new_cflags" ; then
4018 CFLAGS="$CFLAGS $cf_new_cflags"
4021 if test -n "$cf_new_cppflags" ; then
4023 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4026 if test -n "$cf_new_extra_cppflags" ; then
4028 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4036 echo "$as_me:4036: checking for signal global datatype" >&5
4037 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4038 if test "${cf_cv_sig_atomic_t+set}" = set; then
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4043 "volatile sig_atomic_t" \
4047 cat >conftest.$ac_ext <<_ACEOF
4048 #line 4048 "configure"
4049 #include "confdefs.h"
4051 #include <sys/types.h>
4057 static void handler(int sig)
4064 signal(SIGINT, handler);
4070 rm -f conftest.$ac_objext
4071 if { (eval echo "$as_me:4071: \"$ac_compile\"") >&5
4072 (eval $ac_compile) 2>&5
4074 echo "$as_me:4074: \$? = $ac_status" >&5
4075 (exit $ac_status); } &&
4076 { ac_try='test -s conftest.$ac_objext'
4077 { (eval echo "$as_me:4077: \"$ac_try\"") >&5
4080 echo "$as_me:4080: \$? = $ac_status" >&5
4081 (exit $ac_status); }; }; then
4082 cf_cv_sig_atomic_t=$cf_type
4084 echo "$as_me: failed program was:" >&5
4085 cat conftest.$ac_ext >&5
4086 cf_cv_sig_atomic_t=no
4088 rm -f conftest.$ac_objext conftest.$ac_ext
4089 test "$cf_cv_sig_atomic_t" != no && break
4094 echo "$as_me:4094: result: $cf_cv_sig_atomic_t" >&5
4095 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4096 test "$cf_cv_sig_atomic_t" != no &&
4097 cat >>confdefs.h <<EOF
4098 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4101 # Work around breakage on OS X
4103 echo "$as_me:4103: checking if SIGWINCH is defined" >&5
4104 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4105 if test "${cf_cv_define_sigwinch+set}" = set; then
4106 echo $ECHO_N "(cached) $ECHO_C" >&6
4109 cat >conftest.$ac_ext <<_ACEOF
4110 #line 4110 "configure"
4111 #include "confdefs.h"
4113 #include <sys/types.h>
4114 #include <sys/signal.h>
4124 rm -f conftest.$ac_objext
4125 if { (eval echo "$as_me:4125: \"$ac_compile\"") >&5
4126 (eval $ac_compile) 2>&5
4128 echo "$as_me:4128: \$? = $ac_status" >&5
4129 (exit $ac_status); } &&
4130 { ac_try='test -s conftest.$ac_objext'
4131 { (eval echo "$as_me:4131: \"$ac_try\"") >&5
4134 echo "$as_me:4134: \$? = $ac_status" >&5
4135 (exit $ac_status); }; }; then
4136 cf_cv_define_sigwinch=yes
4138 echo "$as_me: failed program was:" >&5
4139 cat conftest.$ac_ext >&5
4140 cat >conftest.$ac_ext <<_ACEOF
4141 #line 4141 "configure"
4142 #include "confdefs.h"
4144 #undef _XOPEN_SOURCE
4145 #undef _POSIX_SOURCE
4146 #undef _POSIX_C_SOURCE
4147 #include <sys/types.h>
4148 #include <sys/signal.h>
4158 rm -f conftest.$ac_objext
4159 if { (eval echo "$as_me:4159: \"$ac_compile\"") >&5
4160 (eval $ac_compile) 2>&5
4162 echo "$as_me:4162: \$? = $ac_status" >&5
4163 (exit $ac_status); } &&
4164 { ac_try='test -s conftest.$ac_objext'
4165 { (eval echo "$as_me:4165: \"$ac_try\"") >&5
4168 echo "$as_me:4168: \$? = $ac_status" >&5
4169 (exit $ac_status); }; }; then
4170 cf_cv_define_sigwinch=maybe
4172 echo "$as_me: failed program was:" >&5
4173 cat conftest.$ac_ext >&5
4174 cf_cv_define_sigwinch=no
4176 rm -f conftest.$ac_objext conftest.$ac_ext
4179 rm -f conftest.$ac_objext conftest.$ac_ext
4182 echo "$as_me:4182: result: $cf_cv_define_sigwinch" >&5
4183 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4185 if test "$cf_cv_define_sigwinch" = maybe ; then
4186 echo "$as_me:4186: checking for actual SIGWINCH definition" >&5
4187 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4188 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4189 echo $ECHO_N "(cached) $ECHO_C" >&6
4192 cf_cv_fixup_sigwinch=unknown
4194 while test $cf_sigwinch != 1
4196 cat >conftest.$ac_ext <<_ACEOF
4197 #line 4197 "configure"
4198 #include "confdefs.h"
4200 #undef _XOPEN_SOURCE
4201 #undef _POSIX_SOURCE
4202 #undef _POSIX_C_SOURCE
4203 #include <sys/types.h>
4204 #include <sys/signal.h>
4210 #if SIGWINCH != $cf_sigwinch
4218 rm -f conftest.$ac_objext
4219 if { (eval echo "$as_me:4219: \"$ac_compile\"") >&5
4220 (eval $ac_compile) 2>&5
4222 echo "$as_me:4222: \$? = $ac_status" >&5
4223 (exit $ac_status); } &&
4224 { ac_try='test -s conftest.$ac_objext'
4225 { (eval echo "$as_me:4225: \"$ac_try\"") >&5
4228 echo "$as_me:4228: \$? = $ac_status" >&5
4229 (exit $ac_status); }; }; then
4230 cf_cv_fixup_sigwinch=$cf_sigwinch
4233 echo "$as_me: failed program was:" >&5
4234 cat conftest.$ac_ext >&5
4236 rm -f conftest.$ac_objext conftest.$ac_ext
4238 cf_sigwinch=`expr $cf_sigwinch - 1`
4242 echo "$as_me:4242: result: $cf_cv_fixup_sigwinch" >&5
4243 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4245 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4246 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4250 # Checks for CODESET support.
4252 echo "$as_me:4252: checking for nl_langinfo and CODESET" >&5
4253 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4254 if test "${am_cv_langinfo_codeset+set}" = set; then
4255 echo $ECHO_N "(cached) $ECHO_C" >&6
4257 cat >conftest.$ac_ext <<_ACEOF
4258 #line 4258 "configure"
4259 #include "confdefs.h"
4260 #include <langinfo.h>
4264 char* cs = nl_langinfo(CODESET);
4269 rm -f conftest.$ac_objext conftest$ac_exeext
4270 if { (eval echo "$as_me:4270: \"$ac_link\"") >&5
4271 (eval $ac_link) 2>&5
4273 echo "$as_me:4273: \$? = $ac_status" >&5
4274 (exit $ac_status); } &&
4275 { ac_try='test -s conftest$ac_exeext'
4276 { (eval echo "$as_me:4276: \"$ac_try\"") >&5
4279 echo "$as_me:4279: \$? = $ac_status" >&5
4280 (exit $ac_status); }; }; then
4281 am_cv_langinfo_codeset=yes
4283 echo "$as_me: failed program was:" >&5
4284 cat conftest.$ac_ext >&5
4285 am_cv_langinfo_codeset=no
4287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4290 echo "$as_me:4290: result: $am_cv_langinfo_codeset" >&5
4291 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4292 if test $am_cv_langinfo_codeset = yes; then
4294 cat >>confdefs.h <<\EOF
4295 #define HAVE_LANGINFO_CODESET 1
4300 echo "$as_me:4300: checking if you want to use pkg-config" >&5
4301 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4303 # Check whether --with-pkg-config or --without-pkg-config was given.
4304 if test "${with_pkg_config+set}" = set; then
4305 withval="$with_pkg_config"
4306 cf_pkg_config=$withval
4310 echo "$as_me:4310: result: $cf_pkg_config" >&5
4311 echo "${ECHO_T}$cf_pkg_config" >&6
4313 case $cf_pkg_config in
4319 if test -n "$ac_tool_prefix"; then
4320 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4321 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4322 echo "$as_me:4322: checking for $ac_word" >&5
4323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4324 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
4329 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4332 ac_save_IFS=$IFS; IFS=$ac_path_separator
4334 for ac_dir in $ac_dummy; do
4336 test -z "$ac_dir" && ac_dir=.
4337 if $as_executable_p "$ac_dir/$ac_word"; then
4338 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4339 echo "$as_me:4339: found $ac_dir/$ac_word" >&5
4347 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4349 if test -n "$PKG_CONFIG"; then
4350 echo "$as_me:4350: result: $PKG_CONFIG" >&5
4351 echo "${ECHO_T}$PKG_CONFIG" >&6
4353 echo "$as_me:4353: result: no" >&5
4354 echo "${ECHO_T}no" >&6
4358 if test -z "$ac_cv_path_PKG_CONFIG"; then
4359 ac_pt_PKG_CONFIG=$PKG_CONFIG
4360 # Extract the first word of "pkg-config", so it can be a program name with args.
4361 set dummy pkg-config; ac_word=$2
4362 echo "$as_me:4362: checking for $ac_word" >&5
4363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4364 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4365 echo $ECHO_N "(cached) $ECHO_C" >&6
4367 case $ac_pt_PKG_CONFIG in
4369 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4372 ac_save_IFS=$IFS; IFS=$ac_path_separator
4374 for ac_dir in $ac_dummy; do
4376 test -z "$ac_dir" && ac_dir=.
4377 if $as_executable_p "$ac_dir/$ac_word"; then
4378 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4379 echo "$as_me:4379: found $ac_dir/$ac_word" >&5
4384 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4388 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4390 if test -n "$ac_pt_PKG_CONFIG"; then
4391 echo "$as_me:4391: result: $ac_pt_PKG_CONFIG" >&5
4392 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4394 echo "$as_me:4394: result: no" >&5
4395 echo "${ECHO_T}no" >&6
4398 PKG_CONFIG=$ac_pt_PKG_CONFIG
4400 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4409 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4410 if test "$PKG_CONFIG" != none ; then
4412 if test "x$prefix" != xNONE; then
4413 cf_path_syntax="$prefix"
4415 cf_path_syntax="$ac_default_prefix"
4418 case ".$PKG_CONFIG" in
4423 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4425 (.\${*prefix}*|.\${*dir}*)
4426 eval PKG_CONFIG="$PKG_CONFIG"
4427 case ".$PKG_CONFIG" in
4429 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4434 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4437 { { echo "$as_me:4437: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4438 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4439 { (exit 1); exit 1; }; }
4443 elif test "x$cf_pkg_config" != xno ; then
4444 { echo "$as_me:4444: WARNING: pkg-config is not installed" >&5
4445 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4448 echo "$as_me:4448: checking if you want to see long compiling messages" >&5
4449 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4451 # Check whether --enable-echo or --disable-echo was given.
4452 if test "${enable_echo+set}" = set; then
4453 enableval="$enable_echo"
4454 test "$enableval" != no && enableval=yes
4455 if test "$enableval" != "yes" ; then
4458 ECHO_LD='@echo linking $@;'
4459 RULE_CC='@echo compiling $<'
4460 SHOW_CC='@echo compiling $@'
4482 echo "$as_me:4482: result: $enableval" >&5
4483 echo "${ECHO_T}$enableval" >&6
4485 echo "$as_me:4485: checking for ncurses wrap-prefix" >&5
4486 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4488 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4489 if test "${with_ncurses_wrap_prefix+set}" = set; then
4490 withval="$with_ncurses_wrap_prefix"
4491 NCURSES_WRAP_PREFIX=$withval
4493 NCURSES_WRAP_PREFIX=_nc_
4495 echo "$as_me:4495: result: $NCURSES_WRAP_PREFIX" >&5
4496 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4498 echo "$as_me:4498: checking if you want to check for wide-character functions" >&5
4499 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4501 # Check whether --enable-widec or --disable-widec was given.
4502 if test "${enable_widec+set}" = set; then
4503 enableval="$enable_widec"
4504 test "$enableval" != no && enableval=yes
4505 if test "$enableval" != "yes" ; then
4515 echo "$as_me:4515: result: $cf_enable_widec" >&5
4516 echo "${ECHO_T}$cf_enable_widec" >&6
4518 echo "$as_me:4518: checking for specific curses-directory" >&5
4519 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4521 # Check whether --with-curses-dir or --without-curses-dir was given.
4522 if test "${with_curses_dir+set}" = set; then
4523 withval="$with_curses_dir"
4524 cf_cv_curses_dir=$withval
4528 echo "$as_me:4528: result: $cf_cv_curses_dir" >&5
4529 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4531 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4534 if test "x$prefix" != xNONE; then
4535 cf_path_syntax="$prefix"
4537 cf_path_syntax="$ac_default_prefix"
4545 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4547 (.\${*prefix}*|.\${*dir}*)
4548 eval withval="$withval"
4551 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4556 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4559 { { echo "$as_me:4559: error: expected a pathname, not \"$withval\"" >&5
4560 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4561 { (exit 1); exit 1; }; }
4565 if test -d "$cf_cv_curses_dir"
4568 if test -n "$cf_cv_curses_dir/include" ; then
4569 for cf_add_incdir in $cf_cv_curses_dir/include
4571 while test $cf_add_incdir != /usr/include
4573 if test -d $cf_add_incdir
4576 if test -n "$CFLAGS$CPPFLAGS" ; then
4577 # a loop is needed to ensure we can add subdirs of existing dirs
4578 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4579 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4580 cf_have_incdir=yes; break
4585 if test "$cf_have_incdir" = no ; then
4586 if test "$cf_add_incdir" = /usr/local/include ; then
4587 if test "$GCC" = yes
4589 cf_save_CPPFLAGS=$CPPFLAGS
4590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4591 cat >conftest.$ac_ext <<_ACEOF
4592 #line 4592 "configure"
4593 #include "confdefs.h"
4603 rm -f conftest.$ac_objext
4604 if { (eval echo "$as_me:4604: \"$ac_compile\"") >&5
4605 (eval $ac_compile) 2>&5
4607 echo "$as_me:4607: \$? = $ac_status" >&5
4608 (exit $ac_status); } &&
4609 { ac_try='test -s conftest.$ac_objext'
4610 { (eval echo "$as_me:4610: \"$ac_try\"") >&5
4613 echo "$as_me:4613: \$? = $ac_status" >&5
4614 (exit $ac_status); }; }; then
4617 echo "$as_me: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4621 rm -f conftest.$ac_objext conftest.$ac_ext
4622 CPPFLAGS=$cf_save_CPPFLAGS
4627 if test "$cf_have_incdir" = no ; then
4628 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4630 echo "${as_me:-configure}:4630: testing adding $cf_add_incdir to include-path ..." 1>&5
4632 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4634 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4635 test "$cf_top_incdir" = "$cf_add_incdir" && break
4636 cf_add_incdir="$cf_top_incdir"
4647 if test -n "$cf_cv_curses_dir/lib" ; then
4648 for cf_add_libdir in $cf_cv_curses_dir/lib
4650 if test $cf_add_libdir = /usr/lib ; then
4652 elif test -d $cf_add_libdir
4655 if test -n "$LDFLAGS$LIBS" ; then
4656 # a loop is needed to ensure we can add subdirs of existing dirs
4657 for cf_test_libdir in $LDFLAGS $LIBS ; do
4658 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4659 cf_have_libdir=yes; break
4663 if test "$cf_have_libdir" = no ; then
4664 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4666 echo "${as_me:-configure}:4666: testing adding $cf_add_libdir to library-path ..." 1>&5
4668 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4679 echo "$as_me:4679: checking for specified curses library type" >&5
4680 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4682 # Check whether --with-screen or --without-screen was given.
4683 if test "${with_screen+set}" = set; then
4684 withval="$with_screen"
4685 cf_cv_screen=$withval
4688 # Check whether --with-ncursesw or --without-ncursesw was given.
4689 if test "${with_ncursesw+set}" = set; then
4690 withval="$with_ncursesw"
4691 cf_cv_screen=ncursesw
4694 # Check whether --with-ncurses or --without-ncurses was given.
4695 if test "${with_ncurses+set}" = set; then
4696 withval="$with_ncurses"
4697 cf_cv_screen=ncurses
4700 # Check whether --with-pdcurses or --without-pdcurses was given.
4701 if test "${with_pdcurses+set}" = set; then
4702 withval="$with_pdcurses"
4703 cf_cv_screen=pdcurses
4706 # Check whether --with-curses-colr or --without-curses-colr was given.
4707 if test "${with_curses_colr+set}" = set; then
4708 withval="$with_curses_colr"
4709 cf_cv_screen=curses_colr
4712 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4713 if test "${with_curses_5lib+set}" = set; then
4714 withval="$with_curses_5lib"
4715 cf_cv_screen=curses_5lib
4723 echo "$as_me:4723: result: $cf_cv_screen" >&5
4724 echo "${ECHO_T}$cf_cv_screen" >&6
4726 case $cf_cv_screen in
4729 echo "$as_me:4729: checking for extra include directories" >&5
4730 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4731 if test "${cf_cv_curses_incdir+set}" = set; then
4732 echo $ECHO_N "(cached) $ECHO_C" >&6
4735 cf_cv_curses_incdir=no
4738 if test "x$cf_cv_screen" = "xcurses_colr"
4740 test -d /usr/include/curses_colr && \
4741 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4745 if test "x$cf_cv_screen" = "xcurses_5lib"
4747 test -d /usr/5lib && \
4748 test -d /usr/5include && \
4749 cf_cv_curses_incdir="-I/usr/5include"
4755 echo "$as_me:4755: result: $cf_cv_curses_incdir" >&5
4756 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4757 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4759 echo "$as_me:4759: checking if we have identified curses headers" >&5
4760 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4761 if test "${cf_cv_ncurses_header+set}" = set; then
4762 echo $ECHO_N "(cached) $ECHO_C" >&6
4765 cf_cv_ncurses_header=none
4768 curses.h ncurses/ncurses.h ncurses/curses.h
4770 cat >conftest.$ac_ext <<_ACEOF
4771 #line 4771 "configure"
4772 #include "confdefs.h"
4773 #include <${cf_header}>
4777 initscr(); tgoto("?", 0,0)
4782 rm -f conftest.$ac_objext
4783 if { (eval echo "$as_me:4783: \"$ac_compile\"") >&5
4784 (eval $ac_compile) 2>&5
4786 echo "$as_me:4786: \$? = $ac_status" >&5
4787 (exit $ac_status); } &&
4788 { ac_try='test -s conftest.$ac_objext'
4789 { (eval echo "$as_me:4789: \"$ac_try\"") >&5
4792 echo "$as_me:4792: \$? = $ac_status" >&5
4793 (exit $ac_status); }; }; then
4794 cf_cv_ncurses_header=$cf_header; break
4796 echo "$as_me: failed program was:" >&5
4797 cat conftest.$ac_ext >&5
4799 rm -f conftest.$ac_objext conftest.$ac_ext
4803 echo "$as_me:4803: result: $cf_cv_ncurses_header" >&5
4804 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4806 if test "$cf_cv_ncurses_header" = none ; then
4807 { { echo "$as_me:4807: error: No curses header-files found" >&5
4808 echo "$as_me: error: No curses header-files found" >&2;}
4809 { (exit 1); exit 1; }; }
4812 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4814 for ac_header in $cf_cv_ncurses_header
4816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4817 echo "$as_me:4817: checking for $ac_header" >&5
4818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4820 echo $ECHO_N "(cached) $ECHO_C" >&6
4822 cat >conftest.$ac_ext <<_ACEOF
4823 #line 4823 "configure"
4824 #include "confdefs.h"
4825 #include <$ac_header>
4827 if { (eval echo "$as_me:4827: \"$ac_cpp conftest.$ac_ext\"") >&5
4828 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4830 egrep -v '^ *\+' conftest.er1 >conftest.err
4832 cat conftest.err >&5
4833 echo "$as_me:4833: \$? = $ac_status" >&5
4834 (exit $ac_status); } >/dev/null; then
4835 if test -s conftest.err; then
4836 ac_cpp_err=$ac_c_preproc_warn_flag
4843 if test -z "$ac_cpp_err"; then
4844 eval "$as_ac_Header=yes"
4846 echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 eval "$as_ac_Header=no"
4850 rm -f conftest.err conftest.$ac_ext
4852 echo "$as_me:4852: result: `eval echo '${'$as_ac_Header'}'`" >&5
4853 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4854 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4855 cat >>confdefs.h <<EOF
4856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4862 echo "$as_me:4862: checking for terminfo header" >&5
4863 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4864 if test "${cf_cv_term_header+set}" = set; then
4865 echo $ECHO_N "(cached) $ECHO_C" >&6
4868 case ${cf_cv_ncurses_header} in
4869 (*/ncurses.h|*/ncursesw.h)
4870 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4873 cf_term_header=term.h
4877 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4879 cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4883 #include <${cf_cv_ncurses_header:-curses.h}>
4889 int x = auto_left_margin
4894 rm -f conftest.$ac_objext
4895 if { (eval echo "$as_me:4895: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4898 echo "$as_me:4898: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
4900 { ac_try='test -s conftest.$ac_objext'
4901 { (eval echo "$as_me:4901: \"$ac_try\"") >&5
4904 echo "$as_me:4904: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
4907 cf_cv_term_header="$cf_test"
4909 echo "$as_me: failed program was:" >&5
4910 cat conftest.$ac_ext >&5
4912 cf_cv_term_header=unknown
4915 rm -f conftest.$ac_objext conftest.$ac_ext
4916 test "$cf_cv_term_header" != unknown && break
4920 echo "$as_me:4920: result: $cf_cv_term_header" >&5
4921 echo "${ECHO_T}$cf_cv_term_header" >&6
4923 # Set definitions to allow ifdef'ing to accommodate subdirectories
4925 case $cf_cv_term_header in
4928 cat >>confdefs.h <<\EOF
4929 #define HAVE_TERM_H 1
4935 case $cf_cv_term_header in
4938 cat >>confdefs.h <<\EOF
4939 #define HAVE_NCURSES_TERM_H 1
4945 cat >>confdefs.h <<\EOF
4946 #define HAVE_NCURSESW_TERM_H 1
4952 echo "$as_me:4952: checking for ncurses version" >&5
4953 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4954 if test "${cf_cv_ncurses_version+set}" = set; then
4955 echo $ECHO_N "(cached) $ECHO_C" >&6
4958 cf_cv_ncurses_version=no
4961 if test "$cross_compiling" = yes; then
4963 # This will not work if the preprocessor splits the line after the
4964 # Autoconf token. The 'unproto' program does that.
4965 cat > conftest.$ac_ext <<EOF
4966 #include <${cf_cv_ncurses_header:-curses.h}>
4968 #ifdef NCURSES_VERSION
4969 Autoconf NCURSES_VERSION
4977 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4978 { (eval echo "$as_me:4978: \"$cf_try\"") >&5
4981 echo "$as_me:4981: \$? = $ac_status" >&5
4982 (exit $ac_status); }
4983 if test -f conftest.out ; then
4984 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4985 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4994 #include <${cf_cv_ncurses_header:-curses.h}>
4998 FILE *fp = fopen("$cf_tempfile", "w");
4999 #ifdef NCURSES_VERSION
5000 # ifdef NCURSES_VERSION_PATCH
5001 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5003 fprintf(fp, "%s\n", NCURSES_VERSION);
5007 fprintf(fp, "old\n");
5012 ${cf_cv_main_return:-return}(0);
5015 rm -f conftest$ac_exeext
5016 if { (eval echo "$as_me:5016: \"$ac_link\"") >&5
5017 (eval $ac_link) 2>&5
5019 echo "$as_me:5019: \$? = $ac_status" >&5
5020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5021 { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5024 echo "$as_me:5024: \$? = $ac_status" >&5
5025 (exit $ac_status); }; }; then
5027 cf_cv_ncurses_version=`cat $cf_tempfile`
5029 echo "$as_me: program exited with status $ac_status" >&5
5030 echo "$as_me: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5038 echo "$as_me:5038: result: $cf_cv_ncurses_version" >&5
5039 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5040 test "$cf_cv_ncurses_version" = no ||
5041 cat >>confdefs.h <<\EOF
5045 echo "$as_me:5045: checking if we have identified curses libraries" >&5
5046 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5047 cat >conftest.$ac_ext <<_ACEOF
5048 #line 5048 "configure"
5049 #include "confdefs.h"
5050 #include <${cf_cv_ncurses_header:-curses.h}>
5054 initscr(); tgoto("?", 0,0)
5059 rm -f conftest.$ac_objext conftest$ac_exeext
5060 if { (eval echo "$as_me:5060: \"$ac_link\"") >&5
5061 (eval $ac_link) 2>&5
5063 echo "$as_me:5063: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
5065 { ac_try='test -s conftest$ac_exeext'
5066 { (eval echo "$as_me:5066: \"$ac_try\"") >&5
5069 echo "$as_me:5069: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
5073 echo "$as_me: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5078 echo "$as_me:5078: result: $cf_result" >&5
5079 echo "${ECHO_T}$cf_result" >&6
5081 if test "$cf_result" = no ; then
5084 echo "$as_me:5084: checking for tgoto in -lmytinfo" >&5
5085 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5086 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5087 echo $ECHO_N "(cached) $ECHO_C" >&6
5089 ac_check_lib_save_LIBS=$LIBS
5090 LIBS="-lmytinfo $LIBS"
5091 cat >conftest.$ac_ext <<_ACEOF
5092 #line 5092 "configure"
5093 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error. */
5099 /* We use char because int might match the return type of a gcc2
5100 builtin and then its argument prototype would still apply. */
5110 rm -f conftest.$ac_objext conftest$ac_exeext
5111 if { (eval echo "$as_me:5111: \"$ac_link\"") >&5
5112 (eval $ac_link) 2>&5
5114 echo "$as_me:5114: \$? = $ac_status" >&5
5115 (exit $ac_status); } &&
5116 { ac_try='test -s conftest$ac_exeext'
5117 { (eval echo "$as_me:5117: \"$ac_try\"") >&5
5120 echo "$as_me:5120: \$? = $ac_status" >&5
5121 (exit $ac_status); }; }; then
5122 ac_cv_lib_mytinfo_tgoto=yes
5124 echo "$as_me: failed program was:" >&5
5125 cat conftest.$ac_ext >&5
5126 ac_cv_lib_mytinfo_tgoto=no
5128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5129 LIBS=$ac_check_lib_save_LIBS
5131 echo "$as_me:5131: result: $ac_cv_lib_mytinfo_tgoto" >&5
5132 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5133 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5135 cf_add_libs="-lmytinfo"
5136 # Filter out duplicates - this happens with badly-designed ".pc" files...
5137 for cf_add_1lib in $LIBS
5139 for cf_add_2lib in $cf_add_libs
5141 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5147 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5155 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5156 # next (1998), and xcurses "newer" (2000). There is no header file for
5157 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5158 # term.h) for cur_colr
5159 if test "x$cf_cv_screen" = "xcurses_colr"
5161 echo "$as_me:5161: checking for initscr in -lcur_colr" >&5
5162 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5163 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5164 echo $ECHO_N "(cached) $ECHO_C" >&6
5166 ac_check_lib_save_LIBS=$LIBS
5167 LIBS="-lcur_colr $LIBS"
5168 cat >conftest.$ac_ext <<_ACEOF
5169 #line 5169 "configure"
5170 #include "confdefs.h"
5172 /* Override any gcc2 internal prototype to avoid an error. */
5176 /* We use char because int might match the return type of a gcc2
5177 builtin and then its argument prototype would still apply. */
5187 rm -f conftest.$ac_objext conftest$ac_exeext
5188 if { (eval echo "$as_me:5188: \"$ac_link\"") >&5
5189 (eval $ac_link) 2>&5
5191 echo "$as_me:5191: \$? = $ac_status" >&5
5192 (exit $ac_status); } &&
5193 { ac_try='test -s conftest$ac_exeext'
5194 { (eval echo "$as_me:5194: \"$ac_try\"") >&5
5197 echo "$as_me:5197: \$? = $ac_status" >&5
5198 (exit $ac_status); }; }; then
5199 ac_cv_lib_cur_colr_initscr=yes
5201 echo "$as_me: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5203 ac_cv_lib_cur_colr_initscr=no
5205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5206 LIBS=$ac_check_lib_save_LIBS
5208 echo "$as_me:5208: result: $ac_cv_lib_cur_colr_initscr" >&5
5209 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5210 if test $ac_cv_lib_cur_colr_initscr = yes; then
5212 cf_add_libs="-lcur_colr"
5213 # Filter out duplicates - this happens with badly-designed ".pc" files...
5214 for cf_add_1lib in $LIBS
5216 for cf_add_2lib in $cf_add_libs
5218 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5224 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5228 ac_cv_func_initscr=yes
5232 echo "$as_me:5232: checking for initscr in -lHcurses" >&5
5233 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5234 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5235 echo $ECHO_N "(cached) $ECHO_C" >&6
5237 ac_check_lib_save_LIBS=$LIBS
5238 LIBS="-lHcurses $LIBS"
5239 cat >conftest.$ac_ext <<_ACEOF
5240 #line 5240 "configure"
5241 #include "confdefs.h"
5243 /* Override any gcc2 internal prototype to avoid an error. */
5247 /* We use char because int might match the return type of a gcc2
5248 builtin and then its argument prototype would still apply. */
5258 rm -f conftest.$ac_objext conftest$ac_exeext
5259 if { (eval echo "$as_me:5259: \"$ac_link\"") >&5
5260 (eval $ac_link) 2>&5
5262 echo "$as_me:5262: \$? = $ac_status" >&5
5263 (exit $ac_status); } &&
5264 { ac_try='test -s conftest$ac_exeext'
5265 { (eval echo "$as_me:5265: \"$ac_try\"") >&5
5268 echo "$as_me:5268: \$? = $ac_status" >&5
5269 (exit $ac_status); }; }; then
5270 ac_cv_lib_Hcurses_initscr=yes
5272 echo "$as_me: failed program was:" >&5
5273 cat conftest.$ac_ext >&5
5274 ac_cv_lib_Hcurses_initscr=no
5276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5277 LIBS=$ac_check_lib_save_LIBS
5279 echo "$as_me:5279: result: $ac_cv_lib_Hcurses_initscr" >&5
5280 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5281 if test $ac_cv_lib_Hcurses_initscr = yes; then
5283 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5285 cf_add_libs="-lHcurses"
5286 # Filter out duplicates - this happens with badly-designed ".pc" files...
5287 for cf_add_1lib in $LIBS
5289 for cf_add_2lib in $cf_add_libs
5291 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5297 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5301 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5302 ac_cv_func_initscr=yes
5311 case `arch 2>/dev/null` in
5316 if test -n "/lib64" ; then
5317 for cf_add_libdir in /lib64
5319 if test $cf_add_libdir = /usr/lib ; then
5321 elif test -d $cf_add_libdir
5324 if test -n "$LDFLAGS$LIBS" ; then
5325 # a loop is needed to ensure we can add subdirs of existing dirs
5326 for cf_test_libdir in $LDFLAGS $LIBS ; do
5327 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5328 cf_have_libdir=yes; break
5332 if test "$cf_have_libdir" = no ; then
5333 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5335 echo "${as_me:-configure}:5335: testing adding $cf_add_libdir to library-path ..." 1>&5
5337 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5345 if test -n "/lib" ; then
5346 for cf_add_libdir in /lib
5348 if test $cf_add_libdir = /usr/lib ; then
5350 elif test -d $cf_add_libdir
5353 if test -n "$LDFLAGS$LIBS" ; then
5354 # a loop is needed to ensure we can add subdirs of existing dirs
5355 for cf_test_libdir in $LDFLAGS $LIBS ; do
5356 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5357 cf_have_libdir=yes; break
5361 if test "$cf_have_libdir" = no ; then
5362 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5364 echo "${as_me:-configure}:5364: testing adding $cf_add_libdir to library-path ..." 1>&5
5366 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5376 if test -n "/lib" ; then
5377 for cf_add_libdir in /lib
5379 if test $cf_add_libdir = /usr/lib ; then
5381 elif test -d $cf_add_libdir
5384 if test -n "$LDFLAGS$LIBS" ; then
5385 # a loop is needed to ensure we can add subdirs of existing dirs
5386 for cf_test_libdir in $LDFLAGS $LIBS ; do
5387 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5388 cf_have_libdir=yes; break
5392 if test "$cf_have_libdir" = no ; then
5393 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5395 echo "${as_me:-configure}:5395: testing adding $cf_add_libdir to library-path ..." 1>&5
5397 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5407 if test "x$cf_cv_screen" = "xcurses_5lib"
5409 if test -d /usr/5lib ; then
5411 if test -n "/usr/5lib" ; then
5412 for cf_add_libdir in /usr/5lib
5414 if test $cf_add_libdir = /usr/lib ; then
5416 elif test -d $cf_add_libdir
5419 if test -n "$LDFLAGS$LIBS" ; then
5420 # a loop is needed to ensure we can add subdirs of existing dirs
5421 for cf_test_libdir in $LDFLAGS $LIBS ; do
5422 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5423 cf_have_libdir=yes; break
5427 if test "$cf_have_libdir" = no ; then
5428 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5430 echo "${as_me:-configure}:5430: testing adding $cf_add_libdir to library-path ..." 1>&5
5432 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5438 cf_add_libs="-lcurses -ltermcap"
5439 # Filter out duplicates - this happens with badly-designed ".pc" files...
5440 for cf_add_1lib in $LIBS
5442 for cf_add_2lib in $cf_add_libs
5444 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5450 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5456 ac_cv_func_initscr=yes
5460 if test ".$ac_cv_func_initscr" != .yes ; then
5461 cf_save_LIBS="$LIBS"
5463 if test ".${cf_cv_ncurses_version:-no}" != .no
5465 cf_check_list="ncurses curses cursesX"
5467 cf_check_list="cursesX curses ncurses"
5470 # Check for library containing tgoto. Do this before curses library
5471 # because it may be needed to link the test-case for initscr.
5472 if test "x$cf_term_lib" = x
5474 echo "$as_me:5474: checking for tgoto" >&5
5475 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5476 if test "${ac_cv_func_tgoto+set}" = set; then
5477 echo $ECHO_N "(cached) $ECHO_C" >&6
5479 cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5482 /* System header to define __stub macros and hopefully few prototypes,
5483 which can conflict with char tgoto (); below. */
5485 /* Override any gcc2 internal prototype to avoid an error. */
5489 /* We use char because int might match the return type of a gcc2
5490 builtin and then its argument prototype would still apply. */
5497 /* The GNU C library defines this for functions which it implements
5498 to always fail with ENOSYS. Some functions are actually named
5499 something starting with __ and the normal name is an alias. */
5500 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5503 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5510 rm -f conftest.$ac_objext conftest$ac_exeext
5511 if { (eval echo "$as_me:5511: \"$ac_link\"") >&5
5512 (eval $ac_link) 2>&5
5514 echo "$as_me:5514: \$? = $ac_status" >&5
5515 (exit $ac_status); } &&
5516 { ac_try='test -s conftest$ac_exeext'
5517 { (eval echo "$as_me:5517: \"$ac_try\"") >&5
5520 echo "$as_me:5520: \$? = $ac_status" >&5
5521 (exit $ac_status); }; }; then
5522 ac_cv_func_tgoto=yes
5524 echo "$as_me: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5530 echo "$as_me:5530: result: $ac_cv_func_tgoto" >&5
5531 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5532 if test $ac_cv_func_tgoto = yes; then
5533 cf_term_lib=predefined
5536 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5538 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5539 echo "$as_me:5539: checking for tgoto in -l$cf_term_lib" >&5
5540 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5541 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5542 echo $ECHO_N "(cached) $ECHO_C" >&6
5544 ac_check_lib_save_LIBS=$LIBS
5545 LIBS="-l$cf_term_lib $LIBS"
5546 cat >conftest.$ac_ext <<_ACEOF
5547 #line 5547 "configure"
5548 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error. */
5554 /* We use char because int might match the return type of a gcc2
5555 builtin and then its argument prototype would still apply. */
5565 rm -f conftest.$ac_objext conftest$ac_exeext
5566 if { (eval echo "$as_me:5566: \"$ac_link\"") >&5
5567 (eval $ac_link) 2>&5
5569 echo "$as_me:5569: \$? = $ac_status" >&5
5570 (exit $ac_status); } &&
5571 { ac_try='test -s conftest$ac_exeext'
5572 { (eval echo "$as_me:5572: \"$ac_try\"") >&5
5575 echo "$as_me:5575: \$? = $ac_status" >&5
5576 (exit $ac_status); }; }; then
5577 eval "$as_ac_Lib=yes"
5579 echo "$as_me: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
5581 eval "$as_ac_Lib=no"
5583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5584 LIBS=$ac_check_lib_save_LIBS
5586 echo "$as_me:5586: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5587 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5588 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5598 # Check for library containing initscr
5599 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5600 if test "x$cf_curs_lib" = x
5602 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5604 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5605 echo "$as_me:5605: checking for initscr in -l$cf_curs_lib" >&5
5606 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5607 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5608 echo $ECHO_N "(cached) $ECHO_C" >&6
5610 ac_check_lib_save_LIBS=$LIBS
5611 LIBS="-l$cf_curs_lib $LIBS"
5612 cat >conftest.$ac_ext <<_ACEOF
5613 #line 5613 "configure"
5614 #include "confdefs.h"
5616 /* Override any gcc2 internal prototype to avoid an error. */
5620 /* We use char because int might match the return type of a gcc2
5621 builtin and then its argument prototype would still apply. */
5631 rm -f conftest.$ac_objext conftest$ac_exeext
5632 if { (eval echo "$as_me:5632: \"$ac_link\"") >&5
5633 (eval $ac_link) 2>&5
5635 echo "$as_me:5635: \$? = $ac_status" >&5
5636 (exit $ac_status); } &&
5637 { ac_try='test -s conftest$ac_exeext'
5638 { (eval echo "$as_me:5638: \"$ac_try\"") >&5
5641 echo "$as_me:5641: \$? = $ac_status" >&5
5642 (exit $ac_status); }; }; then
5643 eval "$as_ac_Lib=yes"
5645 echo "$as_me: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5647 eval "$as_ac_Lib=no"
5649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5650 LIBS=$ac_check_lib_save_LIBS
5652 echo "$as_me:5652: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5653 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5654 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5660 test $cf_curs_lib = unknown && { { echo "$as_me:5660: error: no curses library found" >&5
5661 echo "$as_me: error: no curses library found" >&2;}
5662 { (exit 1); exit 1; }; }
5664 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5665 if test "$cf_term_lib" = unknown ; then
5666 echo "$as_me:5666: checking if we can link with $cf_curs_lib library" >&5
5667 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5668 cat >conftest.$ac_ext <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5671 #include <${cf_cv_ncurses_header:-curses.h}>
5680 rm -f conftest.$ac_objext conftest$ac_exeext
5681 if { (eval echo "$as_me:5681: \"$ac_link\"") >&5
5682 (eval $ac_link) 2>&5
5684 echo "$as_me:5684: \$? = $ac_status" >&5
5685 (exit $ac_status); } &&
5686 { ac_try='test -s conftest$ac_exeext'
5687 { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5690 echo "$as_me:5690: \$? = $ac_status" >&5
5691 (exit $ac_status); }; }; then
5694 echo "$as_me: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699 echo "$as_me:5699: result: $cf_result" >&5
5700 echo "${ECHO_T}$cf_result" >&6
5701 test $cf_result = no && { { echo "$as_me:5701: error: Cannot link curses library" >&5
5702 echo "$as_me: error: Cannot link curses library" >&2;}
5703 { (exit 1); exit 1; }; }
5704 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5706 elif test "$cf_term_lib" != predefined ; then
5707 echo "$as_me:5707: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5708 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5709 cat >conftest.$ac_ext <<_ACEOF
5710 #line 5710 "configure"
5711 #include "confdefs.h"
5712 #include <${cf_cv_ncurses_header:-curses.h}>
5716 initscr(); tgoto((char *)0, 0, 0);
5721 rm -f conftest.$ac_objext conftest$ac_exeext
5722 if { (eval echo "$as_me:5722: \"$ac_link\"") >&5
5723 (eval $ac_link) 2>&5
5725 echo "$as_me:5725: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest$ac_exeext'
5728 { (eval echo "$as_me:5728: \"$ac_try\"") >&5
5731 echo "$as_me:5731: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5735 echo "$as_me: failed program was:" >&5
5736 cat conftest.$ac_ext >&5
5738 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5739 cat >conftest.$ac_ext <<_ACEOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742 #include <${cf_cv_ncurses_header:-curses.h}>
5751 rm -f conftest.$ac_objext conftest$ac_exeext
5752 if { (eval echo "$as_me:5752: \"$ac_link\"") >&5
5753 (eval $ac_link) 2>&5
5755 echo "$as_me:5755: \$? = $ac_status" >&5
5756 (exit $ac_status); } &&
5757 { ac_try='test -s conftest$ac_exeext'
5758 { (eval echo "$as_me:5758: \"$ac_try\"") >&5
5761 echo "$as_me:5761: \$? = $ac_status" >&5
5762 (exit $ac_status); }; }; then
5765 echo "$as_me: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5773 echo "$as_me:5773: result: $cf_result" >&5
5774 echo "${ECHO_T}$cf_result" >&6
5782 echo "$as_me:5782: checking for multibyte character support" >&5
5783 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5784 if test "${cf_cv_utf8_lib+set}" = set; then
5785 echo $ECHO_N "(cached) $ECHO_C" >&6
5788 cf_save_LIBS="$LIBS"
5789 cat >conftest.$ac_ext <<_ACEOF
5790 #line 5790 "configure"
5791 #include "confdefs.h"
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:5803: \"$ac_link\"") >&5
5804 (eval $ac_link) 2>&5
5806 echo "$as_me:5806: \$? = $ac_status" >&5
5807 (exit $ac_status); } &&
5808 { ac_try='test -s conftest$ac_exeext'
5809 { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5812 echo "$as_me:5812: \$? = $ac_status" >&5
5813 (exit $ac_status); }; }; then
5816 echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5819 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5820 # will be set on completion of the AC_TRY_LINK below.
5821 cf_cv_header_path_utf8=
5822 cf_cv_library_path_utf8=
5824 echo "${as_me:-configure}:5824: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5826 cf_save_LIBS="$LIBS"
5828 cat >conftest.$ac_ext <<_ACEOF
5829 #line 5829 "configure"
5830 #include "confdefs.h"
5832 #include <libutf8.h>
5841 rm -f conftest.$ac_objext conftest$ac_exeext
5842 if { (eval echo "$as_me:5842: \"$ac_link\"") >&5
5843 (eval $ac_link) 2>&5
5845 echo "$as_me:5845: \$? = $ac_status" >&5
5846 (exit $ac_status); } &&
5847 { ac_try='test -s conftest$ac_exeext'
5848 { (eval echo "$as_me:5848: \"$ac_try\"") >&5
5851 echo "$as_me:5851: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
5854 cf_cv_find_linkage_utf8=yes
5855 cf_cv_header_path_utf8=/usr/include
5856 cf_cv_library_path_utf8=/usr/lib
5859 echo "$as_me: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5862 LIBS="-lutf8 $cf_save_LIBS"
5864 cat >conftest.$ac_ext <<_ACEOF
5865 #line 5865 "configure"
5866 #include "confdefs.h"
5868 #include <libutf8.h>
5877 rm -f conftest.$ac_objext conftest$ac_exeext
5878 if { (eval echo "$as_me:5878: \"$ac_link\"") >&5
5879 (eval $ac_link) 2>&5
5881 echo "$as_me:5881: \$? = $ac_status" >&5
5882 (exit $ac_status); } &&
5883 { ac_try='test -s conftest$ac_exeext'
5884 { (eval echo "$as_me:5884: \"$ac_try\"") >&5
5887 echo "$as_me:5887: \$? = $ac_status" >&5
5888 (exit $ac_status); }; }; then
5890 cf_cv_find_linkage_utf8=yes
5891 cf_cv_header_path_utf8=/usr/include
5892 cf_cv_library_path_utf8=/usr/lib
5893 cf_cv_library_file_utf8="-lutf8"
5896 echo "$as_me: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5899 cf_cv_find_linkage_utf8=no
5900 LIBS="$cf_save_LIBS"
5902 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5904 echo "${as_me:-configure}:5904: testing find linkage for utf8 library ..." 1>&5
5906 echo "${as_me:-configure}:5906: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5908 cf_save_CPPFLAGS="$CPPFLAGS"
5909 cf_test_CPPFLAGS="$CPPFLAGS"
5913 # collect the current set of include-directories from compiler flags
5914 cf_header_path_list=""
5915 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5916 for cf_header_path in $CPPFLAGS $CFLAGS
5918 case $cf_header_path in
5920 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5922 test "x$cf_header_path" != "xNONE" && \
5923 test -d "$cf_header_path" && \
5925 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5926 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5927 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5928 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5929 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5930 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5933 cf_header_path_list="$cf_header_path_list $cf_search"
5939 # add the variations for the package we are looking for
5943 test "x$prefix" != "xNONE" && \
5944 test -d "$prefix" && \
5946 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5947 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5948 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5949 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5950 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5951 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5954 for cf_subdir_prefix in \
5963 test "x$cf_subdir_prefix" != "x$prefix" && \
5964 test -d "$cf_subdir_prefix" && \
5965 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5966 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5967 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5968 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5969 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5970 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5971 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5976 test "$includedir" != NONE && \
5977 test "$includedir" != "/usr/include" && \
5978 test -d "$includedir" && {
5979 test -d $includedir && cf_search="$cf_search $includedir"
5980 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5983 test "$oldincludedir" != NONE && \
5984 test "$oldincludedir" != "/usr/include" && \
5985 test -d "$oldincludedir" && {
5986 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5987 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5990 cf_search="$cf_search $cf_header_path_list"
5992 for cf_cv_header_path_utf8 in $cf_search
5994 if test -d $cf_cv_header_path_utf8 ; then
5995 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5997 echo "${as_me:-configure}:5997: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5999 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6000 cat >conftest.$ac_ext <<_ACEOF
6001 #line 6001 "configure"
6002 #include "confdefs.h"
6004 #include <libutf8.h>
6013 rm -f conftest.$ac_objext
6014 if { (eval echo "$as_me:6014: \"$ac_compile\"") >&5
6015 (eval $ac_compile) 2>&5
6017 echo "$as_me:6017: \$? = $ac_status" >&5
6018 (exit $ac_status); } &&
6019 { ac_try='test -s conftest.$ac_objext'
6020 { (eval echo "$as_me:6020: \"$ac_try\"") >&5
6023 echo "$as_me:6023: \$? = $ac_status" >&5
6024 (exit $ac_status); }; }; then
6026 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6028 echo "${as_me:-configure}:6028: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6030 cf_cv_find_linkage_utf8=maybe
6031 cf_test_CPPFLAGS="$CPPFLAGS"
6034 echo "$as_me: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6037 CPPFLAGS="$cf_save_CPPFLAGS"
6040 rm -f conftest.$ac_objext conftest.$ac_ext
6044 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6046 echo "${as_me:-configure}:6046: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6048 cf_save_LIBS="$LIBS"
6049 cf_save_LDFLAGS="$LDFLAGS"
6051 if test "$cf_cv_find_linkage_utf8" != yes ; then
6054 cf_library_path_list=""
6055 if test -n "${LDFLAGS}${LIBS}" ; then
6056 for cf_library_path in $LDFLAGS $LIBS
6058 case $cf_library_path in
6060 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6062 test "x$cf_library_path" != "xNONE" && \
6063 test -d "$cf_library_path" && \
6065 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6066 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6067 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6068 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6069 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6070 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6073 cf_library_path_list="$cf_library_path_list $cf_search"
6081 test "x$prefix" != "xNONE" && \
6082 test -d "$prefix" && \
6084 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6085 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6086 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6087 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6088 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6089 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6092 for cf_subdir_prefix in \
6101 test "x$cf_subdir_prefix" != "x$prefix" && \
6102 test -d "$cf_subdir_prefix" && \
6103 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6104 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6105 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6106 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6107 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6108 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6109 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6114 cf_search="$cf_library_path_list $cf_search"
6116 for cf_cv_library_path_utf8 in $cf_search
6118 if test -d $cf_cv_library_path_utf8 ; then
6119 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6121 echo "${as_me:-configure}:6121: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6123 CPPFLAGS="$cf_test_CPPFLAGS"
6124 LIBS="-lutf8 $cf_save_LIBS"
6125 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6126 cat >conftest.$ac_ext <<_ACEOF
6127 #line 6127 "configure"
6128 #include "confdefs.h"
6130 #include <libutf8.h>
6139 rm -f conftest.$ac_objext conftest$ac_exeext
6140 if { (eval echo "$as_me:6140: \"$ac_link\"") >&5
6141 (eval $ac_link) 2>&5
6143 echo "$as_me:6143: \$? = $ac_status" >&5
6144 (exit $ac_status); } &&
6145 { ac_try='test -s conftest$ac_exeext'
6146 { (eval echo "$as_me:6146: \"$ac_try\"") >&5
6149 echo "$as_me:6149: \$? = $ac_status" >&5
6150 (exit $ac_status); }; }; then
6152 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6154 echo "${as_me:-configure}:6154: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6156 cf_cv_find_linkage_utf8=yes
6157 cf_cv_library_file_utf8="-lutf8"
6160 echo "$as_me: failed program was:" >&5
6161 cat conftest.$ac_ext >&5
6163 CPPFLAGS="$cf_save_CPPFLAGS"
6164 LIBS="$cf_save_LIBS"
6165 LDFLAGS="$cf_save_LDFLAGS"
6168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6171 CPPFLAGS="$cf_save_CPPFLAGS"
6172 LDFLAGS="$cf_save_LDFLAGS"
6176 cf_cv_find_linkage_utf8=no
6180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6185 LIBS="$cf_save_LIBS"
6187 if test "$cf_cv_find_linkage_utf8" = yes ; then
6188 cf_cv_utf8_lib=add-on
6194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6196 echo "$as_me:6196: result: $cf_cv_utf8_lib" >&5
6197 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6199 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6201 if test "$cf_cv_utf8_lib" = "add-on" ; then
6203 cat >>confdefs.h <<\EOF
6204 #define HAVE_LIBUTF8_H 1
6207 if test -n "$cf_cv_header_path_utf8" ; then
6208 for cf_add_incdir in $cf_cv_header_path_utf8
6210 while test $cf_add_incdir != /usr/include
6212 if test -d $cf_add_incdir
6215 if test -n "$CFLAGS$CPPFLAGS" ; then
6216 # a loop is needed to ensure we can add subdirs of existing dirs
6217 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6218 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6219 cf_have_incdir=yes; break
6224 if test "$cf_have_incdir" = no ; then
6225 if test "$cf_add_incdir" = /usr/local/include ; then
6226 if test "$GCC" = yes
6228 cf_save_CPPFLAGS=$CPPFLAGS
6229 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6230 cat >conftest.$ac_ext <<_ACEOF
6231 #line 6231 "configure"
6232 #include "confdefs.h"
6242 rm -f conftest.$ac_objext
6243 if { (eval echo "$as_me:6243: \"$ac_compile\"") >&5
6244 (eval $ac_compile) 2>&5
6246 echo "$as_me:6246: \$? = $ac_status" >&5
6247 (exit $ac_status); } &&
6248 { ac_try='test -s conftest.$ac_objext'
6249 { (eval echo "$as_me:6249: \"$ac_try\"") >&5
6252 echo "$as_me:6252: \$? = $ac_status" >&5
6253 (exit $ac_status); }; }; then
6256 echo "$as_me: failed program was:" >&5
6257 cat conftest.$ac_ext >&5
6260 rm -f conftest.$ac_objext conftest.$ac_ext
6261 CPPFLAGS=$cf_save_CPPFLAGS
6266 if test "$cf_have_incdir" = no ; then
6267 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6269 echo "${as_me:-configure}:6269: testing adding $cf_add_incdir to include-path ..." 1>&5
6271 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6273 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6274 test "$cf_top_incdir" = "$cf_add_incdir" && break
6275 cf_add_incdir="$cf_top_incdir"
6286 if test -n "$cf_cv_library_path_utf8" ; then
6287 for cf_add_libdir in $cf_cv_library_path_utf8
6289 if test $cf_add_libdir = /usr/lib ; then
6291 elif test -d $cf_add_libdir
6294 if test -n "$LDFLAGS$LIBS" ; then
6295 # a loop is needed to ensure we can add subdirs of existing dirs
6296 for cf_test_libdir in $LDFLAGS $LIBS ; do
6297 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6298 cf_have_libdir=yes; break
6302 if test "$cf_have_libdir" = no ; then
6303 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6305 echo "${as_me:-configure}:6305: testing adding $cf_add_libdir to library-path ..." 1>&5
6307 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6313 cf_add_libs="$cf_cv_library_file_utf8"
6314 # Filter out duplicates - this happens with badly-designed ".pc" files...
6315 for cf_add_1lib in $LIBS
6317 for cf_add_2lib in $cf_add_libs
6319 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6325 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6331 cf_ncuconfig_root=$cf_cv_screen
6332 cf_have_ncuconfig=no
6334 if test "x${PKG_CONFIG:=none}" != xnone; then
6335 echo "$as_me:6335: checking pkg-config for $cf_ncuconfig_root" >&5
6336 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6337 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6338 echo "$as_me:6338: result: yes" >&5
6339 echo "${ECHO_T}yes" >&6
6341 echo "$as_me:6341: checking if the $cf_ncuconfig_root package files work" >&5
6342 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6343 cf_have_ncuconfig=unknown
6345 cf_save_CPPFLAGS="$CPPFLAGS"
6346 cf_save_LIBS="$LIBS"
6348 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6350 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6351 # Filter out duplicates - this happens with badly-designed ".pc" files...
6352 for cf_add_1lib in $LIBS
6354 for cf_add_2lib in $cf_add_libs
6356 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6366 cat >conftest.$ac_ext <<_ACEOF
6367 #line 6367 "configure"
6368 #include "confdefs.h"
6369 #include <${cf_cv_ncurses_header:-curses.h}>
6373 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6378 rm -f conftest.$ac_objext conftest$ac_exeext
6379 if { (eval echo "$as_me:6379: \"$ac_link\"") >&5
6380 (eval $ac_link) 2>&5
6382 echo "$as_me:6382: \$? = $ac_status" >&5
6383 (exit $ac_status); } &&
6384 { ac_try='test -s conftest$ac_exeext'
6385 { (eval echo "$as_me:6385: \"$ac_try\"") >&5
6388 echo "$as_me:6388: \$? = $ac_status" >&5
6389 (exit $ac_status); }; }; then
6390 if test "$cross_compiling" = yes; then
6391 cf_have_ncuconfig=maybe
6393 cat >conftest.$ac_ext <<_ACEOF
6394 #line 6394 "configure"
6395 #include "confdefs.h"
6396 #include <${cf_cv_ncurses_header:-curses.h}>
6398 { char *xx = curses_version(); return (xx == 0); }
6400 rm -f conftest$ac_exeext
6401 if { (eval echo "$as_me:6401: \"$ac_link\"") >&5
6402 (eval $ac_link) 2>&5
6404 echo "$as_me:6404: \$? = $ac_status" >&5
6405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6406 { (eval echo "$as_me:6406: \"$ac_try\"") >&5
6409 echo "$as_me:6409: \$? = $ac_status" >&5
6410 (exit $ac_status); }; }; then
6411 cf_have_ncuconfig=yes
6413 echo "$as_me: program exited with status $ac_status" >&5
6414 echo "$as_me: failed program was:" >&5
6415 cat conftest.$ac_ext >&5
6416 cf_have_ncuconfig=no
6418 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6421 echo "$as_me: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423 cf_have_ncuconfig=no
6425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6426 echo "$as_me:6426: result: $cf_have_ncuconfig" >&5
6427 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6428 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6429 if test "$cf_have_ncuconfig" != "yes"
6431 CPPFLAGS="$cf_save_CPPFLAGS"
6432 LIBS="$cf_save_LIBS"
6433 NCURSES_CONFIG_PKG=none
6436 cat >>confdefs.h <<\EOF
6440 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6444 echo "$as_me:6444: result: no" >&5
6445 echo "${ECHO_T}no" >&6
6446 NCURSES_CONFIG_PKG=none
6449 NCURSES_CONFIG_PKG=none
6452 if test "x$cf_have_ncuconfig" = "xno"; then
6453 echo "Looking for ${cf_ncuconfig_root}-config"
6455 if test -n "$ac_tool_prefix"; then
6456 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6458 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6459 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6460 echo "$as_me:6460: checking for $ac_word" >&5
6461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6462 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6463 echo $ECHO_N "(cached) $ECHO_C" >&6
6465 if test -n "$NCURSES_CONFIG"; then
6466 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6468 ac_save_IFS=$IFS; IFS=$ac_path_separator
6470 for ac_dir in $ac_dummy; do
6472 test -z "$ac_dir" && ac_dir=.
6473 $as_executable_p "$ac_dir/$ac_word" || continue
6474 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6475 echo "$as_me:6475: found $ac_dir/$ac_word" >&5
6481 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6482 if test -n "$NCURSES_CONFIG"; then
6483 echo "$as_me:6483: result: $NCURSES_CONFIG" >&5
6484 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6486 echo "$as_me:6486: result: no" >&5
6487 echo "${ECHO_T}no" >&6
6490 test -n "$NCURSES_CONFIG" && break
6493 if test -z "$NCURSES_CONFIG"; then
6494 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6495 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6497 # Extract the first word of "$ac_prog", so it can be a program name with args.
6498 set dummy $ac_prog; ac_word=$2
6499 echo "$as_me:6499: checking for $ac_word" >&5
6500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6501 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6502 echo $ECHO_N "(cached) $ECHO_C" >&6
6504 if test -n "$ac_ct_NCURSES_CONFIG"; then
6505 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6507 ac_save_IFS=$IFS; IFS=$ac_path_separator
6509 for ac_dir in $ac_dummy; do
6511 test -z "$ac_dir" && ac_dir=.
6512 $as_executable_p "$ac_dir/$ac_word" || continue
6513 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6514 echo "$as_me:6514: found $ac_dir/$ac_word" >&5
6520 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6521 if test -n "$ac_ct_NCURSES_CONFIG"; then
6522 echo "$as_me:6522: result: $ac_ct_NCURSES_CONFIG" >&5
6523 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6525 echo "$as_me:6525: result: no" >&5
6526 echo "${ECHO_T}no" >&6
6529 test -n "$ac_ct_NCURSES_CONFIG" && break
6531 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6533 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6536 if test "$NCURSES_CONFIG" != none ; then
6538 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6540 cf_add_libs="`$NCURSES_CONFIG --libs`"
6541 # Filter out duplicates - this happens with badly-designed ".pc" files...
6542 for cf_add_1lib in $LIBS
6544 for cf_add_2lib in $cf_add_libs
6546 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6552 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6556 # even with config script, some packages use no-override for curses.h
6558 echo "$as_me:6558: checking if we have identified curses headers" >&5
6559 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6560 if test "${cf_cv_ncurses_header+set}" = set; then
6561 echo $ECHO_N "(cached) $ECHO_C" >&6
6564 cf_cv_ncurses_header=none
6566 ncurses.h $cf_cv_screen/ncurses.h \
6567 curses.h $cf_cv_screen/curses.h
6569 cat >conftest.$ac_ext <<_ACEOF
6570 #line 6570 "configure"
6571 #include "confdefs.h"
6572 #include <${cf_header}>
6576 initscr(); tgoto("?", 0,0)
6581 rm -f conftest.$ac_objext
6582 if { (eval echo "$as_me:6582: \"$ac_compile\"") >&5
6583 (eval $ac_compile) 2>&5
6585 echo "$as_me:6585: \$? = $ac_status" >&5
6586 (exit $ac_status); } &&
6587 { ac_try='test -s conftest.$ac_objext'
6588 { (eval echo "$as_me:6588: \"$ac_try\"") >&5
6591 echo "$as_me:6591: \$? = $ac_status" >&5
6592 (exit $ac_status); }; }; then
6593 cf_cv_ncurses_header=$cf_header; break
6595 echo "$as_me: failed program was:" >&5
6596 cat conftest.$ac_ext >&5
6598 rm -f conftest.$ac_objext conftest.$ac_ext
6602 echo "$as_me:6602: result: $cf_cv_ncurses_header" >&5
6603 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6605 if test "$cf_cv_ncurses_header" = none ; then
6606 { { echo "$as_me:6606: error: No curses header-files found" >&5
6607 echo "$as_me: error: No curses header-files found" >&2;}
6608 { (exit 1); exit 1; }; }
6611 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6613 for ac_header in $cf_cv_ncurses_header
6615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6616 echo "$as_me:6616: checking for $ac_header" >&5
6617 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6618 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6621 cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624 #include <$ac_header>
6626 if { (eval echo "$as_me:6626: \"$ac_cpp conftest.$ac_ext\"") >&5
6627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6629 egrep -v '^ *\+' conftest.er1 >conftest.err
6631 cat conftest.err >&5
6632 echo "$as_me:6632: \$? = $ac_status" >&5
6633 (exit $ac_status); } >/dev/null; then
6634 if test -s conftest.err; then
6635 ac_cpp_err=$ac_c_preproc_warn_flag
6642 if test -z "$ac_cpp_err"; then
6643 eval "$as_ac_Header=yes"
6645 echo "$as_me: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6647 eval "$as_ac_Header=no"
6649 rm -f conftest.err conftest.$ac_ext
6651 echo "$as_me:6651: result: `eval echo '${'$as_ac_Header'}'`" >&5
6652 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6653 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6654 cat >>confdefs.h <<EOF
6655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6661 cat >>confdefs.h <<\EOF
6665 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6667 cat >>confdefs.h <<EOF
6668 #define $cf_nculib_ROOT 1
6671 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6675 cf_ncuhdr_root=$cf_cv_screen
6677 test -n "$cf_cv_curses_dir" && \
6678 test "$cf_cv_curses_dir" != "no" && { \
6680 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6681 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6683 while test $cf_add_incdir != /usr/include
6685 if test -d $cf_add_incdir
6688 if test -n "$CFLAGS$CPPFLAGS" ; then
6689 # a loop is needed to ensure we can add subdirs of existing dirs
6690 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6691 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6692 cf_have_incdir=yes; break
6697 if test "$cf_have_incdir" = no ; then
6698 if test "$cf_add_incdir" = /usr/local/include ; then
6699 if test "$GCC" = yes
6701 cf_save_CPPFLAGS=$CPPFLAGS
6702 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6703 cat >conftest.$ac_ext <<_ACEOF
6704 #line 6704 "configure"
6705 #include "confdefs.h"
6715 rm -f conftest.$ac_objext
6716 if { (eval echo "$as_me:6716: \"$ac_compile\"") >&5
6717 (eval $ac_compile) 2>&5
6719 echo "$as_me:6719: \$? = $ac_status" >&5
6720 (exit $ac_status); } &&
6721 { ac_try='test -s conftest.$ac_objext'
6722 { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6725 echo "$as_me:6725: \$? = $ac_status" >&5
6726 (exit $ac_status); }; }; then
6729 echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6733 rm -f conftest.$ac_objext conftest.$ac_ext
6734 CPPFLAGS=$cf_save_CPPFLAGS
6739 if test "$cf_have_incdir" = no ; then
6740 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6742 echo "${as_me:-configure}:6742: testing adding $cf_add_incdir to include-path ..." 1>&5
6744 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6746 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6747 test "$cf_top_incdir" = "$cf_add_incdir" && break
6748 cf_add_incdir="$cf_top_incdir"
6761 echo "$as_me:6761: checking for $cf_ncuhdr_root header in include-path" >&5
6762 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6763 if test "${cf_cv_ncurses_h+set}" = set; then
6764 echo $ECHO_N "(cached) $ECHO_C" >&6
6767 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6768 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6769 for cf_header in $cf_header_list
6772 cat >conftest.$ac_ext <<_ACEOF
6773 #line 6773 "configure"
6774 #include "confdefs.h"
6776 #include <$cf_header>
6781 #ifdef NCURSES_VERSION
6783 printf("%s\n", NCURSES_VERSION);
6796 rm -f conftest.$ac_objext
6797 if { (eval echo "$as_me:6797: \"$ac_compile\"") >&5
6798 (eval $ac_compile) 2>&5
6800 echo "$as_me:6800: \$? = $ac_status" >&5
6801 (exit $ac_status); } &&
6802 { ac_try='test -s conftest.$ac_objext'
6803 { (eval echo "$as_me:6803: \"$ac_try\"") >&5
6806 echo "$as_me:6806: \$? = $ac_status" >&5
6807 (exit $ac_status); }; }; then
6808 cf_cv_ncurses_h=$cf_header
6811 echo "$as_me: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6815 rm -f conftest.$ac_objext conftest.$ac_ext
6817 test "$cf_cv_ncurses_h" != no && break
6821 echo "$as_me:6821: result: $cf_cv_ncurses_h" >&5
6822 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6824 if test "$cf_cv_ncurses_h" != no ; then
6825 cf_cv_ncurses_header=$cf_cv_ncurses_h
6828 echo "$as_me:6828: checking for $cf_ncuhdr_root include-path" >&5
6829 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6830 if test "${cf_cv_ncurses_h2+set}" = set; then
6831 echo $ECHO_N "(cached) $ECHO_C" >&6
6834 test -n "$verbose" && echo
6838 # collect the current set of include-directories from compiler flags
6839 cf_header_path_list=""
6840 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6841 for cf_header_path in $CPPFLAGS $CFLAGS
6843 case $cf_header_path in
6845 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6847 test "x$cf_header_path" != "xNONE" && \
6848 test -d "$cf_header_path" && \
6850 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6851 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6852 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6853 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6854 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6855 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"
6858 cf_header_path_list="$cf_header_path_list $cf_search"
6864 # add the variations for the package we are looking for
6868 test "x$prefix" != "xNONE" && \
6869 test -d "$prefix" && \
6871 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6872 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6873 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6874 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6875 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6876 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6879 for cf_subdir_prefix in \
6888 test "x$cf_subdir_prefix" != "x$prefix" && \
6889 test -d "$cf_subdir_prefix" && \
6890 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6891 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6892 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6893 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6894 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6895 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6896 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"
6901 test "$includedir" != NONE && \
6902 test "$includedir" != "/usr/include" && \
6903 test -d "$includedir" && {
6904 test -d $includedir && cf_search="$cf_search $includedir"
6905 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6908 test "$oldincludedir" != NONE && \
6909 test "$oldincludedir" != "/usr/include" && \
6910 test -d "$oldincludedir" && {
6911 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6912 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6915 cf_search="$cf_search $cf_header_path_list"
6917 test -n "$verbose" && echo search path $cf_search
6918 cf_save2_CPPFLAGS="$CPPFLAGS"
6919 for cf_incdir in $cf_search
6922 if test -n "$cf_incdir" ; then
6923 for cf_add_incdir in $cf_incdir
6925 while test $cf_add_incdir != /usr/include
6927 if test -d $cf_add_incdir
6930 if test -n "$CFLAGS$CPPFLAGS" ; then
6931 # a loop is needed to ensure we can add subdirs of existing dirs
6932 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6933 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6934 cf_have_incdir=yes; break
6939 if test "$cf_have_incdir" = no ; then
6940 if test "$cf_add_incdir" = /usr/local/include ; then
6941 if test "$GCC" = yes
6943 cf_save_CPPFLAGS=$CPPFLAGS
6944 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6945 cat >conftest.$ac_ext <<_ACEOF
6946 #line 6946 "configure"
6947 #include "confdefs.h"
6957 rm -f conftest.$ac_objext
6958 if { (eval echo "$as_me:6958: \"$ac_compile\"") >&5
6959 (eval $ac_compile) 2>&5
6961 echo "$as_me:6961: \$? = $ac_status" >&5
6962 (exit $ac_status); } &&
6963 { ac_try='test -s conftest.$ac_objext'
6964 { (eval echo "$as_me:6964: \"$ac_try\"") >&5
6967 echo "$as_me:6967: \$? = $ac_status" >&5
6968 (exit $ac_status); }; }; then
6971 echo "$as_me: failed program was:" >&5
6972 cat conftest.$ac_ext >&5
6975 rm -f conftest.$ac_objext conftest.$ac_ext
6976 CPPFLAGS=$cf_save_CPPFLAGS
6981 if test "$cf_have_incdir" = no ; then
6982 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6984 echo "${as_me:-configure}:6984: testing adding $cf_add_incdir to include-path ..." 1>&5
6986 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6988 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6989 test "$cf_top_incdir" = "$cf_add_incdir" && break
6990 cf_add_incdir="$cf_top_incdir"
7006 cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7010 #include <$cf_header>
7015 #ifdef NCURSES_VERSION
7017 printf("%s\n", NCURSES_VERSION);
7030 rm -f conftest.$ac_objext
7031 if { (eval echo "$as_me:7031: \"$ac_compile\"") >&5
7032 (eval $ac_compile) 2>&5
7034 echo "$as_me:7034: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
7036 { ac_try='test -s conftest.$ac_objext'
7037 { (eval echo "$as_me:7037: \"$ac_try\"") >&5
7040 echo "$as_me:7040: \$? = $ac_status" >&5
7041 (exit $ac_status); }; }; then
7042 cf_cv_ncurses_h2=$cf_header
7045 echo "$as_me: failed program was:" >&5
7046 cat conftest.$ac_ext >&5
7049 rm -f conftest.$ac_objext conftest.$ac_ext
7051 if test "$cf_cv_ncurses_h2" != no ; then
7052 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7053 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7056 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7058 CPPFLAGS="$cf_save2_CPPFLAGS"
7059 test "$cf_cv_ncurses_h2" != no && break
7061 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7061: error: not found" >&5
7062 echo "$as_me: error: not found" >&2;}
7063 { (exit 1); exit 1; }; }
7066 echo "$as_me:7066: result: $cf_cv_ncurses_h2" >&5
7067 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7069 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7070 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7071 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7072 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7075 if test -n "$cf_1st_incdir" ; then
7076 for cf_add_incdir in $cf_1st_incdir
7078 while test $cf_add_incdir != /usr/include
7080 if test -d $cf_add_incdir
7083 if test -n "$CFLAGS$CPPFLAGS" ; then
7084 # a loop is needed to ensure we can add subdirs of existing dirs
7085 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7086 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7087 cf_have_incdir=yes; break
7092 if test "$cf_have_incdir" = no ; then
7093 if test "$cf_add_incdir" = /usr/local/include ; then
7094 if test "$GCC" = yes
7096 cf_save_CPPFLAGS=$CPPFLAGS
7097 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7098 cat >conftest.$ac_ext <<_ACEOF
7099 #line 7099 "configure"
7100 #include "confdefs.h"
7110 rm -f conftest.$ac_objext
7111 if { (eval echo "$as_me:7111: \"$ac_compile\"") >&5
7112 (eval $ac_compile) 2>&5
7114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit $ac_status); } &&
7116 { ac_try='test -s conftest.$ac_objext'
7117 { (eval echo "$as_me:7117: \"$ac_try\"") >&5
7120 echo "$as_me:7120: \$? = $ac_status" >&5
7121 (exit $ac_status); }; }; then
7124 echo "$as_me: failed program was:" >&5
7125 cat conftest.$ac_ext >&5
7128 rm -f conftest.$ac_objext conftest.$ac_ext
7129 CPPFLAGS=$cf_save_CPPFLAGS
7134 if test "$cf_have_incdir" = no ; then
7135 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7137 echo "${as_me:-configure}:7137: testing adding $cf_add_incdir to include-path ..." 1>&5
7139 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7141 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7142 test "$cf_top_incdir" = "$cf_add_incdir" && break
7143 cf_add_incdir="$cf_top_incdir"
7156 # Set definitions to allow ifdef'ing for ncurses.h
7158 case $cf_cv_ncurses_header in
7161 cat >>confdefs.h <<\EOF
7162 #define HAVE_NCURSES_H 1
7168 case $cf_cv_ncurses_header in
7169 (ncurses/curses.h|ncurses/ncurses.h)
7171 cat >>confdefs.h <<\EOF
7172 #define HAVE_NCURSES_NCURSES_H 1
7176 (ncursesw/curses.h|ncursesw/ncurses.h)
7178 cat >>confdefs.h <<\EOF
7179 #define HAVE_NCURSESW_NCURSES_H 1
7185 echo "$as_me:7185: checking for terminfo header" >&5
7186 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7187 if test "${cf_cv_term_header+set}" = set; then
7188 echo $ECHO_N "(cached) $ECHO_C" >&6
7191 case ${cf_cv_ncurses_header} in
7192 (*/ncurses.h|*/ncursesw.h)
7193 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7196 cf_term_header=term.h
7200 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7202 cat >conftest.$ac_ext <<_ACEOF
7203 #line 7203 "configure"
7204 #include "confdefs.h"
7206 #include <${cf_cv_ncurses_header:-curses.h}>
7212 int x = auto_left_margin
7217 rm -f conftest.$ac_objext
7218 if { (eval echo "$as_me:7218: \"$ac_compile\"") >&5
7219 (eval $ac_compile) 2>&5
7221 echo "$as_me:7221: \$? = $ac_status" >&5
7222 (exit $ac_status); } &&
7223 { ac_try='test -s conftest.$ac_objext'
7224 { (eval echo "$as_me:7224: \"$ac_try\"") >&5
7227 echo "$as_me:7227: \$? = $ac_status" >&5
7228 (exit $ac_status); }; }; then
7230 cf_cv_term_header="$cf_test"
7232 echo "$as_me: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7235 cf_cv_term_header=unknown
7238 rm -f conftest.$ac_objext conftest.$ac_ext
7239 test "$cf_cv_term_header" != unknown && break
7243 echo "$as_me:7243: result: $cf_cv_term_header" >&5
7244 echo "${ECHO_T}$cf_cv_term_header" >&6
7246 # Set definitions to allow ifdef'ing to accommodate subdirectories
7248 case $cf_cv_term_header in
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_TERM_H 1
7258 case $cf_cv_term_header in
7261 cat >>confdefs.h <<\EOF
7262 #define HAVE_NCURSES_TERM_H 1
7268 cat >>confdefs.h <<\EOF
7269 #define HAVE_NCURSESW_TERM_H 1
7275 # some applications need this, but should check for NCURSES_VERSION
7277 cat >>confdefs.h <<\EOF
7281 echo "$as_me:7281: checking for ncurses version" >&5
7282 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7283 if test "${cf_cv_ncurses_version+set}" = set; then
7284 echo $ECHO_N "(cached) $ECHO_C" >&6
7287 cf_cv_ncurses_version=no
7290 if test "$cross_compiling" = yes; then
7292 # This will not work if the preprocessor splits the line after the
7293 # Autoconf token. The 'unproto' program does that.
7294 cat > conftest.$ac_ext <<EOF
7295 #include <${cf_cv_ncurses_header:-curses.h}>
7297 #ifdef NCURSES_VERSION
7298 Autoconf NCURSES_VERSION
7306 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7307 { (eval echo "$as_me:7307: \"$cf_try\"") >&5
7310 echo "$as_me:7310: \$? = $ac_status" >&5
7311 (exit $ac_status); }
7312 if test -f conftest.out ; then
7313 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7314 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7319 cat >conftest.$ac_ext <<_ACEOF
7320 #line 7320 "configure"
7321 #include "confdefs.h"
7323 #include <${cf_cv_ncurses_header:-curses.h}>
7327 FILE *fp = fopen("$cf_tempfile", "w");
7328 #ifdef NCURSES_VERSION
7329 # ifdef NCURSES_VERSION_PATCH
7330 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7332 fprintf(fp, "%s\n", NCURSES_VERSION);
7336 fprintf(fp, "old\n");
7341 ${cf_cv_main_return:-return}(0);
7344 rm -f conftest$ac_exeext
7345 if { (eval echo "$as_me:7345: \"$ac_link\"") >&5
7346 (eval $ac_link) 2>&5
7348 echo "$as_me:7348: \$? = $ac_status" >&5
7349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7350 { (eval echo "$as_me:7350: \"$ac_try\"") >&5
7353 echo "$as_me:7353: \$? = $ac_status" >&5
7354 (exit $ac_status); }; }; then
7356 cf_cv_ncurses_version=`cat $cf_tempfile`
7358 echo "$as_me: program exited with status $ac_status" >&5
7359 echo "$as_me: failed program was:" >&5
7360 cat conftest.$ac_ext >&5
7362 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7367 echo "$as_me:7367: result: $cf_cv_ncurses_version" >&5
7368 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7369 test "$cf_cv_ncurses_version" = no ||
7370 cat >>confdefs.h <<\EOF
7374 cf_nculib_root=$cf_cv_screen
7375 # This works, except for the special case where we find gpm, but
7376 # ncurses is in a nonstandard location via $LIBS, and we really want
7379 cf_ncurses_SAVE="$LIBS"
7380 echo "$as_me:7380: checking for Gpm_Open in -lgpm" >&5
7381 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7382 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7383 echo $ECHO_N "(cached) $ECHO_C" >&6
7385 ac_check_lib_save_LIBS=$LIBS
7387 cat >conftest.$ac_ext <<_ACEOF
7388 #line 7388 "configure"
7389 #include "confdefs.h"
7391 /* Override any gcc2 internal prototype to avoid an error. */
7395 /* We use char because int might match the return type of a gcc2
7396 builtin and then its argument prototype would still apply. */
7406 rm -f conftest.$ac_objext conftest$ac_exeext
7407 if { (eval echo "$as_me:7407: \"$ac_link\"") >&5
7408 (eval $ac_link) 2>&5
7410 echo "$as_me:7410: \$? = $ac_status" >&5
7411 (exit $ac_status); } &&
7412 { ac_try='test -s conftest$ac_exeext'
7413 { (eval echo "$as_me:7413: \"$ac_try\"") >&5
7416 echo "$as_me:7416: \$? = $ac_status" >&5
7417 (exit $ac_status); }; }; then
7418 ac_cv_lib_gpm_Gpm_Open=yes
7420 echo "$as_me: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 ac_cv_lib_gpm_Gpm_Open=no
7424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7425 LIBS=$ac_check_lib_save_LIBS
7427 echo "$as_me:7427: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7428 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7429 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7430 echo "$as_me:7430: checking for initscr in -lgpm" >&5
7431 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7432 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7433 echo $ECHO_N "(cached) $ECHO_C" >&6
7435 ac_check_lib_save_LIBS=$LIBS
7437 cat >conftest.$ac_ext <<_ACEOF
7438 #line 7438 "configure"
7439 #include "confdefs.h"
7441 /* Override any gcc2 internal prototype to avoid an error. */
7445 /* We use char because int might match the return type of a gcc2
7446 builtin and then its argument prototype would still apply. */
7456 rm -f conftest.$ac_objext conftest$ac_exeext
7457 if { (eval echo "$as_me:7457: \"$ac_link\"") >&5
7458 (eval $ac_link) 2>&5
7460 echo "$as_me:7460: \$? = $ac_status" >&5
7461 (exit $ac_status); } &&
7462 { ac_try='test -s conftest$ac_exeext'
7463 { (eval echo "$as_me:7463: \"$ac_try\"") >&5
7466 echo "$as_me:7466: \$? = $ac_status" >&5
7467 (exit $ac_status); }; }; then
7468 ac_cv_lib_gpm_initscr=yes
7470 echo "$as_me: failed program was:" >&5
7471 cat conftest.$ac_ext >&5
7472 ac_cv_lib_gpm_initscr=no
7474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7475 LIBS=$ac_check_lib_save_LIBS
7477 echo "$as_me:7477: result: $ac_cv_lib_gpm_initscr" >&5
7478 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7479 if test $ac_cv_lib_gpm_initscr = yes; then
7480 LIBS="$cf_ncurses_SAVE"
7482 cf_ncurses_LIBS="-lgpm"
7489 # This is only necessary if you are linking against an obsolete
7490 # version of ncurses (but it should do no harm, since it's static).
7491 if test "$cf_nculib_root" = ncurses ; then
7492 echo "$as_me:7492: checking for tgoto in -lmytinfo" >&5
7493 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7494 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7495 echo $ECHO_N "(cached) $ECHO_C" >&6
7497 ac_check_lib_save_LIBS=$LIBS
7498 LIBS="-lmytinfo $LIBS"
7499 cat >conftest.$ac_ext <<_ACEOF
7500 #line 7500 "configure"
7501 #include "confdefs.h"
7503 /* Override any gcc2 internal prototype to avoid an error. */
7507 /* We use char because int might match the return type of a gcc2
7508 builtin and then its argument prototype would still apply. */
7518 rm -f conftest.$ac_objext conftest$ac_exeext
7519 if { (eval echo "$as_me:7519: \"$ac_link\"") >&5
7520 (eval $ac_link) 2>&5
7522 echo "$as_me:7522: \$? = $ac_status" >&5
7523 (exit $ac_status); } &&
7524 { ac_try='test -s conftest$ac_exeext'
7525 { (eval echo "$as_me:7525: \"$ac_try\"") >&5
7528 echo "$as_me:7528: \$? = $ac_status" >&5
7529 (exit $ac_status); }; }; then
7530 ac_cv_lib_mytinfo_tgoto=yes
7532 echo "$as_me: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534 ac_cv_lib_mytinfo_tgoto=no
7536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7537 LIBS=$ac_check_lib_save_LIBS
7539 echo "$as_me:7539: result: $ac_cv_lib_mytinfo_tgoto" >&5
7540 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7541 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7542 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7549 cf_add_libs="$cf_ncurses_LIBS"
7550 # Filter out duplicates - this happens with badly-designed ".pc" files...
7551 for cf_add_1lib in $LIBS
7553 for cf_add_2lib in $cf_add_libs
7555 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7561 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7565 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7568 cf_add_libs="-l$cf_nculib_root"
7569 # Filter out duplicates - this happens with badly-designed ".pc" files...
7570 for cf_add_1lib in $LIBS
7572 for cf_add_2lib in $cf_add_libs
7574 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7580 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7586 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7588 echo "$as_me:7588: checking for initscr" >&5
7589 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7590 if test "${ac_cv_func_initscr+set}" = set; then
7591 echo $ECHO_N "(cached) $ECHO_C" >&6
7593 cat >conftest.$ac_ext <<_ACEOF
7594 #line 7594 "configure"
7595 #include "confdefs.h"
7596 /* System header to define __stub macros and hopefully few prototypes,
7597 which can conflict with char initscr (); below. */
7599 /* Override any gcc2 internal prototype to avoid an error. */
7603 /* We use char because int might match the return type of a gcc2
7604 builtin and then its argument prototype would still apply. */
7611 /* The GNU C library defines this for functions which it implements
7612 to always fail with ENOSYS. Some functions are actually named
7613 something starting with __ and the normal name is an alias. */
7614 #if defined (__stub_initscr) || defined (__stub___initscr)
7617 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7624 rm -f conftest.$ac_objext conftest$ac_exeext
7625 if { (eval echo "$as_me:7625: \"$ac_link\"") >&5
7626 (eval $ac_link) 2>&5
7628 echo "$as_me:7628: \$? = $ac_status" >&5
7629 (exit $ac_status); } &&
7630 { ac_try='test -s conftest$ac_exeext'
7631 { (eval echo "$as_me:7631: \"$ac_try\"") >&5
7634 echo "$as_me:7634: \$? = $ac_status" >&5
7635 (exit $ac_status); }; }; then
7636 ac_cv_func_initscr=yes
7638 echo "$as_me: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 ac_cv_func_initscr=no
7642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7644 echo "$as_me:7644: result: $ac_cv_func_initscr" >&5
7645 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7646 if test $ac_cv_func_initscr = yes; then
7647 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7650 cf_save_LIBS="$LIBS"
7651 echo "$as_me:7651: checking for initscr in -l$cf_nculib_root" >&5
7652 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7653 LIBS="-l$cf_nculib_root $LIBS"
7654 cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657 #include <${cf_cv_ncurses_header:-curses.h}>
7666 rm -f conftest.$ac_objext conftest$ac_exeext
7667 if { (eval echo "$as_me:7667: \"$ac_link\"") >&5
7668 (eval $ac_link) 2>&5
7670 echo "$as_me:7670: \$? = $ac_status" >&5
7671 (exit $ac_status); } &&
7672 { ac_try='test -s conftest$ac_exeext'
7673 { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit $ac_status); }; }; then
7678 echo "$as_me:7678: result: yes" >&5
7679 echo "${ECHO_T}yes" >&6
7680 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7683 echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7685 echo "$as_me:7685: result: no" >&5
7686 echo "${ECHO_T}no" >&6
7689 cf_library_path_list=""
7690 if test -n "${LDFLAGS}${LIBS}" ; then
7691 for cf_library_path in $LDFLAGS $LIBS
7693 case $cf_library_path in
7695 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7697 test "x$cf_library_path" != "xNONE" && \
7698 test -d "$cf_library_path" && \
7700 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7701 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7702 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7703 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7704 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7705 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"
7708 cf_library_path_list="$cf_library_path_list $cf_search"
7716 test "x$prefix" != "xNONE" && \
7717 test -d "$prefix" && \
7719 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7720 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7721 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7722 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7723 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7724 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7727 for cf_subdir_prefix in \
7736 test "x$cf_subdir_prefix" != "x$prefix" && \
7737 test -d "$cf_subdir_prefix" && \
7738 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7739 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7740 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7741 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7742 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7743 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7744 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"
7749 cf_search="$cf_library_path_list $cf_search"
7751 for cf_libdir in $cf_search
7753 echo "$as_me:7753: checking for -l$cf_nculib_root in $cf_libdir" >&5
7754 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7755 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7756 cat >conftest.$ac_ext <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <${cf_cv_ncurses_header:-curses.h}>
7768 rm -f conftest.$ac_objext conftest$ac_exeext
7769 if { (eval echo "$as_me:7769: \"$ac_link\"") >&5
7770 (eval $ac_link) 2>&5
7772 echo "$as_me:7772: \$? = $ac_status" >&5
7773 (exit $ac_status); } &&
7774 { ac_try='test -s conftest$ac_exeext'
7775 { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); }; }; then
7780 echo "$as_me:7780: result: yes" >&5
7781 echo "${ECHO_T}yes" >&6
7782 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7785 echo "$as_me: failed program was:" >&5
7786 cat conftest.$ac_ext >&5
7787 echo "$as_me:7787: result: no" >&5
7788 echo "${ECHO_T}no" >&6
7789 LIBS="$cf_save_LIBS"
7791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7799 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7801 if test $cf_found_library = no ; then
7802 { { echo "$as_me:7802: error: Cannot link $cf_nculib_root library" >&5
7803 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7804 { (exit 1); exit 1; }; }
7809 if test -n "$cf_ncurses_LIBS" ; then
7810 echo "$as_me:7810: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7811 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7812 cf_ncurses_SAVE="$LIBS"
7813 for p in $cf_ncurses_LIBS ; do
7814 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7815 if test "$q" != "$LIBS" ; then
7819 cat >conftest.$ac_ext <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7822 #include <${cf_cv_ncurses_header:-curses.h}>
7826 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7831 rm -f conftest.$ac_objext conftest$ac_exeext
7832 if { (eval echo "$as_me:7832: \"$ac_link\"") >&5
7833 (eval $ac_link) 2>&5
7835 echo "$as_me:7835: \$? = $ac_status" >&5
7836 (exit $ac_status); } &&
7837 { ac_try='test -s conftest$ac_exeext'
7838 { (eval echo "$as_me:7838: \"$ac_try\"") >&5
7841 echo "$as_me:7841: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7843 echo "$as_me:7843: result: yes" >&5
7844 echo "${ECHO_T}yes" >&6
7846 echo "$as_me: failed program was:" >&5
7847 cat conftest.$ac_ext >&5
7848 echo "$as_me:7848: result: no" >&5
7849 echo "${ECHO_T}no" >&6
7850 LIBS="$cf_ncurses_SAVE"
7852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7855 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7857 cat >>confdefs.h <<EOF
7858 #define $cf_nculib_ROOT 1
7869 cf_ncuconfig_root=$cf_cv_screen
7870 cf_have_ncuconfig=no
7872 if test "x${PKG_CONFIG:=none}" != xnone; then
7873 echo "$as_me:7873: checking pkg-config for $cf_ncuconfig_root" >&5
7874 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7875 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7876 echo "$as_me:7876: result: yes" >&5
7877 echo "${ECHO_T}yes" >&6
7879 echo "$as_me:7879: checking if the $cf_ncuconfig_root package files work" >&5
7880 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7881 cf_have_ncuconfig=unknown
7883 cf_save_CPPFLAGS="$CPPFLAGS"
7884 cf_save_LIBS="$LIBS"
7886 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7888 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7889 # Filter out duplicates - this happens with badly-designed ".pc" files...
7890 for cf_add_1lib in $LIBS
7892 for cf_add_2lib in $cf_add_libs
7894 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7900 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7904 cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907 #include <${cf_cv_ncurses_header:-curses.h}>
7911 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7916 rm -f conftest.$ac_objext conftest$ac_exeext
7917 if { (eval echo "$as_me:7917: \"$ac_link\"") >&5
7918 (eval $ac_link) 2>&5
7920 echo "$as_me:7920: \$? = $ac_status" >&5
7921 (exit $ac_status); } &&
7922 { ac_try='test -s conftest$ac_exeext'
7923 { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7926 echo "$as_me:7926: \$? = $ac_status" >&5
7927 (exit $ac_status); }; }; then
7928 if test "$cross_compiling" = yes; then
7929 cf_have_ncuconfig=maybe
7931 cat >conftest.$ac_ext <<_ACEOF
7932 #line 7932 "configure"
7933 #include "confdefs.h"
7934 #include <${cf_cv_ncurses_header:-curses.h}>
7936 { char *xx = curses_version(); return (xx == 0); }
7938 rm -f conftest$ac_exeext
7939 if { (eval echo "$as_me:7939: \"$ac_link\"") >&5
7940 (eval $ac_link) 2>&5
7942 echo "$as_me:7942: \$? = $ac_status" >&5
7943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7944 { (eval echo "$as_me:7944: \"$ac_try\"") >&5
7947 echo "$as_me:7947: \$? = $ac_status" >&5
7948 (exit $ac_status); }; }; then
7949 cf_have_ncuconfig=yes
7951 echo "$as_me: program exited with status $ac_status" >&5
7952 echo "$as_me: failed program was:" >&5
7953 cat conftest.$ac_ext >&5
7954 cf_have_ncuconfig=no
7956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7959 echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961 cf_have_ncuconfig=no
7963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7964 echo "$as_me:7964: result: $cf_have_ncuconfig" >&5
7965 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7966 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7967 if test "$cf_have_ncuconfig" != "yes"
7969 CPPFLAGS="$cf_save_CPPFLAGS"
7970 LIBS="$cf_save_LIBS"
7971 NCURSES_CONFIG_PKG=none
7974 cat >>confdefs.h <<\EOF
7978 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7982 echo "$as_me:7982: result: no" >&5
7983 echo "${ECHO_T}no" >&6
7984 NCURSES_CONFIG_PKG=none
7987 NCURSES_CONFIG_PKG=none
7990 if test "x$cf_have_ncuconfig" = "xno"; then
7991 echo "Looking for ${cf_ncuconfig_root}-config"
7993 if test -n "$ac_tool_prefix"; then
7994 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7996 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7997 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7998 echo "$as_me:7998: checking for $ac_word" >&5
7999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8000 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8001 echo $ECHO_N "(cached) $ECHO_C" >&6
8003 if test -n "$NCURSES_CONFIG"; then
8004 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8006 ac_save_IFS=$IFS; IFS=$ac_path_separator
8008 for ac_dir in $ac_dummy; do
8010 test -z "$ac_dir" && ac_dir=.
8011 $as_executable_p "$ac_dir/$ac_word" || continue
8012 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8013 echo "$as_me:8013: found $ac_dir/$ac_word" >&5
8019 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8020 if test -n "$NCURSES_CONFIG"; then
8021 echo "$as_me:8021: result: $NCURSES_CONFIG" >&5
8022 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8024 echo "$as_me:8024: result: no" >&5
8025 echo "${ECHO_T}no" >&6
8028 test -n "$NCURSES_CONFIG" && break
8031 if test -z "$NCURSES_CONFIG"; then
8032 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8033 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8035 # Extract the first word of "$ac_prog", so it can be a program name with args.
8036 set dummy $ac_prog; ac_word=$2
8037 echo "$as_me:8037: checking for $ac_word" >&5
8038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8039 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8040 echo $ECHO_N "(cached) $ECHO_C" >&6
8042 if test -n "$ac_ct_NCURSES_CONFIG"; then
8043 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8045 ac_save_IFS=$IFS; IFS=$ac_path_separator
8047 for ac_dir in $ac_dummy; do
8049 test -z "$ac_dir" && ac_dir=.
8050 $as_executable_p "$ac_dir/$ac_word" || continue
8051 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8052 echo "$as_me:8052: found $ac_dir/$ac_word" >&5
8058 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8059 if test -n "$ac_ct_NCURSES_CONFIG"; then
8060 echo "$as_me:8060: result: $ac_ct_NCURSES_CONFIG" >&5
8061 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8063 echo "$as_me:8063: result: no" >&5
8064 echo "${ECHO_T}no" >&6
8067 test -n "$ac_ct_NCURSES_CONFIG" && break
8069 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8071 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8074 if test "$NCURSES_CONFIG" != none ; then
8076 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8078 cf_add_libs="`$NCURSES_CONFIG --libs`"
8079 # Filter out duplicates - this happens with badly-designed ".pc" files...
8080 for cf_add_1lib in $LIBS
8082 for cf_add_2lib in $cf_add_libs
8084 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8090 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8094 # even with config script, some packages use no-override for curses.h
8096 echo "$as_me:8096: checking if we have identified curses headers" >&5
8097 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8098 if test "${cf_cv_ncurses_header+set}" = set; then
8099 echo $ECHO_N "(cached) $ECHO_C" >&6
8102 cf_cv_ncurses_header=none
8104 ncurses.h $cf_cv_screen/ncurses.h \
8105 curses.h $cf_cv_screen/curses.h
8107 cat >conftest.$ac_ext <<_ACEOF
8108 #line 8108 "configure"
8109 #include "confdefs.h"
8110 #include <${cf_header}>
8114 initscr(); tgoto("?", 0,0)
8119 rm -f conftest.$ac_objext
8120 if { (eval echo "$as_me:8120: \"$ac_compile\"") >&5
8121 (eval $ac_compile) 2>&5
8123 echo "$as_me:8123: \$? = $ac_status" >&5
8124 (exit $ac_status); } &&
8125 { ac_try='test -s conftest.$ac_objext'
8126 { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit $ac_status); }; }; then
8131 cf_cv_ncurses_header=$cf_header; break
8133 echo "$as_me: failed program was:" >&5
8134 cat conftest.$ac_ext >&5
8136 rm -f conftest.$ac_objext conftest.$ac_ext
8140 echo "$as_me:8140: result: $cf_cv_ncurses_header" >&5
8141 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8143 if test "$cf_cv_ncurses_header" = none ; then
8144 { { echo "$as_me:8144: error: No curses header-files found" >&5
8145 echo "$as_me: error: No curses header-files found" >&2;}
8146 { (exit 1); exit 1; }; }
8149 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8151 for ac_header in $cf_cv_ncurses_header
8153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8154 echo "$as_me:8154: checking for $ac_header" >&5
8155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8157 echo $ECHO_N "(cached) $ECHO_C" >&6
8159 cat >conftest.$ac_ext <<_ACEOF
8160 #line 8160 "configure"
8161 #include "confdefs.h"
8162 #include <$ac_header>
8164 if { (eval echo "$as_me:8164: \"$ac_cpp conftest.$ac_ext\"") >&5
8165 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8167 egrep -v '^ *\+' conftest.er1 >conftest.err
8169 cat conftest.err >&5
8170 echo "$as_me:8170: \$? = $ac_status" >&5
8171 (exit $ac_status); } >/dev/null; then
8172 if test -s conftest.err; then
8173 ac_cpp_err=$ac_c_preproc_warn_flag
8180 if test -z "$ac_cpp_err"; then
8181 eval "$as_ac_Header=yes"
8183 echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185 eval "$as_ac_Header=no"
8187 rm -f conftest.err conftest.$ac_ext
8189 echo "$as_me:8189: result: `eval echo '${'$as_ac_Header'}'`" >&5
8190 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8192 cat >>confdefs.h <<EOF
8193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8199 cat >>confdefs.h <<\EOF
8203 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8205 cat >>confdefs.h <<EOF
8206 #define $cf_nculib_ROOT 1
8209 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8213 cf_ncuhdr_root=$cf_cv_screen
8215 test -n "$cf_cv_curses_dir" && \
8216 test "$cf_cv_curses_dir" != "no" && { \
8218 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8219 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8221 while test $cf_add_incdir != /usr/include
8223 if test -d $cf_add_incdir
8226 if test -n "$CFLAGS$CPPFLAGS" ; then
8227 # a loop is needed to ensure we can add subdirs of existing dirs
8228 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8229 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8230 cf_have_incdir=yes; break
8235 if test "$cf_have_incdir" = no ; then
8236 if test "$cf_add_incdir" = /usr/local/include ; then
8237 if test "$GCC" = yes
8239 cf_save_CPPFLAGS=$CPPFLAGS
8240 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8241 cat >conftest.$ac_ext <<_ACEOF
8242 #line 8242 "configure"
8243 #include "confdefs.h"
8253 rm -f conftest.$ac_objext
8254 if { (eval echo "$as_me:8254: \"$ac_compile\"") >&5
8255 (eval $ac_compile) 2>&5
8257 echo "$as_me:8257: \$? = $ac_status" >&5
8258 (exit $ac_status); } &&
8259 { ac_try='test -s conftest.$ac_objext'
8260 { (eval echo "$as_me:8260: \"$ac_try\"") >&5
8263 echo "$as_me:8263: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8267 echo "$as_me: failed program was:" >&5
8268 cat conftest.$ac_ext >&5
8271 rm -f conftest.$ac_objext conftest.$ac_ext
8272 CPPFLAGS=$cf_save_CPPFLAGS
8277 if test "$cf_have_incdir" = no ; then
8278 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8280 echo "${as_me:-configure}:8280: testing adding $cf_add_incdir to include-path ..." 1>&5
8282 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8284 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8285 test "$cf_top_incdir" = "$cf_add_incdir" && break
8286 cf_add_incdir="$cf_top_incdir"
8299 echo "$as_me:8299: checking for $cf_ncuhdr_root header in include-path" >&5
8300 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8301 if test "${cf_cv_ncurses_h+set}" = set; then
8302 echo $ECHO_N "(cached) $ECHO_C" >&6
8305 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8306 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8307 for cf_header in $cf_header_list
8310 cat >conftest.$ac_ext <<_ACEOF
8311 #line 8311 "configure"
8312 #include "confdefs.h"
8314 #include <$cf_header>
8319 #ifdef NCURSES_VERSION
8321 printf("%s\n", NCURSES_VERSION);
8334 rm -f conftest.$ac_objext
8335 if { (eval echo "$as_me:8335: \"$ac_compile\"") >&5
8336 (eval $ac_compile) 2>&5
8338 echo "$as_me:8338: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest.$ac_objext'
8341 { (eval echo "$as_me:8341: \"$ac_try\"") >&5
8344 echo "$as_me:8344: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 cf_cv_ncurses_h=$cf_header
8349 echo "$as_me: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8353 rm -f conftest.$ac_objext conftest.$ac_ext
8355 test "$cf_cv_ncurses_h" != no && break
8359 echo "$as_me:8359: result: $cf_cv_ncurses_h" >&5
8360 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8362 if test "$cf_cv_ncurses_h" != no ; then
8363 cf_cv_ncurses_header=$cf_cv_ncurses_h
8366 echo "$as_me:8366: checking for $cf_ncuhdr_root include-path" >&5
8367 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8368 if test "${cf_cv_ncurses_h2+set}" = set; then
8369 echo $ECHO_N "(cached) $ECHO_C" >&6
8372 test -n "$verbose" && echo
8376 # collect the current set of include-directories from compiler flags
8377 cf_header_path_list=""
8378 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8379 for cf_header_path in $CPPFLAGS $CFLAGS
8381 case $cf_header_path in
8383 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8385 test "x$cf_header_path" != "xNONE" && \
8386 test -d "$cf_header_path" && \
8388 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8389 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8390 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8391 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8392 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8393 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"
8396 cf_header_path_list="$cf_header_path_list $cf_search"
8402 # add the variations for the package we are looking for
8406 test "x$prefix" != "xNONE" && \
8407 test -d "$prefix" && \
8409 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8410 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8411 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8412 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8413 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8414 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8417 for cf_subdir_prefix in \
8426 test "x$cf_subdir_prefix" != "x$prefix" && \
8427 test -d "$cf_subdir_prefix" && \
8428 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8429 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8430 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8431 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8432 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8433 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8434 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"
8439 test "$includedir" != NONE && \
8440 test "$includedir" != "/usr/include" && \
8441 test -d "$includedir" && {
8442 test -d $includedir && cf_search="$cf_search $includedir"
8443 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8446 test "$oldincludedir" != NONE && \
8447 test "$oldincludedir" != "/usr/include" && \
8448 test -d "$oldincludedir" && {
8449 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8450 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8453 cf_search="$cf_search $cf_header_path_list"
8455 test -n "$verbose" && echo search path $cf_search
8456 cf_save2_CPPFLAGS="$CPPFLAGS"
8457 for cf_incdir in $cf_search
8460 if test -n "$cf_incdir" ; then
8461 for cf_add_incdir in $cf_incdir
8463 while test $cf_add_incdir != /usr/include
8465 if test -d $cf_add_incdir
8468 if test -n "$CFLAGS$CPPFLAGS" ; then
8469 # a loop is needed to ensure we can add subdirs of existing dirs
8470 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8471 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8472 cf_have_incdir=yes; break
8477 if test "$cf_have_incdir" = no ; then
8478 if test "$cf_add_incdir" = /usr/local/include ; then
8479 if test "$GCC" = yes
8481 cf_save_CPPFLAGS=$CPPFLAGS
8482 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8483 cat >conftest.$ac_ext <<_ACEOF
8484 #line 8484 "configure"
8485 #include "confdefs.h"
8495 rm -f conftest.$ac_objext
8496 if { (eval echo "$as_me:8496: \"$ac_compile\"") >&5
8497 (eval $ac_compile) 2>&5
8499 echo "$as_me:8499: \$? = $ac_status" >&5
8500 (exit $ac_status); } &&
8501 { ac_try='test -s conftest.$ac_objext'
8502 { (eval echo "$as_me:8502: \"$ac_try\"") >&5
8505 echo "$as_me:8505: \$? = $ac_status" >&5
8506 (exit $ac_status); }; }; then
8509 echo "$as_me: failed program was:" >&5
8510 cat conftest.$ac_ext >&5
8513 rm -f conftest.$ac_objext conftest.$ac_ext
8514 CPPFLAGS=$cf_save_CPPFLAGS
8519 if test "$cf_have_incdir" = no ; then
8520 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8522 echo "${as_me:-configure}:8522: testing adding $cf_add_incdir to include-path ..." 1>&5
8524 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8526 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8527 test "$cf_top_incdir" = "$cf_add_incdir" && break
8528 cf_add_incdir="$cf_top_incdir"
8544 cat >conftest.$ac_ext <<_ACEOF
8545 #line 8545 "configure"
8546 #include "confdefs.h"
8548 #include <$cf_header>
8553 #ifdef NCURSES_VERSION
8555 printf("%s\n", NCURSES_VERSION);
8568 rm -f conftest.$ac_objext
8569 if { (eval echo "$as_me:8569: \"$ac_compile\"") >&5
8570 (eval $ac_compile) 2>&5
8572 echo "$as_me:8572: \$? = $ac_status" >&5
8573 (exit $ac_status); } &&
8574 { ac_try='test -s conftest.$ac_objext'
8575 { (eval echo "$as_me:8575: \"$ac_try\"") >&5
8578 echo "$as_me:8578: \$? = $ac_status" >&5
8579 (exit $ac_status); }; }; then
8580 cf_cv_ncurses_h2=$cf_header
8583 echo "$as_me: failed program was:" >&5
8584 cat conftest.$ac_ext >&5
8587 rm -f conftest.$ac_objext conftest.$ac_ext
8589 if test "$cf_cv_ncurses_h2" != no ; then
8590 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8591 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8594 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8596 CPPFLAGS="$cf_save2_CPPFLAGS"
8597 test "$cf_cv_ncurses_h2" != no && break
8599 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8599: error: not found" >&5
8600 echo "$as_me: error: not found" >&2;}
8601 { (exit 1); exit 1; }; }
8604 echo "$as_me:8604: result: $cf_cv_ncurses_h2" >&5
8605 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8607 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8608 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8609 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8610 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8613 if test -n "$cf_1st_incdir" ; then
8614 for cf_add_incdir in $cf_1st_incdir
8616 while test $cf_add_incdir != /usr/include
8618 if test -d $cf_add_incdir
8621 if test -n "$CFLAGS$CPPFLAGS" ; then
8622 # a loop is needed to ensure we can add subdirs of existing dirs
8623 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8624 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8625 cf_have_incdir=yes; break
8630 if test "$cf_have_incdir" = no ; then
8631 if test "$cf_add_incdir" = /usr/local/include ; then
8632 if test "$GCC" = yes
8634 cf_save_CPPFLAGS=$CPPFLAGS
8635 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8636 cat >conftest.$ac_ext <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8648 rm -f conftest.$ac_objext
8649 if { (eval echo "$as_me:8649: \"$ac_compile\"") >&5
8650 (eval $ac_compile) 2>&5
8652 echo "$as_me:8652: \$? = $ac_status" >&5
8653 (exit $ac_status); } &&
8654 { ac_try='test -s conftest.$ac_objext'
8655 { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8658 echo "$as_me:8658: \$? = $ac_status" >&5
8659 (exit $ac_status); }; }; then
8662 echo "$as_me: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8666 rm -f conftest.$ac_objext conftest.$ac_ext
8667 CPPFLAGS=$cf_save_CPPFLAGS
8672 if test "$cf_have_incdir" = no ; then
8673 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8675 echo "${as_me:-configure}:8675: testing adding $cf_add_incdir to include-path ..." 1>&5
8677 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8679 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8680 test "$cf_top_incdir" = "$cf_add_incdir" && break
8681 cf_add_incdir="$cf_top_incdir"
8694 # Set definitions to allow ifdef'ing for ncurses.h
8696 case $cf_cv_ncurses_header in
8699 cat >>confdefs.h <<\EOF
8700 #define HAVE_NCURSES_H 1
8706 case $cf_cv_ncurses_header in
8707 (ncurses/curses.h|ncurses/ncurses.h)
8709 cat >>confdefs.h <<\EOF
8710 #define HAVE_NCURSES_NCURSES_H 1
8714 (ncursesw/curses.h|ncursesw/ncurses.h)
8716 cat >>confdefs.h <<\EOF
8717 #define HAVE_NCURSESW_NCURSES_H 1
8723 echo "$as_me:8723: checking for terminfo header" >&5
8724 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8725 if test "${cf_cv_term_header+set}" = set; then
8726 echo $ECHO_N "(cached) $ECHO_C" >&6
8729 case ${cf_cv_ncurses_header} in
8730 (*/ncurses.h|*/ncursesw.h)
8731 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8734 cf_term_header=term.h
8738 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8740 cat >conftest.$ac_ext <<_ACEOF
8741 #line 8741 "configure"
8742 #include "confdefs.h"
8744 #include <${cf_cv_ncurses_header:-curses.h}>
8750 int x = auto_left_margin
8755 rm -f conftest.$ac_objext
8756 if { (eval echo "$as_me:8756: \"$ac_compile\"") >&5
8757 (eval $ac_compile) 2>&5
8759 echo "$as_me:8759: \$? = $ac_status" >&5
8760 (exit $ac_status); } &&
8761 { ac_try='test -s conftest.$ac_objext'
8762 { (eval echo "$as_me:8762: \"$ac_try\"") >&5
8765 echo "$as_me:8765: \$? = $ac_status" >&5
8766 (exit $ac_status); }; }; then
8768 cf_cv_term_header="$cf_test"
8770 echo "$as_me: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8773 cf_cv_term_header=unknown
8776 rm -f conftest.$ac_objext conftest.$ac_ext
8777 test "$cf_cv_term_header" != unknown && break
8781 echo "$as_me:8781: result: $cf_cv_term_header" >&5
8782 echo "${ECHO_T}$cf_cv_term_header" >&6
8784 # Set definitions to allow ifdef'ing to accommodate subdirectories
8786 case $cf_cv_term_header in
8789 cat >>confdefs.h <<\EOF
8790 #define HAVE_TERM_H 1
8796 case $cf_cv_term_header in
8799 cat >>confdefs.h <<\EOF
8800 #define HAVE_NCURSES_TERM_H 1
8806 cat >>confdefs.h <<\EOF
8807 #define HAVE_NCURSESW_TERM_H 1
8813 # some applications need this, but should check for NCURSES_VERSION
8815 cat >>confdefs.h <<\EOF
8819 echo "$as_me:8819: checking for ncurses version" >&5
8820 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8821 if test "${cf_cv_ncurses_version+set}" = set; then
8822 echo $ECHO_N "(cached) $ECHO_C" >&6
8825 cf_cv_ncurses_version=no
8828 if test "$cross_compiling" = yes; then
8830 # This will not work if the preprocessor splits the line after the
8831 # Autoconf token. The 'unproto' program does that.
8832 cat > conftest.$ac_ext <<EOF
8833 #include <${cf_cv_ncurses_header:-curses.h}>
8835 #ifdef NCURSES_VERSION
8836 Autoconf NCURSES_VERSION
8844 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8845 { (eval echo "$as_me:8845: \"$cf_try\"") >&5
8848 echo "$as_me:8848: \$? = $ac_status" >&5
8849 (exit $ac_status); }
8850 if test -f conftest.out ; then
8851 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8852 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8857 cat >conftest.$ac_ext <<_ACEOF
8858 #line 8858 "configure"
8859 #include "confdefs.h"
8861 #include <${cf_cv_ncurses_header:-curses.h}>
8865 FILE *fp = fopen("$cf_tempfile", "w");
8866 #ifdef NCURSES_VERSION
8867 # ifdef NCURSES_VERSION_PATCH
8868 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8870 fprintf(fp, "%s\n", NCURSES_VERSION);
8874 fprintf(fp, "old\n");
8879 ${cf_cv_main_return:-return}(0);
8882 rm -f conftest$ac_exeext
8883 if { (eval echo "$as_me:8883: \"$ac_link\"") >&5
8884 (eval $ac_link) 2>&5
8886 echo "$as_me:8886: \$? = $ac_status" >&5
8887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8888 { (eval echo "$as_me:8888: \"$ac_try\"") >&5
8891 echo "$as_me:8891: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8894 cf_cv_ncurses_version=`cat $cf_tempfile`
8896 echo "$as_me: program exited with status $ac_status" >&5
8897 echo "$as_me: failed program was:" >&5
8898 cat conftest.$ac_ext >&5
8900 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8905 echo "$as_me:8905: result: $cf_cv_ncurses_version" >&5
8906 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8907 test "$cf_cv_ncurses_version" = no ||
8908 cat >>confdefs.h <<\EOF
8912 cf_nculib_root=$cf_cv_screen
8913 # This works, except for the special case where we find gpm, but
8914 # ncurses is in a nonstandard location via $LIBS, and we really want
8917 cf_ncurses_SAVE="$LIBS"
8918 echo "$as_me:8918: checking for Gpm_Open in -lgpm" >&5
8919 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8920 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8921 echo $ECHO_N "(cached) $ECHO_C" >&6
8923 ac_check_lib_save_LIBS=$LIBS
8925 cat >conftest.$ac_ext <<_ACEOF
8926 #line 8926 "configure"
8927 #include "confdefs.h"
8929 /* Override any gcc2 internal prototype to avoid an error. */
8933 /* We use char because int might match the return type of a gcc2
8934 builtin and then its argument prototype would still apply. */
8944 rm -f conftest.$ac_objext conftest$ac_exeext
8945 if { (eval echo "$as_me:8945: \"$ac_link\"") >&5
8946 (eval $ac_link) 2>&5
8948 echo "$as_me:8948: \$? = $ac_status" >&5
8949 (exit $ac_status); } &&
8950 { ac_try='test -s conftest$ac_exeext'
8951 { (eval echo "$as_me:8951: \"$ac_try\"") >&5
8954 echo "$as_me:8954: \$? = $ac_status" >&5
8955 (exit $ac_status); }; }; then
8956 ac_cv_lib_gpm_Gpm_Open=yes
8958 echo "$as_me: failed program was:" >&5
8959 cat conftest.$ac_ext >&5
8960 ac_cv_lib_gpm_Gpm_Open=no
8962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8963 LIBS=$ac_check_lib_save_LIBS
8965 echo "$as_me:8965: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8966 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8967 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8968 echo "$as_me:8968: checking for initscr in -lgpm" >&5
8969 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8970 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8971 echo $ECHO_N "(cached) $ECHO_C" >&6
8973 ac_check_lib_save_LIBS=$LIBS
8975 cat >conftest.$ac_ext <<_ACEOF
8976 #line 8976 "configure"
8977 #include "confdefs.h"
8979 /* Override any gcc2 internal prototype to avoid an error. */
8983 /* We use char because int might match the return type of a gcc2
8984 builtin and then its argument prototype would still apply. */
8994 rm -f conftest.$ac_objext conftest$ac_exeext
8995 if { (eval echo "$as_me:8995: \"$ac_link\"") >&5
8996 (eval $ac_link) 2>&5
8998 echo "$as_me:8998: \$? = $ac_status" >&5
8999 (exit $ac_status); } &&
9000 { ac_try='test -s conftest$ac_exeext'
9001 { (eval echo "$as_me:9001: \"$ac_try\"") >&5
9004 echo "$as_me:9004: \$? = $ac_status" >&5
9005 (exit $ac_status); }; }; then
9006 ac_cv_lib_gpm_initscr=yes
9008 echo "$as_me: failed program was:" >&5
9009 cat conftest.$ac_ext >&5
9010 ac_cv_lib_gpm_initscr=no
9012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9013 LIBS=$ac_check_lib_save_LIBS
9015 echo "$as_me:9015: result: $ac_cv_lib_gpm_initscr" >&5
9016 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9017 if test $ac_cv_lib_gpm_initscr = yes; then
9018 LIBS="$cf_ncurses_SAVE"
9020 cf_ncurses_LIBS="-lgpm"
9027 # This is only necessary if you are linking against an obsolete
9028 # version of ncurses (but it should do no harm, since it's static).
9029 if test "$cf_nculib_root" = ncurses ; then
9030 echo "$as_me:9030: checking for tgoto in -lmytinfo" >&5
9031 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9032 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9033 echo $ECHO_N "(cached) $ECHO_C" >&6
9035 ac_check_lib_save_LIBS=$LIBS
9036 LIBS="-lmytinfo $LIBS"
9037 cat >conftest.$ac_ext <<_ACEOF
9038 #line 9038 "configure"
9039 #include "confdefs.h"
9041 /* Override any gcc2 internal prototype to avoid an error. */
9045 /* We use char because int might match the return type of a gcc2
9046 builtin and then its argument prototype would still apply. */
9056 rm -f conftest.$ac_objext conftest$ac_exeext
9057 if { (eval echo "$as_me:9057: \"$ac_link\"") >&5
9058 (eval $ac_link) 2>&5
9060 echo "$as_me:9060: \$? = $ac_status" >&5
9061 (exit $ac_status); } &&
9062 { ac_try='test -s conftest$ac_exeext'
9063 { (eval echo "$as_me:9063: \"$ac_try\"") >&5
9066 echo "$as_me:9066: \$? = $ac_status" >&5
9067 (exit $ac_status); }; }; then
9068 ac_cv_lib_mytinfo_tgoto=yes
9070 echo "$as_me: failed program was:" >&5
9071 cat conftest.$ac_ext >&5
9072 ac_cv_lib_mytinfo_tgoto=no
9074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9075 LIBS=$ac_check_lib_save_LIBS
9077 echo "$as_me:9077: result: $ac_cv_lib_mytinfo_tgoto" >&5
9078 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9079 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9080 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9087 cf_add_libs="$cf_ncurses_LIBS"
9088 # Filter out duplicates - this happens with badly-designed ".pc" files...
9089 for cf_add_1lib in $LIBS
9091 for cf_add_2lib in $cf_add_libs
9093 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9099 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9103 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9106 cf_add_libs="-l$cf_nculib_root"
9107 # Filter out duplicates - this happens with badly-designed ".pc" files...
9108 for cf_add_1lib in $LIBS
9110 for cf_add_2lib in $cf_add_libs
9112 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9118 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9124 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9126 echo "$as_me:9126: checking for initscr" >&5
9127 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9128 if test "${ac_cv_func_initscr+set}" = set; then
9129 echo $ECHO_N "(cached) $ECHO_C" >&6
9131 cat >conftest.$ac_ext <<_ACEOF
9132 #line 9132 "configure"
9133 #include "confdefs.h"
9134 /* System header to define __stub macros and hopefully few prototypes,
9135 which can conflict with char initscr (); below. */
9137 /* Override any gcc2 internal prototype to avoid an error. */
9141 /* We use char because int might match the return type of a gcc2
9142 builtin and then its argument prototype would still apply. */
9149 /* The GNU C library defines this for functions which it implements
9150 to always fail with ENOSYS. Some functions are actually named
9151 something starting with __ and the normal name is an alias. */
9152 #if defined (__stub_initscr) || defined (__stub___initscr)
9155 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9162 rm -f conftest.$ac_objext conftest$ac_exeext
9163 if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164 (eval $ac_link) 2>&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit $ac_status); } &&
9168 { ac_try='test -s conftest$ac_exeext'
9169 { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9172 echo "$as_me:9172: \$? = $ac_status" >&5
9173 (exit $ac_status); }; }; then
9174 ac_cv_func_initscr=yes
9176 echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 ac_cv_func_initscr=no
9180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9182 echo "$as_me:9182: result: $ac_cv_func_initscr" >&5
9183 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9184 if test $ac_cv_func_initscr = yes; then
9185 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9188 cf_save_LIBS="$LIBS"
9189 echo "$as_me:9189: checking for initscr in -l$cf_nculib_root" >&5
9190 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9191 LIBS="-l$cf_nculib_root $LIBS"
9192 cat >conftest.$ac_ext <<_ACEOF
9193 #line 9193 "configure"
9194 #include "confdefs.h"
9195 #include <${cf_cv_ncurses_header:-curses.h}>
9204 rm -f conftest.$ac_objext conftest$ac_exeext
9205 if { (eval echo "$as_me:9205: \"$ac_link\"") >&5
9206 (eval $ac_link) 2>&5
9208 echo "$as_me:9208: \$? = $ac_status" >&5
9209 (exit $ac_status); } &&
9210 { ac_try='test -s conftest$ac_exeext'
9211 { (eval echo "$as_me:9211: \"$ac_try\"") >&5
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit $ac_status); }; }; then
9216 echo "$as_me:9216: result: yes" >&5
9217 echo "${ECHO_T}yes" >&6
9218 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9221 echo "$as_me: failed program was:" >&5
9222 cat conftest.$ac_ext >&5
9223 echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9227 cf_library_path_list=""
9228 if test -n "${LDFLAGS}${LIBS}" ; then
9229 for cf_library_path in $LDFLAGS $LIBS
9231 case $cf_library_path in
9233 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9235 test "x$cf_library_path" != "xNONE" && \
9236 test -d "$cf_library_path" && \
9238 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9239 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9240 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9241 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9242 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9243 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"
9246 cf_library_path_list="$cf_library_path_list $cf_search"
9254 test "x$prefix" != "xNONE" && \
9255 test -d "$prefix" && \
9257 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9258 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9259 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9260 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9261 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9262 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9265 for cf_subdir_prefix in \
9274 test "x$cf_subdir_prefix" != "x$prefix" && \
9275 test -d "$cf_subdir_prefix" && \
9276 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9277 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9278 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9279 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9280 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9281 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9282 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"
9287 cf_search="$cf_library_path_list $cf_search"
9289 for cf_libdir in $cf_search
9291 echo "$as_me:9291: checking for -l$cf_nculib_root in $cf_libdir" >&5
9292 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9293 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9294 cat >conftest.$ac_ext <<_ACEOF
9295 #line 9295 "configure"
9296 #include "confdefs.h"
9297 #include <${cf_cv_ncurses_header:-curses.h}>
9306 rm -f conftest.$ac_objext conftest$ac_exeext
9307 if { (eval echo "$as_me:9307: \"$ac_link\"") >&5
9308 (eval $ac_link) 2>&5
9310 echo "$as_me:9310: \$? = $ac_status" >&5
9311 (exit $ac_status); } &&
9312 { ac_try='test -s conftest$ac_exeext'
9313 { (eval echo "$as_me:9313: \"$ac_try\"") >&5
9316 echo "$as_me:9316: \$? = $ac_status" >&5
9317 (exit $ac_status); }; }; then
9318 echo "$as_me:9318: result: yes" >&5
9319 echo "${ECHO_T}yes" >&6
9320 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9323 echo "$as_me: failed program was:" >&5
9324 cat conftest.$ac_ext >&5
9325 echo "$as_me:9325: result: no" >&5
9326 echo "${ECHO_T}no" >&6
9327 LIBS="$cf_save_LIBS"
9329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9337 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9339 if test $cf_found_library = no ; then
9340 { { echo "$as_me:9340: error: Cannot link $cf_nculib_root library" >&5
9341 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9342 { (exit 1); exit 1; }; }
9347 if test -n "$cf_ncurses_LIBS" ; then
9348 echo "$as_me:9348: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9349 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9350 cf_ncurses_SAVE="$LIBS"
9351 for p in $cf_ncurses_LIBS ; do
9352 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9353 if test "$q" != "$LIBS" ; then
9357 cat >conftest.$ac_ext <<_ACEOF
9358 #line 9358 "configure"
9359 #include "confdefs.h"
9360 #include <${cf_cv_ncurses_header:-curses.h}>
9364 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9369 rm -f conftest.$ac_objext conftest$ac_exeext
9370 if { (eval echo "$as_me:9370: \"$ac_link\"") >&5
9371 (eval $ac_link) 2>&5
9373 echo "$as_me:9373: \$? = $ac_status" >&5
9374 (exit $ac_status); } &&
9375 { ac_try='test -s conftest$ac_exeext'
9376 { (eval echo "$as_me:9376: \"$ac_try\"") >&5
9379 echo "$as_me:9379: \$? = $ac_status" >&5
9380 (exit $ac_status); }; }; then
9381 echo "$as_me:9381: result: yes" >&5
9382 echo "${ECHO_T}yes" >&6
9384 echo "$as_me: failed program was:" >&5
9385 cat conftest.$ac_ext >&5
9386 echo "$as_me:9386: result: no" >&5
9387 echo "${ECHO_T}no" >&6
9388 LIBS="$cf_ncurses_SAVE"
9390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9393 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9395 cat >>confdefs.h <<EOF
9396 #define $cf_nculib_ROOT 1
9406 echo "$as_me:9406: checking for X" >&5
9407 echo $ECHO_N "checking for X... $ECHO_C" >&6
9409 # Check whether --with-x or --without-x was given.
9410 if test "${with_x+set}" = set; then
9414 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9415 if test "x$with_x" = xno; then
9416 # The user explicitly disabled X.
9419 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9420 # Both variables are already set.
9423 if test "${ac_cv_have_x+set}" = set; then
9424 echo $ECHO_N "(cached) $ECHO_C" >&6
9426 # One or both of the vars are not set, and there is no cached value.
9427 ac_x_includes=no ac_x_libraries=no
9429 if mkdir conftest.dir; then
9431 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9432 cat >Imakefile <<'EOF'
9434 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9436 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9437 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9438 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9439 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9440 for ac_extension in a so sl dylib dll; do
9441 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9442 test -f $ac_im_libdir/libX11.$ac_extension; then
9443 ac_im_usrlibdir=$ac_im_libdir; break
9446 # Screen out bogus values from the imake configuration. They are
9447 # bogus both because they are the default anyway, and because
9448 # using them would break gcc on systems where it needs fixed includes.
9449 case $ac_im_incroot in
9451 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9453 case $ac_im_usrlibdir in
9455 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9462 # Standard set of common directories for X headers.
9463 # Check X11 before X11Rn because it is often a symlink to the current release.
9475 /usr/local/X11/include
9476 /usr/local/X11R6/include
9477 /usr/local/X11R5/include
9478 /usr/local/X11R4/include
9480 /usr/local/include/X11
9481 /usr/local/include/X11R6
9482 /usr/local/include/X11R5
9483 /usr/local/include/X11R4
9487 /usr/XFree86/include/X11
9491 /usr/unsupported/include
9493 /usr/local/x11r5/include
9494 /usr/lpp/Xamples/include
9496 /usr/openwin/include
9497 /usr/openwin/share/include'
9499 if test "$ac_x_includes" = no; then
9500 # Guess where to find include files, by looking for Intrinsic.h.
9501 # First, try using that file with no special directory specified.
9502 cat >conftest.$ac_ext <<_ACEOF
9503 #line 9503 "configure"
9504 #include "confdefs.h"
9505 #include <X11/Intrinsic.h>
9507 if { (eval echo "$as_me:9507: \"$ac_cpp conftest.$ac_ext\"") >&5
9508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9510 egrep -v '^ *\+' conftest.er1 >conftest.err
9512 cat conftest.err >&5
9513 echo "$as_me:9513: \$? = $ac_status" >&5
9514 (exit $ac_status); } >/dev/null; then
9515 if test -s conftest.err; then
9516 ac_cpp_err=$ac_c_preproc_warn_flag
9523 if test -z "$ac_cpp_err"; then
9524 # We can compile using X headers with no special include directory.
9527 echo "$as_me: failed program was:" >&5
9528 cat conftest.$ac_ext >&5
9529 for ac_dir in $ac_x_header_dirs; do
9530 if test -r "$ac_dir/X11/Intrinsic.h"; then
9531 ac_x_includes=$ac_dir
9536 rm -f conftest.err conftest.$ac_ext
9537 fi # $ac_x_includes = no
9539 if test "$ac_x_libraries" = no; then
9540 # Check for the libraries.
9541 # See if we find them without any special options.
9542 # Don't add to $LIBS permanently.
9545 cat >conftest.$ac_ext <<_ACEOF
9546 #line 9546 "configure"
9547 #include "confdefs.h"
9548 #include <X11/Intrinsic.h>
9557 rm -f conftest.$ac_objext conftest$ac_exeext
9558 if { (eval echo "$as_me:9558: \"$ac_link\"") >&5
9559 (eval $ac_link) 2>&5
9561 echo "$as_me:9561: \$? = $ac_status" >&5
9562 (exit $ac_status); } &&
9563 { ac_try='test -s conftest$ac_exeext'
9564 { (eval echo "$as_me:9564: \"$ac_try\"") >&5
9567 echo "$as_me:9567: \$? = $ac_status" >&5
9568 (exit $ac_status); }; }; then
9570 # We can link X programs with no special library path.
9573 echo "$as_me: failed program was:" >&5
9574 cat conftest.$ac_ext >&5
9576 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9578 # Don't even attempt the hair of trying to link an X program!
9579 for ac_extension in a so sl dylib dll; do
9580 if test -r $ac_dir/libXt.$ac_extension; then
9581 ac_x_libraries=$ac_dir
9587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9588 fi # $ac_x_libraries = no
9590 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9591 # Didn't find X anywhere. Cache the known absence of X.
9592 ac_cv_have_x="have_x=no"
9594 # Record where we found X for the cache.
9595 ac_cv_have_x="have_x=yes \
9596 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9601 eval "$ac_cv_have_x"
9604 if test "$have_x" != yes; then
9605 echo "$as_me:9605: result: $have_x" >&5
9606 echo "${ECHO_T}$have_x" >&6
9609 # If each of the values was on the command line, it overrides each guess.
9610 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9611 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9612 # Update the cache value to reflect the command line values.
9613 ac_cv_have_x="have_x=yes \
9614 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9615 echo "$as_me:9615: result: libraries $x_libraries, headers $x_includes" >&5
9616 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9619 if test "$no_x" = yes; then
9620 # Not all programs may use this symbol, but it does not hurt to define it.
9622 cat >>confdefs.h <<\EOF
9623 #define X_DISPLAY_MISSING 1
9626 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9628 if test -n "$x_includes"; then
9629 X_CFLAGS="$X_CFLAGS -I$x_includes"
9632 # It would also be nice to do this for all -L options, not just this one.
9633 if test -n "$x_libraries"; then
9634 X_LIBS="$X_LIBS -L$x_libraries"
9635 # For Solaris; some versions of Sun CC require a space after -R and
9636 # others require no space. Words are not sufficient . . . .
9637 case `(uname -sr) 2>/dev/null` in
9639 echo "$as_me:9639: checking whether -R must be followed by a space" >&5
9640 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9641 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9642 cat >conftest.$ac_ext <<_ACEOF
9643 #line 9643 "configure"
9644 #include "confdefs.h"
9654 rm -f conftest.$ac_objext conftest$ac_exeext
9655 if { (eval echo "$as_me:9655: \"$ac_link\"") >&5
9656 (eval $ac_link) 2>&5
9658 echo "$as_me:9658: \$? = $ac_status" >&5
9659 (exit $ac_status); } &&
9660 { ac_try='test -s conftest$ac_exeext'
9661 { (eval echo "$as_me:9661: \"$ac_try\"") >&5
9664 echo "$as_me:9664: \$? = $ac_status" >&5
9665 (exit $ac_status); }; }; then
9668 echo "$as_me: failed program was:" >&5
9669 cat conftest.$ac_ext >&5
9672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9673 if test $ac_R_nospace = yes; then
9674 echo "$as_me:9674: result: no" >&5
9675 echo "${ECHO_T}no" >&6
9676 X_LIBS="$X_LIBS -R$x_libraries"
9678 LIBS="$ac_xsave_LIBS -R $x_libraries"
9679 cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9691 rm -f conftest.$ac_objext conftest$ac_exeext
9692 if { (eval echo "$as_me:9692: \"$ac_link\"") >&5
9693 (eval $ac_link) 2>&5
9695 echo "$as_me:9695: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
9697 { ac_try='test -s conftest$ac_exeext'
9698 { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit $ac_status); }; }; then
9705 echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9710 if test $ac_R_space = yes; then
9711 echo "$as_me:9711: result: yes" >&5
9712 echo "${ECHO_T}yes" >&6
9713 X_LIBS="$X_LIBS -R $x_libraries"
9715 echo "$as_me:9715: result: neither works" >&5
9716 echo "${ECHO_T}neither works" >&6
9723 # Check for system-dependent libraries X programs must link with.
9724 # Do this before checking for the system-independent R6 libraries
9725 # (-lICE), since we may need -lsocket or whatever for X linking.
9727 if test "$ISC" = yes; then
9728 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9730 # Martyn Johnson says this is needed for Ultrix, if the X
9731 # libraries were built with DECnet support. And Karl Berry says
9732 # the Alpha needs dnet_stub (dnet does not exist).
9733 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9734 cat >conftest.$ac_ext <<_ACEOF
9735 #line 9735 "configure"
9736 #include "confdefs.h"
9738 /* Override any gcc2 internal prototype to avoid an error. */
9742 /* We use char because int might match the return type of a gcc2
9743 builtin and then its argument prototype would still apply. */
9744 char XOpenDisplay ();
9753 rm -f conftest.$ac_objext conftest$ac_exeext
9754 if { (eval echo "$as_me:9754: \"$ac_link\"") >&5
9755 (eval $ac_link) 2>&5
9757 echo "$as_me:9757: \$? = $ac_status" >&5
9758 (exit $ac_status); } &&
9759 { ac_try='test -s conftest$ac_exeext'
9760 { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9763 echo "$as_me:9763: \$? = $ac_status" >&5
9764 (exit $ac_status); }; }; then
9767 echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769 echo "$as_me:9769: checking for dnet_ntoa in -ldnet" >&5
9770 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9771 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9772 echo $ECHO_N "(cached) $ECHO_C" >&6
9774 ac_check_lib_save_LIBS=$LIBS
9776 cat >conftest.$ac_ext <<_ACEOF
9777 #line 9777 "configure"
9778 #include "confdefs.h"
9780 /* Override any gcc2 internal prototype to avoid an error. */
9784 /* We use char because int might match the return type of a gcc2
9785 builtin and then its argument prototype would still apply. */
9795 rm -f conftest.$ac_objext conftest$ac_exeext
9796 if { (eval echo "$as_me:9796: \"$ac_link\"") >&5
9797 (eval $ac_link) 2>&5
9799 echo "$as_me:9799: \$? = $ac_status" >&5
9800 (exit $ac_status); } &&
9801 { ac_try='test -s conftest$ac_exeext'
9802 { (eval echo "$as_me:9802: \"$ac_try\"") >&5
9805 echo "$as_me:9805: \$? = $ac_status" >&5
9806 (exit $ac_status); }; }; then
9807 ac_cv_lib_dnet_dnet_ntoa=yes
9809 echo "$as_me: failed program was:" >&5
9810 cat conftest.$ac_ext >&5
9811 ac_cv_lib_dnet_dnet_ntoa=no
9813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9814 LIBS=$ac_check_lib_save_LIBS
9816 echo "$as_me:9816: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9817 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9818 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9819 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9822 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9823 echo "$as_me:9823: checking for dnet_ntoa in -ldnet_stub" >&5
9824 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9825 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9826 echo $ECHO_N "(cached) $ECHO_C" >&6
9828 ac_check_lib_save_LIBS=$LIBS
9829 LIBS="-ldnet_stub $LIBS"
9830 cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9834 /* Override any gcc2 internal prototype to avoid an error. */
9838 /* We use char because int might match the return type of a gcc2
9839 builtin and then its argument prototype would still apply. */
9849 rm -f conftest.$ac_objext conftest$ac_exeext
9850 if { (eval echo "$as_me:9850: \"$ac_link\"") >&5
9851 (eval $ac_link) 2>&5
9853 echo "$as_me:9853: \$? = $ac_status" >&5
9854 (exit $ac_status); } &&
9855 { ac_try='test -s conftest$ac_exeext'
9856 { (eval echo "$as_me:9856: \"$ac_try\"") >&5
9859 echo "$as_me:9859: \$? = $ac_status" >&5
9860 (exit $ac_status); }; }; then
9861 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9863 echo "$as_me: failed program was:" >&5
9864 cat conftest.$ac_ext >&5
9865 ac_cv_lib_dnet_stub_dnet_ntoa=no
9867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9868 LIBS=$ac_check_lib_save_LIBS
9870 echo "$as_me:9870: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9871 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9872 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9873 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9879 LIBS="$ac_xsave_LIBS"
9881 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9882 # to get the SysV transport functions.
9883 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9885 # The nsl library prevents programs from opening the X display
9886 # on Irix 5.2, according to T.E. Dickey.
9887 # The functions gethostbyname, getservbyname, and inet_addr are
9888 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9889 echo "$as_me:9889: checking for gethostbyname" >&5
9890 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9891 if test "${ac_cv_func_gethostbyname+set}" = set; then
9892 echo $ECHO_N "(cached) $ECHO_C" >&6
9894 cat >conftest.$ac_ext <<_ACEOF
9895 #line 9895 "configure"
9896 #include "confdefs.h"
9897 /* System header to define __stub macros and hopefully few prototypes,
9898 which can conflict with char gethostbyname (); below. */
9900 /* Override any gcc2 internal prototype to avoid an error. */
9904 /* We use char because int might match the return type of a gcc2
9905 builtin and then its argument prototype would still apply. */
9906 char gethostbyname ();
9912 /* The GNU C library defines this for functions which it implements
9913 to always fail with ENOSYS. Some functions are actually named
9914 something starting with __ and the normal name is an alias. */
9915 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9918 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9925 rm -f conftest.$ac_objext conftest$ac_exeext
9926 if { (eval echo "$as_me:9926: \"$ac_link\"") >&5
9927 (eval $ac_link) 2>&5
9929 echo "$as_me:9929: \$? = $ac_status" >&5
9930 (exit $ac_status); } &&
9931 { ac_try='test -s conftest$ac_exeext'
9932 { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9935 echo "$as_me:9935: \$? = $ac_status" >&5
9936 (exit $ac_status); }; }; then
9937 ac_cv_func_gethostbyname=yes
9939 echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 ac_cv_func_gethostbyname=no
9943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9945 echo "$as_me:9945: result: $ac_cv_func_gethostbyname" >&5
9946 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9948 if test $ac_cv_func_gethostbyname = no; then
9949 echo "$as_me:9949: checking for gethostbyname in -lnsl" >&5
9950 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9951 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9952 echo $ECHO_N "(cached) $ECHO_C" >&6
9954 ac_check_lib_save_LIBS=$LIBS
9956 cat >conftest.$ac_ext <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9960 /* Override any gcc2 internal prototype to avoid an error. */
9964 /* We use char because int might match the return type of a gcc2
9965 builtin and then its argument prototype would still apply. */
9966 char gethostbyname ();
9975 rm -f conftest.$ac_objext conftest$ac_exeext
9976 if { (eval echo "$as_me:9976: \"$ac_link\"") >&5
9977 (eval $ac_link) 2>&5
9979 echo "$as_me:9979: \$? = $ac_status" >&5
9980 (exit $ac_status); } &&
9981 { ac_try='test -s conftest$ac_exeext'
9982 { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9985 echo "$as_me:9985: \$? = $ac_status" >&5
9986 (exit $ac_status); }; }; then
9987 ac_cv_lib_nsl_gethostbyname=yes
9989 echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 ac_cv_lib_nsl_gethostbyname=no
9993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9994 LIBS=$ac_check_lib_save_LIBS
9996 echo "$as_me:9996: result: $ac_cv_lib_nsl_gethostbyname" >&5
9997 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9998 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9999 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10002 if test $ac_cv_lib_nsl_gethostbyname = no; then
10003 echo "$as_me:10003: checking for gethostbyname in -lbsd" >&5
10004 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10005 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10006 echo $ECHO_N "(cached) $ECHO_C" >&6
10008 ac_check_lib_save_LIBS=$LIBS
10010 cat >conftest.$ac_ext <<_ACEOF
10011 #line 10011 "configure"
10012 #include "confdefs.h"
10014 /* Override any gcc2 internal prototype to avoid an error. */
10018 /* We use char because int might match the return type of a gcc2
10019 builtin and then its argument prototype would still apply. */
10020 char gethostbyname ();
10029 rm -f conftest.$ac_objext conftest$ac_exeext
10030 if { (eval echo "$as_me:10030: \"$ac_link\"") >&5
10031 (eval $ac_link) 2>&5
10033 echo "$as_me:10033: \$? = $ac_status" >&5
10034 (exit $ac_status); } &&
10035 { ac_try='test -s conftest$ac_exeext'
10036 { (eval echo "$as_me:10036: \"$ac_try\"") >&5
10037 (eval $ac_try) 2>&5
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit $ac_status); }; }; then
10041 ac_cv_lib_bsd_gethostbyname=yes
10043 echo "$as_me: failed program was:" >&5
10044 cat conftest.$ac_ext >&5
10045 ac_cv_lib_bsd_gethostbyname=no
10047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10048 LIBS=$ac_check_lib_save_LIBS
10050 echo "$as_me:10050: result: $ac_cv_lib_bsd_gethostbyname" >&5
10051 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10052 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10053 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10059 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10060 # socket/setsockopt and other routines are undefined under SCO ODT
10061 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10062 # on later versions), says Simon Leinen: it contains gethostby*
10063 # variants that don't use the nameserver (or something). -lsocket
10064 # must be given before -lnsl if both are needed. We assume that
10065 # if connect needs -lnsl, so does gethostbyname.
10066 echo "$as_me:10066: checking for connect" >&5
10067 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10068 if test "${ac_cv_func_connect+set}" = set; then
10069 echo $ECHO_N "(cached) $ECHO_C" >&6
10071 cat >conftest.$ac_ext <<_ACEOF
10072 #line 10072 "configure"
10073 #include "confdefs.h"
10074 /* System header to define __stub macros and hopefully few prototypes,
10075 which can conflict with char connect (); below. */
10076 #include <assert.h>
10077 /* Override any gcc2 internal prototype to avoid an error. */
10081 /* We use char because int might match the return type of a gcc2
10082 builtin and then its argument prototype would still apply. */
10089 /* The GNU C library defines this for functions which it implements
10090 to always fail with ENOSYS. Some functions are actually named
10091 something starting with __ and the normal name is an alias. */
10092 #if defined (__stub_connect) || defined (__stub___connect)
10095 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10102 rm -f conftest.$ac_objext conftest$ac_exeext
10103 if { (eval echo "$as_me:10103: \"$ac_link\"") >&5
10104 (eval $ac_link) 2>&5
10106 echo "$as_me:10106: \$? = $ac_status" >&5
10107 (exit $ac_status); } &&
10108 { ac_try='test -s conftest$ac_exeext'
10109 { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110 (eval $ac_try) 2>&5
10112 echo "$as_me:10112: \$? = $ac_status" >&5
10113 (exit $ac_status); }; }; then
10114 ac_cv_func_connect=yes
10116 echo "$as_me: failed program was:" >&5
10117 cat conftest.$ac_ext >&5
10118 ac_cv_func_connect=no
10120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10122 echo "$as_me:10122: result: $ac_cv_func_connect" >&5
10123 echo "${ECHO_T}$ac_cv_func_connect" >&6
10125 if test $ac_cv_func_connect = no; then
10126 echo "$as_me:10126: checking for connect in -lsocket" >&5
10127 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10128 if test "${ac_cv_lib_socket_connect+set}" = set; then
10129 echo $ECHO_N "(cached) $ECHO_C" >&6
10131 ac_check_lib_save_LIBS=$LIBS
10132 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10133 cat >conftest.$ac_ext <<_ACEOF
10134 #line 10134 "configure"
10135 #include "confdefs.h"
10137 /* Override any gcc2 internal prototype to avoid an error. */
10141 /* We use char because int might match the return type of a gcc2
10142 builtin and then its argument prototype would still apply. */
10152 rm -f conftest.$ac_objext conftest$ac_exeext
10153 if { (eval echo "$as_me:10153: \"$ac_link\"") >&5
10154 (eval $ac_link) 2>&5
10156 echo "$as_me:10156: \$? = $ac_status" >&5
10157 (exit $ac_status); } &&
10158 { ac_try='test -s conftest$ac_exeext'
10159 { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160 (eval $ac_try) 2>&5
10162 echo "$as_me:10162: \$? = $ac_status" >&5
10163 (exit $ac_status); }; }; then
10164 ac_cv_lib_socket_connect=yes
10166 echo "$as_me: failed program was:" >&5
10167 cat conftest.$ac_ext >&5
10168 ac_cv_lib_socket_connect=no
10170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10171 LIBS=$ac_check_lib_save_LIBS
10173 echo "$as_me:10173: result: $ac_cv_lib_socket_connect" >&5
10174 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10175 if test $ac_cv_lib_socket_connect = yes; then
10176 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10181 # Guillermo Gomez says -lposix is necessary on A/UX.
10182 echo "$as_me:10182: checking for remove" >&5
10183 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10184 if test "${ac_cv_func_remove+set}" = set; then
10185 echo $ECHO_N "(cached) $ECHO_C" >&6
10187 cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190 /* System header to define __stub macros and hopefully few prototypes,
10191 which can conflict with char remove (); below. */
10192 #include <assert.h>
10193 /* Override any gcc2 internal prototype to avoid an error. */
10197 /* We use char because int might match the return type of a gcc2
10198 builtin and then its argument prototype would still apply. */
10205 /* The GNU C library defines this for functions which it implements
10206 to always fail with ENOSYS. Some functions are actually named
10207 something starting with __ and the normal name is an alias. */
10208 #if defined (__stub_remove) || defined (__stub___remove)
10211 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10218 rm -f conftest.$ac_objext conftest$ac_exeext
10219 if { (eval echo "$as_me:10219: \"$ac_link\"") >&5
10220 (eval $ac_link) 2>&5
10222 echo "$as_me:10222: \$? = $ac_status" >&5
10223 (exit $ac_status); } &&
10224 { ac_try='test -s conftest$ac_exeext'
10225 { (eval echo "$as_me:10225: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10228 echo "$as_me:10228: \$? = $ac_status" >&5
10229 (exit $ac_status); }; }; then
10230 ac_cv_func_remove=yes
10232 echo "$as_me: failed program was:" >&5
10233 cat conftest.$ac_ext >&5
10234 ac_cv_func_remove=no
10236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10238 echo "$as_me:10238: result: $ac_cv_func_remove" >&5
10239 echo "${ECHO_T}$ac_cv_func_remove" >&6
10241 if test $ac_cv_func_remove = no; then
10242 echo "$as_me:10242: checking for remove in -lposix" >&5
10243 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10244 if test "${ac_cv_lib_posix_remove+set}" = set; then
10245 echo $ECHO_N "(cached) $ECHO_C" >&6
10247 ac_check_lib_save_LIBS=$LIBS
10248 LIBS="-lposix $LIBS"
10249 cat >conftest.$ac_ext <<_ACEOF
10250 #line 10250 "configure"
10251 #include "confdefs.h"
10253 /* Override any gcc2 internal prototype to avoid an error. */
10257 /* We use char because int might match the return type of a gcc2
10258 builtin and then its argument prototype would still apply. */
10268 rm -f conftest.$ac_objext conftest$ac_exeext
10269 if { (eval echo "$as_me:10269: \"$ac_link\"") >&5
10270 (eval $ac_link) 2>&5
10272 echo "$as_me:10272: \$? = $ac_status" >&5
10273 (exit $ac_status); } &&
10274 { ac_try='test -s conftest$ac_exeext'
10275 { (eval echo "$as_me:10275: \"$ac_try\"") >&5
10276 (eval $ac_try) 2>&5
10278 echo "$as_me:10278: \$? = $ac_status" >&5
10279 (exit $ac_status); }; }; then
10280 ac_cv_lib_posix_remove=yes
10282 echo "$as_me: failed program was:" >&5
10283 cat conftest.$ac_ext >&5
10284 ac_cv_lib_posix_remove=no
10286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10287 LIBS=$ac_check_lib_save_LIBS
10289 echo "$as_me:10289: result: $ac_cv_lib_posix_remove" >&5
10290 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10291 if test $ac_cv_lib_posix_remove = yes; then
10292 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10297 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10298 echo "$as_me:10298: checking for shmat" >&5
10299 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10300 if test "${ac_cv_func_shmat+set}" = set; then
10301 echo $ECHO_N "(cached) $ECHO_C" >&6
10303 cat >conftest.$ac_ext <<_ACEOF
10304 #line 10304 "configure"
10305 #include "confdefs.h"
10306 /* System header to define __stub macros and hopefully few prototypes,
10307 which can conflict with char shmat (); below. */
10308 #include <assert.h>
10309 /* Override any gcc2 internal prototype to avoid an error. */
10313 /* We use char because int might match the return type of a gcc2
10314 builtin and then its argument prototype would still apply. */
10321 /* The GNU C library defines this for functions which it implements
10322 to always fail with ENOSYS. Some functions are actually named
10323 something starting with __ and the normal name is an alias. */
10324 #if defined (__stub_shmat) || defined (__stub___shmat)
10327 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10334 rm -f conftest.$ac_objext conftest$ac_exeext
10335 if { (eval echo "$as_me:10335: \"$ac_link\"") >&5
10336 (eval $ac_link) 2>&5
10338 echo "$as_me:10338: \$? = $ac_status" >&5
10339 (exit $ac_status); } &&
10340 { ac_try='test -s conftest$ac_exeext'
10341 { (eval echo "$as_me:10341: \"$ac_try\"") >&5
10342 (eval $ac_try) 2>&5
10344 echo "$as_me:10344: \$? = $ac_status" >&5
10345 (exit $ac_status); }; }; then
10346 ac_cv_func_shmat=yes
10348 echo "$as_me: failed program was:" >&5
10349 cat conftest.$ac_ext >&5
10350 ac_cv_func_shmat=no
10352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10354 echo "$as_me:10354: result: $ac_cv_func_shmat" >&5
10355 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10357 if test $ac_cv_func_shmat = no; then
10358 echo "$as_me:10358: checking for shmat in -lipc" >&5
10359 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10360 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10361 echo $ECHO_N "(cached) $ECHO_C" >&6
10363 ac_check_lib_save_LIBS=$LIBS
10365 cat >conftest.$ac_ext <<_ACEOF
10366 #line 10366 "configure"
10367 #include "confdefs.h"
10369 /* Override any gcc2 internal prototype to avoid an error. */
10373 /* We use char because int might match the return type of a gcc2
10374 builtin and then its argument prototype would still apply. */
10384 rm -f conftest.$ac_objext conftest$ac_exeext
10385 if { (eval echo "$as_me:10385: \"$ac_link\"") >&5
10386 (eval $ac_link) 2>&5
10388 echo "$as_me:10388: \$? = $ac_status" >&5
10389 (exit $ac_status); } &&
10390 { ac_try='test -s conftest$ac_exeext'
10391 { (eval echo "$as_me:10391: \"$ac_try\"") >&5
10392 (eval $ac_try) 2>&5
10394 echo "$as_me:10394: \$? = $ac_status" >&5
10395 (exit $ac_status); }; }; then
10396 ac_cv_lib_ipc_shmat=yes
10398 echo "$as_me: failed program was:" >&5
10399 cat conftest.$ac_ext >&5
10400 ac_cv_lib_ipc_shmat=no
10402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10403 LIBS=$ac_check_lib_save_LIBS
10405 echo "$as_me:10405: result: $ac_cv_lib_ipc_shmat" >&5
10406 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10407 if test $ac_cv_lib_ipc_shmat = yes; then
10408 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10414 # Check for libraries that X11R6 Xt/Xaw programs need.
10415 ac_save_LDFLAGS=$LDFLAGS
10416 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10417 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10418 # check for ICE first), but we must link in the order -lSM -lICE or
10419 # we get undefined symbols. So assume we have SM if we have ICE.
10420 # These have to be linked with before -lX11, unlike the other
10421 # libraries we check for below, so use a different variable.
10422 # John Interrante, Karl Berry
10423 echo "$as_me:10423: checking for IceConnectionNumber in -lICE" >&5
10424 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10425 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10426 echo $ECHO_N "(cached) $ECHO_C" >&6
10428 ac_check_lib_save_LIBS=$LIBS
10429 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10430 cat >conftest.$ac_ext <<_ACEOF
10431 #line 10431 "configure"
10432 #include "confdefs.h"
10434 /* Override any gcc2 internal prototype to avoid an error. */
10438 /* We use char because int might match the return type of a gcc2
10439 builtin and then its argument prototype would still apply. */
10440 char IceConnectionNumber ();
10444 IceConnectionNumber ();
10449 rm -f conftest.$ac_objext conftest$ac_exeext
10450 if { (eval echo "$as_me:10450: \"$ac_link\"") >&5
10451 (eval $ac_link) 2>&5
10453 echo "$as_me:10453: \$? = $ac_status" >&5
10454 (exit $ac_status); } &&
10455 { ac_try='test -s conftest$ac_exeext'
10456 { (eval echo "$as_me:10456: \"$ac_try\"") >&5
10457 (eval $ac_try) 2>&5
10459 echo "$as_me:10459: \$? = $ac_status" >&5
10460 (exit $ac_status); }; }; then
10461 ac_cv_lib_ICE_IceConnectionNumber=yes
10463 echo "$as_me: failed program was:" >&5
10464 cat conftest.$ac_ext >&5
10465 ac_cv_lib_ICE_IceConnectionNumber=no
10467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10468 LIBS=$ac_check_lib_save_LIBS
10470 echo "$as_me:10470: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10471 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10472 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10473 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10476 LDFLAGS=$ac_save_LDFLAGS
10480 cf_x_athena=${cf_x_athena:-Xaw}
10482 echo "$as_me:10482: checking if you want to link with Xaw 3d library" >&5
10483 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10486 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10487 if test "${with_Xaw3d+set}" = set; then
10488 withval="$with_Xaw3d"
10491 if test "$withval" = yes ; then
10493 echo "$as_me:10493: result: yes" >&5
10494 echo "${ECHO_T}yes" >&6
10496 echo "$as_me:10496: result: no" >&5
10497 echo "${ECHO_T}no" >&6
10500 echo "$as_me:10500: checking if you want to link with Xaw 3d xft library" >&5
10501 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10504 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10505 if test "${with_Xaw3dxft+set}" = set; then
10506 withval="$with_Xaw3dxft"
10509 if test "$withval" = yes ; then
10510 cf_x_athena=Xaw3dxft
10511 echo "$as_me:10511: result: yes" >&5
10512 echo "${ECHO_T}yes" >&6
10514 echo "$as_me:10514: result: no" >&5
10515 echo "${ECHO_T}no" >&6
10518 echo "$as_me:10518: checking if you want to link with neXT Athena library" >&5
10519 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10522 # Check whether --with-neXtaw or --without-neXtaw was given.
10523 if test "${with_neXtaw+set}" = set; then
10524 withval="$with_neXtaw"
10527 if test "$withval" = yes ; then
10529 echo "$as_me:10529: result: yes" >&5
10530 echo "${ECHO_T}yes" >&6
10532 echo "$as_me:10532: result: no" >&5
10533 echo "${ECHO_T}no" >&6
10536 echo "$as_me:10536: checking if you want to link with Athena-Plus library" >&5
10537 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10540 # Check whether --with-XawPlus or --without-XawPlus was given.
10541 if test "${with_XawPlus+set}" = set; then
10542 withval="$with_XawPlus"
10545 if test "$withval" = yes ; then
10546 cf_x_athena=XawPlus
10547 echo "$as_me:10547: result: yes" >&5
10548 echo "${ECHO_T}yes" >&6
10550 echo "$as_me:10550: result: no" >&5
10551 echo "${ECHO_T}no" >&6
10556 if test "$PKG_CONFIG" != none ; then
10558 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10559 for cf_athena_pkg in \
10562 ${cf_x_athena}-devel \
10563 lib${cf_x_athena} \
10564 lib${cf_x_athena}-devel
10567 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10568 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10570 echo "${as_me:-configure}:10570: testing found package $cf_athena_pkg ..." 1>&5
10572 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10573 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10574 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10576 echo "${as_me:-configure}:10576: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10578 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10580 echo "${as_me:-configure}:10580: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10585 cf_new_extra_cppflags=
10587 for cf_add_cflags in $cf_pkgconfig_incs
10589 case $cf_fix_cppflags in
10591 case $cf_add_cflags in
10592 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10593 case $cf_add_cflags in
10595 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10598 && test -z "${cf_tst_cflags}" \
10599 && cf_fix_cppflags=yes
10601 if test $cf_fix_cppflags = yes ; then
10602 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10604 elif test "${cf_tst_cflags}" = "\"'" ; then
10605 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10610 case "$CPPFLAGS" in
10614 case $cf_add_cflags in
10616 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10618 CPPFLAGS=`echo "$CPPFLAGS" | \
10619 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10620 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10624 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10629 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10634 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10636 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10639 && test -z "${cf_tst_cflags}" \
10640 && cf_fix_cppflags=no
10645 if test -n "$cf_new_cflags" ; then
10647 CFLAGS="$CFLAGS $cf_new_cflags"
10650 if test -n "$cf_new_cppflags" ; then
10652 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10655 if test -n "$cf_new_extra_cppflags" ; then
10657 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10660 cf_add_libs="$cf_pkgconfig_libs"
10661 # Filter out duplicates - this happens with badly-designed ".pc" files...
10662 for cf_add_1lib in $LIBS
10664 for cf_add_2lib in $cf_add_libs
10666 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10672 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10674 LIBS="$cf_add_libs"
10676 cf_x_athena_lib="$cf_pkgconfig_libs"
10678 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10680 cat >>confdefs.h <<EOF
10681 #define $cf_x_athena_LIBS 1
10684 for cf_trim_lib in Xmu Xt X11
10687 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10688 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10689 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10691 echo "${as_me:-configure}:10691: testing ..trimmed $LIBS ..." 1>&5
10697 echo "$as_me:10697: checking for usable $cf_x_athena/Xmu package" >&5
10698 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10699 if test "${cf_cv_xaw_compat+set}" = set; then
10700 echo $ECHO_N "(cached) $ECHO_C" >&6
10703 cat >conftest.$ac_ext <<_ACEOF
10704 #line 10704 "configure"
10705 #include "confdefs.h"
10707 #include <X11/Xmu/CharSet.h>
10713 int check = XmuCompareISOLatin1("big", "small")
10719 rm -f conftest.$ac_objext conftest$ac_exeext
10720 if { (eval echo "$as_me:10720: \"$ac_link\"") >&5
10721 (eval $ac_link) 2>&5
10723 echo "$as_me:10723: \$? = $ac_status" >&5
10724 (exit $ac_status); } &&
10725 { ac_try='test -s conftest$ac_exeext'
10726 { (eval echo "$as_me:10726: \"$ac_try\"") >&5
10727 (eval $ac_try) 2>&5
10729 echo "$as_me:10729: \$? = $ac_status" >&5
10730 (exit $ac_status); }; }; then
10731 cf_cv_xaw_compat=yes
10733 echo "$as_me: failed program was:" >&5
10734 cat conftest.$ac_ext >&5
10735 cf_cv_xaw_compat=no
10737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10739 echo "$as_me:10739: result: $cf_cv_xaw_compat" >&5
10740 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10742 if test "$cf_cv_xaw_compat" = no
10744 # workaround for broken ".pc" files...
10745 case "$cf_x_athena_lib" in
10749 test -n "$verbose" && echo " work around broken package" 1>&6
10751 echo "${as_me:-configure}:10751: testing work around broken package ..." 1>&5
10753 cf_save_xmu="$LIBS"
10754 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10756 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10757 test -n "$verbose" && echo " found package xmu" 1>&6
10759 echo "${as_me:-configure}:10759: testing found package xmu ..." 1>&5
10761 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10762 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10763 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10765 echo "${as_me:-configure}:10765: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10767 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10769 echo "${as_me:-configure}:10769: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10774 cf_new_extra_cppflags=
10776 for cf_add_cflags in $cf_pkgconfig_incs
10778 case $cf_fix_cppflags in
10780 case $cf_add_cflags in
10781 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10782 case $cf_add_cflags in
10784 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10786 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10787 && test -z "${cf_tst_cflags}" \
10788 && cf_fix_cppflags=yes
10790 if test $cf_fix_cppflags = yes ; then
10791 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10793 elif test "${cf_tst_cflags}" = "\"'" ; then
10794 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10799 case "$CPPFLAGS" in
10803 case $cf_add_cflags in
10805 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10807 CPPFLAGS=`echo "$CPPFLAGS" | \
10808 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10809 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10813 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10818 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10823 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10825 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10827 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10828 && test -z "${cf_tst_cflags}" \
10829 && cf_fix_cppflags=no
10834 if test -n "$cf_new_cflags" ; then
10836 CFLAGS="$CFLAGS $cf_new_cflags"
10839 if test -n "$cf_new_cppflags" ; then
10841 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10844 if test -n "$cf_new_extra_cppflags" ; then
10846 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10849 cf_add_libs="$cf_pkgconfig_libs"
10850 # Filter out duplicates - this happens with badly-designed ".pc" files...
10851 for cf_add_1lib in $LIBS
10853 for cf_add_2lib in $cf_add_libs
10855 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10863 LIBS="$cf_add_libs"
10865 LIBS="$cf_save_xmu"
10867 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10869 echo "${as_me:-configure}:10869: testing ...before $LIBS ..." 1>&5
10871 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10872 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10874 echo "${as_me:-configure}:10874: testing ...after $LIBS ..." 1>&5
10880 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10882 echo "${as_me:-configure}:10882: testing ...before $LIBS ..." 1>&5
10884 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10885 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10887 echo "${as_me:-configure}:10887: testing ...after $LIBS ..." 1>&5
10891 for cf_trim_lib in Xmu Xt X11
10894 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10895 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10896 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10898 echo "${as_me:-configure}:10898: testing ..trimmed $LIBS ..." 1>&5
10918 if test -z "$cf_x_athena_lib" ; then
10920 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10921 test -n "$verbose" && echo " found package Xext" 1>&6
10923 echo "${as_me:-configure}:10923: testing found package Xext ..." 1>&5
10925 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10926 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10927 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10929 echo "${as_me:-configure}:10929: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10931 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10933 echo "${as_me:-configure}:10933: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10938 cf_new_extra_cppflags=
10940 for cf_add_cflags in $cf_pkgconfig_incs
10942 case $cf_fix_cppflags in
10944 case $cf_add_cflags in
10945 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10946 case $cf_add_cflags in
10948 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10950 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10951 && test -z "${cf_tst_cflags}" \
10952 && cf_fix_cppflags=yes
10954 if test $cf_fix_cppflags = yes ; then
10955 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10957 elif test "${cf_tst_cflags}" = "\"'" ; then
10958 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10963 case "$CPPFLAGS" in
10967 case $cf_add_cflags in
10969 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10971 CPPFLAGS=`echo "$CPPFLAGS" | \
10972 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10973 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10977 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10982 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10987 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10989 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10992 && test -z "${cf_tst_cflags}" \
10993 && cf_fix_cppflags=no
10998 if test -n "$cf_new_cflags" ; then
11000 CFLAGS="$CFLAGS $cf_new_cflags"
11003 if test -n "$cf_new_cppflags" ; then
11005 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11008 if test -n "$cf_new_extra_cppflags" ; then
11010 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11013 cf_add_libs="$cf_pkgconfig_libs"
11014 # Filter out duplicates - this happens with badly-designed ".pc" files...
11015 for cf_add_1lib in $LIBS
11017 for cf_add_2lib in $cf_add_libs
11019 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11025 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11027 LIBS="$cf_add_libs"
11034 echo "$as_me:11034: checking for XextCreateExtension in -lXext" >&5
11035 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11036 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11037 echo $ECHO_N "(cached) $ECHO_C" >&6
11039 ac_check_lib_save_LIBS=$LIBS
11040 LIBS="-lXext $LIBS"
11041 cat >conftest.$ac_ext <<_ACEOF
11042 #line 11042 "configure"
11043 #include "confdefs.h"
11045 /* Override any gcc2 internal prototype to avoid an error. */
11049 /* We use char because int might match the return type of a gcc2
11050 builtin and then its argument prototype would still apply. */
11051 char XextCreateExtension ();
11055 XextCreateExtension ();
11060 rm -f conftest.$ac_objext conftest$ac_exeext
11061 if { (eval echo "$as_me:11061: \"$ac_link\"") >&5
11062 (eval $ac_link) 2>&5
11064 echo "$as_me:11064: \$? = $ac_status" >&5
11065 (exit $ac_status); } &&
11066 { ac_try='test -s conftest$ac_exeext'
11067 { (eval echo "$as_me:11067: \"$ac_try\"") >&5
11068 (eval $ac_try) 2>&5
11070 echo "$as_me:11070: \$? = $ac_status" >&5
11071 (exit $ac_status); }; }; then
11072 ac_cv_lib_Xext_XextCreateExtension=yes
11074 echo "$as_me: failed program was:" >&5
11075 cat conftest.$ac_ext >&5
11076 ac_cv_lib_Xext_XextCreateExtension=no
11078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11079 LIBS=$ac_check_lib_save_LIBS
11081 echo "$as_me:11081: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11082 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11083 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11085 cf_add_libs="-lXext"
11086 # Filter out duplicates - this happens with badly-designed ".pc" files...
11087 for cf_add_1lib in $LIBS
11089 for cf_add_2lib in $cf_add_libs
11091 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11099 LIBS="$cf_add_libs"
11105 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11106 # in some cases has installed dummy files in the former, other cases replaced
11107 # it with a link to the new location). This complicates the configure script.
11108 # Check for that pitfall, and recover using pkg-config
11110 # If none of these are set, the configuration is almost certainly broken.
11111 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11114 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11115 test -n "$verbose" && echo " found package x11" 1>&6
11117 echo "${as_me:-configure}:11117: testing found package x11 ..." 1>&5
11119 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11120 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11121 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11123 echo "${as_me:-configure}:11123: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11125 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11127 echo "${as_me:-configure}:11127: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11132 cf_new_extra_cppflags=
11134 for cf_add_cflags in $cf_pkgconfig_incs
11136 case $cf_fix_cppflags in
11138 case $cf_add_cflags in
11139 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11140 case $cf_add_cflags in
11142 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11144 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11145 && test -z "${cf_tst_cflags}" \
11146 && cf_fix_cppflags=yes
11148 if test $cf_fix_cppflags = yes ; then
11149 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11151 elif test "${cf_tst_cflags}" = "\"'" ; then
11152 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11157 case "$CPPFLAGS" in
11161 case $cf_add_cflags in
11163 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11165 CPPFLAGS=`echo "$CPPFLAGS" | \
11166 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11167 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11171 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11176 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11181 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11183 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11185 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11186 && test -z "${cf_tst_cflags}" \
11187 && cf_fix_cppflags=no
11192 if test -n "$cf_new_cflags" ; then
11194 CFLAGS="$CFLAGS $cf_new_cflags"
11197 if test -n "$cf_new_cppflags" ; then
11199 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11202 if test -n "$cf_new_extra_cppflags" ; then
11204 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11207 cf_add_libs="$cf_pkgconfig_libs"
11208 # Filter out duplicates - this happens with badly-designed ".pc" files...
11209 for cf_add_1lib in $LIBS
11211 for cf_add_2lib in $cf_add_libs
11213 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11219 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11221 LIBS="$cf_add_libs"
11227 { echo "$as_me:11227: WARNING: unable to find X11 library" >&5
11228 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11231 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11232 test -n "$verbose" && echo " found package ice" 1>&6
11234 echo "${as_me:-configure}:11234: testing found package ice ..." 1>&5
11236 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11237 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11238 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11240 echo "${as_me:-configure}:11240: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11242 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11244 echo "${as_me:-configure}:11244: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11249 cf_new_extra_cppflags=
11251 for cf_add_cflags in $cf_pkgconfig_incs
11253 case $cf_fix_cppflags in
11255 case $cf_add_cflags in
11256 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11257 case $cf_add_cflags in
11259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11262 && test -z "${cf_tst_cflags}" \
11263 && cf_fix_cppflags=yes
11265 if test $cf_fix_cppflags = yes ; then
11266 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11268 elif test "${cf_tst_cflags}" = "\"'" ; then
11269 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11274 case "$CPPFLAGS" in
11278 case $cf_add_cflags in
11280 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11282 CPPFLAGS=`echo "$CPPFLAGS" | \
11283 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11284 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11288 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11293 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11298 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11300 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11302 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11303 && test -z "${cf_tst_cflags}" \
11304 && cf_fix_cppflags=no
11309 if test -n "$cf_new_cflags" ; then
11311 CFLAGS="$CFLAGS $cf_new_cflags"
11314 if test -n "$cf_new_cppflags" ; then
11316 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11319 if test -n "$cf_new_extra_cppflags" ; then
11321 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11324 cf_add_libs="$cf_pkgconfig_libs"
11325 # Filter out duplicates - this happens with badly-designed ".pc" files...
11326 for cf_add_1lib in $LIBS
11328 for cf_add_2lib in $cf_add_libs
11330 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11336 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11338 LIBS="$cf_add_libs"
11344 { echo "$as_me:11344: WARNING: unable to find ICE library" >&5
11345 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11348 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11349 test -n "$verbose" && echo " found package sm" 1>&6
11351 echo "${as_me:-configure}:11351: testing found package sm ..." 1>&5
11353 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11354 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11355 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11357 echo "${as_me:-configure}:11357: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11359 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11361 echo "${as_me:-configure}:11361: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11366 cf_new_extra_cppflags=
11368 for cf_add_cflags in $cf_pkgconfig_incs
11370 case $cf_fix_cppflags in
11372 case $cf_add_cflags in
11373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11374 case $cf_add_cflags in
11376 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11379 && test -z "${cf_tst_cflags}" \
11380 && cf_fix_cppflags=yes
11382 if test $cf_fix_cppflags = yes ; then
11383 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11385 elif test "${cf_tst_cflags}" = "\"'" ; then
11386 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11391 case "$CPPFLAGS" in
11395 case $cf_add_cflags in
11397 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11399 CPPFLAGS=`echo "$CPPFLAGS" | \
11400 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11401 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11405 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11410 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11417 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11419 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11420 && test -z "${cf_tst_cflags}" \
11421 && cf_fix_cppflags=no
11426 if test -n "$cf_new_cflags" ; then
11428 CFLAGS="$CFLAGS $cf_new_cflags"
11431 if test -n "$cf_new_cppflags" ; then
11433 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11436 if test -n "$cf_new_extra_cppflags" ; then
11438 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11441 cf_add_libs="$cf_pkgconfig_libs"
11442 # Filter out duplicates - this happens with badly-designed ".pc" files...
11443 for cf_add_1lib in $LIBS
11445 for cf_add_2lib in $cf_add_libs
11447 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11453 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11455 LIBS="$cf_add_libs"
11461 { echo "$as_me:11461: WARNING: unable to find SM library" >&5
11462 echo "$as_me: WARNING: unable to find SM library" >&2;}
11465 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11466 test -n "$verbose" && echo " found package xt" 1>&6
11468 echo "${as_me:-configure}:11468: testing found package xt ..." 1>&5
11470 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11471 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11472 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11474 echo "${as_me:-configure}:11474: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11476 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11478 echo "${as_me:-configure}:11478: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11483 cf_new_extra_cppflags=
11485 for cf_add_cflags in $cf_pkgconfig_incs
11487 case $cf_fix_cppflags in
11489 case $cf_add_cflags in
11490 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11491 case $cf_add_cflags in
11493 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11496 && test -z "${cf_tst_cflags}" \
11497 && cf_fix_cppflags=yes
11499 if test $cf_fix_cppflags = yes ; then
11500 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11502 elif test "${cf_tst_cflags}" = "\"'" ; then
11503 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11508 case "$CPPFLAGS" in
11512 case $cf_add_cflags in
11514 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11516 CPPFLAGS=`echo "$CPPFLAGS" | \
11517 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11518 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11522 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11527 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11532 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11534 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11536 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11537 && test -z "${cf_tst_cflags}" \
11538 && cf_fix_cppflags=no
11543 if test -n "$cf_new_cflags" ; then
11545 CFLAGS="$CFLAGS $cf_new_cflags"
11548 if test -n "$cf_new_cppflags" ; then
11550 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11553 if test -n "$cf_new_extra_cppflags" ; then
11555 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11558 cf_add_libs="$cf_pkgconfig_libs"
11559 # Filter out duplicates - this happens with badly-designed ".pc" files...
11560 for cf_add_1lib in $LIBS
11562 for cf_add_2lib in $cf_add_libs
11564 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11570 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11572 LIBS="$cf_add_libs"
11578 { echo "$as_me:11578: WARNING: unable to find Xt library" >&5
11579 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11586 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11587 test -n "$verbose" && echo " found package xt" 1>&6
11589 echo "${as_me:-configure}:11589: testing found package xt ..." 1>&5
11591 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11592 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11593 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11595 echo "${as_me:-configure}:11595: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11597 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11599 echo "${as_me:-configure}:11599: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11604 cf_new_extra_cppflags=
11606 for cf_add_cflags in $cf_pkgconfig_incs
11608 case $cf_fix_cppflags in
11610 case $cf_add_cflags in
11611 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11612 case $cf_add_cflags in
11614 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11617 && test -z "${cf_tst_cflags}" \
11618 && cf_fix_cppflags=yes
11620 if test $cf_fix_cppflags = yes ; then
11621 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11623 elif test "${cf_tst_cflags}" = "\"'" ; then
11624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11629 case "$CPPFLAGS" in
11633 case $cf_add_cflags in
11635 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11637 CPPFLAGS=`echo "$CPPFLAGS" | \
11638 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11639 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11643 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11648 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11653 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11655 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11658 && test -z "${cf_tst_cflags}" \
11659 && cf_fix_cppflags=no
11664 if test -n "$cf_new_cflags" ; then
11666 CFLAGS="$CFLAGS $cf_new_cflags"
11669 if test -n "$cf_new_cppflags" ; then
11671 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11674 if test -n "$cf_new_extra_cppflags" ; then
11676 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11679 cf_add_libs="$cf_pkgconfig_libs"
11680 # Filter out duplicates - this happens with badly-designed ".pc" files...
11681 for cf_add_1lib in $LIBS
11683 for cf_add_2lib in $cf_add_libs
11685 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11691 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11693 LIBS="$cf_add_libs"
11699 # we have an "xt" package, but it may omit Xt's dependency on X11
11700 echo "$as_me:11700: checking for usable X dependency" >&5
11701 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11702 if test "${cf_cv_xt_x11_compat+set}" = set; then
11703 echo $ECHO_N "(cached) $ECHO_C" >&6
11706 cat >conftest.$ac_ext <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11710 #include <X11/Xlib.h>
11716 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11717 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11718 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11719 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11725 rm -f conftest.$ac_objext conftest$ac_exeext
11726 if { (eval echo "$as_me:11726: \"$ac_link\"") >&5
11727 (eval $ac_link) 2>&5
11729 echo "$as_me:11729: \$? = $ac_status" >&5
11730 (exit $ac_status); } &&
11731 { ac_try='test -s conftest$ac_exeext'
11732 { (eval echo "$as_me:11732: \"$ac_try\"") >&5
11733 (eval $ac_try) 2>&5
11735 echo "$as_me:11735: \$? = $ac_status" >&5
11736 (exit $ac_status); }; }; then
11737 cf_cv_xt_x11_compat=yes
11739 echo "$as_me: failed program was:" >&5
11740 cat conftest.$ac_ext >&5
11741 cf_cv_xt_x11_compat=no
11743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11745 echo "$as_me:11745: result: $cf_cv_xt_x11_compat" >&5
11746 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11747 if test "$cf_cv_xt_x11_compat" = no
11749 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11751 echo "${as_me:-configure}:11751: testing work around broken X11 dependency ..." 1>&5
11753 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11755 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11756 test -n "$verbose" && echo " found package x11" 1>&6
11758 echo "${as_me:-configure}:11758: testing found package x11 ..." 1>&5
11760 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11761 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11762 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11764 echo "${as_me:-configure}:11764: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11766 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11768 echo "${as_me:-configure}:11768: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11773 cf_new_extra_cppflags=
11775 for cf_add_cflags in $cf_pkgconfig_incs
11777 case $cf_fix_cppflags in
11779 case $cf_add_cflags in
11780 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11781 case $cf_add_cflags in
11783 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11786 && test -z "${cf_tst_cflags}" \
11787 && cf_fix_cppflags=yes
11789 if test $cf_fix_cppflags = yes ; then
11790 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11792 elif test "${cf_tst_cflags}" = "\"'" ; then
11793 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11798 case "$CPPFLAGS" in
11802 case $cf_add_cflags in
11804 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11806 CPPFLAGS=`echo "$CPPFLAGS" | \
11807 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11808 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11812 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11817 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11822 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11824 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11827 && test -z "${cf_tst_cflags}" \
11828 && cf_fix_cppflags=no
11833 if test -n "$cf_new_cflags" ; then
11835 CFLAGS="$CFLAGS $cf_new_cflags"
11838 if test -n "$cf_new_cppflags" ; then
11840 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11843 if test -n "$cf_new_extra_cppflags" ; then
11845 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11848 cf_add_libs="$cf_pkgconfig_libs"
11849 # Filter out duplicates - this happens with badly-designed ".pc" files...
11850 for cf_add_1lib in $LIBS
11852 for cf_add_2lib in $cf_add_libs
11854 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11860 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11862 LIBS="$cf_add_libs"
11869 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11871 echo "${as_me:-configure}:11871: testing ...before $LIBS ..." 1>&5
11873 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11874 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11876 echo "${as_me:-configure}:11876: testing ...after $LIBS ..." 1>&5
11884 echo "$as_me:11884: checking for usable X Toolkit package" >&5
11885 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11886 if test "${cf_cv_xt_ice_compat+set}" = set; then
11887 echo $ECHO_N "(cached) $ECHO_C" >&6
11890 cat >conftest.$ac_ext <<_ACEOF
11891 #line 11891 "configure"
11892 #include "confdefs.h"
11894 #include <X11/Shell.h>
11899 int num = IceConnectionNumber(0)
11905 rm -f conftest.$ac_objext conftest$ac_exeext
11906 if { (eval echo "$as_me:11906: \"$ac_link\"") >&5
11907 (eval $ac_link) 2>&5
11909 echo "$as_me:11909: \$? = $ac_status" >&5
11910 (exit $ac_status); } &&
11911 { ac_try='test -s conftest$ac_exeext'
11912 { (eval echo "$as_me:11912: \"$ac_try\"") >&5
11913 (eval $ac_try) 2>&5
11915 echo "$as_me:11915: \$? = $ac_status" >&5
11916 (exit $ac_status); }; }; then
11917 cf_cv_xt_ice_compat=yes
11919 echo "$as_me: failed program was:" >&5
11920 cat conftest.$ac_ext >&5
11921 cf_cv_xt_ice_compat=no
11923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11925 echo "$as_me:11925: result: $cf_cv_xt_ice_compat" >&5
11926 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11928 if test "$cf_cv_xt_ice_compat" = no
11930 # workaround for broken ".pc" files used for X Toolkit.
11931 case "x$X_PRE_LIBS" in
11937 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11939 echo "${as_me:-configure}:11939: testing work around broken ICE dependency ..." 1>&5
11941 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11942 test -n "$verbose" && echo " found package ice" 1>&6
11944 echo "${as_me:-configure}:11944: testing found package ice ..." 1>&5
11946 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11947 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11948 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11950 echo "${as_me:-configure}:11950: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11952 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11954 echo "${as_me:-configure}:11954: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11959 cf_new_extra_cppflags=
11961 for cf_add_cflags in $cf_pkgconfig_incs
11963 case $cf_fix_cppflags in
11965 case $cf_add_cflags in
11966 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11967 case $cf_add_cflags in
11969 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11971 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11972 && test -z "${cf_tst_cflags}" \
11973 && cf_fix_cppflags=yes
11975 if test $cf_fix_cppflags = yes ; then
11976 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11978 elif test "${cf_tst_cflags}" = "\"'" ; then
11979 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11984 case "$CPPFLAGS" in
11988 case $cf_add_cflags in
11990 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11992 CPPFLAGS=`echo "$CPPFLAGS" | \
11993 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11994 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11998 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12003 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12008 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12010 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12012 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12013 && test -z "${cf_tst_cflags}" \
12014 && cf_fix_cppflags=no
12019 if test -n "$cf_new_cflags" ; then
12021 CFLAGS="$CFLAGS $cf_new_cflags"
12024 if test -n "$cf_new_cppflags" ; then
12026 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12029 if test -n "$cf_new_extra_cppflags" ; then
12031 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12034 cf_add_libs="$cf_pkgconfig_libs"
12035 # Filter out duplicates - this happens with badly-designed ".pc" files...
12036 for cf_add_1lib in $LIBS
12038 for cf_add_2lib in $cf_add_libs
12040 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12046 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12048 LIBS="$cf_add_libs"
12050 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12051 test -n "$verbose" && echo " found package sm" 1>&6
12053 echo "${as_me:-configure}:12053: testing found package sm ..." 1>&5
12055 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12056 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12057 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12059 echo "${as_me:-configure}:12059: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12061 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12063 echo "${as_me:-configure}:12063: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12068 cf_new_extra_cppflags=
12070 for cf_add_cflags in $cf_pkgconfig_incs
12072 case $cf_fix_cppflags in
12074 case $cf_add_cflags in
12075 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12076 case $cf_add_cflags in
12078 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12080 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12081 && test -z "${cf_tst_cflags}" \
12082 && cf_fix_cppflags=yes
12084 if test $cf_fix_cppflags = yes ; then
12085 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12087 elif test "${cf_tst_cflags}" = "\"'" ; then
12088 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12093 case "$CPPFLAGS" in
12097 case $cf_add_cflags in
12099 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12101 CPPFLAGS=`echo "$CPPFLAGS" | \
12102 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12103 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12107 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12112 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12117 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12119 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12122 && test -z "${cf_tst_cflags}" \
12123 && cf_fix_cppflags=no
12128 if test -n "$cf_new_cflags" ; then
12130 CFLAGS="$CFLAGS $cf_new_cflags"
12133 if test -n "$cf_new_cppflags" ; then
12135 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12138 if test -n "$cf_new_extra_cppflags" ; then
12140 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12143 cf_add_libs="$cf_pkgconfig_libs"
12144 # Filter out duplicates - this happens with badly-designed ".pc" files...
12145 for cf_add_1lib in $LIBS
12147 for cf_add_2lib in $cf_add_libs
12149 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12155 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12157 LIBS="$cf_add_libs"
12170 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12172 echo "${as_me:-configure}:12172: testing ...before $LIBS ..." 1>&5
12174 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12175 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12177 echo "${as_me:-configure}:12177: testing ...after $LIBS ..." 1>&5
12193 LDFLAGS="$X_LIBS $LDFLAGS"
12195 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12197 echo "${as_me:-configure}:12197: testing checking additions to CFLAGS ..." 1>&5
12199 cf_check_cflags="$CFLAGS"
12200 cf_check_cppflags="$CPPFLAGS"
12205 cf_new_extra_cppflags=
12207 for cf_add_cflags in $X_CFLAGS
12209 case $cf_fix_cppflags in
12211 case $cf_add_cflags in
12212 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12213 case $cf_add_cflags in
12215 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12218 && test -z "${cf_tst_cflags}" \
12219 && cf_fix_cppflags=yes
12221 if test $cf_fix_cppflags = yes ; then
12222 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12224 elif test "${cf_tst_cflags}" = "\"'" ; then
12225 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12230 case "$CPPFLAGS" in
12234 case $cf_add_cflags in
12236 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12238 CPPFLAGS=`echo "$CPPFLAGS" | \
12239 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12240 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12244 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12249 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12254 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12256 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12259 && test -z "${cf_tst_cflags}" \
12260 && cf_fix_cppflags=no
12265 if test -n "$cf_new_cflags" ; then
12266 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12268 echo "${as_me:-configure}:12268: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12270 CFLAGS="$CFLAGS $cf_new_cflags"
12273 if test -n "$cf_new_cppflags" ; then
12274 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12276 echo "${as_me:-configure}:12276: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12278 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12281 if test -n "$cf_new_extra_cppflags" ; then
12282 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12284 echo "${as_me:-configure}:12284: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12286 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12289 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12290 cat >conftest.$ac_ext <<_ACEOF
12291 #line 12291 "configure"
12292 #include "confdefs.h"
12297 printf("Hello world");
12302 rm -f conftest.$ac_objext conftest$ac_exeext
12303 if { (eval echo "$as_me:12303: \"$ac_link\"") >&5
12304 (eval $ac_link) 2>&5
12306 echo "$as_me:12306: \$? = $ac_status" >&5
12307 (exit $ac_status); } &&
12308 { ac_try='test -s conftest$ac_exeext'
12309 { (eval echo "$as_me:12309: \"$ac_try\"") >&5
12310 (eval $ac_try) 2>&5
12312 echo "$as_me:12312: \$? = $ac_status" >&5
12313 (exit $ac_status); }; }; then
12316 echo "$as_me: failed program was:" >&5
12317 cat conftest.$ac_ext >&5
12318 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12320 echo "${as_me:-configure}:12320: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12322 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12323 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12325 echo "${as_me:-configure}:12325: testing but keeping change to \$CPPFLAGS ..." 1>&5
12328 CFLAGS="$cf_check_flags"
12330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12333 echo "$as_me:12333: checking for XOpenDisplay" >&5
12334 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12335 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12336 echo $ECHO_N "(cached) $ECHO_C" >&6
12338 cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341 /* System header to define __stub macros and hopefully few prototypes,
12342 which can conflict with char XOpenDisplay (); below. */
12343 #include <assert.h>
12344 /* Override any gcc2 internal prototype to avoid an error. */
12348 /* We use char because int might match the return type of a gcc2
12349 builtin and then its argument prototype would still apply. */
12350 char XOpenDisplay ();
12356 /* The GNU C library defines this for functions which it implements
12357 to always fail with ENOSYS. Some functions are actually named
12358 something starting with __ and the normal name is an alias. */
12359 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12362 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12369 rm -f conftest.$ac_objext conftest$ac_exeext
12370 if { (eval echo "$as_me:12370: \"$ac_link\"") >&5
12371 (eval $ac_link) 2>&5
12373 echo "$as_me:12373: \$? = $ac_status" >&5
12374 (exit $ac_status); } &&
12375 { ac_try='test -s conftest$ac_exeext'
12376 { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377 (eval $ac_try) 2>&5
12379 echo "$as_me:12379: \$? = $ac_status" >&5
12380 (exit $ac_status); }; }; then
12381 ac_cv_func_XOpenDisplay=yes
12383 echo "$as_me: failed program was:" >&5
12384 cat conftest.$ac_ext >&5
12385 ac_cv_func_XOpenDisplay=no
12387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12389 echo "$as_me:12389: result: $ac_cv_func_XOpenDisplay" >&5
12390 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12391 if test $ac_cv_func_XOpenDisplay = yes; then
12395 echo "$as_me:12395: checking for XOpenDisplay in -lX11" >&5
12396 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12397 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12398 echo $ECHO_N "(cached) $ECHO_C" >&6
12400 ac_check_lib_save_LIBS=$LIBS
12401 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12402 cat >conftest.$ac_ext <<_ACEOF
12403 #line 12403 "configure"
12404 #include "confdefs.h"
12406 /* Override any gcc2 internal prototype to avoid an error. */
12410 /* We use char because int might match the return type of a gcc2
12411 builtin and then its argument prototype would still apply. */
12412 char XOpenDisplay ();
12421 rm -f conftest.$ac_objext conftest$ac_exeext
12422 if { (eval echo "$as_me:12422: \"$ac_link\"") >&5
12423 (eval $ac_link) 2>&5
12425 echo "$as_me:12425: \$? = $ac_status" >&5
12426 (exit $ac_status); } &&
12427 { ac_try='test -s conftest$ac_exeext'
12428 { (eval echo "$as_me:12428: \"$ac_try\"") >&5
12429 (eval $ac_try) 2>&5
12431 echo "$as_me:12431: \$? = $ac_status" >&5
12432 (exit $ac_status); }; }; then
12433 ac_cv_lib_X11_XOpenDisplay=yes
12435 echo "$as_me: failed program was:" >&5
12436 cat conftest.$ac_ext >&5
12437 ac_cv_lib_X11_XOpenDisplay=no
12439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12440 LIBS=$ac_check_lib_save_LIBS
12442 echo "$as_me:12442: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12443 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12444 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12446 cf_add_libs="-lX11"
12447 # Filter out duplicates - this happens with badly-designed ".pc" files...
12448 for cf_add_1lib in $LIBS
12450 for cf_add_2lib in $cf_add_libs
12452 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12458 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12460 LIBS="$cf_add_libs"
12466 echo "$as_me:12466: checking for XtAppInitialize" >&5
12467 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12468 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12469 echo $ECHO_N "(cached) $ECHO_C" >&6
12471 cat >conftest.$ac_ext <<_ACEOF
12472 #line 12472 "configure"
12473 #include "confdefs.h"
12474 /* System header to define __stub macros and hopefully few prototypes,
12475 which can conflict with char XtAppInitialize (); below. */
12476 #include <assert.h>
12477 /* Override any gcc2 internal prototype to avoid an error. */
12481 /* We use char because int might match the return type of a gcc2
12482 builtin and then its argument prototype would still apply. */
12483 char XtAppInitialize ();
12489 /* The GNU C library defines this for functions which it implements
12490 to always fail with ENOSYS. Some functions are actually named
12491 something starting with __ and the normal name is an alias. */
12492 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12495 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12502 rm -f conftest.$ac_objext conftest$ac_exeext
12503 if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
12504 (eval $ac_link) 2>&5
12506 echo "$as_me:12506: \$? = $ac_status" >&5
12507 (exit $ac_status); } &&
12508 { ac_try='test -s conftest$ac_exeext'
12509 { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510 (eval $ac_try) 2>&5
12512 echo "$as_me:12512: \$? = $ac_status" >&5
12513 (exit $ac_status); }; }; then
12514 ac_cv_func_XtAppInitialize=yes
12516 echo "$as_me: failed program was:" >&5
12517 cat conftest.$ac_ext >&5
12518 ac_cv_func_XtAppInitialize=no
12520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12522 echo "$as_me:12522: result: $ac_cv_func_XtAppInitialize" >&5
12523 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12524 if test $ac_cv_func_XtAppInitialize = yes; then
12528 echo "$as_me:12528: checking for XtAppInitialize in -lXt" >&5
12529 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12530 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
12533 ac_check_lib_save_LIBS=$LIBS
12534 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12535 cat >conftest.$ac_ext <<_ACEOF
12536 #line 12536 "configure"
12537 #include "confdefs.h"
12539 /* Override any gcc2 internal prototype to avoid an error. */
12543 /* We use char because int might match the return type of a gcc2
12544 builtin and then its argument prototype would still apply. */
12545 char XtAppInitialize ();
12549 XtAppInitialize ();
12554 rm -f conftest.$ac_objext conftest$ac_exeext
12555 if { (eval echo "$as_me:12555: \"$ac_link\"") >&5
12556 (eval $ac_link) 2>&5
12558 echo "$as_me:12558: \$? = $ac_status" >&5
12559 (exit $ac_status); } &&
12560 { ac_try='test -s conftest$ac_exeext'
12561 { (eval echo "$as_me:12561: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12564 echo "$as_me:12564: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 ac_cv_lib_Xt_XtAppInitialize=yes
12568 echo "$as_me: failed program was:" >&5
12569 cat conftest.$ac_ext >&5
12570 ac_cv_lib_Xt_XtAppInitialize=no
12572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12573 LIBS=$ac_check_lib_save_LIBS
12575 echo "$as_me:12575: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12576 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12577 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12579 cat >>confdefs.h <<\EOF
12580 #define HAVE_LIBXT 1
12584 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12591 if test $cf_have_X_LIBS = no ; then
12592 { echo "$as_me:12592: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12593 test program. You will have to check and add the proper libraries by hand
12595 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12596 test program. You will have to check and add the proper libraries by hand
12597 to makefile." >&2;}
12600 cf_x_athena_root=$cf_x_athena
12603 for cf_path in default \
12604 /usr/contrib/X11R6 \
12605 /usr/contrib/X11R5 \
12609 if test -z "$cf_x_athena_inc" ; then
12610 cf_save="$CPPFLAGS"
12611 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12612 if test $cf_path != default ; then
12613 CPPFLAGS="$cf_save -I$cf_path/include"
12614 echo "$as_me:12614: checking for $cf_test in $cf_path" >&5
12615 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12617 echo "$as_me:12617: checking for $cf_test" >&5
12618 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12620 cat >conftest.$ac_ext <<_ACEOF
12621 #line 12621 "configure"
12622 #include "confdefs.h"
12624 #include <X11/Intrinsic.h>
12625 #include <$cf_test>
12634 rm -f conftest.$ac_objext
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636 (eval $ac_compile) 2>&5
12638 echo "$as_me:12638: \$? = $ac_status" >&5
12639 (exit $ac_status); } &&
12640 { ac_try='test -s conftest.$ac_objext'
12641 { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642 (eval $ac_try) 2>&5
12644 echo "$as_me:12644: \$? = $ac_status" >&5
12645 (exit $ac_status); }; }; then
12648 echo "$as_me: failed program was:" >&5
12649 cat conftest.$ac_ext >&5
12652 rm -f conftest.$ac_objext conftest.$ac_ext
12653 echo "$as_me:12653: result: $cf_result" >&5
12654 echo "${ECHO_T}$cf_result" >&6
12655 if test "$cf_result" = yes ; then
12656 cf_x_athena_inc=$cf_path
12659 CPPFLAGS="$cf_save"
12664 if test -z "$cf_x_athena_inc" ; then
12665 { echo "$as_me:12665: WARNING: Unable to successfully find Athena header files with test program" >&5
12666 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12667 elif test "$cf_x_athena_inc" != default ; then
12668 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12671 cf_x_athena_root=$cf_x_athena
12674 for cf_path in default \
12675 /usr/contrib/X11R6 \
12676 /usr/contrib/X11R5 \
12681 ${cf_x_athena_root} \
12682 ${cf_x_athena_root}7 \
12683 ${cf_x_athena_root}6
12686 "-l$cf_lib -lXmu" \
12687 "-l$cf_lib -lXpm -lXmu" \
12688 "-l${cf_lib}_s -lXmu_s"
12690 if test -z "$cf_x_athena_lib" ; then
12692 cf_test=XawSimpleMenuAddGlobalActions
12693 if test $cf_path != default ; then
12695 cf_add_libs="-L$cf_path/lib $cf_libs"
12696 # Filter out duplicates - this happens with badly-designed ".pc" files...
12697 for cf_add_1lib in $LIBS
12699 for cf_add_2lib in $cf_add_libs
12701 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12707 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12709 LIBS="$cf_add_libs"
12711 echo "$as_me:12711: checking for $cf_libs in $cf_path" >&5
12712 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12715 cf_add_libs="$cf_libs"
12716 # Filter out duplicates - this happens with badly-designed ".pc" files...
12717 for cf_add_1lib in $LIBS
12719 for cf_add_2lib in $cf_add_libs
12721 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12727 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12729 LIBS="$cf_add_libs"
12731 echo "$as_me:12731: checking for $cf_test in $cf_libs" >&5
12732 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12734 cat >conftest.$ac_ext <<_ACEOF
12735 #line 12735 "configure"
12736 #include "confdefs.h"
12738 #include <X11/Intrinsic.h>
12739 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12745 $cf_test((XtAppContext) 0)
12750 rm -f conftest.$ac_objext conftest$ac_exeext
12751 if { (eval echo "$as_me:12751: \"$ac_link\"") >&5
12752 (eval $ac_link) 2>&5
12754 echo "$as_me:12754: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest$ac_exeext'
12757 { (eval echo "$as_me:12757: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12760 echo "$as_me:12760: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
12764 echo "$as_me: failed program was:" >&5
12765 cat conftest.$ac_ext >&5
12768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12769 echo "$as_me:12769: result: $cf_result" >&5
12770 echo "${ECHO_T}$cf_result" >&6
12771 if test "$cf_result" = yes ; then
12772 cf_x_athena_lib="$cf_libs"
12778 test -n "$cf_x_athena_lib" && break
12782 if test -z "$cf_x_athena_lib" ; then
12783 { { echo "$as_me:12783: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12784 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12785 { (exit 1); exit 1; }; }
12788 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12790 cat >>confdefs.h <<EOF
12791 #define $cf_x_athena_LIBS 1
12796 if test -n "$ac_tool_prefix"; then
12797 for ac_prog in xcurses-config
12799 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12800 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12801 echo "$as_me:12801: checking for $ac_word" >&5
12802 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12803 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12804 echo $ECHO_N "(cached) $ECHO_C" >&6
12806 if test -n "$XCURSES_CONFIG"; then
12807 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12809 ac_save_IFS=$IFS; IFS=$ac_path_separator
12811 for ac_dir in $ac_dummy; do
12813 test -z "$ac_dir" && ac_dir=.
12814 $as_executable_p "$ac_dir/$ac_word" || continue
12815 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12816 echo "$as_me:12816: found $ac_dir/$ac_word" >&5
12822 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12823 if test -n "$XCURSES_CONFIG"; then
12824 echo "$as_me:12824: result: $XCURSES_CONFIG" >&5
12825 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12827 echo "$as_me:12827: result: no" >&5
12828 echo "${ECHO_T}no" >&6
12831 test -n "$XCURSES_CONFIG" && break
12834 if test -z "$XCURSES_CONFIG"; then
12835 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12836 for ac_prog in xcurses-config
12838 # Extract the first word of "$ac_prog", so it can be a program name with args.
12839 set dummy $ac_prog; ac_word=$2
12840 echo "$as_me:12840: checking for $ac_word" >&5
12841 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12842 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12843 echo $ECHO_N "(cached) $ECHO_C" >&6
12845 if test -n "$ac_ct_XCURSES_CONFIG"; then
12846 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12848 ac_save_IFS=$IFS; IFS=$ac_path_separator
12850 for ac_dir in $ac_dummy; do
12852 test -z "$ac_dir" && ac_dir=.
12853 $as_executable_p "$ac_dir/$ac_word" || continue
12854 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12855 echo "$as_me:12855: found $ac_dir/$ac_word" >&5
12861 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12862 if test -n "$ac_ct_XCURSES_CONFIG"; then
12863 echo "$as_me:12863: result: $ac_ct_XCURSES_CONFIG" >&5
12864 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12866 echo "$as_me:12866: result: no" >&5
12867 echo "${ECHO_T}no" >&6
12870 test -n "$ac_ct_XCURSES_CONFIG" && break
12872 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12874 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12877 if test "$XCURSES_CONFIG" != none ; then
12879 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12881 cf_add_libs="`$XCURSES_CONFIG --libs`"
12882 # Filter out duplicates - this happens with badly-designed ".pc" files...
12883 for cf_add_1lib in $LIBS
12885 for cf_add_2lib in $cf_add_libs
12887 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12893 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12895 LIBS="$cf_add_libs"
12897 cf_cv_lib_XCurses=yes
12901 LDFLAGS="$LDFLAGS $X_LIBS"
12903 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12905 echo "${as_me:-configure}:12905: testing checking additions to CFLAGS ..." 1>&5
12907 cf_check_cflags="$CFLAGS"
12908 cf_check_cppflags="$CPPFLAGS"
12913 cf_new_extra_cppflags=
12915 for cf_add_cflags in $X_CFLAGS
12917 case $cf_fix_cppflags in
12919 case $cf_add_cflags in
12920 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12921 case $cf_add_cflags in
12923 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12926 && test -z "${cf_tst_cflags}" \
12927 && cf_fix_cppflags=yes
12929 if test $cf_fix_cppflags = yes ; then
12930 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12932 elif test "${cf_tst_cflags}" = "\"'" ; then
12933 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12938 case "$CPPFLAGS" in
12942 case $cf_add_cflags in
12944 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12946 CPPFLAGS=`echo "$CPPFLAGS" | \
12947 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12948 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12952 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12957 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12962 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12964 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12967 && test -z "${cf_tst_cflags}" \
12968 && cf_fix_cppflags=no
12973 if test -n "$cf_new_cflags" ; then
12974 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12976 echo "${as_me:-configure}:12976: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12978 CFLAGS="$CFLAGS $cf_new_cflags"
12981 if test -n "$cf_new_cppflags" ; then
12982 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12984 echo "${as_me:-configure}:12984: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12986 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12989 if test -n "$cf_new_extra_cppflags" ; then
12990 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12992 echo "${as_me:-configure}:12992: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12994 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12997 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12998 cat >conftest.$ac_ext <<_ACEOF
12999 #line 12999 "configure"
13000 #include "confdefs.h"
13005 printf("Hello world");
13010 rm -f conftest.$ac_objext conftest$ac_exeext
13011 if { (eval echo "$as_me:13011: \"$ac_link\"") >&5
13012 (eval $ac_link) 2>&5
13014 echo "$as_me:13014: \$? = $ac_status" >&5
13015 (exit $ac_status); } &&
13016 { ac_try='test -s conftest$ac_exeext'
13017 { (eval echo "$as_me:13017: \"$ac_try\"") >&5
13018 (eval $ac_try) 2>&5
13020 echo "$as_me:13020: \$? = $ac_status" >&5
13021 (exit $ac_status); }; }; then
13024 echo "$as_me: failed program was:" >&5
13025 cat conftest.$ac_ext >&5
13026 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13028 echo "${as_me:-configure}:13028: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13030 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13031 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13033 echo "${as_me:-configure}:13033: testing but keeping change to \$CPPFLAGS ..." 1>&5
13036 CFLAGS="$cf_check_flags"
13038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13041 echo "$as_me:13041: checking for XOpenDisplay in -lX11" >&5
13042 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13043 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13044 echo $ECHO_N "(cached) $ECHO_C" >&6
13046 ac_check_lib_save_LIBS=$LIBS
13047 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13048 cat >conftest.$ac_ext <<_ACEOF
13049 #line 13049 "configure"
13050 #include "confdefs.h"
13052 /* Override any gcc2 internal prototype to avoid an error. */
13056 /* We use char because int might match the return type of a gcc2
13057 builtin and then its argument prototype would still apply. */
13058 char XOpenDisplay ();
13067 rm -f conftest.$ac_objext conftest$ac_exeext
13068 if { (eval echo "$as_me:13068: \"$ac_link\"") >&5
13069 (eval $ac_link) 2>&5
13071 echo "$as_me:13071: \$? = $ac_status" >&5
13072 (exit $ac_status); } &&
13073 { ac_try='test -s conftest$ac_exeext'
13074 { (eval echo "$as_me:13074: \"$ac_try\"") >&5
13075 (eval $ac_try) 2>&5
13077 echo "$as_me:13077: \$? = $ac_status" >&5
13078 (exit $ac_status); }; }; then
13079 ac_cv_lib_X11_XOpenDisplay=yes
13081 echo "$as_me: failed program was:" >&5
13082 cat conftest.$ac_ext >&5
13083 ac_cv_lib_X11_XOpenDisplay=no
13085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13086 LIBS=$ac_check_lib_save_LIBS
13088 echo "$as_me:13088: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13089 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13090 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13092 cf_add_libs="-lX11"
13093 # Filter out duplicates - this happens with badly-designed ".pc" files...
13094 for cf_add_1lib in $LIBS
13096 for cf_add_2lib in $cf_add_libs
13098 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13104 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13106 LIBS="$cf_add_libs"
13110 echo "$as_me:13110: checking for XCurses library" >&5
13111 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13112 if test "${cf_cv_lib_XCurses+set}" = set; then
13113 echo $ECHO_N "(cached) $ECHO_C" >&6
13116 cf_add_libs="-lXCurses"
13117 # Filter out duplicates - this happens with badly-designed ".pc" files...
13118 for cf_add_1lib in $LIBS
13120 for cf_add_2lib in $cf_add_libs
13122 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13128 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13130 LIBS="$cf_add_libs"
13132 cat >conftest.$ac_ext <<_ACEOF
13133 #line 13133 "configure"
13134 #include "confdefs.h"
13136 #include <xcurses.h>
13137 char *XCursesProgramName = "test";
13147 rm -f conftest.$ac_objext conftest$ac_exeext
13148 if { (eval echo "$as_me:13148: \"$ac_link\"") >&5
13149 (eval $ac_link) 2>&5
13151 echo "$as_me:13151: \$? = $ac_status" >&5
13152 (exit $ac_status); } &&
13153 { ac_try='test -s conftest$ac_exeext'
13154 { (eval echo "$as_me:13154: \"$ac_try\"") >&5
13155 (eval $ac_try) 2>&5
13157 echo "$as_me:13157: \$? = $ac_status" >&5
13158 (exit $ac_status); }; }; then
13159 cf_cv_lib_XCurses=yes
13161 echo "$as_me: failed program was:" >&5
13162 cat conftest.$ac_ext >&5
13163 cf_cv_lib_XCurses=no
13165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13168 echo "$as_me:13168: result: $cf_cv_lib_XCurses" >&5
13169 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13173 if test $cf_cv_lib_XCurses = yes ; then
13175 cat >>confdefs.h <<\EOF
13179 cat >>confdefs.h <<\EOF
13183 echo "$as_me:13183: checking for xcurses.h" >&5
13184 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13185 if test "${ac_cv_header_xcurses_h+set}" = set; then
13186 echo $ECHO_N "(cached) $ECHO_C" >&6
13188 cat >conftest.$ac_ext <<_ACEOF
13189 #line 13189 "configure"
13190 #include "confdefs.h"
13191 #include <xcurses.h>
13193 if { (eval echo "$as_me:13193: \"$ac_cpp conftest.$ac_ext\"") >&5
13194 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13196 egrep -v '^ *\+' conftest.er1 >conftest.err
13198 cat conftest.err >&5
13199 echo "$as_me:13199: \$? = $ac_status" >&5
13200 (exit $ac_status); } >/dev/null; then
13201 if test -s conftest.err; then
13202 ac_cpp_err=$ac_c_preproc_warn_flag
13209 if test -z "$ac_cpp_err"; then
13210 ac_cv_header_xcurses_h=yes
13212 echo "$as_me: failed program was:" >&5
13213 cat conftest.$ac_ext >&5
13214 ac_cv_header_xcurses_h=no
13216 rm -f conftest.err conftest.$ac_ext
13218 echo "$as_me:13218: result: $ac_cv_header_xcurses_h" >&5
13219 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13220 if test $ac_cv_header_xcurses_h = yes; then
13222 cat >>confdefs.h <<\EOF
13223 #define HAVE_XCURSES 1
13229 { { echo "$as_me:13229: error: Cannot link with XCurses" >&5
13230 echo "$as_me: error: Cannot link with XCurses" >&2;}
13231 { (exit 1); exit 1; }; }
13236 { { echo "$as_me:13236: error: unexpected screen-value: $cf_cv_screen" >&5
13237 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13238 { (exit 1); exit 1; }; }
13242 : ${cf_nculib_root:=$cf_cv_screen}
13243 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13244 echo "$as_me:13244: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13245 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13246 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13247 echo $ECHO_N "(cached) $ECHO_C" >&6
13249 ac_check_lib_save_LIBS=$LIBS
13250 LIBS="-l$cf_nculib_root $LIBS"
13251 cat >conftest.$ac_ext <<_ACEOF
13252 #line 13252 "configure"
13253 #include "confdefs.h"
13255 /* Override any gcc2 internal prototype to avoid an error. */
13259 /* We use char because int might match the return type of a gcc2
13260 builtin and then its argument prototype would still apply. */
13261 char _nc_init_pthreads ();
13265 _nc_init_pthreads ();
13270 rm -f conftest.$ac_objext conftest$ac_exeext
13271 if { (eval echo "$as_me:13271: \"$ac_link\"") >&5
13272 (eval $ac_link) 2>&5
13274 echo "$as_me:13274: \$? = $ac_status" >&5
13275 (exit $ac_status); } &&
13276 { ac_try='test -s conftest$ac_exeext'
13277 { (eval echo "$as_me:13277: \"$ac_try\"") >&5
13278 (eval $ac_try) 2>&5
13280 echo "$as_me:13280: \$? = $ac_status" >&5
13281 (exit $ac_status); }; }; then
13282 eval "$as_ac_Lib=yes"
13284 echo "$as_me: failed program was:" >&5
13285 cat conftest.$ac_ext >&5
13286 eval "$as_ac_Lib=no"
13288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13289 LIBS=$ac_check_lib_save_LIBS
13291 echo "$as_me:13291: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13292 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13293 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13294 cf_cv_ncurses_pthreads=yes
13296 cf_cv_ncurses_pthreads=no
13299 if test "$cf_cv_ncurses_pthreads" = yes
13302 cf_add_libs="-lpthread"
13303 # Filter out duplicates - this happens with badly-designed ".pc" files...
13304 for cf_add_1lib in $LIBS
13306 for cf_add_2lib in $cf_add_libs
13308 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13314 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13316 LIBS="$cf_add_libs"
13320 case $cf_cv_screen in
13322 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13326 echo "$as_me:13326: checking for NetBSD form.h" >&5
13327 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13328 if test "${cf_cv_netbsd_form_h+set}" = set; then
13329 echo $ECHO_N "(cached) $ECHO_C" >&6
13332 cat >conftest.$ac_ext <<_ACEOF
13333 #line 13333 "configure"
13334 #include "confdefs.h"
13336 #include <${cf_cv_ncurses_header:-curses.h}>
13344 int y = current_field(form)->cursor_ypos;
13345 int x = current_field(form)->cursor_xpos;
13351 rm -f conftest.$ac_objext
13352 if { (eval echo "$as_me:13352: \"$ac_compile\"") >&5
13353 (eval $ac_compile) 2>&5
13355 echo "$as_me:13355: \$? = $ac_status" >&5
13356 (exit $ac_status); } &&
13357 { ac_try='test -s conftest.$ac_objext'
13358 { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359 (eval $ac_try) 2>&5
13361 echo "$as_me:13361: \$? = $ac_status" >&5
13362 (exit $ac_status); }; }; then
13363 cf_cv_netbsd_form_h=yes
13366 echo "$as_me: failed program was:" >&5
13367 cat conftest.$ac_ext >&5
13368 cf_cv_netbsd_form_h=no
13370 rm -f conftest.$ac_objext conftest.$ac_ext
13373 echo "$as_me:13373: result: $cf_cv_netbsd_form_h" >&5
13374 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13376 test "$cf_cv_netbsd_form_h" = yes &&
13377 cat >>confdefs.h <<\EOF
13378 #define HAVE_NETBSD_FORM_H 1
13381 echo "$as_me:13381: checking for NetBSD menu.h" >&5
13382 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13383 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13384 echo $ECHO_N "(cached) $ECHO_C" >&6
13387 cat >conftest.$ac_ext <<_ACEOF
13388 #line 13388 "configure"
13389 #include "confdefs.h"
13391 #include <${cf_cv_ncurses_header:-curses.h}>
13399 int y = menu->max_item_width;
13405 rm -f conftest.$ac_objext
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407 (eval $ac_compile) 2>&5
13409 echo "$as_me:13409: \$? = $ac_status" >&5
13410 (exit $ac_status); } &&
13411 { ac_try='test -s conftest.$ac_objext'
13412 { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413 (eval $ac_try) 2>&5
13415 echo "$as_me:13415: \$? = $ac_status" >&5
13416 (exit $ac_status); }; }; then
13417 cf_cv_netbsd_menu_h=yes
13420 echo "$as_me: failed program was:" >&5
13421 cat conftest.$ac_ext >&5
13422 cf_cv_netbsd_menu_h=no
13424 rm -f conftest.$ac_objext conftest.$ac_ext
13427 echo "$as_me:13427: result: $cf_cv_netbsd_menu_h" >&5
13428 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13430 test "$cf_cv_netbsd_menu_h" = yes &&
13431 cat >>confdefs.h <<\EOF
13432 #define HAVE_NETBSD_MENU_H 1
13438 case $cf_cv_screen in
13442 # look for curses-related libraries
13444 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13445 echo "$as_me:13445: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13446 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13447 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13448 echo $ECHO_N "(cached) $ECHO_C" >&6
13450 ac_check_lib_save_LIBS=$LIBS
13451 LIBS="-lpanel$cf_cv_libtype $LIBS"
13452 cat >conftest.$ac_ext <<_ACEOF
13453 #line 13453 "configure"
13454 #include "confdefs.h"
13456 /* Override any gcc2 internal prototype to avoid an error. */
13460 /* We use char because int might match the return type of a gcc2
13461 builtin and then its argument prototype would still apply. */
13471 rm -f conftest.$ac_objext conftest$ac_exeext
13472 if { (eval echo "$as_me:13472: \"$ac_link\"") >&5
13473 (eval $ac_link) 2>&5
13475 echo "$as_me:13475: \$? = $ac_status" >&5
13476 (exit $ac_status); } &&
13477 { ac_try='test -s conftest$ac_exeext'
13478 { (eval echo "$as_me:13478: \"$ac_try\"") >&5
13479 (eval $ac_try) 2>&5
13481 echo "$as_me:13481: \$? = $ac_status" >&5
13482 (exit $ac_status); }; }; then
13483 eval "$as_ac_Lib=yes"
13485 echo "$as_me: failed program was:" >&5
13486 cat conftest.$ac_ext >&5
13487 eval "$as_ac_Lib=no"
13489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13490 LIBS=$ac_check_lib_save_LIBS
13492 echo "$as_me:13492: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13493 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13494 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13496 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13498 cf_add_libs="-lpanel$cf_cv_libtype"
13499 # Filter out duplicates - this happens with badly-designed ".pc" files...
13500 for cf_add_1lib in $LIBS
13502 for cf_add_2lib in $cf_add_libs
13504 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13510 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13512 LIBS="$cf_add_libs"
13514 cat >>confdefs.h <<EOF
13515 #define $cf_upper 1
13520 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13521 echo "$as_me:13521: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13522 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13523 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13524 echo $ECHO_N "(cached) $ECHO_C" >&6
13526 ac_check_lib_save_LIBS=$LIBS
13527 LIBS="-lmenu$cf_cv_libtype $LIBS"
13528 cat >conftest.$ac_ext <<_ACEOF
13529 #line 13529 "configure"
13530 #include "confdefs.h"
13532 /* Override any gcc2 internal prototype to avoid an error. */
13536 /* We use char because int might match the return type of a gcc2
13537 builtin and then its argument prototype would still apply. */
13538 char menu_driver ();
13547 rm -f conftest.$ac_objext conftest$ac_exeext
13548 if { (eval echo "$as_me:13548: \"$ac_link\"") >&5
13549 (eval $ac_link) 2>&5
13551 echo "$as_me:13551: \$? = $ac_status" >&5
13552 (exit $ac_status); } &&
13553 { ac_try='test -s conftest$ac_exeext'
13554 { (eval echo "$as_me:13554: \"$ac_try\"") >&5
13555 (eval $ac_try) 2>&5
13557 echo "$as_me:13557: \$? = $ac_status" >&5
13558 (exit $ac_status); }; }; then
13559 eval "$as_ac_Lib=yes"
13561 echo "$as_me: failed program was:" >&5
13562 cat conftest.$ac_ext >&5
13563 eval "$as_ac_Lib=no"
13565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13566 LIBS=$ac_check_lib_save_LIBS
13568 echo "$as_me:13568: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13569 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13570 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13572 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13574 cf_add_libs="-lmenu$cf_cv_libtype"
13575 # Filter out duplicates - this happens with badly-designed ".pc" files...
13576 for cf_add_1lib in $LIBS
13578 for cf_add_2lib in $cf_add_libs
13580 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13586 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13588 LIBS="$cf_add_libs"
13590 cat >>confdefs.h <<EOF
13591 #define $cf_upper 1
13596 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13597 echo "$as_me:13597: checking for form_driver in -lform$cf_cv_libtype" >&5
13598 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13599 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13600 echo $ECHO_N "(cached) $ECHO_C" >&6
13602 ac_check_lib_save_LIBS=$LIBS
13603 LIBS="-lform$cf_cv_libtype $LIBS"
13604 cat >conftest.$ac_ext <<_ACEOF
13605 #line 13605 "configure"
13606 #include "confdefs.h"
13608 /* Override any gcc2 internal prototype to avoid an error. */
13612 /* We use char because int might match the return type of a gcc2
13613 builtin and then its argument prototype would still apply. */
13614 char form_driver ();
13623 rm -f conftest.$ac_objext conftest$ac_exeext
13624 if { (eval echo "$as_me:13624: \"$ac_link\"") >&5
13625 (eval $ac_link) 2>&5
13627 echo "$as_me:13627: \$? = $ac_status" >&5
13628 (exit $ac_status); } &&
13629 { ac_try='test -s conftest$ac_exeext'
13630 { (eval echo "$as_me:13630: \"$ac_try\"") >&5
13631 (eval $ac_try) 2>&5
13633 echo "$as_me:13633: \$? = $ac_status" >&5
13634 (exit $ac_status); }; }; then
13635 eval "$as_ac_Lib=yes"
13637 echo "$as_me: failed program was:" >&5
13638 cat conftest.$ac_ext >&5
13639 eval "$as_ac_Lib=no"
13641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13642 LIBS=$ac_check_lib_save_LIBS
13644 echo "$as_me:13644: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13645 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13646 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13648 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13650 cf_add_libs="-lform$cf_cv_libtype"
13651 # Filter out duplicates - this happens with badly-designed ".pc" files...
13652 for cf_add_1lib in $LIBS
13654 for cf_add_2lib in $cf_add_libs
13656 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13662 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13664 LIBS="$cf_add_libs"
13666 cat >>confdefs.h <<EOF
13667 #define $cf_upper 1
13672 # look for curses-related headers
13683 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13684 echo "$as_me:13684: checking for $ac_header" >&5
13685 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13686 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13687 echo $ECHO_N "(cached) $ECHO_C" >&6
13689 cat >conftest.$ac_ext <<_ACEOF
13690 #line 13690 "configure"
13691 #include "confdefs.h"
13692 #include <$ac_header>
13694 if { (eval echo "$as_me:13694: \"$ac_cpp conftest.$ac_ext\"") >&5
13695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13697 egrep -v '^ *\+' conftest.er1 >conftest.err
13699 cat conftest.err >&5
13700 echo "$as_me:13700: \$? = $ac_status" >&5
13701 (exit $ac_status); } >/dev/null; then
13702 if test -s conftest.err; then
13703 ac_cpp_err=$ac_c_preproc_warn_flag
13710 if test -z "$ac_cpp_err"; then
13711 eval "$as_ac_Header=yes"
13713 echo "$as_me: failed program was:" >&5
13714 cat conftest.$ac_ext >&5
13715 eval "$as_ac_Header=no"
13717 rm -f conftest.err conftest.$ac_ext
13719 echo "$as_me:13719: result: `eval echo '${'$as_ac_Header'}'`" >&5
13720 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13721 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13722 cat >>confdefs.h <<EOF
13723 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13732 echo "$as_me:13732: checking for ANSI C header files" >&5
13733 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13734 if test "${ac_cv_header_stdc+set}" = set; then
13735 echo $ECHO_N "(cached) $ECHO_C" >&6
13737 cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740 #include <stdlib.h>
13741 #include <stdarg.h>
13742 #include <string.h>
13746 if { (eval echo "$as_me:13746: \"$ac_cpp conftest.$ac_ext\"") >&5
13747 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13749 egrep -v '^ *\+' conftest.er1 >conftest.err
13751 cat conftest.err >&5
13752 echo "$as_me:13752: \$? = $ac_status" >&5
13753 (exit $ac_status); } >/dev/null; then
13754 if test -s conftest.err; then
13755 ac_cpp_err=$ac_c_preproc_warn_flag
13762 if test -z "$ac_cpp_err"; then
13763 ac_cv_header_stdc=yes
13765 echo "$as_me: failed program was:" >&5
13766 cat conftest.$ac_ext >&5
13767 ac_cv_header_stdc=no
13769 rm -f conftest.err conftest.$ac_ext
13771 if test $ac_cv_header_stdc = yes; then
13772 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13773 cat >conftest.$ac_ext <<_ACEOF
13774 #line 13774 "configure"
13775 #include "confdefs.h"
13776 #include <string.h>
13779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13780 egrep "memchr" >/dev/null 2>&1; then
13783 ac_cv_header_stdc=no
13789 if test $ac_cv_header_stdc = yes; then
13790 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13791 cat >conftest.$ac_ext <<_ACEOF
13792 #line 13792 "configure"
13793 #include "confdefs.h"
13794 #include <stdlib.h>
13797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13798 egrep "free" >/dev/null 2>&1; then
13801 ac_cv_header_stdc=no
13807 if test $ac_cv_header_stdc = yes; then
13808 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13809 if test "$cross_compiling" = yes; then
13812 cat >conftest.$ac_ext <<_ACEOF
13813 #line 13813 "configure"
13814 #include "confdefs.h"
13816 #if ((' ' & 0x0FF) == 0x020)
13817 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13818 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13820 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13821 || ('j' <= (c) && (c) <= 'r') \
13822 || ('s' <= (c) && (c) <= 'z'))
13823 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13826 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13831 for (i = 0; i < 256; i++)
13832 if (XOR (islower (i), ISLOWER (i))
13833 || toupper (i) != TOUPPER (i))
13834 $ac_main_return(2);
13835 $ac_main_return (0);
13838 rm -f conftest$ac_exeext
13839 if { (eval echo "$as_me:13839: \"$ac_link\"") >&5
13840 (eval $ac_link) 2>&5
13842 echo "$as_me:13842: \$? = $ac_status" >&5
13843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13844 { (eval echo "$as_me:13844: \"$ac_try\"") >&5
13845 (eval $ac_try) 2>&5
13847 echo "$as_me:13847: \$? = $ac_status" >&5
13848 (exit $ac_status); }; }; then
13851 echo "$as_me: program exited with status $ac_status" >&5
13852 echo "$as_me: failed program was:" >&5
13853 cat conftest.$ac_ext >&5
13854 ac_cv_header_stdc=no
13856 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13860 echo "$as_me:13860: result: $ac_cv_header_stdc" >&5
13861 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13862 if test $ac_cv_header_stdc = yes; then
13864 cat >>confdefs.h <<\EOF
13865 #define STDC_HEADERS 1
13870 echo "$as_me:13870: checking whether time.h and sys/time.h may both be included" >&5
13871 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13872 if test "${ac_cv_header_time+set}" = set; then
13873 echo $ECHO_N "(cached) $ECHO_C" >&6
13875 cat >conftest.$ac_ext <<_ACEOF
13876 #line 13876 "configure"
13877 #include "confdefs.h"
13878 #include <sys/types.h>
13879 #include <sys/time.h>
13885 if ((struct tm *) 0)
13891 rm -f conftest.$ac_objext
13892 if { (eval echo "$as_me:13892: \"$ac_compile\"") >&5
13893 (eval $ac_compile) 2>&5
13895 echo "$as_me:13895: \$? = $ac_status" >&5
13896 (exit $ac_status); } &&
13897 { ac_try='test -s conftest.$ac_objext'
13898 { (eval echo "$as_me:13898: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13901 echo "$as_me:13901: \$? = $ac_status" >&5
13902 (exit $ac_status); }; }; then
13903 ac_cv_header_time=yes
13905 echo "$as_me: failed program was:" >&5
13906 cat conftest.$ac_ext >&5
13907 ac_cv_header_time=no
13909 rm -f conftest.$ac_objext conftest.$ac_ext
13911 echo "$as_me:13911: result: $ac_cv_header_time" >&5
13912 echo "${ECHO_T}$ac_cv_header_time" >&6
13913 if test $ac_cv_header_time = yes; then
13915 cat >>confdefs.h <<\EOF
13916 #define TIME_WITH_SYS_TIME 1
13933 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13934 echo "$as_me:13934: checking for $ac_header" >&5
13935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13937 echo $ECHO_N "(cached) $ECHO_C" >&6
13939 cat >conftest.$ac_ext <<_ACEOF
13940 #line 13940 "configure"
13941 #include "confdefs.h"
13942 #include <$ac_header>
13944 if { (eval echo "$as_me:13944: \"$ac_cpp conftest.$ac_ext\"") >&5
13945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13947 egrep -v '^ *\+' conftest.er1 >conftest.err
13949 cat conftest.err >&5
13950 echo "$as_me:13950: \$? = $ac_status" >&5
13951 (exit $ac_status); } >/dev/null; then
13952 if test -s conftest.err; then
13953 ac_cpp_err=$ac_c_preproc_warn_flag
13960 if test -z "$ac_cpp_err"; then
13961 eval "$as_ac_Header=yes"
13963 echo "$as_me: failed program was:" >&5
13964 cat conftest.$ac_ext >&5
13965 eval "$as_ac_Header=no"
13967 rm -f conftest.err conftest.$ac_ext
13969 echo "$as_me:13969: result: `eval echo '${'$as_ac_Header'}'`" >&5
13970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13972 cat >>confdefs.h <<EOF
13973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13979 for ac_header in unistd.h getopt.h
13981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13982 echo "$as_me:13982: checking for $ac_header" >&5
13983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13985 echo $ECHO_N "(cached) $ECHO_C" >&6
13987 cat >conftest.$ac_ext <<_ACEOF
13988 #line 13988 "configure"
13989 #include "confdefs.h"
13990 #include <$ac_header>
13992 if { (eval echo "$as_me:13992: \"$ac_cpp conftest.$ac_ext\"") >&5
13993 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13995 egrep -v '^ *\+' conftest.er1 >conftest.err
13997 cat conftest.err >&5
13998 echo "$as_me:13998: \$? = $ac_status" >&5
13999 (exit $ac_status); } >/dev/null; then
14000 if test -s conftest.err; then
14001 ac_cpp_err=$ac_c_preproc_warn_flag
14008 if test -z "$ac_cpp_err"; then
14009 eval "$as_ac_Header=yes"
14011 echo "$as_me: failed program was:" >&5
14012 cat conftest.$ac_ext >&5
14013 eval "$as_ac_Header=no"
14015 rm -f conftest.err conftest.$ac_ext
14017 echo "$as_me:14017: result: `eval echo '${'$as_ac_Header'}'`" >&5
14018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14020 cat >>confdefs.h <<EOF
14021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14027 echo "$as_me:14027: checking for header declaring getopt variables" >&5
14028 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14029 if test "${cf_cv_getopt_header+set}" = set; then
14030 echo $ECHO_N "(cached) $ECHO_C" >&6
14033 cf_cv_getopt_header=none
14034 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14036 cat >conftest.$ac_ext <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14040 #include <$cf_header>
14044 int x = optind; char *y = optarg
14049 rm -f conftest.$ac_objext
14050 if { (eval echo "$as_me:14050: \"$ac_compile\"") >&5
14051 (eval $ac_compile) 2>&5
14053 echo "$as_me:14053: \$? = $ac_status" >&5
14054 (exit $ac_status); } &&
14055 { ac_try='test -s conftest.$ac_objext'
14056 { (eval echo "$as_me:14056: \"$ac_try\"") >&5
14057 (eval $ac_try) 2>&5
14059 echo "$as_me:14059: \$? = $ac_status" >&5
14060 (exit $ac_status); }; }; then
14061 cf_cv_getopt_header=$cf_header
14064 echo "$as_me: failed program was:" >&5
14065 cat conftest.$ac_ext >&5
14067 rm -f conftest.$ac_objext conftest.$ac_ext
14071 echo "$as_me:14071: result: $cf_cv_getopt_header" >&5
14072 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14073 if test $cf_cv_getopt_header != none ; then
14075 cat >>confdefs.h <<\EOF
14076 #define HAVE_GETOPT_HEADER 1
14080 if test $cf_cv_getopt_header = getopt.h ; then
14082 cat >>confdefs.h <<\EOF
14083 #define NEED_GETOPT_H 1
14093 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14094 echo "$as_me:14094: checking for $ac_func" >&5
14095 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14096 if eval "test \"\${$as_ac_var+set}\" = set"; then
14097 echo $ECHO_N "(cached) $ECHO_C" >&6
14099 cat >conftest.$ac_ext <<_ACEOF
14100 #line 14100 "configure"
14101 #include "confdefs.h"
14102 /* System header to define __stub macros and hopefully few prototypes,
14103 which can conflict with char $ac_func (); below. */
14104 #include <assert.h>
14105 /* Override any gcc2 internal prototype to avoid an error. */
14109 /* We use char because int might match the return type of a gcc2
14110 builtin and then its argument prototype would still apply. */
14117 /* The GNU C library defines this for functions which it implements
14118 to always fail with ENOSYS. Some functions are actually named
14119 something starting with __ and the normal name is an alias. */
14120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14123 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14130 rm -f conftest.$ac_objext conftest$ac_exeext
14131 if { (eval echo "$as_me:14131: \"$ac_link\"") >&5
14132 (eval $ac_link) 2>&5
14134 echo "$as_me:14134: \$? = $ac_status" >&5
14135 (exit $ac_status); } &&
14136 { ac_try='test -s conftest$ac_exeext'
14137 { (eval echo "$as_me:14137: \"$ac_try\"") >&5
14138 (eval $ac_try) 2>&5
14140 echo "$as_me:14140: \$? = $ac_status" >&5
14141 (exit $ac_status); }; }; then
14142 eval "$as_ac_var=yes"
14144 echo "$as_me: failed program was:" >&5
14145 cat conftest.$ac_ext >&5
14146 eval "$as_ac_var=no"
14148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14150 echo "$as_me:14150: result: `eval echo '${'$as_ac_var'}'`" >&5
14151 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14152 if test `eval echo '${'$as_ac_var'}'` = yes; then
14153 cat >>confdefs.h <<EOF
14154 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14160 if test "x$ac_cv_func_getopt" = xno; then
14161 { { echo "$as_me:14161: error: getopt is required for building programs" >&5
14162 echo "$as_me: error: getopt is required for building programs" >&2;}
14163 { (exit 1); exit 1; }; }
14166 if test "$cf_enable_widec" = yes; then
14179 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14180 echo "$as_me:14180: checking for $ac_func" >&5
14181 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14182 if eval "test \"\${$as_ac_var+set}\" = set"; then
14183 echo $ECHO_N "(cached) $ECHO_C" >&6
14185 cat >conftest.$ac_ext <<_ACEOF
14186 #line 14186 "configure"
14187 #include "confdefs.h"
14188 /* System header to define __stub macros and hopefully few prototypes,
14189 which can conflict with char $ac_func (); below. */
14190 #include <assert.h>
14191 /* Override any gcc2 internal prototype to avoid an error. */
14195 /* We use char because int might match the return type of a gcc2
14196 builtin and then its argument prototype would still apply. */
14203 /* The GNU C library defines this for functions which it implements
14204 to always fail with ENOSYS. Some functions are actually named
14205 something starting with __ and the normal name is an alias. */
14206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14209 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14216 rm -f conftest.$ac_objext conftest$ac_exeext
14217 if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218 (eval $ac_link) 2>&5
14220 echo "$as_me:14220: \$? = $ac_status" >&5
14221 (exit $ac_status); } &&
14222 { ac_try='test -s conftest$ac_exeext'
14223 { (eval echo "$as_me:14223: \"$ac_try\"") >&5
14224 (eval $ac_try) 2>&5
14226 echo "$as_me:14226: \$? = $ac_status" >&5
14227 (exit $ac_status); }; }; then
14228 eval "$as_ac_var=yes"
14230 echo "$as_me: failed program was:" >&5
14231 cat conftest.$ac_ext >&5
14232 eval "$as_ac_var=no"
14234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14236 echo "$as_me:14236: result: `eval echo '${'$as_ac_var'}'`" >&5
14237 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14238 if test `eval echo '${'$as_ac_var'}'` = yes; then
14239 cat >>confdefs.h <<EOF
14240 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14248 echo "$as_me:14248: checking definition to turn on extended curses functions" >&5
14249 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14250 if test "${cf_cv_need_xopen_extension+set}" = set; then
14251 echo $ECHO_N "(cached) $ECHO_C" >&6
14254 cf_cv_need_xopen_extension=unknown
14255 cat >conftest.$ac_ext <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14259 #include <stdlib.h>
14260 #include <${cf_cv_ncurses_header:-curses.h}>
14265 #if defined(NCURSES_VERSION_PATCH)
14266 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14270 #ifdef NCURSES_VERSION
14272 int check2 = curs_set((int)sizeof(check));
14274 long x = winnstr(stdscr, "", 0);
14276 getbegyx(stdscr, y1, x1)
14281 rm -f conftest.$ac_objext conftest$ac_exeext
14282 if { (eval echo "$as_me:14282: \"$ac_link\"") >&5
14283 (eval $ac_link) 2>&5
14285 echo "$as_me:14285: \$? = $ac_status" >&5
14286 (exit $ac_status); } &&
14287 { ac_try='test -s conftest$ac_exeext'
14288 { (eval echo "$as_me:14288: \"$ac_try\"") >&5
14289 (eval $ac_try) 2>&5
14291 echo "$as_me:14291: \$? = $ac_status" >&5
14292 (exit $ac_status); }; }; then
14293 cf_cv_need_xopen_extension=none
14295 echo "$as_me: failed program was:" >&5
14296 cat conftest.$ac_ext >&5
14298 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14300 cat >conftest.$ac_ext <<_ACEOF
14301 #line 14301 "configure"
14302 #include "confdefs.h"
14304 #define $cf_try_xopen_extension 1
14305 #include <stdlib.h>
14306 #include <${cf_cv_ncurses_header:-curses.h}>
14311 #ifdef NCURSES_VERSION
14313 int check2 = curs_set((int)sizeof(check));
14315 long x = winnstr(stdscr, "", 0);
14317 getbegyx(stdscr, y1, x1)
14322 rm -f conftest.$ac_objext conftest$ac_exeext
14323 if { (eval echo "$as_me:14323: \"$ac_link\"") >&5
14324 (eval $ac_link) 2>&5
14326 echo "$as_me:14326: \$? = $ac_status" >&5
14327 (exit $ac_status); } &&
14328 { ac_try='test -s conftest$ac_exeext'
14329 { (eval echo "$as_me:14329: \"$ac_try\"") >&5
14330 (eval $ac_try) 2>&5
14332 echo "$as_me:14332: \$? = $ac_status" >&5
14333 (exit $ac_status); }; }; then
14334 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14336 echo "$as_me: failed program was:" >&5
14337 cat conftest.$ac_ext >&5
14339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14346 echo "$as_me:14346: result: $cf_cv_need_xopen_extension" >&5
14347 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14349 case $cf_cv_need_xopen_extension in
14351 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14355 echo "$as_me:14355: checking for term.h" >&5
14356 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14357 if test "${cf_cv_term_header+set}" = set; then
14358 echo $ECHO_N "(cached) $ECHO_C" >&6
14361 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14362 # for <term.h> if we do not find the variant.
14364 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14366 case ${cf_cv_ncurses_header:-curses.h} in
14368 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14369 cf_header_list="$cf_header_item $cf_header_list"
14373 for cf_header in $cf_header_list
14375 cat >conftest.$ac_ext <<_ACEOF
14376 #line 14376 "configure"
14377 #include "confdefs.h"
14379 #include <${cf_cv_ncurses_header:-curses.h}>
14380 #include <${cf_header}>
14389 rm -f conftest.$ac_objext
14390 if { (eval echo "$as_me:14390: \"$ac_compile\"") >&5
14391 (eval $ac_compile) 2>&5
14393 echo "$as_me:14393: \$? = $ac_status" >&5
14394 (exit $ac_status); } &&
14395 { ac_try='test -s conftest.$ac_objext'
14396 { (eval echo "$as_me:14396: \"$ac_try\"") >&5
14397 (eval $ac_try) 2>&5
14399 echo "$as_me:14399: \$? = $ac_status" >&5
14400 (exit $ac_status); }; }; then
14401 cf_cv_term_header=$cf_header
14404 echo "$as_me: failed program was:" >&5
14405 cat conftest.$ac_ext >&5
14406 cf_cv_term_header=no
14408 rm -f conftest.$ac_objext conftest.$ac_ext
14411 case $cf_cv_term_header in
14413 # If curses is ncurses, some packagers still mess it up by trying to make
14414 # us use GNU termcap. This handles the most common case.
14415 for cf_header in ncurses/term.h ncursesw/term.h
14417 cat >conftest.$ac_ext <<_ACEOF
14418 #line 14418 "configure"
14419 #include "confdefs.h"
14421 #include <${cf_cv_ncurses_header:-curses.h}>
14422 #ifdef NCURSES_VERSION
14423 #include <${cf_header}>
14435 rm -f conftest.$ac_objext
14436 if { (eval echo "$as_me:14436: \"$ac_compile\"") >&5
14437 (eval $ac_compile) 2>&5
14439 echo "$as_me:14439: \$? = $ac_status" >&5
14440 (exit $ac_status); } &&
14441 { ac_try='test -s conftest.$ac_objext'
14442 { (eval echo "$as_me:14442: \"$ac_try\"") >&5
14443 (eval $ac_try) 2>&5
14445 echo "$as_me:14445: \$? = $ac_status" >&5
14446 (exit $ac_status); }; }; then
14447 cf_cv_term_header=$cf_header
14450 echo "$as_me: failed program was:" >&5
14451 cat conftest.$ac_ext >&5
14452 cf_cv_term_header=no
14454 rm -f conftest.$ac_objext conftest.$ac_ext
14460 echo "$as_me:14460: result: $cf_cv_term_header" >&5
14461 echo "${ECHO_T}$cf_cv_term_header" >&6
14463 case $cf_cv_term_header in
14466 cat >>confdefs.h <<\EOF
14467 #define HAVE_TERM_H 1
14473 cat >>confdefs.h <<\EOF
14474 #define HAVE_NCURSES_TERM_H 1
14480 cat >>confdefs.h <<\EOF
14481 #define HAVE_NCURSESW_TERM_H 1
14487 echo "$as_me:14487: checking for unctrl.h" >&5
14488 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14489 if test "${cf_cv_unctrl_header+set}" = set; then
14490 echo $ECHO_N "(cached) $ECHO_C" >&6
14493 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14494 # for <unctrl.h> if we do not find the variant.
14496 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14498 case ${cf_cv_ncurses_header:-curses.h} in
14500 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14501 cf_header_list="$cf_header_item $cf_header_list"
14505 for cf_header in $cf_header_list
14507 cat >conftest.$ac_ext <<_ACEOF
14508 #line 14508 "configure"
14509 #include "confdefs.h"
14511 #include <${cf_cv_ncurses_header:-curses.h}>
14512 #include <${cf_header}>
14521 rm -f conftest.$ac_objext
14522 if { (eval echo "$as_me:14522: \"$ac_compile\"") >&5
14523 (eval $ac_compile) 2>&5
14525 echo "$as_me:14525: \$? = $ac_status" >&5
14526 (exit $ac_status); } &&
14527 { ac_try='test -s conftest.$ac_objext'
14528 { (eval echo "$as_me:14528: \"$ac_try\"") >&5
14529 (eval $ac_try) 2>&5
14531 echo "$as_me:14531: \$? = $ac_status" >&5
14532 (exit $ac_status); }; }; then
14533 cf_cv_unctrl_header=$cf_header
14536 echo "$as_me: failed program was:" >&5
14537 cat conftest.$ac_ext >&5
14538 cf_cv_unctrl_header=no
14540 rm -f conftest.$ac_objext conftest.$ac_ext
14544 echo "$as_me:14544: result: $cf_cv_unctrl_header" >&5
14545 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14547 case $cf_cv_unctrl_header in
14549 { echo "$as_me:14549: WARNING: unctrl.h header not found" >&5
14550 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14554 case $cf_cv_unctrl_header in
14557 cat >>confdefs.h <<\EOF
14558 #define HAVE_UNCTRL_H 1
14564 cat >>confdefs.h <<\EOF
14565 #define HAVE_NCURSES_UNCTRL_H 1
14569 (ncursesw/unctrl.h)
14571 cat >>confdefs.h <<\EOF
14572 #define HAVE_NCURSESW_UNCTRL_H 1
14579 assume_default_colors \
14606 use_default_colors \
14608 use_extended_names \
14622 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14624 echo "$as_me:14624: checking for ${cf_func}" >&5
14625 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14627 echo "${as_me:-configure}:14627: testing ${cf_func} ..." 1>&5
14629 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
14633 eval cf_result='$ac_cv_func_'$cf_func
14634 if test ".$cf_result" != ".no"; then
14635 cat >conftest.$ac_ext <<_ACEOF
14636 #line 14636 "configure"
14637 #include "confdefs.h"
14639 #ifdef HAVE_XCURSES
14640 #include <xcurses.h>
14641 char * XCursesProgramName = "test";
14643 #include <${cf_cv_ncurses_header:-curses.h}>
14644 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14645 #include <ncursesw/term.h>
14646 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14647 #include <ncurses/term.h>
14648 #elif defined(HAVE_TERM_H)
14658 long foo = (long)(&${cf_func});
14659 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14660 if (foo + 1234 > 5678)
14661 ${cf_cv_main_return:-return}(foo);
14668 rm -f conftest.$ac_objext conftest$ac_exeext
14669 if { (eval echo "$as_me:14669: \"$ac_link\"") >&5
14670 (eval $ac_link) 2>&5
14672 echo "$as_me:14672: \$? = $ac_status" >&5
14673 (exit $ac_status); } &&
14674 { ac_try='test -s conftest$ac_exeext'
14675 { (eval echo "$as_me:14675: \"$ac_try\"") >&5
14676 (eval $ac_try) 2>&5
14678 echo "$as_me:14678: \$? = $ac_status" >&5
14679 (exit $ac_status); }; }; then
14682 echo "$as_me: failed program was:" >&5
14683 cat conftest.$ac_ext >&5
14686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14688 eval 'cf_cv_func_'$cf_func'=$cf_result'
14692 # use the computed/retrieved cache-value:
14693 eval 'cf_result=$cf_cv_func_'$cf_func
14694 echo "$as_me:14694: result: $cf_result" >&5
14695 echo "${ECHO_T}$cf_result" >&6
14696 if test $cf_result != no; then
14697 cat >>confdefs.h <<EOF
14698 #define HAVE_${cf_tr_func} 1
14704 for cf_func in tputs
14707 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14709 echo "$as_me:14709: checking for ${cf_func}" >&5
14710 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14712 echo "${as_me:-configure}:14712: testing ${cf_func} ..." 1>&5
14714 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14715 echo $ECHO_N "(cached) $ECHO_C" >&6
14718 eval cf_result='$ac_cv_func_'$cf_func
14719 if test ".$cf_result" != ".no"; then
14720 cat >conftest.$ac_ext <<_ACEOF
14721 #line 14721 "configure"
14722 #include "confdefs.h"
14724 #ifdef HAVE_XCURSES
14725 #include <xcurses.h>
14726 char * XCursesProgramName = "test";
14728 #include <${cf_cv_ncurses_header:-curses.h}>
14729 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14730 #include <ncursesw/term.h>
14731 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14732 #include <ncurses/term.h>
14733 #elif defined(HAVE_TERM_H)
14743 long foo = (long)(&${cf_func});
14744 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14745 if (foo + 1234 > 5678)
14746 ${cf_cv_main_return:-return}(foo);
14753 rm -f conftest.$ac_objext conftest$ac_exeext
14754 if { (eval echo "$as_me:14754: \"$ac_link\"") >&5
14755 (eval $ac_link) 2>&5
14757 echo "$as_me:14757: \$? = $ac_status" >&5
14758 (exit $ac_status); } &&
14759 { ac_try='test -s conftest$ac_exeext'
14760 { (eval echo "$as_me:14760: \"$ac_try\"") >&5
14761 (eval $ac_try) 2>&5
14763 echo "$as_me:14763: \$? = $ac_status" >&5
14764 (exit $ac_status); }; }; then
14767 echo "$as_me: failed program was:" >&5
14768 cat conftest.$ac_ext >&5
14771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14773 eval 'cf_cv_func_'$cf_func'=$cf_result'
14777 # use the computed/retrieved cache-value:
14778 eval 'cf_result=$cf_cv_func_'$cf_func
14779 echo "$as_me:14779: result: $cf_result" >&5
14780 echo "${ECHO_T}$cf_result" >&6
14781 if test $cf_result != no; then
14782 cat >>confdefs.h <<EOF
14783 #define HAVE_${cf_tr_func} 1
14789 if test x$cf_cv_func_tputs = xyes
14792 for cf_arg in int char
14794 for cf_ret in int void
14796 if test $cf_ret = void
14798 cf_return="/* nothing */"
14800 cf_return="return value"
14802 cat >conftest.$ac_ext <<_ACEOF
14803 #line 14803 "configure"
14804 #include "confdefs.h"
14806 #include <${cf_cv_ncurses_header:-curses.h}>
14807 #include <$cf_cv_term_header>
14809 static $cf_ret outc($cf_arg value) { $cf_return; }
14815 tputs("hello", 0, outc);
14816 ${cf_cv_main_return:-return}(0);
14822 rm -f conftest.$ac_objext
14823 if { (eval echo "$as_me:14823: \"$ac_compile\"") >&5
14824 (eval $ac_compile) 2>&5
14826 echo "$as_me:14826: \$? = $ac_status" >&5
14827 (exit $ac_status); } &&
14828 { ac_try='test -s conftest.$ac_objext'
14829 { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830 (eval $ac_try) 2>&5
14832 echo "$as_me:14832: \$? = $ac_status" >&5
14833 (exit $ac_status); }; }; then
14835 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14837 echo "${as_me:-configure}:14837: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14839 cat >>confdefs.h <<EOF
14840 #define TPUTS_ARG $cf_arg
14841 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14842 #define TPUTS_RETURN(value) $cf_return
14848 echo "$as_me: failed program was:" >&5
14849 cat conftest.$ac_ext >&5
14851 rm -f conftest.$ac_objext conftest.$ac_ext
14853 test $cf_done = yes && break
14857 echo "$as_me:14857: checking for ncurses extended functions" >&5
14858 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14859 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14860 echo $ECHO_N "(cached) $ECHO_C" >&6
14863 cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14867 #include <${cf_cv_ncurses_header:-curses.h}>
14872 int x = NCURSES_EXT_FUNCS
14878 rm -f conftest.$ac_objext
14879 if { (eval echo "$as_me:14879: \"$ac_compile\"") >&5
14880 (eval $ac_compile) 2>&5
14882 echo "$as_me:14882: \$? = $ac_status" >&5
14883 (exit $ac_status); } &&
14884 { ac_try='test -s conftest.$ac_objext'
14885 { (eval echo "$as_me:14885: \"$ac_try\"") >&5
14886 (eval $ac_try) 2>&5
14888 echo "$as_me:14888: \$? = $ac_status" >&5
14889 (exit $ac_status); }; }; then
14890 cf_cv_ncurses_ext_funcs=defined
14892 echo "$as_me: failed program was:" >&5
14893 cat conftest.$ac_ext >&5
14895 cat >conftest.$ac_ext <<_ACEOF
14896 #line 14896 "configure"
14897 #include "confdefs.h"
14899 #include <${cf_cv_ncurses_header:-curses.h}>
14904 (void) assume_default_colors (0, 0);
14905 (void) curses_version ();
14906 (void) define_key (0, 0);
14907 (void) is_term_resized (0, 0);
14908 (void) key_defined (0);
14909 (void) keybound (0, 0);
14910 (void) keyok (0, 0);
14911 (void) resize_term (0, 0);
14912 (void) resizeterm (0, 0);
14913 (void) use_default_colors ();
14914 (void) use_extended_names (0);
14915 (void) wresize (0, 0, 0);
14920 rm -f conftest.$ac_objext conftest$ac_exeext
14921 if { (eval echo "$as_me:14921: \"$ac_link\"") >&5
14922 (eval $ac_link) 2>&5
14924 echo "$as_me:14924: \$? = $ac_status" >&5
14925 (exit $ac_status); } &&
14926 { ac_try='test -s conftest$ac_exeext'
14927 { (eval echo "$as_me:14927: \"$ac_try\"") >&5
14928 (eval $ac_try) 2>&5
14930 echo "$as_me:14930: \$? = $ac_status" >&5
14931 (exit $ac_status); }; }; then
14932 cf_cv_ncurses_ext_funcs=yes
14934 echo "$as_me: failed program was:" >&5
14935 cat conftest.$ac_ext >&5
14936 cf_cv_ncurses_ext_funcs=no
14938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14941 rm -f conftest.$ac_objext conftest.$ac_ext
14944 echo "$as_me:14944: result: $cf_cv_ncurses_ext_funcs" >&5
14945 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14946 test "$cf_cv_ncurses_ext_funcs" = yes &&
14947 cat >>confdefs.h <<\EOF
14948 #define NCURSES_EXT_FUNCS 1
14951 if test "$cf_enable_widec" = yes
14953 # workaround for systems with ncurses before 20111029, due to change of
14954 # feature test macro from _XPG5 to _XOPEN_SOURCE
14955 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14958 echo "$as_me:14958: checking if _XPG5 should be defined to enable wide-characters" >&5
14959 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14961 cat >conftest.$ac_ext <<_ACEOF
14962 #line 14962 "configure"
14963 #include "confdefs.h"
14965 #include <${cf_cv_ncurses_header:-curses.h}>
14974 rm -f conftest.$ac_objext
14975 if { (eval echo "$as_me:14975: \"$ac_compile\"") >&5
14976 (eval $ac_compile) 2>&5
14978 echo "$as_me:14978: \$? = $ac_status" >&5
14979 (exit $ac_status); } &&
14980 { ac_try='test -s conftest.$ac_objext'
14981 { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982 (eval $ac_try) 2>&5
14984 echo "$as_me:14984: \$? = $ac_status" >&5
14985 (exit $ac_status); }; }; then
14988 echo "$as_me: failed program was:" >&5
14989 cat conftest.$ac_ext >&5
14990 cf_save_cppflags="$CPPFLAGS"
14991 CPPFLAGS="$CPPFLAGS -D_XPG5"
14992 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14996 #include <${cf_cv_ncurses_header:-curses.h}>
15005 rm -f conftest.$ac_objext
15006 if { (eval echo "$as_me:15006: \"$ac_compile\"") >&5
15007 (eval $ac_compile) 2>&5
15009 echo "$as_me:15009: \$? = $ac_status" >&5
15010 (exit $ac_status); } &&
15011 { ac_try='test -s conftest.$ac_objext'
15012 { (eval echo "$as_me:15012: \"$ac_try\"") >&5
15013 (eval $ac_try) 2>&5
15015 echo "$as_me:15015: \$? = $ac_status" >&5
15016 (exit $ac_status); }; }; then
15019 echo "$as_me: failed program was:" >&5
15020 cat conftest.$ac_ext >&5
15022 rm -f conftest.$ac_objext conftest.$ac_ext
15023 CPPFLAGS="$cf_save_cppflags"
15025 rm -f conftest.$ac_objext conftest.$ac_ext
15026 echo "$as_me:15026: result: $cf_define_xpg5" >&5
15027 echo "${ECHO_T}$cf_define_xpg5" >&6
15029 if test "$cf_define_xpg5" = yes
15031 CPPFLAGS="$CPPFLAGS -D_XPG5"
15035 echo "$as_me:15035: checking for wide-character functions" >&5
15036 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
15037 if test "${cf_cv_widechar_funcs+set}" = set; then
15038 echo $ECHO_N "(cached) $ECHO_C" >&6
15041 cat >conftest.$ac_ext <<_ACEOF
15042 #line 15042 "configure"
15043 #include "confdefs.h"
15045 #include <${cf_cv_ncurses_header:-curses.h}>
15050 static wchar_t src_wchar[2];
15051 static cchar_t dst_cchar;
15052 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060 (eval $ac_link) 2>&5
15062 echo "$as_me:15062: \$? = $ac_status" >&5
15063 (exit $ac_status); } &&
15064 { ac_try='test -s conftest$ac_exeext'
15065 { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066 (eval $ac_try) 2>&5
15068 echo "$as_me:15068: \$? = $ac_status" >&5
15069 (exit $ac_status); }; }; then
15070 cf_cv_widechar_funcs=yes
15072 echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15074 cf_cv_widechar_funcs=no
15076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15079 echo "$as_me:15079: result: $cf_cv_widechar_funcs" >&5
15080 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15081 if test "$cf_cv_widechar_funcs" != no ; then
15083 cat >>confdefs.h <<\EOF
15084 #define USE_WIDEC_SUPPORT 1
15088 cat >>confdefs.h <<\EOF
15089 #define USE_WIDEC_SUPPORT 0
15094 cat >>confdefs.h <<\EOF
15095 #define USE_WIDEC_SUPPORT 0
15100 echo "$as_me:15100: checking if $cf_cv_screen library uses pthreads" >&5
15101 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15102 if test "${cf_cv_use_pthreads+set}" = set; then
15103 echo $ECHO_N "(cached) $ECHO_C" >&6
15106 cat >conftest.$ac_ext <<_ACEOF
15107 #line 15107 "configure"
15108 #include "confdefs.h"
15110 #include <${cf_cv_ncurses_header:-curses.h}>
15111 extern void _nc_init_pthreads(void);
15118 _nc_init_pthreads();
15124 rm -f conftest.$ac_objext conftest$ac_exeext
15125 if { (eval echo "$as_me:15125: \"$ac_link\"") >&5
15126 (eval $ac_link) 2>&5
15128 echo "$as_me:15128: \$? = $ac_status" >&5
15129 (exit $ac_status); } &&
15130 { ac_try='test -s conftest$ac_exeext'
15131 { (eval echo "$as_me:15131: \"$ac_try\"") >&5
15132 (eval $ac_try) 2>&5
15134 echo "$as_me:15134: \$? = $ac_status" >&5
15135 (exit $ac_status); }; }; then
15136 cf_cv_use_pthreads=yes
15138 echo "$as_me: failed program was:" >&5
15139 cat conftest.$ac_ext >&5
15140 cf_cv_use_pthreads=no
15142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15145 echo "$as_me:15145: result: $cf_cv_use_pthreads" >&5
15146 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15147 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15148 #define USE_PTHREADS 1
15151 echo "$as_me:15151: checking if sys/time.h works with sys/select.h" >&5
15152 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15153 if test "${cf_cv_sys_time_select+set}" = set; then
15154 echo $ECHO_N "(cached) $ECHO_C" >&6
15157 cat >conftest.$ac_ext <<_ACEOF
15158 #line 15158 "configure"
15159 #include "confdefs.h"
15161 #include <sys/types.h>
15162 #ifdef HAVE_SYS_TIME_H
15163 #include <sys/time.h>
15165 #ifdef HAVE_SYS_SELECT_H
15166 #include <sys/select.h>
15177 rm -f conftest.$ac_objext
15178 if { (eval echo "$as_me:15178: \"$ac_compile\"") >&5
15179 (eval $ac_compile) 2>&5
15181 echo "$as_me:15181: \$? = $ac_status" >&5
15182 (exit $ac_status); } &&
15183 { ac_try='test -s conftest.$ac_objext'
15184 { (eval echo "$as_me:15184: \"$ac_try\"") >&5
15185 (eval $ac_try) 2>&5
15187 echo "$as_me:15187: \$? = $ac_status" >&5
15188 (exit $ac_status); }; }; then
15189 cf_cv_sys_time_select=yes
15191 echo "$as_me: failed program was:" >&5
15192 cat conftest.$ac_ext >&5
15193 cf_cv_sys_time_select=no
15195 rm -f conftest.$ac_objext conftest.$ac_ext
15199 echo "$as_me:15199: result: $cf_cv_sys_time_select" >&5
15200 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15201 test "$cf_cv_sys_time_select" = yes &&
15202 cat >>confdefs.h <<\EOF
15203 #define HAVE_SYS_TIME_SELECT 1
15206 # special check for test/ditto.c
15208 echo "$as_me:15208: checking for openpty in -lutil" >&5
15209 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15210 if test "${ac_cv_lib_util_openpty+set}" = set; then
15211 echo $ECHO_N "(cached) $ECHO_C" >&6
15213 ac_check_lib_save_LIBS=$LIBS
15214 LIBS="-lutil $LIBS"
15215 cat >conftest.$ac_ext <<_ACEOF
15216 #line 15216 "configure"
15217 #include "confdefs.h"
15219 /* Override any gcc2 internal prototype to avoid an error. */
15223 /* We use char because int might match the return type of a gcc2
15224 builtin and then its argument prototype would still apply. */
15234 rm -f conftest.$ac_objext conftest$ac_exeext
15235 if { (eval echo "$as_me:15235: \"$ac_link\"") >&5
15236 (eval $ac_link) 2>&5
15238 echo "$as_me:15238: \$? = $ac_status" >&5
15239 (exit $ac_status); } &&
15240 { ac_try='test -s conftest$ac_exeext'
15241 { (eval echo "$as_me:15241: \"$ac_try\"") >&5
15242 (eval $ac_try) 2>&5
15244 echo "$as_me:15244: \$? = $ac_status" >&5
15245 (exit $ac_status); }; }; then
15246 ac_cv_lib_util_openpty=yes
15248 echo "$as_me: failed program was:" >&5
15249 cat conftest.$ac_ext >&5
15250 ac_cv_lib_util_openpty=no
15252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15253 LIBS=$ac_check_lib_save_LIBS
15255 echo "$as_me:15255: result: $ac_cv_lib_util_openpty" >&5
15256 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15257 if test $ac_cv_lib_util_openpty = yes; then
15263 echo "$as_me:15263: checking for openpty header" >&5
15264 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15265 if test "${cf_cv_func_openpty+set}" = set; then
15266 echo $ECHO_N "(cached) $ECHO_C" >&6
15269 cf_save_LIBS="$LIBS"
15270 test $cf_cv_lib_util = yes && {
15271 cf_add_libs="-lutil"
15272 # Filter out duplicates - this happens with badly-designed ".pc" files...
15273 for cf_add_1lib in $LIBS
15275 for cf_add_2lib in $cf_add_libs
15277 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15283 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15285 LIBS="$cf_add_libs"
15287 for cf_header in pty.h libutil.h util.h
15289 cat >conftest.$ac_ext <<_ACEOF
15290 #line 15290 "configure"
15291 #include "confdefs.h"
15293 #include <$cf_header>
15299 int x = openpty((int *)0, (int *)0, (char *)0,
15300 (struct termios *)0, (struct winsize *)0);
15306 rm -f conftest.$ac_objext conftest$ac_exeext
15307 if { (eval echo "$as_me:15307: \"$ac_link\"") >&5
15308 (eval $ac_link) 2>&5
15310 echo "$as_me:15310: \$? = $ac_status" >&5
15311 (exit $ac_status); } &&
15312 { ac_try='test -s conftest$ac_exeext'
15313 { (eval echo "$as_me:15313: \"$ac_try\"") >&5
15314 (eval $ac_try) 2>&5
15316 echo "$as_me:15316: \$? = $ac_status" >&5
15317 (exit $ac_status); }; }; then
15319 cf_cv_func_openpty=$cf_header
15323 echo "$as_me: failed program was:" >&5
15324 cat conftest.$ac_ext >&5
15326 cf_cv_func_openpty=no
15329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15331 LIBS="$cf_save_LIBS"
15334 echo "$as_me:15334: result: $cf_cv_func_openpty" >&5
15335 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15337 if test "$cf_cv_func_openpty" != no ; then
15339 cat >>confdefs.h <<EOF
15340 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15343 cat >>confdefs.h <<\EOF
15344 #define USE_XTERM_PTY 1
15347 if test "x$cf_cv_lib_util" = xyes ; then
15349 cf_add_libs="-lutil"
15350 # Filter out duplicates - this happens with badly-designed ".pc" files...
15351 for cf_add_1lib in $TEST_LIBS
15353 for cf_add_2lib in $cf_add_libs
15355 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15361 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15363 TEST_LIBS="$cf_add_libs"
15368 echo "$as_me:15368: checking for function curses_version" >&5
15369 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15370 if test "${cf_cv_func_curses_version+set}" = set; then
15371 echo $ECHO_N "(cached) $ECHO_C" >&6
15374 if test "$cross_compiling" = yes; then
15375 cf_cv_func_curses_version=unknown
15377 cat >conftest.$ac_ext <<_ACEOF
15378 #line 15378 "configure"
15379 #include "confdefs.h"
15381 #include <${cf_cv_ncurses_header:-curses.h}>
15385 sprintf(temp, "%s\n", curses_version());
15386 ${cf_cv_main_return:-return}(0);
15390 rm -f conftest$ac_exeext
15391 if { (eval echo "$as_me:15391: \"$ac_link\"") >&5
15392 (eval $ac_link) 2>&5
15394 echo "$as_me:15394: \$? = $ac_status" >&5
15395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15396 { (eval echo "$as_me:15396: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15399 echo "$as_me:15399: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
15401 cf_cv_func_curses_version=yes
15404 echo "$as_me: program exited with status $ac_status" >&5
15405 echo "$as_me: failed program was:" >&5
15406 cat conftest.$ac_ext >&5
15407 cf_cv_func_curses_version=no
15410 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15414 echo "$as_me:15414: result: $cf_cv_func_curses_version" >&5
15415 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15416 test "$cf_cv_func_curses_version" = yes &&
15417 cat >>confdefs.h <<\EOF
15418 #define HAVE_CURSES_VERSION 1
15421 echo "$as_me:15421: checking for alternate character set array" >&5
15422 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15423 if test "${cf_cv_curses_acs_map+set}" = set; then
15424 echo $ECHO_N "(cached) $ECHO_C" >&6
15427 cf_cv_curses_acs_map=unknown
15428 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15430 cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15434 #include <${cf_cv_ncurses_header:-curses.h}>
15440 $name['k'] = ACS_PLUS
15446 rm -f conftest.$ac_objext conftest$ac_exeext
15447 if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15448 (eval $ac_link) 2>&5
15450 echo "$as_me:15450: \$? = $ac_status" >&5
15451 (exit $ac_status); } &&
15452 { ac_try='test -s conftest$ac_exeext'
15453 { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454 (eval $ac_try) 2>&5
15456 echo "$as_me:15456: \$? = $ac_status" >&5
15457 (exit $ac_status); }; }; then
15458 cf_cv_curses_acs_map=$name; break
15460 echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15467 echo "$as_me:15467: result: $cf_cv_curses_acs_map" >&5
15468 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15470 test "$cf_cv_curses_acs_map" != unknown &&
15471 cat >>confdefs.h <<EOF
15472 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15475 if test "$cf_enable_widec" = yes; then
15477 echo "$as_me:15477: checking for wide alternate character set array" >&5
15478 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15479 if test "${cf_cv_curses_wacs_map+set}" = set; then
15480 echo $ECHO_N "(cached) $ECHO_C" >&6
15483 cf_cv_curses_wacs_map=unknown
15484 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15486 cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15490 #ifndef _XOPEN_SOURCE_EXTENDED
15491 #define _XOPEN_SOURCE_EXTENDED
15493 #include <${cf_cv_ncurses_header:-curses.h}>
15497 void *foo = &($name['k'])
15502 rm -f conftest.$ac_objext conftest$ac_exeext
15503 if { (eval echo "$as_me:15503: \"$ac_link\"") >&5
15504 (eval $ac_link) 2>&5
15506 echo "$as_me:15506: \$? = $ac_status" >&5
15507 (exit $ac_status); } &&
15508 { ac_try='test -s conftest$ac_exeext'
15509 { (eval echo "$as_me:15509: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15512 echo "$as_me:15512: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
15514 cf_cv_curses_wacs_map=$name
15517 echo "$as_me: failed program was:" >&5
15518 cat conftest.$ac_ext >&5
15520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15523 echo "$as_me:15523: result: $cf_cv_curses_wacs_map" >&5
15524 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15526 test "$cf_cv_curses_wacs_map" != unknown &&
15527 cat >>confdefs.h <<EOF
15528 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15531 echo "$as_me:15531: checking for wide alternate character constants" >&5
15532 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15533 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15534 echo $ECHO_N "(cached) $ECHO_C" >&6
15537 cf_cv_curses_wacs_symbols=no
15538 if test "$cf_cv_curses_wacs_map" != unknown
15540 cat >conftest.$ac_ext <<_ACEOF
15541 #line 15541 "configure"
15542 #include "confdefs.h"
15544 #ifndef _XOPEN_SOURCE_EXTENDED
15545 #define _XOPEN_SOURCE_EXTENDED
15547 #include <${cf_cv_ncurses_header:-curses.h}>
15551 cchar_t *foo = WACS_PLUS;
15552 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15557 rm -f conftest.$ac_objext conftest$ac_exeext
15558 if { (eval echo "$as_me:15558: \"$ac_link\"") >&5
15559 (eval $ac_link) 2>&5
15561 echo "$as_me:15561: \$? = $ac_status" >&5
15562 (exit $ac_status); } &&
15563 { ac_try='test -s conftest$ac_exeext'
15564 { (eval echo "$as_me:15564: \"$ac_try\"") >&5
15565 (eval $ac_try) 2>&5
15567 echo "$as_me:15567: \$? = $ac_status" >&5
15568 (exit $ac_status); }; }; then
15569 cf_cv_curses_wacs_symbols=yes
15571 echo "$as_me: failed program was:" >&5
15572 cat conftest.$ac_ext >&5
15574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15576 cat >conftest.$ac_ext <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15580 #ifndef _XOPEN_SOURCE_EXTENDED
15581 #define _XOPEN_SOURCE_EXTENDED
15583 #include <${cf_cv_ncurses_header:-curses.h}>
15587 cchar_t *foo = WACS_PLUS
15592 rm -f conftest.$ac_objext conftest$ac_exeext
15593 if { (eval echo "$as_me:15593: \"$ac_link\"") >&5
15594 (eval $ac_link) 2>&5
15596 echo "$as_me:15596: \$? = $ac_status" >&5
15597 (exit $ac_status); } &&
15598 { ac_try='test -s conftest$ac_exeext'
15599 { (eval echo "$as_me:15599: \"$ac_try\"") >&5
15600 (eval $ac_try) 2>&5
15602 echo "$as_me:15602: \$? = $ac_status" >&5
15603 (exit $ac_status); }; }; then
15604 cf_cv_curses_wacs_symbols=yes
15606 echo "$as_me: failed program was:" >&5
15607 cat conftest.$ac_ext >&5
15609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15613 echo "$as_me:15613: result: $cf_cv_curses_wacs_symbols" >&5
15614 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15616 test "$cf_cv_curses_wacs_symbols" != no &&
15617 cat >>confdefs.h <<\EOF
15618 #define CURSES_WACS_SYMBOLS 1
15623 echo "$as_me:15623: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15624 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15625 cat >conftest.$ac_ext <<_ACEOF
15626 #line 15626 "configure"
15627 #include "confdefs.h"
15629 #ifndef _XOPEN_SOURCE_EXTENDED
15630 #define _XOPEN_SOURCE_EXTENDED
15632 #include <${cf_cv_ncurses_header:-curses.h}>
15643 rm -f conftest.$ac_objext
15644 if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
15645 (eval $ac_compile) 2>&5
15647 echo "$as_me:15647: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -s conftest.$ac_objext'
15650 { (eval echo "$as_me:15650: \"$ac_try\"") >&5
15651 (eval $ac_try) 2>&5
15653 echo "$as_me:15653: \$? = $ac_status" >&5
15654 (exit $ac_status); }; }; then
15657 echo "$as_me: failed program was:" >&5
15658 cat conftest.$ac_ext >&5
15661 rm -f conftest.$ac_objext conftest.$ac_ext
15662 echo "$as_me:15662: result: $cf_result" >&5
15663 echo "${ECHO_T}$cf_result" >&6
15664 if test $cf_result = yes ; then
15666 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15668 cat >>confdefs.h <<EOF
15669 #define $cf_result 1
15674 cat >>confdefs.h <<EOF
15675 #define attr_t long
15680 if test "$cf_enable_widec" = yes; then
15682 # This is needed on Tru64 5.0 to declare mbstate_t
15683 echo "$as_me:15683: checking if we must include wchar.h to declare mbstate_t" >&5
15684 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15685 if test "${cf_cv_mbstate_t+set}" = set; then
15686 echo $ECHO_N "(cached) $ECHO_C" >&6
15689 cat >conftest.$ac_ext <<_ACEOF
15690 #line 15690 "configure"
15691 #include "confdefs.h"
15693 #include <stdlib.h>
15694 #include <stdarg.h>
15696 #ifdef HAVE_LIBUTF8_H
15697 #include <libutf8.h>
15707 rm -f conftest.$ac_objext
15708 if { (eval echo "$as_me:15708: \"$ac_compile\"") >&5
15709 (eval $ac_compile) 2>&5
15711 echo "$as_me:15711: \$? = $ac_status" >&5
15712 (exit $ac_status); } &&
15713 { ac_try='test -s conftest.$ac_objext'
15714 { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715 (eval $ac_try) 2>&5
15717 echo "$as_me:15717: \$? = $ac_status" >&5
15718 (exit $ac_status); }; }; then
15721 echo "$as_me: failed program was:" >&5
15722 cat conftest.$ac_ext >&5
15723 cat >conftest.$ac_ext <<_ACEOF
15724 #line 15724 "configure"
15725 #include "confdefs.h"
15727 #include <stdlib.h>
15728 #include <stdarg.h>
15731 #ifdef HAVE_LIBUTF8_H
15732 #include <libutf8.h>
15742 rm -f conftest.$ac_objext
15743 if { (eval echo "$as_me:15743: \"$ac_compile\"") >&5
15744 (eval $ac_compile) 2>&5
15746 echo "$as_me:15746: \$? = $ac_status" >&5
15747 (exit $ac_status); } &&
15748 { ac_try='test -s conftest.$ac_objext'
15749 { (eval echo "$as_me:15749: \"$ac_try\"") >&5
15750 (eval $ac_try) 2>&5
15752 echo "$as_me:15752: \$? = $ac_status" >&5
15753 (exit $ac_status); }; }; then
15754 cf_cv_mbstate_t=yes
15756 echo "$as_me: failed program was:" >&5
15757 cat conftest.$ac_ext >&5
15758 cf_cv_mbstate_t=unknown
15760 rm -f conftest.$ac_objext conftest.$ac_ext
15762 rm -f conftest.$ac_objext conftest.$ac_ext
15764 echo "$as_me:15764: result: $cf_cv_mbstate_t" >&5
15765 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15767 if test "$cf_cv_mbstate_t" = yes ; then
15769 cat >>confdefs.h <<\EOF
15770 #define NEED_WCHAR_H 1
15776 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15777 if test "$cf_cv_mbstate_t" = unknown ; then
15778 NCURSES_MBSTATE_T=1
15781 # if we find mbstate_t in either place, use substitution to provide a fallback.
15782 if test "$cf_cv_mbstate_t" != unknown ; then
15783 NCURSES_OK_MBSTATE_T=1
15786 # This is needed on Tru64 5.0 to declare wchar_t
15787 echo "$as_me:15787: checking if we must include wchar.h to declare wchar_t" >&5
15788 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15789 if test "${cf_cv_wchar_t+set}" = set; then
15790 echo $ECHO_N "(cached) $ECHO_C" >&6
15793 cat >conftest.$ac_ext <<_ACEOF
15794 #line 15794 "configure"
15795 #include "confdefs.h"
15797 #include <stdlib.h>
15798 #include <stdarg.h>
15800 #ifdef HAVE_LIBUTF8_H
15801 #include <libutf8.h>
15811 rm -f conftest.$ac_objext
15812 if { (eval echo "$as_me:15812: \"$ac_compile\"") >&5
15813 (eval $ac_compile) 2>&5
15815 echo "$as_me:15815: \$? = $ac_status" >&5
15816 (exit $ac_status); } &&
15817 { ac_try='test -s conftest.$ac_objext'
15818 { (eval echo "$as_me:15818: \"$ac_try\"") >&5
15819 (eval $ac_try) 2>&5
15821 echo "$as_me:15821: \$? = $ac_status" >&5
15822 (exit $ac_status); }; }; then
15825 echo "$as_me: failed program was:" >&5
15826 cat conftest.$ac_ext >&5
15827 cat >conftest.$ac_ext <<_ACEOF
15828 #line 15828 "configure"
15829 #include "confdefs.h"
15831 #include <stdlib.h>
15832 #include <stdarg.h>
15835 #ifdef HAVE_LIBUTF8_H
15836 #include <libutf8.h>
15846 rm -f conftest.$ac_objext
15847 if { (eval echo "$as_me:15847: \"$ac_compile\"") >&5
15848 (eval $ac_compile) 2>&5
15850 echo "$as_me:15850: \$? = $ac_status" >&5
15851 (exit $ac_status); } &&
15852 { ac_try='test -s conftest.$ac_objext'
15853 { (eval echo "$as_me:15853: \"$ac_try\"") >&5
15854 (eval $ac_try) 2>&5
15856 echo "$as_me:15856: \$? = $ac_status" >&5
15857 (exit $ac_status); }; }; then
15860 echo "$as_me: failed program was:" >&5
15861 cat conftest.$ac_ext >&5
15862 cf_cv_wchar_t=unknown
15864 rm -f conftest.$ac_objext conftest.$ac_ext
15866 rm -f conftest.$ac_objext conftest.$ac_ext
15868 echo "$as_me:15868: result: $cf_cv_wchar_t" >&5
15869 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15871 if test "$cf_cv_wchar_t" = yes ; then
15873 cat >>confdefs.h <<\EOF
15874 #define NEED_WCHAR_H 1
15880 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15881 if test "$cf_cv_wchar_t" = unknown ; then
15885 # if we find wchar_t in either place, use substitution to provide a fallback.
15886 if test "$cf_cv_wchar_t" != unknown ; then
15887 NCURSES_OK_WCHAR_T=1
15890 # This is needed on Tru64 5.0 to declare wint_t
15891 echo "$as_me:15891: checking if we must include wchar.h to declare wint_t" >&5
15892 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15893 if test "${cf_cv_wint_t+set}" = set; then
15894 echo $ECHO_N "(cached) $ECHO_C" >&6
15897 cat >conftest.$ac_ext <<_ACEOF
15898 #line 15898 "configure"
15899 #include "confdefs.h"
15901 #include <stdlib.h>
15902 #include <stdarg.h>
15904 #ifdef HAVE_LIBUTF8_H
15905 #include <libutf8.h>
15915 rm -f conftest.$ac_objext
15916 if { (eval echo "$as_me:15916: \"$ac_compile\"") >&5
15917 (eval $ac_compile) 2>&5
15919 echo "$as_me:15919: \$? = $ac_status" >&5
15920 (exit $ac_status); } &&
15921 { ac_try='test -s conftest.$ac_objext'
15922 { (eval echo "$as_me:15922: \"$ac_try\"") >&5
15923 (eval $ac_try) 2>&5
15925 echo "$as_me:15925: \$? = $ac_status" >&5
15926 (exit $ac_status); }; }; then
15929 echo "$as_me: failed program was:" >&5
15930 cat conftest.$ac_ext >&5
15931 cat >conftest.$ac_ext <<_ACEOF
15932 #line 15932 "configure"
15933 #include "confdefs.h"
15935 #include <stdlib.h>
15936 #include <stdarg.h>
15939 #ifdef HAVE_LIBUTF8_H
15940 #include <libutf8.h>
15950 rm -f conftest.$ac_objext
15951 if { (eval echo "$as_me:15951: \"$ac_compile\"") >&5
15952 (eval $ac_compile) 2>&5
15954 echo "$as_me:15954: \$? = $ac_status" >&5
15955 (exit $ac_status); } &&
15956 { ac_try='test -s conftest.$ac_objext'
15957 { (eval echo "$as_me:15957: \"$ac_try\"") >&5
15958 (eval $ac_try) 2>&5
15960 echo "$as_me:15960: \$? = $ac_status" >&5
15961 (exit $ac_status); }; }; then
15964 echo "$as_me: failed program was:" >&5
15965 cat conftest.$ac_ext >&5
15966 cf_cv_wint_t=unknown
15968 rm -f conftest.$ac_objext conftest.$ac_ext
15970 rm -f conftest.$ac_objext conftest.$ac_ext
15972 echo "$as_me:15972: result: $cf_cv_wint_t" >&5
15973 echo "${ECHO_T}$cf_cv_wint_t" >&6
15975 if test "$cf_cv_wint_t" = yes ; then
15977 cat >>confdefs.h <<\EOF
15978 #define NEED_WCHAR_H 1
15984 # if we do not find wint_t in either place, use substitution to provide a fallback.
15985 if test "$cf_cv_wint_t" = unknown ; then
15989 # if we find wint_t in either place, use substitution to provide a fallback.
15990 if test "$cf_cv_wint_t" != unknown ; then
15991 NCURSES_OK_WINT_T=1
15994 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15996 echo "$as_me:15996: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15997 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15998 cat >conftest.$ac_ext <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16002 #ifndef _XOPEN_SOURCE_EXTENDED
16003 #define _XOPEN_SOURCE_EXTENDED
16005 #include <${cf_cv_ncurses_header:-curses.h}>
16016 rm -f conftest.$ac_objext
16017 if { (eval echo "$as_me:16017: \"$ac_compile\"") >&5
16018 (eval $ac_compile) 2>&5
16020 echo "$as_me:16020: \$? = $ac_status" >&5
16021 (exit $ac_status); } &&
16022 { ac_try='test -s conftest.$ac_objext'
16023 { (eval echo "$as_me:16023: \"$ac_try\"") >&5
16024 (eval $ac_try) 2>&5
16026 echo "$as_me:16026: \$? = $ac_status" >&5
16027 (exit $ac_status); }; }; then
16030 echo "$as_me: failed program was:" >&5
16031 cat conftest.$ac_ext >&5
16034 rm -f conftest.$ac_objext conftest.$ac_ext
16035 echo "$as_me:16035: result: $cf_result" >&5
16036 echo "${ECHO_T}$cf_result" >&6
16037 if test $cf_result = yes ; then
16039 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16041 cat >>confdefs.h <<EOF
16042 #define $cf_result 1
16047 cat >>confdefs.h <<EOF
16048 #define mbstate_t long
16055 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16057 echo "$as_me:16057: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16058 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16059 cat >conftest.$ac_ext <<_ACEOF
16060 #line 16060 "configure"
16061 #include "confdefs.h"
16063 #ifndef _XOPEN_SOURCE_EXTENDED
16064 #define _XOPEN_SOURCE_EXTENDED
16066 #include <${cf_cv_ncurses_header:-curses.h}>
16077 rm -f conftest.$ac_objext
16078 if { (eval echo "$as_me:16078: \"$ac_compile\"") >&5
16079 (eval $ac_compile) 2>&5
16081 echo "$as_me:16081: \$? = $ac_status" >&5
16082 (exit $ac_status); } &&
16083 { ac_try='test -s conftest.$ac_objext'
16084 { (eval echo "$as_me:16084: \"$ac_try\"") >&5
16085 (eval $ac_try) 2>&5
16087 echo "$as_me:16087: \$? = $ac_status" >&5
16088 (exit $ac_status); }; }; then
16091 echo "$as_me: failed program was:" >&5
16092 cat conftest.$ac_ext >&5
16095 rm -f conftest.$ac_objext conftest.$ac_ext
16096 echo "$as_me:16096: result: $cf_result" >&5
16097 echo "${ECHO_T}$cf_result" >&6
16098 if test $cf_result = yes ; then
16100 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16102 cat >>confdefs.h <<EOF
16103 #define $cf_result 1
16108 cat >>confdefs.h <<EOF
16109 #define wchar_t long
16116 if test "$NCURSES_OK_WINT_T" = 0 ; then
16118 echo "$as_me:16118: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16119 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16120 cat >conftest.$ac_ext <<_ACEOF
16121 #line 16121 "configure"
16122 #include "confdefs.h"
16124 #ifndef _XOPEN_SOURCE_EXTENDED
16125 #define _XOPEN_SOURCE_EXTENDED
16127 #include <${cf_cv_ncurses_header:-curses.h}>
16138 rm -f conftest.$ac_objext
16139 if { (eval echo "$as_me:16139: \"$ac_compile\"") >&5
16140 (eval $ac_compile) 2>&5
16142 echo "$as_me:16142: \$? = $ac_status" >&5
16143 (exit $ac_status); } &&
16144 { ac_try='test -s conftest.$ac_objext'
16145 { (eval echo "$as_me:16145: \"$ac_try\"") >&5
16146 (eval $ac_try) 2>&5
16148 echo "$as_me:16148: \$? = $ac_status" >&5
16149 (exit $ac_status); }; }; then
16152 echo "$as_me: failed program was:" >&5
16153 cat conftest.$ac_ext >&5
16156 rm -f conftest.$ac_objext conftest.$ac_ext
16157 echo "$as_me:16157: result: $cf_result" >&5
16158 echo "${ECHO_T}$cf_result" >&6
16159 if test $cf_result = yes ; then
16161 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16163 cat >>confdefs.h <<EOF
16164 #define $cf_result 1
16169 cat >>confdefs.h <<EOF
16170 #define wint_t long
16178 echo "$as_me:16178: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16179 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16181 cat >conftest.$ac_ext <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16185 #ifdef HAVE_XCURSES
16186 #include <xcurses.h>
16187 char * XCursesProgramName = "test";
16189 #include <${cf_cv_ncurses_header:-curses.h}>
16190 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16191 #include <ncursesw/term.h>
16192 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16193 #include <ncurses/term.h>
16194 #elif defined(HAVE_TERM_H)
16203 void *foo = &(ospeed)
16209 rm -f conftest.$ac_objext
16210 if { (eval echo "$as_me:16210: \"$ac_compile\"") >&5
16211 (eval $ac_compile) 2>&5
16213 echo "$as_me:16213: \$? = $ac_status" >&5
16214 (exit $ac_status); } &&
16215 { ac_try='test -s conftest.$ac_objext'
16216 { (eval echo "$as_me:16216: \"$ac_try\"") >&5
16217 (eval $ac_try) 2>&5
16219 echo "$as_me:16219: \$? = $ac_status" >&5
16220 (exit $ac_status); }; }; then
16223 echo "$as_me: failed program was:" >&5
16224 cat conftest.$ac_ext >&5
16227 rm -f conftest.$ac_objext conftest.$ac_ext
16228 echo "$as_me:16228: result: $cf_result" >&5
16229 echo "${ECHO_T}$cf_result" >&6
16231 if test $cf_result = yes ; then
16233 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16235 cat >>confdefs.h <<EOF
16236 #define $cf_result 1
16240 echo "$as_me:16240: checking for data ospeed in library" >&5
16241 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16242 # BSD linkers insist on making weak linkage, but resolve at runtime.
16243 if test "$cross_compiling" = yes; then
16246 cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16250 #ifdef HAVE_XCURSES
16251 #include <xcurses.h>
16252 char * XCursesProgramName = "test";
16254 #include <${cf_cv_ncurses_header:-curses.h}>
16255 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16256 #include <ncursesw/term.h>
16257 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16258 #include <ncurses/term.h>
16259 #elif defined(HAVE_TERM_H)
16264 extern char ospeed;
16270 void *foo = &(ospeed);
16271 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16272 ${cf_cv_main_return:-return}(foo == 0);
16279 rm -f conftest.$ac_objext conftest$ac_exeext
16280 if { (eval echo "$as_me:16280: \"$ac_link\"") >&5
16281 (eval $ac_link) 2>&5
16283 echo "$as_me:16283: \$? = $ac_status" >&5
16284 (exit $ac_status); } &&
16285 { ac_try='test -s conftest$ac_exeext'
16286 { (eval echo "$as_me:16286: \"$ac_try\"") >&5
16287 (eval $ac_try) 2>&5
16289 echo "$as_me:16289: \$? = $ac_status" >&5
16290 (exit $ac_status); }; }; then
16293 echo "$as_me: failed program was:" >&5
16294 cat conftest.$ac_ext >&5
16297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16300 cat >conftest.$ac_ext <<_ACEOF
16301 #line 16301 "configure"
16302 #include "confdefs.h"
16304 #ifdef HAVE_XCURSES
16305 #include <xcurses.h>
16306 char * XCursesProgramName = "test";
16308 #include <${cf_cv_ncurses_header:-curses.h}>
16309 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16310 #include <ncursesw/term.h>
16311 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16312 #include <ncurses/term.h>
16313 #elif defined(HAVE_TERM_H)
16318 extern char ospeed;
16321 void *foo = &(ospeed);
16322 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16323 ${cf_cv_main_return:-return}(foo == 0);
16326 rm -f conftest$ac_exeext
16327 if { (eval echo "$as_me:16327: \"$ac_link\"") >&5
16328 (eval $ac_link) 2>&5
16330 echo "$as_me:16330: \$? = $ac_status" >&5
16331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16332 { (eval echo "$as_me:16332: \"$ac_try\"") >&5
16333 (eval $ac_try) 2>&5
16335 echo "$as_me:16335: \$? = $ac_status" >&5
16336 (exit $ac_status); }; }; then
16339 echo "$as_me: program exited with status $ac_status" >&5
16340 echo "$as_me: failed program was:" >&5
16341 cat conftest.$ac_ext >&5
16344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16346 echo "$as_me:16346: result: $cf_result" >&5
16347 echo "${ECHO_T}$cf_result" >&6
16348 if test $cf_result = yes ; then
16350 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16352 cat >>confdefs.h <<EOF
16353 #define $cf_result 1
16359 echo "$as_me:16359: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16360 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16362 cat >conftest.$ac_ext <<_ACEOF
16363 #line 16363 "configure"
16364 #include "confdefs.h"
16366 #ifdef HAVE_XCURSES
16367 #include <xcurses.h>
16368 char * XCursesProgramName = "test";
16370 #include <${cf_cv_ncurses_header:-curses.h}>
16371 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16372 #include <ncursesw/term.h>
16373 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16374 #include <ncurses/term.h>
16375 #elif defined(HAVE_TERM_H)
16384 void *foo = &(boolnames)
16390 rm -f conftest.$ac_objext
16391 if { (eval echo "$as_me:16391: \"$ac_compile\"") >&5
16392 (eval $ac_compile) 2>&5
16394 echo "$as_me:16394: \$? = $ac_status" >&5
16395 (exit $ac_status); } &&
16396 { ac_try='test -s conftest.$ac_objext'
16397 { (eval echo "$as_me:16397: \"$ac_try\"") >&5
16398 (eval $ac_try) 2>&5
16400 echo "$as_me:16400: \$? = $ac_status" >&5
16401 (exit $ac_status); }; }; then
16404 echo "$as_me: failed program was:" >&5
16405 cat conftest.$ac_ext >&5
16408 rm -f conftest.$ac_objext conftest.$ac_ext
16409 echo "$as_me:16409: result: $cf_result" >&5
16410 echo "${ECHO_T}$cf_result" >&6
16412 if test $cf_result = yes ; then
16414 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16416 cat >>confdefs.h <<EOF
16417 #define $cf_result 1
16421 echo "$as_me:16421: checking for data boolnames in library" >&5
16422 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16423 # BSD linkers insist on making weak linkage, but resolve at runtime.
16424 if test "$cross_compiling" = yes; then
16427 cat >conftest.$ac_ext <<_ACEOF
16428 #line 16428 "configure"
16429 #include "confdefs.h"
16431 #ifdef HAVE_XCURSES
16432 #include <xcurses.h>
16433 char * XCursesProgramName = "test";
16435 #include <${cf_cv_ncurses_header:-curses.h}>
16436 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16437 #include <ncursesw/term.h>
16438 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16439 #include <ncurses/term.h>
16440 #elif defined(HAVE_TERM_H)
16445 extern char boolnames;
16451 void *foo = &(boolnames);
16452 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16453 ${cf_cv_main_return:-return}(foo == 0);
16460 rm -f conftest.$ac_objext conftest$ac_exeext
16461 if { (eval echo "$as_me:16461: \"$ac_link\"") >&5
16462 (eval $ac_link) 2>&5
16464 echo "$as_me:16464: \$? = $ac_status" >&5
16465 (exit $ac_status); } &&
16466 { ac_try='test -s conftest$ac_exeext'
16467 { (eval echo "$as_me:16467: \"$ac_try\"") >&5
16468 (eval $ac_try) 2>&5
16470 echo "$as_me:16470: \$? = $ac_status" >&5
16471 (exit $ac_status); }; }; then
16474 echo "$as_me: failed program was:" >&5
16475 cat conftest.$ac_ext >&5
16478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16481 cat >conftest.$ac_ext <<_ACEOF
16482 #line 16482 "configure"
16483 #include "confdefs.h"
16485 #ifdef HAVE_XCURSES
16486 #include <xcurses.h>
16487 char * XCursesProgramName = "test";
16489 #include <${cf_cv_ncurses_header:-curses.h}>
16490 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16491 #include <ncursesw/term.h>
16492 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16493 #include <ncurses/term.h>
16494 #elif defined(HAVE_TERM_H)
16499 extern char boolnames;
16502 void *foo = &(boolnames);
16503 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16504 ${cf_cv_main_return:-return}(foo == 0);
16507 rm -f conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509 (eval $ac_link) 2>&5
16511 echo "$as_me:16511: \$? = $ac_status" >&5
16512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16513 { (eval echo "$as_me:16513: \"$ac_try\"") >&5
16514 (eval $ac_try) 2>&5
16516 echo "$as_me:16516: \$? = $ac_status" >&5
16517 (exit $ac_status); }; }; then
16520 echo "$as_me: program exited with status $ac_status" >&5
16521 echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16525 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16527 echo "$as_me:16527: result: $cf_result" >&5
16528 echo "${ECHO_T}$cf_result" >&6
16529 if test $cf_result = yes ; then
16531 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16533 cat >>confdefs.h <<EOF
16534 #define $cf_result 1
16540 echo "$as_me:16540: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16541 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16547 #ifdef HAVE_XCURSES
16548 #include <xcurses.h>
16549 char * XCursesProgramName = "test";
16551 #include <${cf_cv_ncurses_header:-curses.h}>
16552 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16553 #include <ncursesw/term.h>
16554 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16555 #include <ncurses/term.h>
16556 #elif defined(HAVE_TERM_H)
16565 void *foo = &(boolfnames)
16571 rm -f conftest.$ac_objext
16572 if { (eval echo "$as_me:16572: \"$ac_compile\"") >&5
16573 (eval $ac_compile) 2>&5
16575 echo "$as_me:16575: \$? = $ac_status" >&5
16576 (exit $ac_status); } &&
16577 { ac_try='test -s conftest.$ac_objext'
16578 { (eval echo "$as_me:16578: \"$ac_try\"") >&5
16579 (eval $ac_try) 2>&5
16581 echo "$as_me:16581: \$? = $ac_status" >&5
16582 (exit $ac_status); }; }; then
16585 echo "$as_me: failed program was:" >&5
16586 cat conftest.$ac_ext >&5
16589 rm -f conftest.$ac_objext conftest.$ac_ext
16590 echo "$as_me:16590: result: $cf_result" >&5
16591 echo "${ECHO_T}$cf_result" >&6
16593 if test $cf_result = yes ; then
16595 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16597 cat >>confdefs.h <<EOF
16598 #define $cf_result 1
16602 echo "$as_me:16602: checking for data boolfnames in library" >&5
16603 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16604 # BSD linkers insist on making weak linkage, but resolve at runtime.
16605 if test "$cross_compiling" = yes; then
16608 cat >conftest.$ac_ext <<_ACEOF
16609 #line 16609 "configure"
16610 #include "confdefs.h"
16612 #ifdef HAVE_XCURSES
16613 #include <xcurses.h>
16614 char * XCursesProgramName = "test";
16616 #include <${cf_cv_ncurses_header:-curses.h}>
16617 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16618 #include <ncursesw/term.h>
16619 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16620 #include <ncurses/term.h>
16621 #elif defined(HAVE_TERM_H)
16626 extern char boolfnames;
16632 void *foo = &(boolfnames);
16633 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16634 ${cf_cv_main_return:-return}(foo == 0);
16641 rm -f conftest.$ac_objext conftest$ac_exeext
16642 if { (eval echo "$as_me:16642: \"$ac_link\"") >&5
16643 (eval $ac_link) 2>&5
16645 echo "$as_me:16645: \$? = $ac_status" >&5
16646 (exit $ac_status); } &&
16647 { ac_try='test -s conftest$ac_exeext'
16648 { (eval echo "$as_me:16648: \"$ac_try\"") >&5
16649 (eval $ac_try) 2>&5
16651 echo "$as_me:16651: \$? = $ac_status" >&5
16652 (exit $ac_status); }; }; then
16655 echo "$as_me: failed program was:" >&5
16656 cat conftest.$ac_ext >&5
16659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16662 cat >conftest.$ac_ext <<_ACEOF
16663 #line 16663 "configure"
16664 #include "confdefs.h"
16666 #ifdef HAVE_XCURSES
16667 #include <xcurses.h>
16668 char * XCursesProgramName = "test";
16670 #include <${cf_cv_ncurses_header:-curses.h}>
16671 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16672 #include <ncursesw/term.h>
16673 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16674 #include <ncurses/term.h>
16675 #elif defined(HAVE_TERM_H)
16680 extern char boolfnames;
16683 void *foo = &(boolfnames);
16684 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16685 ${cf_cv_main_return:-return}(foo == 0);
16688 rm -f conftest$ac_exeext
16689 if { (eval echo "$as_me:16689: \"$ac_link\"") >&5
16690 (eval $ac_link) 2>&5
16692 echo "$as_me:16692: \$? = $ac_status" >&5
16693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16694 { (eval echo "$as_me:16694: \"$ac_try\"") >&5
16695 (eval $ac_try) 2>&5
16697 echo "$as_me:16697: \$? = $ac_status" >&5
16698 (exit $ac_status); }; }; then
16701 echo "$as_me: program exited with status $ac_status" >&5
16702 echo "$as_me: failed program was:" >&5
16703 cat conftest.$ac_ext >&5
16706 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16708 echo "$as_me:16708: result: $cf_result" >&5
16709 echo "${ECHO_T}$cf_result" >&6
16710 if test $cf_result = yes ; then
16712 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16714 cat >>confdefs.h <<EOF
16715 #define $cf_result 1
16721 echo "$as_me:16721: checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16722 echo $ECHO_N "checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16724 cat >conftest.$ac_ext <<_ACEOF
16725 #line 16725 "configure"
16726 #include "confdefs.h"
16728 #ifdef HAVE_XCURSES
16729 #include <xcurses.h>
16730 char * XCursesProgramName = "test";
16732 #include <${cf_cv_ncurses_header:-curses.h}>
16733 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16734 #include <ncursesw/term.h>
16735 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16736 #include <ncurses/term.h>
16737 #elif defined(HAVE_TERM_H)
16746 void *foo = &(ttytype)
16752 rm -f conftest.$ac_objext
16753 if { (eval echo "$as_me:16753: \"$ac_compile\"") >&5
16754 (eval $ac_compile) 2>&5
16756 echo "$as_me:16756: \$? = $ac_status" >&5
16757 (exit $ac_status); } &&
16758 { ac_try='test -s conftest.$ac_objext'
16759 { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760 (eval $ac_try) 2>&5
16762 echo "$as_me:16762: \$? = $ac_status" >&5
16763 (exit $ac_status); }; }; then
16766 echo "$as_me: failed program was:" >&5
16767 cat conftest.$ac_ext >&5
16770 rm -f conftest.$ac_objext conftest.$ac_ext
16771 echo "$as_me:16771: result: $cf_result" >&5
16772 echo "${ECHO_T}$cf_result" >&6
16774 if test $cf_result = yes ; then
16776 cf_result=`echo "have_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16778 cat >>confdefs.h <<EOF
16779 #define $cf_result 1
16783 echo "$as_me:16783: checking for data ttytype in library" >&5
16784 echo $ECHO_N "checking for data ttytype in library... $ECHO_C" >&6
16785 # BSD linkers insist on making weak linkage, but resolve at runtime.
16786 if test "$cross_compiling" = yes; then
16789 cat >conftest.$ac_ext <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16793 #ifdef HAVE_XCURSES
16794 #include <xcurses.h>
16795 char * XCursesProgramName = "test";
16797 #include <${cf_cv_ncurses_header:-curses.h}>
16798 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16799 #include <ncursesw/term.h>
16800 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16801 #include <ncurses/term.h>
16802 #elif defined(HAVE_TERM_H)
16807 extern char ttytype;
16813 void *foo = &(ttytype);
16814 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16815 ${cf_cv_main_return:-return}(foo == 0);
16822 rm -f conftest.$ac_objext conftest$ac_exeext
16823 if { (eval echo "$as_me:16823: \"$ac_link\"") >&5
16824 (eval $ac_link) 2>&5
16826 echo "$as_me:16826: \$? = $ac_status" >&5
16827 (exit $ac_status); } &&
16828 { ac_try='test -s conftest$ac_exeext'
16829 { (eval echo "$as_me:16829: \"$ac_try\"") >&5
16830 (eval $ac_try) 2>&5
16832 echo "$as_me:16832: \$? = $ac_status" >&5
16833 (exit $ac_status); }; }; then
16836 echo "$as_me: failed program was:" >&5
16837 cat conftest.$ac_ext >&5
16840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16843 cat >conftest.$ac_ext <<_ACEOF
16844 #line 16844 "configure"
16845 #include "confdefs.h"
16847 #ifdef HAVE_XCURSES
16848 #include <xcurses.h>
16849 char * XCursesProgramName = "test";
16851 #include <${cf_cv_ncurses_header:-curses.h}>
16852 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16853 #include <ncursesw/term.h>
16854 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16855 #include <ncurses/term.h>
16856 #elif defined(HAVE_TERM_H)
16861 extern char ttytype;
16864 void *foo = &(ttytype);
16865 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16866 ${cf_cv_main_return:-return}(foo == 0);
16869 rm -f conftest$ac_exeext
16870 if { (eval echo "$as_me:16870: \"$ac_link\"") >&5
16871 (eval $ac_link) 2>&5
16873 echo "$as_me:16873: \$? = $ac_status" >&5
16874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16875 { (eval echo "$as_me:16875: \"$ac_try\"") >&5
16876 (eval $ac_try) 2>&5
16878 echo "$as_me:16878: \$? = $ac_status" >&5
16879 (exit $ac_status); }; }; then
16882 echo "$as_me: program exited with status $ac_status" >&5
16883 echo "$as_me: failed program was:" >&5
16884 cat conftest.$ac_ext >&5
16887 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16889 echo "$as_me:16889: result: $cf_result" >&5
16890 echo "${ECHO_T}$cf_result" >&6
16891 if test $cf_result = yes ; then
16893 cf_result=`echo "decl_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16895 cat >>confdefs.h <<EOF
16896 #define $cf_result 1
16902 if ( test "$GCC" = yes || test "$GXX" = yes )
16904 echo "$as_me:16904: checking if you want to turn on gcc warnings" >&5
16905 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16907 # Check whether --enable-warnings or --disable-warnings was given.
16908 if test "${enable_warnings+set}" = set; then
16909 enableval="$enable_warnings"
16910 test "$enableval" != yes && enableval=no
16911 if test "$enableval" != "no" ; then
16921 echo "$as_me:16921: result: $with_warnings" >&5
16922 echo "${ECHO_T}$with_warnings" >&6
16923 if test "$with_warnings" = "yes"
16926 if test "$GCC" = yes
16928 cat > conftest.i <<EOF
16930 #define GCC_PRINTF 0
16933 #define GCC_SCANF 0
16935 #ifndef GCC_NORETURN
16936 #define GCC_NORETURN /* nothing */
16939 #define GCC_UNUSED /* nothing */
16942 if test "$GCC" = yes
16944 { echo "$as_me:16944: checking for $CC __attribute__ directives..." >&5
16945 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16946 cat > conftest.$ac_ext <<EOF
16947 #line 16947 "${as_me:-configure}"
16948 #include "confdefs.h"
16949 #include "conftest.h"
16950 #include "conftest.i"
16952 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16954 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16957 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16959 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16961 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16962 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16963 extern void foo(void) GCC_NORETURN;
16964 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16966 cf_printf_attribute=no
16967 cf_scanf_attribute=no
16968 for cf_attribute in scanf printf unused noreturn
16971 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16973 cf_directive="__attribute__(($cf_attribute))"
16974 echo "checking for $CC $cf_directive" 1>&5
16976 case $cf_attribute in
16978 cf_printf_attribute=yes
16979 cat >conftest.h <<EOF
16980 #define GCC_$cf_ATTRIBUTE 1
16984 cf_scanf_attribute=yes
16985 cat >conftest.h <<EOF
16986 #define GCC_$cf_ATTRIBUTE 1
16990 cat >conftest.h <<EOF
16991 #define GCC_$cf_ATTRIBUTE $cf_directive
16996 if { (eval echo "$as_me:16996: \"$ac_compile\"") >&5
16997 (eval $ac_compile) 2>&5
16999 echo "$as_me:16999: \$? = $ac_status" >&5
17000 (exit $ac_status); }; then
17001 test -n "$verbose" && echo "$as_me:17001: result: ... $cf_attribute" >&5
17002 echo "${ECHO_T}... $cf_attribute" >&6
17003 cat conftest.h >>confdefs.h
17004 case $cf_attribute in
17007 cat >>confdefs.h <<EOF
17008 #define GCC_NORETURN $cf_directive
17013 cf_value='/* nothing */'
17014 if test "$cf_printf_attribute" != no ; then
17015 cf_value='__attribute__((format(printf,fmt,var)))'
17017 cat >>confdefs.h <<\EOF
17018 #define GCC_PRINTF 1
17023 cat >>confdefs.h <<EOF
17024 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17029 cf_value='/* nothing */'
17030 if test "$cf_scanf_attribute" != no ; then
17031 cf_value='__attribute__((format(scanf,fmt,var)))'
17033 cat >>confdefs.h <<\EOF
17034 #define GCC_SCANF 1
17039 cat >>confdefs.h <<EOF
17040 #define GCC_SCANFLIKE(fmt,var) $cf_value
17046 cat >>confdefs.h <<EOF
17047 #define GCC_UNUSED $cf_directive
17055 fgrep define conftest.i >>confdefs.h
17062 if test "$GCC" = yes ; then
17065 echo "$as_me:17065: checking if this is really Intel C compiler" >&5
17066 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17067 cf_save_CFLAGS="$CFLAGS"
17068 CFLAGS="$CFLAGS -no-gcc"
17069 cat >conftest.$ac_ext <<_ACEOF
17070 #line 17070 "configure"
17071 #include "confdefs.h"
17077 #ifdef __INTEL_COMPILER
17086 rm -f conftest.$ac_objext
17087 if { (eval echo "$as_me:17087: \"$ac_compile\"") >&5
17088 (eval $ac_compile) 2>&5
17090 echo "$as_me:17090: \$? = $ac_status" >&5
17091 (exit $ac_status); } &&
17092 { ac_try='test -s conftest.$ac_objext'
17093 { (eval echo "$as_me:17093: \"$ac_try\"") >&5
17094 (eval $ac_try) 2>&5
17096 echo "$as_me:17096: \$? = $ac_status" >&5
17097 (exit $ac_status); }; }; then
17099 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17102 echo "$as_me: failed program was:" >&5
17103 cat conftest.$ac_ext >&5
17105 rm -f conftest.$ac_objext conftest.$ac_ext
17106 CFLAGS="$cf_save_CFLAGS"
17107 echo "$as_me:17107: result: $INTEL_COMPILER" >&5
17108 echo "${ECHO_T}$INTEL_COMPILER" >&6
17115 if test "$GCC" = yes ; then
17116 echo "$as_me:17116: checking if this is really Clang C compiler" >&5
17117 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17118 cf_save_CFLAGS="$CFLAGS"
17119 CFLAGS="$CFLAGS -Qunused-arguments"
17120 cat >conftest.$ac_ext <<_ACEOF
17121 #line 17121 "configure"
17122 #include "confdefs.h"
17137 rm -f conftest.$ac_objext
17138 if { (eval echo "$as_me:17138: \"$ac_compile\"") >&5
17139 (eval $ac_compile) 2>&5
17141 echo "$as_me:17141: \$? = $ac_status" >&5
17142 (exit $ac_status); } &&
17143 { ac_try='test -s conftest.$ac_objext'
17144 { (eval echo "$as_me:17144: \"$ac_try\"") >&5
17145 (eval $ac_try) 2>&5
17147 echo "$as_me:17147: \$? = $ac_status" >&5
17148 (exit $ac_status); }; }; then
17150 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17153 echo "$as_me: failed program was:" >&5
17154 cat conftest.$ac_ext >&5
17156 rm -f conftest.$ac_objext conftest.$ac_ext
17157 CFLAGS="$cf_save_CFLAGS"
17158 echo "$as_me:17158: result: $CLANG_COMPILER" >&5
17159 echo "${ECHO_T}$CLANG_COMPILER" >&6
17162 cat > conftest.$ac_ext <<EOF
17163 #line 17163 "${as_me:-configure}"
17164 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17167 if test "$INTEL_COMPILER" = yes
17169 # The "-wdXXX" options suppress warnings:
17170 # remark #1419: external declaration in primary source file
17171 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17172 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17173 # remark #193: zero used for undefined preprocessing identifier
17174 # remark #593: variable "curs_sb_left_arrow" was set but never used
17175 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17176 # remark #869: parameter "tw" was never referenced
17177 # remark #981: operands are evaluated in unspecified order
17178 # warning #279: controlling expression is constant
17180 { echo "$as_me:17180: checking for $CC warning options..." >&5
17181 echo "$as_me: checking for $CC warning options..." >&6;}
17182 cf_save_CFLAGS="$CFLAGS"
17183 EXTRA_CFLAGS="-Wall"
17195 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17196 if { (eval echo "$as_me:17196: \"$ac_compile\"") >&5
17197 (eval $ac_compile) 2>&5
17199 echo "$as_me:17199: \$? = $ac_status" >&5
17200 (exit $ac_status); }; then
17201 test -n "$verbose" && echo "$as_me:17201: result: ... -$cf_opt" >&5
17202 echo "${ECHO_T}... -$cf_opt" >&6
17203 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17206 CFLAGS="$cf_save_CFLAGS"
17208 elif test "$GCC" = yes
17210 { echo "$as_me:17210: checking for $CC warning options..." >&5
17211 echo "$as_me: checking for $CC warning options..." >&6;}
17212 cf_save_CFLAGS="$CFLAGS"
17215 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17216 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17217 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17218 for cf_opt in W Wall \
17219 Wbad-function-cast \
17222 Wdeclaration-after-statement \
17225 Wmissing-declarations \
17226 Wmissing-prototypes \
17230 Wstrict-prototypes \
17231 Wundef $cf_gcc_warnings $cf_warn_CONST
17233 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17234 if { (eval echo "$as_me:17234: \"$ac_compile\"") >&5
17235 (eval $ac_compile) 2>&5
17237 echo "$as_me:17237: \$? = $ac_status" >&5
17238 (exit $ac_status); }; then
17239 test -n "$verbose" && echo "$as_me:17239: result: ... -$cf_opt" >&5
17240 echo "${ECHO_T}... -$cf_opt" >&6
17243 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17246 case $GCC_VERSION in
17248 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17250 echo "${as_me:-configure}:17250: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
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 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17269 CFLAGS="$cf_save_CFLAGS"
17276 echo "$as_me:17276: checking if you want to use dmalloc for testing" >&5
17277 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17279 # Check whether --with-dmalloc or --without-dmalloc was given.
17280 if test "${with_dmalloc+set}" = set; then
17281 withval="$with_dmalloc"
17283 cat >>confdefs.h <<EOF
17284 #define USE_DMALLOC 1
17287 : ${with_cflags:=-g}
17288 : ${with_no_leaks:=yes}
17293 echo "$as_me:17293: result: ${with_dmalloc:-no}" >&5
17294 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17296 case .$with_cflags in
17306 cf_new_extra_cppflags=
17308 for cf_add_cflags in -g
17310 case $cf_fix_cppflags in
17312 case $cf_add_cflags in
17313 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17314 case $cf_add_cflags in
17316 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17318 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17319 && test -z "${cf_tst_cflags}" \
17320 && cf_fix_cppflags=yes
17322 if test $cf_fix_cppflags = yes ; then
17323 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17325 elif test "${cf_tst_cflags}" = "\"'" ; then
17326 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17331 case "$CPPFLAGS" in
17335 case $cf_add_cflags in
17337 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17339 CPPFLAGS=`echo "$CPPFLAGS" | \
17340 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17341 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17345 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17350 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17355 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17357 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17359 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17360 && test -z "${cf_tst_cflags}" \
17361 && cf_fix_cppflags=no
17366 if test -n "$cf_new_cflags" ; then
17368 CFLAGS="$CFLAGS $cf_new_cflags"
17371 if test -n "$cf_new_cppflags" ; then
17373 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17376 if test -n "$cf_new_extra_cppflags" ; then
17378 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17386 if test "$with_dmalloc" = yes ; then
17387 echo "$as_me:17387: checking for dmalloc.h" >&5
17388 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17389 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17390 echo $ECHO_N "(cached) $ECHO_C" >&6
17392 cat >conftest.$ac_ext <<_ACEOF
17393 #line 17393 "configure"
17394 #include "confdefs.h"
17395 #include <dmalloc.h>
17397 if { (eval echo "$as_me:17397: \"$ac_cpp conftest.$ac_ext\"") >&5
17398 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17400 egrep -v '^ *\+' conftest.er1 >conftest.err
17402 cat conftest.err >&5
17403 echo "$as_me:17403: \$? = $ac_status" >&5
17404 (exit $ac_status); } >/dev/null; then
17405 if test -s conftest.err; then
17406 ac_cpp_err=$ac_c_preproc_warn_flag
17413 if test -z "$ac_cpp_err"; then
17414 ac_cv_header_dmalloc_h=yes
17416 echo "$as_me: failed program was:" >&5
17417 cat conftest.$ac_ext >&5
17418 ac_cv_header_dmalloc_h=no
17420 rm -f conftest.err conftest.$ac_ext
17422 echo "$as_me:17422: result: $ac_cv_header_dmalloc_h" >&5
17423 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17424 if test $ac_cv_header_dmalloc_h = yes; then
17426 echo "$as_me:17426: checking for dmalloc_debug in -ldmalloc" >&5
17427 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17428 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17429 echo $ECHO_N "(cached) $ECHO_C" >&6
17431 ac_check_lib_save_LIBS=$LIBS
17432 LIBS="-ldmalloc $LIBS"
17433 cat >conftest.$ac_ext <<_ACEOF
17434 #line 17434 "configure"
17435 #include "confdefs.h"
17437 /* Override any gcc2 internal prototype to avoid an error. */
17441 /* We use char because int might match the return type of a gcc2
17442 builtin and then its argument prototype would still apply. */
17443 char dmalloc_debug ();
17452 rm -f conftest.$ac_objext conftest$ac_exeext
17453 if { (eval echo "$as_me:17453: \"$ac_link\"") >&5
17454 (eval $ac_link) 2>&5
17456 echo "$as_me:17456: \$? = $ac_status" >&5
17457 (exit $ac_status); } &&
17458 { ac_try='test -s conftest$ac_exeext'
17459 { (eval echo "$as_me:17459: \"$ac_try\"") >&5
17460 (eval $ac_try) 2>&5
17462 echo "$as_me:17462: \$? = $ac_status" >&5
17463 (exit $ac_status); }; }; then
17464 ac_cv_lib_dmalloc_dmalloc_debug=yes
17466 echo "$as_me: failed program was:" >&5
17467 cat conftest.$ac_ext >&5
17468 ac_cv_lib_dmalloc_dmalloc_debug=no
17470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17471 LIBS=$ac_check_lib_save_LIBS
17473 echo "$as_me:17473: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17474 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17475 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17476 cat >>confdefs.h <<EOF
17477 #define HAVE_LIBDMALLOC 1
17480 LIBS="-ldmalloc $LIBS"
17488 echo "$as_me:17488: checking if you want to use dbmalloc for testing" >&5
17489 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17491 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17492 if test "${with_dbmalloc+set}" = set; then
17493 withval="$with_dbmalloc"
17495 cat >>confdefs.h <<EOF
17496 #define USE_DBMALLOC 1
17499 : ${with_cflags:=-g}
17500 : ${with_no_leaks:=yes}
17505 echo "$as_me:17505: result: ${with_dbmalloc:-no}" >&5
17506 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17508 case .$with_cflags in
17518 cf_new_extra_cppflags=
17520 for cf_add_cflags in -g
17522 case $cf_fix_cppflags in
17524 case $cf_add_cflags in
17525 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17526 case $cf_add_cflags in
17528 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17530 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17531 && test -z "${cf_tst_cflags}" \
17532 && cf_fix_cppflags=yes
17534 if test $cf_fix_cppflags = yes ; then
17535 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17537 elif test "${cf_tst_cflags}" = "\"'" ; then
17538 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17543 case "$CPPFLAGS" in
17547 case $cf_add_cflags in
17549 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17551 CPPFLAGS=`echo "$CPPFLAGS" | \
17552 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17553 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17557 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17562 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17567 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17569 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17571 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17572 && test -z "${cf_tst_cflags}" \
17573 && cf_fix_cppflags=no
17578 if test -n "$cf_new_cflags" ; then
17580 CFLAGS="$CFLAGS $cf_new_cflags"
17583 if test -n "$cf_new_cppflags" ; then
17585 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17588 if test -n "$cf_new_extra_cppflags" ; then
17590 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17598 if test "$with_dbmalloc" = yes ; then
17599 echo "$as_me:17599: checking for dbmalloc.h" >&5
17600 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17601 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17602 echo $ECHO_N "(cached) $ECHO_C" >&6
17604 cat >conftest.$ac_ext <<_ACEOF
17605 #line 17605 "configure"
17606 #include "confdefs.h"
17607 #include <dbmalloc.h>
17609 if { (eval echo "$as_me:17609: \"$ac_cpp conftest.$ac_ext\"") >&5
17610 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17612 egrep -v '^ *\+' conftest.er1 >conftest.err
17614 cat conftest.err >&5
17615 echo "$as_me:17615: \$? = $ac_status" >&5
17616 (exit $ac_status); } >/dev/null; then
17617 if test -s conftest.err; then
17618 ac_cpp_err=$ac_c_preproc_warn_flag
17625 if test -z "$ac_cpp_err"; then
17626 ac_cv_header_dbmalloc_h=yes
17628 echo "$as_me: failed program was:" >&5
17629 cat conftest.$ac_ext >&5
17630 ac_cv_header_dbmalloc_h=no
17632 rm -f conftest.err conftest.$ac_ext
17634 echo "$as_me:17634: result: $ac_cv_header_dbmalloc_h" >&5
17635 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17636 if test $ac_cv_header_dbmalloc_h = yes; then
17638 echo "$as_me:17638: checking for debug_malloc in -ldbmalloc" >&5
17639 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17640 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17641 echo $ECHO_N "(cached) $ECHO_C" >&6
17643 ac_check_lib_save_LIBS=$LIBS
17644 LIBS="-ldbmalloc $LIBS"
17645 cat >conftest.$ac_ext <<_ACEOF
17646 #line 17646 "configure"
17647 #include "confdefs.h"
17649 /* Override any gcc2 internal prototype to avoid an error. */
17653 /* We use char because int might match the return type of a gcc2
17654 builtin and then its argument prototype would still apply. */
17655 char debug_malloc ();
17664 rm -f conftest.$ac_objext conftest$ac_exeext
17665 if { (eval echo "$as_me:17665: \"$ac_link\"") >&5
17666 (eval $ac_link) 2>&5
17668 echo "$as_me:17668: \$? = $ac_status" >&5
17669 (exit $ac_status); } &&
17670 { ac_try='test -s conftest$ac_exeext'
17671 { (eval echo "$as_me:17671: \"$ac_try\"") >&5
17672 (eval $ac_try) 2>&5
17674 echo "$as_me:17674: \$? = $ac_status" >&5
17675 (exit $ac_status); }; }; then
17676 ac_cv_lib_dbmalloc_debug_malloc=yes
17678 echo "$as_me: failed program was:" >&5
17679 cat conftest.$ac_ext >&5
17680 ac_cv_lib_dbmalloc_debug_malloc=no
17682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17683 LIBS=$ac_check_lib_save_LIBS
17685 echo "$as_me:17685: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17686 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17687 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17688 cat >>confdefs.h <<EOF
17689 #define HAVE_LIBDBMALLOC 1
17692 LIBS="-ldbmalloc $LIBS"
17700 echo "$as_me:17700: checking if you want to use valgrind for testing" >&5
17701 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17703 # Check whether --with-valgrind or --without-valgrind was given.
17704 if test "${with_valgrind+set}" = set; then
17705 withval="$with_valgrind"
17707 cat >>confdefs.h <<EOF
17708 #define USE_VALGRIND 1
17711 : ${with_cflags:=-g}
17712 : ${with_no_leaks:=yes}
17717 echo "$as_me:17717: result: ${with_valgrind:-no}" >&5
17718 echo "${ECHO_T}${with_valgrind:-no}" >&6
17720 case .$with_cflags in
17730 cf_new_extra_cppflags=
17732 for cf_add_cflags in -g
17734 case $cf_fix_cppflags in
17736 case $cf_add_cflags in
17737 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17738 case $cf_add_cflags in
17740 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17742 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17743 && test -z "${cf_tst_cflags}" \
17744 && cf_fix_cppflags=yes
17746 if test $cf_fix_cppflags = yes ; then
17747 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17749 elif test "${cf_tst_cflags}" = "\"'" ; then
17750 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17755 case "$CPPFLAGS" in
17759 case $cf_add_cflags in
17761 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17763 CPPFLAGS=`echo "$CPPFLAGS" | \
17764 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17765 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17769 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17774 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17779 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17781 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17783 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17784 && test -z "${cf_tst_cflags}" \
17785 && cf_fix_cppflags=no
17790 if test -n "$cf_new_cflags" ; then
17792 CFLAGS="$CFLAGS $cf_new_cflags"
17795 if test -n "$cf_new_cppflags" ; then
17797 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17800 if test -n "$cf_new_extra_cppflags" ; then
17802 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17810 echo "$as_me:17810: checking if you want to perform memory-leak testing" >&5
17811 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17813 # Check whether --enable-leaks or --disable-leaks was given.
17814 if test "${enable_leaks+set}" = set; then
17815 enableval="$enable_leaks"
17816 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17818 : ${with_no_leaks:=no}
17820 echo "$as_me:17820: result: $with_no_leaks" >&5
17821 echo "${ECHO_T}$with_no_leaks" >&6
17823 if test "$with_no_leaks" = yes ; then
17825 cat >>confdefs.h <<\EOF
17829 cat >>confdefs.h <<\EOF
17830 #define YY_NO_LEAKS 1
17836 echo "$as_me:17836: checking for an rpath option" >&5
17837 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17838 case $cf_cv_system_name in
17840 if test "$GCC" = yes; then
17841 LD_RPATH_OPT="-Wl,-rpath,"
17843 LD_RPATH_OPT="-rpath "
17846 (linux*|gnu*|k*bsd*-gnu|freebsd*)
17847 LD_RPATH_OPT="-Wl,-rpath,"
17849 (openbsd[2-9].*|mirbsd*)
17850 LD_RPATH_OPT="-Wl,-rpath,"
17853 LD_RPATH_OPT="-rpath "
17856 LD_RPATH_OPT="-Wl,-rpath,"
17859 LD_RPATH_OPT="-rpath "
17867 echo "$as_me:17867: result: $LD_RPATH_OPT" >&5
17868 echo "${ECHO_T}$LD_RPATH_OPT" >&6
17870 case "x$LD_RPATH_OPT" in
17872 echo "$as_me:17872: checking if we need a space after rpath option" >&5
17873 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17874 cf_save_LIBS="$LIBS"
17876 cf_add_libs="${LD_RPATH_OPT}$libdir"
17877 # Filter out duplicates - this happens with badly-designed ".pc" files...
17878 for cf_add_1lib in $LIBS
17880 for cf_add_2lib in $cf_add_libs
17882 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17888 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17890 LIBS="$cf_add_libs"
17892 cat >conftest.$ac_ext <<_ACEOF
17893 #line 17893 "configure"
17894 #include "confdefs.h"
17904 rm -f conftest.$ac_objext conftest$ac_exeext
17905 if { (eval echo "$as_me:17905: \"$ac_link\"") >&5
17906 (eval $ac_link) 2>&5
17908 echo "$as_me:17908: \$? = $ac_status" >&5
17909 (exit $ac_status); } &&
17910 { ac_try='test -s conftest$ac_exeext'
17911 { (eval echo "$as_me:17911: \"$ac_try\"") >&5
17912 (eval $ac_try) 2>&5
17914 echo "$as_me:17914: \$? = $ac_status" >&5
17915 (exit $ac_status); }; }; then
17918 echo "$as_me: failed program was:" >&5
17919 cat conftest.$ac_ext >&5
17922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17923 LIBS="$cf_save_LIBS"
17924 echo "$as_me:17924: result: $cf_rpath_space" >&5
17925 echo "${ECHO_T}$cf_rpath_space" >&6
17926 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17930 echo "$as_me:17930: checking if rpath-hack should be disabled" >&5
17931 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17933 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17934 if test "${enable_rpath_hack+set}" = set; then
17935 enableval="$enable_rpath_hack"
17936 test "$enableval" != no && enableval=yes
17937 if test "$enableval" != "yes" ; then
17938 cf_disable_rpath_hack=yes
17940 cf_disable_rpath_hack=no
17944 cf_disable_rpath_hack=no
17947 echo "$as_me:17947: result: $cf_disable_rpath_hack" >&5
17948 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17949 if test "$cf_disable_rpath_hack" = no ; then
17951 echo "$as_me:17951: checking for updated LDFLAGS" >&5
17952 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17953 if test -n "$LD_RPATH_OPT" ; then
17954 echo "$as_me:17954: result: maybe" >&5
17955 echo "${ECHO_T}maybe" >&6
17959 # Extract the first word of "$ac_prog", so it can be a program name with args.
17960 set dummy $ac_prog; ac_word=$2
17961 echo "$as_me:17961: checking for $ac_word" >&5
17962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17963 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17964 echo $ECHO_N "(cached) $ECHO_C" >&6
17966 if test -n "$cf_ldd_prog"; then
17967 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17969 ac_save_IFS=$IFS; IFS=$ac_path_separator
17971 for ac_dir in $ac_dummy; do
17973 test -z "$ac_dir" && ac_dir=.
17974 $as_executable_p "$ac_dir/$ac_word" || continue
17975 ac_cv_prog_cf_ldd_prog="$ac_prog"
17976 echo "$as_me:17976: found $ac_dir/$ac_word" >&5
17982 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17983 if test -n "$cf_ldd_prog"; then
17984 echo "$as_me:17984: result: $cf_ldd_prog" >&5
17985 echo "${ECHO_T}$cf_ldd_prog" >&6
17987 echo "$as_me:17987: result: no" >&5
17988 echo "${ECHO_T}no" >&6
17991 test -n "$cf_ldd_prog" && break
17993 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
17995 cf_rpath_list="/usr/lib /lib"
17996 if test "$cf_ldd_prog" != no
18000 cat >conftest.$ac_ext <<_ACEOF
18001 #line 18001 "configure"
18002 #include "confdefs.h"
18012 rm -f conftest.$ac_objext conftest$ac_exeext
18013 if { (eval echo "$as_me:18013: \"$ac_link\"") >&5
18014 (eval $ac_link) 2>&5
18016 echo "$as_me:18016: \$? = $ac_status" >&5
18017 (exit $ac_status); } &&
18018 { ac_try='test -s conftest$ac_exeext'
18019 { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020 (eval $ac_try) 2>&5
18022 echo "$as_me:18022: \$? = $ac_status" >&5
18023 (exit $ac_status); }; }; then
18024 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
18025 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
18027 echo "$as_me: failed program was:" >&5
18028 cat conftest.$ac_ext >&5
18030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18032 # If we passed the link-test, but get a "not found" on a given library,
18033 # this could be due to inept reconfiguration of gcc to make it only
18034 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
18035 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
18036 # /usr/local libraries.
18037 if test -n "$cf_rpath_oops"
18039 for cf_rpath_src in $cf_rpath_oops
18041 for cf_rpath_dir in \
18046 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18048 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18050 echo "${as_me:-configure}:18050: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18052 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18060 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18062 echo "${as_me:-configure}:18062: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18064 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18066 echo "${as_me:-configure}:18066: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18069 for cf_rpath_src in $LDFLAGS
18071 case $cf_rpath_src in
18074 # check if this refers to a directory which we will ignore
18076 if test -n "$cf_rpath_list"
18078 for cf_rpath_item in $cf_rpath_list
18080 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18088 if test "$cf_rpath_skip" = no
18090 # transform the option
18091 if test "$LD_RPATH_OPT" = "-R " ; then
18092 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18094 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18097 # if we have not already added this, add it now
18098 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18099 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18101 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18103 echo "${as_me:-configure}:18103: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18105 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18110 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18112 LDFLAGS=$cf_rpath_dst
18114 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18116 echo "${as_me:-configure}:18116: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18118 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18120 echo "${as_me:-configure}:18120: testing ...checking LIBS $LIBS ..." 1>&5
18123 for cf_rpath_src in $LIBS
18125 case $cf_rpath_src in
18128 # check if this refers to a directory which we will ignore
18130 if test -n "$cf_rpath_list"
18132 for cf_rpath_item in $cf_rpath_list
18134 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18142 if test "$cf_rpath_skip" = no
18144 # transform the option
18145 if test "$LD_RPATH_OPT" = "-R " ; then
18146 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18148 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18151 # if we have not already added this, add it now
18152 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18153 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18155 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18157 echo "${as_me:-configure}:18157: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18159 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18164 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18168 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18170 echo "${as_me:-configure}:18170: testing ...checked LIBS $LIBS ..." 1>&5
18172 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18174 echo "${as_me:-configure}:18174: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18177 echo "$as_me:18177: result: no" >&5
18178 echo "${ECHO_T}no" >&6
18186 ac_config_files="$ac_config_files Makefile"
18187 ac_config_commands="$ac_config_commands default"
18188 cat >confcache <<\_ACEOF
18189 # This file is a shell script that caches the results of configure
18190 # tests run on this system so they can be shared between configure
18191 # scripts and configure runs, see configure's option --config-cache.
18192 # It is not useful on other systems. If it contains results you don't
18193 # want to keep, you may remove or edit it.
18195 # config.status only pays attention to the cache file if you give it
18196 # the --recheck option to rerun configure.
18198 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18199 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18200 # following values.
18204 # The following way of writing the cache mishandles newlines in values,
18205 # but we know of no workaround that is simple, portable, and efficient.
18206 # So, don't put newlines in cache variables' values.
18207 # Ultrix sh set writes to stderr and can't be redirected directly,
18208 # and sets the high bit in the cache file unless we assign to the vars.
18211 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18213 # `set' does not quote correctly, so add quotes (double-quote
18214 # substitution turns \\\\ into \\, and sed turns \\ into \).
18217 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18220 # `set' quotes correctly as required by POSIX, so do not add quotes.
18222 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18229 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18231 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18233 if cmp -s $cache_file confcache; then :; else
18234 if test -w $cache_file; then
18235 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18236 cat confcache >$cache_file
18238 echo "not updating unwritable cache $cache_file"
18243 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18244 # Let make expand exec_prefix.
18245 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18247 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18248 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18249 # trailing colons and then remove the whole line if VPATH becomes empty
18250 # (actually we leave an empty line to preserve line numbers).
18251 if test "x$srcdir" = x.; then
18252 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18253 s/:*\$(srcdir):*/:/;
18254 s/:*\${srcdir}:*/:/;
18256 s/^\([^=]*=[ ]*\):*/\1/;
18262 DEFS=-DHAVE_CONFIG_H
18264 : ${CONFIG_STATUS=./config.status}
18265 ac_clean_files_save=$ac_clean_files
18266 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18267 { echo "$as_me:18267: creating $CONFIG_STATUS" >&5
18268 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18269 cat >$CONFIG_STATUS <<_ACEOF
18271 # Generated automatically by configure.
18272 # Run this file to recreate the current configuration.
18273 # Compiler output produced by configure, useful for debugging
18274 # configure, is in config.log if it exists.
18277 SHELL=\${CONFIG_SHELL-$SHELL}
18278 ac_cs_invocation="\$0 \$@"
18282 cat >>$CONFIG_STATUS <<\_ACEOF
18283 # Be Bourne compatible
18284 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18287 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18291 # Name of the executable.
18292 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18294 if expr a : '\(a\)' >/dev/null 2>&1; then
18300 rm -f conf$$ conf$$.exe conf$$.file
18302 if ln -s conf$$.file conf$$ 2>/dev/null; then
18303 # We could just check for DJGPP; but this test a) works b) is more generic
18304 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18305 if test -f conf$$.exe; then
18306 # Don't use ln at all; we don't have any links
18311 elif ln conf$$.file conf$$ 2>/dev/null; then
18316 rm -f conf$$ conf$$.exe conf$$.file
18318 as_executable_p="test -f"
18320 # Support unset when possible.
18321 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18328 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18329 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18330 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18331 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18332 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18333 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18334 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18335 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18338 # We need space, tab and new line, in precisely that order.
18344 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18350 # Files that config.status was made for.
18351 if test -n "$ac_config_files"; then
18352 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18355 if test -n "$ac_config_headers"; then
18356 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18359 if test -n "$ac_config_links"; then
18360 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18363 if test -n "$ac_config_commands"; then
18364 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18367 cat >>$CONFIG_STATUS <<\EOF
18370 \`$as_me' instantiates files from templates according to the
18371 current configuration.
18373 Usage: $0 [OPTIONS] [FILE]...
18375 -h, --help print this help, then exit
18376 -V, --version print version number, then exit
18377 -d, --debug don't remove temporary files
18378 --recheck update $as_me by reconfiguring in the same conditions
18379 --file=FILE[:TEMPLATE]
18380 instantiate the configuration file FILE
18381 --header=FILE[:TEMPLATE]
18382 instantiate the configuration header FILE
18384 Configuration files:
18387 Configuration headers:
18390 Configuration commands:
18393 Report bugs to <dickey@invisible-island.net>."
18396 cat >>$CONFIG_STATUS <<EOF
18399 configured by $0, generated by GNU Autoconf 2.52.20150926,
18400 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18402 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18403 Free Software Foundation, Inc.
18404 This config.status script is free software; the Free Software Foundation
18405 gives unlimited permission to copy, distribute and modify it."
18410 cat >>$CONFIG_STATUS <<\EOF
18411 # If no file are specified by the user, then we need to provide default
18412 # value. By we need to know if files were specified by the user.
18418 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18419 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18421 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18425 *) # This is not an option, so the user has probably given explicit
18427 ac_need_defaults=false;;
18431 # Handling of the options.
18433 cat >>$CONFIG_STATUS <<EOF
18434 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18435 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18436 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18438 cat >>$CONFIG_STATUS <<\EOF
18439 --version | --vers* | -V )
18440 echo "$ac_cs_version"; exit 0 ;;
18442 # Conflict between --help and --header
18443 { { echo "$as_me:18443: error: ambiguous option: $1
18444 Try \`$0 --help' for more information." >&5
18445 echo "$as_me: error: ambiguous option: $1
18446 Try \`$0 --help' for more information." >&2;}
18447 { (exit 1); exit 1; }; };;
18448 --help | --hel | -h )
18449 echo "$ac_cs_usage"; exit 0 ;;
18450 --debug | --d* | -d )
18452 --file | --fil | --fi | --f )
18454 CONFIG_FILES="$CONFIG_FILES $1"
18455 ac_need_defaults=false;;
18456 --header | --heade | --head | --hea )
18458 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18459 ac_need_defaults=false;;
18461 # This is an error.
18462 -*) { { echo "$as_me:18462: error: unrecognized option: $1
18463 Try \`$0 --help' for more information." >&5
18464 echo "$as_me: error: unrecognized option: $1
18465 Try \`$0 --help' for more information." >&2;}
18466 { (exit 1); exit 1; }; } ;;
18468 *) ac_config_targets="$ac_config_targets $1" ;;
18477 ## ----------------------- ##
18478 ## Running config.status. ##
18479 ## ----------------------- ##
18481 This file was extended by $as_me 2.52.20150926, executed with
18482 CONFIG_FILES = $CONFIG_FILES
18483 CONFIG_HEADERS = $CONFIG_HEADERS
18484 CONFIG_LINKS = $CONFIG_LINKS
18485 CONFIG_COMMANDS = $CONFIG_COMMANDS
18486 > $ac_cs_invocation
18487 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18492 cat >>$CONFIG_STATUS <<EOF
18494 # INIT-COMMANDS section.
18504 cat >>$CONFIG_STATUS <<\EOF
18505 for ac_config_target in $ac_config_targets
18507 case "$ac_config_target" in
18508 # Handling of arguments.
18509 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18510 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18511 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18512 *) { { echo "$as_me:18512: error: invalid argument: $ac_config_target" >&5
18513 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18514 { (exit 1); exit 1; }; };;
18518 # If the user did not use the arguments to specify the items to instantiate,
18519 # then the envvar interface is used. Set only those that are not.
18520 # We use the long form for the default assignment because of an extremely
18521 # bizarre bug on SunOS 4.1.3.
18522 if $ac_need_defaults; then
18523 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18524 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18525 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18528 # Create a temporary directory, and hook for its removal unless debugging.
18531 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18532 trap '{ (exit 1); exit 1; }' 1 2 13 15
18535 # Create a (secure) tmp directory for tmp files.
18538 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18539 test -n "$tmp" && test -d "$tmp"
18542 tmp=$TMPDIR/cs$$-$RANDOM
18543 (umask 077 && mkdir $tmp)
18546 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18547 { (exit 1); exit 1; }
18552 cat >>$CONFIG_STATUS <<EOF
18555 # CONFIG_FILES section.
18558 # No need to generate the scripts if there are no CONFIG_FILES.
18559 # This happens for instance when ./config.status config.h
18560 if test -n "\$CONFIG_FILES"; then
18561 # Protect against being on the right side of a sed subst in config.status.
18562 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18563 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18564 s,@SHELL@,$SHELL,;t t
18565 s,@exec_prefix@,$exec_prefix,;t t
18566 s,@prefix@,$prefix,;t t
18567 s,@program_transform_name@,$program_transform_name,;t t
18568 s,@bindir@,$bindir,;t t
18569 s,@sbindir@,$sbindir,;t t
18570 s,@libexecdir@,$libexecdir,;t t
18571 s,@datarootdir@,$datarootdir,;t t
18572 s,@datadir@,$datadir,;t t
18573 s,@sysconfdir@,$sysconfdir,;t t
18574 s,@sharedstatedir@,$sharedstatedir,;t t
18575 s,@localstatedir@,$localstatedir,;t t
18576 s,@libdir@,$libdir,;t t
18577 s,@includedir@,$includedir,;t t
18578 s,@oldincludedir@,$oldincludedir,;t t
18579 s,@infodir@,$infodir,;t t
18580 s,@mandir@,$mandir,;t t
18581 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18582 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18583 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18584 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18585 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18586 s,@build_alias@,$build_alias,;t t
18587 s,@host_alias@,$host_alias,;t t
18588 s,@target_alias@,$target_alias,;t t
18589 s,@ECHO_C@,$ECHO_C,;t t
18590 s,@ECHO_N@,$ECHO_N,;t t
18591 s,@ECHO_T@,$ECHO_T,;t t
18592 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18593 s,@DEFS@,$DEFS,;t t
18594 s,@LIBS@,$LIBS,;t t
18595 s,@build@,$build,;t t
18596 s,@build_cpu@,$build_cpu,;t t
18597 s,@build_vendor@,$build_vendor,;t t
18598 s,@build_os@,$build_os,;t t
18599 s,@host@,$host,;t t
18600 s,@host_cpu@,$host_cpu,;t t
18601 s,@host_vendor@,$host_vendor,;t t
18602 s,@host_os@,$host_os,;t t
18603 s,@SET_MAKE@,$SET_MAKE,;t t
18605 s,@CFLAGS@,$CFLAGS,;t t
18606 s,@LDFLAGS@,$LDFLAGS,;t t
18607 s,@CPPFLAGS@,$CPPFLAGS,;t t
18608 s,@ac_ct_CC@,$ac_ct_CC,;t t
18609 s,@EXEEXT@,$EXEEXT,;t t
18610 s,@OBJEXT@,$OBJEXT,;t t
18611 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18614 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18615 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18616 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18617 s,@LINT@,$LINT,;t t
18618 s,@LINT_OPTS@,$LINT_OPTS,;t t
18619 s,@CTAGS@,$CTAGS,;t t
18620 s,@ETAGS@,$ETAGS,;t t
18621 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18622 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18623 s,@MATH_LIB@,$MATH_LIB,;t t
18624 s,@top_builddir@,$top_builddir,;t t
18625 s,@CC_G_OPT@,$CC_G_OPT,;t t
18626 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18627 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18628 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18629 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18631 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18632 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18633 s,@LD_MODEL@,$LD_MODEL,;t t
18634 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18635 s,@LIBTOOL@,$LIBTOOL,;t t
18636 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18637 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18638 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18639 s,@LIB_LINK@,$LIB_LINK,;t t
18640 s,@LINK_TESTS@,$LINK_TESTS,;t t
18641 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18642 s,@PACKAGE@,$PACKAGE,;t t
18643 s,@PTHREAD@,$PTHREAD,;t t
18644 s,@TEST_ARGS@,$TEST_ARGS,;t t
18645 s,@TEST_DEPS@,$TEST_DEPS,;t t
18646 s,@TEST_LIBS@,$TEST_LIBS,;t t
18647 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18648 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18649 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18650 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18651 s,@includesubdir@,$includesubdir,;t t
18652 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18653 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18654 s,@ECHO_LT@,$ECHO_LT,;t t
18655 s,@ECHO_LD@,$ECHO_LD,;t t
18656 s,@RULE_CC@,$RULE_CC,;t t
18657 s,@SHOW_CC@,$SHOW_CC,;t t
18658 s,@ECHO_CC@,$ECHO_CC,;t t
18659 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18660 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18661 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18662 s,@X_CFLAGS@,$X_CFLAGS,;t t
18663 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18664 s,@X_LIBS@,$X_LIBS,;t t
18665 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18666 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18667 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18668 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18669 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18670 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18675 cat >>$CONFIG_STATUS <<\EOF
18676 # Split the substitutions into bite-sized pieces for seds with
18677 # small command number limits, like on Digital OSF/1 and HP-UX.
18678 ac_max_sed_lines=48
18679 ac_sed_frag=1 # Number of current file.
18680 ac_beg=1 # First line for current file.
18681 ac_end=$ac_max_sed_lines # Line after last line for current file.
18684 while $ac_more_lines; do
18685 if test $ac_beg -gt 1; then
18686 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18688 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18690 if test ! -s $tmp/subs.frag; then
18691 ac_more_lines=false
18693 # The purpose of the label and of the branching condition is to
18694 # speed up the sed processing (if there are no `@' at all, there
18695 # is no need to browse any of the substitutions).
18696 # These are the two extra sed commands mentioned above.
18698 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18699 # It is possible to make a multiline substitution using escaped newlines.
18700 # Ensure that we do not split the substitution between script fragments.
18702 ac_END=`expr $ac_end + $ac_max_sed_lines`
18703 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18704 if test -s $tmp/subs.next; then
18705 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18706 if test ! -s $tmp/subs.edit; then
18707 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18708 if test ! -s $tmp/subs.edit; then
18709 if test $ac_beg -gt 1; then
18710 ac_end=`expr $ac_end - 1`
18717 if test -z "$ac_sed_cmds"; then
18718 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18720 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18722 ac_sed_frag=`expr $ac_sed_frag + 1`
18724 ac_end=`expr $ac_end + $ac_max_sed_lines`
18727 if test -z "$ac_sed_cmds"; then
18730 fi # test -n "$CONFIG_FILES"
18733 cat >>$CONFIG_STATUS <<\EOF
18734 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18735 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18737 - | *:- | *:-:* ) # input from stdin
18739 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18740 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18741 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18742 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18743 * ) ac_file_in=$ac_file.in ;;
18746 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18747 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18748 X"$ac_file" : 'X\(//\)[^/]' \| \
18749 X"$ac_file" : 'X\(//\)$' \| \
18750 X"$ac_file" : 'X\(/\)' \| \
18751 . : '\(.\)' 2>/dev/null ||
18753 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18754 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18755 /^X\(\/\/\)$/{ s//\1/; q; }
18756 /^X\(\/\).*/{ s//\1/; q; }
18758 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18759 { case "$ac_dir" in
18760 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18764 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18765 case $as_mkdir_dir in
18766 # Skip DOS drivespec
18767 ?:) as_incr_dir=$as_mkdir_dir ;;
18769 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18770 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18775 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18776 # A "../" for each directory in $ac_dir_suffix.
18777 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18779 ac_dir_suffix= ac_dots=
18784 if test -z "$ac_dots"; then
18787 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18789 [\\/]* | ?:[\\/]* )
18790 ac_srcdir=$srcdir$ac_dir_suffix;
18791 ac_top_srcdir=$srcdir ;;
18792 *) # Relative path.
18793 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18794 ac_top_srcdir=$ac_dots$srcdir ;;
18798 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18799 *) ac_INSTALL=$ac_dots$INSTALL ;;
18802 if test x"$ac_file" != x-; then
18803 { echo "$as_me:18803: creating $ac_file" >&5
18804 echo "$as_me: creating $ac_file" >&6;}
18807 # Let's still pretend it is `configure' which instantiates (i.e., don't
18808 # use $as_me), people would be surprised to read:
18809 # /* config.h. Generated automatically by config.status. */
18810 configure_input="Generated automatically from `echo $ac_file_in |
18811 sed 's,.*/,,'` by configure."
18813 # First look for the input files in the build tree, otherwise in the
18815 ac_file_inputs=`IFS=:
18816 for f in $ac_file_in; do
18818 -) echo $tmp/stdin ;;
18820 # Absolute (can't be DOS-style, as IFS=:)
18821 test -f "$f" || { { echo "$as_me:18821: error: cannot find input file: $f" >&5
18822 echo "$as_me: error: cannot find input file: $f" >&2;}
18823 { (exit 1); exit 1; }; }
18826 if test -f "$f"; then
18829 elif test -f "$srcdir/$f"; then
18834 { { echo "$as_me:18834: error: cannot find input file: $f" >&5
18835 echo "$as_me: error: cannot find input file: $f" >&2;}
18836 { (exit 1); exit 1; }; }
18839 done` || { (exit 1); exit 1; }
18841 cat >>$CONFIG_STATUS <<\EOF
18842 ac_warn_datarootdir=no
18843 if test x"$ac_file" != x-; then
18844 for ac_item in $ac_file_inputs
18846 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18847 if test -n "$ac_seen"; then
18848 ac_used=`grep '@datarootdir@' $ac_item`
18849 if test -z "$ac_used"; then
18850 { echo "$as_me:18850: WARNING: datarootdir was used implicitly but not set:
18852 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18854 ac_warn_datarootdir=yes
18857 ac_seen=`grep '${datarootdir}' $ac_item`
18858 if test -n "$ac_seen"; then
18859 { echo "$as_me:18859: WARNING: datarootdir was used explicitly but not set:
18861 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18863 ac_warn_datarootdir=yes
18868 if test "x$ac_warn_datarootdir" = xyes; then
18869 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18873 cat >>$CONFIG_STATUS <<EOF
18877 cat >>$CONFIG_STATUS <<\EOF
18879 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18880 s,@configure_input@,$configure_input,;t t
18881 s,@srcdir@,$ac_srcdir,;t t
18882 s,@top_srcdir@,$ac_top_srcdir,;t t
18883 s,@INSTALL@,$ac_INSTALL,;t t
18884 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18886 if test x"$ac_file" != x-; then
18887 cp $tmp/out $ac_file
18889 for ac_name in prefix exec_prefix datarootdir
18891 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18892 if test -n "$ac_seen"; then
18893 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18894 if test -z "$ac_init"; then
18895 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18896 { echo "$as_me:18896: WARNING: Variable $ac_name is used but was not set:
18898 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18903 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18904 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18905 if test -s $tmp/out; then
18906 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18907 { echo "$as_me:18907: WARNING: Some variables may not be substituted:
18909 echo "$as_me: WARNING: Some variables may not be substituted:
18919 cat >>$CONFIG_STATUS <<\EOF
18922 # CONFIG_HEADER section.
18925 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18926 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18928 # ac_d sets the value in "#define NAME VALUE" lines.
18929 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18930 ac_dB='[ ].*$,\1#\2'
18933 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18934 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18935 ac_iB='\([ ]\),\1#\2define\3'
18938 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18939 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18940 ac_uB='$,\1#\2define\3'
18944 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18945 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18947 - | *:- | *:-:* ) # input from stdin
18949 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18950 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18951 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18952 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18953 * ) ac_file_in=$ac_file.in ;;
18956 test x"$ac_file" != x- && { echo "$as_me:18956: creating $ac_file" >&5
18957 echo "$as_me: creating $ac_file" >&6;}
18959 # First look for the input files in the build tree, otherwise in the
18961 ac_file_inputs=`IFS=:
18962 for f in $ac_file_in; do
18964 -) echo $tmp/stdin ;;
18966 # Absolute (can't be DOS-style, as IFS=:)
18967 test -f "$f" || { { echo "$as_me:18967: error: cannot find input file: $f" >&5
18968 echo "$as_me: error: cannot find input file: $f" >&2;}
18969 { (exit 1); exit 1; }; }
18972 if test -f "$f"; then
18975 elif test -f "$srcdir/$f"; then
18980 { { echo "$as_me:18980: error: cannot find input file: $f" >&5
18981 echo "$as_me: error: cannot find input file: $f" >&2;}
18982 { (exit 1); exit 1; }; }
18985 done` || { (exit 1); exit 1; }
18986 # Remove the trailing spaces.
18987 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18991 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18992 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18993 # be either 'cat' or 'sort'.
18994 cat confdefs.h | uniq >conftest.vals
18996 # Break up conftest.vals because some shells have a limit on
18997 # the size of here documents, and old seds have small limits too.
18999 rm -f conftest.tail
19000 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
19001 while grep . conftest.vals >/dev/null
19003 # Write chunks of a limited-size here document to conftest.frag.
19004 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19005 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19006 echo 'CEOF' >> $CONFIG_STATUS
19007 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19008 rm -f conftest.vals
19009 mv conftest.tail conftest.vals
19011 rm -f conftest.vals
19013 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19015 echo ' cat >> conftest.edit <<CEOF
19016 /@DEFS@/r conftest.frag
19019 sed -f conftest.edit $tmp/in > $tmp/out
19021 mv $tmp/out $tmp/in
19022 rm -f conftest.edit conftest.frag
19023 ' >> $CONFIG_STATUS
19025 cat >>$CONFIG_STATUS <<\EOF
19026 # Let's still pretend it is `configure' which instantiates (i.e., don't
19027 # use $as_me), people would be surprised to read:
19028 # /* config.h. Generated automatically by config.status. */
19029 if test x"$ac_file" = x-; then
19030 echo "/* Generated automatically by configure. */" >$tmp/config.h
19032 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19034 cat $tmp/in >>$tmp/config.h
19036 if test x"$ac_file" != x-; then
19037 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19038 { echo "$as_me:19038: $ac_file is unchanged" >&5
19039 echo "$as_me: $ac_file is unchanged" >&6;}
19041 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19042 X"$ac_file" : 'X\(//\)[^/]' \| \
19043 X"$ac_file" : 'X\(//\)$' \| \
19044 X"$ac_file" : 'X\(/\)' \| \
19045 . : '\(.\)' 2>/dev/null ||
19047 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19048 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19049 /^X\(\/\/\)$/{ s//\1/; q; }
19050 /^X\(\/\).*/{ s//\1/; q; }
19052 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19053 { case "$ac_dir" in
19054 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19058 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19059 case $as_mkdir_dir in
19060 # Skip DOS drivespec
19061 ?:) as_incr_dir=$as_mkdir_dir ;;
19063 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19064 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19071 mv $tmp/config.h $ac_file
19075 rm -f $tmp/config.h
19079 cat >>$CONFIG_STATUS <<\EOF
19081 # CONFIG_COMMANDS section.
19083 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19084 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19085 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19092 if test ! -d $srcdir/$cf_dir; then
19094 elif test -f $srcdir/$cf_dir/programs; then
19095 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19099 cat >>Makefile <<TEST_EOF
19101 # These rules are generated so we do not rely on suffix rules, which do not
19102 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19103 # some, and the '\$x' confuses others).
19106 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19109 cat >>Makefile <<TEST_EOF
19111 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19112 \$(srcdir)/test.priv.h \\
19115 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
19119 if test -f ../config.guess && test -f ../config.sub
19121 cat >>Makefile <<TEST_EOF
19123 # if we used CF_INHERIT for getting these files, we can remove them
19125 rm -f config.guess config.sub
19133 cat >>$CONFIG_STATUS <<\EOF
19135 { (exit 0); exit 0; }
19137 chmod +x $CONFIG_STATUS
19138 ac_clean_files=$ac_clean_files_save
19140 # configure is writing to config.log, and then calls config.status.
19141 # config.status does its own redirection, appending to config.log.
19142 # Unfortunately, on DOS this fails, as config.log is still kept open
19143 # by configure, so config.status won't be able to write to it; its
19144 # output is simply discarded. So we exec the FD to /dev/null,
19145 # effectively closing config.log, so it can be properly (re)opened and
19146 # appended to by config.status. When coming back to configure, we
19147 # need to make the FD available again.
19148 if test "$no_create" != yes; then
19151 $SHELL $CONFIG_STATUS || ac_cs_success=false
19153 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19154 # would make configure fail if this is the last instruction.
19155 $ac_cs_success || { (exit 1); exit 1; }