2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20150926.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
148 # Identity of this package.
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
189 cache_file=config.cache ;;
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 datadir=$ac_optarg ;;
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
224 eval "enable_$ac_feature='$ac_optarg'" ;;
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
239 -help | --help | --hel | --he | -h)
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
263 -libdir | --libdir | --libdi | --libd)
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290 # Obsolete; use --without-fp.
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
329 -program-transform-name | --program-transform-name \
330 | --program-transform-nam | --program-transform-na \
331 | --program-transform-n | --program-transform- \
332 | --program-transform | --program-transfor \
333 | --program-transfo | --program-transf \
334 | --program-trans | --program-tran \
335 | --progr-tra | --program-tr | --program-t)
336 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 sbindir=$ac_optarg ;;
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 sharedstatedir=$ac_optarg ;;
367 -site | --site | --sit)
369 -site=* | --site=* | --sit=*)
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
392 -version | --version | --versio | --versi | --vers | -V)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
406 eval "with_$ac_package='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
418 # Obsolete; use --with-x.
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
461 if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
470 eval ac_val=$`echo $ac_var`
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
482 eval ac_val=$`echo $ac_var`
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510 test "$silent" = yes && exec 6>/dev/null
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
570 # Report the --help message.
572 if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
576 \`configure' configures this package to adapt to many kinds of systems.
578 Usage: $0 [OPTION]... [VAR=VALUE]...
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE. See below for descriptions of some of the useful variables.
583 Defaults for the options are specified in brackets.
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
599 Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
610 For better control, use the options below.
612 Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
645 if test -n "$ac_init_help"; then
650 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
654 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
655 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
658 --with-pkg-config{=path} enable/disable use of pkg-config
659 --disable-echo do not display "compiling" commands
660 Curses Version-dependent Options:
661 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662 --disable-widec disable checks for wide-character functions
663 --with-curses-dir=DIR directory in which (n)curses is installed
664 --with-screen=XXX use specified curses-libraries
665 --with-ncursesw use wide ncurses-libraries
666 --with-ncurses use ncurses-libraries
667 --with-pdcurses compile/link with pdcurses X11 library
668 --with-curses-colr compile/link with HPUX 10.x color-curses
669 --with-curses-5lib compile/link with SunOS 5lib curses
670 --with-Xaw3d link with Xaw 3d library
671 --with-Xaw3dxft link with Xaw 3d xft library
672 --with-neXtaw link with neXT Athena library
673 --with-XawPlus link with Athena-Plus library
674 --with-x use the X Window System
675 Testing/development Options:
676 --enable-warnings test: turn on gcc compiler warnings
677 --with-dmalloc test: use Gray Watson's dmalloc library
678 --with-dbmalloc test: use Conor Cahill's dbmalloc library
679 --with-valgrind test: use valgrind
680 --disable-leaks test: free permanent memory, analyze leaks
681 --disable-rpath-hack don't add rpath options for additional libraries
683 Some influential environment variables:
684 CC C compiler command
685 CFLAGS C compiler flags
686 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
687 nonstandard directory <lib dir>
688 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
689 headers in a nonstandard directory <include dir>
692 Use these variables to override the choices made by `configure' or to help
693 it to find libraries and programs with nonstandard names/locations.
698 if test "$ac_init_help" = "recursive"; then
699 # If there are subdirs, report their specific --help.
701 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
703 # A "../" for each directory in /$ac_subdir.
704 ac_dots=`echo $ac_subdir |
705 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
708 .) # No --srcdir option. We are building in place.
709 ac_sub_srcdir=$srcdir ;;
710 [\\/]* | ?:[\\/]* ) # Absolute path.
711 ac_sub_srcdir=$srcdir/$ac_subdir ;;
713 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
716 # Check for guested configure; otherwise get Cygnus style configure.
717 if test -f $ac_sub_srcdir/configure.gnu; then
719 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
720 elif test -f $ac_sub_srcdir/configure; then
722 $SHELL $ac_sub_srcdir/configure --help=recursive
723 elif test -f $ac_sub_srcdir/configure.ac ||
724 test -f $ac_sub_srcdir/configure.in; then
728 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
734 test -n "$ac_init_help" && exit 0
735 if $ac_init_version; then
738 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
739 Free Software Foundation, Inc.
740 This configure script is free software; the Free Software Foundation
741 gives unlimited permission to copy, distribute and modify it.
747 This file contains any messages produced by compilers while
748 running configure, to aid debugging if configure makes a mistake.
750 It was created by $as_me, which was
751 generated by GNU Autoconf 2.52.20150926. Invocation command line was
762 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
763 uname -m = `(uname -m) 2>/dev/null || echo unknown`
764 uname -r = `(uname -r) 2>/dev/null || echo unknown`
765 uname -s = `(uname -s) 2>/dev/null || echo unknown`
766 uname -v = `(uname -v) 2>/dev/null || echo unknown`
768 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
769 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
771 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
772 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
773 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
774 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
775 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
776 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
777 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
791 # Keep a trace of the command line.
792 # Strip out --no-create and --no-recursion so they do not pile up.
793 # Also quote any args containing shell meta-characters.
799 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
800 | --no-cr | --no-c) ;;
801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
803 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
804 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
805 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
807 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
810 # Get rid of the leading space.
813 # When interrupted or exit'd, cleanup temporary files, and complete
814 # config.log. We remove comments because anyway the quotes in there
815 # would cause problems or look ugly.
817 # Save into config.log some information that might help in debugging.
819 echo "## ----------------- ##" >&5
820 echo "## Cache variables. ##" >&5
821 echo "## ----------------- ##" >&5
823 # The following way of writing the cache mishandles newlines in values,
826 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
829 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
834 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
838 sed "/^$/d" confdefs.h >conftest.log
839 if test -s conftest.log; then
841 echo "## ------------ ##" >&5
842 echo "## confdefs.h. ##" >&5
843 echo "## ------------ ##" >&5
848 test "$ac_signal" != 0 &&
849 echo "$as_me: caught signal $ac_signal" >&5
850 echo "$as_me: exit $exit_status" >&5
851 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
854 for ac_signal in 1 2 13 15; do
855 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
859 # confdefs.h avoids OS command line length limits that DEFS can exceed.
860 rm -rf conftest* confdefs.h
861 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
864 # Let the site file select an alternate cache file if it wants to.
865 # Prefer explicitly selected file to automatically selected ones.
866 if test -z "$CONFIG_SITE"; then
867 if test "x$prefix" != xNONE; then
868 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
870 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
873 for ac_site_file in $CONFIG_SITE; do
874 if test -r "$ac_site_file"; then
875 { echo "$as_me:875: loading site script $ac_site_file" >&5
876 echo "$as_me: loading site script $ac_site_file" >&6;}
877 cat "$ac_site_file" >&5
882 if test -r "$cache_file"; then
883 # Some versions of bash will fail to source /dev/null (special
884 # files actually), so we avoid doing that.
885 if test -f "$cache_file"; then
886 { echo "$as_me:886: loading cache $cache_file" >&5
887 echo "$as_me: loading cache $cache_file" >&6;}
889 [\\/]* | ?:[\\/]* ) . $cache_file;;
894 { echo "$as_me:894: creating cache $cache_file" >&5
895 echo "$as_me: creating cache $cache_file" >&6;}
899 # Check that the precious variables saved in the cache have kept the same
901 ac_cache_corrupted=false
902 for ac_var in `(set) 2>&1 |
903 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
904 eval ac_old_set=\$ac_cv_env_${ac_var}_set
905 eval ac_new_set=\$ac_env_${ac_var}_set
906 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
907 eval ac_new_val="\$ac_env_${ac_var}_value"
908 case $ac_old_set,$ac_new_set in
910 { echo "$as_me:910: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
911 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
912 ac_cache_corrupted=: ;;
914 { echo "$as_me:914: error: \`$ac_var' was not set in the previous run" >&5
915 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
916 ac_cache_corrupted=: ;;
919 if test "x$ac_old_val" != "x$ac_new_val"; then
920 { echo "$as_me:920: error: \`$ac_var' has changed since the previous run:" >&5
921 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
922 { echo "$as_me:922: former value: $ac_old_val" >&5
923 echo "$as_me: former value: $ac_old_val" >&2;}
924 { echo "$as_me:924: current value: $ac_new_val" >&5
925 echo "$as_me: current value: $ac_new_val" >&2;}
929 # Pass precious variables to config.status. It doesn't matter if
930 # we pass some twice (in addition to the command line arguments).
931 if test "$ac_new_set" = set; then
933 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
935 ac_configure_args="$ac_configure_args '$ac_arg'"
937 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
942 if $ac_cache_corrupted; then
943 { echo "$as_me:943: error: changes in the environment can compromise the build" >&5
944 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
945 { { echo "$as_me:945: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
946 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
947 { (exit 1); exit 1; }; }
951 ac_cpp='$CPP $CPPFLAGS'
952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
955 ac_main_return=return
957 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
958 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
960 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
961 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
963 echo "#! $SHELL" >conftest.sh
964 echo "exit 0" >>conftest.sh
966 if { (echo "$as_me:966: PATH=\".;.\"; conftest.sh") >&5
967 (PATH=".;."; conftest.sh) 2>&5
969 echo "$as_me:969: \$? = $ac_status" >&5
970 (exit $ac_status); }; then
971 ac_path_separator=';'
975 PATH_SEPARATOR="$ac_path_separator"
978 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
980 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
982 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
985 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986 if test -f $ac_dir/install-sh; then
988 ac_install_sh="$ac_aux_dir/install-sh -c"
990 elif test -f $ac_dir/install.sh; then
992 ac_install_sh="$ac_aux_dir/install.sh -c"
994 elif test -f $ac_dir/shtool; then
996 ac_install_sh="$ac_aux_dir/shtool install -c"
1000 if test -z "$ac_aux_dir"; then
1001 { { echo "$as_me:1001: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1002 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1003 { (exit 1); exit 1; }; }
1005 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1006 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1007 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1009 # Make sure we can run config.sub.
1010 $ac_config_sub sun4 >/dev/null 2>&1 ||
1011 { { echo "$as_me:1011: error: cannot run $ac_config_sub" >&5
1012 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1013 { (exit 1); exit 1; }; }
1015 echo "$as_me:1015: checking build system type" >&5
1016 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1017 if test "${ac_cv_build+set}" = set; then
1018 echo $ECHO_N "(cached) $ECHO_C" >&6
1020 ac_cv_build_alias=$build_alias
1021 test -z "$ac_cv_build_alias" &&
1022 ac_cv_build_alias=`$ac_config_guess`
1023 test -z "$ac_cv_build_alias" &&
1024 { { echo "$as_me:1024: error: cannot guess build type; you must specify one" >&5
1025 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1026 { (exit 1); exit 1; }; }
1027 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1028 { { echo "$as_me:1028: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1029 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1030 { (exit 1); exit 1; }; }
1033 echo "$as_me:1033: result: $ac_cv_build" >&5
1034 echo "${ECHO_T}$ac_cv_build" >&6
1036 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1037 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1038 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1040 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1041 echo "$as_me:1041: checking host system type" >&5
1042 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1043 if test "${ac_cv_host+set}" = set; then
1044 echo $ECHO_N "(cached) $ECHO_C" >&6
1046 ac_cv_host_alias=$host_alias
1047 test -z "$ac_cv_host_alias" &&
1048 ac_cv_host_alias=$ac_cv_build_alias
1049 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1050 { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1051 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1052 { (exit 1); exit 1; }; }
1055 echo "$as_me:1055: result: $ac_cv_host" >&5
1056 echo "${ECHO_T}$ac_cv_host" >&6
1058 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1059 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1060 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1062 system_name="$host_os"
1064 system_name="`(uname -s -r) 2>/dev/null`"
1065 if test -z "$system_name" ; then
1066 system_name="`(hostname) 2>/dev/null`"
1069 test -n "$system_name" &&
1070 cat >>confdefs.h <<EOF
1071 #define SYSTEM_NAME "$system_name"
1074 if test "${cf_cv_system_name+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1077 cf_cv_system_name="$system_name"
1080 test -z "$system_name" && system_name="$cf_cv_system_name"
1081 test -n "$cf_cv_system_name" && echo "$as_me:1081: result: Configuring for $cf_cv_system_name" >&5
1082 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1084 if test ".$system_name" != ".$cf_cv_system_name" ; then
1085 echo "$as_me:1085: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1086 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1087 { { echo "$as_me:1087: error: \"Please remove config.cache and try again.\"" >&5
1088 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1089 { (exit 1); exit 1; }; }
1092 test "$program_prefix" != NONE &&
1093 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1094 # Use a double $ so make ignores it.
1095 test "$program_suffix" != NONE &&
1096 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1097 # Double any \ or $. echo might interpret backslashes.
1098 # By default was `s,x,x', remove it if useless.
1099 cat <<\_ACEOF >conftest.sed
1100 s/[\\$]/&&/g;s/;s,x,x,$//
1102 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1105 echo "$as_me:1105: checking whether ${MAKE-make} sets \${MAKE}" >&5
1106 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1107 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1108 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1109 echo $ECHO_N "(cached) $ECHO_C" >&6
1111 cat >conftest.make <<\EOF
1113 @echo 'ac_maketemp="${MAKE}"'
1115 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1116 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1117 if test -n "$ac_maketemp"; then
1118 eval ac_cv_prog_make_${ac_make}_set=yes
1120 eval ac_cv_prog_make_${ac_make}_set=no
1124 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1125 echo "$as_me:1125: result: yes" >&5
1126 echo "${ECHO_T}yes" >&6
1129 echo "$as_me:1129: result: no" >&5
1130 echo "${ECHO_T}no" >&6
1131 SET_MAKE="MAKE=${MAKE-make}"
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140 if test -n "$ac_tool_prefix"; then
1141 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1142 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1143 echo "$as_me:1143: checking for $ac_word" >&5
1144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145 if test "${ac_cv_prog_CC+set}" = set; then
1146 echo $ECHO_N "(cached) $ECHO_C" >&6
1148 if test -n "$CC"; then
1149 ac_cv_prog_CC="$CC" # Let the user override the test.
1151 ac_save_IFS=$IFS; IFS=$ac_path_separator
1153 for ac_dir in $ac_dummy; do
1155 test -z "$ac_dir" && ac_dir=.
1156 $as_executable_p "$ac_dir/$ac_word" || continue
1157 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1158 echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1165 if test -n "$CC"; then
1166 echo "$as_me:1166: result: $CC" >&5
1167 echo "${ECHO_T}$CC" >&6
1169 echo "$as_me:1169: result: no" >&5
1170 echo "${ECHO_T}no" >&6
1174 if test -z "$ac_cv_prog_CC"; then
1176 # Extract the first word of "gcc", so it can be a program name with args.
1177 set dummy gcc; ac_word=$2
1178 echo "$as_me:1178: checking for $ac_word" >&5
1179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181 echo $ECHO_N "(cached) $ECHO_C" >&6
1183 if test -n "$ac_ct_CC"; then
1184 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1186 ac_save_IFS=$IFS; IFS=$ac_path_separator
1188 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 $as_executable_p "$ac_dir/$ac_word" || continue
1192 ac_cv_prog_ac_ct_CC="gcc"
1193 echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1199 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200 if test -n "$ac_ct_CC"; then
1201 echo "$as_me:1201: result: $ac_ct_CC" >&5
1202 echo "${ECHO_T}$ac_ct_CC" >&6
1204 echo "$as_me:1204: result: no" >&5
1205 echo "${ECHO_T}no" >&6
1213 if test -z "$CC"; then
1214 if test -n "$ac_tool_prefix"; then
1215 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1216 set dummy ${ac_tool_prefix}cc; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_CC+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$CC"; then
1223 ac_cv_prog_CC="$CC" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_CC="${ac_tool_prefix}cc"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1239 if test -n "$CC"; then
1240 echo "$as_me:1240: result: $CC" >&5
1241 echo "${ECHO_T}$CC" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1248 if test -z "$ac_cv_prog_CC"; then
1250 # Extract the first word of "cc", so it can be a program name with args.
1251 set dummy cc; ac_word=$2
1252 echo "$as_me:1252: checking for $ac_word" >&5
1253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1254 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1257 if test -n "$ac_ct_CC"; then
1258 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1260 ac_save_IFS=$IFS; IFS=$ac_path_separator
1262 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 $as_executable_p "$ac_dir/$ac_word" || continue
1266 ac_cv_prog_ac_ct_CC="cc"
1267 echo "$as_me:1267: found $ac_dir/$ac_word" >&5
1273 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1274 if test -n "$ac_ct_CC"; then
1275 echo "$as_me:1275: result: $ac_ct_CC" >&5
1276 echo "${ECHO_T}$ac_ct_CC" >&6
1278 echo "$as_me:1278: result: no" >&5
1279 echo "${ECHO_T}no" >&6
1288 if test -z "$CC"; then
1289 # Extract the first word of "cc", so it can be a program name with args.
1290 set dummy cc; ac_word=$2
1291 echo "$as_me:1291: checking for $ac_word" >&5
1292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1293 if test "${ac_cv_prog_CC+set}" = set; then
1294 echo $ECHO_N "(cached) $ECHO_C" >&6
1296 if test -n "$CC"; then
1297 ac_cv_prog_CC="$CC" # Let the user override the test.
1300 ac_save_IFS=$IFS; IFS=$ac_path_separator
1302 for ac_dir in $ac_dummy; do
1304 test -z "$ac_dir" && ac_dir=.
1305 $as_executable_p "$ac_dir/$ac_word" || continue
1306 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1307 ac_prog_rejected=yes
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1315 if test $ac_prog_rejected = yes; then
1316 # We found a bogon in the path, so make sure we never use it.
1317 set dummy $ac_cv_prog_CC
1319 if test $# != 0; then
1320 # We chose a different compiler from the bogus one.
1321 # However, it has the same basename, so the bogon will be chosen
1322 # first if we set CC to just the basename; use the full file name.
1324 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1332 if test -n "$CC"; then
1333 echo "$as_me:1333: result: $CC" >&5
1334 echo "${ECHO_T}$CC" >&6
1336 echo "$as_me:1336: result: no" >&5
1337 echo "${ECHO_T}no" >&6
1341 if test -z "$CC"; then
1342 if test -n "$ac_tool_prefix"; then
1345 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1346 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1347 echo "$as_me:1347: checking for $ac_word" >&5
1348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1349 if test "${ac_cv_prog_CC+set}" = set; then
1350 echo $ECHO_N "(cached) $ECHO_C" >&6
1352 if test -n "$CC"; then
1353 ac_cv_prog_CC="$CC" # Let the user override the test.
1355 ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 for ac_dir in $ac_dummy; do
1359 test -z "$ac_dir" && ac_dir=.
1360 $as_executable_p "$ac_dir/$ac_word" || continue
1361 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1362 echo "$as_me:1362: found $ac_dir/$ac_word" >&5
1369 if test -n "$CC"; then
1370 echo "$as_me:1370: result: $CC" >&5
1371 echo "${ECHO_T}$CC" >&6
1373 echo "$as_me:1373: result: no" >&5
1374 echo "${ECHO_T}no" >&6
1377 test -n "$CC" && break
1380 if test -z "$CC"; then
1384 # Extract the first word of "$ac_prog", so it can be a program name with args.
1385 set dummy $ac_prog; ac_word=$2
1386 echo "$as_me:1386: checking for $ac_word" >&5
1387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1389 echo $ECHO_N "(cached) $ECHO_C" >&6
1391 if test -n "$ac_ct_CC"; then
1392 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1394 ac_save_IFS=$IFS; IFS=$ac_path_separator
1396 for ac_dir in $ac_dummy; do
1398 test -z "$ac_dir" && ac_dir=.
1399 $as_executable_p "$ac_dir/$ac_word" || continue
1400 ac_cv_prog_ac_ct_CC="$ac_prog"
1401 echo "$as_me:1401: found $ac_dir/$ac_word" >&5
1407 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1408 if test -n "$ac_ct_CC"; then
1409 echo "$as_me:1409: result: $ac_ct_CC" >&5
1410 echo "${ECHO_T}$ac_ct_CC" >&6
1412 echo "$as_me:1412: result: no" >&5
1413 echo "${ECHO_T}no" >&6
1416 test -n "$ac_ct_CC" && break
1424 test -z "$CC" && { { echo "$as_me:1424: error: no acceptable cc found in \$PATH" >&5
1425 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1426 { (exit 1); exit 1; }; }
1428 # Provide some information about the compiler.
1429 echo "$as_me:1429:" \
1430 "checking for C compiler version" >&5
1431 ac_compiler=`set X $ac_compile; echo $2`
1432 { (eval echo "$as_me:1432: \"$ac_compiler --version </dev/null >&5\"") >&5
1433 (eval $ac_compiler --version </dev/null >&5) 2>&5
1435 echo "$as_me:1435: \$? = $ac_status" >&5
1436 (exit $ac_status); }
1437 { (eval echo "$as_me:1437: \"$ac_compiler -v </dev/null >&5\"") >&5
1438 (eval $ac_compiler -v </dev/null >&5) 2>&5
1440 echo "$as_me:1440: \$? = $ac_status" >&5
1441 (exit $ac_status); }
1442 { (eval echo "$as_me:1442: \"$ac_compiler -V </dev/null >&5\"") >&5
1443 (eval $ac_compiler -V </dev/null >&5) 2>&5
1445 echo "$as_me:1445: \$? = $ac_status" >&5
1446 (exit $ac_status); }
1448 cat >conftest.$ac_ext <<_ACEOF
1449 #line 1449 "configure"
1450 #include "confdefs.h"
1460 ac_clean_files_save=$ac_clean_files
1461 ac_clean_files="$ac_clean_files a.out a.exe"
1462 # Try to create an executable without -o first, disregard a.out.
1463 # It will help us diagnose broken compilers, and finding out an intuition
1465 echo "$as_me:1465: checking for C compiler default output" >&5
1466 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1467 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1468 if { (eval echo "$as_me:1468: \"$ac_link_default\"") >&5
1469 (eval $ac_link_default) 2>&5
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit $ac_status); }; then
1473 # Find the output, starting from the most likely. This scheme is
1474 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1476 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1477 ls a.out conftest 2>/dev/null;
1478 ls a.* conftest.* 2>/dev/null`; do
1480 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481 a.out ) # We found the default executable, but exeext='' is most
1484 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1485 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1492 echo "$as_me: failed program was:" >&5
1493 cat conftest.$ac_ext >&5
1494 { { echo "$as_me:1494: error: C compiler cannot create executables" >&5
1495 echo "$as_me: error: C compiler cannot create executables" >&2;}
1496 { (exit 77); exit 77; }; }
1499 ac_exeext=$ac_cv_exeext
1500 echo "$as_me:1500: result: $ac_file" >&5
1501 echo "${ECHO_T}$ac_file" >&6
1503 # Check the compiler produces executables we can run. If not, either
1504 # the compiler is broken, or we cross compile.
1505 echo "$as_me:1505: checking whether the C compiler works" >&5
1506 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1507 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1508 # If not cross compiling, check that we can run a simple program.
1509 if test "$cross_compiling" != yes; then
1510 if { ac_try='./$ac_file'
1511 { (eval echo "$as_me:1511: \"$ac_try\"") >&5
1514 echo "$as_me:1514: \$? = $ac_status" >&5
1515 (exit $ac_status); }; }; then
1518 if test "$cross_compiling" = maybe; then
1521 { { echo "$as_me:1521: error: cannot run C compiled programs.
1522 If you meant to cross compile, use \`--host'." >&5
1523 echo "$as_me: error: cannot run C compiled programs.
1524 If you meant to cross compile, use \`--host'." >&2;}
1525 { (exit 1); exit 1; }; }
1529 echo "$as_me:1529: result: yes" >&5
1530 echo "${ECHO_T}yes" >&6
1532 rm -f a.out a.exe conftest$ac_cv_exeext
1533 ac_clean_files=$ac_clean_files_save
1534 # Check the compiler produces executables we can run. If not, either
1535 # the compiler is broken, or we cross compile.
1536 echo "$as_me:1536: checking whether we are cross compiling" >&5
1537 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1538 echo "$as_me:1538: result: $cross_compiling" >&5
1539 echo "${ECHO_T}$cross_compiling" >&6
1541 echo "$as_me:1541: checking for executable suffix" >&5
1542 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1543 if { (eval echo "$as_me:1543: \"$ac_link\"") >&5
1544 (eval $ac_link) 2>&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); }; then
1548 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1549 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1550 # work properly (i.e., refer to `conftest.exe'), while it won't with
1552 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1554 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1555 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1562 { { echo "$as_me:1562: error: cannot compute EXEEXT: cannot compile and link" >&5
1563 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1564 { (exit 1); exit 1; }; }
1567 rm -f conftest$ac_cv_exeext
1568 echo "$as_me:1568: result: $ac_cv_exeext" >&5
1569 echo "${ECHO_T}$ac_cv_exeext" >&6
1571 rm -f conftest.$ac_ext
1572 EXEEXT=$ac_cv_exeext
1574 echo "$as_me:1574: checking for object suffix" >&5
1575 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1576 if test "${ac_cv_objext+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1591 rm -f conftest.o conftest.obj
1592 if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); }; then
1597 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1599 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1600 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1605 echo "$as_me: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1607 { { echo "$as_me:1607: error: cannot compute OBJEXT: cannot compile" >&5
1608 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1609 { (exit 1); exit 1; }; }
1612 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1614 echo "$as_me:1614: result: $ac_cv_objext" >&5
1615 echo "${ECHO_T}$ac_cv_objext" >&6
1616 OBJEXT=$ac_cv_objext
1618 echo "$as_me:1618: checking whether we are using the GNU C compiler" >&5
1619 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1620 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1621 echo $ECHO_N "(cached) $ECHO_C" >&6
1623 cat >conftest.$ac_ext <<_ACEOF
1624 #line 1624 "configure"
1625 #include "confdefs.h"
1638 rm -f conftest.$ac_objext
1639 if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640 (eval $ac_compile) 2>&5
1642 echo "$as_me:1642: \$? = $ac_status" >&5
1643 (exit $ac_status); } &&
1644 { ac_try='test -s conftest.$ac_objext'
1645 { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); }; }; then
1652 echo "$as_me: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1656 rm -f conftest.$ac_objext conftest.$ac_ext
1657 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1660 echo "$as_me:1660: result: $ac_cv_c_compiler_gnu" >&5
1661 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1662 GCC=`test $ac_compiler_gnu = yes && echo yes`
1663 ac_test_CFLAGS=${CFLAGS+set}
1664 ac_save_CFLAGS=$CFLAGS
1666 echo "$as_me:1666: checking whether $CC accepts -g" >&5
1667 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1668 if test "${ac_cv_prog_cc_g+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1671 cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1683 rm -f conftest.$ac_objext
1684 if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5
1685 (eval $ac_compile) 2>&5
1687 echo "$as_me:1687: \$? = $ac_status" >&5
1688 (exit $ac_status); } &&
1689 { ac_try='test -s conftest.$ac_objext'
1690 { (eval echo "$as_me:1690: \"$ac_try\"") >&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); }; }; then
1697 echo "$as_me: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1701 rm -f conftest.$ac_objext conftest.$ac_ext
1703 echo "$as_me:1703: result: $ac_cv_prog_cc_g" >&5
1704 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1705 if test "$ac_test_CFLAGS" = set; then
1706 CFLAGS=$ac_save_CFLAGS
1707 elif test $ac_cv_prog_cc_g = yes; then
1708 if test "$GCC" = yes; then
1714 if test "$GCC" = yes; then
1720 # Some people use a C++ compiler to compile C. Since we use `exit',
1721 # in C++ we need to declare it. In case someone uses the same compiler
1722 # for both compiling C and C++ we need to have the C++ compiler decide
1723 # the declaration of exit, since it's the most demanding environment.
1724 cat >conftest.$ac_ext <<_ACEOF
1729 rm -f conftest.$ac_objext
1730 if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731 (eval $ac_compile) 2>&5
1733 echo "$as_me:1733: \$? = $ac_status" >&5
1734 (exit $ac_status); } &&
1735 { ac_try='test -s conftest.$ac_objext'
1736 { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); }; }; then
1741 for ac_declaration in \
1743 '#include <stdlib.h>' \
1744 'extern "C" void std::exit (int) throw (); using std::exit;' \
1745 'extern "C" void std::exit (int); using std::exit;' \
1746 'extern "C" void exit (int) throw ();' \
1747 'extern "C" void exit (int);' \
1750 cat >conftest.$ac_ext <<_ACEOF
1751 #line 1751 "configure"
1752 #include "confdefs.h"
1763 rm -f conftest.$ac_objext
1764 if { (eval echo "$as_me:1764: \"$ac_compile\"") >&5
1765 (eval $ac_compile) 2>&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); } &&
1769 { ac_try='test -s conftest.$ac_objext'
1770 { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); }; }; then
1777 echo "$as_me: failed program was:" >&5
1778 cat conftest.$ac_ext >&5
1781 rm -f conftest.$ac_objext conftest.$ac_ext
1782 cat >conftest.$ac_ext <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1794 rm -f conftest.$ac_objext
1795 if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit $ac_status); } &&
1800 { ac_try='test -s conftest.$ac_objext'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); }; }; then
1808 echo "$as_me: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
1811 rm -f conftest.$ac_objext conftest.$ac_ext
1814 if test -n "$ac_declaration"; then
1815 echo '#ifdef __cplusplus' >>confdefs.h
1816 echo $ac_declaration >>confdefs.h
1817 echo '#endif' >>confdefs.h
1821 echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1824 rm -f conftest.$ac_objext conftest.$ac_ext
1826 ac_cpp='$CPP $CPPFLAGS'
1827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830 ac_main_return=return
1833 if test "$GCC" = yes ; then
1834 echo "$as_me:1834: checking version of $CC" >&5
1835 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1836 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1837 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1838 echo "$as_me:1838: result: $GCC_VERSION" >&5
1839 echo "${ECHO_T}$GCC_VERSION" >&6
1842 echo "$as_me:1842: checking for $CC option to accept ANSI C" >&5
1843 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1844 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1845 echo $ECHO_N "(cached) $ECHO_C" >&6
1847 ac_cv_prog_cc_stdc=no
1849 cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1854 #include <sys/types.h>
1855 #include <sys/stat.h>
1856 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1857 struct buf { int x; };
1858 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1859 static char *e (p, i)
1865 static char *f (char * (*g) (char **, int), char **p, ...)
1870 s = g (p, va_arg (v,int));
1874 int test (int i, double x);
1875 struct s1 {int (*f) (int a);};
1876 struct s2 {int (*f) (double a);};
1877 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1883 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1888 # Don't try gcc -ansi; that turns off useful extensions and
1889 # breaks some systems' header files.
1890 # AIX -qlanglvl=ansi
1891 # Ultrix and OSF/1 -std1
1892 # HP-UX 10.20 and later -Ae
1893 # HP-UX older versions -Aa -D_HPUX_SOURCE
1894 # SVR4 -Xc -D__EXTENSIONS__
1895 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1897 CC="$ac_save_CC $ac_arg"
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900 (eval $ac_compile) 2>&5
1902 echo "$as_me:1902: \$? = $ac_status" >&5
1903 (exit $ac_status); } &&
1904 { ac_try='test -s conftest.$ac_objext'
1905 { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); }; }; then
1910 ac_cv_prog_cc_stdc=$ac_arg
1913 echo "$as_me: failed program was:" >&5
1914 cat conftest.$ac_ext >&5
1916 rm -f conftest.$ac_objext
1918 rm -f conftest.$ac_ext conftest.$ac_objext
1923 case "x$ac_cv_prog_cc_stdc" in
1925 echo "$as_me:1925: result: none needed" >&5
1926 echo "${ECHO_T}none needed" >&6 ;;
1928 echo "$as_me:1928: result: $ac_cv_prog_cc_stdc" >&5
1929 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1930 CC="$CC $ac_cv_prog_cc_stdc" ;;
1933 # This should have been defined by AC_PROG_CC
1936 echo "$as_me:1936: checking \$CC variable" >&5
1937 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1940 echo "$as_me:1940: result: broken" >&5
1941 echo "${ECHO_T}broken" >&6
1942 { echo "$as_me:1942: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1943 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1945 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ][ ]*//'`
1946 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1951 cf_new_extra_cppflags=
1953 for cf_add_cflags in $cf_flags
1955 case $cf_fix_cppflags in
1957 case $cf_add_cflags in
1958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1959 case $cf_add_cflags in
1961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1964 && test -z "${cf_tst_cflags}" \
1965 && cf_fix_cppflags=yes
1967 if test $cf_fix_cppflags = yes ; then
1968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1970 elif test "${cf_tst_cflags}" = "\"'" ; then
1971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1980 case $cf_add_cflags in
1982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1984 CPPFLAGS=`echo "$CPPFLAGS" | \
1985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2005 && test -z "${cf_tst_cflags}" \
2006 && cf_fix_cppflags=no
2011 if test -n "$cf_new_cflags" ; then
2013 CFLAGS="$CFLAGS $cf_new_cflags"
2016 if test -n "$cf_new_cppflags" ; then
2018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2021 if test -n "$cf_new_extra_cppflags" ; then
2023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2026 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2028 echo "${as_me:-configure}:2028: testing resulting CC: '$CC' ..." 1>&5
2030 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2032 echo "${as_me:-configure}:2032: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2034 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2036 echo "${as_me:-configure}:2036: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2040 echo "$as_me:2040: result: ok" >&5
2041 echo "${ECHO_T}ok" >&6
2046 ac_cpp='$CPP $CPPFLAGS'
2047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2050 ac_main_return=return
2051 echo "$as_me:2051: checking how to run the C preprocessor" >&5
2052 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2053 # On Suns, sometimes $CPP names a directory.
2054 if test -n "$CPP" && test -d "$CPP"; then
2057 if test -z "$CPP"; then
2058 if test "${ac_cv_prog_CPP+set}" = set; then
2059 echo $ECHO_N "(cached) $ECHO_C" >&6
2061 # Double quotes because CPP needs to be expanded
2062 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2065 for ac_c_preproc_warn_flag in '' yes
2067 # Use a header file that comes with gcc, so configuring glibc
2068 # with a fresh cross-compiler works.
2069 # On the NeXT, cc -E runs the code through the compiler's parser,
2070 # not just through cpp. "Syntax error" is here to catch this case.
2071 cat >conftest.$ac_ext <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2077 if { (eval echo "$as_me:2077: \"$ac_cpp conftest.$ac_ext\"") >&5
2078 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2080 egrep -v '^ *\+' conftest.er1 >conftest.err
2082 cat conftest.err >&5
2083 echo "$as_me:2083: \$? = $ac_status" >&5
2084 (exit $ac_status); } >/dev/null; then
2085 if test -s conftest.err; then
2086 ac_cpp_err=$ac_c_preproc_warn_flag
2093 if test -z "$ac_cpp_err"; then
2096 echo "$as_me: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 # Broken: fails on valid input.
2101 rm -f conftest.err conftest.$ac_ext
2103 # OK, works on sane cases. Now check whether non-existent headers
2104 # can be detected and how.
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <ac_nonexistent.h>
2110 if { (eval echo "$as_me:2110: \"$ac_cpp conftest.$ac_ext\"") >&5
2111 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2113 egrep -v '^ *\+' conftest.er1 >conftest.err
2115 cat conftest.err >&5
2116 echo "$as_me:2116: \$? = $ac_status" >&5
2117 (exit $ac_status); } >/dev/null; then
2118 if test -s conftest.err; then
2119 ac_cpp_err=$ac_c_preproc_warn_flag
2126 if test -z "$ac_cpp_err"; then
2127 # Broken: success on invalid input.
2130 echo "$as_me: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2132 # Passes both tests.
2136 rm -f conftest.err conftest.$ac_ext
2139 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2140 rm -f conftest.err conftest.$ac_ext
2141 if $ac_preproc_ok; then
2153 echo "$as_me:2153: result: $CPP" >&5
2154 echo "${ECHO_T}$CPP" >&6
2156 for ac_c_preproc_warn_flag in '' yes
2158 # Use a header file that comes with gcc, so configuring glibc
2159 # with a fresh cross-compiler works.
2160 # On the NeXT, cc -E runs the code through the compiler's parser,
2161 # not just through cpp. "Syntax error" is here to catch this case.
2162 cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171 egrep -v '^ *\+' conftest.er1 >conftest.err
2173 cat conftest.err >&5
2174 echo "$as_me:2174: \$? = $ac_status" >&5
2175 (exit $ac_status); } >/dev/null; then
2176 if test -s conftest.err; then
2177 ac_cpp_err=$ac_c_preproc_warn_flag
2184 if test -z "$ac_cpp_err"; then
2187 echo "$as_me: failed program was:" >&5
2188 cat conftest.$ac_ext >&5
2189 # Broken: fails on valid input.
2192 rm -f conftest.err conftest.$ac_ext
2194 # OK, works on sane cases. Now check whether non-existent headers
2195 # can be detected and how.
2196 cat >conftest.$ac_ext <<_ACEOF
2197 #line 2197 "configure"
2198 #include "confdefs.h"
2199 #include <ac_nonexistent.h>
2201 if { (eval echo "$as_me:2201: \"$ac_cpp conftest.$ac_ext\"") >&5
2202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204 egrep -v '^ *\+' conftest.er1 >conftest.err
2206 cat conftest.err >&5
2207 echo "$as_me:2207: \$? = $ac_status" >&5
2208 (exit $ac_status); } >/dev/null; then
2209 if test -s conftest.err; then
2210 ac_cpp_err=$ac_c_preproc_warn_flag
2217 if test -z "$ac_cpp_err"; then
2218 # Broken: success on invalid input.
2221 echo "$as_me: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2223 # Passes both tests.
2227 rm -f conftest.err conftest.$ac_ext
2230 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2231 rm -f conftest.err conftest.$ac_ext
2232 if $ac_preproc_ok; then
2235 { { echo "$as_me:2235: error: C preprocessor \"$CPP\" fails sanity check" >&5
2236 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2237 { (exit 1); exit 1; }; }
2241 ac_cpp='$CPP $CPPFLAGS'
2242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2245 ac_main_return=return
2247 for ac_prog in mawk gawk nawk awk
2249 # Extract the first word of "$ac_prog", so it can be a program name with args.
2250 set dummy $ac_prog; ac_word=$2
2251 echo "$as_me:2251: checking for $ac_word" >&5
2252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2253 if test "${ac_cv_prog_AWK+set}" = set; then
2254 echo $ECHO_N "(cached) $ECHO_C" >&6
2256 if test -n "$AWK"; then
2257 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2259 ac_save_IFS=$IFS; IFS=$ac_path_separator
2261 for ac_dir in $ac_dummy; do
2263 test -z "$ac_dir" && ac_dir=.
2264 $as_executable_p "$ac_dir/$ac_word" || continue
2265 ac_cv_prog_AWK="$ac_prog"
2266 echo "$as_me:2266: found $ac_dir/$ac_word" >&5
2273 if test -n "$AWK"; then
2274 echo "$as_me:2274: result: $AWK" >&5
2275 echo "${ECHO_T}$AWK" >&6
2277 echo "$as_me:2277: result: no" >&5
2278 echo "${ECHO_T}no" >&6
2281 test -n "$AWK" && break
2284 # Find a good install program. We prefer a C program (faster),
2285 # so one script is as good as another. But avoid the broken or
2286 # incompatible versions:
2287 # SysV /etc/install, /usr/sbin/install
2288 # SunOS /usr/etc/install
2289 # IRIX /sbin/install
2291 # AmigaOS /C/install, which installs bootblocks on floppy discs
2292 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2293 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2294 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2295 # ./install, which can be erroneously created by make from ./install.sh.
2296 echo "$as_me:2296: checking for a BSD compatible install" >&5
2297 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2298 if test -z "$INSTALL"; then
2299 if test "${ac_cv_path_install+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
2302 ac_save_IFS=$IFS; IFS=$ac_path_separator
2303 for ac_dir in $PATH; do
2305 # Account for people who put trailing slashes in PATH elements.
2307 / | ./ | .// | /cC/* \
2308 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2311 # OSF1 and SCO ODT 3.0 have their own names for install.
2312 # Don't use installbsd from OSF since it installs stuff as root
2314 for ac_prog in ginstall scoinst install; do
2315 if $as_executable_p "$ac_dir/$ac_prog"; then
2316 if test $ac_prog = install &&
2317 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2318 # AIX install. It has an incompatible calling convention.
2320 elif test $ac_prog = install &&
2321 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2322 # program-specific install script used by HP pwplus--don't use.
2325 ac_cv_path_install="$ac_dir/$ac_prog -c"
2335 if test "${ac_cv_path_install+set}" = set; then
2336 INSTALL=$ac_cv_path_install
2338 # As a last resort, use the slow shell script. We don't cache a
2339 # path for INSTALL within a source directory, because that will
2340 # break other packages using the cache if that directory is
2341 # removed, or if the path is relative.
2342 INSTALL=$ac_install_sh
2345 echo "$as_me:2345: result: $INSTALL" >&5
2346 echo "${ECHO_T}$INSTALL" >&6
2348 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2349 # It thinks the first close brace ends the variable substitution.
2350 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2352 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2354 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2360 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2361 test -z "$cf_dir" && cf_dir=.
2362 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2366 for ac_prog in lint cppcheck splint
2368 # Extract the first word of "$ac_prog", so it can be a program name with args.
2369 set dummy $ac_prog; ac_word=$2
2370 echo "$as_me:2370: checking for $ac_word" >&5
2371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2372 if test "${ac_cv_prog_LINT+set}" = set; then
2373 echo $ECHO_N "(cached) $ECHO_C" >&6
2375 if test -n "$LINT"; then
2376 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2378 ac_save_IFS=$IFS; IFS=$ac_path_separator
2380 for ac_dir in $ac_dummy; do
2382 test -z "$ac_dir" && ac_dir=.
2383 $as_executable_p "$ac_dir/$ac_word" || continue
2384 ac_cv_prog_LINT="$ac_prog"
2385 echo "$as_me:2385: found $ac_dir/$ac_word" >&5
2391 LINT=$ac_cv_prog_LINT
2392 if test -n "$LINT"; then
2393 echo "$as_me:2393: result: $LINT" >&5
2394 echo "${ECHO_T}$LINT" >&6
2396 echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2400 test -n "$LINT" && break
2403 echo "$as_me:2403: checking if filesystem supports mixed-case filenames" >&5
2404 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2405 if test "${cf_cv_mixedcase+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 if test "$cross_compiling" = yes ; then
2410 case $target_alias in
2411 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2419 rm -f conftest CONFTEST
2421 if test -f CONFTEST ; then
2426 rm -f conftest CONFTEST
2430 echo "$as_me:2430: result: $cf_cv_mixedcase" >&5
2431 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2432 test "$cf_cv_mixedcase" = yes &&
2433 cat >>confdefs.h <<\EOF
2434 #define MIXEDCASE_FILENAMES 1
2437 for ac_prog in exctags ctags
2439 # Extract the first word of "$ac_prog", so it can be a program name with args.
2440 set dummy $ac_prog; ac_word=$2
2441 echo "$as_me:2441: checking for $ac_word" >&5
2442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2443 if test "${ac_cv_prog_CTAGS+set}" = set; then
2444 echo $ECHO_N "(cached) $ECHO_C" >&6
2446 if test -n "$CTAGS"; then
2447 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2449 ac_save_IFS=$IFS; IFS=$ac_path_separator
2451 for ac_dir in $ac_dummy; do
2453 test -z "$ac_dir" && ac_dir=.
2454 $as_executable_p "$ac_dir/$ac_word" || continue
2455 ac_cv_prog_CTAGS="$ac_prog"
2456 echo "$as_me:2456: found $ac_dir/$ac_word" >&5
2462 CTAGS=$ac_cv_prog_CTAGS
2463 if test -n "$CTAGS"; then
2464 echo "$as_me:2464: result: $CTAGS" >&5
2465 echo "${ECHO_T}$CTAGS" >&6
2467 echo "$as_me:2467: result: no" >&5
2468 echo "${ECHO_T}no" >&6
2471 test -n "$CTAGS" && break
2474 for ac_prog in exetags etags
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477 set dummy $ac_prog; ac_word=$2
2478 echo "$as_me:2478: checking for $ac_word" >&5
2479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2480 if test "${ac_cv_prog_ETAGS+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2483 if test -n "$ETAGS"; then
2484 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2486 ac_save_IFS=$IFS; IFS=$ac_path_separator
2488 for ac_dir in $ac_dummy; do
2490 test -z "$ac_dir" && ac_dir=.
2491 $as_executable_p "$ac_dir/$ac_word" || continue
2492 ac_cv_prog_ETAGS="$ac_prog"
2493 echo "$as_me:2493: found $ac_dir/$ac_word" >&5
2499 ETAGS=$ac_cv_prog_ETAGS
2500 if test -n "$ETAGS"; then
2501 echo "$as_me:2501: result: $ETAGS" >&5
2502 echo "${ECHO_T}$ETAGS" >&6
2504 echo "$as_me:2504: result: no" >&5
2505 echo "${ECHO_T}no" >&6
2508 test -n "$ETAGS" && break
2511 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2512 set dummy ${CTAGS:-ctags}; ac_word=$2
2513 echo "$as_me:2513: checking for $ac_word" >&5
2514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2515 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2518 if test -n "$MAKE_LOWER_TAGS"; then
2519 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2523 for ac_dir in $ac_dummy; do
2525 test -z "$ac_dir" && ac_dir=.
2526 $as_executable_p "$ac_dir/$ac_word" || continue
2527 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2528 echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2532 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2535 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2536 if test -n "$MAKE_LOWER_TAGS"; then
2537 echo "$as_me:2537: result: $MAKE_LOWER_TAGS" >&5
2538 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2540 echo "$as_me:2540: result: no" >&5
2541 echo "${ECHO_T}no" >&6
2544 if test "$cf_cv_mixedcase" = yes ; then
2545 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2546 set dummy ${ETAGS:-etags}; ac_word=$2
2547 echo "$as_me:2547: checking for $ac_word" >&5
2548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2549 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2550 echo $ECHO_N "(cached) $ECHO_C" >&6
2552 if test -n "$MAKE_UPPER_TAGS"; then
2553 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2555 ac_save_IFS=$IFS; IFS=$ac_path_separator
2557 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 $as_executable_p "$ac_dir/$ac_word" || continue
2561 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2562 echo "$as_me:2562: found $ac_dir/$ac_word" >&5
2566 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2569 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2570 if test -n "$MAKE_UPPER_TAGS"; then
2571 echo "$as_me:2571: result: $MAKE_UPPER_TAGS" >&5
2572 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2574 echo "$as_me:2574: result: no" >&5
2575 echo "${ECHO_T}no" >&6
2582 if test "$MAKE_UPPER_TAGS" = yes ; then
2588 if test "$MAKE_LOWER_TAGS" = yes ; then
2594 echo "$as_me:2594: checking if -lm needed for math functions" >&5
2595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2596 if test "${cf_cv_need_libm+set}" = set; then
2597 echo $ECHO_N "(cached) $ECHO_C" >&6
2600 cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2610 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2615 rm -f conftest.$ac_objext conftest$ac_exeext
2616 if { (eval echo "$as_me:2616: \"$ac_link\"") >&5
2617 (eval $ac_link) 2>&5
2619 echo "$as_me:2619: \$? = $ac_status" >&5
2620 (exit $ac_status); } &&
2621 { ac_try='test -s conftest$ac_exeext'
2622 { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit $ac_status); }; }; then
2629 echo "$as_me: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2635 echo "$as_me:2635: result: $cf_cv_need_libm" >&5
2636 echo "${ECHO_T}$cf_cv_need_libm" >&6
2637 if test "$cf_cv_need_libm" = yes
2645 CC_SHARED_OPTS=unknown
2646 CPPFLAGS="$CPPFLAGS"
2648 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2649 DFT_UPR_MODEL="NORMAL"
2662 PACKAGE="ncurses-examples"
2668 TINFO_LIBS='$(LIBS_CURSES)'
2669 cf_cv_abi_version=""
2670 cf_cv_rel_version=""
2676 if test "$GCC" = yes
2678 cat > conftest.i <<EOF
2680 #define GCC_PRINTF 0
2685 #ifndef GCC_NORETURN
2686 #define GCC_NORETURN /* nothing */
2689 #define GCC_UNUSED /* nothing */
2692 if test "$GCC" = yes
2694 { echo "$as_me:2694: checking for $CC __attribute__ directives..." >&5
2695 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2697 "${as_me:-configure}"
2698 #include "confdefs.h"
2699 #include "conftest.h"
2700 #include "conftest.i"
2702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2707 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2709 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2712 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2713 extern void foo(void) GCC_NORETURN;
2714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2716 cf_printf_attribute=no
2717 cf_scanf_attribute=no
2718 for cf_attribute in scanf printf unused noreturn
2721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2723 cf_directive="__attribute__(($cf_attribute))"
2724 echo "checking for $CC $cf_directive" 1>&5
2726 case $cf_attribute in
2728 cf_printf_attribute=yes
2729 cat >conftest.h <<EOF
2730 #define GCC_$cf_ATTRIBUTE 1
2734 cf_scanf_attribute=yes
2735 cat >conftest.h <<EOF
2736 #define GCC_$cf_ATTRIBUTE 1
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE $cf_directive
2746 if { (eval echo "$as_me:2746: \"$ac_compile\"") >&5
2747 (eval $ac_compile) 2>&5
2749 echo "$as_me:2749: \$? = $ac_status" >&5
2750 (exit $ac_status); }; then
2751 test -n "$verbose" && echo "$as_me:2751: result: ... $cf_attribute" >&5
2752 echo "${ECHO_T}... $cf_attribute" >&6
2753 cat conftest.h >>confdefs.h
2754 case $cf_attribute in
2757 cat >>confdefs.h <<EOF
2758 #define GCC_NORETURN $cf_directive
2763 cf_value='/* nothing */'
2764 if test "$cf_printf_attribute" != no ; then
2765 cf_value='__attribute__((format(printf,fmt,var)))'
2767 cat >>confdefs.h <<\EOF
2768 #define GCC_PRINTF 1
2773 cat >>confdefs.h <<EOF
2774 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2779 cf_value='/* nothing */'
2780 if test "$cf_scanf_attribute" != no ; then
2781 cf_value='__attribute__((format(scanf,fmt,var)))'
2783 cat >>confdefs.h <<\EOF
2789 cat >>confdefs.h <<EOF
2790 #define GCC_SCANFLIKE(fmt,var) $cf_value
2796 cat >>confdefs.h <<EOF
2797 #define GCC_UNUSED $cf_directive
2805 fgrep define conftest.i >>confdefs.h
2811 cf_POSIX_C_SOURCE=199506L
2816 cf_xopen_source="-D_ALL_SOURCE"
2822 cf_xopen_source="-D_APPLE_C_SOURCE"
2825 cf_xopen_source="-D_DARWIN_C_SOURCE"
2828 (freebsd*|dragonfly*)
2829 # 5.x headers associate
2830 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2831 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2832 cf_POSIX_C_SOURCE=200112L
2834 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2837 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2840 cf_xopen_source="-D_HPUX_SOURCE"
2843 cf_xopen_source="-D_SGI_SOURCE"
2846 (linux*|gnu*|mint*|k*bsd*-gnu)
2848 echo "$as_me:2848: checking if we must define _GNU_SOURCE" >&5
2849 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2850 if test "${cf_cv_gnu_source+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2854 cat >conftest.$ac_ext <<_ACEOF
2855 #line 2855 "configure"
2856 #include "confdefs.h"
2857 #include <sys/types.h>
2862 #ifndef _XOPEN_SOURCE
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871 (eval $ac_compile) 2>&5
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); } &&
2875 { ac_try='test -s conftest.$ac_objext'
2876 { (eval echo "$as_me:2876: \"$ac_try\"") >&5
2879 echo "$as_me:2879: \$? = $ac_status" >&5
2880 (exit $ac_status); }; }; then
2883 echo "$as_me: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2886 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2887 cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890 #include <sys/types.h>
2895 #ifdef _XOPEN_SOURCE
2902 rm -f conftest.$ac_objext
2903 if { (eval echo "$as_me:2903: \"$ac_compile\"") >&5
2904 (eval $ac_compile) 2>&5
2906 echo "$as_me:2906: \$? = $ac_status" >&5
2907 (exit $ac_status); } &&
2908 { ac_try='test -s conftest.$ac_objext'
2909 { (eval echo "$as_me:2909: \"$ac_try\"") >&5
2912 echo "$as_me:2912: \$? = $ac_status" >&5
2913 (exit $ac_status); }; }; then
2916 echo "$as_me: failed program was:" >&5
2917 cat conftest.$ac_ext >&5
2918 cf_cv_gnu_source=yes
2920 rm -f conftest.$ac_objext conftest.$ac_ext
2924 rm -f conftest.$ac_objext conftest.$ac_ext
2927 echo "$as_me:2927: result: $cf_cv_gnu_source" >&5
2928 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2929 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2933 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2936 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2939 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2941 cf_save_CFLAGS="$CFLAGS"
2942 cf_save_CPPFLAGS="$CPPFLAGS"
2944 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2945 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2946 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2948 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2949 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2950 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2952 echo "$as_me:2952: checking if we should define _POSIX_C_SOURCE" >&5
2953 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2954 if test "${cf_cv_posix_c_source+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2958 echo "${as_me:-configure}:2958: testing if the symbol is already defined go no further ..." 1>&5
2960 cat >conftest.$ac_ext <<_ACEOF
2961 #line 2961 "configure"
2962 #include "confdefs.h"
2963 #include <sys/types.h>
2968 #ifndef _POSIX_C_SOURCE
2975 rm -f conftest.$ac_objext
2976 if { (eval echo "$as_me:2976: \"$ac_compile\"") >&5
2977 (eval $ac_compile) 2>&5
2979 echo "$as_me:2979: \$? = $ac_status" >&5
2980 (exit $ac_status); } &&
2981 { ac_try='test -s conftest.$ac_objext'
2982 { (eval echo "$as_me:2982: \"$ac_try\"") >&5
2985 echo "$as_me:2985: \$? = $ac_status" >&5
2986 (exit $ac_status); }; }; then
2987 cf_cv_posix_c_source=no
2989 echo "$as_me: failed program was:" >&5
2990 cat conftest.$ac_ext >&5
2991 cf_want_posix_source=no
2992 case .$cf_POSIX_C_SOURCE in
2994 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2997 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2998 cf_want_posix_source=yes
3001 cf_want_posix_source=yes
3004 if test "$cf_want_posix_source" = yes ; then
3005 cat >conftest.$ac_ext <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <sys/types.h>
3013 #ifdef _POSIX_SOURCE
3020 rm -f conftest.$ac_objext
3021 if { (eval echo "$as_me:3021: \"$ac_compile\"") >&5
3022 (eval $ac_compile) 2>&5
3024 echo "$as_me:3024: \$? = $ac_status" >&5
3025 (exit $ac_status); } &&
3026 { ac_try='test -s conftest.$ac_objext'
3027 { (eval echo "$as_me:3027: \"$ac_try\"") >&5
3030 echo "$as_me:3030: \$? = $ac_status" >&5
3031 (exit $ac_status); }; }; then
3034 echo "$as_me: failed program was:" >&5
3035 cat conftest.$ac_ext >&5
3036 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3038 rm -f conftest.$ac_objext conftest.$ac_ext
3041 echo "${as_me:-configure}:3041: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3043 CFLAGS="$cf_trim_CFLAGS"
3044 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3046 echo "${as_me:-configure}:3046: testing if the second compile does not leave our definition intact error ..." 1>&5
3048 cat >conftest.$ac_ext <<_ACEOF
3049 #line 3049 "configure"
3050 #include "confdefs.h"
3051 #include <sys/types.h>
3056 #ifndef _POSIX_C_SOURCE
3063 rm -f conftest.$ac_objext
3064 if { (eval echo "$as_me:3064: \"$ac_compile\"") >&5
3065 (eval $ac_compile) 2>&5
3067 echo "$as_me:3067: \$? = $ac_status" >&5
3068 (exit $ac_status); } &&
3069 { ac_try='test -s conftest.$ac_objext'
3070 { (eval echo "$as_me:3070: \"$ac_try\"") >&5
3073 echo "$as_me:3073: \$? = $ac_status" >&5
3074 (exit $ac_status); }; }; then
3077 echo "$as_me: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
3079 cf_cv_posix_c_source=no
3081 rm -f conftest.$ac_objext conftest.$ac_ext
3082 CFLAGS="$cf_save_CFLAGS"
3083 CPPFLAGS="$cf_save_CPPFLAGS"
3086 rm -f conftest.$ac_objext conftest.$ac_ext
3089 echo "$as_me:3089: result: $cf_cv_posix_c_source" >&5
3090 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3092 if test "$cf_cv_posix_c_source" != no ; then
3093 CFLAGS="$cf_trim_CFLAGS"
3094 CPPFLAGS="$cf_trim_CPPFLAGS"
3099 cf_new_extra_cppflags=
3101 for cf_add_cflags in $cf_cv_posix_c_source
3103 case $cf_fix_cppflags in
3105 case $cf_add_cflags in
3106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3107 case $cf_add_cflags in
3109 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3112 && test -z "${cf_tst_cflags}" \
3113 && cf_fix_cppflags=yes
3115 if test $cf_fix_cppflags = yes ; then
3116 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3118 elif test "${cf_tst_cflags}" = "\"'" ; then
3119 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3128 case $cf_add_cflags in
3130 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3132 CPPFLAGS=`echo "$CPPFLAGS" | \
3133 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3134 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3138 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3143 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3148 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3150 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3152 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3153 && test -z "${cf_tst_cflags}" \
3154 && cf_fix_cppflags=no
3159 if test -n "$cf_new_cflags" ; then
3161 CFLAGS="$CFLAGS $cf_new_cflags"
3164 if test -n "$cf_new_cppflags" ; then
3166 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3169 if test -n "$cf_new_extra_cppflags" ; then
3171 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3178 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3181 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3182 cf_xopen_source="-D_BSD_SOURCE"
3186 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3192 cf_xopen_source="-D_OSF_SOURCE"
3195 cf_xopen_source="-D_QNX_SOURCE"
3198 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3201 cf_xopen_source="-D__EXTENSIONS__"
3202 cf_cv_xopen_source=broken
3204 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3210 echo "$as_me:3210: checking if we should define _XOPEN_SOURCE" >&5
3211 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3212 if test "${cf_cv_xopen_source+set}" = set; then
3213 echo $ECHO_N "(cached) $ECHO_C" >&6
3216 cat >conftest.$ac_ext <<_ACEOF
3217 #line 3217 "configure"
3218 #include "confdefs.h"
3222 #include <sys/types.h>
3228 #ifndef _XOPEN_SOURCE
3235 rm -f conftest.$ac_objext
3236 if { (eval echo "$as_me:3236: \"$ac_compile\"") >&5
3237 (eval $ac_compile) 2>&5
3239 echo "$as_me:3239: \$? = $ac_status" >&5
3240 (exit $ac_status); } &&
3241 { ac_try='test -s conftest.$ac_objext'
3242 { (eval echo "$as_me:3242: \"$ac_try\"") >&5
3245 echo "$as_me:3245: \$? = $ac_status" >&5
3246 (exit $ac_status); }; }; then
3247 cf_cv_xopen_source=no
3249 echo "$as_me: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3252 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3253 cat >conftest.$ac_ext <<_ACEOF
3254 #line 3254 "configure"
3255 #include "confdefs.h"
3259 #include <sys/types.h>
3265 #ifdef _XOPEN_SOURCE
3272 rm -f conftest.$ac_objext
3273 if { (eval echo "$as_me:3273: \"$ac_compile\"") >&5
3274 (eval $ac_compile) 2>&5
3276 echo "$as_me:3276: \$? = $ac_status" >&5
3277 (exit $ac_status); } &&
3278 { ac_try='test -s conftest.$ac_objext'
3279 { (eval echo "$as_me:3279: \"$ac_try\"") >&5
3282 echo "$as_me:3282: \$? = $ac_status" >&5
3283 (exit $ac_status); }; }; then
3284 cf_cv_xopen_source=no
3286 echo "$as_me: failed program was:" >&5
3287 cat conftest.$ac_ext >&5
3288 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3290 rm -f conftest.$ac_objext conftest.$ac_ext
3294 rm -f conftest.$ac_objext conftest.$ac_ext
3297 echo "$as_me:3297: result: $cf_cv_xopen_source" >&5
3298 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3300 if test "$cf_cv_xopen_source" != no ; then
3302 CFLAGS=`echo "$CFLAGS" | \
3303 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3304 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3306 CPPFLAGS=`echo "$CPPFLAGS" | \
3307 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3308 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3310 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3315 cf_new_extra_cppflags=
3317 for cf_add_cflags in $cf_temp_xopen_source
3319 case $cf_fix_cppflags in
3321 case $cf_add_cflags in
3322 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3323 case $cf_add_cflags in
3325 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3327 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3328 && test -z "${cf_tst_cflags}" \
3329 && cf_fix_cppflags=yes
3331 if test $cf_fix_cppflags = yes ; then
3332 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3334 elif test "${cf_tst_cflags}" = "\"'" ; then
3335 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3344 case $cf_add_cflags in
3346 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3348 CPPFLAGS=`echo "$CPPFLAGS" | \
3349 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3350 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3354 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3359 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3364 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3366 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3368 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3369 && test -z "${cf_tst_cflags}" \
3370 && cf_fix_cppflags=no
3375 if test -n "$cf_new_cflags" ; then
3377 CFLAGS="$CFLAGS $cf_new_cflags"
3380 if test -n "$cf_new_cppflags" ; then
3382 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3385 if test -n "$cf_new_extra_cppflags" ; then
3387 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3392 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3394 cf_save_CFLAGS="$CFLAGS"
3395 cf_save_CPPFLAGS="$CPPFLAGS"
3397 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3398 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3399 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3401 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3402 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3403 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3405 echo "$as_me:3405: checking if we should define _POSIX_C_SOURCE" >&5
3406 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3407 if test "${cf_cv_posix_c_source+set}" = set; then
3408 echo $ECHO_N "(cached) $ECHO_C" >&6
3411 echo "${as_me:-configure}:3411: testing if the symbol is already defined go no further ..." 1>&5
3413 cat >conftest.$ac_ext <<_ACEOF
3414 #line 3414 "configure"
3415 #include "confdefs.h"
3416 #include <sys/types.h>
3421 #ifndef _POSIX_C_SOURCE
3428 rm -f conftest.$ac_objext
3429 if { (eval echo "$as_me:3429: \"$ac_compile\"") >&5
3430 (eval $ac_compile) 2>&5
3432 echo "$as_me:3432: \$? = $ac_status" >&5
3433 (exit $ac_status); } &&
3434 { ac_try='test -s conftest.$ac_objext'
3435 { (eval echo "$as_me:3435: \"$ac_try\"") >&5
3438 echo "$as_me:3438: \$? = $ac_status" >&5
3439 (exit $ac_status); }; }; then
3440 cf_cv_posix_c_source=no
3442 echo "$as_me: failed program was:" >&5
3443 cat conftest.$ac_ext >&5
3444 cf_want_posix_source=no
3445 case .$cf_POSIX_C_SOURCE in
3447 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3450 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3451 cf_want_posix_source=yes
3454 cf_want_posix_source=yes
3457 if test "$cf_want_posix_source" = yes ; then
3458 cat >conftest.$ac_ext <<_ACEOF
3459 #line 3459 "configure"
3460 #include "confdefs.h"
3461 #include <sys/types.h>
3466 #ifdef _POSIX_SOURCE
3473 rm -f conftest.$ac_objext
3474 if { (eval echo "$as_me:3474: \"$ac_compile\"") >&5
3475 (eval $ac_compile) 2>&5
3477 echo "$as_me:3477: \$? = $ac_status" >&5
3478 (exit $ac_status); } &&
3479 { ac_try='test -s conftest.$ac_objext'
3480 { (eval echo "$as_me:3480: \"$ac_try\"") >&5
3483 echo "$as_me:3483: \$? = $ac_status" >&5
3484 (exit $ac_status); }; }; then
3487 echo "$as_me: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
3489 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3491 rm -f conftest.$ac_objext conftest.$ac_ext
3494 echo "${as_me:-configure}:3494: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3496 CFLAGS="$cf_trim_CFLAGS"
3497 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3499 echo "${as_me:-configure}:3499: testing if the second compile does not leave our definition intact error ..." 1>&5
3501 cat >conftest.$ac_ext <<_ACEOF
3502 #line 3502 "configure"
3503 #include "confdefs.h"
3504 #include <sys/types.h>
3509 #ifndef _POSIX_C_SOURCE
3516 rm -f conftest.$ac_objext
3517 if { (eval echo "$as_me:3517: \"$ac_compile\"") >&5
3518 (eval $ac_compile) 2>&5
3520 echo "$as_me:3520: \$? = $ac_status" >&5
3521 (exit $ac_status); } &&
3522 { ac_try='test -s conftest.$ac_objext'
3523 { (eval echo "$as_me:3523: \"$ac_try\"") >&5
3526 echo "$as_me:3526: \$? = $ac_status" >&5
3527 (exit $ac_status); }; }; then
3530 echo "$as_me: failed program was:" >&5
3531 cat conftest.$ac_ext >&5
3532 cf_cv_posix_c_source=no
3534 rm -f conftest.$ac_objext conftest.$ac_ext
3535 CFLAGS="$cf_save_CFLAGS"
3536 CPPFLAGS="$cf_save_CPPFLAGS"
3539 rm -f conftest.$ac_objext conftest.$ac_ext
3542 echo "$as_me:3542: result: $cf_cv_posix_c_source" >&5
3543 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3545 if test "$cf_cv_posix_c_source" != no ; then
3546 CFLAGS="$cf_trim_CFLAGS"
3547 CPPFLAGS="$cf_trim_CPPFLAGS"
3552 cf_new_extra_cppflags=
3554 for cf_add_cflags in $cf_cv_posix_c_source
3556 case $cf_fix_cppflags in
3558 case $cf_add_cflags in
3559 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3560 case $cf_add_cflags in
3562 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3564 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3565 && test -z "${cf_tst_cflags}" \
3566 && cf_fix_cppflags=yes
3568 if test $cf_fix_cppflags = yes ; then
3569 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3571 elif test "${cf_tst_cflags}" = "\"'" ; then
3572 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3581 case $cf_add_cflags in
3583 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3585 CPPFLAGS=`echo "$CPPFLAGS" | \
3586 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3587 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3591 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3596 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3601 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3603 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3605 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3606 && test -z "${cf_tst_cflags}" \
3607 && cf_fix_cppflags=no
3612 if test -n "$cf_new_cflags" ; then
3614 CFLAGS="$CFLAGS $cf_new_cflags"
3617 if test -n "$cf_new_cppflags" ; then
3619 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3622 if test -n "$cf_new_extra_cppflags" ; then
3624 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3632 if test -n "$cf_xopen_source" ; then
3637 cf_new_extra_cppflags=
3639 for cf_add_cflags in $cf_xopen_source
3641 case $cf_fix_cppflags in
3643 case $cf_add_cflags in
3644 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3645 case $cf_add_cflags in
3647 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3649 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3650 && test -z "${cf_tst_cflags}" \
3651 && cf_fix_cppflags=yes
3653 if test $cf_fix_cppflags = yes ; then
3654 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3656 elif test "${cf_tst_cflags}" = "\"'" ; then
3657 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3666 case $cf_add_cflags in
3668 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3670 CPPFLAGS=`echo "$CPPFLAGS" | \
3671 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3672 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3676 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3681 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3686 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3688 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3690 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3691 && test -z "${cf_tst_cflags}" \
3692 && cf_fix_cppflags=no
3697 if test -n "$cf_new_cflags" ; then
3698 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3700 echo "${as_me:-configure}:3700: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3702 CFLAGS="$CFLAGS $cf_new_cflags"
3705 if test -n "$cf_new_cppflags" ; then
3706 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3708 echo "${as_me:-configure}:3708: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3710 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3713 if test -n "$cf_new_extra_cppflags" ; then
3714 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3716 echo "${as_me:-configure}:3716: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3718 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3723 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3724 echo "$as_me:3724: checking if _XOPEN_SOURCE really is set" >&5
3725 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3726 cat >conftest.$ac_ext <<_ACEOF
3727 #line 3727 "configure"
3728 #include "confdefs.h"
3734 #ifndef _XOPEN_SOURCE
3741 rm -f conftest.$ac_objext
3742 if { (eval echo "$as_me:3742: \"$ac_compile\"") >&5
3743 (eval $ac_compile) 2>&5
3745 echo "$as_me:3745: \$? = $ac_status" >&5
3746 (exit $ac_status); } &&
3747 { ac_try='test -s conftest.$ac_objext'
3748 { (eval echo "$as_me:3748: \"$ac_try\"") >&5
3751 echo "$as_me:3751: \$? = $ac_status" >&5
3752 (exit $ac_status); }; }; then
3753 cf_XOPEN_SOURCE_set=yes
3755 echo "$as_me: failed program was:" >&5
3756 cat conftest.$ac_ext >&5
3757 cf_XOPEN_SOURCE_set=no
3759 rm -f conftest.$ac_objext conftest.$ac_ext
3760 echo "$as_me:3760: result: $cf_XOPEN_SOURCE_set" >&5
3761 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3762 if test $cf_XOPEN_SOURCE_set = yes
3764 cat >conftest.$ac_ext <<_ACEOF
3765 #line 3765 "configure"
3766 #include "confdefs.h"
3772 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3779 rm -f conftest.$ac_objext
3780 if { (eval echo "$as_me:3780: \"$ac_compile\"") >&5
3781 (eval $ac_compile) 2>&5
3783 echo "$as_me:3783: \$? = $ac_status" >&5
3784 (exit $ac_status); } &&
3785 { ac_try='test -s conftest.$ac_objext'
3786 { (eval echo "$as_me:3786: \"$ac_try\"") >&5
3789 echo "$as_me:3789: \$? = $ac_status" >&5
3790 (exit $ac_status); }; }; then
3791 cf_XOPEN_SOURCE_set_ok=yes
3793 echo "$as_me: failed program was:" >&5
3794 cat conftest.$ac_ext >&5
3795 cf_XOPEN_SOURCE_set_ok=no
3797 rm -f conftest.$ac_objext conftest.$ac_ext
3798 if test $cf_XOPEN_SOURCE_set_ok = no
3800 { echo "$as_me:3800: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3801 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3805 echo "$as_me:3805: checking if we should define _XOPEN_SOURCE" >&5
3806 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3807 if test "${cf_cv_xopen_source+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3811 cat >conftest.$ac_ext <<_ACEOF
3812 #line 3812 "configure"
3813 #include "confdefs.h"
3817 #include <sys/types.h>
3823 #ifndef _XOPEN_SOURCE
3830 rm -f conftest.$ac_objext
3831 if { (eval echo "$as_me:3831: \"$ac_compile\"") >&5
3832 (eval $ac_compile) 2>&5
3834 echo "$as_me:3834: \$? = $ac_status" >&5
3835 (exit $ac_status); } &&
3836 { ac_try='test -s conftest.$ac_objext'
3837 { (eval echo "$as_me:3837: \"$ac_try\"") >&5
3840 echo "$as_me:3840: \$? = $ac_status" >&5
3841 (exit $ac_status); }; }; then
3842 cf_cv_xopen_source=no
3844 echo "$as_me: failed program was:" >&5
3845 cat conftest.$ac_ext >&5
3847 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3848 cat >conftest.$ac_ext <<_ACEOF
3849 #line 3849 "configure"
3850 #include "confdefs.h"
3854 #include <sys/types.h>
3860 #ifdef _XOPEN_SOURCE
3867 rm -f conftest.$ac_objext
3868 if { (eval echo "$as_me:3868: \"$ac_compile\"") >&5
3869 (eval $ac_compile) 2>&5
3871 echo "$as_me:3871: \$? = $ac_status" >&5
3872 (exit $ac_status); } &&
3873 { ac_try='test -s conftest.$ac_objext'
3874 { (eval echo "$as_me:3874: \"$ac_try\"") >&5
3877 echo "$as_me:3877: \$? = $ac_status" >&5
3878 (exit $ac_status); }; }; then
3879 cf_cv_xopen_source=no
3881 echo "$as_me: failed program was:" >&5
3882 cat conftest.$ac_ext >&5
3883 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3885 rm -f conftest.$ac_objext conftest.$ac_ext
3889 rm -f conftest.$ac_objext conftest.$ac_ext
3892 echo "$as_me:3892: result: $cf_cv_xopen_source" >&5
3893 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3895 if test "$cf_cv_xopen_source" != no ; then
3897 CFLAGS=`echo "$CFLAGS" | \
3898 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3899 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3901 CPPFLAGS=`echo "$CPPFLAGS" | \
3902 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3903 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3905 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3910 cf_new_extra_cppflags=
3912 for cf_add_cflags in $cf_temp_xopen_source
3914 case $cf_fix_cppflags in
3916 case $cf_add_cflags in
3917 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3918 case $cf_add_cflags in
3920 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3922 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3923 && test -z "${cf_tst_cflags}" \
3924 && cf_fix_cppflags=yes
3926 if test $cf_fix_cppflags = yes ; then
3927 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3929 elif test "${cf_tst_cflags}" = "\"'" ; then
3930 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3939 case $cf_add_cflags in
3941 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3943 CPPFLAGS=`echo "$CPPFLAGS" | \
3944 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3945 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3949 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3954 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3959 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3964 && test -z "${cf_tst_cflags}" \
3965 && cf_fix_cppflags=no
3970 if test -n "$cf_new_cflags" ; then
3972 CFLAGS="$CFLAGS $cf_new_cflags"
3975 if test -n "$cf_new_cppflags" ; then
3977 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3980 if test -n "$cf_new_extra_cppflags" ; then
3982 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3990 echo "$as_me:3990: checking for signal global datatype" >&5
3991 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3992 if test "${cf_cv_sig_atomic_t+set}" = set; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
3997 "volatile sig_atomic_t" \
4001 cat >conftest.$ac_ext <<_ACEOF
4002 #line 4002 "configure"
4003 #include "confdefs.h"
4005 #include <sys/types.h>
4011 static void handler(int sig)
4018 signal(SIGINT, handler);
4024 rm -f conftest.$ac_objext
4025 if { (eval echo "$as_me:4025: \"$ac_compile\"") >&5
4026 (eval $ac_compile) 2>&5
4028 echo "$as_me:4028: \$? = $ac_status" >&5
4029 (exit $ac_status); } &&
4030 { ac_try='test -s conftest.$ac_objext'
4031 { (eval echo "$as_me:4031: \"$ac_try\"") >&5
4034 echo "$as_me:4034: \$? = $ac_status" >&5
4035 (exit $ac_status); }; }; then
4036 cf_cv_sig_atomic_t=$cf_type
4038 echo "$as_me: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 cf_cv_sig_atomic_t=no
4042 rm -f conftest.$ac_objext conftest.$ac_ext
4043 test "$cf_cv_sig_atomic_t" != no && break
4048 echo "$as_me:4048: result: $cf_cv_sig_atomic_t" >&5
4049 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4050 test "$cf_cv_sig_atomic_t" != no &&
4051 cat >>confdefs.h <<EOF
4052 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4055 # Work around breakage on OS X
4057 echo "$as_me:4057: checking if SIGWINCH is defined" >&5
4058 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4059 if test "${cf_cv_define_sigwinch+set}" = set; then
4060 echo $ECHO_N "(cached) $ECHO_C" >&6
4063 cat >conftest.$ac_ext <<_ACEOF
4064 #line 4064 "configure"
4065 #include "confdefs.h"
4067 #include <sys/types.h>
4068 #include <sys/signal.h>
4078 rm -f conftest.$ac_objext
4079 if { (eval echo "$as_me:4079: \"$ac_compile\"") >&5
4080 (eval $ac_compile) 2>&5
4082 echo "$as_me:4082: \$? = $ac_status" >&5
4083 (exit $ac_status); } &&
4084 { ac_try='test -s conftest.$ac_objext'
4085 { (eval echo "$as_me:4085: \"$ac_try\"") >&5
4088 echo "$as_me:4088: \$? = $ac_status" >&5
4089 (exit $ac_status); }; }; then
4090 cf_cv_define_sigwinch=yes
4092 echo "$as_me: failed program was:" >&5
4093 cat conftest.$ac_ext >&5
4094 cat >conftest.$ac_ext <<_ACEOF
4095 #line 4095 "configure"
4096 #include "confdefs.h"
4098 #undef _XOPEN_SOURCE
4099 #undef _POSIX_SOURCE
4100 #undef _POSIX_C_SOURCE
4101 #include <sys/types.h>
4102 #include <sys/signal.h>
4112 rm -f conftest.$ac_objext
4113 if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
4114 (eval $ac_compile) 2>&5
4116 echo "$as_me:4116: \$? = $ac_status" >&5
4117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:4119: \"$ac_try\"") >&5
4122 echo "$as_me:4122: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
4124 cf_cv_define_sigwinch=maybe
4126 echo "$as_me: failed program was:" >&5
4127 cat conftest.$ac_ext >&5
4128 cf_cv_define_sigwinch=no
4130 rm -f conftest.$ac_objext conftest.$ac_ext
4133 rm -f conftest.$ac_objext conftest.$ac_ext
4136 echo "$as_me:4136: result: $cf_cv_define_sigwinch" >&5
4137 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4139 if test "$cf_cv_define_sigwinch" = maybe ; then
4140 echo "$as_me:4140: checking for actual SIGWINCH definition" >&5
4141 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4142 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
4146 cf_cv_fixup_sigwinch=unknown
4148 while test $cf_sigwinch != 1
4150 cat >conftest.$ac_ext <<_ACEOF
4151 #line 4151 "configure"
4152 #include "confdefs.h"
4154 #undef _XOPEN_SOURCE
4155 #undef _POSIX_SOURCE
4156 #undef _POSIX_C_SOURCE
4157 #include <sys/types.h>
4158 #include <sys/signal.h>
4164 #if SIGWINCH != $cf_sigwinch
4172 rm -f conftest.$ac_objext
4173 if { (eval echo "$as_me:4173: \"$ac_compile\"") >&5
4174 (eval $ac_compile) 2>&5
4176 echo "$as_me:4176: \$? = $ac_status" >&5
4177 (exit $ac_status); } &&
4178 { ac_try='test -s conftest.$ac_objext'
4179 { (eval echo "$as_me:4179: \"$ac_try\"") >&5
4182 echo "$as_me:4182: \$? = $ac_status" >&5
4183 (exit $ac_status); }; }; then
4184 cf_cv_fixup_sigwinch=$cf_sigwinch
4187 echo "$as_me: failed program was:" >&5
4188 cat conftest.$ac_ext >&5
4190 rm -f conftest.$ac_objext conftest.$ac_ext
4192 cf_sigwinch=`expr $cf_sigwinch - 1`
4196 echo "$as_me:4196: result: $cf_cv_fixup_sigwinch" >&5
4197 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4199 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4200 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4204 # Checks for CODESET support.
4206 echo "$as_me:4206: checking for nl_langinfo and CODESET" >&5
4207 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4208 if test "${am_cv_langinfo_codeset+set}" = set; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
4211 cat >conftest.$ac_ext <<_ACEOF
4212 #line 4212 "configure"
4213 #include "confdefs.h"
4214 #include <langinfo.h>
4218 char* cs = nl_langinfo(CODESET);
4223 rm -f conftest.$ac_objext conftest$ac_exeext
4224 if { (eval echo "$as_me:4224: \"$ac_link\"") >&5
4225 (eval $ac_link) 2>&5
4227 echo "$as_me:4227: \$? = $ac_status" >&5
4228 (exit $ac_status); } &&
4229 { ac_try='test -s conftest$ac_exeext'
4230 { (eval echo "$as_me:4230: \"$ac_try\"") >&5
4233 echo "$as_me:4233: \$? = $ac_status" >&5
4234 (exit $ac_status); }; }; then
4235 am_cv_langinfo_codeset=yes
4237 echo "$as_me: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 am_cv_langinfo_codeset=no
4241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4244 echo "$as_me:4244: result: $am_cv_langinfo_codeset" >&5
4245 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4246 if test $am_cv_langinfo_codeset = yes; then
4248 cat >>confdefs.h <<\EOF
4249 #define HAVE_LANGINFO_CODESET 1
4254 echo "$as_me:4254: checking if you want to use pkg-config" >&5
4255 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4257 # Check whether --with-pkg-config or --without-pkg-config was given.
4258 if test "${with_pkg_config+set}" = set; then
4259 withval="$with_pkg_config"
4260 cf_pkg_config=$withval
4264 echo "$as_me:4264: result: $cf_pkg_config" >&5
4265 echo "${ECHO_T}$cf_pkg_config" >&6
4267 case $cf_pkg_config in
4273 if test -n "$ac_tool_prefix"; then
4274 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4275 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4276 echo "$as_me:4276: checking for $ac_word" >&5
4277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4278 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4279 echo $ECHO_N "(cached) $ECHO_C" >&6
4283 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4286 ac_save_IFS=$IFS; IFS=$ac_path_separator
4288 for ac_dir in $ac_dummy; do
4290 test -z "$ac_dir" && ac_dir=.
4291 if $as_executable_p "$ac_dir/$ac_word"; then
4292 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4293 echo "$as_me:4293: found $ac_dir/$ac_word" >&5
4301 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4303 if test -n "$PKG_CONFIG"; then
4304 echo "$as_me:4304: result: $PKG_CONFIG" >&5
4305 echo "${ECHO_T}$PKG_CONFIG" >&6
4307 echo "$as_me:4307: result: no" >&5
4308 echo "${ECHO_T}no" >&6
4312 if test -z "$ac_cv_path_PKG_CONFIG"; then
4313 ac_pt_PKG_CONFIG=$PKG_CONFIG
4314 # Extract the first word of "pkg-config", so it can be a program name with args.
4315 set dummy pkg-config; ac_word=$2
4316 echo "$as_me:4316: checking for $ac_word" >&5
4317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4318 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4319 echo $ECHO_N "(cached) $ECHO_C" >&6
4321 case $ac_pt_PKG_CONFIG in
4323 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4326 ac_save_IFS=$IFS; IFS=$ac_path_separator
4328 for ac_dir in $ac_dummy; do
4330 test -z "$ac_dir" && ac_dir=.
4331 if $as_executable_p "$ac_dir/$ac_word"; then
4332 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4333 echo "$as_me:4333: found $ac_dir/$ac_word" >&5
4338 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4342 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4344 if test -n "$ac_pt_PKG_CONFIG"; then
4345 echo "$as_me:4345: result: $ac_pt_PKG_CONFIG" >&5
4346 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4348 echo "$as_me:4348: result: no" >&5
4349 echo "${ECHO_T}no" >&6
4352 PKG_CONFIG=$ac_pt_PKG_CONFIG
4354 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4363 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4364 if test "$PKG_CONFIG" != none ; then
4366 if test "x$prefix" != xNONE; then
4367 cf_path_syntax="$prefix"
4369 cf_path_syntax="$ac_default_prefix"
4372 case ".$PKG_CONFIG" in
4377 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4379 (.\${*prefix}*|.\${*dir}*)
4380 eval PKG_CONFIG="$PKG_CONFIG"
4381 case ".$PKG_CONFIG" in
4383 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4388 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4391 { { echo "$as_me:4391: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4392 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4393 { (exit 1); exit 1; }; }
4397 elif test "x$cf_pkg_config" != xno ; then
4398 { echo "$as_me:4398: WARNING: pkg-config is not installed" >&5
4399 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4402 echo "$as_me:4402: checking if you want to see long compiling messages" >&5
4403 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4405 # Check whether --enable-echo or --disable-echo was given.
4406 if test "${enable_echo+set}" = set; then
4407 enableval="$enable_echo"
4408 test "$enableval" != no && enableval=yes
4409 if test "$enableval" != "yes" ; then
4412 ECHO_LD='@echo linking $@;'
4413 RULE_CC='@echo compiling $<'
4414 SHOW_CC='@echo compiling $@'
4436 echo "$as_me:4436: result: $enableval" >&5
4437 echo "${ECHO_T}$enableval" >&6
4439 echo "$as_me:4439: checking for ncurses wrap-prefix" >&5
4440 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4442 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4443 if test "${with_ncurses_wrap_prefix+set}" = set; then
4444 withval="$with_ncurses_wrap_prefix"
4445 NCURSES_WRAP_PREFIX=$withval
4447 NCURSES_WRAP_PREFIX=_nc_
4449 echo "$as_me:4449: result: $NCURSES_WRAP_PREFIX" >&5
4450 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4452 echo "$as_me:4452: checking if you want to check for wide-character functions" >&5
4453 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4455 # Check whether --enable-widec or --disable-widec was given.
4456 if test "${enable_widec+set}" = set; then
4457 enableval="$enable_widec"
4458 test "$enableval" != no && enableval=yes
4459 if test "$enableval" != "yes" ; then
4469 echo "$as_me:4469: result: $cf_enable_widec" >&5
4470 echo "${ECHO_T}$cf_enable_widec" >&6
4472 echo "$as_me:4472: checking for specific curses-directory" >&5
4473 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4475 # Check whether --with-curses-dir or --without-curses-dir was given.
4476 if test "${with_curses_dir+set}" = set; then
4477 withval="$with_curses_dir"
4478 cf_cv_curses_dir=$withval
4482 echo "$as_me:4482: result: $cf_cv_curses_dir" >&5
4483 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4485 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4488 if test "x$prefix" != xNONE; then
4489 cf_path_syntax="$prefix"
4491 cf_path_syntax="$ac_default_prefix"
4499 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4501 (.\${*prefix}*|.\${*dir}*)
4502 eval withval="$withval"
4505 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4510 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4513 { { echo "$as_me:4513: error: expected a pathname, not \"$withval\"" >&5
4514 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4515 { (exit 1); exit 1; }; }
4519 if test -d "$cf_cv_curses_dir"
4522 if test -n "$cf_cv_curses_dir/include" ; then
4523 for cf_add_incdir in $cf_cv_curses_dir/include
4525 while test $cf_add_incdir != /usr/include
4527 if test -d $cf_add_incdir
4530 if test -n "$CFLAGS$CPPFLAGS" ; then
4531 # a loop is needed to ensure we can add subdirs of existing dirs
4532 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4533 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4534 cf_have_incdir=yes; break
4539 if test "$cf_have_incdir" = no ; then
4540 if test "$cf_add_incdir" = /usr/local/include ; then
4541 if test "$GCC" = yes
4543 cf_save_CPPFLAGS=$CPPFLAGS
4544 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4545 cat >conftest.$ac_ext <<_ACEOF
4546 #line 4546 "configure"
4547 #include "confdefs.h"
4557 rm -f conftest.$ac_objext
4558 if { (eval echo "$as_me:4558: \"$ac_compile\"") >&5
4559 (eval $ac_compile) 2>&5
4561 echo "$as_me:4561: \$? = $ac_status" >&5
4562 (exit $ac_status); } &&
4563 { ac_try='test -s conftest.$ac_objext'
4564 { (eval echo "$as_me:4564: \"$ac_try\"") >&5
4567 echo "$as_me:4567: \$? = $ac_status" >&5
4568 (exit $ac_status); }; }; then
4571 echo "$as_me: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4575 rm -f conftest.$ac_objext conftest.$ac_ext
4576 CPPFLAGS=$cf_save_CPPFLAGS
4581 if test "$cf_have_incdir" = no ; then
4582 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4584 echo "${as_me:-configure}:4584: testing adding $cf_add_incdir to include-path ..." 1>&5
4586 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4588 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4589 test "$cf_top_incdir" = "$cf_add_incdir" && break
4590 cf_add_incdir="$cf_top_incdir"
4601 if test -n "$cf_cv_curses_dir/lib" ; then
4602 for cf_add_libdir in $cf_cv_curses_dir/lib
4604 if test $cf_add_libdir = /usr/lib ; then
4606 elif test -d $cf_add_libdir
4609 if test -n "$LDFLAGS$LIBS" ; then
4610 # a loop is needed to ensure we can add subdirs of existing dirs
4611 for cf_test_libdir in $LDFLAGS $LIBS ; do
4612 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4613 cf_have_libdir=yes; break
4617 if test "$cf_have_libdir" = no ; then
4618 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4620 echo "${as_me:-configure}:4620: testing adding $cf_add_libdir to library-path ..." 1>&5
4622 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4633 echo "$as_me:4633: checking for specified curses library type" >&5
4634 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4636 # Check whether --with-screen or --without-screen was given.
4637 if test "${with_screen+set}" = set; then
4638 withval="$with_screen"
4639 cf_cv_screen=$withval
4642 # Check whether --with-ncursesw or --without-ncursesw was given.
4643 if test "${with_ncursesw+set}" = set; then
4644 withval="$with_ncursesw"
4645 cf_cv_screen=ncursesw
4648 # Check whether --with-ncurses or --without-ncurses was given.
4649 if test "${with_ncurses+set}" = set; then
4650 withval="$with_ncurses"
4651 cf_cv_screen=ncurses
4654 # Check whether --with-pdcurses or --without-pdcurses was given.
4655 if test "${with_pdcurses+set}" = set; then
4656 withval="$with_pdcurses"
4657 cf_cv_screen=pdcurses
4660 # Check whether --with-curses-colr or --without-curses-colr was given.
4661 if test "${with_curses_colr+set}" = set; then
4662 withval="$with_curses_colr"
4663 cf_cv_screen=curses_colr
4666 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4667 if test "${with_curses_5lib+set}" = set; then
4668 withval="$with_curses_5lib"
4669 cf_cv_screen=curses_5lib
4677 echo "$as_me:4677: result: $cf_cv_screen" >&5
4678 echo "${ECHO_T}$cf_cv_screen" >&6
4680 case $cf_cv_screen in
4683 echo "$as_me:4683: checking for extra include directories" >&5
4684 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4685 if test "${cf_cv_curses_incdir+set}" = set; then
4686 echo $ECHO_N "(cached) $ECHO_C" >&6
4689 cf_cv_curses_incdir=no
4692 if test "x$cf_cv_screen" = "xcurses_colr"
4694 test -d /usr/include/curses_colr && \
4695 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4699 if test "x$cf_cv_screen" = "xcurses_5lib"
4701 test -d /usr/5lib && \
4702 test -d /usr/5include && \
4703 cf_cv_curses_incdir="-I/usr/5include"
4709 echo "$as_me:4709: result: $cf_cv_curses_incdir" >&5
4710 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4711 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4713 echo "$as_me:4713: checking if we have identified curses headers" >&5
4714 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4715 if test "${cf_cv_ncurses_header+set}" = set; then
4716 echo $ECHO_N "(cached) $ECHO_C" >&6
4719 cf_cv_ncurses_header=none
4722 curses.h ncurses/ncurses.h ncurses/curses.h
4724 cat >conftest.$ac_ext <<_ACEOF
4725 #line 4725 "configure"
4726 #include "confdefs.h"
4727 #include <${cf_header}>
4731 initscr(); tgoto("?", 0,0)
4736 rm -f conftest.$ac_objext
4737 if { (eval echo "$as_me:4737: \"$ac_compile\"") >&5
4738 (eval $ac_compile) 2>&5
4740 echo "$as_me:4740: \$? = $ac_status" >&5
4741 (exit $ac_status); } &&
4742 { ac_try='test -s conftest.$ac_objext'
4743 { (eval echo "$as_me:4743: \"$ac_try\"") >&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit $ac_status); }; }; then
4748 cf_cv_ncurses_header=$cf_header; break
4750 echo "$as_me: failed program was:" >&5
4751 cat conftest.$ac_ext >&5
4753 rm -f conftest.$ac_objext conftest.$ac_ext
4757 echo "$as_me:4757: result: $cf_cv_ncurses_header" >&5
4758 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4760 if test "$cf_cv_ncurses_header" = none ; then
4761 { { echo "$as_me:4761: error: No curses header-files found" >&5
4762 echo "$as_me: error: No curses header-files found" >&2;}
4763 { (exit 1); exit 1; }; }
4766 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4768 for ac_header in $cf_cv_ncurses_header
4770 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4771 echo "$as_me:4771: checking for $ac_header" >&5
4772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4774 echo $ECHO_N "(cached) $ECHO_C" >&6
4776 cat >conftest.$ac_ext <<_ACEOF
4777 #line 4777 "configure"
4778 #include "confdefs.h"
4779 #include <$ac_header>
4781 if { (eval echo "$as_me:4781: \"$ac_cpp conftest.$ac_ext\"") >&5
4782 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4784 egrep -v '^ *\+' conftest.er1 >conftest.err
4786 cat conftest.err >&5
4787 echo "$as_me:4787: \$? = $ac_status" >&5
4788 (exit $ac_status); } >/dev/null; then
4789 if test -s conftest.err; then
4790 ac_cpp_err=$ac_c_preproc_warn_flag
4797 if test -z "$ac_cpp_err"; then
4798 eval "$as_ac_Header=yes"
4800 echo "$as_me: failed program was:" >&5
4801 cat conftest.$ac_ext >&5
4802 eval "$as_ac_Header=no"
4804 rm -f conftest.err conftest.$ac_ext
4806 echo "$as_me:4806: result: `eval echo '${'$as_ac_Header'}'`" >&5
4807 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4808 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4809 cat >>confdefs.h <<EOF
4810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4816 echo "$as_me:4816: checking for terminfo header" >&5
4817 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4818 if test "${cf_cv_term_header+set}" = set; then
4819 echo $ECHO_N "(cached) $ECHO_C" >&6
4822 case ${cf_cv_ncurses_header} in
4823 (*/ncurses.h|*/ncursesw.h)
4824 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4827 cf_term_header=term.h
4831 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4833 cat >conftest.$ac_ext <<_ACEOF
4834 #line 4834 "configure"
4835 #include "confdefs.h"
4837 #include <${cf_cv_ncurses_header:-curses.h}>
4843 int x = auto_left_margin
4848 rm -f conftest.$ac_objext
4849 if { (eval echo "$as_me:4849: \"$ac_compile\"") >&5
4850 (eval $ac_compile) 2>&5
4852 echo "$as_me:4852: \$? = $ac_status" >&5
4853 (exit $ac_status); } &&
4854 { ac_try='test -s conftest.$ac_objext'
4855 { (eval echo "$as_me:4855: \"$ac_try\"") >&5
4858 echo "$as_me:4858: \$? = $ac_status" >&5
4859 (exit $ac_status); }; }; then
4861 cf_cv_term_header="$cf_test"
4863 echo "$as_me: failed program was:" >&5
4864 cat conftest.$ac_ext >&5
4866 cf_cv_term_header=unknown
4869 rm -f conftest.$ac_objext conftest.$ac_ext
4870 test "$cf_cv_term_header" != unknown && break
4874 echo "$as_me:4874: result: $cf_cv_term_header" >&5
4875 echo "${ECHO_T}$cf_cv_term_header" >&6
4877 # Set definitions to allow ifdef'ing to accommodate subdirectories
4879 case $cf_cv_term_header in
4882 cat >>confdefs.h <<\EOF
4883 #define HAVE_TERM_H 1
4889 case $cf_cv_term_header in
4892 cat >>confdefs.h <<\EOF
4893 #define HAVE_NCURSES_TERM_H 1
4899 cat >>confdefs.h <<\EOF
4900 #define HAVE_NCURSESW_TERM_H 1
4906 echo "$as_me:4906: checking for ncurses version" >&5
4907 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4908 if test "${cf_cv_ncurses_version+set}" = set; then
4909 echo $ECHO_N "(cached) $ECHO_C" >&6
4912 cf_cv_ncurses_version=no
4915 if test "$cross_compiling" = yes; then
4917 # This will not work if the preprocessor splits the line after the
4918 # Autoconf token. The 'unproto' program does that.
4919 cat > conftest.$ac_ext <<EOF
4920 #include <${cf_cv_ncurses_header:-curses.h}>
4922 #ifdef NCURSES_VERSION
4923 Autoconf NCURSES_VERSION
4931 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4932 { (eval echo "$as_me:4932: \"$cf_try\"") >&5
4935 echo "$as_me:4935: \$? = $ac_status" >&5
4936 (exit $ac_status); }
4937 if test -f conftest.out ; then
4938 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4939 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4944 cat >conftest.$ac_ext <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4948 #include <${cf_cv_ncurses_header:-curses.h}>
4952 FILE *fp = fopen("$cf_tempfile", "w");
4953 #ifdef NCURSES_VERSION
4954 # ifdef NCURSES_VERSION_PATCH
4955 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4957 fprintf(fp, "%s\n", NCURSES_VERSION);
4961 fprintf(fp, "old\n");
4966 ${cf_cv_main_return:-return}(0);
4969 rm -f conftest$ac_exeext
4970 if { (eval echo "$as_me:4970: \"$ac_link\"") >&5
4971 (eval $ac_link) 2>&5
4973 echo "$as_me:4973: \$? = $ac_status" >&5
4974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4975 { (eval echo "$as_me:4975: \"$ac_try\"") >&5
4978 echo "$as_me:4978: \$? = $ac_status" >&5
4979 (exit $ac_status); }; }; then
4981 cf_cv_ncurses_version=`cat $cf_tempfile`
4983 echo "$as_me: program exited with status $ac_status" >&5
4984 echo "$as_me: failed program was:" >&5
4985 cat conftest.$ac_ext >&5
4987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4992 echo "$as_me:4992: result: $cf_cv_ncurses_version" >&5
4993 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4994 test "$cf_cv_ncurses_version" = no ||
4995 cat >>confdefs.h <<\EOF
4999 echo "$as_me:4999: checking if we have identified curses libraries" >&5
5000 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5001 cat >conftest.$ac_ext <<_ACEOF
5002 #line 5002 "configure"
5003 #include "confdefs.h"
5004 #include <${cf_cv_ncurses_header:-curses.h}>
5008 initscr(); tgoto("?", 0,0)
5013 rm -f conftest.$ac_objext conftest$ac_exeext
5014 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015 (eval $ac_link) 2>&5
5017 echo "$as_me:5017: \$? = $ac_status" >&5
5018 (exit $ac_status); } &&
5019 { ac_try='test -s conftest$ac_exeext'
5020 { (eval echo "$as_me:5020: \"$ac_try\"") >&5
5023 echo "$as_me:5023: \$? = $ac_status" >&5
5024 (exit $ac_status); }; }; then
5027 echo "$as_me: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5032 echo "$as_me:5032: result: $cf_result" >&5
5033 echo "${ECHO_T}$cf_result" >&6
5035 if test "$cf_result" = no ; then
5038 echo "$as_me:5038: checking for tgoto in -lmytinfo" >&5
5039 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5040 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5041 echo $ECHO_N "(cached) $ECHO_C" >&6
5043 ac_check_lib_save_LIBS=$LIBS
5044 LIBS="-lmytinfo $LIBS"
5045 cat >conftest.$ac_ext <<_ACEOF
5046 #line 5046 "configure"
5047 #include "confdefs.h"
5049 /* Override any gcc2 internal prototype to avoid an error. */
5053 /* We use char because int might match the return type of a gcc2
5054 builtin and then its argument prototype would still apply. */
5064 rm -f conftest.$ac_objext conftest$ac_exeext
5065 if { (eval echo "$as_me:5065: \"$ac_link\"") >&5
5066 (eval $ac_link) 2>&5
5068 echo "$as_me:5068: \$? = $ac_status" >&5
5069 (exit $ac_status); } &&
5070 { ac_try='test -s conftest$ac_exeext'
5071 { (eval echo "$as_me:5071: \"$ac_try\"") >&5
5074 echo "$as_me:5074: \$? = $ac_status" >&5
5075 (exit $ac_status); }; }; then
5076 ac_cv_lib_mytinfo_tgoto=yes
5078 echo "$as_me: failed program was:" >&5
5079 cat conftest.$ac_ext >&5
5080 ac_cv_lib_mytinfo_tgoto=no
5082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5083 LIBS=$ac_check_lib_save_LIBS
5085 echo "$as_me:5085: result: $ac_cv_lib_mytinfo_tgoto" >&5
5086 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5087 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5089 cf_add_libs="-lmytinfo"
5090 # Filter out duplicates - this happens with badly-designed ".pc" files...
5091 for cf_add_1lib in $LIBS
5093 for cf_add_2lib in $cf_add_libs
5095 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5101 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5109 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5110 # next (1998), and xcurses "newer" (2000). There is no header file for
5111 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5112 # term.h) for cur_colr
5113 if test "x$cf_cv_screen" = "xcurses_colr"
5115 echo "$as_me:5115: checking for initscr in -lcur_colr" >&5
5116 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5117 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5118 echo $ECHO_N "(cached) $ECHO_C" >&6
5120 ac_check_lib_save_LIBS=$LIBS
5121 LIBS="-lcur_colr $LIBS"
5122 cat >conftest.$ac_ext <<_ACEOF
5123 #line 5123 "configure"
5124 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error. */
5130 /* We use char because int might match the return type of a gcc2
5131 builtin and then its argument prototype would still apply. */
5141 rm -f conftest.$ac_objext conftest$ac_exeext
5142 if { (eval echo "$as_me:5142: \"$ac_link\"") >&5
5143 (eval $ac_link) 2>&5
5145 echo "$as_me:5145: \$? = $ac_status" >&5
5146 (exit $ac_status); } &&
5147 { ac_try='test -s conftest$ac_exeext'
5148 { (eval echo "$as_me:5148: \"$ac_try\"") >&5
5151 echo "$as_me:5151: \$? = $ac_status" >&5
5152 (exit $ac_status); }; }; then
5153 ac_cv_lib_cur_colr_initscr=yes
5155 echo "$as_me: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5157 ac_cv_lib_cur_colr_initscr=no
5159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5160 LIBS=$ac_check_lib_save_LIBS
5162 echo "$as_me:5162: result: $ac_cv_lib_cur_colr_initscr" >&5
5163 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5164 if test $ac_cv_lib_cur_colr_initscr = yes; then
5166 cf_add_libs="-lcur_colr"
5167 # Filter out duplicates - this happens with badly-designed ".pc" files...
5168 for cf_add_1lib in $LIBS
5170 for cf_add_2lib in $cf_add_libs
5172 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5178 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5182 ac_cv_func_initscr=yes
5186 echo "$as_me:5186: checking for initscr in -lHcurses" >&5
5187 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5188 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5189 echo $ECHO_N "(cached) $ECHO_C" >&6
5191 ac_check_lib_save_LIBS=$LIBS
5192 LIBS="-lHcurses $LIBS"
5193 cat >conftest.$ac_ext <<_ACEOF
5194 #line 5194 "configure"
5195 #include "confdefs.h"
5197 /* Override any gcc2 internal prototype to avoid an error. */
5201 /* We use char because int might match the return type of a gcc2
5202 builtin and then its argument prototype would still apply. */
5212 rm -f conftest.$ac_objext conftest$ac_exeext
5213 if { (eval echo "$as_me:5213: \"$ac_link\"") >&5
5214 (eval $ac_link) 2>&5
5216 echo "$as_me:5216: \$? = $ac_status" >&5
5217 (exit $ac_status); } &&
5218 { ac_try='test -s conftest$ac_exeext'
5219 { (eval echo "$as_me:5219: \"$ac_try\"") >&5
5222 echo "$as_me:5222: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5224 ac_cv_lib_Hcurses_initscr=yes
5226 echo "$as_me: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228 ac_cv_lib_Hcurses_initscr=no
5230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5231 LIBS=$ac_check_lib_save_LIBS
5233 echo "$as_me:5233: result: $ac_cv_lib_Hcurses_initscr" >&5
5234 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5235 if test $ac_cv_lib_Hcurses_initscr = yes; then
5237 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5239 cf_add_libs="-lHcurses"
5240 # Filter out duplicates - this happens with badly-designed ".pc" files...
5241 for cf_add_1lib in $LIBS
5243 for cf_add_2lib in $cf_add_libs
5245 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5251 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5255 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5256 ac_cv_func_initscr=yes
5265 case `arch 2>/dev/null` in
5270 if test -n "/lib64" ; then
5271 for cf_add_libdir in /lib64
5273 if test $cf_add_libdir = /usr/lib ; then
5275 elif test -d $cf_add_libdir
5278 if test -n "$LDFLAGS$LIBS" ; then
5279 # a loop is needed to ensure we can add subdirs of existing dirs
5280 for cf_test_libdir in $LDFLAGS $LIBS ; do
5281 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5282 cf_have_libdir=yes; break
5286 if test "$cf_have_libdir" = no ; then
5287 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5289 echo "${as_me:-configure}:5289: testing adding $cf_add_libdir to library-path ..." 1>&5
5291 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5299 if test -n "/lib" ; then
5300 for cf_add_libdir in /lib
5302 if test $cf_add_libdir = /usr/lib ; then
5304 elif test -d $cf_add_libdir
5307 if test -n "$LDFLAGS$LIBS" ; then
5308 # a loop is needed to ensure we can add subdirs of existing dirs
5309 for cf_test_libdir in $LDFLAGS $LIBS ; do
5310 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5311 cf_have_libdir=yes; break
5315 if test "$cf_have_libdir" = no ; then
5316 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5318 echo "${as_me:-configure}:5318: testing adding $cf_add_libdir to library-path ..." 1>&5
5320 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5330 if test -n "/lib" ; then
5331 for cf_add_libdir in /lib
5333 if test $cf_add_libdir = /usr/lib ; then
5335 elif test -d $cf_add_libdir
5338 if test -n "$LDFLAGS$LIBS" ; then
5339 # a loop is needed to ensure we can add subdirs of existing dirs
5340 for cf_test_libdir in $LDFLAGS $LIBS ; do
5341 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5342 cf_have_libdir=yes; break
5346 if test "$cf_have_libdir" = no ; then
5347 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5349 echo "${as_me:-configure}:5349: testing adding $cf_add_libdir to library-path ..." 1>&5
5351 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5361 if test "x$cf_cv_screen" = "xcurses_5lib"
5363 if test -d /usr/5lib ; then
5365 if test -n "/usr/5lib" ; then
5366 for cf_add_libdir in /usr/5lib
5368 if test $cf_add_libdir = /usr/lib ; then
5370 elif test -d $cf_add_libdir
5373 if test -n "$LDFLAGS$LIBS" ; then
5374 # a loop is needed to ensure we can add subdirs of existing dirs
5375 for cf_test_libdir in $LDFLAGS $LIBS ; do
5376 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5377 cf_have_libdir=yes; break
5381 if test "$cf_have_libdir" = no ; then
5382 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5384 echo "${as_me:-configure}:5384: testing adding $cf_add_libdir to library-path ..." 1>&5
5386 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5392 cf_add_libs="-lcurses -ltermcap"
5393 # Filter out duplicates - this happens with badly-designed ".pc" files...
5394 for cf_add_1lib in $LIBS
5396 for cf_add_2lib in $cf_add_libs
5398 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5404 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5410 ac_cv_func_initscr=yes
5414 if test ".$ac_cv_func_initscr" != .yes ; then
5415 cf_save_LIBS="$LIBS"
5417 if test ".${cf_cv_ncurses_version:-no}" != .no
5419 cf_check_list="ncurses curses cursesX"
5421 cf_check_list="cursesX curses ncurses"
5424 # Check for library containing tgoto. Do this before curses library
5425 # because it may be needed to link the test-case for initscr.
5426 if test "x$cf_term_lib" = x
5428 echo "$as_me:5428: checking for tgoto" >&5
5429 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5430 if test "${ac_cv_func_tgoto+set}" = set; then
5431 echo $ECHO_N "(cached) $ECHO_C" >&6
5433 cat >conftest.$ac_ext <<_ACEOF
5434 #line 5434 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437 which can conflict with char tgoto (); below. */
5439 /* Override any gcc2 internal prototype to avoid an error. */
5443 /* We use char because int might match the return type of a gcc2
5444 builtin and then its argument prototype would still apply. */
5451 /* The GNU C library defines this for functions which it implements
5452 to always fail with ENOSYS. Some functions are actually named
5453 something starting with __ and the normal name is an alias. */
5454 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5457 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5464 rm -f conftest.$ac_objext conftest$ac_exeext
5465 if { (eval echo "$as_me:5465: \"$ac_link\"") >&5
5466 (eval $ac_link) 2>&5
5468 echo "$as_me:5468: \$? = $ac_status" >&5
5469 (exit $ac_status); } &&
5470 { ac_try='test -s conftest$ac_exeext'
5471 { (eval echo "$as_me:5471: \"$ac_try\"") >&5
5474 echo "$as_me:5474: \$? = $ac_status" >&5
5475 (exit $ac_status); }; }; then
5476 ac_cv_func_tgoto=yes
5478 echo "$as_me: failed program was:" >&5
5479 cat conftest.$ac_ext >&5
5482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5484 echo "$as_me:5484: result: $ac_cv_func_tgoto" >&5
5485 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5486 if test $ac_cv_func_tgoto = yes; then
5487 cf_term_lib=predefined
5490 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5492 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5493 echo "$as_me:5493: checking for tgoto in -l$cf_term_lib" >&5
5494 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5495 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5496 echo $ECHO_N "(cached) $ECHO_C" >&6
5498 ac_check_lib_save_LIBS=$LIBS
5499 LIBS="-l$cf_term_lib $LIBS"
5500 cat >conftest.$ac_ext <<_ACEOF
5501 #line 5501 "configure"
5502 #include "confdefs.h"
5504 /* Override any gcc2 internal prototype to avoid an error. */
5508 /* We use char because int might match the return type of a gcc2
5509 builtin and then its argument prototype would still apply. */
5519 rm -f conftest.$ac_objext conftest$ac_exeext
5520 if { (eval echo "$as_me:5520: \"$ac_link\"") >&5
5521 (eval $ac_link) 2>&5
5523 echo "$as_me:5523: \$? = $ac_status" >&5
5524 (exit $ac_status); } &&
5525 { ac_try='test -s conftest$ac_exeext'
5526 { (eval echo "$as_me:5526: \"$ac_try\"") >&5
5529 echo "$as_me:5529: \$? = $ac_status" >&5
5530 (exit $ac_status); }; }; then
5531 eval "$as_ac_Lib=yes"
5533 echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 eval "$as_ac_Lib=no"
5537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5538 LIBS=$ac_check_lib_save_LIBS
5540 echo "$as_me:5540: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5541 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5542 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5552 # Check for library containing initscr
5553 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5554 if test "x$cf_curs_lib" = x
5556 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5558 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5559 echo "$as_me:5559: checking for initscr in -l$cf_curs_lib" >&5
5560 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5561 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5562 echo $ECHO_N "(cached) $ECHO_C" >&6
5564 ac_check_lib_save_LIBS=$LIBS
5565 LIBS="-l$cf_curs_lib $LIBS"
5566 cat >conftest.$ac_ext <<_ACEOF
5567 #line 5567 "configure"
5568 #include "confdefs.h"
5570 /* Override any gcc2 internal prototype to avoid an error. */
5574 /* We use char because int might match the return type of a gcc2
5575 builtin and then its argument prototype would still apply. */
5585 rm -f conftest.$ac_objext conftest$ac_exeext
5586 if { (eval echo "$as_me:5586: \"$ac_link\"") >&5
5587 (eval $ac_link) 2>&5
5589 echo "$as_me:5589: \$? = $ac_status" >&5
5590 (exit $ac_status); } &&
5591 { ac_try='test -s conftest$ac_exeext'
5592 { (eval echo "$as_me:5592: \"$ac_try\"") >&5
5595 echo "$as_me:5595: \$? = $ac_status" >&5
5596 (exit $ac_status); }; }; then
5597 eval "$as_ac_Lib=yes"
5599 echo "$as_me: failed program was:" >&5
5600 cat conftest.$ac_ext >&5
5601 eval "$as_ac_Lib=no"
5603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5604 LIBS=$ac_check_lib_save_LIBS
5606 echo "$as_me:5606: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5607 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5608 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5614 test $cf_curs_lib = unknown && { { echo "$as_me:5614: error: no curses library found" >&5
5615 echo "$as_me: error: no curses library found" >&2;}
5616 { (exit 1); exit 1; }; }
5618 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5619 if test "$cf_term_lib" = unknown ; then
5620 echo "$as_me:5620: checking if we can link with $cf_curs_lib library" >&5
5621 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5622 cat >conftest.$ac_ext <<_ACEOF
5623 #line 5623 "configure"
5624 #include "confdefs.h"
5625 #include <${cf_cv_ncurses_header:-curses.h}>
5634 rm -f conftest.$ac_objext conftest$ac_exeext
5635 if { (eval echo "$as_me:5635: \"$ac_link\"") >&5
5636 (eval $ac_link) 2>&5
5638 echo "$as_me:5638: \$? = $ac_status" >&5
5639 (exit $ac_status); } &&
5640 { ac_try='test -s conftest$ac_exeext'
5641 { (eval echo "$as_me:5641: \"$ac_try\"") >&5
5644 echo "$as_me:5644: \$? = $ac_status" >&5
5645 (exit $ac_status); }; }; then
5648 echo "$as_me: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
5652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5653 echo "$as_me:5653: result: $cf_result" >&5
5654 echo "${ECHO_T}$cf_result" >&6
5655 test $cf_result = no && { { echo "$as_me:5655: error: Cannot link curses library" >&5
5656 echo "$as_me: error: Cannot link curses library" >&2;}
5657 { (exit 1); exit 1; }; }
5658 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5660 elif test "$cf_term_lib" != predefined ; then
5661 echo "$as_me:5661: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5662 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5663 cat >conftest.$ac_ext <<_ACEOF
5664 #line 5664 "configure"
5665 #include "confdefs.h"
5666 #include <${cf_cv_ncurses_header:-curses.h}>
5670 initscr(); tgoto((char *)0, 0, 0);
5675 rm -f conftest.$ac_objext conftest$ac_exeext
5676 if { (eval echo "$as_me:5676: \"$ac_link\"") >&5
5677 (eval $ac_link) 2>&5
5679 echo "$as_me:5679: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest$ac_exeext'
5682 { (eval echo "$as_me:5682: \"$ac_try\"") >&5
5685 echo "$as_me:5685: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5689 echo "$as_me: failed program was:" >&5
5690 cat conftest.$ac_ext >&5
5692 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5693 cat >conftest.$ac_ext <<_ACEOF
5694 #line 5694 "configure"
5695 #include "confdefs.h"
5696 #include <${cf_cv_ncurses_header:-curses.h}>
5705 rm -f conftest.$ac_objext conftest$ac_exeext
5706 if { (eval echo "$as_me:5706: \"$ac_link\"") >&5
5707 (eval $ac_link) 2>&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit $ac_status); } &&
5711 { ac_try='test -s conftest$ac_exeext'
5712 { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit $ac_status); }; }; then
5719 echo "$as_me: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5727 echo "$as_me:5727: result: $cf_result" >&5
5728 echo "${ECHO_T}$cf_result" >&6
5736 echo "$as_me:5736: checking for multibyte character support" >&5
5737 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5738 if test "${cf_cv_utf8_lib+set}" = set; then
5739 echo $ECHO_N "(cached) $ECHO_C" >&6
5742 cf_save_LIBS="$LIBS"
5743 cat >conftest.$ac_ext <<_ACEOF
5744 #line 5744 "configure"
5745 #include "confdefs.h"
5756 rm -f conftest.$ac_objext conftest$ac_exeext
5757 if { (eval echo "$as_me:5757: \"$ac_link\"") >&5
5758 (eval $ac_link) 2>&5
5760 echo "$as_me:5760: \$? = $ac_status" >&5
5761 (exit $ac_status); } &&
5762 { ac_try='test -s conftest$ac_exeext'
5763 { (eval echo "$as_me:5763: \"$ac_try\"") >&5
5766 echo "$as_me:5766: \$? = $ac_status" >&5
5767 (exit $ac_status); }; }; then
5770 echo "$as_me: failed program was:" >&5
5771 cat conftest.$ac_ext >&5
5773 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5774 # will be set on completion of the AC_TRY_LINK below.
5775 cf_cv_header_path_utf8=
5776 cf_cv_library_path_utf8=
5778 echo "${as_me:-configure}:5778: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5780 cf_save_LIBS="$LIBS"
5782 cat >conftest.$ac_ext <<_ACEOF
5783 #line 5783 "configure"
5784 #include "confdefs.h"
5786 #include <libutf8.h>
5795 rm -f conftest.$ac_objext conftest$ac_exeext
5796 if { (eval echo "$as_me:5796: \"$ac_link\"") >&5
5797 (eval $ac_link) 2>&5
5799 echo "$as_me:5799: \$? = $ac_status" >&5
5800 (exit $ac_status); } &&
5801 { ac_try='test -s conftest$ac_exeext'
5802 { (eval echo "$as_me:5802: \"$ac_try\"") >&5
5805 echo "$as_me:5805: \$? = $ac_status" >&5
5806 (exit $ac_status); }; }; then
5808 cf_cv_find_linkage_utf8=yes
5809 cf_cv_header_path_utf8=/usr/include
5810 cf_cv_library_path_utf8=/usr/lib
5813 echo "$as_me: failed program was:" >&5
5814 cat conftest.$ac_ext >&5
5816 LIBS="-lutf8 $cf_save_LIBS"
5818 cat >conftest.$ac_ext <<_ACEOF
5819 #line 5819 "configure"
5820 #include "confdefs.h"
5822 #include <libutf8.h>
5831 rm -f conftest.$ac_objext conftest$ac_exeext
5832 if { (eval echo "$as_me:5832: \"$ac_link\"") >&5
5833 (eval $ac_link) 2>&5
5835 echo "$as_me:5835: \$? = $ac_status" >&5
5836 (exit $ac_status); } &&
5837 { ac_try='test -s conftest$ac_exeext'
5838 { (eval echo "$as_me:5838: \"$ac_try\"") >&5
5841 echo "$as_me:5841: \$? = $ac_status" >&5
5842 (exit $ac_status); }; }; then
5844 cf_cv_find_linkage_utf8=yes
5845 cf_cv_header_path_utf8=/usr/include
5846 cf_cv_library_path_utf8=/usr/lib
5847 cf_cv_library_file_utf8="-lutf8"
5850 echo "$as_me: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5853 cf_cv_find_linkage_utf8=no
5854 LIBS="$cf_save_LIBS"
5856 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5858 echo "${as_me:-configure}:5858: testing find linkage for utf8 library ..." 1>&5
5860 echo "${as_me:-configure}:5860: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5862 cf_save_CPPFLAGS="$CPPFLAGS"
5863 cf_test_CPPFLAGS="$CPPFLAGS"
5867 # collect the current set of include-directories from compiler flags
5868 cf_header_path_list=""
5869 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5870 for cf_header_path in $CPPFLAGS $CFLAGS
5872 case $cf_header_path in
5874 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5876 test "x$cf_header_path" != "xNONE" && \
5877 test -d "$cf_header_path" && \
5879 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5880 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5881 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5882 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5883 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5884 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5887 cf_header_path_list="$cf_header_path_list $cf_search"
5893 # add the variations for the package we are looking for
5897 test "x$prefix" != "xNONE" && \
5898 test -d "$prefix" && \
5900 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5901 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5902 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5903 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5904 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5905 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5908 for cf_subdir_prefix in \
5917 test "x$cf_subdir_prefix" != "x$prefix" && \
5918 test -d "$cf_subdir_prefix" && \
5919 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5920 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5921 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5922 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5923 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5924 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5925 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5930 test "$includedir" != NONE && \
5931 test "$includedir" != "/usr/include" && \
5932 test -d "$includedir" && {
5933 test -d $includedir && cf_search="$cf_search $includedir"
5934 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5937 test "$oldincludedir" != NONE && \
5938 test "$oldincludedir" != "/usr/include" && \
5939 test -d "$oldincludedir" && {
5940 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5941 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5944 cf_search="$cf_search $cf_header_path_list"
5946 for cf_cv_header_path_utf8 in $cf_search
5948 if test -d $cf_cv_header_path_utf8 ; then
5949 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5951 echo "${as_me:-configure}:5951: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5953 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5954 cat >conftest.$ac_ext <<_ACEOF
5955 #line 5955 "configure"
5956 #include "confdefs.h"
5958 #include <libutf8.h>
5967 rm -f conftest.$ac_objext
5968 if { (eval echo "$as_me:5968: \"$ac_compile\"") >&5
5969 (eval $ac_compile) 2>&5
5971 echo "$as_me:5971: \$? = $ac_status" >&5
5972 (exit $ac_status); } &&
5973 { ac_try='test -s conftest.$ac_objext'
5974 { (eval echo "$as_me:5974: \"$ac_try\"") >&5
5977 echo "$as_me:5977: \$? = $ac_status" >&5
5978 (exit $ac_status); }; }; then
5980 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5982 echo "${as_me:-configure}:5982: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5984 cf_cv_find_linkage_utf8=maybe
5985 cf_test_CPPFLAGS="$CPPFLAGS"
5988 echo "$as_me: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
5991 CPPFLAGS="$cf_save_CPPFLAGS"
5994 rm -f conftest.$ac_objext conftest.$ac_ext
5998 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6000 echo "${as_me:-configure}:6000: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6002 cf_save_LIBS="$LIBS"
6003 cf_save_LDFLAGS="$LDFLAGS"
6005 if test "$cf_cv_find_linkage_utf8" != yes ; then
6008 cf_library_path_list=""
6009 if test -n "${LDFLAGS}${LIBS}" ; then
6010 for cf_library_path in $LDFLAGS $LIBS
6012 case $cf_library_path in
6014 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6016 test "x$cf_library_path" != "xNONE" && \
6017 test -d "$cf_library_path" && \
6019 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6020 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6021 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6022 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6023 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6024 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6027 cf_library_path_list="$cf_library_path_list $cf_search"
6035 test "x$prefix" != "xNONE" && \
6036 test -d "$prefix" && \
6038 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6039 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6040 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6041 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6042 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6043 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6046 for cf_subdir_prefix in \
6055 test "x$cf_subdir_prefix" != "x$prefix" && \
6056 test -d "$cf_subdir_prefix" && \
6057 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6058 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6059 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6060 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6061 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6062 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6063 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6068 cf_search="$cf_library_path_list $cf_search"
6070 for cf_cv_library_path_utf8 in $cf_search
6072 if test -d $cf_cv_library_path_utf8 ; then
6073 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6075 echo "${as_me:-configure}:6075: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6077 CPPFLAGS="$cf_test_CPPFLAGS"
6078 LIBS="-lutf8 $cf_save_LIBS"
6079 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6080 cat >conftest.$ac_ext <<_ACEOF
6081 #line 6081 "configure"
6082 #include "confdefs.h"
6084 #include <libutf8.h>
6093 rm -f conftest.$ac_objext conftest$ac_exeext
6094 if { (eval echo "$as_me:6094: \"$ac_link\"") >&5
6095 (eval $ac_link) 2>&5
6097 echo "$as_me:6097: \$? = $ac_status" >&5
6098 (exit $ac_status); } &&
6099 { ac_try='test -s conftest$ac_exeext'
6100 { (eval echo "$as_me:6100: \"$ac_try\"") >&5
6103 echo "$as_me:6103: \$? = $ac_status" >&5
6104 (exit $ac_status); }; }; then
6106 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6108 echo "${as_me:-configure}:6108: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6110 cf_cv_find_linkage_utf8=yes
6111 cf_cv_library_file_utf8="-lutf8"
6114 echo "$as_me: failed program was:" >&5
6115 cat conftest.$ac_ext >&5
6117 CPPFLAGS="$cf_save_CPPFLAGS"
6118 LIBS="$cf_save_LIBS"
6119 LDFLAGS="$cf_save_LDFLAGS"
6122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6125 CPPFLAGS="$cf_save_CPPFLAGS"
6126 LDFLAGS="$cf_save_LDFLAGS"
6130 cf_cv_find_linkage_utf8=no
6134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6139 LIBS="$cf_save_LIBS"
6141 if test "$cf_cv_find_linkage_utf8" = yes ; then
6142 cf_cv_utf8_lib=add-on
6148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6150 echo "$as_me:6150: result: $cf_cv_utf8_lib" >&5
6151 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6153 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6155 if test "$cf_cv_utf8_lib" = "add-on" ; then
6157 cat >>confdefs.h <<\EOF
6158 #define HAVE_LIBUTF8_H 1
6161 if test -n "$cf_cv_header_path_utf8" ; then
6162 for cf_add_incdir in $cf_cv_header_path_utf8
6164 while test $cf_add_incdir != /usr/include
6166 if test -d $cf_add_incdir
6169 if test -n "$CFLAGS$CPPFLAGS" ; then
6170 # a loop is needed to ensure we can add subdirs of existing dirs
6171 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6172 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6173 cf_have_incdir=yes; break
6178 if test "$cf_have_incdir" = no ; then
6179 if test "$cf_add_incdir" = /usr/local/include ; then
6180 if test "$GCC" = yes
6182 cf_save_CPPFLAGS=$CPPFLAGS
6183 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6184 cat >conftest.$ac_ext <<_ACEOF
6185 #line 6185 "configure"
6186 #include "confdefs.h"
6196 rm -f conftest.$ac_objext
6197 if { (eval echo "$as_me:6197: \"$ac_compile\"") >&5
6198 (eval $ac_compile) 2>&5
6200 echo "$as_me:6200: \$? = $ac_status" >&5
6201 (exit $ac_status); } &&
6202 { ac_try='test -s conftest.$ac_objext'
6203 { (eval echo "$as_me:6203: \"$ac_try\"") >&5
6206 echo "$as_me:6206: \$? = $ac_status" >&5
6207 (exit $ac_status); }; }; then
6210 echo "$as_me: failed program was:" >&5
6211 cat conftest.$ac_ext >&5
6214 rm -f conftest.$ac_objext conftest.$ac_ext
6215 CPPFLAGS=$cf_save_CPPFLAGS
6220 if test "$cf_have_incdir" = no ; then
6221 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6223 echo "${as_me:-configure}:6223: testing adding $cf_add_incdir to include-path ..." 1>&5
6225 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6227 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6228 test "$cf_top_incdir" = "$cf_add_incdir" && break
6229 cf_add_incdir="$cf_top_incdir"
6240 if test -n "$cf_cv_library_path_utf8" ; then
6241 for cf_add_libdir in $cf_cv_library_path_utf8
6243 if test $cf_add_libdir = /usr/lib ; then
6245 elif test -d $cf_add_libdir
6248 if test -n "$LDFLAGS$LIBS" ; then
6249 # a loop is needed to ensure we can add subdirs of existing dirs
6250 for cf_test_libdir in $LDFLAGS $LIBS ; do
6251 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6252 cf_have_libdir=yes; break
6256 if test "$cf_have_libdir" = no ; then
6257 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6259 echo "${as_me:-configure}:6259: testing adding $cf_add_libdir to library-path ..." 1>&5
6261 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6267 cf_add_libs="$cf_cv_library_file_utf8"
6268 # Filter out duplicates - this happens with badly-designed ".pc" files...
6269 for cf_add_1lib in $LIBS
6271 for cf_add_2lib in $cf_add_libs
6273 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6279 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6285 cf_ncuconfig_root=$cf_cv_screen
6286 cf_have_ncuconfig=no
6288 if test "x${PKG_CONFIG:=none}" != xnone; then
6289 echo "$as_me:6289: checking pkg-config for $cf_ncuconfig_root" >&5
6290 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6291 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6292 echo "$as_me:6292: result: yes" >&5
6293 echo "${ECHO_T}yes" >&6
6295 echo "$as_me:6295: checking if the $cf_ncuconfig_root package files work" >&5
6296 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6297 cf_have_ncuconfig=unknown
6299 cf_save_CPPFLAGS="$CPPFLAGS"
6300 cf_save_LIBS="$LIBS"
6302 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6304 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6305 # Filter out duplicates - this happens with badly-designed ".pc" files...
6306 for cf_add_1lib in $LIBS
6308 for cf_add_2lib in $cf_add_libs
6310 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6316 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6320 cat >conftest.$ac_ext <<_ACEOF
6321 #line 6321 "configure"
6322 #include "confdefs.h"
6323 #include <${cf_cv_ncurses_header:-curses.h}>
6327 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6332 rm -f conftest.$ac_objext conftest$ac_exeext
6333 if { (eval echo "$as_me:6333: \"$ac_link\"") >&5
6334 (eval $ac_link) 2>&5
6336 echo "$as_me:6336: \$? = $ac_status" >&5
6337 (exit $ac_status); } &&
6338 { ac_try='test -s conftest$ac_exeext'
6339 { (eval echo "$as_me:6339: \"$ac_try\"") >&5
6342 echo "$as_me:6342: \$? = $ac_status" >&5
6343 (exit $ac_status); }; }; then
6344 if test "$cross_compiling" = yes; then
6345 cf_have_ncuconfig=maybe
6347 cat >conftest.$ac_ext <<_ACEOF
6348 #line 6348 "configure"
6349 #include "confdefs.h"
6350 #include <${cf_cv_ncurses_header:-curses.h}>
6352 { char *xx = curses_version(); return (xx == 0); }
6354 rm -f conftest$ac_exeext
6355 if { (eval echo "$as_me:6355: \"$ac_link\"") >&5
6356 (eval $ac_link) 2>&5
6358 echo "$as_me:6358: \$? = $ac_status" >&5
6359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6360 { (eval echo "$as_me:6360: \"$ac_try\"") >&5
6363 echo "$as_me:6363: \$? = $ac_status" >&5
6364 (exit $ac_status); }; }; then
6365 cf_have_ncuconfig=yes
6367 echo "$as_me: program exited with status $ac_status" >&5
6368 echo "$as_me: failed program was:" >&5
6369 cat conftest.$ac_ext >&5
6370 cf_have_ncuconfig=no
6372 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6375 echo "$as_me: failed program was:" >&5
6376 cat conftest.$ac_ext >&5
6377 cf_have_ncuconfig=no
6379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6380 echo "$as_me:6380: result: $cf_have_ncuconfig" >&5
6381 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6382 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6383 if test "$cf_have_ncuconfig" != "yes"
6385 CPPFLAGS="$cf_save_CPPFLAGS"
6386 LIBS="$cf_save_LIBS"
6387 NCURSES_CONFIG_PKG=none
6390 cat >>confdefs.h <<\EOF
6394 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6398 echo "$as_me:6398: result: no" >&5
6399 echo "${ECHO_T}no" >&6
6400 NCURSES_CONFIG_PKG=none
6403 NCURSES_CONFIG_PKG=none
6406 if test "x$cf_have_ncuconfig" = "xno"; then
6407 echo "Looking for ${cf_ncuconfig_root}-config"
6409 if test -n "$ac_tool_prefix"; then
6410 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6412 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6413 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6414 echo "$as_me:6414: checking for $ac_word" >&5
6415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6416 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6417 echo $ECHO_N "(cached) $ECHO_C" >&6
6419 if test -n "$NCURSES_CONFIG"; then
6420 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6422 ac_save_IFS=$IFS; IFS=$ac_path_separator
6424 for ac_dir in $ac_dummy; do
6426 test -z "$ac_dir" && ac_dir=.
6427 $as_executable_p "$ac_dir/$ac_word" || continue
6428 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6429 echo "$as_me:6429: found $ac_dir/$ac_word" >&5
6435 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6436 if test -n "$NCURSES_CONFIG"; then
6437 echo "$as_me:6437: result: $NCURSES_CONFIG" >&5
6438 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6440 echo "$as_me:6440: result: no" >&5
6441 echo "${ECHO_T}no" >&6
6444 test -n "$NCURSES_CONFIG" && break
6447 if test -z "$NCURSES_CONFIG"; then
6448 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6449 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6451 # Extract the first word of "$ac_prog", so it can be a program name with args.
6452 set dummy $ac_prog; ac_word=$2
6453 echo "$as_me:6453: checking for $ac_word" >&5
6454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6455 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6456 echo $ECHO_N "(cached) $ECHO_C" >&6
6458 if test -n "$ac_ct_NCURSES_CONFIG"; then
6459 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6461 ac_save_IFS=$IFS; IFS=$ac_path_separator
6463 for ac_dir in $ac_dummy; do
6465 test -z "$ac_dir" && ac_dir=.
6466 $as_executable_p "$ac_dir/$ac_word" || continue
6467 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6468 echo "$as_me:6468: found $ac_dir/$ac_word" >&5
6474 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6475 if test -n "$ac_ct_NCURSES_CONFIG"; then
6476 echo "$as_me:6476: result: $ac_ct_NCURSES_CONFIG" >&5
6477 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6479 echo "$as_me:6479: result: no" >&5
6480 echo "${ECHO_T}no" >&6
6483 test -n "$ac_ct_NCURSES_CONFIG" && break
6485 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6487 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6490 if test "$NCURSES_CONFIG" != none ; then
6492 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6494 cf_add_libs="`$NCURSES_CONFIG --libs`"
6495 # Filter out duplicates - this happens with badly-designed ".pc" files...
6496 for cf_add_1lib in $LIBS
6498 for cf_add_2lib in $cf_add_libs
6500 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6506 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6510 # even with config script, some packages use no-override for curses.h
6512 echo "$as_me:6512: checking if we have identified curses headers" >&5
6513 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6514 if test "${cf_cv_ncurses_header+set}" = set; then
6515 echo $ECHO_N "(cached) $ECHO_C" >&6
6518 cf_cv_ncurses_header=none
6520 ncurses.h $cf_cv_screen/ncurses.h \
6521 curses.h $cf_cv_screen/curses.h
6523 cat >conftest.$ac_ext <<_ACEOF
6524 #line 6524 "configure"
6525 #include "confdefs.h"
6526 #include <${cf_header}>
6530 initscr(); tgoto("?", 0,0)
6535 rm -f conftest.$ac_objext
6536 if { (eval echo "$as_me:6536: \"$ac_compile\"") >&5
6537 (eval $ac_compile) 2>&5
6539 echo "$as_me:6539: \$? = $ac_status" >&5
6540 (exit $ac_status); } &&
6541 { ac_try='test -s conftest.$ac_objext'
6542 { (eval echo "$as_me:6542: \"$ac_try\"") >&5
6545 echo "$as_me:6545: \$? = $ac_status" >&5
6546 (exit $ac_status); }; }; then
6547 cf_cv_ncurses_header=$cf_header; break
6549 echo "$as_me: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6552 rm -f conftest.$ac_objext conftest.$ac_ext
6556 echo "$as_me:6556: result: $cf_cv_ncurses_header" >&5
6557 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6559 if test "$cf_cv_ncurses_header" = none ; then
6560 { { echo "$as_me:6560: error: No curses header-files found" >&5
6561 echo "$as_me: error: No curses header-files found" >&2;}
6562 { (exit 1); exit 1; }; }
6565 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6567 for ac_header in $cf_cv_ncurses_header
6569 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6570 echo "$as_me:6570: checking for $ac_header" >&5
6571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6573 echo $ECHO_N "(cached) $ECHO_C" >&6
6575 cat >conftest.$ac_ext <<_ACEOF
6576 #line 6576 "configure"
6577 #include "confdefs.h"
6578 #include <$ac_header>
6580 if { (eval echo "$as_me:6580: \"$ac_cpp conftest.$ac_ext\"") >&5
6581 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6583 egrep -v '^ *\+' conftest.er1 >conftest.err
6585 cat conftest.err >&5
6586 echo "$as_me:6586: \$? = $ac_status" >&5
6587 (exit $ac_status); } >/dev/null; then
6588 if test -s conftest.err; then
6589 ac_cpp_err=$ac_c_preproc_warn_flag
6596 if test -z "$ac_cpp_err"; then
6597 eval "$as_ac_Header=yes"
6599 echo "$as_me: failed program was:" >&5
6600 cat conftest.$ac_ext >&5
6601 eval "$as_ac_Header=no"
6603 rm -f conftest.err conftest.$ac_ext
6605 echo "$as_me:6605: result: `eval echo '${'$as_ac_Header'}'`" >&5
6606 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6608 cat >>confdefs.h <<EOF
6609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6615 cat >>confdefs.h <<\EOF
6619 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6621 cat >>confdefs.h <<EOF
6622 #define $cf_nculib_ROOT 1
6625 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6629 cf_ncuhdr_root=$cf_cv_screen
6631 test -n "$cf_cv_curses_dir" && \
6632 test "$cf_cv_curses_dir" != "no" && { \
6634 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6635 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6637 while test $cf_add_incdir != /usr/include
6639 if test -d $cf_add_incdir
6642 if test -n "$CFLAGS$CPPFLAGS" ; then
6643 # a loop is needed to ensure we can add subdirs of existing dirs
6644 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6645 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6646 cf_have_incdir=yes; break
6651 if test "$cf_have_incdir" = no ; then
6652 if test "$cf_add_incdir" = /usr/local/include ; then
6653 if test "$GCC" = yes
6655 cf_save_CPPFLAGS=$CPPFLAGS
6656 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6657 cat >conftest.$ac_ext <<_ACEOF
6658 #line 6658 "configure"
6659 #include "confdefs.h"
6669 rm -f conftest.$ac_objext
6670 if { (eval echo "$as_me:6670: \"$ac_compile\"") >&5
6671 (eval $ac_compile) 2>&5
6673 echo "$as_me:6673: \$? = $ac_status" >&5
6674 (exit $ac_status); } &&
6675 { ac_try='test -s conftest.$ac_objext'
6676 { (eval echo "$as_me:6676: \"$ac_try\"") >&5
6679 echo "$as_me:6679: \$? = $ac_status" >&5
6680 (exit $ac_status); }; }; then
6683 echo "$as_me: failed program was:" >&5
6684 cat conftest.$ac_ext >&5
6687 rm -f conftest.$ac_objext conftest.$ac_ext
6688 CPPFLAGS=$cf_save_CPPFLAGS
6693 if test "$cf_have_incdir" = no ; then
6694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6696 echo "${as_me:-configure}:6696: testing adding $cf_add_incdir to include-path ..." 1>&5
6698 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6700 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6701 test "$cf_top_incdir" = "$cf_add_incdir" && break
6702 cf_add_incdir="$cf_top_incdir"
6715 echo "$as_me:6715: checking for $cf_ncuhdr_root header in include-path" >&5
6716 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6717 if test "${cf_cv_ncurses_h+set}" = set; then
6718 echo $ECHO_N "(cached) $ECHO_C" >&6
6721 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6722 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6723 for cf_header in $cf_header_list
6726 cat >conftest.$ac_ext <<_ACEOF
6727 #line 6727 "configure"
6728 #include "confdefs.h"
6730 #include <$cf_header>
6735 #ifdef NCURSES_VERSION
6737 printf("%s\n", NCURSES_VERSION);
6750 rm -f conftest.$ac_objext
6751 if { (eval echo "$as_me:6751: \"$ac_compile\"") >&5
6752 (eval $ac_compile) 2>&5
6754 echo "$as_me:6754: \$? = $ac_status" >&5
6755 (exit $ac_status); } &&
6756 { ac_try='test -s conftest.$ac_objext'
6757 { (eval echo "$as_me:6757: \"$ac_try\"") >&5
6760 echo "$as_me:6760: \$? = $ac_status" >&5
6761 (exit $ac_status); }; }; then
6762 cf_cv_ncurses_h=$cf_header
6765 echo "$as_me: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
6769 rm -f conftest.$ac_objext conftest.$ac_ext
6771 test "$cf_cv_ncurses_h" != no && break
6775 echo "$as_me:6775: result: $cf_cv_ncurses_h" >&5
6776 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6778 if test "$cf_cv_ncurses_h" != no ; then
6779 cf_cv_ncurses_header=$cf_cv_ncurses_h
6782 echo "$as_me:6782: checking for $cf_ncuhdr_root include-path" >&5
6783 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6784 if test "${cf_cv_ncurses_h2+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
6788 test -n "$verbose" && echo
6792 # collect the current set of include-directories from compiler flags
6793 cf_header_path_list=""
6794 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6795 for cf_header_path in $CPPFLAGS $CFLAGS
6797 case $cf_header_path in
6799 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6801 test "x$cf_header_path" != "xNONE" && \
6802 test -d "$cf_header_path" && \
6804 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6805 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6806 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6807 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6808 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6809 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"
6812 cf_header_path_list="$cf_header_path_list $cf_search"
6818 # add the variations for the package we are looking for
6822 test "x$prefix" != "xNONE" && \
6823 test -d "$prefix" && \
6825 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6826 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6827 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6828 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6829 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6830 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6833 for cf_subdir_prefix in \
6842 test "x$cf_subdir_prefix" != "x$prefix" && \
6843 test -d "$cf_subdir_prefix" && \
6844 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6845 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6846 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6847 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6848 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6849 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6850 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"
6855 test "$includedir" != NONE && \
6856 test "$includedir" != "/usr/include" && \
6857 test -d "$includedir" && {
6858 test -d $includedir && cf_search="$cf_search $includedir"
6859 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6862 test "$oldincludedir" != NONE && \
6863 test "$oldincludedir" != "/usr/include" && \
6864 test -d "$oldincludedir" && {
6865 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6866 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6869 cf_search="$cf_search $cf_header_path_list"
6871 test -n "$verbose" && echo search path $cf_search
6872 cf_save2_CPPFLAGS="$CPPFLAGS"
6873 for cf_incdir in $cf_search
6876 if test -n "$cf_incdir" ; then
6877 for cf_add_incdir in $cf_incdir
6879 while test $cf_add_incdir != /usr/include
6881 if test -d $cf_add_incdir
6884 if test -n "$CFLAGS$CPPFLAGS" ; then
6885 # a loop is needed to ensure we can add subdirs of existing dirs
6886 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6887 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6888 cf_have_incdir=yes; break
6893 if test "$cf_have_incdir" = no ; then
6894 if test "$cf_add_incdir" = /usr/local/include ; then
6895 if test "$GCC" = yes
6897 cf_save_CPPFLAGS=$CPPFLAGS
6898 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6899 cat >conftest.$ac_ext <<_ACEOF
6900 #line 6900 "configure"
6901 #include "confdefs.h"
6911 rm -f conftest.$ac_objext
6912 if { (eval echo "$as_me:6912: \"$ac_compile\"") >&5
6913 (eval $ac_compile) 2>&5
6915 echo "$as_me:6915: \$? = $ac_status" >&5
6916 (exit $ac_status); } &&
6917 { ac_try='test -s conftest.$ac_objext'
6918 { (eval echo "$as_me:6918: \"$ac_try\"") >&5
6921 echo "$as_me:6921: \$? = $ac_status" >&5
6922 (exit $ac_status); }; }; then
6925 echo "$as_me: failed program was:" >&5
6926 cat conftest.$ac_ext >&5
6929 rm -f conftest.$ac_objext conftest.$ac_ext
6930 CPPFLAGS=$cf_save_CPPFLAGS
6935 if test "$cf_have_incdir" = no ; then
6936 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6938 echo "${as_me:-configure}:6938: testing adding $cf_add_incdir to include-path ..." 1>&5
6940 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6942 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6943 test "$cf_top_incdir" = "$cf_add_incdir" && break
6944 cf_add_incdir="$cf_top_incdir"
6960 cat >conftest.$ac_ext <<_ACEOF
6961 #line 6961 "configure"
6962 #include "confdefs.h"
6964 #include <$cf_header>
6969 #ifdef NCURSES_VERSION
6971 printf("%s\n", NCURSES_VERSION);
6984 rm -f conftest.$ac_objext
6985 if { (eval echo "$as_me:6985: \"$ac_compile\"") >&5
6986 (eval $ac_compile) 2>&5
6988 echo "$as_me:6988: \$? = $ac_status" >&5
6989 (exit $ac_status); } &&
6990 { ac_try='test -s conftest.$ac_objext'
6991 { (eval echo "$as_me:6991: \"$ac_try\"") >&5
6994 echo "$as_me:6994: \$? = $ac_status" >&5
6995 (exit $ac_status); }; }; then
6996 cf_cv_ncurses_h2=$cf_header
6999 echo "$as_me: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7003 rm -f conftest.$ac_objext conftest.$ac_ext
7005 if test "$cf_cv_ncurses_h2" != no ; then
7006 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7007 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7010 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7012 CPPFLAGS="$cf_save2_CPPFLAGS"
7013 test "$cf_cv_ncurses_h2" != no && break
7015 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7015: error: not found" >&5
7016 echo "$as_me: error: not found" >&2;}
7017 { (exit 1); exit 1; }; }
7020 echo "$as_me:7020: result: $cf_cv_ncurses_h2" >&5
7021 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7023 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7024 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7025 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7026 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7029 if test -n "$cf_1st_incdir" ; then
7030 for cf_add_incdir in $cf_1st_incdir
7032 while test $cf_add_incdir != /usr/include
7034 if test -d $cf_add_incdir
7037 if test -n "$CFLAGS$CPPFLAGS" ; then
7038 # a loop is needed to ensure we can add subdirs of existing dirs
7039 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7040 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7041 cf_have_incdir=yes; break
7046 if test "$cf_have_incdir" = no ; then
7047 if test "$cf_add_incdir" = /usr/local/include ; then
7048 if test "$GCC" = yes
7050 cf_save_CPPFLAGS=$CPPFLAGS
7051 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7052 cat >conftest.$ac_ext <<_ACEOF
7053 #line 7053 "configure"
7054 #include "confdefs.h"
7064 rm -f conftest.$ac_objext
7065 if { (eval echo "$as_me:7065: \"$ac_compile\"") >&5
7066 (eval $ac_compile) 2>&5
7068 echo "$as_me:7068: \$? = $ac_status" >&5
7069 (exit $ac_status); } &&
7070 { ac_try='test -s conftest.$ac_objext'
7071 { (eval echo "$as_me:7071: \"$ac_try\"") >&5
7074 echo "$as_me:7074: \$? = $ac_status" >&5
7075 (exit $ac_status); }; }; then
7078 echo "$as_me: failed program was:" >&5
7079 cat conftest.$ac_ext >&5
7082 rm -f conftest.$ac_objext conftest.$ac_ext
7083 CPPFLAGS=$cf_save_CPPFLAGS
7088 if test "$cf_have_incdir" = no ; then
7089 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7091 echo "${as_me:-configure}:7091: testing adding $cf_add_incdir to include-path ..." 1>&5
7093 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7095 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7096 test "$cf_top_incdir" = "$cf_add_incdir" && break
7097 cf_add_incdir="$cf_top_incdir"
7110 # Set definitions to allow ifdef'ing for ncurses.h
7112 case $cf_cv_ncurses_header in
7115 cat >>confdefs.h <<\EOF
7116 #define HAVE_NCURSES_H 1
7122 case $cf_cv_ncurses_header in
7123 (ncurses/curses.h|ncurses/ncurses.h)
7125 cat >>confdefs.h <<\EOF
7126 #define HAVE_NCURSES_NCURSES_H 1
7130 (ncursesw/curses.h|ncursesw/ncurses.h)
7132 cat >>confdefs.h <<\EOF
7133 #define HAVE_NCURSESW_NCURSES_H 1
7139 echo "$as_me:7139: checking for terminfo header" >&5
7140 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7141 if test "${cf_cv_term_header+set}" = set; then
7142 echo $ECHO_N "(cached) $ECHO_C" >&6
7145 case ${cf_cv_ncurses_header} in
7146 (*/ncurses.h|*/ncursesw.h)
7147 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7150 cf_term_header=term.h
7154 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7156 cat >conftest.$ac_ext <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7160 #include <${cf_cv_ncurses_header:-curses.h}>
7166 int x = auto_left_margin
7171 rm -f conftest.$ac_objext
7172 if { (eval echo "$as_me:7172: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7175 echo "$as_me:7175: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:7178: \"$ac_try\"") >&5
7181 echo "$as_me:7181: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7184 cf_cv_term_header="$cf_test"
7186 echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7189 cf_cv_term_header=unknown
7192 rm -f conftest.$ac_objext conftest.$ac_ext
7193 test "$cf_cv_term_header" != unknown && break
7197 echo "$as_me:7197: result: $cf_cv_term_header" >&5
7198 echo "${ECHO_T}$cf_cv_term_header" >&6
7200 # Set definitions to allow ifdef'ing to accommodate subdirectories
7202 case $cf_cv_term_header in
7205 cat >>confdefs.h <<\EOF
7206 #define HAVE_TERM_H 1
7212 case $cf_cv_term_header in
7215 cat >>confdefs.h <<\EOF
7216 #define HAVE_NCURSES_TERM_H 1
7222 cat >>confdefs.h <<\EOF
7223 #define HAVE_NCURSESW_TERM_H 1
7229 # some applications need this, but should check for NCURSES_VERSION
7231 cat >>confdefs.h <<\EOF
7235 echo "$as_me:7235: checking for ncurses version" >&5
7236 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7237 if test "${cf_cv_ncurses_version+set}" = set; then
7238 echo $ECHO_N "(cached) $ECHO_C" >&6
7241 cf_cv_ncurses_version=no
7244 if test "$cross_compiling" = yes; then
7246 # This will not work if the preprocessor splits the line after the
7247 # Autoconf token. The 'unproto' program does that.
7248 cat > conftest.$ac_ext <<EOF
7249 #include <${cf_cv_ncurses_header:-curses.h}>
7251 #ifdef NCURSES_VERSION
7252 Autoconf NCURSES_VERSION
7260 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7261 { (eval echo "$as_me:7261: \"$cf_try\"") >&5
7264 echo "$as_me:7264: \$? = $ac_status" >&5
7265 (exit $ac_status); }
7266 if test -f conftest.out ; then
7267 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7268 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7273 cat >conftest.$ac_ext <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7277 #include <${cf_cv_ncurses_header:-curses.h}>
7281 FILE *fp = fopen("$cf_tempfile", "w");
7282 #ifdef NCURSES_VERSION
7283 # ifdef NCURSES_VERSION_PATCH
7284 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7286 fprintf(fp, "%s\n", NCURSES_VERSION);
7290 fprintf(fp, "old\n");
7295 ${cf_cv_main_return:-return}(0);
7298 rm -f conftest$ac_exeext
7299 if { (eval echo "$as_me:7299: \"$ac_link\"") >&5
7300 (eval $ac_link) 2>&5
7302 echo "$as_me:7302: \$? = $ac_status" >&5
7303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7304 { (eval echo "$as_me:7304: \"$ac_try\"") >&5
7307 echo "$as_me:7307: \$? = $ac_status" >&5
7308 (exit $ac_status); }; }; then
7310 cf_cv_ncurses_version=`cat $cf_tempfile`
7312 echo "$as_me: program exited with status $ac_status" >&5
7313 echo "$as_me: failed program was:" >&5
7314 cat conftest.$ac_ext >&5
7316 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7321 echo "$as_me:7321: result: $cf_cv_ncurses_version" >&5
7322 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7323 test "$cf_cv_ncurses_version" = no ||
7324 cat >>confdefs.h <<\EOF
7328 cf_nculib_root=$cf_cv_screen
7329 # This works, except for the special case where we find gpm, but
7330 # ncurses is in a nonstandard location via $LIBS, and we really want
7333 cf_ncurses_SAVE="$LIBS"
7334 echo "$as_me:7334: checking for Gpm_Open in -lgpm" >&5
7335 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7336 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7337 echo $ECHO_N "(cached) $ECHO_C" >&6
7339 ac_check_lib_save_LIBS=$LIBS
7341 cat >conftest.$ac_ext <<_ACEOF
7342 #line 7342 "configure"
7343 #include "confdefs.h"
7345 /* Override any gcc2 internal prototype to avoid an error. */
7349 /* We use char because int might match the return type of a gcc2
7350 builtin and then its argument prototype would still apply. */
7360 rm -f conftest.$ac_objext conftest$ac_exeext
7361 if { (eval echo "$as_me:7361: \"$ac_link\"") >&5
7362 (eval $ac_link) 2>&5
7364 echo "$as_me:7364: \$? = $ac_status" >&5
7365 (exit $ac_status); } &&
7366 { ac_try='test -s conftest$ac_exeext'
7367 { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7370 echo "$as_me:7370: \$? = $ac_status" >&5
7371 (exit $ac_status); }; }; then
7372 ac_cv_lib_gpm_Gpm_Open=yes
7374 echo "$as_me: failed program was:" >&5
7375 cat conftest.$ac_ext >&5
7376 ac_cv_lib_gpm_Gpm_Open=no
7378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7379 LIBS=$ac_check_lib_save_LIBS
7381 echo "$as_me:7381: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7382 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7383 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7384 echo "$as_me:7384: checking for initscr in -lgpm" >&5
7385 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7386 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7387 echo $ECHO_N "(cached) $ECHO_C" >&6
7389 ac_check_lib_save_LIBS=$LIBS
7391 cat >conftest.$ac_ext <<_ACEOF
7392 #line 7392 "configure"
7393 #include "confdefs.h"
7395 /* Override any gcc2 internal prototype to avoid an error. */
7399 /* We use char because int might match the return type of a gcc2
7400 builtin and then its argument prototype would still apply. */
7410 rm -f conftest.$ac_objext conftest$ac_exeext
7411 if { (eval echo "$as_me:7411: \"$ac_link\"") >&5
7412 (eval $ac_link) 2>&5
7414 echo "$as_me:7414: \$? = $ac_status" >&5
7415 (exit $ac_status); } &&
7416 { ac_try='test -s conftest$ac_exeext'
7417 { (eval echo "$as_me:7417: \"$ac_try\"") >&5
7420 echo "$as_me:7420: \$? = $ac_status" >&5
7421 (exit $ac_status); }; }; then
7422 ac_cv_lib_gpm_initscr=yes
7424 echo "$as_me: failed program was:" >&5
7425 cat conftest.$ac_ext >&5
7426 ac_cv_lib_gpm_initscr=no
7428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7429 LIBS=$ac_check_lib_save_LIBS
7431 echo "$as_me:7431: result: $ac_cv_lib_gpm_initscr" >&5
7432 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7433 if test $ac_cv_lib_gpm_initscr = yes; then
7434 LIBS="$cf_ncurses_SAVE"
7436 cf_ncurses_LIBS="-lgpm"
7443 # This is only necessary if you are linking against an obsolete
7444 # version of ncurses (but it should do no harm, since it's static).
7445 if test "$cf_nculib_root" = ncurses ; then
7446 echo "$as_me:7446: checking for tgoto in -lmytinfo" >&5
7447 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7448 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7449 echo $ECHO_N "(cached) $ECHO_C" >&6
7451 ac_check_lib_save_LIBS=$LIBS
7452 LIBS="-lmytinfo $LIBS"
7453 cat >conftest.$ac_ext <<_ACEOF
7454 #line 7454 "configure"
7455 #include "confdefs.h"
7457 /* Override any gcc2 internal prototype to avoid an error. */
7461 /* We use char because int might match the return type of a gcc2
7462 builtin and then its argument prototype would still apply. */
7472 rm -f conftest.$ac_objext conftest$ac_exeext
7473 if { (eval echo "$as_me:7473: \"$ac_link\"") >&5
7474 (eval $ac_link) 2>&5
7476 echo "$as_me:7476: \$? = $ac_status" >&5
7477 (exit $ac_status); } &&
7478 { ac_try='test -s conftest$ac_exeext'
7479 { (eval echo "$as_me:7479: \"$ac_try\"") >&5
7482 echo "$as_me:7482: \$? = $ac_status" >&5
7483 (exit $ac_status); }; }; then
7484 ac_cv_lib_mytinfo_tgoto=yes
7486 echo "$as_me: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 ac_cv_lib_mytinfo_tgoto=no
7490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7491 LIBS=$ac_check_lib_save_LIBS
7493 echo "$as_me:7493: result: $ac_cv_lib_mytinfo_tgoto" >&5
7494 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7495 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7496 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7503 cf_add_libs="$cf_ncurses_LIBS"
7504 # Filter out duplicates - this happens with badly-designed ".pc" files...
7505 for cf_add_1lib in $LIBS
7507 for cf_add_2lib in $cf_add_libs
7509 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7515 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7519 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7522 cf_add_libs="-l$cf_nculib_root"
7523 # Filter out duplicates - this happens with badly-designed ".pc" files...
7524 for cf_add_1lib in $LIBS
7526 for cf_add_2lib in $cf_add_libs
7528 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7534 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7540 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7542 echo "$as_me:7542: checking for initscr" >&5
7543 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7544 if test "${ac_cv_func_initscr+set}" = set; then
7545 echo $ECHO_N "(cached) $ECHO_C" >&6
7547 cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 /* System header to define __stub macros and hopefully few prototypes,
7551 which can conflict with char initscr (); below. */
7553 /* Override any gcc2 internal prototype to avoid an error. */
7557 /* We use char because int might match the return type of a gcc2
7558 builtin and then its argument prototype would still apply. */
7565 /* The GNU C library defines this for functions which it implements
7566 to always fail with ENOSYS. Some functions are actually named
7567 something starting with __ and the normal name is an alias. */
7568 #if defined (__stub_initscr) || defined (__stub___initscr)
7571 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7578 rm -f conftest.$ac_objext conftest$ac_exeext
7579 if { (eval echo "$as_me:7579: \"$ac_link\"") >&5
7580 (eval $ac_link) 2>&5
7582 echo "$as_me:7582: \$? = $ac_status" >&5
7583 (exit $ac_status); } &&
7584 { ac_try='test -s conftest$ac_exeext'
7585 { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7588 echo "$as_me:7588: \$? = $ac_status" >&5
7589 (exit $ac_status); }; }; then
7590 ac_cv_func_initscr=yes
7592 echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 ac_cv_func_initscr=no
7596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7598 echo "$as_me:7598: result: $ac_cv_func_initscr" >&5
7599 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7600 if test $ac_cv_func_initscr = yes; then
7601 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7604 cf_save_LIBS="$LIBS"
7605 echo "$as_me:7605: checking for initscr in -l$cf_nculib_root" >&5
7606 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7607 LIBS="-l$cf_nculib_root $LIBS"
7608 cat >conftest.$ac_ext <<_ACEOF
7609 #line 7609 "configure"
7610 #include "confdefs.h"
7611 #include <${cf_cv_ncurses_header:-curses.h}>
7620 rm -f conftest.$ac_objext conftest$ac_exeext
7621 if { (eval echo "$as_me:7621: \"$ac_link\"") >&5
7622 (eval $ac_link) 2>&5
7624 echo "$as_me:7624: \$? = $ac_status" >&5
7625 (exit $ac_status); } &&
7626 { ac_try='test -s conftest$ac_exeext'
7627 { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7630 echo "$as_me:7630: \$? = $ac_status" >&5
7631 (exit $ac_status); }; }; then
7632 echo "$as_me:7632: result: yes" >&5
7633 echo "${ECHO_T}yes" >&6
7634 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7637 echo "$as_me: failed program was:" >&5
7638 cat conftest.$ac_ext >&5
7639 echo "$as_me:7639: result: no" >&5
7640 echo "${ECHO_T}no" >&6
7643 cf_library_path_list=""
7644 if test -n "${LDFLAGS}${LIBS}" ; then
7645 for cf_library_path in $LDFLAGS $LIBS
7647 case $cf_library_path in
7649 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7651 test "x$cf_library_path" != "xNONE" && \
7652 test -d "$cf_library_path" && \
7654 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7655 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7656 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7657 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7658 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7659 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"
7662 cf_library_path_list="$cf_library_path_list $cf_search"
7670 test "x$prefix" != "xNONE" && \
7671 test -d "$prefix" && \
7673 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7674 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7675 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7676 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7677 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7678 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7681 for cf_subdir_prefix in \
7690 test "x$cf_subdir_prefix" != "x$prefix" && \
7691 test -d "$cf_subdir_prefix" && \
7692 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7693 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7694 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7695 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7696 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7697 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7698 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"
7703 cf_search="$cf_library_path_list $cf_search"
7705 for cf_libdir in $cf_search
7707 echo "$as_me:7707: checking for -l$cf_nculib_root in $cf_libdir" >&5
7708 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7709 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7710 cat >conftest.$ac_ext <<_ACEOF
7711 #line 7711 "configure"
7712 #include "confdefs.h"
7713 #include <${cf_cv_ncurses_header:-curses.h}>
7722 rm -f conftest.$ac_objext conftest$ac_exeext
7723 if { (eval echo "$as_me:7723: \"$ac_link\"") >&5
7724 (eval $ac_link) 2>&5
7726 echo "$as_me:7726: \$? = $ac_status" >&5
7727 (exit $ac_status); } &&
7728 { ac_try='test -s conftest$ac_exeext'
7729 { (eval echo "$as_me:7729: \"$ac_try\"") >&5
7732 echo "$as_me:7732: \$? = $ac_status" >&5
7733 (exit $ac_status); }; }; then
7734 echo "$as_me:7734: result: yes" >&5
7735 echo "${ECHO_T}yes" >&6
7736 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7739 echo "$as_me: failed program was:" >&5
7740 cat conftest.$ac_ext >&5
7741 echo "$as_me:7741: result: no" >&5
7742 echo "${ECHO_T}no" >&6
7743 LIBS="$cf_save_LIBS"
7745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7753 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7755 if test $cf_found_library = no ; then
7756 { { echo "$as_me:7756: error: Cannot link $cf_nculib_root library" >&5
7757 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7758 { (exit 1); exit 1; }; }
7763 if test -n "$cf_ncurses_LIBS" ; then
7764 echo "$as_me:7764: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7765 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7766 cf_ncurses_SAVE="$LIBS"
7767 for p in $cf_ncurses_LIBS ; do
7768 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7769 if test "$q" != "$LIBS" ; then
7773 cat >conftest.$ac_ext <<_ACEOF
7774 #line 7774 "configure"
7775 #include "confdefs.h"
7776 #include <${cf_cv_ncurses_header:-curses.h}>
7780 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7785 rm -f conftest.$ac_objext conftest$ac_exeext
7786 if { (eval echo "$as_me:7786: \"$ac_link\"") >&5
7787 (eval $ac_link) 2>&5
7789 echo "$as_me:7789: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest$ac_exeext'
7792 { (eval echo "$as_me:7792: \"$ac_try\"") >&5
7795 echo "$as_me:7795: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
7797 echo "$as_me:7797: result: yes" >&5
7798 echo "${ECHO_T}yes" >&6
7800 echo "$as_me: failed program was:" >&5
7801 cat conftest.$ac_ext >&5
7802 echo "$as_me:7802: result: no" >&5
7803 echo "${ECHO_T}no" >&6
7804 LIBS="$cf_ncurses_SAVE"
7806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7809 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7811 cat >>confdefs.h <<EOF
7812 #define $cf_nculib_ROOT 1
7823 cf_ncuconfig_root=$cf_cv_screen
7824 cf_have_ncuconfig=no
7826 if test "x${PKG_CONFIG:=none}" != xnone; then
7827 echo "$as_me:7827: checking pkg-config for $cf_ncuconfig_root" >&5
7828 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7829 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7830 echo "$as_me:7830: result: yes" >&5
7831 echo "${ECHO_T}yes" >&6
7833 echo "$as_me:7833: checking if the $cf_ncuconfig_root package files work" >&5
7834 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7835 cf_have_ncuconfig=unknown
7837 cf_save_CPPFLAGS="$CPPFLAGS"
7838 cf_save_LIBS="$LIBS"
7840 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7842 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7843 # Filter out duplicates - this happens with badly-designed ".pc" files...
7844 for cf_add_1lib in $LIBS
7846 for cf_add_2lib in $cf_add_libs
7848 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7854 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7858 cat >conftest.$ac_ext <<_ACEOF
7859 #line 7859 "configure"
7860 #include "confdefs.h"
7861 #include <${cf_cv_ncurses_header:-curses.h}>
7865 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7870 rm -f conftest.$ac_objext conftest$ac_exeext
7871 if { (eval echo "$as_me:7871: \"$ac_link\"") >&5
7872 (eval $ac_link) 2>&5
7874 echo "$as_me:7874: \$? = $ac_status" >&5
7875 (exit $ac_status); } &&
7876 { ac_try='test -s conftest$ac_exeext'
7877 { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7880 echo "$as_me:7880: \$? = $ac_status" >&5
7881 (exit $ac_status); }; }; then
7882 if test "$cross_compiling" = yes; then
7883 cf_have_ncuconfig=maybe
7885 cat >conftest.$ac_ext <<_ACEOF
7886 #line 7886 "configure"
7887 #include "confdefs.h"
7888 #include <${cf_cv_ncurses_header:-curses.h}>
7890 { char *xx = curses_version(); return (xx == 0); }
7892 rm -f conftest$ac_exeext
7893 if { (eval echo "$as_me:7893: \"$ac_link\"") >&5
7894 (eval $ac_link) 2>&5
7896 echo "$as_me:7896: \$? = $ac_status" >&5
7897 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7898 { (eval echo "$as_me:7898: \"$ac_try\"") >&5
7901 echo "$as_me:7901: \$? = $ac_status" >&5
7902 (exit $ac_status); }; }; then
7903 cf_have_ncuconfig=yes
7905 echo "$as_me: program exited with status $ac_status" >&5
7906 echo "$as_me: failed program was:" >&5
7907 cat conftest.$ac_ext >&5
7908 cf_have_ncuconfig=no
7910 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7913 echo "$as_me: failed program was:" >&5
7914 cat conftest.$ac_ext >&5
7915 cf_have_ncuconfig=no
7917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7918 echo "$as_me:7918: result: $cf_have_ncuconfig" >&5
7919 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7920 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7921 if test "$cf_have_ncuconfig" != "yes"
7923 CPPFLAGS="$cf_save_CPPFLAGS"
7924 LIBS="$cf_save_LIBS"
7925 NCURSES_CONFIG_PKG=none
7928 cat >>confdefs.h <<\EOF
7932 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7936 echo "$as_me:7936: result: no" >&5
7937 echo "${ECHO_T}no" >&6
7938 NCURSES_CONFIG_PKG=none
7941 NCURSES_CONFIG_PKG=none
7944 if test "x$cf_have_ncuconfig" = "xno"; then
7945 echo "Looking for ${cf_ncuconfig_root}-config"
7947 if test -n "$ac_tool_prefix"; then
7948 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7950 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7951 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7952 echo "$as_me:7952: checking for $ac_word" >&5
7953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7954 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7955 echo $ECHO_N "(cached) $ECHO_C" >&6
7957 if test -n "$NCURSES_CONFIG"; then
7958 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7960 ac_save_IFS=$IFS; IFS=$ac_path_separator
7962 for ac_dir in $ac_dummy; do
7964 test -z "$ac_dir" && ac_dir=.
7965 $as_executable_p "$ac_dir/$ac_word" || continue
7966 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7967 echo "$as_me:7967: found $ac_dir/$ac_word" >&5
7973 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7974 if test -n "$NCURSES_CONFIG"; then
7975 echo "$as_me:7975: result: $NCURSES_CONFIG" >&5
7976 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7978 echo "$as_me:7978: result: no" >&5
7979 echo "${ECHO_T}no" >&6
7982 test -n "$NCURSES_CONFIG" && break
7985 if test -z "$NCURSES_CONFIG"; then
7986 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7987 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7989 # Extract the first word of "$ac_prog", so it can be a program name with args.
7990 set dummy $ac_prog; ac_word=$2
7991 echo "$as_me:7991: checking for $ac_word" >&5
7992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7993 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7994 echo $ECHO_N "(cached) $ECHO_C" >&6
7996 if test -n "$ac_ct_NCURSES_CONFIG"; then
7997 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7999 ac_save_IFS=$IFS; IFS=$ac_path_separator
8001 for ac_dir in $ac_dummy; do
8003 test -z "$ac_dir" && ac_dir=.
8004 $as_executable_p "$ac_dir/$ac_word" || continue
8005 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8006 echo "$as_me:8006: found $ac_dir/$ac_word" >&5
8012 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8013 if test -n "$ac_ct_NCURSES_CONFIG"; then
8014 echo "$as_me:8014: result: $ac_ct_NCURSES_CONFIG" >&5
8015 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8017 echo "$as_me:8017: result: no" >&5
8018 echo "${ECHO_T}no" >&6
8021 test -n "$ac_ct_NCURSES_CONFIG" && break
8023 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8025 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8028 if test "$NCURSES_CONFIG" != none ; then
8030 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8032 cf_add_libs="`$NCURSES_CONFIG --libs`"
8033 # Filter out duplicates - this happens with badly-designed ".pc" files...
8034 for cf_add_1lib in $LIBS
8036 for cf_add_2lib in $cf_add_libs
8038 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8044 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8048 # even with config script, some packages use no-override for curses.h
8050 echo "$as_me:8050: checking if we have identified curses headers" >&5
8051 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8052 if test "${cf_cv_ncurses_header+set}" = set; then
8053 echo $ECHO_N "(cached) $ECHO_C" >&6
8056 cf_cv_ncurses_header=none
8058 ncurses.h $cf_cv_screen/ncurses.h \
8059 curses.h $cf_cv_screen/curses.h
8061 cat >conftest.$ac_ext <<_ACEOF
8062 #line 8062 "configure"
8063 #include "confdefs.h"
8064 #include <${cf_header}>
8068 initscr(); tgoto("?", 0,0)
8073 rm -f conftest.$ac_objext
8074 if { (eval echo "$as_me:8074: \"$ac_compile\"") >&5
8075 (eval $ac_compile) 2>&5
8077 echo "$as_me:8077: \$? = $ac_status" >&5
8078 (exit $ac_status); } &&
8079 { ac_try='test -s conftest.$ac_objext'
8080 { (eval echo "$as_me:8080: \"$ac_try\"") >&5
8083 echo "$as_me:8083: \$? = $ac_status" >&5
8084 (exit $ac_status); }; }; then
8085 cf_cv_ncurses_header=$cf_header; break
8087 echo "$as_me: failed program was:" >&5
8088 cat conftest.$ac_ext >&5
8090 rm -f conftest.$ac_objext conftest.$ac_ext
8094 echo "$as_me:8094: result: $cf_cv_ncurses_header" >&5
8095 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8097 if test "$cf_cv_ncurses_header" = none ; then
8098 { { echo "$as_me:8098: error: No curses header-files found" >&5
8099 echo "$as_me: error: No curses header-files found" >&2;}
8100 { (exit 1); exit 1; }; }
8103 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8105 for ac_header in $cf_cv_ncurses_header
8107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8108 echo "$as_me:8108: checking for $ac_header" >&5
8109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8111 echo $ECHO_N "(cached) $ECHO_C" >&6
8113 cat >conftest.$ac_ext <<_ACEOF
8114 #line 8114 "configure"
8115 #include "confdefs.h"
8116 #include <$ac_header>
8118 if { (eval echo "$as_me:8118: \"$ac_cpp conftest.$ac_ext\"") >&5
8119 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8121 egrep -v '^ *\+' conftest.er1 >conftest.err
8123 cat conftest.err >&5
8124 echo "$as_me:8124: \$? = $ac_status" >&5
8125 (exit $ac_status); } >/dev/null; then
8126 if test -s conftest.err; then
8127 ac_cpp_err=$ac_c_preproc_warn_flag
8134 if test -z "$ac_cpp_err"; then
8135 eval "$as_ac_Header=yes"
8137 echo "$as_me: failed program was:" >&5
8138 cat conftest.$ac_ext >&5
8139 eval "$as_ac_Header=no"
8141 rm -f conftest.err conftest.$ac_ext
8143 echo "$as_me:8143: result: `eval echo '${'$as_ac_Header'}'`" >&5
8144 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8145 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8146 cat >>confdefs.h <<EOF
8147 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8153 cat >>confdefs.h <<\EOF
8157 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8159 cat >>confdefs.h <<EOF
8160 #define $cf_nculib_ROOT 1
8163 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8167 cf_ncuhdr_root=$cf_cv_screen
8169 test -n "$cf_cv_curses_dir" && \
8170 test "$cf_cv_curses_dir" != "no" && { \
8172 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8173 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8175 while test $cf_add_incdir != /usr/include
8177 if test -d $cf_add_incdir
8180 if test -n "$CFLAGS$CPPFLAGS" ; then
8181 # a loop is needed to ensure we can add subdirs of existing dirs
8182 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8183 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8184 cf_have_incdir=yes; break
8189 if test "$cf_have_incdir" = no ; then
8190 if test "$cf_add_incdir" = /usr/local/include ; then
8191 if test "$GCC" = yes
8193 cf_save_CPPFLAGS=$CPPFLAGS
8194 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8195 cat >conftest.$ac_ext <<_ACEOF
8196 #line 8196 "configure"
8197 #include "confdefs.h"
8207 rm -f conftest.$ac_objext
8208 if { (eval echo "$as_me:8208: \"$ac_compile\"") >&5
8209 (eval $ac_compile) 2>&5
8211 echo "$as_me:8211: \$? = $ac_status" >&5
8212 (exit $ac_status); } &&
8213 { ac_try='test -s conftest.$ac_objext'
8214 { (eval echo "$as_me:8214: \"$ac_try\"") >&5
8217 echo "$as_me:8217: \$? = $ac_status" >&5
8218 (exit $ac_status); }; }; then
8221 echo "$as_me: failed program was:" >&5
8222 cat conftest.$ac_ext >&5
8225 rm -f conftest.$ac_objext conftest.$ac_ext
8226 CPPFLAGS=$cf_save_CPPFLAGS
8231 if test "$cf_have_incdir" = no ; then
8232 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8234 echo "${as_me:-configure}:8234: testing adding $cf_add_incdir to include-path ..." 1>&5
8236 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8238 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8239 test "$cf_top_incdir" = "$cf_add_incdir" && break
8240 cf_add_incdir="$cf_top_incdir"
8253 echo "$as_me:8253: checking for $cf_ncuhdr_root header in include-path" >&5
8254 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8255 if test "${cf_cv_ncurses_h+set}" = set; then
8256 echo $ECHO_N "(cached) $ECHO_C" >&6
8259 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8260 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8261 for cf_header in $cf_header_list
8264 cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8268 #include <$cf_header>
8273 #ifdef NCURSES_VERSION
8275 printf("%s\n", NCURSES_VERSION);
8288 rm -f conftest.$ac_objext
8289 if { (eval echo "$as_me:8289: \"$ac_compile\"") >&5
8290 (eval $ac_compile) 2>&5
8292 echo "$as_me:8292: \$? = $ac_status" >&5
8293 (exit $ac_status); } &&
8294 { ac_try='test -s conftest.$ac_objext'
8295 { (eval echo "$as_me:8295: \"$ac_try\"") >&5
8298 echo "$as_me:8298: \$? = $ac_status" >&5
8299 (exit $ac_status); }; }; then
8300 cf_cv_ncurses_h=$cf_header
8303 echo "$as_me: failed program was:" >&5
8304 cat conftest.$ac_ext >&5
8307 rm -f conftest.$ac_objext conftest.$ac_ext
8309 test "$cf_cv_ncurses_h" != no && break
8313 echo "$as_me:8313: result: $cf_cv_ncurses_h" >&5
8314 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8316 if test "$cf_cv_ncurses_h" != no ; then
8317 cf_cv_ncurses_header=$cf_cv_ncurses_h
8320 echo "$as_me:8320: checking for $cf_ncuhdr_root include-path" >&5
8321 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8322 if test "${cf_cv_ncurses_h2+set}" = set; then
8323 echo $ECHO_N "(cached) $ECHO_C" >&6
8326 test -n "$verbose" && echo
8330 # collect the current set of include-directories from compiler flags
8331 cf_header_path_list=""
8332 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8333 for cf_header_path in $CPPFLAGS $CFLAGS
8335 case $cf_header_path in
8337 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8339 test "x$cf_header_path" != "xNONE" && \
8340 test -d "$cf_header_path" && \
8342 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8343 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8344 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8345 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8346 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8347 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"
8350 cf_header_path_list="$cf_header_path_list $cf_search"
8356 # add the variations for the package we are looking for
8360 test "x$prefix" != "xNONE" && \
8361 test -d "$prefix" && \
8363 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8364 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8365 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8366 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8367 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8368 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8371 for cf_subdir_prefix in \
8380 test "x$cf_subdir_prefix" != "x$prefix" && \
8381 test -d "$cf_subdir_prefix" && \
8382 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8383 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8384 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8385 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8386 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8387 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8388 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"
8393 test "$includedir" != NONE && \
8394 test "$includedir" != "/usr/include" && \
8395 test -d "$includedir" && {
8396 test -d $includedir && cf_search="$cf_search $includedir"
8397 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8400 test "$oldincludedir" != NONE && \
8401 test "$oldincludedir" != "/usr/include" && \
8402 test -d "$oldincludedir" && {
8403 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8404 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8407 cf_search="$cf_search $cf_header_path_list"
8409 test -n "$verbose" && echo search path $cf_search
8410 cf_save2_CPPFLAGS="$CPPFLAGS"
8411 for cf_incdir in $cf_search
8414 if test -n "$cf_incdir" ; then
8415 for cf_add_incdir in $cf_incdir
8417 while test $cf_add_incdir != /usr/include
8419 if test -d $cf_add_incdir
8422 if test -n "$CFLAGS$CPPFLAGS" ; then
8423 # a loop is needed to ensure we can add subdirs of existing dirs
8424 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8425 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8426 cf_have_incdir=yes; break
8431 if test "$cf_have_incdir" = no ; then
8432 if test "$cf_add_incdir" = /usr/local/include ; then
8433 if test "$GCC" = yes
8435 cf_save_CPPFLAGS=$CPPFLAGS
8436 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8437 cat >conftest.$ac_ext <<_ACEOF
8438 #line 8438 "configure"
8439 #include "confdefs.h"
8449 rm -f conftest.$ac_objext
8450 if { (eval echo "$as_me:8450: \"$ac_compile\"") >&5
8451 (eval $ac_compile) 2>&5
8453 echo "$as_me:8453: \$? = $ac_status" >&5
8454 (exit $ac_status); } &&
8455 { ac_try='test -s conftest.$ac_objext'
8456 { (eval echo "$as_me:8456: \"$ac_try\"") >&5
8459 echo "$as_me:8459: \$? = $ac_status" >&5
8460 (exit $ac_status); }; }; then
8463 echo "$as_me: failed program was:" >&5
8464 cat conftest.$ac_ext >&5
8467 rm -f conftest.$ac_objext conftest.$ac_ext
8468 CPPFLAGS=$cf_save_CPPFLAGS
8473 if test "$cf_have_incdir" = no ; then
8474 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8476 echo "${as_me:-configure}:8476: testing adding $cf_add_incdir to include-path ..." 1>&5
8478 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8480 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8481 test "$cf_top_incdir" = "$cf_add_incdir" && break
8482 cf_add_incdir="$cf_top_incdir"
8498 cat >conftest.$ac_ext <<_ACEOF
8499 #line 8499 "configure"
8500 #include "confdefs.h"
8502 #include <$cf_header>
8507 #ifdef NCURSES_VERSION
8509 printf("%s\n", NCURSES_VERSION);
8522 rm -f conftest.$ac_objext
8523 if { (eval echo "$as_me:8523: \"$ac_compile\"") >&5
8524 (eval $ac_compile) 2>&5
8526 echo "$as_me:8526: \$? = $ac_status" >&5
8527 (exit $ac_status); } &&
8528 { ac_try='test -s conftest.$ac_objext'
8529 { (eval echo "$as_me:8529: \"$ac_try\"") >&5
8532 echo "$as_me:8532: \$? = $ac_status" >&5
8533 (exit $ac_status); }; }; then
8534 cf_cv_ncurses_h2=$cf_header
8537 echo "$as_me: failed program was:" >&5
8538 cat conftest.$ac_ext >&5
8541 rm -f conftest.$ac_objext conftest.$ac_ext
8543 if test "$cf_cv_ncurses_h2" != no ; then
8544 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8545 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8548 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8550 CPPFLAGS="$cf_save2_CPPFLAGS"
8551 test "$cf_cv_ncurses_h2" != no && break
8553 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8553: error: not found" >&5
8554 echo "$as_me: error: not found" >&2;}
8555 { (exit 1); exit 1; }; }
8558 echo "$as_me:8558: result: $cf_cv_ncurses_h2" >&5
8559 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8561 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8562 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8563 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8564 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8567 if test -n "$cf_1st_incdir" ; then
8568 for cf_add_incdir in $cf_1st_incdir
8570 while test $cf_add_incdir != /usr/include
8572 if test -d $cf_add_incdir
8575 if test -n "$CFLAGS$CPPFLAGS" ; then
8576 # a loop is needed to ensure we can add subdirs of existing dirs
8577 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8578 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8579 cf_have_incdir=yes; break
8584 if test "$cf_have_incdir" = no ; then
8585 if test "$cf_add_incdir" = /usr/local/include ; then
8586 if test "$GCC" = yes
8588 cf_save_CPPFLAGS=$CPPFLAGS
8589 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8590 cat >conftest.$ac_ext <<_ACEOF
8591 #line 8591 "configure"
8592 #include "confdefs.h"
8602 rm -f conftest.$ac_objext
8603 if { (eval echo "$as_me:8603: \"$ac_compile\"") >&5
8604 (eval $ac_compile) 2>&5
8606 echo "$as_me:8606: \$? = $ac_status" >&5
8607 (exit $ac_status); } &&
8608 { ac_try='test -s conftest.$ac_objext'
8609 { (eval echo "$as_me:8609: \"$ac_try\"") >&5
8612 echo "$as_me:8612: \$? = $ac_status" >&5
8613 (exit $ac_status); }; }; then
8616 echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8620 rm -f conftest.$ac_objext conftest.$ac_ext
8621 CPPFLAGS=$cf_save_CPPFLAGS
8626 if test "$cf_have_incdir" = no ; then
8627 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8629 echo "${as_me:-configure}:8629: testing adding $cf_add_incdir to include-path ..." 1>&5
8631 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8633 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8634 test "$cf_top_incdir" = "$cf_add_incdir" && break
8635 cf_add_incdir="$cf_top_incdir"
8648 # Set definitions to allow ifdef'ing for ncurses.h
8650 case $cf_cv_ncurses_header in
8653 cat >>confdefs.h <<\EOF
8654 #define HAVE_NCURSES_H 1
8660 case $cf_cv_ncurses_header in
8661 (ncurses/curses.h|ncurses/ncurses.h)
8663 cat >>confdefs.h <<\EOF
8664 #define HAVE_NCURSES_NCURSES_H 1
8668 (ncursesw/curses.h|ncursesw/ncurses.h)
8670 cat >>confdefs.h <<\EOF
8671 #define HAVE_NCURSESW_NCURSES_H 1
8677 echo "$as_me:8677: checking for terminfo header" >&5
8678 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8679 if test "${cf_cv_term_header+set}" = set; then
8680 echo $ECHO_N "(cached) $ECHO_C" >&6
8683 case ${cf_cv_ncurses_header} in
8684 (*/ncurses.h|*/ncursesw.h)
8685 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8688 cf_term_header=term.h
8692 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8694 cat >conftest.$ac_ext <<_ACEOF
8695 #line 8695 "configure"
8696 #include "confdefs.h"
8698 #include <${cf_cv_ncurses_header:-curses.h}>
8704 int x = auto_left_margin
8709 rm -f conftest.$ac_objext
8710 if { (eval echo "$as_me:8710: \"$ac_compile\"") >&5
8711 (eval $ac_compile) 2>&5
8713 echo "$as_me:8713: \$? = $ac_status" >&5
8714 (exit $ac_status); } &&
8715 { ac_try='test -s conftest.$ac_objext'
8716 { (eval echo "$as_me:8716: \"$ac_try\"") >&5
8719 echo "$as_me:8719: \$? = $ac_status" >&5
8720 (exit $ac_status); }; }; then
8722 cf_cv_term_header="$cf_test"
8724 echo "$as_me: failed program was:" >&5
8725 cat conftest.$ac_ext >&5
8727 cf_cv_term_header=unknown
8730 rm -f conftest.$ac_objext conftest.$ac_ext
8731 test "$cf_cv_term_header" != unknown && break
8735 echo "$as_me:8735: result: $cf_cv_term_header" >&5
8736 echo "${ECHO_T}$cf_cv_term_header" >&6
8738 # Set definitions to allow ifdef'ing to accommodate subdirectories
8740 case $cf_cv_term_header in
8743 cat >>confdefs.h <<\EOF
8744 #define HAVE_TERM_H 1
8750 case $cf_cv_term_header in
8753 cat >>confdefs.h <<\EOF
8754 #define HAVE_NCURSES_TERM_H 1
8760 cat >>confdefs.h <<\EOF
8761 #define HAVE_NCURSESW_TERM_H 1
8767 # some applications need this, but should check for NCURSES_VERSION
8769 cat >>confdefs.h <<\EOF
8773 echo "$as_me:8773: checking for ncurses version" >&5
8774 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8775 if test "${cf_cv_ncurses_version+set}" = set; then
8776 echo $ECHO_N "(cached) $ECHO_C" >&6
8779 cf_cv_ncurses_version=no
8782 if test "$cross_compiling" = yes; then
8784 # This will not work if the preprocessor splits the line after the
8785 # Autoconf token. The 'unproto' program does that.
8786 cat > conftest.$ac_ext <<EOF
8787 #include <${cf_cv_ncurses_header:-curses.h}>
8789 #ifdef NCURSES_VERSION
8790 Autoconf NCURSES_VERSION
8798 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8799 { (eval echo "$as_me:8799: \"$cf_try\"") >&5
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); }
8804 if test -f conftest.out ; then
8805 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8806 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8811 cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8815 #include <${cf_cv_ncurses_header:-curses.h}>
8819 FILE *fp = fopen("$cf_tempfile", "w");
8820 #ifdef NCURSES_VERSION
8821 # ifdef NCURSES_VERSION_PATCH
8822 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8824 fprintf(fp, "%s\n", NCURSES_VERSION);
8828 fprintf(fp, "old\n");
8833 ${cf_cv_main_return:-return}(0);
8836 rm -f conftest$ac_exeext
8837 if { (eval echo "$as_me:8837: \"$ac_link\"") >&5
8838 (eval $ac_link) 2>&5
8840 echo "$as_me:8840: \$? = $ac_status" >&5
8841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8842 { (eval echo "$as_me:8842: \"$ac_try\"") >&5
8845 echo "$as_me:8845: \$? = $ac_status" >&5
8846 (exit $ac_status); }; }; then
8848 cf_cv_ncurses_version=`cat $cf_tempfile`
8850 echo "$as_me: program exited with status $ac_status" >&5
8851 echo "$as_me: failed program was:" >&5
8852 cat conftest.$ac_ext >&5
8854 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8859 echo "$as_me:8859: result: $cf_cv_ncurses_version" >&5
8860 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8861 test "$cf_cv_ncurses_version" = no ||
8862 cat >>confdefs.h <<\EOF
8866 cf_nculib_root=$cf_cv_screen
8867 # This works, except for the special case where we find gpm, but
8868 # ncurses is in a nonstandard location via $LIBS, and we really want
8871 cf_ncurses_SAVE="$LIBS"
8872 echo "$as_me:8872: checking for Gpm_Open in -lgpm" >&5
8873 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8874 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8875 echo $ECHO_N "(cached) $ECHO_C" >&6
8877 ac_check_lib_save_LIBS=$LIBS
8879 cat >conftest.$ac_ext <<_ACEOF
8880 #line 8880 "configure"
8881 #include "confdefs.h"
8883 /* Override any gcc2 internal prototype to avoid an error. */
8887 /* We use char because int might match the return type of a gcc2
8888 builtin and then its argument prototype would still apply. */
8898 rm -f conftest.$ac_objext conftest$ac_exeext
8899 if { (eval echo "$as_me:8899: \"$ac_link\"") >&5
8900 (eval $ac_link) 2>&5
8902 echo "$as_me:8902: \$? = $ac_status" >&5
8903 (exit $ac_status); } &&
8904 { ac_try='test -s conftest$ac_exeext'
8905 { (eval echo "$as_me:8905: \"$ac_try\"") >&5
8908 echo "$as_me:8908: \$? = $ac_status" >&5
8909 (exit $ac_status); }; }; then
8910 ac_cv_lib_gpm_Gpm_Open=yes
8912 echo "$as_me: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914 ac_cv_lib_gpm_Gpm_Open=no
8916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8917 LIBS=$ac_check_lib_save_LIBS
8919 echo "$as_me:8919: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8920 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8921 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8922 echo "$as_me:8922: checking for initscr in -lgpm" >&5
8923 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8924 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8925 echo $ECHO_N "(cached) $ECHO_C" >&6
8927 ac_check_lib_save_LIBS=$LIBS
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8933 /* Override any gcc2 internal prototype to avoid an error. */
8937 /* We use char because int might match the return type of a gcc2
8938 builtin and then its argument prototype would still apply. */
8948 rm -f conftest.$ac_objext conftest$ac_exeext
8949 if { (eval echo "$as_me:8949: \"$ac_link\"") >&5
8950 (eval $ac_link) 2>&5
8952 echo "$as_me:8952: \$? = $ac_status" >&5
8953 (exit $ac_status); } &&
8954 { ac_try='test -s conftest$ac_exeext'
8955 { (eval echo "$as_me:8955: \"$ac_try\"") >&5
8958 echo "$as_me:8958: \$? = $ac_status" >&5
8959 (exit $ac_status); }; }; then
8960 ac_cv_lib_gpm_initscr=yes
8962 echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 ac_cv_lib_gpm_initscr=no
8966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8967 LIBS=$ac_check_lib_save_LIBS
8969 echo "$as_me:8969: result: $ac_cv_lib_gpm_initscr" >&5
8970 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8971 if test $ac_cv_lib_gpm_initscr = yes; then
8972 LIBS="$cf_ncurses_SAVE"
8974 cf_ncurses_LIBS="-lgpm"
8981 # This is only necessary if you are linking against an obsolete
8982 # version of ncurses (but it should do no harm, since it's static).
8983 if test "$cf_nculib_root" = ncurses ; then
8984 echo "$as_me:8984: checking for tgoto in -lmytinfo" >&5
8985 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8986 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8987 echo $ECHO_N "(cached) $ECHO_C" >&6
8989 ac_check_lib_save_LIBS=$LIBS
8990 LIBS="-lmytinfo $LIBS"
8991 cat >conftest.$ac_ext <<_ACEOF
8992 #line 8992 "configure"
8993 #include "confdefs.h"
8995 /* Override any gcc2 internal prototype to avoid an error. */
8999 /* We use char because int might match the return type of a gcc2
9000 builtin and then its argument prototype would still apply. */
9010 rm -f conftest.$ac_objext conftest$ac_exeext
9011 if { (eval echo "$as_me:9011: \"$ac_link\"") >&5
9012 (eval $ac_link) 2>&5
9014 echo "$as_me:9014: \$? = $ac_status" >&5
9015 (exit $ac_status); } &&
9016 { ac_try='test -s conftest$ac_exeext'
9017 { (eval echo "$as_me:9017: \"$ac_try\"") >&5
9020 echo "$as_me:9020: \$? = $ac_status" >&5
9021 (exit $ac_status); }; }; then
9022 ac_cv_lib_mytinfo_tgoto=yes
9024 echo "$as_me: failed program was:" >&5
9025 cat conftest.$ac_ext >&5
9026 ac_cv_lib_mytinfo_tgoto=no
9028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9029 LIBS=$ac_check_lib_save_LIBS
9031 echo "$as_me:9031: result: $ac_cv_lib_mytinfo_tgoto" >&5
9032 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9033 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9034 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9041 cf_add_libs="$cf_ncurses_LIBS"
9042 # Filter out duplicates - this happens with badly-designed ".pc" files...
9043 for cf_add_1lib in $LIBS
9045 for cf_add_2lib in $cf_add_libs
9047 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9053 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9057 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9060 cf_add_libs="-l$cf_nculib_root"
9061 # Filter out duplicates - this happens with badly-designed ".pc" files...
9062 for cf_add_1lib in $LIBS
9064 for cf_add_2lib in $cf_add_libs
9066 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9072 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9078 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9080 echo "$as_me:9080: checking for initscr" >&5
9081 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9082 if test "${ac_cv_func_initscr+set}" = set; then
9083 echo $ECHO_N "(cached) $ECHO_C" >&6
9085 cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088 /* System header to define __stub macros and hopefully few prototypes,
9089 which can conflict with char initscr (); below. */
9091 /* Override any gcc2 internal prototype to avoid an error. */
9095 /* We use char because int might match the return type of a gcc2
9096 builtin and then its argument prototype would still apply. */
9103 /* The GNU C library defines this for functions which it implements
9104 to always fail with ENOSYS. Some functions are actually named
9105 something starting with __ and the normal name is an alias. */
9106 #if defined (__stub_initscr) || defined (__stub___initscr)
9109 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9116 rm -f conftest.$ac_objext conftest$ac_exeext
9117 if { (eval echo "$as_me:9117: \"$ac_link\"") >&5
9118 (eval $ac_link) 2>&5
9120 echo "$as_me:9120: \$? = $ac_status" >&5
9121 (exit $ac_status); } &&
9122 { ac_try='test -s conftest$ac_exeext'
9123 { (eval echo "$as_me:9123: \"$ac_try\"") >&5
9126 echo "$as_me:9126: \$? = $ac_status" >&5
9127 (exit $ac_status); }; }; then
9128 ac_cv_func_initscr=yes
9130 echo "$as_me: failed program was:" >&5
9131 cat conftest.$ac_ext >&5
9132 ac_cv_func_initscr=no
9134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9136 echo "$as_me:9136: result: $ac_cv_func_initscr" >&5
9137 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9138 if test $ac_cv_func_initscr = yes; then
9139 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9142 cf_save_LIBS="$LIBS"
9143 echo "$as_me:9143: checking for initscr in -l$cf_nculib_root" >&5
9144 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9145 LIBS="-l$cf_nculib_root $LIBS"
9146 cat >conftest.$ac_ext <<_ACEOF
9147 #line 9147 "configure"
9148 #include "confdefs.h"
9149 #include <${cf_cv_ncurses_header:-curses.h}>
9158 rm -f conftest.$ac_objext conftest$ac_exeext
9159 if { (eval echo "$as_me:9159: \"$ac_link\"") >&5
9160 (eval $ac_link) 2>&5
9162 echo "$as_me:9162: \$? = $ac_status" >&5
9163 (exit $ac_status); } &&
9164 { ac_try='test -s conftest$ac_exeext'
9165 { (eval echo "$as_me:9165: \"$ac_try\"") >&5
9168 echo "$as_me:9168: \$? = $ac_status" >&5
9169 (exit $ac_status); }; }; then
9170 echo "$as_me:9170: result: yes" >&5
9171 echo "${ECHO_T}yes" >&6
9172 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9175 echo "$as_me: failed program was:" >&5
9176 cat conftest.$ac_ext >&5
9177 echo "$as_me:9177: result: no" >&5
9178 echo "${ECHO_T}no" >&6
9181 cf_library_path_list=""
9182 if test -n "${LDFLAGS}${LIBS}" ; then
9183 for cf_library_path in $LDFLAGS $LIBS
9185 case $cf_library_path in
9187 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9189 test "x$cf_library_path" != "xNONE" && \
9190 test -d "$cf_library_path" && \
9192 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9193 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9194 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9195 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9196 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9197 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"
9200 cf_library_path_list="$cf_library_path_list $cf_search"
9208 test "x$prefix" != "xNONE" && \
9209 test -d "$prefix" && \
9211 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9212 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9213 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9214 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9215 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9216 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9219 for cf_subdir_prefix in \
9228 test "x$cf_subdir_prefix" != "x$prefix" && \
9229 test -d "$cf_subdir_prefix" && \
9230 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9231 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9232 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9233 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9234 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9235 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9236 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"
9241 cf_search="$cf_library_path_list $cf_search"
9243 for cf_libdir in $cf_search
9245 echo "$as_me:9245: checking for -l$cf_nculib_root in $cf_libdir" >&5
9246 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9247 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9248 cat >conftest.$ac_ext <<_ACEOF
9249 #line 9249 "configure"
9250 #include "confdefs.h"
9251 #include <${cf_cv_ncurses_header:-curses.h}>
9260 rm -f conftest.$ac_objext conftest$ac_exeext
9261 if { (eval echo "$as_me:9261: \"$ac_link\"") >&5
9262 (eval $ac_link) 2>&5
9264 echo "$as_me:9264: \$? = $ac_status" >&5
9265 (exit $ac_status); } &&
9266 { ac_try='test -s conftest$ac_exeext'
9267 { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9270 echo "$as_me:9270: \$? = $ac_status" >&5
9271 (exit $ac_status); }; }; then
9272 echo "$as_me:9272: result: yes" >&5
9273 echo "${ECHO_T}yes" >&6
9274 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9277 echo "$as_me: failed program was:" >&5
9278 cat conftest.$ac_ext >&5
9279 echo "$as_me:9279: result: no" >&5
9280 echo "${ECHO_T}no" >&6
9281 LIBS="$cf_save_LIBS"
9283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9291 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9293 if test $cf_found_library = no ; then
9294 { { echo "$as_me:9294: error: Cannot link $cf_nculib_root library" >&5
9295 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9296 { (exit 1); exit 1; }; }
9301 if test -n "$cf_ncurses_LIBS" ; then
9302 echo "$as_me:9302: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9303 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9304 cf_ncurses_SAVE="$LIBS"
9305 for p in $cf_ncurses_LIBS ; do
9306 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9307 if test "$q" != "$LIBS" ; then
9311 cat >conftest.$ac_ext <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314 #include <${cf_cv_ncurses_header:-curses.h}>
9318 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9323 rm -f conftest.$ac_objext conftest$ac_exeext
9324 if { (eval echo "$as_me:9324: \"$ac_link\"") >&5
9325 (eval $ac_link) 2>&5
9327 echo "$as_me:9327: \$? = $ac_status" >&5
9328 (exit $ac_status); } &&
9329 { ac_try='test -s conftest$ac_exeext'
9330 { (eval echo "$as_me:9330: \"$ac_try\"") >&5
9333 echo "$as_me:9333: \$? = $ac_status" >&5
9334 (exit $ac_status); }; }; then
9335 echo "$as_me:9335: result: yes" >&5
9336 echo "${ECHO_T}yes" >&6
9338 echo "$as_me: failed program was:" >&5
9339 cat conftest.$ac_ext >&5
9340 echo "$as_me:9340: result: no" >&5
9341 echo "${ECHO_T}no" >&6
9342 LIBS="$cf_ncurses_SAVE"
9344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9347 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9349 cat >>confdefs.h <<EOF
9350 #define $cf_nculib_ROOT 1
9360 echo "$as_me:9360: checking for X" >&5
9361 echo $ECHO_N "checking for X... $ECHO_C" >&6
9363 # Check whether --with-x or --without-x was given.
9364 if test "${with_x+set}" = set; then
9368 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9369 if test "x$with_x" = xno; then
9370 # The user explicitly disabled X.
9373 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9374 # Both variables are already set.
9377 if test "${ac_cv_have_x+set}" = set; then
9378 echo $ECHO_N "(cached) $ECHO_C" >&6
9380 # One or both of the vars are not set, and there is no cached value.
9381 ac_x_includes=no ac_x_libraries=no
9383 if mkdir conftest.dir; then
9385 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9386 cat >Imakefile <<'EOF'
9388 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9390 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9391 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9392 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9393 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9394 for ac_extension in a so sl dylib dll; do
9395 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9396 test -f $ac_im_libdir/libX11.$ac_extension; then
9397 ac_im_usrlibdir=$ac_im_libdir; break
9400 # Screen out bogus values from the imake configuration. They are
9401 # bogus both because they are the default anyway, and because
9402 # using them would break gcc on systems where it needs fixed includes.
9403 case $ac_im_incroot in
9405 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9407 case $ac_im_usrlibdir in
9409 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9416 # Standard set of common directories for X headers.
9417 # Check X11 before X11Rn because it is often a symlink to the current release.
9429 /usr/local/X11/include
9430 /usr/local/X11R6/include
9431 /usr/local/X11R5/include
9432 /usr/local/X11R4/include
9434 /usr/local/include/X11
9435 /usr/local/include/X11R6
9436 /usr/local/include/X11R5
9437 /usr/local/include/X11R4
9441 /usr/XFree86/include/X11
9445 /usr/unsupported/include
9447 /usr/local/x11r5/include
9448 /usr/lpp/Xamples/include
9450 /usr/openwin/include
9451 /usr/openwin/share/include'
9453 if test "$ac_x_includes" = no; then
9454 # Guess where to find include files, by looking for Intrinsic.h.
9455 # First, try using that file with no special directory specified.
9456 cat >conftest.$ac_ext <<_ACEOF
9457 #line 9457 "configure"
9458 #include "confdefs.h"
9459 #include <X11/Intrinsic.h>
9461 if { (eval echo "$as_me:9461: \"$ac_cpp conftest.$ac_ext\"") >&5
9462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9464 egrep -v '^ *\+' conftest.er1 >conftest.err
9466 cat conftest.err >&5
9467 echo "$as_me:9467: \$? = $ac_status" >&5
9468 (exit $ac_status); } >/dev/null; then
9469 if test -s conftest.err; then
9470 ac_cpp_err=$ac_c_preproc_warn_flag
9477 if test -z "$ac_cpp_err"; then
9478 # We can compile using X headers with no special include directory.
9481 echo "$as_me: failed program was:" >&5
9482 cat conftest.$ac_ext >&5
9483 for ac_dir in $ac_x_header_dirs; do
9484 if test -r "$ac_dir/X11/Intrinsic.h"; then
9485 ac_x_includes=$ac_dir
9490 rm -f conftest.err conftest.$ac_ext
9491 fi # $ac_x_includes = no
9493 if test "$ac_x_libraries" = no; then
9494 # Check for the libraries.
9495 # See if we find them without any special options.
9496 # Don't add to $LIBS permanently.
9499 cat >conftest.$ac_ext <<_ACEOF
9500 #line 9500 "configure"
9501 #include "confdefs.h"
9502 #include <X11/Intrinsic.h>
9511 rm -f conftest.$ac_objext conftest$ac_exeext
9512 if { (eval echo "$as_me:9512: \"$ac_link\"") >&5
9513 (eval $ac_link) 2>&5
9515 echo "$as_me:9515: \$? = $ac_status" >&5
9516 (exit $ac_status); } &&
9517 { ac_try='test -s conftest$ac_exeext'
9518 { (eval echo "$as_me:9518: \"$ac_try\"") >&5
9521 echo "$as_me:9521: \$? = $ac_status" >&5
9522 (exit $ac_status); }; }; then
9524 # We can link X programs with no special library path.
9527 echo "$as_me: failed program was:" >&5
9528 cat conftest.$ac_ext >&5
9530 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9532 # Don't even attempt the hair of trying to link an X program!
9533 for ac_extension in a so sl dylib dll; do
9534 if test -r $ac_dir/libXt.$ac_extension; then
9535 ac_x_libraries=$ac_dir
9541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9542 fi # $ac_x_libraries = no
9544 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9545 # Didn't find X anywhere. Cache the known absence of X.
9546 ac_cv_have_x="have_x=no"
9548 # Record where we found X for the cache.
9549 ac_cv_have_x="have_x=yes \
9550 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9555 eval "$ac_cv_have_x"
9558 if test "$have_x" != yes; then
9559 echo "$as_me:9559: result: $have_x" >&5
9560 echo "${ECHO_T}$have_x" >&6
9563 # If each of the values was on the command line, it overrides each guess.
9564 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9565 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9566 # Update the cache value to reflect the command line values.
9567 ac_cv_have_x="have_x=yes \
9568 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9569 echo "$as_me:9569: result: libraries $x_libraries, headers $x_includes" >&5
9570 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9573 if test "$no_x" = yes; then
9574 # Not all programs may use this symbol, but it does not hurt to define it.
9576 cat >>confdefs.h <<\EOF
9577 #define X_DISPLAY_MISSING 1
9580 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9582 if test -n "$x_includes"; then
9583 X_CFLAGS="$X_CFLAGS -I$x_includes"
9586 # It would also be nice to do this for all -L options, not just this one.
9587 if test -n "$x_libraries"; then
9588 X_LIBS="$X_LIBS -L$x_libraries"
9589 # For Solaris; some versions of Sun CC require a space after -R and
9590 # others require no space. Words are not sufficient . . . .
9591 case `(uname -sr) 2>/dev/null` in
9593 echo "$as_me:9593: checking whether -R must be followed by a space" >&5
9594 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9595 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9596 cat >conftest.$ac_ext <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9608 rm -f conftest.$ac_objext conftest$ac_exeext
9609 if { (eval echo "$as_me:9609: \"$ac_link\"") >&5
9610 (eval $ac_link) 2>&5
9612 echo "$as_me:9612: \$? = $ac_status" >&5
9613 (exit $ac_status); } &&
9614 { ac_try='test -s conftest$ac_exeext'
9615 { (eval echo "$as_me:9615: \"$ac_try\"") >&5
9618 echo "$as_me:9618: \$? = $ac_status" >&5
9619 (exit $ac_status); }; }; then
9622 echo "$as_me: failed program was:" >&5
9623 cat conftest.$ac_ext >&5
9626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9627 if test $ac_R_nospace = yes; then
9628 echo "$as_me:9628: result: no" >&5
9629 echo "${ECHO_T}no" >&6
9630 X_LIBS="$X_LIBS -R$x_libraries"
9632 LIBS="$ac_xsave_LIBS -R $x_libraries"
9633 cat >conftest.$ac_ext <<_ACEOF
9634 #line 9634 "configure"
9635 #include "confdefs.h"
9645 rm -f conftest.$ac_objext conftest$ac_exeext
9646 if { (eval echo "$as_me:9646: \"$ac_link\"") >&5
9647 (eval $ac_link) 2>&5
9649 echo "$as_me:9649: \$? = $ac_status" >&5
9650 (exit $ac_status); } &&
9651 { ac_try='test -s conftest$ac_exeext'
9652 { (eval echo "$as_me:9652: \"$ac_try\"") >&5
9655 echo "$as_me:9655: \$? = $ac_status" >&5
9656 (exit $ac_status); }; }; then
9659 echo "$as_me: failed program was:" >&5
9660 cat conftest.$ac_ext >&5
9663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9664 if test $ac_R_space = yes; then
9665 echo "$as_me:9665: result: yes" >&5
9666 echo "${ECHO_T}yes" >&6
9667 X_LIBS="$X_LIBS -R $x_libraries"
9669 echo "$as_me:9669: result: neither works" >&5
9670 echo "${ECHO_T}neither works" >&6
9677 # Check for system-dependent libraries X programs must link with.
9678 # Do this before checking for the system-independent R6 libraries
9679 # (-lICE), since we may need -lsocket or whatever for X linking.
9681 if test "$ISC" = yes; then
9682 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9684 # Martyn Johnson says this is needed for Ultrix, if the X
9685 # libraries were built with DECnet support. And Karl Berry says
9686 # the Alpha needs dnet_stub (dnet does not exist).
9687 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9688 cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9692 /* Override any gcc2 internal prototype to avoid an error. */
9696 /* We use char because int might match the return type of a gcc2
9697 builtin and then its argument prototype would still apply. */
9698 char XOpenDisplay ();
9707 rm -f conftest.$ac_objext conftest$ac_exeext
9708 if { (eval echo "$as_me:9708: \"$ac_link\"") >&5
9709 (eval $ac_link) 2>&5
9711 echo "$as_me:9711: \$? = $ac_status" >&5
9712 (exit $ac_status); } &&
9713 { ac_try='test -s conftest$ac_exeext'
9714 { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9717 echo "$as_me:9717: \$? = $ac_status" >&5
9718 (exit $ac_status); }; }; then
9721 echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 echo "$as_me:9723: checking for dnet_ntoa in -ldnet" >&5
9724 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9725 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9726 echo $ECHO_N "(cached) $ECHO_C" >&6
9728 ac_check_lib_save_LIBS=$LIBS
9730 cat >conftest.$ac_ext <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9734 /* Override any gcc2 internal prototype to avoid an error. */
9738 /* We use char because int might match the return type of a gcc2
9739 builtin and then its argument prototype would still apply. */
9749 rm -f conftest.$ac_objext conftest$ac_exeext
9750 if { (eval echo "$as_me:9750: \"$ac_link\"") >&5
9751 (eval $ac_link) 2>&5
9753 echo "$as_me:9753: \$? = $ac_status" >&5
9754 (exit $ac_status); } &&
9755 { ac_try='test -s conftest$ac_exeext'
9756 { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9759 echo "$as_me:9759: \$? = $ac_status" >&5
9760 (exit $ac_status); }; }; then
9761 ac_cv_lib_dnet_dnet_ntoa=yes
9763 echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
9765 ac_cv_lib_dnet_dnet_ntoa=no
9767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9768 LIBS=$ac_check_lib_save_LIBS
9770 echo "$as_me:9770: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9771 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9772 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9773 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9776 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9777 echo "$as_me:9777: checking for dnet_ntoa in -ldnet_stub" >&5
9778 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9779 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9780 echo $ECHO_N "(cached) $ECHO_C" >&6
9782 ac_check_lib_save_LIBS=$LIBS
9783 LIBS="-ldnet_stub $LIBS"
9784 cat >conftest.$ac_ext <<_ACEOF
9785 #line 9785 "configure"
9786 #include "confdefs.h"
9788 /* Override any gcc2 internal prototype to avoid an error. */
9792 /* We use char because int might match the return type of a gcc2
9793 builtin and then its argument prototype would still apply. */
9803 rm -f conftest.$ac_objext conftest$ac_exeext
9804 if { (eval echo "$as_me:9804: \"$ac_link\"") >&5
9805 (eval $ac_link) 2>&5
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit $ac_status); } &&
9809 { ac_try='test -s conftest$ac_exeext'
9810 { (eval echo "$as_me:9810: \"$ac_try\"") >&5
9813 echo "$as_me:9813: \$? = $ac_status" >&5
9814 (exit $ac_status); }; }; then
9815 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9817 echo "$as_me: failed program was:" >&5
9818 cat conftest.$ac_ext >&5
9819 ac_cv_lib_dnet_stub_dnet_ntoa=no
9821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9822 LIBS=$ac_check_lib_save_LIBS
9824 echo "$as_me:9824: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9825 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9826 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9827 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9833 LIBS="$ac_xsave_LIBS"
9835 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9836 # to get the SysV transport functions.
9837 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9839 # The nsl library prevents programs from opening the X display
9840 # on Irix 5.2, according to T.E. Dickey.
9841 # The functions gethostbyname, getservbyname, and inet_addr are
9842 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9843 echo "$as_me:9843: checking for gethostbyname" >&5
9844 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9845 if test "${ac_cv_func_gethostbyname+set}" = set; then
9846 echo $ECHO_N "(cached) $ECHO_C" >&6
9848 cat >conftest.$ac_ext <<_ACEOF
9849 #line 9849 "configure"
9850 #include "confdefs.h"
9851 /* System header to define __stub macros and hopefully few prototypes,
9852 which can conflict with char gethostbyname (); below. */
9854 /* Override any gcc2 internal prototype to avoid an error. */
9858 /* We use char because int might match the return type of a gcc2
9859 builtin and then its argument prototype would still apply. */
9860 char gethostbyname ();
9866 /* The GNU C library defines this for functions which it implements
9867 to always fail with ENOSYS. Some functions are actually named
9868 something starting with __ and the normal name is an alias. */
9869 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9872 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9879 rm -f conftest.$ac_objext conftest$ac_exeext
9880 if { (eval echo "$as_me:9880: \"$ac_link\"") >&5
9881 (eval $ac_link) 2>&5
9883 echo "$as_me:9883: \$? = $ac_status" >&5
9884 (exit $ac_status); } &&
9885 { ac_try='test -s conftest$ac_exeext'
9886 { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
9891 ac_cv_func_gethostbyname=yes
9893 echo "$as_me: failed program was:" >&5
9894 cat conftest.$ac_ext >&5
9895 ac_cv_func_gethostbyname=no
9897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9899 echo "$as_me:9899: result: $ac_cv_func_gethostbyname" >&5
9900 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9902 if test $ac_cv_func_gethostbyname = no; then
9903 echo "$as_me:9903: checking for gethostbyname in -lnsl" >&5
9904 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9905 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
9908 ac_check_lib_save_LIBS=$LIBS
9910 cat >conftest.$ac_ext <<_ACEOF
9911 #line 9911 "configure"
9912 #include "confdefs.h"
9914 /* Override any gcc2 internal prototype to avoid an error. */
9918 /* We use char because int might match the return type of a gcc2
9919 builtin and then its argument prototype would still apply. */
9920 char gethostbyname ();
9929 rm -f conftest.$ac_objext conftest$ac_exeext
9930 if { (eval echo "$as_me:9930: \"$ac_link\"") >&5
9931 (eval $ac_link) 2>&5
9933 echo "$as_me:9933: \$? = $ac_status" >&5
9934 (exit $ac_status); } &&
9935 { ac_try='test -s conftest$ac_exeext'
9936 { (eval echo "$as_me:9936: \"$ac_try\"") >&5
9939 echo "$as_me:9939: \$? = $ac_status" >&5
9940 (exit $ac_status); }; }; then
9941 ac_cv_lib_nsl_gethostbyname=yes
9943 echo "$as_me: failed program was:" >&5
9944 cat conftest.$ac_ext >&5
9945 ac_cv_lib_nsl_gethostbyname=no
9947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9948 LIBS=$ac_check_lib_save_LIBS
9950 echo "$as_me:9950: result: $ac_cv_lib_nsl_gethostbyname" >&5
9951 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9952 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9953 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9956 if test $ac_cv_lib_nsl_gethostbyname = no; then
9957 echo "$as_me:9957: checking for gethostbyname in -lbsd" >&5
9958 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9959 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9962 ac_check_lib_save_LIBS=$LIBS
9964 cat >conftest.$ac_ext <<_ACEOF
9965 #line 9965 "configure"
9966 #include "confdefs.h"
9968 /* Override any gcc2 internal prototype to avoid an error. */
9972 /* We use char because int might match the return type of a gcc2
9973 builtin and then its argument prototype would still apply. */
9974 char gethostbyname ();
9983 rm -f conftest.$ac_objext conftest$ac_exeext
9984 if { (eval echo "$as_me:9984: \"$ac_link\"") >&5
9985 (eval $ac_link) 2>&5
9987 echo "$as_me:9987: \$? = $ac_status" >&5
9988 (exit $ac_status); } &&
9989 { ac_try='test -s conftest$ac_exeext'
9990 { (eval echo "$as_me:9990: \"$ac_try\"") >&5
9993 echo "$as_me:9993: \$? = $ac_status" >&5
9994 (exit $ac_status); }; }; then
9995 ac_cv_lib_bsd_gethostbyname=yes
9997 echo "$as_me: failed program was:" >&5
9998 cat conftest.$ac_ext >&5
9999 ac_cv_lib_bsd_gethostbyname=no
10001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10002 LIBS=$ac_check_lib_save_LIBS
10004 echo "$as_me:10004: result: $ac_cv_lib_bsd_gethostbyname" >&5
10005 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10006 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10007 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10013 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10014 # socket/setsockopt and other routines are undefined under SCO ODT
10015 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10016 # on later versions), says Simon Leinen: it contains gethostby*
10017 # variants that don't use the nameserver (or something). -lsocket
10018 # must be given before -lnsl if both are needed. We assume that
10019 # if connect needs -lnsl, so does gethostbyname.
10020 echo "$as_me:10020: checking for connect" >&5
10021 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10022 if test "${ac_cv_func_connect+set}" = set; then
10023 echo $ECHO_N "(cached) $ECHO_C" >&6
10025 cat >conftest.$ac_ext <<_ACEOF
10026 #line 10026 "configure"
10027 #include "confdefs.h"
10028 /* System header to define __stub macros and hopefully few prototypes,
10029 which can conflict with char connect (); below. */
10030 #include <assert.h>
10031 /* Override any gcc2 internal prototype to avoid an error. */
10035 /* We use char because int might match the return type of a gcc2
10036 builtin and then its argument prototype would still apply. */
10043 /* The GNU C library defines this for functions which it implements
10044 to always fail with ENOSYS. Some functions are actually named
10045 something starting with __ and the normal name is an alias. */
10046 #if defined (__stub_connect) || defined (__stub___connect)
10049 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10056 rm -f conftest.$ac_objext conftest$ac_exeext
10057 if { (eval echo "$as_me:10057: \"$ac_link\"") >&5
10058 (eval $ac_link) 2>&5
10060 echo "$as_me:10060: \$? = $ac_status" >&5
10061 (exit $ac_status); } &&
10062 { ac_try='test -s conftest$ac_exeext'
10063 { (eval echo "$as_me:10063: \"$ac_try\"") >&5
10064 (eval $ac_try) 2>&5
10066 echo "$as_me:10066: \$? = $ac_status" >&5
10067 (exit $ac_status); }; }; then
10068 ac_cv_func_connect=yes
10070 echo "$as_me: failed program was:" >&5
10071 cat conftest.$ac_ext >&5
10072 ac_cv_func_connect=no
10074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10076 echo "$as_me:10076: result: $ac_cv_func_connect" >&5
10077 echo "${ECHO_T}$ac_cv_func_connect" >&6
10079 if test $ac_cv_func_connect = no; then
10080 echo "$as_me:10080: checking for connect in -lsocket" >&5
10081 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10082 if test "${ac_cv_lib_socket_connect+set}" = set; then
10083 echo $ECHO_N "(cached) $ECHO_C" >&6
10085 ac_check_lib_save_LIBS=$LIBS
10086 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10087 cat >conftest.$ac_ext <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10091 /* Override any gcc2 internal prototype to avoid an error. */
10095 /* We use char because int might match the return type of a gcc2
10096 builtin and then its argument prototype would still apply. */
10106 rm -f conftest.$ac_objext conftest$ac_exeext
10107 if { (eval echo "$as_me:10107: \"$ac_link\"") >&5
10108 (eval $ac_link) 2>&5
10110 echo "$as_me:10110: \$? = $ac_status" >&5
10111 (exit $ac_status); } &&
10112 { ac_try='test -s conftest$ac_exeext'
10113 { (eval echo "$as_me:10113: \"$ac_try\"") >&5
10114 (eval $ac_try) 2>&5
10116 echo "$as_me:10116: \$? = $ac_status" >&5
10117 (exit $ac_status); }; }; then
10118 ac_cv_lib_socket_connect=yes
10120 echo "$as_me: failed program was:" >&5
10121 cat conftest.$ac_ext >&5
10122 ac_cv_lib_socket_connect=no
10124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10125 LIBS=$ac_check_lib_save_LIBS
10127 echo "$as_me:10127: result: $ac_cv_lib_socket_connect" >&5
10128 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10129 if test $ac_cv_lib_socket_connect = yes; then
10130 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10135 # Guillermo Gomez says -lposix is necessary on A/UX.
10136 echo "$as_me:10136: checking for remove" >&5
10137 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10138 if test "${ac_cv_func_remove+set}" = set; then
10139 echo $ECHO_N "(cached) $ECHO_C" >&6
10141 cat >conftest.$ac_ext <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144 /* System header to define __stub macros and hopefully few prototypes,
10145 which can conflict with char remove (); below. */
10146 #include <assert.h>
10147 /* Override any gcc2 internal prototype to avoid an error. */
10151 /* We use char because int might match the return type of a gcc2
10152 builtin and then its argument prototype would still apply. */
10159 /* The GNU C library defines this for functions which it implements
10160 to always fail with ENOSYS. Some functions are actually named
10161 something starting with __ and the normal name is an alias. */
10162 #if defined (__stub_remove) || defined (__stub___remove)
10165 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10172 rm -f conftest.$ac_objext conftest$ac_exeext
10173 if { (eval echo "$as_me:10173: \"$ac_link\"") >&5
10174 (eval $ac_link) 2>&5
10176 echo "$as_me:10176: \$? = $ac_status" >&5
10177 (exit $ac_status); } &&
10178 { ac_try='test -s conftest$ac_exeext'
10179 { (eval echo "$as_me:10179: \"$ac_try\"") >&5
10180 (eval $ac_try) 2>&5
10182 echo "$as_me:10182: \$? = $ac_status" >&5
10183 (exit $ac_status); }; }; then
10184 ac_cv_func_remove=yes
10186 echo "$as_me: failed program was:" >&5
10187 cat conftest.$ac_ext >&5
10188 ac_cv_func_remove=no
10190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10192 echo "$as_me:10192: result: $ac_cv_func_remove" >&5
10193 echo "${ECHO_T}$ac_cv_func_remove" >&6
10195 if test $ac_cv_func_remove = no; then
10196 echo "$as_me:10196: checking for remove in -lposix" >&5
10197 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10198 if test "${ac_cv_lib_posix_remove+set}" = set; then
10199 echo $ECHO_N "(cached) $ECHO_C" >&6
10201 ac_check_lib_save_LIBS=$LIBS
10202 LIBS="-lposix $LIBS"
10203 cat >conftest.$ac_ext <<_ACEOF
10204 #line 10204 "configure"
10205 #include "confdefs.h"
10207 /* Override any gcc2 internal prototype to avoid an error. */
10211 /* We use char because int might match the return type of a gcc2
10212 builtin and then its argument prototype would still apply. */
10222 rm -f conftest.$ac_objext conftest$ac_exeext
10223 if { (eval echo "$as_me:10223: \"$ac_link\"") >&5
10224 (eval $ac_link) 2>&5
10226 echo "$as_me:10226: \$? = $ac_status" >&5
10227 (exit $ac_status); } &&
10228 { ac_try='test -s conftest$ac_exeext'
10229 { (eval echo "$as_me:10229: \"$ac_try\"") >&5
10230 (eval $ac_try) 2>&5
10232 echo "$as_me:10232: \$? = $ac_status" >&5
10233 (exit $ac_status); }; }; then
10234 ac_cv_lib_posix_remove=yes
10236 echo "$as_me: failed program was:" >&5
10237 cat conftest.$ac_ext >&5
10238 ac_cv_lib_posix_remove=no
10240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10241 LIBS=$ac_check_lib_save_LIBS
10243 echo "$as_me:10243: result: $ac_cv_lib_posix_remove" >&5
10244 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10245 if test $ac_cv_lib_posix_remove = yes; then
10246 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10251 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10252 echo "$as_me:10252: checking for shmat" >&5
10253 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10254 if test "${ac_cv_func_shmat+set}" = set; then
10255 echo $ECHO_N "(cached) $ECHO_C" >&6
10257 cat >conftest.$ac_ext <<_ACEOF
10258 #line 10258 "configure"
10259 #include "confdefs.h"
10260 /* System header to define __stub macros and hopefully few prototypes,
10261 which can conflict with char shmat (); below. */
10262 #include <assert.h>
10263 /* Override any gcc2 internal prototype to avoid an error. */
10267 /* We use char because int might match the return type of a gcc2
10268 builtin and then its argument prototype would still apply. */
10275 /* The GNU C library defines this for functions which it implements
10276 to always fail with ENOSYS. Some functions are actually named
10277 something starting with __ and the normal name is an alias. */
10278 #if defined (__stub_shmat) || defined (__stub___shmat)
10281 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10288 rm -f conftest.$ac_objext conftest$ac_exeext
10289 if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
10290 (eval $ac_link) 2>&5
10292 echo "$as_me:10292: \$? = $ac_status" >&5
10293 (exit $ac_status); } &&
10294 { ac_try='test -s conftest$ac_exeext'
10295 { (eval echo "$as_me:10295: \"$ac_try\"") >&5
10296 (eval $ac_try) 2>&5
10298 echo "$as_me:10298: \$? = $ac_status" >&5
10299 (exit $ac_status); }; }; then
10300 ac_cv_func_shmat=yes
10302 echo "$as_me: failed program was:" >&5
10303 cat conftest.$ac_ext >&5
10304 ac_cv_func_shmat=no
10306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10308 echo "$as_me:10308: result: $ac_cv_func_shmat" >&5
10309 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10311 if test $ac_cv_func_shmat = no; then
10312 echo "$as_me:10312: checking for shmat in -lipc" >&5
10313 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10314 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10315 echo $ECHO_N "(cached) $ECHO_C" >&6
10317 ac_check_lib_save_LIBS=$LIBS
10319 cat >conftest.$ac_ext <<_ACEOF
10320 #line 10320 "configure"
10321 #include "confdefs.h"
10323 /* Override any gcc2 internal prototype to avoid an error. */
10327 /* We use char because int might match the return type of a gcc2
10328 builtin and then its argument prototype would still apply. */
10338 rm -f conftest.$ac_objext conftest$ac_exeext
10339 if { (eval echo "$as_me:10339: \"$ac_link\"") >&5
10340 (eval $ac_link) 2>&5
10342 echo "$as_me:10342: \$? = $ac_status" >&5
10343 (exit $ac_status); } &&
10344 { ac_try='test -s conftest$ac_exeext'
10345 { (eval echo "$as_me:10345: \"$ac_try\"") >&5
10346 (eval $ac_try) 2>&5
10348 echo "$as_me:10348: \$? = $ac_status" >&5
10349 (exit $ac_status); }; }; then
10350 ac_cv_lib_ipc_shmat=yes
10352 echo "$as_me: failed program was:" >&5
10353 cat conftest.$ac_ext >&5
10354 ac_cv_lib_ipc_shmat=no
10356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10357 LIBS=$ac_check_lib_save_LIBS
10359 echo "$as_me:10359: result: $ac_cv_lib_ipc_shmat" >&5
10360 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10361 if test $ac_cv_lib_ipc_shmat = yes; then
10362 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10368 # Check for libraries that X11R6 Xt/Xaw programs need.
10369 ac_save_LDFLAGS=$LDFLAGS
10370 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10371 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10372 # check for ICE first), but we must link in the order -lSM -lICE or
10373 # we get undefined symbols. So assume we have SM if we have ICE.
10374 # These have to be linked with before -lX11, unlike the other
10375 # libraries we check for below, so use a different variable.
10376 # John Interrante, Karl Berry
10377 echo "$as_me:10377: checking for IceConnectionNumber in -lICE" >&5
10378 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10379 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10380 echo $ECHO_N "(cached) $ECHO_C" >&6
10382 ac_check_lib_save_LIBS=$LIBS
10383 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10384 cat >conftest.$ac_ext <<_ACEOF
10385 #line 10385 "configure"
10386 #include "confdefs.h"
10388 /* Override any gcc2 internal prototype to avoid an error. */
10392 /* We use char because int might match the return type of a gcc2
10393 builtin and then its argument prototype would still apply. */
10394 char IceConnectionNumber ();
10398 IceConnectionNumber ();
10403 rm -f conftest.$ac_objext conftest$ac_exeext
10404 if { (eval echo "$as_me:10404: \"$ac_link\"") >&5
10405 (eval $ac_link) 2>&5
10407 echo "$as_me:10407: \$? = $ac_status" >&5
10408 (exit $ac_status); } &&
10409 { ac_try='test -s conftest$ac_exeext'
10410 { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411 (eval $ac_try) 2>&5
10413 echo "$as_me:10413: \$? = $ac_status" >&5
10414 (exit $ac_status); }; }; then
10415 ac_cv_lib_ICE_IceConnectionNumber=yes
10417 echo "$as_me: failed program was:" >&5
10418 cat conftest.$ac_ext >&5
10419 ac_cv_lib_ICE_IceConnectionNumber=no
10421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10422 LIBS=$ac_check_lib_save_LIBS
10424 echo "$as_me:10424: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10425 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10426 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10427 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10430 LDFLAGS=$ac_save_LDFLAGS
10434 cf_x_athena=${cf_x_athena:-Xaw}
10436 echo "$as_me:10436: checking if you want to link with Xaw 3d library" >&5
10437 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10440 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10441 if test "${with_Xaw3d+set}" = set; then
10442 withval="$with_Xaw3d"
10445 if test "$withval" = yes ; then
10447 echo "$as_me:10447: result: yes" >&5
10448 echo "${ECHO_T}yes" >&6
10450 echo "$as_me:10450: result: no" >&5
10451 echo "${ECHO_T}no" >&6
10454 echo "$as_me:10454: checking if you want to link with Xaw 3d xft library" >&5
10455 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10458 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10459 if test "${with_Xaw3dxft+set}" = set; then
10460 withval="$with_Xaw3dxft"
10463 if test "$withval" = yes ; then
10464 cf_x_athena=Xaw3dxft
10465 echo "$as_me:10465: result: yes" >&5
10466 echo "${ECHO_T}yes" >&6
10468 echo "$as_me:10468: result: no" >&5
10469 echo "${ECHO_T}no" >&6
10472 echo "$as_me:10472: checking if you want to link with neXT Athena library" >&5
10473 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10476 # Check whether --with-neXtaw or --without-neXtaw was given.
10477 if test "${with_neXtaw+set}" = set; then
10478 withval="$with_neXtaw"
10481 if test "$withval" = yes ; then
10483 echo "$as_me:10483: result: yes" >&5
10484 echo "${ECHO_T}yes" >&6
10486 echo "$as_me:10486: result: no" >&5
10487 echo "${ECHO_T}no" >&6
10490 echo "$as_me:10490: checking if you want to link with Athena-Plus library" >&5
10491 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10494 # Check whether --with-XawPlus or --without-XawPlus was given.
10495 if test "${with_XawPlus+set}" = set; then
10496 withval="$with_XawPlus"
10499 if test "$withval" = yes ; then
10500 cf_x_athena=XawPlus
10501 echo "$as_me:10501: result: yes" >&5
10502 echo "${ECHO_T}yes" >&6
10504 echo "$as_me:10504: result: no" >&5
10505 echo "${ECHO_T}no" >&6
10510 if test "$PKG_CONFIG" != none ; then
10512 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10513 for cf_athena_pkg in \
10516 ${cf_x_athena}-devel \
10517 lib${cf_x_athena} \
10518 lib${cf_x_athena}-devel
10521 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10522 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10524 echo "${as_me:-configure}:10524: testing found package $cf_athena_pkg ..." 1>&5
10526 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10527 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10528 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10530 echo "${as_me:-configure}:10530: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10532 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10534 echo "${as_me:-configure}:10534: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10539 cf_new_extra_cppflags=
10541 for cf_add_cflags in $cf_pkgconfig_incs
10543 case $cf_fix_cppflags in
10545 case $cf_add_cflags in
10546 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10547 case $cf_add_cflags in
10549 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10551 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10552 && test -z "${cf_tst_cflags}" \
10553 && cf_fix_cppflags=yes
10555 if test $cf_fix_cppflags = yes ; then
10556 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10558 elif test "${cf_tst_cflags}" = "\"'" ; then
10559 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10564 case "$CPPFLAGS" in
10568 case $cf_add_cflags in
10570 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10572 CPPFLAGS=`echo "$CPPFLAGS" | \
10573 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10574 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10578 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10583 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10588 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10590 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10592 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10593 && test -z "${cf_tst_cflags}" \
10594 && cf_fix_cppflags=no
10599 if test -n "$cf_new_cflags" ; then
10601 CFLAGS="$CFLAGS $cf_new_cflags"
10604 if test -n "$cf_new_cppflags" ; then
10606 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10609 if test -n "$cf_new_extra_cppflags" ; then
10611 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10614 cf_add_libs="$cf_pkgconfig_libs"
10615 # Filter out duplicates - this happens with badly-designed ".pc" files...
10616 for cf_add_1lib in $LIBS
10618 for cf_add_2lib in $cf_add_libs
10620 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10626 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10628 LIBS="$cf_add_libs"
10630 cf_x_athena_lib="$cf_pkgconfig_libs"
10632 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10634 cat >>confdefs.h <<EOF
10635 #define $cf_x_athena_LIBS 1
10638 for cf_trim_lib in Xmu Xt X11
10641 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10642 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10643 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10645 echo "${as_me:-configure}:10645: testing ..trimmed $LIBS ..." 1>&5
10651 echo "$as_me:10651: checking for usable $cf_x_athena/Xmu package" >&5
10652 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10653 if test "${cf_cv_xaw_compat+set}" = set; then
10654 echo $ECHO_N "(cached) $ECHO_C" >&6
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10661 #include <X11/Xmu/CharSet.h>
10667 int check = XmuCompareISOLatin1("big", "small")
10673 rm -f conftest.$ac_objext conftest$ac_exeext
10674 if { (eval echo "$as_me:10674: \"$ac_link\"") >&5
10675 (eval $ac_link) 2>&5
10677 echo "$as_me:10677: \$? = $ac_status" >&5
10678 (exit $ac_status); } &&
10679 { ac_try='test -s conftest$ac_exeext'
10680 { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681 (eval $ac_try) 2>&5
10683 echo "$as_me:10683: \$? = $ac_status" >&5
10684 (exit $ac_status); }; }; then
10685 cf_cv_xaw_compat=yes
10687 echo "$as_me: failed program was:" >&5
10688 cat conftest.$ac_ext >&5
10689 cf_cv_xaw_compat=no
10691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10693 echo "$as_me:10693: result: $cf_cv_xaw_compat" >&5
10694 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10696 if test "$cf_cv_xaw_compat" = no
10698 # workaround for broken ".pc" files...
10699 case "$cf_x_athena_lib" in
10703 test -n "$verbose" && echo " work around broken package" 1>&6
10705 echo "${as_me:-configure}:10705: testing work around broken package ..." 1>&5
10707 cf_save_xmu="$LIBS"
10708 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10710 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10711 test -n "$verbose" && echo " found package xmu" 1>&6
10713 echo "${as_me:-configure}:10713: testing found package xmu ..." 1>&5
10715 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10716 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10717 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10719 echo "${as_me:-configure}:10719: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10721 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10723 echo "${as_me:-configure}:10723: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10728 cf_new_extra_cppflags=
10730 for cf_add_cflags in $cf_pkgconfig_incs
10732 case $cf_fix_cppflags in
10734 case $cf_add_cflags in
10735 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10736 case $cf_add_cflags in
10738 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10740 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10741 && test -z "${cf_tst_cflags}" \
10742 && cf_fix_cppflags=yes
10744 if test $cf_fix_cppflags = yes ; then
10745 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10747 elif test "${cf_tst_cflags}" = "\"'" ; then
10748 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10753 case "$CPPFLAGS" in
10757 case $cf_add_cflags in
10759 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761 CPPFLAGS=`echo "$CPPFLAGS" | \
10762 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10763 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10767 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10772 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10777 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10779 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10781 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10782 && test -z "${cf_tst_cflags}" \
10783 && cf_fix_cppflags=no
10788 if test -n "$cf_new_cflags" ; then
10790 CFLAGS="$CFLAGS $cf_new_cflags"
10793 if test -n "$cf_new_cppflags" ; then
10795 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10798 if test -n "$cf_new_extra_cppflags" ; then
10800 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10803 cf_add_libs="$cf_pkgconfig_libs"
10804 # Filter out duplicates - this happens with badly-designed ".pc" files...
10805 for cf_add_1lib in $LIBS
10807 for cf_add_2lib in $cf_add_libs
10809 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10815 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10817 LIBS="$cf_add_libs"
10819 LIBS="$cf_save_xmu"
10821 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10823 echo "${as_me:-configure}:10823: testing ...before $LIBS ..." 1>&5
10825 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10826 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10828 echo "${as_me:-configure}:10828: testing ...after $LIBS ..." 1>&5
10834 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10836 echo "${as_me:-configure}:10836: testing ...before $LIBS ..." 1>&5
10838 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10839 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10841 echo "${as_me:-configure}:10841: testing ...after $LIBS ..." 1>&5
10845 for cf_trim_lib in Xmu Xt X11
10848 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10849 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10850 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10852 echo "${as_me:-configure}:10852: testing ..trimmed $LIBS ..." 1>&5
10872 if test -z "$cf_x_athena_lib" ; then
10874 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10875 test -n "$verbose" && echo " found package Xext" 1>&6
10877 echo "${as_me:-configure}:10877: testing found package Xext ..." 1>&5
10879 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10880 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10881 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10883 echo "${as_me:-configure}:10883: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10885 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10887 echo "${as_me:-configure}:10887: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10892 cf_new_extra_cppflags=
10894 for cf_add_cflags in $cf_pkgconfig_incs
10896 case $cf_fix_cppflags in
10898 case $cf_add_cflags in
10899 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10900 case $cf_add_cflags in
10902 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10905 && test -z "${cf_tst_cflags}" \
10906 && cf_fix_cppflags=yes
10908 if test $cf_fix_cppflags = yes ; then
10909 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10911 elif test "${cf_tst_cflags}" = "\"'" ; then
10912 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10917 case "$CPPFLAGS" in
10921 case $cf_add_cflags in
10923 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10925 CPPFLAGS=`echo "$CPPFLAGS" | \
10926 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10927 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10931 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10936 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10941 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10946 && test -z "${cf_tst_cflags}" \
10947 && cf_fix_cppflags=no
10952 if test -n "$cf_new_cflags" ; then
10954 CFLAGS="$CFLAGS $cf_new_cflags"
10957 if test -n "$cf_new_cppflags" ; then
10959 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10962 if test -n "$cf_new_extra_cppflags" ; then
10964 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10967 cf_add_libs="$cf_pkgconfig_libs"
10968 # Filter out duplicates - this happens with badly-designed ".pc" files...
10969 for cf_add_1lib in $LIBS
10971 for cf_add_2lib in $cf_add_libs
10973 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10981 LIBS="$cf_add_libs"
10988 echo "$as_me:10988: checking for XextCreateExtension in -lXext" >&5
10989 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10990 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10991 echo $ECHO_N "(cached) $ECHO_C" >&6
10993 ac_check_lib_save_LIBS=$LIBS
10994 LIBS="-lXext $LIBS"
10995 cat >conftest.$ac_ext <<_ACEOF
10996 #line 10996 "configure"
10997 #include "confdefs.h"
10999 /* Override any gcc2 internal prototype to avoid an error. */
11003 /* We use char because int might match the return type of a gcc2
11004 builtin and then its argument prototype would still apply. */
11005 char XextCreateExtension ();
11009 XextCreateExtension ();
11014 rm -f conftest.$ac_objext conftest$ac_exeext
11015 if { (eval echo "$as_me:11015: \"$ac_link\"") >&5
11016 (eval $ac_link) 2>&5
11018 echo "$as_me:11018: \$? = $ac_status" >&5
11019 (exit $ac_status); } &&
11020 { ac_try='test -s conftest$ac_exeext'
11021 { (eval echo "$as_me:11021: \"$ac_try\"") >&5
11022 (eval $ac_try) 2>&5
11024 echo "$as_me:11024: \$? = $ac_status" >&5
11025 (exit $ac_status); }; }; then
11026 ac_cv_lib_Xext_XextCreateExtension=yes
11028 echo "$as_me: failed program was:" >&5
11029 cat conftest.$ac_ext >&5
11030 ac_cv_lib_Xext_XextCreateExtension=no
11032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11033 LIBS=$ac_check_lib_save_LIBS
11035 echo "$as_me:11035: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11036 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11037 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11039 cf_add_libs="-lXext"
11040 # Filter out duplicates - this happens with badly-designed ".pc" files...
11041 for cf_add_1lib in $LIBS
11043 for cf_add_2lib in $cf_add_libs
11045 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11053 LIBS="$cf_add_libs"
11059 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11060 # in some cases has installed dummy files in the former, other cases replaced
11061 # it with a link to the new location). This complicates the configure script.
11062 # Check for that pitfall, and recover using pkg-config
11064 # If none of these are set, the configuration is almost certainly broken.
11065 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11068 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11069 test -n "$verbose" && echo " found package x11" 1>&6
11071 echo "${as_me:-configure}:11071: testing found package x11 ..." 1>&5
11073 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11074 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11075 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11077 echo "${as_me:-configure}:11077: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11079 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11081 echo "${as_me:-configure}:11081: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11086 cf_new_extra_cppflags=
11088 for cf_add_cflags in $cf_pkgconfig_incs
11090 case $cf_fix_cppflags in
11092 case $cf_add_cflags in
11093 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11094 case $cf_add_cflags in
11096 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11098 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11099 && test -z "${cf_tst_cflags}" \
11100 && cf_fix_cppflags=yes
11102 if test $cf_fix_cppflags = yes ; then
11103 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11105 elif test "${cf_tst_cflags}" = "\"'" ; then
11106 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11111 case "$CPPFLAGS" in
11115 case $cf_add_cflags in
11117 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11119 CPPFLAGS=`echo "$CPPFLAGS" | \
11120 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11121 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11125 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11130 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11135 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11137 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11139 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11140 && test -z "${cf_tst_cflags}" \
11141 && cf_fix_cppflags=no
11146 if test -n "$cf_new_cflags" ; then
11148 CFLAGS="$CFLAGS $cf_new_cflags"
11151 if test -n "$cf_new_cppflags" ; then
11153 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11156 if test -n "$cf_new_extra_cppflags" ; then
11158 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11161 cf_add_libs="$cf_pkgconfig_libs"
11162 # Filter out duplicates - this happens with badly-designed ".pc" files...
11163 for cf_add_1lib in $LIBS
11165 for cf_add_2lib in $cf_add_libs
11167 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11173 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11175 LIBS="$cf_add_libs"
11181 { echo "$as_me:11181: WARNING: unable to find X11 library" >&5
11182 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11185 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11186 test -n "$verbose" && echo " found package ice" 1>&6
11188 echo "${as_me:-configure}:11188: testing found package ice ..." 1>&5
11190 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11191 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11192 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11194 echo "${as_me:-configure}:11194: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11196 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11198 echo "${as_me:-configure}:11198: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11203 cf_new_extra_cppflags=
11205 for cf_add_cflags in $cf_pkgconfig_incs
11207 case $cf_fix_cppflags in
11209 case $cf_add_cflags in
11210 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11211 case $cf_add_cflags in
11213 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11215 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11216 && test -z "${cf_tst_cflags}" \
11217 && cf_fix_cppflags=yes
11219 if test $cf_fix_cppflags = yes ; then
11220 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11222 elif test "${cf_tst_cflags}" = "\"'" ; then
11223 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11228 case "$CPPFLAGS" in
11232 case $cf_add_cflags in
11234 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11236 CPPFLAGS=`echo "$CPPFLAGS" | \
11237 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11238 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11242 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11247 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11252 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11257 && test -z "${cf_tst_cflags}" \
11258 && cf_fix_cppflags=no
11263 if test -n "$cf_new_cflags" ; then
11265 CFLAGS="$CFLAGS $cf_new_cflags"
11268 if test -n "$cf_new_cppflags" ; then
11270 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11273 if test -n "$cf_new_extra_cppflags" ; then
11275 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11278 cf_add_libs="$cf_pkgconfig_libs"
11279 # Filter out duplicates - this happens with badly-designed ".pc" files...
11280 for cf_add_1lib in $LIBS
11282 for cf_add_2lib in $cf_add_libs
11284 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11290 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11292 LIBS="$cf_add_libs"
11298 { echo "$as_me:11298: WARNING: unable to find ICE library" >&5
11299 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11302 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11303 test -n "$verbose" && echo " found package sm" 1>&6
11305 echo "${as_me:-configure}:11305: testing found package sm ..." 1>&5
11307 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11308 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11309 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11311 echo "${as_me:-configure}:11311: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11313 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11315 echo "${as_me:-configure}:11315: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11320 cf_new_extra_cppflags=
11322 for cf_add_cflags in $cf_pkgconfig_incs
11324 case $cf_fix_cppflags in
11326 case $cf_add_cflags in
11327 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11328 case $cf_add_cflags in
11330 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11332 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11333 && test -z "${cf_tst_cflags}" \
11334 && cf_fix_cppflags=yes
11336 if test $cf_fix_cppflags = yes ; then
11337 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11339 elif test "${cf_tst_cflags}" = "\"'" ; then
11340 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11345 case "$CPPFLAGS" in
11349 case $cf_add_cflags in
11351 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11353 CPPFLAGS=`echo "$CPPFLAGS" | \
11354 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11355 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11359 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11364 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11369 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11371 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11373 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11374 && test -z "${cf_tst_cflags}" \
11375 && cf_fix_cppflags=no
11380 if test -n "$cf_new_cflags" ; then
11382 CFLAGS="$CFLAGS $cf_new_cflags"
11385 if test -n "$cf_new_cppflags" ; then
11387 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11390 if test -n "$cf_new_extra_cppflags" ; then
11392 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11395 cf_add_libs="$cf_pkgconfig_libs"
11396 # Filter out duplicates - this happens with badly-designed ".pc" files...
11397 for cf_add_1lib in $LIBS
11399 for cf_add_2lib in $cf_add_libs
11401 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11407 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11409 LIBS="$cf_add_libs"
11415 { echo "$as_me:11415: WARNING: unable to find SM library" >&5
11416 echo "$as_me: WARNING: unable to find SM library" >&2;}
11419 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11420 test -n "$verbose" && echo " found package xt" 1>&6
11422 echo "${as_me:-configure}:11422: testing found package xt ..." 1>&5
11424 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11425 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11426 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11428 echo "${as_me:-configure}:11428: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11430 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11432 echo "${as_me:-configure}:11432: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11437 cf_new_extra_cppflags=
11439 for cf_add_cflags in $cf_pkgconfig_incs
11441 case $cf_fix_cppflags in
11443 case $cf_add_cflags in
11444 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11445 case $cf_add_cflags in
11447 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11449 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11450 && test -z "${cf_tst_cflags}" \
11451 && cf_fix_cppflags=yes
11453 if test $cf_fix_cppflags = yes ; then
11454 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11456 elif test "${cf_tst_cflags}" = "\"'" ; then
11457 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11462 case "$CPPFLAGS" in
11466 case $cf_add_cflags in
11468 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11470 CPPFLAGS=`echo "$CPPFLAGS" | \
11471 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11472 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11476 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11481 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11486 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11488 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11491 && test -z "${cf_tst_cflags}" \
11492 && cf_fix_cppflags=no
11497 if test -n "$cf_new_cflags" ; then
11499 CFLAGS="$CFLAGS $cf_new_cflags"
11502 if test -n "$cf_new_cppflags" ; then
11504 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11507 if test -n "$cf_new_extra_cppflags" ; then
11509 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11512 cf_add_libs="$cf_pkgconfig_libs"
11513 # Filter out duplicates - this happens with badly-designed ".pc" files...
11514 for cf_add_1lib in $LIBS
11516 for cf_add_2lib in $cf_add_libs
11518 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11524 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11526 LIBS="$cf_add_libs"
11532 { echo "$as_me:11532: WARNING: unable to find Xt library" >&5
11533 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11540 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11541 test -n "$verbose" && echo " found package xt" 1>&6
11543 echo "${as_me:-configure}:11543: testing found package xt ..." 1>&5
11545 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11546 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11547 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11549 echo "${as_me:-configure}:11549: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11551 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11553 echo "${as_me:-configure}:11553: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11558 cf_new_extra_cppflags=
11560 for cf_add_cflags in $cf_pkgconfig_incs
11562 case $cf_fix_cppflags in
11564 case $cf_add_cflags in
11565 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11566 case $cf_add_cflags in
11568 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11570 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11571 && test -z "${cf_tst_cflags}" \
11572 && cf_fix_cppflags=yes
11574 if test $cf_fix_cppflags = yes ; then
11575 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11577 elif test "${cf_tst_cflags}" = "\"'" ; then
11578 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11583 case "$CPPFLAGS" in
11587 case $cf_add_cflags in
11589 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11591 CPPFLAGS=`echo "$CPPFLAGS" | \
11592 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11593 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11597 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11602 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11607 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11609 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11611 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11612 && test -z "${cf_tst_cflags}" \
11613 && cf_fix_cppflags=no
11618 if test -n "$cf_new_cflags" ; then
11620 CFLAGS="$CFLAGS $cf_new_cflags"
11623 if test -n "$cf_new_cppflags" ; then
11625 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11628 if test -n "$cf_new_extra_cppflags" ; then
11630 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11633 cf_add_libs="$cf_pkgconfig_libs"
11634 # Filter out duplicates - this happens with badly-designed ".pc" files...
11635 for cf_add_1lib in $LIBS
11637 for cf_add_2lib in $cf_add_libs
11639 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11645 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11647 LIBS="$cf_add_libs"
11653 # we have an "xt" package, but it may omit Xt's dependency on X11
11654 echo "$as_me:11654: checking for usable X dependency" >&5
11655 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11656 if test "${cf_cv_xt_x11_compat+set}" = set; then
11657 echo $ECHO_N "(cached) $ECHO_C" >&6
11660 cat >conftest.$ac_ext <<_ACEOF
11661 #line 11661 "configure"
11662 #include "confdefs.h"
11664 #include <X11/Xlib.h>
11670 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11671 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11672 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11673 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11679 rm -f conftest.$ac_objext conftest$ac_exeext
11680 if { (eval echo "$as_me:11680: \"$ac_link\"") >&5
11681 (eval $ac_link) 2>&5
11683 echo "$as_me:11683: \$? = $ac_status" >&5
11684 (exit $ac_status); } &&
11685 { ac_try='test -s conftest$ac_exeext'
11686 { (eval echo "$as_me:11686: \"$ac_try\"") >&5
11687 (eval $ac_try) 2>&5
11689 echo "$as_me:11689: \$? = $ac_status" >&5
11690 (exit $ac_status); }; }; then
11691 cf_cv_xt_x11_compat=yes
11693 echo "$as_me: failed program was:" >&5
11694 cat conftest.$ac_ext >&5
11695 cf_cv_xt_x11_compat=no
11697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11699 echo "$as_me:11699: result: $cf_cv_xt_x11_compat" >&5
11700 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11701 if test "$cf_cv_xt_x11_compat" = no
11703 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11705 echo "${as_me:-configure}:11705: testing work around broken X11 dependency ..." 1>&5
11707 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11709 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11710 test -n "$verbose" && echo " found package x11" 1>&6
11712 echo "${as_me:-configure}:11712: testing found package x11 ..." 1>&5
11714 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11715 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11716 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11718 echo "${as_me:-configure}:11718: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11720 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11722 echo "${as_me:-configure}:11722: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11727 cf_new_extra_cppflags=
11729 for cf_add_cflags in $cf_pkgconfig_incs
11731 case $cf_fix_cppflags in
11733 case $cf_add_cflags in
11734 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11735 case $cf_add_cflags in
11737 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11739 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11740 && test -z "${cf_tst_cflags}" \
11741 && cf_fix_cppflags=yes
11743 if test $cf_fix_cppflags = yes ; then
11744 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11746 elif test "${cf_tst_cflags}" = "\"'" ; then
11747 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11752 case "$CPPFLAGS" in
11756 case $cf_add_cflags in
11758 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11760 CPPFLAGS=`echo "$CPPFLAGS" | \
11761 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11762 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11766 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11771 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11776 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11778 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11780 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11781 && test -z "${cf_tst_cflags}" \
11782 && cf_fix_cppflags=no
11787 if test -n "$cf_new_cflags" ; then
11789 CFLAGS="$CFLAGS $cf_new_cflags"
11792 if test -n "$cf_new_cppflags" ; then
11794 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11797 if test -n "$cf_new_extra_cppflags" ; then
11799 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11802 cf_add_libs="$cf_pkgconfig_libs"
11803 # Filter out duplicates - this happens with badly-designed ".pc" files...
11804 for cf_add_1lib in $LIBS
11806 for cf_add_2lib in $cf_add_libs
11808 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11814 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11816 LIBS="$cf_add_libs"
11823 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11825 echo "${as_me:-configure}:11825: testing ...before $LIBS ..." 1>&5
11827 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11828 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11830 echo "${as_me:-configure}:11830: testing ...after $LIBS ..." 1>&5
11838 echo "$as_me:11838: checking for usable X Toolkit package" >&5
11839 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11840 if test "${cf_cv_xt_ice_compat+set}" = set; then
11841 echo $ECHO_N "(cached) $ECHO_C" >&6
11844 cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11848 #include <X11/Shell.h>
11853 int num = IceConnectionNumber(0)
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861 (eval $ac_link) 2>&5
11863 echo "$as_me:11863: \$? = $ac_status" >&5
11864 (exit $ac_status); } &&
11865 { ac_try='test -s conftest$ac_exeext'
11866 { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867 (eval $ac_try) 2>&5
11869 echo "$as_me:11869: \$? = $ac_status" >&5
11870 (exit $ac_status); }; }; then
11871 cf_cv_xt_ice_compat=yes
11873 echo "$as_me: failed program was:" >&5
11874 cat conftest.$ac_ext >&5
11875 cf_cv_xt_ice_compat=no
11877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11879 echo "$as_me:11879: result: $cf_cv_xt_ice_compat" >&5
11880 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11882 if test "$cf_cv_xt_ice_compat" = no
11884 # workaround for broken ".pc" files used for X Toolkit.
11885 case "x$X_PRE_LIBS" in
11891 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11893 echo "${as_me:-configure}:11893: testing work around broken ICE dependency ..." 1>&5
11895 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11896 test -n "$verbose" && echo " found package ice" 1>&6
11898 echo "${as_me:-configure}:11898: testing found package ice ..." 1>&5
11900 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11901 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11902 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11904 echo "${as_me:-configure}:11904: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11906 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11908 echo "${as_me:-configure}:11908: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11913 cf_new_extra_cppflags=
11915 for cf_add_cflags in $cf_pkgconfig_incs
11917 case $cf_fix_cppflags in
11919 case $cf_add_cflags in
11920 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11921 case $cf_add_cflags in
11923 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11926 && test -z "${cf_tst_cflags}" \
11927 && cf_fix_cppflags=yes
11929 if test $cf_fix_cppflags = yes ; then
11930 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11932 elif test "${cf_tst_cflags}" = "\"'" ; then
11933 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11938 case "$CPPFLAGS" in
11942 case $cf_add_cflags in
11944 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11946 CPPFLAGS=`echo "$CPPFLAGS" | \
11947 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11948 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11952 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11957 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11962 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11964 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11967 && test -z "${cf_tst_cflags}" \
11968 && cf_fix_cppflags=no
11973 if test -n "$cf_new_cflags" ; then
11975 CFLAGS="$CFLAGS $cf_new_cflags"
11978 if test -n "$cf_new_cppflags" ; then
11980 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11983 if test -n "$cf_new_extra_cppflags" ; then
11985 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11988 cf_add_libs="$cf_pkgconfig_libs"
11989 # Filter out duplicates - this happens with badly-designed ".pc" files...
11990 for cf_add_1lib in $LIBS
11992 for cf_add_2lib in $cf_add_libs
11994 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12000 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12002 LIBS="$cf_add_libs"
12004 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12005 test -n "$verbose" && echo " found package sm" 1>&6
12007 echo "${as_me:-configure}:12007: testing found package sm ..." 1>&5
12009 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12010 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12011 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12013 echo "${as_me:-configure}:12013: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12015 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12017 echo "${as_me:-configure}:12017: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12022 cf_new_extra_cppflags=
12024 for cf_add_cflags in $cf_pkgconfig_incs
12026 case $cf_fix_cppflags in
12028 case $cf_add_cflags in
12029 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12030 case $cf_add_cflags in
12032 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12034 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12035 && test -z "${cf_tst_cflags}" \
12036 && cf_fix_cppflags=yes
12038 if test $cf_fix_cppflags = yes ; then
12039 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12041 elif test "${cf_tst_cflags}" = "\"'" ; then
12042 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12047 case "$CPPFLAGS" in
12051 case $cf_add_cflags in
12053 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12055 CPPFLAGS=`echo "$CPPFLAGS" | \
12056 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12057 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12061 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12066 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12071 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12073 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12075 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12076 && test -z "${cf_tst_cflags}" \
12077 && cf_fix_cppflags=no
12082 if test -n "$cf_new_cflags" ; then
12084 CFLAGS="$CFLAGS $cf_new_cflags"
12087 if test -n "$cf_new_cppflags" ; then
12089 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12092 if test -n "$cf_new_extra_cppflags" ; then
12094 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12097 cf_add_libs="$cf_pkgconfig_libs"
12098 # Filter out duplicates - this happens with badly-designed ".pc" files...
12099 for cf_add_1lib in $LIBS
12101 for cf_add_2lib in $cf_add_libs
12103 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12109 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12111 LIBS="$cf_add_libs"
12124 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12126 echo "${as_me:-configure}:12126: testing ...before $LIBS ..." 1>&5
12128 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12129 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12131 echo "${as_me:-configure}:12131: testing ...after $LIBS ..." 1>&5
12147 LDFLAGS="$X_LIBS $LDFLAGS"
12149 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12151 echo "${as_me:-configure}:12151: testing checking additions to CFLAGS ..." 1>&5
12153 cf_check_cflags="$CFLAGS"
12154 cf_check_cppflags="$CPPFLAGS"
12159 cf_new_extra_cppflags=
12161 for cf_add_cflags in $X_CFLAGS
12163 case $cf_fix_cppflags in
12165 case $cf_add_cflags in
12166 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12167 case $cf_add_cflags in
12169 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12172 && test -z "${cf_tst_cflags}" \
12173 && cf_fix_cppflags=yes
12175 if test $cf_fix_cppflags = yes ; then
12176 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12178 elif test "${cf_tst_cflags}" = "\"'" ; then
12179 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12184 case "$CPPFLAGS" in
12188 case $cf_add_cflags in
12190 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12192 CPPFLAGS=`echo "$CPPFLAGS" | \
12193 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12194 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12198 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12203 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12208 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12210 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12212 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12213 && test -z "${cf_tst_cflags}" \
12214 && cf_fix_cppflags=no
12219 if test -n "$cf_new_cflags" ; then
12220 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12222 echo "${as_me:-configure}:12222: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12224 CFLAGS="$CFLAGS $cf_new_cflags"
12227 if test -n "$cf_new_cppflags" ; then
12228 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12230 echo "${as_me:-configure}:12230: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12232 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12235 if test -n "$cf_new_extra_cppflags" ; then
12236 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12238 echo "${as_me:-configure}:12238: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12240 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12243 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12244 cat >conftest.$ac_ext <<_ACEOF
12245 #line 12245 "configure"
12246 #include "confdefs.h"
12251 printf("Hello world");
12256 rm -f conftest.$ac_objext conftest$ac_exeext
12257 if { (eval echo "$as_me:12257: \"$ac_link\"") >&5
12258 (eval $ac_link) 2>&5
12260 echo "$as_me:12260: \$? = $ac_status" >&5
12261 (exit $ac_status); } &&
12262 { ac_try='test -s conftest$ac_exeext'
12263 { (eval echo "$as_me:12263: \"$ac_try\"") >&5
12264 (eval $ac_try) 2>&5
12266 echo "$as_me:12266: \$? = $ac_status" >&5
12267 (exit $ac_status); }; }; then
12270 echo "$as_me: failed program was:" >&5
12271 cat conftest.$ac_ext >&5
12272 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12274 echo "${as_me:-configure}:12274: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12276 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12277 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12279 echo "${as_me:-configure}:12279: testing but keeping change to \$CPPFLAGS ..." 1>&5
12282 CFLAGS="$cf_check_flags"
12284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12287 echo "$as_me:12287: checking for XOpenDisplay" >&5
12288 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12289 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12290 echo $ECHO_N "(cached) $ECHO_C" >&6
12292 cat >conftest.$ac_ext <<_ACEOF
12293 #line 12293 "configure"
12294 #include "confdefs.h"
12295 /* System header to define __stub macros and hopefully few prototypes,
12296 which can conflict with char XOpenDisplay (); below. */
12297 #include <assert.h>
12298 /* Override any gcc2 internal prototype to avoid an error. */
12302 /* We use char because int might match the return type of a gcc2
12303 builtin and then its argument prototype would still apply. */
12304 char XOpenDisplay ();
12310 /* The GNU C library defines this for functions which it implements
12311 to always fail with ENOSYS. Some functions are actually named
12312 something starting with __ and the normal name is an alias. */
12313 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12316 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12323 rm -f conftest.$ac_objext conftest$ac_exeext
12324 if { (eval echo "$as_me:12324: \"$ac_link\"") >&5
12325 (eval $ac_link) 2>&5
12327 echo "$as_me:12327: \$? = $ac_status" >&5
12328 (exit $ac_status); } &&
12329 { ac_try='test -s conftest$ac_exeext'
12330 { (eval echo "$as_me:12330: \"$ac_try\"") >&5
12331 (eval $ac_try) 2>&5
12333 echo "$as_me:12333: \$? = $ac_status" >&5
12334 (exit $ac_status); }; }; then
12335 ac_cv_func_XOpenDisplay=yes
12337 echo "$as_me: failed program was:" >&5
12338 cat conftest.$ac_ext >&5
12339 ac_cv_func_XOpenDisplay=no
12341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12343 echo "$as_me:12343: result: $ac_cv_func_XOpenDisplay" >&5
12344 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12345 if test $ac_cv_func_XOpenDisplay = yes; then
12349 echo "$as_me:12349: checking for XOpenDisplay in -lX11" >&5
12350 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12351 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12352 echo $ECHO_N "(cached) $ECHO_C" >&6
12354 ac_check_lib_save_LIBS=$LIBS
12355 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12356 cat >conftest.$ac_ext <<_ACEOF
12357 #line 12357 "configure"
12358 #include "confdefs.h"
12360 /* Override any gcc2 internal prototype to avoid an error. */
12364 /* We use char because int might match the return type of a gcc2
12365 builtin and then its argument prototype would still apply. */
12366 char XOpenDisplay ();
12375 rm -f conftest.$ac_objext conftest$ac_exeext
12376 if { (eval echo "$as_me:12376: \"$ac_link\"") >&5
12377 (eval $ac_link) 2>&5
12379 echo "$as_me:12379: \$? = $ac_status" >&5
12380 (exit $ac_status); } &&
12381 { ac_try='test -s conftest$ac_exeext'
12382 { (eval echo "$as_me:12382: \"$ac_try\"") >&5
12383 (eval $ac_try) 2>&5
12385 echo "$as_me:12385: \$? = $ac_status" >&5
12386 (exit $ac_status); }; }; then
12387 ac_cv_lib_X11_XOpenDisplay=yes
12389 echo "$as_me: failed program was:" >&5
12390 cat conftest.$ac_ext >&5
12391 ac_cv_lib_X11_XOpenDisplay=no
12393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12394 LIBS=$ac_check_lib_save_LIBS
12396 echo "$as_me:12396: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12397 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12398 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12400 cf_add_libs="-lX11"
12401 # Filter out duplicates - this happens with badly-designed ".pc" files...
12402 for cf_add_1lib in $LIBS
12404 for cf_add_2lib in $cf_add_libs
12406 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12412 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12414 LIBS="$cf_add_libs"
12420 echo "$as_me:12420: checking for XtAppInitialize" >&5
12421 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12422 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12423 echo $ECHO_N "(cached) $ECHO_C" >&6
12425 cat >conftest.$ac_ext <<_ACEOF
12426 #line 12426 "configure"
12427 #include "confdefs.h"
12428 /* System header to define __stub macros and hopefully few prototypes,
12429 which can conflict with char XtAppInitialize (); below. */
12430 #include <assert.h>
12431 /* Override any gcc2 internal prototype to avoid an error. */
12435 /* We use char because int might match the return type of a gcc2
12436 builtin and then its argument prototype would still apply. */
12437 char XtAppInitialize ();
12443 /* The GNU C library defines this for functions which it implements
12444 to always fail with ENOSYS. Some functions are actually named
12445 something starting with __ and the normal name is an alias. */
12446 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12449 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12456 rm -f conftest.$ac_objext conftest$ac_exeext
12457 if { (eval echo "$as_me:12457: \"$ac_link\"") >&5
12458 (eval $ac_link) 2>&5
12460 echo "$as_me:12460: \$? = $ac_status" >&5
12461 (exit $ac_status); } &&
12462 { ac_try='test -s conftest$ac_exeext'
12463 { (eval echo "$as_me:12463: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12466 echo "$as_me:12466: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
12468 ac_cv_func_XtAppInitialize=yes
12470 echo "$as_me: failed program was:" >&5
12471 cat conftest.$ac_ext >&5
12472 ac_cv_func_XtAppInitialize=no
12474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12476 echo "$as_me:12476: result: $ac_cv_func_XtAppInitialize" >&5
12477 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12478 if test $ac_cv_func_XtAppInitialize = yes; then
12482 echo "$as_me:12482: checking for XtAppInitialize in -lXt" >&5
12483 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12484 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12485 echo $ECHO_N "(cached) $ECHO_C" >&6
12487 ac_check_lib_save_LIBS=$LIBS
12488 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12489 cat >conftest.$ac_ext <<_ACEOF
12490 #line 12490 "configure"
12491 #include "confdefs.h"
12493 /* Override any gcc2 internal prototype to avoid an error. */
12497 /* We use char because int might match the return type of a gcc2
12498 builtin and then its argument prototype would still apply. */
12499 char XtAppInitialize ();
12503 XtAppInitialize ();
12508 rm -f conftest.$ac_objext conftest$ac_exeext
12509 if { (eval echo "$as_me:12509: \"$ac_link\"") >&5
12510 (eval $ac_link) 2>&5
12512 echo "$as_me:12512: \$? = $ac_status" >&5
12513 (exit $ac_status); } &&
12514 { ac_try='test -s conftest$ac_exeext'
12515 { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516 (eval $ac_try) 2>&5
12518 echo "$as_me:12518: \$? = $ac_status" >&5
12519 (exit $ac_status); }; }; then
12520 ac_cv_lib_Xt_XtAppInitialize=yes
12522 echo "$as_me: failed program was:" >&5
12523 cat conftest.$ac_ext >&5
12524 ac_cv_lib_Xt_XtAppInitialize=no
12526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12527 LIBS=$ac_check_lib_save_LIBS
12529 echo "$as_me:12529: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12530 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12531 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12533 cat >>confdefs.h <<\EOF
12534 #define HAVE_LIBXT 1
12538 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12545 if test $cf_have_X_LIBS = no ; then
12546 { echo "$as_me:12546: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12547 test program. You will have to check and add the proper libraries by hand
12549 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12550 test program. You will have to check and add the proper libraries by hand
12551 to makefile." >&2;}
12554 cf_x_athena_root=$cf_x_athena
12557 for cf_path in default \
12558 /usr/contrib/X11R6 \
12559 /usr/contrib/X11R5 \
12563 if test -z "$cf_x_athena_inc" ; then
12564 cf_save="$CPPFLAGS"
12565 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12566 if test $cf_path != default ; then
12567 CPPFLAGS="$cf_save -I$cf_path/include"
12568 echo "$as_me:12568: checking for $cf_test in $cf_path" >&5
12569 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12571 echo "$as_me:12571: checking for $cf_test" >&5
12572 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12574 cat >conftest.$ac_ext <<_ACEOF
12575 #line 12575 "configure"
12576 #include "confdefs.h"
12578 #include <X11/Intrinsic.h>
12579 #include <$cf_test>
12588 rm -f conftest.$ac_objext
12589 if { (eval echo "$as_me:12589: \"$ac_compile\"") >&5
12590 (eval $ac_compile) 2>&5
12592 echo "$as_me:12592: \$? = $ac_status" >&5
12593 (exit $ac_status); } &&
12594 { ac_try='test -s conftest.$ac_objext'
12595 { (eval echo "$as_me:12595: \"$ac_try\"") >&5
12596 (eval $ac_try) 2>&5
12598 echo "$as_me:12598: \$? = $ac_status" >&5
12599 (exit $ac_status); }; }; then
12602 echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12606 rm -f conftest.$ac_objext conftest.$ac_ext
12607 echo "$as_me:12607: result: $cf_result" >&5
12608 echo "${ECHO_T}$cf_result" >&6
12609 if test "$cf_result" = yes ; then
12610 cf_x_athena_inc=$cf_path
12613 CPPFLAGS="$cf_save"
12618 if test -z "$cf_x_athena_inc" ; then
12619 { echo "$as_me:12619: WARNING: Unable to successfully find Athena header files with test program" >&5
12620 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12621 elif test "$cf_x_athena_inc" != default ; then
12622 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12625 cf_x_athena_root=$cf_x_athena
12628 for cf_path in default \
12629 /usr/contrib/X11R6 \
12630 /usr/contrib/X11R5 \
12635 ${cf_x_athena_root} \
12636 ${cf_x_athena_root}7 \
12637 ${cf_x_athena_root}6
12640 "-l$cf_lib -lXmu" \
12641 "-l$cf_lib -lXpm -lXmu" \
12642 "-l${cf_lib}_s -lXmu_s"
12644 if test -z "$cf_x_athena_lib" ; then
12646 cf_test=XawSimpleMenuAddGlobalActions
12647 if test $cf_path != default ; then
12649 cf_add_libs="-L$cf_path/lib $cf_libs"
12650 # Filter out duplicates - this happens with badly-designed ".pc" files...
12651 for cf_add_1lib in $LIBS
12653 for cf_add_2lib in $cf_add_libs
12655 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12661 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12663 LIBS="$cf_add_libs"
12665 echo "$as_me:12665: checking for $cf_libs in $cf_path" >&5
12666 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12669 cf_add_libs="$cf_libs"
12670 # Filter out duplicates - this happens with badly-designed ".pc" files...
12671 for cf_add_1lib in $LIBS
12673 for cf_add_2lib in $cf_add_libs
12675 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12681 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12683 LIBS="$cf_add_libs"
12685 echo "$as_me:12685: checking for $cf_test in $cf_libs" >&5
12686 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12688 cat >conftest.$ac_ext <<_ACEOF
12689 #line 12689 "configure"
12690 #include "confdefs.h"
12692 #include <X11/Intrinsic.h>
12693 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12699 $cf_test((XtAppContext) 0)
12704 rm -f conftest.$ac_objext conftest$ac_exeext
12705 if { (eval echo "$as_me:12705: \"$ac_link\"") >&5
12706 (eval $ac_link) 2>&5
12708 echo "$as_me:12708: \$? = $ac_status" >&5
12709 (exit $ac_status); } &&
12710 { ac_try='test -s conftest$ac_exeext'
12711 { (eval echo "$as_me:12711: \"$ac_try\"") >&5
12712 (eval $ac_try) 2>&5
12714 echo "$as_me:12714: \$? = $ac_status" >&5
12715 (exit $ac_status); }; }; then
12718 echo "$as_me: failed program was:" >&5
12719 cat conftest.$ac_ext >&5
12722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12723 echo "$as_me:12723: result: $cf_result" >&5
12724 echo "${ECHO_T}$cf_result" >&6
12725 if test "$cf_result" = yes ; then
12726 cf_x_athena_lib="$cf_libs"
12732 test -n "$cf_x_athena_lib" && break
12736 if test -z "$cf_x_athena_lib" ; then
12737 { { echo "$as_me:12737: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12738 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12739 { (exit 1); exit 1; }; }
12742 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12744 cat >>confdefs.h <<EOF
12745 #define $cf_x_athena_LIBS 1
12750 if test -n "$ac_tool_prefix"; then
12751 for ac_prog in xcurses-config
12753 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12754 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12755 echo "$as_me:12755: checking for $ac_word" >&5
12756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12757 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12758 echo $ECHO_N "(cached) $ECHO_C" >&6
12760 if test -n "$XCURSES_CONFIG"; then
12761 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12763 ac_save_IFS=$IFS; IFS=$ac_path_separator
12765 for ac_dir in $ac_dummy; do
12767 test -z "$ac_dir" && ac_dir=.
12768 $as_executable_p "$ac_dir/$ac_word" || continue
12769 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12770 echo "$as_me:12770: found $ac_dir/$ac_word" >&5
12776 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12777 if test -n "$XCURSES_CONFIG"; then
12778 echo "$as_me:12778: result: $XCURSES_CONFIG" >&5
12779 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12781 echo "$as_me:12781: result: no" >&5
12782 echo "${ECHO_T}no" >&6
12785 test -n "$XCURSES_CONFIG" && break
12788 if test -z "$XCURSES_CONFIG"; then
12789 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12790 for ac_prog in xcurses-config
12792 # Extract the first word of "$ac_prog", so it can be a program name with args.
12793 set dummy $ac_prog; ac_word=$2
12794 echo "$as_me:12794: checking for $ac_word" >&5
12795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12796 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12797 echo $ECHO_N "(cached) $ECHO_C" >&6
12799 if test -n "$ac_ct_XCURSES_CONFIG"; then
12800 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12802 ac_save_IFS=$IFS; IFS=$ac_path_separator
12804 for ac_dir in $ac_dummy; do
12806 test -z "$ac_dir" && ac_dir=.
12807 $as_executable_p "$ac_dir/$ac_word" || continue
12808 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12809 echo "$as_me:12809: found $ac_dir/$ac_word" >&5
12815 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12816 if test -n "$ac_ct_XCURSES_CONFIG"; then
12817 echo "$as_me:12817: result: $ac_ct_XCURSES_CONFIG" >&5
12818 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12820 echo "$as_me:12820: result: no" >&5
12821 echo "${ECHO_T}no" >&6
12824 test -n "$ac_ct_XCURSES_CONFIG" && break
12826 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12828 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12831 if test "$XCURSES_CONFIG" != none ; then
12833 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12835 cf_add_libs="`$XCURSES_CONFIG --libs`"
12836 # Filter out duplicates - this happens with badly-designed ".pc" files...
12837 for cf_add_1lib in $LIBS
12839 for cf_add_2lib in $cf_add_libs
12841 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12847 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12849 LIBS="$cf_add_libs"
12851 cf_cv_lib_XCurses=yes
12855 LDFLAGS="$LDFLAGS $X_LIBS"
12857 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12859 echo "${as_me:-configure}:12859: testing checking additions to CFLAGS ..." 1>&5
12861 cf_check_cflags="$CFLAGS"
12862 cf_check_cppflags="$CPPFLAGS"
12867 cf_new_extra_cppflags=
12869 for cf_add_cflags in $X_CFLAGS
12871 case $cf_fix_cppflags in
12873 case $cf_add_cflags in
12874 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12875 case $cf_add_cflags in
12877 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12879 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12880 && test -z "${cf_tst_cflags}" \
12881 && cf_fix_cppflags=yes
12883 if test $cf_fix_cppflags = yes ; then
12884 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12886 elif test "${cf_tst_cflags}" = "\"'" ; then
12887 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12892 case "$CPPFLAGS" in
12896 case $cf_add_cflags in
12898 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12900 CPPFLAGS=`echo "$CPPFLAGS" | \
12901 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12902 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12906 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12911 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12916 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12918 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12920 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12921 && test -z "${cf_tst_cflags}" \
12922 && cf_fix_cppflags=no
12927 if test -n "$cf_new_cflags" ; then
12928 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12930 echo "${as_me:-configure}:12930: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12932 CFLAGS="$CFLAGS $cf_new_cflags"
12935 if test -n "$cf_new_cppflags" ; then
12936 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12938 echo "${as_me:-configure}:12938: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12940 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12943 if test -n "$cf_new_extra_cppflags" ; then
12944 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12946 echo "${as_me:-configure}:12946: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12948 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12951 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12952 cat >conftest.$ac_ext <<_ACEOF
12953 #line 12953 "configure"
12954 #include "confdefs.h"
12959 printf("Hello world");
12964 rm -f conftest.$ac_objext conftest$ac_exeext
12965 if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
12966 (eval $ac_link) 2>&5
12968 echo "$as_me:12968: \$? = $ac_status" >&5
12969 (exit $ac_status); } &&
12970 { ac_try='test -s conftest$ac_exeext'
12971 { (eval echo "$as_me:12971: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12974 echo "$as_me:12974: \$? = $ac_status" >&5
12975 (exit $ac_status); }; }; then
12978 echo "$as_me: failed program was:" >&5
12979 cat conftest.$ac_ext >&5
12980 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12982 echo "${as_me:-configure}:12982: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12984 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12985 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12987 echo "${as_me:-configure}:12987: testing but keeping change to \$CPPFLAGS ..." 1>&5
12990 CFLAGS="$cf_check_flags"
12992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12995 echo "$as_me:12995: checking for XOpenDisplay in -lX11" >&5
12996 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12997 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12998 echo $ECHO_N "(cached) $ECHO_C" >&6
13000 ac_check_lib_save_LIBS=$LIBS
13001 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13002 cat >conftest.$ac_ext <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13006 /* Override any gcc2 internal prototype to avoid an error. */
13010 /* We use char because int might match the return type of a gcc2
13011 builtin and then its argument prototype would still apply. */
13012 char XOpenDisplay ();
13021 rm -f conftest.$ac_objext conftest$ac_exeext
13022 if { (eval echo "$as_me:13022: \"$ac_link\"") >&5
13023 (eval $ac_link) 2>&5
13025 echo "$as_me:13025: \$? = $ac_status" >&5
13026 (exit $ac_status); } &&
13027 { ac_try='test -s conftest$ac_exeext'
13028 { (eval echo "$as_me:13028: \"$ac_try\"") >&5
13029 (eval $ac_try) 2>&5
13031 echo "$as_me:13031: \$? = $ac_status" >&5
13032 (exit $ac_status); }; }; then
13033 ac_cv_lib_X11_XOpenDisplay=yes
13035 echo "$as_me: failed program was:" >&5
13036 cat conftest.$ac_ext >&5
13037 ac_cv_lib_X11_XOpenDisplay=no
13039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13040 LIBS=$ac_check_lib_save_LIBS
13042 echo "$as_me:13042: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13043 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13044 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13046 cf_add_libs="-lX11"
13047 # Filter out duplicates - this happens with badly-designed ".pc" files...
13048 for cf_add_1lib in $LIBS
13050 for cf_add_2lib in $cf_add_libs
13052 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13058 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13060 LIBS="$cf_add_libs"
13064 echo "$as_me:13064: checking for XCurses library" >&5
13065 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13066 if test "${cf_cv_lib_XCurses+set}" = set; then
13067 echo $ECHO_N "(cached) $ECHO_C" >&6
13070 cf_add_libs="-lXCurses"
13071 # Filter out duplicates - this happens with badly-designed ".pc" files...
13072 for cf_add_1lib in $LIBS
13074 for cf_add_2lib in $cf_add_libs
13076 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13082 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13084 LIBS="$cf_add_libs"
13086 cat >conftest.$ac_ext <<_ACEOF
13087 #line 13087 "configure"
13088 #include "confdefs.h"
13090 #include <xcurses.h>
13091 char *XCursesProgramName = "test";
13101 rm -f conftest.$ac_objext conftest$ac_exeext
13102 if { (eval echo "$as_me:13102: \"$ac_link\"") >&5
13103 (eval $ac_link) 2>&5
13105 echo "$as_me:13105: \$? = $ac_status" >&5
13106 (exit $ac_status); } &&
13107 { ac_try='test -s conftest$ac_exeext'
13108 { (eval echo "$as_me:13108: \"$ac_try\"") >&5
13109 (eval $ac_try) 2>&5
13111 echo "$as_me:13111: \$? = $ac_status" >&5
13112 (exit $ac_status); }; }; then
13113 cf_cv_lib_XCurses=yes
13115 echo "$as_me: failed program was:" >&5
13116 cat conftest.$ac_ext >&5
13117 cf_cv_lib_XCurses=no
13119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13122 echo "$as_me:13122: result: $cf_cv_lib_XCurses" >&5
13123 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13127 if test $cf_cv_lib_XCurses = yes ; then
13129 cat >>confdefs.h <<\EOF
13133 cat >>confdefs.h <<\EOF
13137 echo "$as_me:13137: checking for xcurses.h" >&5
13138 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13139 if test "${ac_cv_header_xcurses_h+set}" = set; then
13140 echo $ECHO_N "(cached) $ECHO_C" >&6
13142 cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145 #include <xcurses.h>
13147 if { (eval echo "$as_me:13147: \"$ac_cpp conftest.$ac_ext\"") >&5
13148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13150 egrep -v '^ *\+' conftest.er1 >conftest.err
13152 cat conftest.err >&5
13153 echo "$as_me:13153: \$? = $ac_status" >&5
13154 (exit $ac_status); } >/dev/null; then
13155 if test -s conftest.err; then
13156 ac_cpp_err=$ac_c_preproc_warn_flag
13163 if test -z "$ac_cpp_err"; then
13164 ac_cv_header_xcurses_h=yes
13166 echo "$as_me: failed program was:" >&5
13167 cat conftest.$ac_ext >&5
13168 ac_cv_header_xcurses_h=no
13170 rm -f conftest.err conftest.$ac_ext
13172 echo "$as_me:13172: result: $ac_cv_header_xcurses_h" >&5
13173 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13174 if test $ac_cv_header_xcurses_h = yes; then
13176 cat >>confdefs.h <<\EOF
13177 #define HAVE_XCURSES 1
13183 { { echo "$as_me:13183: error: Cannot link with XCurses" >&5
13184 echo "$as_me: error: Cannot link with XCurses" >&2;}
13185 { (exit 1); exit 1; }; }
13190 { { echo "$as_me:13190: error: unexpected screen-value: $cf_cv_screen" >&5
13191 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13192 { (exit 1); exit 1; }; }
13196 : ${cf_nculib_root:=$cf_cv_screen}
13197 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13198 echo "$as_me:13198: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13199 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13200 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13201 echo $ECHO_N "(cached) $ECHO_C" >&6
13203 ac_check_lib_save_LIBS=$LIBS
13204 LIBS="-l$cf_nculib_root $LIBS"
13205 cat >conftest.$ac_ext <<_ACEOF
13206 #line 13206 "configure"
13207 #include "confdefs.h"
13209 /* Override any gcc2 internal prototype to avoid an error. */
13213 /* We use char because int might match the return type of a gcc2
13214 builtin and then its argument prototype would still apply. */
13215 char _nc_init_pthreads ();
13219 _nc_init_pthreads ();
13224 rm -f conftest.$ac_objext conftest$ac_exeext
13225 if { (eval echo "$as_me:13225: \"$ac_link\"") >&5
13226 (eval $ac_link) 2>&5
13228 echo "$as_me:13228: \$? = $ac_status" >&5
13229 (exit $ac_status); } &&
13230 { ac_try='test -s conftest$ac_exeext'
13231 { (eval echo "$as_me:13231: \"$ac_try\"") >&5
13232 (eval $ac_try) 2>&5
13234 echo "$as_me:13234: \$? = $ac_status" >&5
13235 (exit $ac_status); }; }; then
13236 eval "$as_ac_Lib=yes"
13238 echo "$as_me: failed program was:" >&5
13239 cat conftest.$ac_ext >&5
13240 eval "$as_ac_Lib=no"
13242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13243 LIBS=$ac_check_lib_save_LIBS
13245 echo "$as_me:13245: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13246 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13247 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13248 cf_cv_ncurses_pthreads=yes
13250 cf_cv_ncurses_pthreads=no
13253 if test "$cf_cv_ncurses_pthreads" = yes
13256 cf_add_libs="-lpthread"
13257 # Filter out duplicates - this happens with badly-designed ".pc" files...
13258 for cf_add_1lib in $LIBS
13260 for cf_add_2lib in $cf_add_libs
13262 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13268 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13270 LIBS="$cf_add_libs"
13274 case $cf_cv_screen in
13276 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13280 echo "$as_me:13280: checking for NetBSD form.h" >&5
13281 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13282 if test "${cf_cv_netbsd_form_h+set}" = set; then
13283 echo $ECHO_N "(cached) $ECHO_C" >&6
13286 cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13290 #include <${cf_cv_ncurses_header:-curses.h}>
13298 int y = current_field(form)->cursor_ypos;
13299 int x = current_field(form)->cursor_xpos;
13305 rm -f conftest.$ac_objext
13306 if { (eval echo "$as_me:13306: \"$ac_compile\"") >&5
13307 (eval $ac_compile) 2>&5
13309 echo "$as_me:13309: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest.$ac_objext'
13312 { (eval echo "$as_me:13312: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13315 echo "$as_me:13315: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
13317 cf_cv_netbsd_form_h=yes
13320 echo "$as_me: failed program was:" >&5
13321 cat conftest.$ac_ext >&5
13322 cf_cv_netbsd_form_h=no
13324 rm -f conftest.$ac_objext conftest.$ac_ext
13327 echo "$as_me:13327: result: $cf_cv_netbsd_form_h" >&5
13328 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13330 test "$cf_cv_netbsd_form_h" = yes &&
13331 cat >>confdefs.h <<\EOF
13332 #define HAVE_NETBSD_FORM_H 1
13335 echo "$as_me:13335: checking for NetBSD menu.h" >&5
13336 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13337 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13338 echo $ECHO_N "(cached) $ECHO_C" >&6
13341 cat >conftest.$ac_ext <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13345 #include <${cf_cv_ncurses_header:-curses.h}>
13353 int y = menu->max_item_width;
13359 rm -f conftest.$ac_objext
13360 if { (eval echo "$as_me:13360: \"$ac_compile\"") >&5
13361 (eval $ac_compile) 2>&5
13363 echo "$as_me:13363: \$? = $ac_status" >&5
13364 (exit $ac_status); } &&
13365 { ac_try='test -s conftest.$ac_objext'
13366 { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367 (eval $ac_try) 2>&5
13369 echo "$as_me:13369: \$? = $ac_status" >&5
13370 (exit $ac_status); }; }; then
13371 cf_cv_netbsd_menu_h=yes
13374 echo "$as_me: failed program was:" >&5
13375 cat conftest.$ac_ext >&5
13376 cf_cv_netbsd_menu_h=no
13378 rm -f conftest.$ac_objext conftest.$ac_ext
13381 echo "$as_me:13381: result: $cf_cv_netbsd_menu_h" >&5
13382 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13384 test "$cf_cv_netbsd_menu_h" = yes &&
13385 cat >>confdefs.h <<\EOF
13386 #define HAVE_NETBSD_MENU_H 1
13392 case $cf_cv_screen in
13396 # look for curses-related libraries
13398 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13399 echo "$as_me:13399: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13400 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13401 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13402 echo $ECHO_N "(cached) $ECHO_C" >&6
13404 ac_check_lib_save_LIBS=$LIBS
13405 LIBS="-lpanel$cf_cv_libtype $LIBS"
13406 cat >conftest.$ac_ext <<_ACEOF
13407 #line 13407 "configure"
13408 #include "confdefs.h"
13410 /* Override any gcc2 internal prototype to avoid an error. */
13414 /* We use char because int might match the return type of a gcc2
13415 builtin and then its argument prototype would still apply. */
13425 rm -f conftest.$ac_objext conftest$ac_exeext
13426 if { (eval echo "$as_me:13426: \"$ac_link\"") >&5
13427 (eval $ac_link) 2>&5
13429 echo "$as_me:13429: \$? = $ac_status" >&5
13430 (exit $ac_status); } &&
13431 { ac_try='test -s conftest$ac_exeext'
13432 { (eval echo "$as_me:13432: \"$ac_try\"") >&5
13433 (eval $ac_try) 2>&5
13435 echo "$as_me:13435: \$? = $ac_status" >&5
13436 (exit $ac_status); }; }; then
13437 eval "$as_ac_Lib=yes"
13439 echo "$as_me: failed program was:" >&5
13440 cat conftest.$ac_ext >&5
13441 eval "$as_ac_Lib=no"
13443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13444 LIBS=$ac_check_lib_save_LIBS
13446 echo "$as_me:13446: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13447 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13448 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13450 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13452 cf_add_libs="-lpanel$cf_cv_libtype"
13453 # Filter out duplicates - this happens with badly-designed ".pc" files...
13454 for cf_add_1lib in $LIBS
13456 for cf_add_2lib in $cf_add_libs
13458 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13464 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13466 LIBS="$cf_add_libs"
13468 cat >>confdefs.h <<EOF
13469 #define $cf_upper 1
13474 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13475 echo "$as_me:13475: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13476 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13477 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
13480 ac_check_lib_save_LIBS=$LIBS
13481 LIBS="-lmenu$cf_cv_libtype $LIBS"
13482 cat >conftest.$ac_ext <<_ACEOF
13483 #line 13483 "configure"
13484 #include "confdefs.h"
13486 /* Override any gcc2 internal prototype to avoid an error. */
13490 /* We use char because int might match the return type of a gcc2
13491 builtin and then its argument prototype would still apply. */
13492 char menu_driver ();
13501 rm -f conftest.$ac_objext conftest$ac_exeext
13502 if { (eval echo "$as_me:13502: \"$ac_link\"") >&5
13503 (eval $ac_link) 2>&5
13505 echo "$as_me:13505: \$? = $ac_status" >&5
13506 (exit $ac_status); } &&
13507 { ac_try='test -s conftest$ac_exeext'
13508 { (eval echo "$as_me:13508: \"$ac_try\"") >&5
13509 (eval $ac_try) 2>&5
13511 echo "$as_me:13511: \$? = $ac_status" >&5
13512 (exit $ac_status); }; }; then
13513 eval "$as_ac_Lib=yes"
13515 echo "$as_me: failed program was:" >&5
13516 cat conftest.$ac_ext >&5
13517 eval "$as_ac_Lib=no"
13519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13520 LIBS=$ac_check_lib_save_LIBS
13522 echo "$as_me:13522: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13523 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13524 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13526 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13528 cf_add_libs="-lmenu$cf_cv_libtype"
13529 # Filter out duplicates - this happens with badly-designed ".pc" files...
13530 for cf_add_1lib in $LIBS
13532 for cf_add_2lib in $cf_add_libs
13534 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13540 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13542 LIBS="$cf_add_libs"
13544 cat >>confdefs.h <<EOF
13545 #define $cf_upper 1
13550 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13551 echo "$as_me:13551: checking for form_driver in -lform$cf_cv_libtype" >&5
13552 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13553 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13554 echo $ECHO_N "(cached) $ECHO_C" >&6
13556 ac_check_lib_save_LIBS=$LIBS
13557 LIBS="-lform$cf_cv_libtype $LIBS"
13558 cat >conftest.$ac_ext <<_ACEOF
13559 #line 13559 "configure"
13560 #include "confdefs.h"
13562 /* Override any gcc2 internal prototype to avoid an error. */
13566 /* We use char because int might match the return type of a gcc2
13567 builtin and then its argument prototype would still apply. */
13568 char form_driver ();
13577 rm -f conftest.$ac_objext conftest$ac_exeext
13578 if { (eval echo "$as_me:13578: \"$ac_link\"") >&5
13579 (eval $ac_link) 2>&5
13581 echo "$as_me:13581: \$? = $ac_status" >&5
13582 (exit $ac_status); } &&
13583 { ac_try='test -s conftest$ac_exeext'
13584 { (eval echo "$as_me:13584: \"$ac_try\"") >&5
13585 (eval $ac_try) 2>&5
13587 echo "$as_me:13587: \$? = $ac_status" >&5
13588 (exit $ac_status); }; }; then
13589 eval "$as_ac_Lib=yes"
13591 echo "$as_me: failed program was:" >&5
13592 cat conftest.$ac_ext >&5
13593 eval "$as_ac_Lib=no"
13595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13596 LIBS=$ac_check_lib_save_LIBS
13598 echo "$as_me:13598: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13599 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13600 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13602 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13604 cf_add_libs="-lform$cf_cv_libtype"
13605 # Filter out duplicates - this happens with badly-designed ".pc" files...
13606 for cf_add_1lib in $LIBS
13608 for cf_add_2lib in $cf_add_libs
13610 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13616 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13618 LIBS="$cf_add_libs"
13620 cat >>confdefs.h <<EOF
13621 #define $cf_upper 1
13626 # look for curses-related headers
13637 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13638 echo "$as_me:13638: checking for $ac_header" >&5
13639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13641 echo $ECHO_N "(cached) $ECHO_C" >&6
13643 cat >conftest.$ac_ext <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646 #include <$ac_header>
13648 if { (eval echo "$as_me:13648: \"$ac_cpp conftest.$ac_ext\"") >&5
13649 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13651 egrep -v '^ *\+' conftest.er1 >conftest.err
13653 cat conftest.err >&5
13654 echo "$as_me:13654: \$? = $ac_status" >&5
13655 (exit $ac_status); } >/dev/null; then
13656 if test -s conftest.err; then
13657 ac_cpp_err=$ac_c_preproc_warn_flag
13664 if test -z "$ac_cpp_err"; then
13665 eval "$as_ac_Header=yes"
13667 echo "$as_me: failed program was:" >&5
13668 cat conftest.$ac_ext >&5
13669 eval "$as_ac_Header=no"
13671 rm -f conftest.err conftest.$ac_ext
13673 echo "$as_me:13673: result: `eval echo '${'$as_ac_Header'}'`" >&5
13674 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13675 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13676 cat >>confdefs.h <<EOF
13677 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13686 echo "$as_me:13686: checking for ANSI C header files" >&5
13687 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13688 if test "${ac_cv_header_stdc+set}" = set; then
13689 echo $ECHO_N "(cached) $ECHO_C" >&6
13691 cat >conftest.$ac_ext <<_ACEOF
13692 #line 13692 "configure"
13693 #include "confdefs.h"
13694 #include <stdlib.h>
13695 #include <stdarg.h>
13696 #include <string.h>
13700 if { (eval echo "$as_me:13700: \"$ac_cpp conftest.$ac_ext\"") >&5
13701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13703 egrep -v '^ *\+' conftest.er1 >conftest.err
13705 cat conftest.err >&5
13706 echo "$as_me:13706: \$? = $ac_status" >&5
13707 (exit $ac_status); } >/dev/null; then
13708 if test -s conftest.err; then
13709 ac_cpp_err=$ac_c_preproc_warn_flag
13716 if test -z "$ac_cpp_err"; then
13717 ac_cv_header_stdc=yes
13719 echo "$as_me: failed program was:" >&5
13720 cat conftest.$ac_ext >&5
13721 ac_cv_header_stdc=no
13723 rm -f conftest.err conftest.$ac_ext
13725 if test $ac_cv_header_stdc = yes; then
13726 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13727 cat >conftest.$ac_ext <<_ACEOF
13728 #line 13728 "configure"
13729 #include "confdefs.h"
13730 #include <string.h>
13733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13734 egrep "memchr" >/dev/null 2>&1; then
13737 ac_cv_header_stdc=no
13743 if test $ac_cv_header_stdc = yes; then
13744 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13745 cat >conftest.$ac_ext <<_ACEOF
13746 #line 13746 "configure"
13747 #include "confdefs.h"
13748 #include <stdlib.h>
13751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13752 egrep "free" >/dev/null 2>&1; then
13755 ac_cv_header_stdc=no
13761 if test $ac_cv_header_stdc = yes; then
13762 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13763 if test "$cross_compiling" = yes; then
13766 cat >conftest.$ac_ext <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13770 #if ((' ' & 0x0FF) == 0x020)
13771 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13772 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13774 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13775 || ('j' <= (c) && (c) <= 'r') \
13776 || ('s' <= (c) && (c) <= 'z'))
13777 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13780 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13785 for (i = 0; i < 256; i++)
13786 if (XOR (islower (i), ISLOWER (i))
13787 || toupper (i) != TOUPPER (i))
13788 $ac_main_return(2);
13789 $ac_main_return (0);
13792 rm -f conftest$ac_exeext
13793 if { (eval echo "$as_me:13793: \"$ac_link\"") >&5
13794 (eval $ac_link) 2>&5
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13798 { (eval echo "$as_me:13798: \"$ac_try\"") >&5
13799 (eval $ac_try) 2>&5
13801 echo "$as_me:13801: \$? = $ac_status" >&5
13802 (exit $ac_status); }; }; then
13805 echo "$as_me: program exited with status $ac_status" >&5
13806 echo "$as_me: failed program was:" >&5
13807 cat conftest.$ac_ext >&5
13808 ac_cv_header_stdc=no
13810 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13814 echo "$as_me:13814: result: $ac_cv_header_stdc" >&5
13815 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13816 if test $ac_cv_header_stdc = yes; then
13818 cat >>confdefs.h <<\EOF
13819 #define STDC_HEADERS 1
13824 echo "$as_me:13824: checking whether time.h and sys/time.h may both be included" >&5
13825 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13826 if test "${ac_cv_header_time+set}" = set; then
13827 echo $ECHO_N "(cached) $ECHO_C" >&6
13829 cat >conftest.$ac_ext <<_ACEOF
13830 #line 13830 "configure"
13831 #include "confdefs.h"
13832 #include <sys/types.h>
13833 #include <sys/time.h>
13839 if ((struct tm *) 0)
13845 rm -f conftest.$ac_objext
13846 if { (eval echo "$as_me:13846: \"$ac_compile\"") >&5
13847 (eval $ac_compile) 2>&5
13849 echo "$as_me:13849: \$? = $ac_status" >&5
13850 (exit $ac_status); } &&
13851 { ac_try='test -s conftest.$ac_objext'
13852 { (eval echo "$as_me:13852: \"$ac_try\"") >&5
13853 (eval $ac_try) 2>&5
13855 echo "$as_me:13855: \$? = $ac_status" >&5
13856 (exit $ac_status); }; }; then
13857 ac_cv_header_time=yes
13859 echo "$as_me: failed program was:" >&5
13860 cat conftest.$ac_ext >&5
13861 ac_cv_header_time=no
13863 rm -f conftest.$ac_objext conftest.$ac_ext
13865 echo "$as_me:13865: result: $ac_cv_header_time" >&5
13866 echo "${ECHO_T}$ac_cv_header_time" >&6
13867 if test $ac_cv_header_time = yes; then
13869 cat >>confdefs.h <<\EOF
13870 #define TIME_WITH_SYS_TIME 1
13887 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13888 echo "$as_me:13888: checking for $ac_header" >&5
13889 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13890 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13891 echo $ECHO_N "(cached) $ECHO_C" >&6
13893 cat >conftest.$ac_ext <<_ACEOF
13894 #line 13894 "configure"
13895 #include "confdefs.h"
13896 #include <$ac_header>
13898 if { (eval echo "$as_me:13898: \"$ac_cpp conftest.$ac_ext\"") >&5
13899 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13901 egrep -v '^ *\+' conftest.er1 >conftest.err
13903 cat conftest.err >&5
13904 echo "$as_me:13904: \$? = $ac_status" >&5
13905 (exit $ac_status); } >/dev/null; then
13906 if test -s conftest.err; then
13907 ac_cpp_err=$ac_c_preproc_warn_flag
13914 if test -z "$ac_cpp_err"; then
13915 eval "$as_ac_Header=yes"
13917 echo "$as_me: failed program was:" >&5
13918 cat conftest.$ac_ext >&5
13919 eval "$as_ac_Header=no"
13921 rm -f conftest.err conftest.$ac_ext
13923 echo "$as_me:13923: result: `eval echo '${'$as_ac_Header'}'`" >&5
13924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13926 cat >>confdefs.h <<EOF
13927 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13933 for ac_header in unistd.h getopt.h
13935 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13936 echo "$as_me:13936: checking for $ac_header" >&5
13937 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13938 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13939 echo $ECHO_N "(cached) $ECHO_C" >&6
13941 cat >conftest.$ac_ext <<_ACEOF
13942 #line 13942 "configure"
13943 #include "confdefs.h"
13944 #include <$ac_header>
13946 if { (eval echo "$as_me:13946: \"$ac_cpp conftest.$ac_ext\"") >&5
13947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13949 egrep -v '^ *\+' conftest.er1 >conftest.err
13951 cat conftest.err >&5
13952 echo "$as_me:13952: \$? = $ac_status" >&5
13953 (exit $ac_status); } >/dev/null; then
13954 if test -s conftest.err; then
13955 ac_cpp_err=$ac_c_preproc_warn_flag
13962 if test -z "$ac_cpp_err"; then
13963 eval "$as_ac_Header=yes"
13965 echo "$as_me: failed program was:" >&5
13966 cat conftest.$ac_ext >&5
13967 eval "$as_ac_Header=no"
13969 rm -f conftest.err conftest.$ac_ext
13971 echo "$as_me:13971: result: `eval echo '${'$as_ac_Header'}'`" >&5
13972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13973 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13974 cat >>confdefs.h <<EOF
13975 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13981 echo "$as_me:13981: checking for header declaring getopt variables" >&5
13982 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13983 if test "${cf_cv_getopt_header+set}" = set; then
13984 echo $ECHO_N "(cached) $ECHO_C" >&6
13987 cf_cv_getopt_header=none
13988 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13990 cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13994 #include <$cf_header>
13998 int x = optind; char *y = optarg
14003 rm -f conftest.$ac_objext
14004 if { (eval echo "$as_me:14004: \"$ac_compile\"") >&5
14005 (eval $ac_compile) 2>&5
14007 echo "$as_me:14007: \$? = $ac_status" >&5
14008 (exit $ac_status); } &&
14009 { ac_try='test -s conftest.$ac_objext'
14010 { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011 (eval $ac_try) 2>&5
14013 echo "$as_me:14013: \$? = $ac_status" >&5
14014 (exit $ac_status); }; }; then
14015 cf_cv_getopt_header=$cf_header
14018 echo "$as_me: failed program was:" >&5
14019 cat conftest.$ac_ext >&5
14021 rm -f conftest.$ac_objext conftest.$ac_ext
14025 echo "$as_me:14025: result: $cf_cv_getopt_header" >&5
14026 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14027 if test $cf_cv_getopt_header != none ; then
14029 cat >>confdefs.h <<\EOF
14030 #define HAVE_GETOPT_HEADER 1
14034 if test $cf_cv_getopt_header = getopt.h ; then
14036 cat >>confdefs.h <<\EOF
14037 #define NEED_GETOPT_H 1
14047 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14048 echo "$as_me:14048: checking for $ac_func" >&5
14049 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14050 if eval "test \"\${$as_ac_var+set}\" = set"; then
14051 echo $ECHO_N "(cached) $ECHO_C" >&6
14053 cat >conftest.$ac_ext <<_ACEOF
14054 #line 14054 "configure"
14055 #include "confdefs.h"
14056 /* System header to define __stub macros and hopefully few prototypes,
14057 which can conflict with char $ac_func (); below. */
14058 #include <assert.h>
14059 /* Override any gcc2 internal prototype to avoid an error. */
14063 /* We use char because int might match the return type of a gcc2
14064 builtin and then its argument prototype would still apply. */
14071 /* The GNU C library defines this for functions which it implements
14072 to always fail with ENOSYS. Some functions are actually named
14073 something starting with __ and the normal name is an alias. */
14074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14077 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14084 rm -f conftest.$ac_objext conftest$ac_exeext
14085 if { (eval echo "$as_me:14085: \"$ac_link\"") >&5
14086 (eval $ac_link) 2>&5
14088 echo "$as_me:14088: \$? = $ac_status" >&5
14089 (exit $ac_status); } &&
14090 { ac_try='test -s conftest$ac_exeext'
14091 { (eval echo "$as_me:14091: \"$ac_try\"") >&5
14092 (eval $ac_try) 2>&5
14094 echo "$as_me:14094: \$? = $ac_status" >&5
14095 (exit $ac_status); }; }; then
14096 eval "$as_ac_var=yes"
14098 echo "$as_me: failed program was:" >&5
14099 cat conftest.$ac_ext >&5
14100 eval "$as_ac_var=no"
14102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14104 echo "$as_me:14104: result: `eval echo '${'$as_ac_var'}'`" >&5
14105 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14106 if test `eval echo '${'$as_ac_var'}'` = yes; then
14107 cat >>confdefs.h <<EOF
14108 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14114 if test "x$ac_cv_func_getopt" = xno; then
14115 { { echo "$as_me:14115: error: getopt is required for building programs" >&5
14116 echo "$as_me: error: getopt is required for building programs" >&2;}
14117 { (exit 1); exit 1; }; }
14120 if test "$cf_enable_widec" = yes; then
14133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14134 echo "$as_me:14134: checking for $ac_func" >&5
14135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14136 if eval "test \"\${$as_ac_var+set}\" = set"; then
14137 echo $ECHO_N "(cached) $ECHO_C" >&6
14139 cat >conftest.$ac_ext <<_ACEOF
14140 #line 14140 "configure"
14141 #include "confdefs.h"
14142 /* System header to define __stub macros and hopefully few prototypes,
14143 which can conflict with char $ac_func (); below. */
14144 #include <assert.h>
14145 /* Override any gcc2 internal prototype to avoid an error. */
14149 /* We use char because int might match the return type of a gcc2
14150 builtin and then its argument prototype would still apply. */
14157 /* The GNU C library defines this for functions which it implements
14158 to always fail with ENOSYS. Some functions are actually named
14159 something starting with __ and the normal name is an alias. */
14160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14163 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14170 rm -f conftest.$ac_objext conftest$ac_exeext
14171 if { (eval echo "$as_me:14171: \"$ac_link\"") >&5
14172 (eval $ac_link) 2>&5
14174 echo "$as_me:14174: \$? = $ac_status" >&5
14175 (exit $ac_status); } &&
14176 { ac_try='test -s conftest$ac_exeext'
14177 { (eval echo "$as_me:14177: \"$ac_try\"") >&5
14178 (eval $ac_try) 2>&5
14180 echo "$as_me:14180: \$? = $ac_status" >&5
14181 (exit $ac_status); }; }; then
14182 eval "$as_ac_var=yes"
14184 echo "$as_me: failed program was:" >&5
14185 cat conftest.$ac_ext >&5
14186 eval "$as_ac_var=no"
14188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14190 echo "$as_me:14190: result: `eval echo '${'$as_ac_var'}'`" >&5
14191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14192 if test `eval echo '${'$as_ac_var'}'` = yes; then
14193 cat >>confdefs.h <<EOF
14194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14202 echo "$as_me:14202: checking definition to turn on extended curses functions" >&5
14203 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14204 if test "${cf_cv_need_xopen_extension+set}" = set; then
14205 echo $ECHO_N "(cached) $ECHO_C" >&6
14208 cf_cv_need_xopen_extension=unknown
14209 cat >conftest.$ac_ext <<_ACEOF
14210 #line 14210 "configure"
14211 #include "confdefs.h"
14213 #include <stdlib.h>
14214 #include <${cf_cv_ncurses_header:-curses.h}>
14219 #if defined(NCURSES_VERSION_PATCH)
14220 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14224 #ifdef NCURSES_VERSION
14226 int check2 = curs_set((int)sizeof(check));
14228 long x = winnstr(stdscr, "", 0);
14230 getbegyx(stdscr, y1, x1)
14235 rm -f conftest.$ac_objext conftest$ac_exeext
14236 if { (eval echo "$as_me:14236: \"$ac_link\"") >&5
14237 (eval $ac_link) 2>&5
14239 echo "$as_me:14239: \$? = $ac_status" >&5
14240 (exit $ac_status); } &&
14241 { ac_try='test -s conftest$ac_exeext'
14242 { (eval echo "$as_me:14242: \"$ac_try\"") >&5
14243 (eval $ac_try) 2>&5
14245 echo "$as_me:14245: \$? = $ac_status" >&5
14246 (exit $ac_status); }; }; then
14247 cf_cv_need_xopen_extension=none
14249 echo "$as_me: failed program was:" >&5
14250 cat conftest.$ac_ext >&5
14252 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14254 cat >conftest.$ac_ext <<_ACEOF
14255 #line 14255 "configure"
14256 #include "confdefs.h"
14258 #define $cf_try_xopen_extension 1
14259 #include <stdlib.h>
14260 #include <${cf_cv_ncurses_header:-curses.h}>
14265 #ifdef NCURSES_VERSION
14267 int check2 = curs_set((int)sizeof(check));
14269 long x = winnstr(stdscr, "", 0);
14271 getbegyx(stdscr, y1, x1)
14276 rm -f conftest.$ac_objext conftest$ac_exeext
14277 if { (eval echo "$as_me:14277: \"$ac_link\"") >&5
14278 (eval $ac_link) 2>&5
14280 echo "$as_me:14280: \$? = $ac_status" >&5
14281 (exit $ac_status); } &&
14282 { ac_try='test -s conftest$ac_exeext'
14283 { (eval echo "$as_me:14283: \"$ac_try\"") >&5
14284 (eval $ac_try) 2>&5
14286 echo "$as_me:14286: \$? = $ac_status" >&5
14287 (exit $ac_status); }; }; then
14288 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14290 echo "$as_me: failed program was:" >&5
14291 cat conftest.$ac_ext >&5
14293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14300 echo "$as_me:14300: result: $cf_cv_need_xopen_extension" >&5
14301 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14303 case $cf_cv_need_xopen_extension in
14305 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14309 echo "$as_me:14309: checking for term.h" >&5
14310 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14311 if test "${cf_cv_term_header+set}" = set; then
14312 echo $ECHO_N "(cached) $ECHO_C" >&6
14315 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14316 # for <term.h> if we do not find the variant.
14318 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14320 case ${cf_cv_ncurses_header:-curses.h} in
14322 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14323 cf_header_list="$cf_header_item $cf_header_list"
14327 for cf_header in $cf_header_list
14329 cat >conftest.$ac_ext <<_ACEOF
14330 #line 14330 "configure"
14331 #include "confdefs.h"
14333 #include <${cf_cv_ncurses_header:-curses.h}>
14334 #include <${cf_header}>
14343 rm -f conftest.$ac_objext
14344 if { (eval echo "$as_me:14344: \"$ac_compile\"") >&5
14345 (eval $ac_compile) 2>&5
14347 echo "$as_me:14347: \$? = $ac_status" >&5
14348 (exit $ac_status); } &&
14349 { ac_try='test -s conftest.$ac_objext'
14350 { (eval echo "$as_me:14350: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14353 echo "$as_me:14353: \$? = $ac_status" >&5
14354 (exit $ac_status); }; }; then
14355 cf_cv_term_header=$cf_header
14358 echo "$as_me: failed program was:" >&5
14359 cat conftest.$ac_ext >&5
14360 cf_cv_term_header=no
14362 rm -f conftest.$ac_objext conftest.$ac_ext
14365 case $cf_cv_term_header in
14367 # If curses is ncurses, some packagers still mess it up by trying to make
14368 # us use GNU termcap. This handles the most common case.
14369 for cf_header in ncurses/term.h ncursesw/term.h
14371 cat >conftest.$ac_ext <<_ACEOF
14372 #line 14372 "configure"
14373 #include "confdefs.h"
14375 #include <${cf_cv_ncurses_header:-curses.h}>
14376 #ifdef NCURSES_VERSION
14377 #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
14414 echo "$as_me:14414: result: $cf_cv_term_header" >&5
14415 echo "${ECHO_T}$cf_cv_term_header" >&6
14417 case $cf_cv_term_header in
14420 cat >>confdefs.h <<\EOF
14421 #define HAVE_TERM_H 1
14427 cat >>confdefs.h <<\EOF
14428 #define HAVE_NCURSES_TERM_H 1
14434 cat >>confdefs.h <<\EOF
14435 #define HAVE_NCURSESW_TERM_H 1
14441 echo "$as_me:14441: checking for unctrl.h" >&5
14442 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14443 if test "${cf_cv_unctrl_header+set}" = set; then
14444 echo $ECHO_N "(cached) $ECHO_C" >&6
14447 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14448 # for <unctrl.h> if we do not find the variant.
14450 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14452 case ${cf_cv_ncurses_header:-curses.h} in
14454 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14455 cf_header_list="$cf_header_item $cf_header_list"
14459 for cf_header in $cf_header_list
14461 cat >conftest.$ac_ext <<_ACEOF
14462 #line 14462 "configure"
14463 #include "confdefs.h"
14465 #include <${cf_cv_ncurses_header:-curses.h}>
14466 #include <${cf_header}>
14475 rm -f conftest.$ac_objext
14476 if { (eval echo "$as_me:14476: \"$ac_compile\"") >&5
14477 (eval $ac_compile) 2>&5
14479 echo "$as_me:14479: \$? = $ac_status" >&5
14480 (exit $ac_status); } &&
14481 { ac_try='test -s conftest.$ac_objext'
14482 { (eval echo "$as_me:14482: \"$ac_try\"") >&5
14483 (eval $ac_try) 2>&5
14485 echo "$as_me:14485: \$? = $ac_status" >&5
14486 (exit $ac_status); }; }; then
14487 cf_cv_unctrl_header=$cf_header
14490 echo "$as_me: failed program was:" >&5
14491 cat conftest.$ac_ext >&5
14492 cf_cv_unctrl_header=no
14494 rm -f conftest.$ac_objext conftest.$ac_ext
14498 echo "$as_me:14498: result: $cf_cv_unctrl_header" >&5
14499 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14501 case $cf_cv_unctrl_header in
14503 { echo "$as_me:14503: WARNING: unctrl.h header not found" >&5
14504 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14508 case $cf_cv_unctrl_header in
14511 cat >>confdefs.h <<\EOF
14512 #define HAVE_UNCTRL_H 1
14518 cat >>confdefs.h <<\EOF
14519 #define HAVE_NCURSES_UNCTRL_H 1
14523 (ncursesw/unctrl.h)
14525 cat >>confdefs.h <<\EOF
14526 #define HAVE_NCURSESW_UNCTRL_H 1
14533 assume_default_colors \
14560 use_default_colors \
14562 use_extended_names \
14576 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14578 echo "$as_me:14578: checking for ${cf_func}" >&5
14579 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14581 echo "${as_me:-configure}:14581: testing ${cf_func} ..." 1>&5
14583 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14584 echo $ECHO_N "(cached) $ECHO_C" >&6
14587 eval cf_result='$ac_cv_func_'$cf_func
14588 if test ".$cf_result" != ".no"; then
14589 cat >conftest.$ac_ext <<_ACEOF
14590 #line 14590 "configure"
14591 #include "confdefs.h"
14593 #ifdef HAVE_XCURSES
14594 #include <xcurses.h>
14595 char * XCursesProgramName = "test";
14597 #include <${cf_cv_ncurses_header:-curses.h}>
14598 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14599 #include <ncursesw/term.h>
14600 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14601 #include <ncurses/term.h>
14602 #elif defined(HAVE_TERM_H)
14612 long foo = (long)(&${cf_func});
14613 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14614 if (foo + 1234 > 5678)
14615 ${cf_cv_main_return:-return}(foo);
14622 rm -f conftest.$ac_objext conftest$ac_exeext
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624 (eval $ac_link) 2>&5
14626 echo "$as_me:14626: \$? = $ac_status" >&5
14627 (exit $ac_status); } &&
14628 { ac_try='test -s conftest$ac_exeext'
14629 { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630 (eval $ac_try) 2>&5
14632 echo "$as_me:14632: \$? = $ac_status" >&5
14633 (exit $ac_status); }; }; then
14636 echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14642 eval 'cf_cv_func_'$cf_func'=$cf_result'
14646 # use the computed/retrieved cache-value:
14647 eval 'cf_result=$cf_cv_func_'$cf_func
14648 echo "$as_me:14648: result: $cf_result" >&5
14649 echo "${ECHO_T}$cf_result" >&6
14650 if test $cf_result != no; then
14651 cat >>confdefs.h <<EOF
14652 #define HAVE_${cf_tr_func} 1
14658 for cf_func in tputs
14661 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14663 echo "$as_me:14663: checking for ${cf_func}" >&5
14664 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14666 echo "${as_me:-configure}:14666: testing ${cf_func} ..." 1>&5
14668 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14669 echo $ECHO_N "(cached) $ECHO_C" >&6
14672 eval cf_result='$ac_cv_func_'$cf_func
14673 if test ".$cf_result" != ".no"; then
14674 cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14678 #ifdef HAVE_XCURSES
14679 #include <xcurses.h>
14680 char * XCursesProgramName = "test";
14682 #include <${cf_cv_ncurses_header:-curses.h}>
14683 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14684 #include <ncursesw/term.h>
14685 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14686 #include <ncurses/term.h>
14687 #elif defined(HAVE_TERM_H)
14697 long foo = (long)(&${cf_func});
14698 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14699 if (foo + 1234 > 5678)
14700 ${cf_cv_main_return:-return}(foo);
14707 rm -f conftest.$ac_objext conftest$ac_exeext
14708 if { (eval echo "$as_me:14708: \"$ac_link\"") >&5
14709 (eval $ac_link) 2>&5
14711 echo "$as_me:14711: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
14713 { ac_try='test -s conftest$ac_exeext'
14714 { (eval echo "$as_me:14714: \"$ac_try\"") >&5
14715 (eval $ac_try) 2>&5
14717 echo "$as_me:14717: \$? = $ac_status" >&5
14718 (exit $ac_status); }; }; then
14721 echo "$as_me: failed program was:" >&5
14722 cat conftest.$ac_ext >&5
14725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14727 eval 'cf_cv_func_'$cf_func'=$cf_result'
14731 # use the computed/retrieved cache-value:
14732 eval 'cf_result=$cf_cv_func_'$cf_func
14733 echo "$as_me:14733: result: $cf_result" >&5
14734 echo "${ECHO_T}$cf_result" >&6
14735 if test $cf_result != no; then
14736 cat >>confdefs.h <<EOF
14737 #define HAVE_${cf_tr_func} 1
14743 if test x$cf_cv_func_tputs = xyes
14746 for cf_arg in int char
14748 for cf_ret in int void
14750 if test $cf_ret = void
14752 cf_return="/* nothing */"
14754 cf_return="return value"
14756 cat >conftest.$ac_ext <<_ACEOF
14757 #line 14757 "configure"
14758 #include "confdefs.h"
14760 #include <${cf_cv_ncurses_header:-curses.h}>
14761 #include <$cf_cv_term_header>
14763 static $cf_ret outc($cf_arg value) { $cf_return; }
14769 tputs("hello", 0, outc);
14770 ${cf_cv_main_return:-return}(0);
14776 rm -f conftest.$ac_objext
14777 if { (eval echo "$as_me:14777: \"$ac_compile\"") >&5
14778 (eval $ac_compile) 2>&5
14780 echo "$as_me:14780: \$? = $ac_status" >&5
14781 (exit $ac_status); } &&
14782 { ac_try='test -s conftest.$ac_objext'
14783 { (eval echo "$as_me:14783: \"$ac_try\"") >&5
14784 (eval $ac_try) 2>&5
14786 echo "$as_me:14786: \$? = $ac_status" >&5
14787 (exit $ac_status); }; }; then
14789 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14791 echo "${as_me:-configure}:14791: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14793 cat >>confdefs.h <<EOF
14794 #define TPUTS_ARG $cf_arg
14795 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14796 #define TPUTS_RETURN(value) $cf_return
14802 echo "$as_me: failed program was:" >&5
14803 cat conftest.$ac_ext >&5
14805 rm -f conftest.$ac_objext conftest.$ac_ext
14807 test $cf_done = yes && break
14811 echo "$as_me:14811: checking for ncurses extended functions" >&5
14812 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14813 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14814 echo $ECHO_N "(cached) $ECHO_C" >&6
14817 cat >conftest.$ac_ext <<_ACEOF
14818 #line 14818 "configure"
14819 #include "confdefs.h"
14821 #include <${cf_cv_ncurses_header:-curses.h}>
14826 int x = NCURSES_EXT_FUNCS
14832 rm -f conftest.$ac_objext
14833 if { (eval echo "$as_me:14833: \"$ac_compile\"") >&5
14834 (eval $ac_compile) 2>&5
14836 echo "$as_me:14836: \$? = $ac_status" >&5
14837 (exit $ac_status); } &&
14838 { ac_try='test -s conftest.$ac_objext'
14839 { (eval echo "$as_me:14839: \"$ac_try\"") >&5
14840 (eval $ac_try) 2>&5
14842 echo "$as_me:14842: \$? = $ac_status" >&5
14843 (exit $ac_status); }; }; then
14844 cf_cv_ncurses_ext_funcs=defined
14846 echo "$as_me: failed program was:" >&5
14847 cat conftest.$ac_ext >&5
14849 cat >conftest.$ac_ext <<_ACEOF
14850 #line 14850 "configure"
14851 #include "confdefs.h"
14853 #include <${cf_cv_ncurses_header:-curses.h}>
14858 (void) assume_default_colors (0, 0);
14859 (void) curses_version ();
14860 (void) define_key (0, 0);
14861 (void) is_term_resized (0, 0);
14862 (void) key_defined (0);
14863 (void) keybound (0, 0);
14864 (void) keyok (0, 0);
14865 (void) resize_term (0, 0);
14866 (void) resizeterm (0, 0);
14867 (void) use_default_colors ();
14868 (void) use_extended_names (0);
14869 (void) wresize (0, 0, 0);
14874 rm -f conftest.$ac_objext conftest$ac_exeext
14875 if { (eval echo "$as_me:14875: \"$ac_link\"") >&5
14876 (eval $ac_link) 2>&5
14878 echo "$as_me:14878: \$? = $ac_status" >&5
14879 (exit $ac_status); } &&
14880 { ac_try='test -s conftest$ac_exeext'
14881 { (eval echo "$as_me:14881: \"$ac_try\"") >&5
14882 (eval $ac_try) 2>&5
14884 echo "$as_me:14884: \$? = $ac_status" >&5
14885 (exit $ac_status); }; }; then
14886 cf_cv_ncurses_ext_funcs=yes
14888 echo "$as_me: failed program was:" >&5
14889 cat conftest.$ac_ext >&5
14890 cf_cv_ncurses_ext_funcs=no
14892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14895 rm -f conftest.$ac_objext conftest.$ac_ext
14898 echo "$as_me:14898: result: $cf_cv_ncurses_ext_funcs" >&5
14899 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14900 test "$cf_cv_ncurses_ext_funcs" = yes &&
14901 cat >>confdefs.h <<\EOF
14902 #define NCURSES_EXT_FUNCS 1
14905 if test "$cf_enable_widec" = yes
14907 # workaround for systems with ncurses before 20111029, due to change of
14908 # feature test macro from _XPG5 to _XOPEN_SOURCE
14909 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14912 echo "$as_me:14912: checking if _XPG5 should be defined to enable wide-characters" >&5
14913 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14915 cat >conftest.$ac_ext <<_ACEOF
14916 #line 14916 "configure"
14917 #include "confdefs.h"
14919 #include <${cf_cv_ncurses_header:-curses.h}>
14928 rm -f conftest.$ac_objext
14929 if { (eval echo "$as_me:14929: \"$ac_compile\"") >&5
14930 (eval $ac_compile) 2>&5
14932 echo "$as_me:14932: \$? = $ac_status" >&5
14933 (exit $ac_status); } &&
14934 { ac_try='test -s conftest.$ac_objext'
14935 { (eval echo "$as_me:14935: \"$ac_try\"") >&5
14936 (eval $ac_try) 2>&5
14938 echo "$as_me:14938: \$? = $ac_status" >&5
14939 (exit $ac_status); }; }; then
14942 echo "$as_me: failed program was:" >&5
14943 cat conftest.$ac_ext >&5
14944 cf_save_cppflags="$CPPFLAGS"
14945 CPPFLAGS="$CPPFLAGS -D_XPG5"
14946 cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14950 #include <${cf_cv_ncurses_header:-curses.h}>
14959 rm -f conftest.$ac_objext
14960 if { (eval echo "$as_me:14960: \"$ac_compile\"") >&5
14961 (eval $ac_compile) 2>&5
14963 echo "$as_me:14963: \$? = $ac_status" >&5
14964 (exit $ac_status); } &&
14965 { ac_try='test -s conftest.$ac_objext'
14966 { (eval echo "$as_me:14966: \"$ac_try\"") >&5
14967 (eval $ac_try) 2>&5
14969 echo "$as_me:14969: \$? = $ac_status" >&5
14970 (exit $ac_status); }; }; then
14973 echo "$as_me: failed program was:" >&5
14974 cat conftest.$ac_ext >&5
14976 rm -f conftest.$ac_objext conftest.$ac_ext
14977 CPPFLAGS="$cf_save_cppflags"
14979 rm -f conftest.$ac_objext conftest.$ac_ext
14980 echo "$as_me:14980: result: $cf_define_xpg5" >&5
14981 echo "${ECHO_T}$cf_define_xpg5" >&6
14983 if test "$cf_define_xpg5" = yes
14985 CPPFLAGS="$CPPFLAGS -D_XPG5"
14989 echo "$as_me:14989: checking for wide-character functions" >&5
14990 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14991 if test "${cf_cv_widechar_funcs+set}" = set; then
14992 echo $ECHO_N "(cached) $ECHO_C" >&6
14995 cat >conftest.$ac_ext <<_ACEOF
14996 #line 14996 "configure"
14997 #include "confdefs.h"
14999 #include <${cf_cv_ncurses_header:-curses.h}>
15004 static wchar_t src_wchar[2];
15005 static cchar_t dst_cchar;
15006 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15012 rm -f conftest.$ac_objext conftest$ac_exeext
15013 if { (eval echo "$as_me:15013: \"$ac_link\"") >&5
15014 (eval $ac_link) 2>&5
15016 echo "$as_me:15016: \$? = $ac_status" >&5
15017 (exit $ac_status); } &&
15018 { ac_try='test -s conftest$ac_exeext'
15019 { (eval echo "$as_me:15019: \"$ac_try\"") >&5
15020 (eval $ac_try) 2>&5
15022 echo "$as_me:15022: \$? = $ac_status" >&5
15023 (exit $ac_status); }; }; then
15024 cf_cv_widechar_funcs=yes
15026 echo "$as_me: failed program was:" >&5
15027 cat conftest.$ac_ext >&5
15028 cf_cv_widechar_funcs=no
15030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15033 echo "$as_me:15033: result: $cf_cv_widechar_funcs" >&5
15034 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15035 if test "$cf_cv_widechar_funcs" != no ; then
15037 cat >>confdefs.h <<\EOF
15038 #define USE_WIDEC_SUPPORT 1
15042 cat >>confdefs.h <<\EOF
15043 #define USE_WIDEC_SUPPORT 0
15048 cat >>confdefs.h <<\EOF
15049 #define USE_WIDEC_SUPPORT 0
15054 echo "$as_me:15054: checking if $cf_cv_screen library uses pthreads" >&5
15055 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15056 if test "${cf_cv_use_pthreads+set}" = set; then
15057 echo $ECHO_N "(cached) $ECHO_C" >&6
15060 cat >conftest.$ac_ext <<_ACEOF
15061 #line 15061 "configure"
15062 #include "confdefs.h"
15064 #include <${cf_cv_ncurses_header:-curses.h}>
15065 extern void _nc_init_pthreads(void);
15072 _nc_init_pthreads();
15078 rm -f conftest.$ac_objext conftest$ac_exeext
15079 if { (eval echo "$as_me:15079: \"$ac_link\"") >&5
15080 (eval $ac_link) 2>&5
15082 echo "$as_me:15082: \$? = $ac_status" >&5
15083 (exit $ac_status); } &&
15084 { ac_try='test -s conftest$ac_exeext'
15085 { (eval echo "$as_me:15085: \"$ac_try\"") >&5
15086 (eval $ac_try) 2>&5
15088 echo "$as_me:15088: \$? = $ac_status" >&5
15089 (exit $ac_status); }; }; then
15090 cf_cv_use_pthreads=yes
15092 echo "$as_me: failed program was:" >&5
15093 cat conftest.$ac_ext >&5
15094 cf_cv_use_pthreads=no
15096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15099 echo "$as_me:15099: result: $cf_cv_use_pthreads" >&5
15100 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15101 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15102 #define USE_PTHREADS 1
15105 echo "$as_me:15105: checking if sys/time.h works with sys/select.h" >&5
15106 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15107 if test "${cf_cv_sys_time_select+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
15111 cat >conftest.$ac_ext <<_ACEOF
15112 #line 15112 "configure"
15113 #include "confdefs.h"
15115 #include <sys/types.h>
15116 #ifdef HAVE_SYS_TIME_H
15117 #include <sys/time.h>
15119 #ifdef HAVE_SYS_SELECT_H
15120 #include <sys/select.h>
15131 rm -f conftest.$ac_objext
15132 if { (eval echo "$as_me:15132: \"$ac_compile\"") >&5
15133 (eval $ac_compile) 2>&5
15135 echo "$as_me:15135: \$? = $ac_status" >&5
15136 (exit $ac_status); } &&
15137 { ac_try='test -s conftest.$ac_objext'
15138 { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139 (eval $ac_try) 2>&5
15141 echo "$as_me:15141: \$? = $ac_status" >&5
15142 (exit $ac_status); }; }; then
15143 cf_cv_sys_time_select=yes
15145 echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 cf_cv_sys_time_select=no
15149 rm -f conftest.$ac_objext conftest.$ac_ext
15153 echo "$as_me:15153: result: $cf_cv_sys_time_select" >&5
15154 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15155 test "$cf_cv_sys_time_select" = yes &&
15156 cat >>confdefs.h <<\EOF
15157 #define HAVE_SYS_TIME_SELECT 1
15160 # special check for test/ditto.c
15162 echo "$as_me:15162: checking for openpty in -lutil" >&5
15163 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15164 if test "${ac_cv_lib_util_openpty+set}" = set; then
15165 echo $ECHO_N "(cached) $ECHO_C" >&6
15167 ac_check_lib_save_LIBS=$LIBS
15168 LIBS="-lutil $LIBS"
15169 cat >conftest.$ac_ext <<_ACEOF
15170 #line 15170 "configure"
15171 #include "confdefs.h"
15173 /* Override any gcc2 internal prototype to avoid an error. */
15177 /* We use char because int might match the return type of a gcc2
15178 builtin and then its argument prototype would still apply. */
15188 rm -f conftest.$ac_objext conftest$ac_exeext
15189 if { (eval echo "$as_me:15189: \"$ac_link\"") >&5
15190 (eval $ac_link) 2>&5
15192 echo "$as_me:15192: \$? = $ac_status" >&5
15193 (exit $ac_status); } &&
15194 { ac_try='test -s conftest$ac_exeext'
15195 { (eval echo "$as_me:15195: \"$ac_try\"") >&5
15196 (eval $ac_try) 2>&5
15198 echo "$as_me:15198: \$? = $ac_status" >&5
15199 (exit $ac_status); }; }; then
15200 ac_cv_lib_util_openpty=yes
15202 echo "$as_me: failed program was:" >&5
15203 cat conftest.$ac_ext >&5
15204 ac_cv_lib_util_openpty=no
15206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15207 LIBS=$ac_check_lib_save_LIBS
15209 echo "$as_me:15209: result: $ac_cv_lib_util_openpty" >&5
15210 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15211 if test $ac_cv_lib_util_openpty = yes; then
15217 echo "$as_me:15217: checking for openpty header" >&5
15218 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15219 if test "${cf_cv_func_openpty+set}" = set; then
15220 echo $ECHO_N "(cached) $ECHO_C" >&6
15223 cf_save_LIBS="$LIBS"
15224 test $cf_cv_lib_util = yes && {
15225 cf_add_libs="-lutil"
15226 # Filter out duplicates - this happens with badly-designed ".pc" files...
15227 for cf_add_1lib in $LIBS
15229 for cf_add_2lib in $cf_add_libs
15231 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15237 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15239 LIBS="$cf_add_libs"
15241 for cf_header in pty.h libutil.h util.h
15243 cat >conftest.$ac_ext <<_ACEOF
15244 #line 15244 "configure"
15245 #include "confdefs.h"
15247 #include <$cf_header>
15253 int x = openpty((int *)0, (int *)0, (char *)0,
15254 (struct termios *)0, (struct winsize *)0);
15260 rm -f conftest.$ac_objext conftest$ac_exeext
15261 if { (eval echo "$as_me:15261: \"$ac_link\"") >&5
15262 (eval $ac_link) 2>&5
15264 echo "$as_me:15264: \$? = $ac_status" >&5
15265 (exit $ac_status); } &&
15266 { ac_try='test -s conftest$ac_exeext'
15267 { (eval echo "$as_me:15267: \"$ac_try\"") >&5
15268 (eval $ac_try) 2>&5
15270 echo "$as_me:15270: \$? = $ac_status" >&5
15271 (exit $ac_status); }; }; then
15273 cf_cv_func_openpty=$cf_header
15277 echo "$as_me: failed program was:" >&5
15278 cat conftest.$ac_ext >&5
15280 cf_cv_func_openpty=no
15283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15285 LIBS="$cf_save_LIBS"
15288 echo "$as_me:15288: result: $cf_cv_func_openpty" >&5
15289 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15291 if test "$cf_cv_func_openpty" != no ; then
15293 cat >>confdefs.h <<EOF
15294 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15297 cat >>confdefs.h <<\EOF
15298 #define USE_XTERM_PTY 1
15301 if test "x$cf_cv_lib_util" = xyes ; then
15303 cf_add_libs="-lutil"
15304 # Filter out duplicates - this happens with badly-designed ".pc" files...
15305 for cf_add_1lib in $TEST_LIBS
15307 for cf_add_2lib in $cf_add_libs
15309 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15315 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15317 TEST_LIBS="$cf_add_libs"
15322 echo "$as_me:15322: checking for function curses_version" >&5
15323 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15324 if test "${cf_cv_func_curses_version+set}" = set; then
15325 echo $ECHO_N "(cached) $ECHO_C" >&6
15328 if test "$cross_compiling" = yes; then
15329 cf_cv_func_curses_version=unknown
15331 cat >conftest.$ac_ext <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15335 #include <${cf_cv_ncurses_header:-curses.h}>
15339 sprintf(temp, "%s\n", curses_version());
15340 ${cf_cv_main_return:-return}(0);
15344 rm -f conftest$ac_exeext
15345 if { (eval echo "$as_me:15345: \"$ac_link\"") >&5
15346 (eval $ac_link) 2>&5
15348 echo "$as_me:15348: \$? = $ac_status" >&5
15349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15350 { (eval echo "$as_me:15350: \"$ac_try\"") >&5
15351 (eval $ac_try) 2>&5
15353 echo "$as_me:15353: \$? = $ac_status" >&5
15354 (exit $ac_status); }; }; then
15355 cf_cv_func_curses_version=yes
15358 echo "$as_me: program exited with status $ac_status" >&5
15359 echo "$as_me: failed program was:" >&5
15360 cat conftest.$ac_ext >&5
15361 cf_cv_func_curses_version=no
15364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15368 echo "$as_me:15368: result: $cf_cv_func_curses_version" >&5
15369 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15370 test "$cf_cv_func_curses_version" = yes &&
15371 cat >>confdefs.h <<\EOF
15372 #define HAVE_CURSES_VERSION 1
15375 echo "$as_me:15375: checking for alternate character set array" >&5
15376 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15377 if test "${cf_cv_curses_acs_map+set}" = set; then
15378 echo $ECHO_N "(cached) $ECHO_C" >&6
15381 cf_cv_curses_acs_map=unknown
15382 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15384 cat >conftest.$ac_ext <<_ACEOF
15385 #line 15385 "configure"
15386 #include "confdefs.h"
15388 #include <${cf_cv_ncurses_header:-curses.h}>
15394 $name['k'] = ACS_PLUS
15400 rm -f conftest.$ac_objext conftest$ac_exeext
15401 if { (eval echo "$as_me:15401: \"$ac_link\"") >&5
15402 (eval $ac_link) 2>&5
15404 echo "$as_me:15404: \$? = $ac_status" >&5
15405 (exit $ac_status); } &&
15406 { ac_try='test -s conftest$ac_exeext'
15407 { (eval echo "$as_me:15407: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15410 echo "$as_me:15410: \$? = $ac_status" >&5
15411 (exit $ac_status); }; }; then
15412 cf_cv_curses_acs_map=$name; break
15414 echo "$as_me: failed program was:" >&5
15415 cat conftest.$ac_ext >&5
15417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15421 echo "$as_me:15421: result: $cf_cv_curses_acs_map" >&5
15422 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15424 test "$cf_cv_curses_acs_map" != unknown &&
15425 cat >>confdefs.h <<EOF
15426 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15429 if test "$cf_enable_widec" = yes; then
15431 echo "$as_me:15431: checking for wide alternate character set array" >&5
15432 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15433 if test "${cf_cv_curses_wacs_map+set}" = set; then
15434 echo $ECHO_N "(cached) $ECHO_C" >&6
15437 cf_cv_curses_wacs_map=unknown
15438 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15440 cat >conftest.$ac_ext <<_ACEOF
15441 #line 15441 "configure"
15442 #include "confdefs.h"
15444 #ifndef _XOPEN_SOURCE_EXTENDED
15445 #define _XOPEN_SOURCE_EXTENDED
15447 #include <${cf_cv_ncurses_header:-curses.h}>
15451 void *foo = &($name['k'])
15456 rm -f conftest.$ac_objext conftest$ac_exeext
15457 if { (eval echo "$as_me:15457: \"$ac_link\"") >&5
15458 (eval $ac_link) 2>&5
15460 echo "$as_me:15460: \$? = $ac_status" >&5
15461 (exit $ac_status); } &&
15462 { ac_try='test -s conftest$ac_exeext'
15463 { (eval echo "$as_me:15463: \"$ac_try\"") >&5
15464 (eval $ac_try) 2>&5
15466 echo "$as_me:15466: \$? = $ac_status" >&5
15467 (exit $ac_status); }; }; then
15468 cf_cv_curses_wacs_map=$name
15471 echo "$as_me: failed program was:" >&5
15472 cat conftest.$ac_ext >&5
15474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15477 echo "$as_me:15477: result: $cf_cv_curses_wacs_map" >&5
15478 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15480 test "$cf_cv_curses_wacs_map" != unknown &&
15481 cat >>confdefs.h <<EOF
15482 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15485 echo "$as_me:15485: checking for wide alternate character constants" >&5
15486 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15487 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15488 echo $ECHO_N "(cached) $ECHO_C" >&6
15491 cf_cv_curses_wacs_symbols=no
15492 if test "$cf_cv_curses_wacs_map" != unknown
15494 cat >conftest.$ac_ext <<_ACEOF
15495 #line 15495 "configure"
15496 #include "confdefs.h"
15498 #ifndef _XOPEN_SOURCE_EXTENDED
15499 #define _XOPEN_SOURCE_EXTENDED
15501 #include <${cf_cv_ncurses_header:-curses.h}>
15505 cchar_t *foo = WACS_PLUS;
15506 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15511 rm -f conftest.$ac_objext conftest$ac_exeext
15512 if { (eval echo "$as_me:15512: \"$ac_link\"") >&5
15513 (eval $ac_link) 2>&5
15515 echo "$as_me:15515: \$? = $ac_status" >&5
15516 (exit $ac_status); } &&
15517 { ac_try='test -s conftest$ac_exeext'
15518 { (eval echo "$as_me:15518: \"$ac_try\"") >&5
15519 (eval $ac_try) 2>&5
15521 echo "$as_me:15521: \$? = $ac_status" >&5
15522 (exit $ac_status); }; }; then
15523 cf_cv_curses_wacs_symbols=yes
15525 echo "$as_me: failed program was:" >&5
15526 cat conftest.$ac_ext >&5
15528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15530 cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15534 #ifndef _XOPEN_SOURCE_EXTENDED
15535 #define _XOPEN_SOURCE_EXTENDED
15537 #include <${cf_cv_ncurses_header:-curses.h}>
15541 cchar_t *foo = WACS_PLUS
15546 rm -f conftest.$ac_objext conftest$ac_exeext
15547 if { (eval echo "$as_me:15547: \"$ac_link\"") >&5
15548 (eval $ac_link) 2>&5
15550 echo "$as_me:15550: \$? = $ac_status" >&5
15551 (exit $ac_status); } &&
15552 { ac_try='test -s conftest$ac_exeext'
15553 { (eval echo "$as_me:15553: \"$ac_try\"") >&5
15554 (eval $ac_try) 2>&5
15556 echo "$as_me:15556: \$? = $ac_status" >&5
15557 (exit $ac_status); }; }; then
15558 cf_cv_curses_wacs_symbols=yes
15560 echo "$as_me: failed program was:" >&5
15561 cat conftest.$ac_ext >&5
15563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15567 echo "$as_me:15567: result: $cf_cv_curses_wacs_symbols" >&5
15568 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15570 test "$cf_cv_curses_wacs_symbols" != no &&
15571 cat >>confdefs.h <<\EOF
15572 #define CURSES_WACS_SYMBOLS 1
15577 echo "$as_me:15577: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15578 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15579 cat >conftest.$ac_ext <<_ACEOF
15580 #line 15580 "configure"
15581 #include "confdefs.h"
15583 #ifndef _XOPEN_SOURCE_EXTENDED
15584 #define _XOPEN_SOURCE_EXTENDED
15586 #include <${cf_cv_ncurses_header:-curses.h}>
15597 rm -f conftest.$ac_objext
15598 if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599 (eval $ac_compile) 2>&5
15601 echo "$as_me:15601: \$? = $ac_status" >&5
15602 (exit $ac_status); } &&
15603 { ac_try='test -s conftest.$ac_objext'
15604 { (eval echo "$as_me:15604: \"$ac_try\"") >&5
15605 (eval $ac_try) 2>&5
15607 echo "$as_me:15607: \$? = $ac_status" >&5
15608 (exit $ac_status); }; }; then
15611 echo "$as_me: failed program was:" >&5
15612 cat conftest.$ac_ext >&5
15615 rm -f conftest.$ac_objext conftest.$ac_ext
15616 echo "$as_me:15616: result: $cf_result" >&5
15617 echo "${ECHO_T}$cf_result" >&6
15618 if test $cf_result = yes ; then
15620 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15622 cat >>confdefs.h <<EOF
15623 #define $cf_result 1
15628 cat >>confdefs.h <<EOF
15629 #define attr_t long
15634 if test "$cf_enable_widec" = yes; then
15636 # This is needed on Tru64 5.0 to declare mbstate_t
15637 echo "$as_me:15637: checking if we must include wchar.h to declare mbstate_t" >&5
15638 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15639 if test "${cf_cv_mbstate_t+set}" = set; then
15640 echo $ECHO_N "(cached) $ECHO_C" >&6
15643 cat >conftest.$ac_ext <<_ACEOF
15644 #line 15644 "configure"
15645 #include "confdefs.h"
15647 #include <stdlib.h>
15648 #include <stdarg.h>
15650 #ifdef HAVE_LIBUTF8_H
15651 #include <libutf8.h>
15661 rm -f conftest.$ac_objext
15662 if { (eval echo "$as_me:15662: \"$ac_compile\"") >&5
15663 (eval $ac_compile) 2>&5
15665 echo "$as_me:15665: \$? = $ac_status" >&5
15666 (exit $ac_status); } &&
15667 { ac_try='test -s conftest.$ac_objext'
15668 { (eval echo "$as_me:15668: \"$ac_try\"") >&5
15669 (eval $ac_try) 2>&5
15671 echo "$as_me:15671: \$? = $ac_status" >&5
15672 (exit $ac_status); }; }; then
15675 echo "$as_me: failed program was:" >&5
15676 cat conftest.$ac_ext >&5
15677 cat >conftest.$ac_ext <<_ACEOF
15678 #line 15678 "configure"
15679 #include "confdefs.h"
15681 #include <stdlib.h>
15682 #include <stdarg.h>
15685 #ifdef HAVE_LIBUTF8_H
15686 #include <libutf8.h>
15696 rm -f conftest.$ac_objext
15697 if { (eval echo "$as_me:15697: \"$ac_compile\"") >&5
15698 (eval $ac_compile) 2>&5
15700 echo "$as_me:15700: \$? = $ac_status" >&5
15701 (exit $ac_status); } &&
15702 { ac_try='test -s conftest.$ac_objext'
15703 { (eval echo "$as_me:15703: \"$ac_try\"") >&5
15704 (eval $ac_try) 2>&5
15706 echo "$as_me:15706: \$? = $ac_status" >&5
15707 (exit $ac_status); }; }; then
15708 cf_cv_mbstate_t=yes
15710 echo "$as_me: failed program was:" >&5
15711 cat conftest.$ac_ext >&5
15712 cf_cv_mbstate_t=unknown
15714 rm -f conftest.$ac_objext conftest.$ac_ext
15716 rm -f conftest.$ac_objext conftest.$ac_ext
15718 echo "$as_me:15718: result: $cf_cv_mbstate_t" >&5
15719 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15721 if test "$cf_cv_mbstate_t" = yes ; then
15723 cat >>confdefs.h <<\EOF
15724 #define NEED_WCHAR_H 1
15730 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15731 if test "$cf_cv_mbstate_t" = unknown ; then
15732 NCURSES_MBSTATE_T=1
15735 # if we find mbstate_t in either place, use substitution to provide a fallback.
15736 if test "$cf_cv_mbstate_t" != unknown ; then
15737 NCURSES_OK_MBSTATE_T=1
15740 # This is needed on Tru64 5.0 to declare wchar_t
15741 echo "$as_me:15741: checking if we must include wchar.h to declare wchar_t" >&5
15742 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15743 if test "${cf_cv_wchar_t+set}" = set; then
15744 echo $ECHO_N "(cached) $ECHO_C" >&6
15747 cat >conftest.$ac_ext <<_ACEOF
15748 #line 15748 "configure"
15749 #include "confdefs.h"
15751 #include <stdlib.h>
15752 #include <stdarg.h>
15754 #ifdef HAVE_LIBUTF8_H
15755 #include <libutf8.h>
15765 rm -f conftest.$ac_objext
15766 if { (eval echo "$as_me:15766: \"$ac_compile\"") >&5
15767 (eval $ac_compile) 2>&5
15769 echo "$as_me:15769: \$? = $ac_status" >&5
15770 (exit $ac_status); } &&
15771 { ac_try='test -s conftest.$ac_objext'
15772 { (eval echo "$as_me:15772: \"$ac_try\"") >&5
15773 (eval $ac_try) 2>&5
15775 echo "$as_me:15775: \$? = $ac_status" >&5
15776 (exit $ac_status); }; }; then
15779 echo "$as_me: failed program was:" >&5
15780 cat conftest.$ac_ext >&5
15781 cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15785 #include <stdlib.h>
15786 #include <stdarg.h>
15789 #ifdef HAVE_LIBUTF8_H
15790 #include <libutf8.h>
15800 rm -f conftest.$ac_objext
15801 if { (eval echo "$as_me:15801: \"$ac_compile\"") >&5
15802 (eval $ac_compile) 2>&5
15804 echo "$as_me:15804: \$? = $ac_status" >&5
15805 (exit $ac_status); } &&
15806 { ac_try='test -s conftest.$ac_objext'
15807 { (eval echo "$as_me:15807: \"$ac_try\"") >&5
15808 (eval $ac_try) 2>&5
15810 echo "$as_me:15810: \$? = $ac_status" >&5
15811 (exit $ac_status); }; }; then
15814 echo "$as_me: failed program was:" >&5
15815 cat conftest.$ac_ext >&5
15816 cf_cv_wchar_t=unknown
15818 rm -f conftest.$ac_objext conftest.$ac_ext
15820 rm -f conftest.$ac_objext conftest.$ac_ext
15822 echo "$as_me:15822: result: $cf_cv_wchar_t" >&5
15823 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15825 if test "$cf_cv_wchar_t" = yes ; then
15827 cat >>confdefs.h <<\EOF
15828 #define NEED_WCHAR_H 1
15834 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15835 if test "$cf_cv_wchar_t" = unknown ; then
15839 # if we find wchar_t in either place, use substitution to provide a fallback.
15840 if test "$cf_cv_wchar_t" != unknown ; then
15841 NCURSES_OK_WCHAR_T=1
15844 # This is needed on Tru64 5.0 to declare wint_t
15845 echo "$as_me:15845: checking if we must include wchar.h to declare wint_t" >&5
15846 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15847 if test "${cf_cv_wint_t+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
15851 cat >conftest.$ac_ext <<_ACEOF
15852 #line 15852 "configure"
15853 #include "confdefs.h"
15855 #include <stdlib.h>
15856 #include <stdarg.h>
15858 #ifdef HAVE_LIBUTF8_H
15859 #include <libutf8.h>
15869 rm -f conftest.$ac_objext
15870 if { (eval echo "$as_me:15870: \"$ac_compile\"") >&5
15871 (eval $ac_compile) 2>&5
15873 echo "$as_me:15873: \$? = $ac_status" >&5
15874 (exit $ac_status); } &&
15875 { ac_try='test -s conftest.$ac_objext'
15876 { (eval echo "$as_me:15876: \"$ac_try\"") >&5
15877 (eval $ac_try) 2>&5
15879 echo "$as_me:15879: \$? = $ac_status" >&5
15880 (exit $ac_status); }; }; then
15883 echo "$as_me: failed program was:" >&5
15884 cat conftest.$ac_ext >&5
15885 cat >conftest.$ac_ext <<_ACEOF
15886 #line 15886 "configure"
15887 #include "confdefs.h"
15889 #include <stdlib.h>
15890 #include <stdarg.h>
15893 #ifdef HAVE_LIBUTF8_H
15894 #include <libutf8.h>
15904 rm -f conftest.$ac_objext
15905 if { (eval echo "$as_me:15905: \"$ac_compile\"") >&5
15906 (eval $ac_compile) 2>&5
15908 echo "$as_me:15908: \$? = $ac_status" >&5
15909 (exit $ac_status); } &&
15910 { ac_try='test -s conftest.$ac_objext'
15911 { (eval echo "$as_me:15911: \"$ac_try\"") >&5
15912 (eval $ac_try) 2>&5
15914 echo "$as_me:15914: \$? = $ac_status" >&5
15915 (exit $ac_status); }; }; then
15918 echo "$as_me: failed program was:" >&5
15919 cat conftest.$ac_ext >&5
15920 cf_cv_wint_t=unknown
15922 rm -f conftest.$ac_objext conftest.$ac_ext
15924 rm -f conftest.$ac_objext conftest.$ac_ext
15926 echo "$as_me:15926: result: $cf_cv_wint_t" >&5
15927 echo "${ECHO_T}$cf_cv_wint_t" >&6
15929 if test "$cf_cv_wint_t" = yes ; then
15931 cat >>confdefs.h <<\EOF
15932 #define NEED_WCHAR_H 1
15938 # if we do not find wint_t in either place, use substitution to provide a fallback.
15939 if test "$cf_cv_wint_t" = unknown ; then
15943 # if we find wint_t in either place, use substitution to provide a fallback.
15944 if test "$cf_cv_wint_t" != unknown ; then
15945 NCURSES_OK_WINT_T=1
15948 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15950 echo "$as_me:15950: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15951 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15952 cat >conftest.$ac_ext <<_ACEOF
15953 #line 15953 "configure"
15954 #include "confdefs.h"
15956 #ifndef _XOPEN_SOURCE_EXTENDED
15957 #define _XOPEN_SOURCE_EXTENDED
15959 #include <${cf_cv_ncurses_header:-curses.h}>
15970 rm -f conftest.$ac_objext
15971 if { (eval echo "$as_me:15971: \"$ac_compile\"") >&5
15972 (eval $ac_compile) 2>&5
15974 echo "$as_me:15974: \$? = $ac_status" >&5
15975 (exit $ac_status); } &&
15976 { ac_try='test -s conftest.$ac_objext'
15977 { (eval echo "$as_me:15977: \"$ac_try\"") >&5
15978 (eval $ac_try) 2>&5
15980 echo "$as_me:15980: \$? = $ac_status" >&5
15981 (exit $ac_status); }; }; then
15984 echo "$as_me: failed program was:" >&5
15985 cat conftest.$ac_ext >&5
15988 rm -f conftest.$ac_objext conftest.$ac_ext
15989 echo "$as_me:15989: result: $cf_result" >&5
15990 echo "${ECHO_T}$cf_result" >&6
15991 if test $cf_result = yes ; then
15993 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15995 cat >>confdefs.h <<EOF
15996 #define $cf_result 1
16001 cat >>confdefs.h <<EOF
16002 #define mbstate_t long
16009 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16011 echo "$as_me:16011: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16012 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16013 cat >conftest.$ac_ext <<_ACEOF
16014 #line 16014 "configure"
16015 #include "confdefs.h"
16017 #ifndef _XOPEN_SOURCE_EXTENDED
16018 #define _XOPEN_SOURCE_EXTENDED
16020 #include <${cf_cv_ncurses_header:-curses.h}>
16031 rm -f conftest.$ac_objext
16032 if { (eval echo "$as_me:16032: \"$ac_compile\"") >&5
16033 (eval $ac_compile) 2>&5
16035 echo "$as_me:16035: \$? = $ac_status" >&5
16036 (exit $ac_status); } &&
16037 { ac_try='test -s conftest.$ac_objext'
16038 { (eval echo "$as_me:16038: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16041 echo "$as_me:16041: \$? = $ac_status" >&5
16042 (exit $ac_status); }; }; then
16045 echo "$as_me: failed program was:" >&5
16046 cat conftest.$ac_ext >&5
16049 rm -f conftest.$ac_objext conftest.$ac_ext
16050 echo "$as_me:16050: result: $cf_result" >&5
16051 echo "${ECHO_T}$cf_result" >&6
16052 if test $cf_result = yes ; then
16054 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16056 cat >>confdefs.h <<EOF
16057 #define $cf_result 1
16062 cat >>confdefs.h <<EOF
16063 #define wchar_t long
16070 if test "$NCURSES_OK_WINT_T" = 0 ; then
16072 echo "$as_me:16072: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16073 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16074 cat >conftest.$ac_ext <<_ACEOF
16075 #line 16075 "configure"
16076 #include "confdefs.h"
16078 #ifndef _XOPEN_SOURCE_EXTENDED
16079 #define _XOPEN_SOURCE_EXTENDED
16081 #include <${cf_cv_ncurses_header:-curses.h}>
16092 rm -f conftest.$ac_objext
16093 if { (eval echo "$as_me:16093: \"$ac_compile\"") >&5
16094 (eval $ac_compile) 2>&5
16096 echo "$as_me:16096: \$? = $ac_status" >&5
16097 (exit $ac_status); } &&
16098 { ac_try='test -s conftest.$ac_objext'
16099 { (eval echo "$as_me:16099: \"$ac_try\"") >&5
16100 (eval $ac_try) 2>&5
16102 echo "$as_me:16102: \$? = $ac_status" >&5
16103 (exit $ac_status); }; }; then
16106 echo "$as_me: failed program was:" >&5
16107 cat conftest.$ac_ext >&5
16110 rm -f conftest.$ac_objext conftest.$ac_ext
16111 echo "$as_me:16111: result: $cf_result" >&5
16112 echo "${ECHO_T}$cf_result" >&6
16113 if test $cf_result = yes ; then
16115 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16117 cat >>confdefs.h <<EOF
16118 #define $cf_result 1
16123 cat >>confdefs.h <<EOF
16124 #define wint_t long
16132 echo "$as_me:16132: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16133 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16135 cat >conftest.$ac_ext <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16139 #ifdef HAVE_XCURSES
16140 #include <xcurses.h>
16141 char * XCursesProgramName = "test";
16143 #include <${cf_cv_ncurses_header:-curses.h}>
16144 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16145 #include <ncursesw/term.h>
16146 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16147 #include <ncurses/term.h>
16148 #elif defined(HAVE_TERM_H)
16157 void *foo = &(ospeed)
16163 rm -f conftest.$ac_objext
16164 if { (eval echo "$as_me:16164: \"$ac_compile\"") >&5
16165 (eval $ac_compile) 2>&5
16167 echo "$as_me:16167: \$? = $ac_status" >&5
16168 (exit $ac_status); } &&
16169 { ac_try='test -s conftest.$ac_objext'
16170 { (eval echo "$as_me:16170: \"$ac_try\"") >&5
16171 (eval $ac_try) 2>&5
16173 echo "$as_me:16173: \$? = $ac_status" >&5
16174 (exit $ac_status); }; }; then
16177 echo "$as_me: failed program was:" >&5
16178 cat conftest.$ac_ext >&5
16181 rm -f conftest.$ac_objext conftest.$ac_ext
16182 echo "$as_me:16182: result: $cf_result" >&5
16183 echo "${ECHO_T}$cf_result" >&6
16185 if test $cf_result = yes ; then
16187 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16189 cat >>confdefs.h <<EOF
16190 #define $cf_result 1
16194 echo "$as_me:16194: checking for data ospeed in library" >&5
16195 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16196 # BSD linkers insist on making weak linkage, but resolve at runtime.
16197 if test "$cross_compiling" = yes; then
16200 cat >conftest.$ac_ext <<_ACEOF
16201 #line 16201 "configure"
16202 #include "confdefs.h"
16204 #ifdef HAVE_XCURSES
16205 #include <xcurses.h>
16206 char * XCursesProgramName = "test";
16208 #include <${cf_cv_ncurses_header:-curses.h}>
16209 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16210 #include <ncursesw/term.h>
16211 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16212 #include <ncurses/term.h>
16213 #elif defined(HAVE_TERM_H)
16218 extern char ospeed;
16224 void *foo = &(ospeed);
16225 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16226 ${cf_cv_main_return:-return}(foo == 0);
16233 rm -f conftest.$ac_objext conftest$ac_exeext
16234 if { (eval echo "$as_me:16234: \"$ac_link\"") >&5
16235 (eval $ac_link) 2>&5
16237 echo "$as_me:16237: \$? = $ac_status" >&5
16238 (exit $ac_status); } &&
16239 { ac_try='test -s conftest$ac_exeext'
16240 { (eval echo "$as_me:16240: \"$ac_try\"") >&5
16241 (eval $ac_try) 2>&5
16243 echo "$as_me:16243: \$? = $ac_status" >&5
16244 (exit $ac_status); }; }; then
16247 echo "$as_me: failed program was:" >&5
16248 cat conftest.$ac_ext >&5
16251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16254 cat >conftest.$ac_ext <<_ACEOF
16255 #line 16255 "configure"
16256 #include "confdefs.h"
16258 #ifdef HAVE_XCURSES
16259 #include <xcurses.h>
16260 char * XCursesProgramName = "test";
16262 #include <${cf_cv_ncurses_header:-curses.h}>
16263 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16264 #include <ncursesw/term.h>
16265 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16266 #include <ncurses/term.h>
16267 #elif defined(HAVE_TERM_H)
16272 extern char ospeed;
16275 void *foo = &(ospeed);
16276 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16277 ${cf_cv_main_return:-return}(foo == 0);
16280 rm -f conftest$ac_exeext
16281 if { (eval echo "$as_me:16281: \"$ac_link\"") >&5
16282 (eval $ac_link) 2>&5
16284 echo "$as_me:16284: \$? = $ac_status" >&5
16285 (exit $ac_status); } && { ac_try='./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: program exited with status $ac_status" >&5
16294 echo "$as_me: failed program was:" >&5
16295 cat conftest.$ac_ext >&5
16298 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16300 echo "$as_me:16300: result: $cf_result" >&5
16301 echo "${ECHO_T}$cf_result" >&6
16302 if test $cf_result = yes ; then
16304 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16306 cat >>confdefs.h <<EOF
16307 #define $cf_result 1
16313 echo "$as_me:16313: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16314 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16316 cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16320 #ifdef HAVE_XCURSES
16321 #include <xcurses.h>
16322 char * XCursesProgramName = "test";
16324 #include <${cf_cv_ncurses_header:-curses.h}>
16325 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16326 #include <ncursesw/term.h>
16327 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16328 #include <ncurses/term.h>
16329 #elif defined(HAVE_TERM_H)
16338 void *foo = &(boolnames)
16344 rm -f conftest.$ac_objext
16345 if { (eval echo "$as_me:16345: \"$ac_compile\"") >&5
16346 (eval $ac_compile) 2>&5
16348 echo "$as_me:16348: \$? = $ac_status" >&5
16349 (exit $ac_status); } &&
16350 { ac_try='test -s conftest.$ac_objext'
16351 { (eval echo "$as_me:16351: \"$ac_try\"") >&5
16352 (eval $ac_try) 2>&5
16354 echo "$as_me:16354: \$? = $ac_status" >&5
16355 (exit $ac_status); }; }; then
16358 echo "$as_me: failed program was:" >&5
16359 cat conftest.$ac_ext >&5
16362 rm -f conftest.$ac_objext conftest.$ac_ext
16363 echo "$as_me:16363: result: $cf_result" >&5
16364 echo "${ECHO_T}$cf_result" >&6
16366 if test $cf_result = yes ; then
16368 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16370 cat >>confdefs.h <<EOF
16371 #define $cf_result 1
16375 echo "$as_me:16375: checking for data boolnames in library" >&5
16376 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16377 # BSD linkers insist on making weak linkage, but resolve at runtime.
16378 if test "$cross_compiling" = yes; then
16381 cat >conftest.$ac_ext <<_ACEOF
16382 #line 16382 "configure"
16383 #include "confdefs.h"
16385 #ifdef HAVE_XCURSES
16386 #include <xcurses.h>
16387 char * XCursesProgramName = "test";
16389 #include <${cf_cv_ncurses_header:-curses.h}>
16390 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16391 #include <ncursesw/term.h>
16392 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16393 #include <ncurses/term.h>
16394 #elif defined(HAVE_TERM_H)
16399 extern char boolnames;
16405 void *foo = &(boolnames);
16406 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16407 ${cf_cv_main_return:-return}(foo == 0);
16414 rm -f conftest.$ac_objext conftest$ac_exeext
16415 if { (eval echo "$as_me:16415: \"$ac_link\"") >&5
16416 (eval $ac_link) 2>&5
16418 echo "$as_me:16418: \$? = $ac_status" >&5
16419 (exit $ac_status); } &&
16420 { ac_try='test -s conftest$ac_exeext'
16421 { (eval echo "$as_me:16421: \"$ac_try\"") >&5
16422 (eval $ac_try) 2>&5
16424 echo "$as_me:16424: \$? = $ac_status" >&5
16425 (exit $ac_status); }; }; then
16428 echo "$as_me: failed program was:" >&5
16429 cat conftest.$ac_ext >&5
16432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16435 cat >conftest.$ac_ext <<_ACEOF
16436 #line 16436 "configure"
16437 #include "confdefs.h"
16439 #ifdef HAVE_XCURSES
16440 #include <xcurses.h>
16441 char * XCursesProgramName = "test";
16443 #include <${cf_cv_ncurses_header:-curses.h}>
16444 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16445 #include <ncursesw/term.h>
16446 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16447 #include <ncurses/term.h>
16448 #elif defined(HAVE_TERM_H)
16453 extern char boolnames;
16456 void *foo = &(boolnames);
16457 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16458 ${cf_cv_main_return:-return}(foo == 0);
16461 rm -f conftest$ac_exeext
16462 if { (eval echo "$as_me:16462: \"$ac_link\"") >&5
16463 (eval $ac_link) 2>&5
16465 echo "$as_me:16465: \$? = $ac_status" >&5
16466 (exit $ac_status); } && { ac_try='./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: program exited with status $ac_status" >&5
16475 echo "$as_me: failed program was:" >&5
16476 cat conftest.$ac_ext >&5
16479 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16481 echo "$as_me:16481: result: $cf_result" >&5
16482 echo "${ECHO_T}$cf_result" >&6
16483 if test $cf_result = yes ; then
16485 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16487 cat >>confdefs.h <<EOF
16488 #define $cf_result 1
16494 echo "$as_me:16494: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16495 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16497 cat >conftest.$ac_ext <<_ACEOF
16498 #line 16498 "configure"
16499 #include "confdefs.h"
16501 #ifdef HAVE_XCURSES
16502 #include <xcurses.h>
16503 char * XCursesProgramName = "test";
16505 #include <${cf_cv_ncurses_header:-curses.h}>
16506 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16507 #include <ncursesw/term.h>
16508 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16509 #include <ncurses/term.h>
16510 #elif defined(HAVE_TERM_H)
16519 void *foo = &(boolfnames)
16525 rm -f conftest.$ac_objext
16526 if { (eval echo "$as_me:16526: \"$ac_compile\"") >&5
16527 (eval $ac_compile) 2>&5
16529 echo "$as_me:16529: \$? = $ac_status" >&5
16530 (exit $ac_status); } &&
16531 { ac_try='test -s conftest.$ac_objext'
16532 { (eval echo "$as_me:16532: \"$ac_try\"") >&5
16533 (eval $ac_try) 2>&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit $ac_status); }; }; then
16539 echo "$as_me: failed program was:" >&5
16540 cat conftest.$ac_ext >&5
16543 rm -f conftest.$ac_objext conftest.$ac_ext
16544 echo "$as_me:16544: result: $cf_result" >&5
16545 echo "${ECHO_T}$cf_result" >&6
16547 if test $cf_result = yes ; then
16549 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16551 cat >>confdefs.h <<EOF
16552 #define $cf_result 1
16556 echo "$as_me:16556: checking for data boolfnames in library" >&5
16557 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16558 # BSD linkers insist on making weak linkage, but resolve at runtime.
16559 if test "$cross_compiling" = yes; then
16562 cat >conftest.$ac_ext <<_ACEOF
16563 #line 16563 "configure"
16564 #include "confdefs.h"
16566 #ifdef HAVE_XCURSES
16567 #include <xcurses.h>
16568 char * XCursesProgramName = "test";
16570 #include <${cf_cv_ncurses_header:-curses.h}>
16571 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16572 #include <ncursesw/term.h>
16573 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16574 #include <ncurses/term.h>
16575 #elif defined(HAVE_TERM_H)
16580 extern char boolfnames;
16586 void *foo = &(boolfnames);
16587 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16588 ${cf_cv_main_return:-return}(foo == 0);
16595 rm -f conftest.$ac_objext conftest$ac_exeext
16596 if { (eval echo "$as_me:16596: \"$ac_link\"") >&5
16597 (eval $ac_link) 2>&5
16599 echo "$as_me:16599: \$? = $ac_status" >&5
16600 (exit $ac_status); } &&
16601 { ac_try='test -s conftest$ac_exeext'
16602 { (eval echo "$as_me:16602: \"$ac_try\"") >&5
16603 (eval $ac_try) 2>&5
16605 echo "$as_me:16605: \$? = $ac_status" >&5
16606 (exit $ac_status); }; }; then
16609 echo "$as_me: failed program was:" >&5
16610 cat conftest.$ac_ext >&5
16613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16616 cat >conftest.$ac_ext <<_ACEOF
16617 #line 16617 "configure"
16618 #include "confdefs.h"
16620 #ifdef HAVE_XCURSES
16621 #include <xcurses.h>
16622 char * XCursesProgramName = "test";
16624 #include <${cf_cv_ncurses_header:-curses.h}>
16625 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16626 #include <ncursesw/term.h>
16627 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16628 #include <ncurses/term.h>
16629 #elif defined(HAVE_TERM_H)
16634 extern char boolfnames;
16637 void *foo = &(boolfnames);
16638 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16639 ${cf_cv_main_return:-return}(foo == 0);
16642 rm -f conftest$ac_exeext
16643 if { (eval echo "$as_me:16643: \"$ac_link\"") >&5
16644 (eval $ac_link) 2>&5
16646 echo "$as_me:16646: \$? = $ac_status" >&5
16647 (exit $ac_status); } && { ac_try='./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: program exited with status $ac_status" >&5
16656 echo "$as_me: failed program was:" >&5
16657 cat conftest.$ac_ext >&5
16660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16662 echo "$as_me:16662: result: $cf_result" >&5
16663 echo "${ECHO_T}$cf_result" >&6
16664 if test $cf_result = yes ; then
16666 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16668 cat >>confdefs.h <<EOF
16669 #define $cf_result 1
16675 echo "$as_me:16675: checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16676 echo $ECHO_N "checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16678 cat >conftest.$ac_ext <<_ACEOF
16679 #line 16679 "configure"
16680 #include "confdefs.h"
16682 #ifdef HAVE_XCURSES
16683 #include <xcurses.h>
16684 char * XCursesProgramName = "test";
16686 #include <${cf_cv_ncurses_header:-curses.h}>
16687 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16688 #include <ncursesw/term.h>
16689 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16690 #include <ncurses/term.h>
16691 #elif defined(HAVE_TERM_H)
16700 void *foo = &(ttytype)
16706 rm -f conftest.$ac_objext
16707 if { (eval echo "$as_me:16707: \"$ac_compile\"") >&5
16708 (eval $ac_compile) 2>&5
16710 echo "$as_me:16710: \$? = $ac_status" >&5
16711 (exit $ac_status); } &&
16712 { ac_try='test -s conftest.$ac_objext'
16713 { (eval echo "$as_me:16713: \"$ac_try\"") >&5
16714 (eval $ac_try) 2>&5
16716 echo "$as_me:16716: \$? = $ac_status" >&5
16717 (exit $ac_status); }; }; then
16720 echo "$as_me: failed program was:" >&5
16721 cat conftest.$ac_ext >&5
16724 rm -f conftest.$ac_objext conftest.$ac_ext
16725 echo "$as_me:16725: result: $cf_result" >&5
16726 echo "${ECHO_T}$cf_result" >&6
16728 if test $cf_result = yes ; then
16730 cf_result=`echo "have_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16732 cat >>confdefs.h <<EOF
16733 #define $cf_result 1
16737 echo "$as_me:16737: checking for data ttytype in library" >&5
16738 echo $ECHO_N "checking for data ttytype in library... $ECHO_C" >&6
16739 # BSD linkers insist on making weak linkage, but resolve at runtime.
16740 if test "$cross_compiling" = yes; then
16743 cat >conftest.$ac_ext <<_ACEOF
16744 #line 16744 "configure"
16745 #include "confdefs.h"
16747 #ifdef HAVE_XCURSES
16748 #include <xcurses.h>
16749 char * XCursesProgramName = "test";
16751 #include <${cf_cv_ncurses_header:-curses.h}>
16752 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16753 #include <ncursesw/term.h>
16754 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16755 #include <ncurses/term.h>
16756 #elif defined(HAVE_TERM_H)
16761 extern char ttytype;
16767 void *foo = &(ttytype);
16768 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16769 ${cf_cv_main_return:-return}(foo == 0);
16776 rm -f conftest.$ac_objext conftest$ac_exeext
16777 if { (eval echo "$as_me:16777: \"$ac_link\"") >&5
16778 (eval $ac_link) 2>&5
16780 echo "$as_me:16780: \$? = $ac_status" >&5
16781 (exit $ac_status); } &&
16782 { ac_try='test -s conftest$ac_exeext'
16783 { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784 (eval $ac_try) 2>&5
16786 echo "$as_me:16786: \$? = $ac_status" >&5
16787 (exit $ac_status); }; }; then
16790 echo "$as_me: failed program was:" >&5
16791 cat conftest.$ac_ext >&5
16794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16797 cat >conftest.$ac_ext <<_ACEOF
16798 #line 16798 "configure"
16799 #include "confdefs.h"
16801 #ifdef HAVE_XCURSES
16802 #include <xcurses.h>
16803 char * XCursesProgramName = "test";
16805 #include <${cf_cv_ncurses_header:-curses.h}>
16806 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16807 #include <ncursesw/term.h>
16808 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16809 #include <ncurses/term.h>
16810 #elif defined(HAVE_TERM_H)
16815 extern char ttytype;
16818 void *foo = &(ttytype);
16819 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
16820 ${cf_cv_main_return:-return}(foo == 0);
16823 rm -f conftest$ac_exeext
16824 if { (eval echo "$as_me:16824: \"$ac_link\"") >&5
16825 (eval $ac_link) 2>&5
16827 echo "$as_me:16827: \$? = $ac_status" >&5
16828 (exit $ac_status); } && { ac_try='./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: program exited with status $ac_status" >&5
16837 echo "$as_me: failed program was:" >&5
16838 cat conftest.$ac_ext >&5
16841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16843 echo "$as_me:16843: result: $cf_result" >&5
16844 echo "${ECHO_T}$cf_result" >&6
16845 if test $cf_result = yes ; then
16847 cf_result=`echo "decl_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16849 cat >>confdefs.h <<EOF
16850 #define $cf_result 1
16856 if ( test "$GCC" = yes || test "$GXX" = yes )
16858 echo "$as_me:16858: checking if you want to turn on gcc warnings" >&5
16859 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16861 # Check whether --enable-warnings or --disable-warnings was given.
16862 if test "${enable_warnings+set}" = set; then
16863 enableval="$enable_warnings"
16864 test "$enableval" != yes && enableval=no
16865 if test "$enableval" != "no" ; then
16875 echo "$as_me:16875: result: $with_warnings" >&5
16876 echo "${ECHO_T}$with_warnings" >&6
16877 if test "$with_warnings" = "yes"
16880 if test "$GCC" = yes
16882 cat > conftest.i <<EOF
16884 #define GCC_PRINTF 0
16887 #define GCC_SCANF 0
16889 #ifndef GCC_NORETURN
16890 #define GCC_NORETURN /* nothing */
16893 #define GCC_UNUSED /* nothing */
16896 if test "$GCC" = yes
16898 { echo "$as_me:16898: checking for $CC __attribute__ directives..." >&5
16899 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16900 cat > conftest.$ac_ext <<EOF
16901 #line 16901 "${as_me:-configure}"
16902 #include "confdefs.h"
16903 #include "conftest.h"
16904 #include "conftest.i"
16906 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16908 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16911 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16913 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16915 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16916 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16917 extern void foo(void) GCC_NORETURN;
16918 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16920 cf_printf_attribute=no
16921 cf_scanf_attribute=no
16922 for cf_attribute in scanf printf unused noreturn
16925 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16927 cf_directive="__attribute__(($cf_attribute))"
16928 echo "checking for $CC $cf_directive" 1>&5
16930 case $cf_attribute in
16932 cf_printf_attribute=yes
16933 cat >conftest.h <<EOF
16934 #define GCC_$cf_ATTRIBUTE 1
16938 cf_scanf_attribute=yes
16939 cat >conftest.h <<EOF
16940 #define GCC_$cf_ATTRIBUTE 1
16944 cat >conftest.h <<EOF
16945 #define GCC_$cf_ATTRIBUTE $cf_directive
16950 if { (eval echo "$as_me:16950: \"$ac_compile\"") >&5
16951 (eval $ac_compile) 2>&5
16953 echo "$as_me:16953: \$? = $ac_status" >&5
16954 (exit $ac_status); }; then
16955 test -n "$verbose" && echo "$as_me:16955: result: ... $cf_attribute" >&5
16956 echo "${ECHO_T}... $cf_attribute" >&6
16957 cat conftest.h >>confdefs.h
16958 case $cf_attribute in
16961 cat >>confdefs.h <<EOF
16962 #define GCC_NORETURN $cf_directive
16967 cf_value='/* nothing */'
16968 if test "$cf_printf_attribute" != no ; then
16969 cf_value='__attribute__((format(printf,fmt,var)))'
16971 cat >>confdefs.h <<\EOF
16972 #define GCC_PRINTF 1
16977 cat >>confdefs.h <<EOF
16978 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16983 cf_value='/* nothing */'
16984 if test "$cf_scanf_attribute" != no ; then
16985 cf_value='__attribute__((format(scanf,fmt,var)))'
16987 cat >>confdefs.h <<\EOF
16988 #define GCC_SCANF 1
16993 cat >>confdefs.h <<EOF
16994 #define GCC_SCANFLIKE(fmt,var) $cf_value
17000 cat >>confdefs.h <<EOF
17001 #define GCC_UNUSED $cf_directive
17009 fgrep define conftest.i >>confdefs.h
17016 if test "$GCC" = yes ; then
17019 echo "$as_me:17019: checking if this is really Intel C compiler" >&5
17020 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17021 cf_save_CFLAGS="$CFLAGS"
17022 CFLAGS="$CFLAGS -no-gcc"
17023 cat >conftest.$ac_ext <<_ACEOF
17024 #line 17024 "configure"
17025 #include "confdefs.h"
17031 #ifdef __INTEL_COMPILER
17040 rm -f conftest.$ac_objext
17041 if { (eval echo "$as_me:17041: \"$ac_compile\"") >&5
17042 (eval $ac_compile) 2>&5
17044 echo "$as_me:17044: \$? = $ac_status" >&5
17045 (exit $ac_status); } &&
17046 { ac_try='test -s conftest.$ac_objext'
17047 { (eval echo "$as_me:17047: \"$ac_try\"") >&5
17048 (eval $ac_try) 2>&5
17050 echo "$as_me:17050: \$? = $ac_status" >&5
17051 (exit $ac_status); }; }; then
17053 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17056 echo "$as_me: failed program was:" >&5
17057 cat conftest.$ac_ext >&5
17059 rm -f conftest.$ac_objext conftest.$ac_ext
17060 CFLAGS="$cf_save_CFLAGS"
17061 echo "$as_me:17061: result: $INTEL_COMPILER" >&5
17062 echo "${ECHO_T}$INTEL_COMPILER" >&6
17069 if test "$GCC" = yes ; then
17070 echo "$as_me:17070: checking if this is really Clang C compiler" >&5
17071 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17072 cf_save_CFLAGS="$CFLAGS"
17073 CFLAGS="$CFLAGS -Qunused-arguments"
17074 cat >conftest.$ac_ext <<_ACEOF
17075 #line 17075 "configure"
17076 #include "confdefs.h"
17091 rm -f conftest.$ac_objext
17092 if { (eval echo "$as_me:17092: \"$ac_compile\"") >&5
17093 (eval $ac_compile) 2>&5
17095 echo "$as_me:17095: \$? = $ac_status" >&5
17096 (exit $ac_status); } &&
17097 { ac_try='test -s conftest.$ac_objext'
17098 { (eval echo "$as_me:17098: \"$ac_try\"") >&5
17099 (eval $ac_try) 2>&5
17101 echo "$as_me:17101: \$? = $ac_status" >&5
17102 (exit $ac_status); }; }; then
17104 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17107 echo "$as_me: failed program was:" >&5
17108 cat conftest.$ac_ext >&5
17110 rm -f conftest.$ac_objext conftest.$ac_ext
17111 CFLAGS="$cf_save_CFLAGS"
17112 echo "$as_me:17112: result: $CLANG_COMPILER" >&5
17113 echo "${ECHO_T}$CLANG_COMPILER" >&6
17116 cat > conftest.$ac_ext <<EOF
17117 #line 17117 "${as_me:-configure}"
17118 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17121 if test "$INTEL_COMPILER" = yes
17123 # The "-wdXXX" options suppress warnings:
17124 # remark #1419: external declaration in primary source file
17125 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17126 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17127 # remark #193: zero used for undefined preprocessing identifier
17128 # remark #593: variable "curs_sb_left_arrow" was set but never used
17129 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17130 # remark #869: parameter "tw" was never referenced
17131 # remark #981: operands are evaluated in unspecified order
17132 # warning #279: controlling expression is constant
17134 { echo "$as_me:17134: checking for $CC warning options..." >&5
17135 echo "$as_me: checking for $CC warning options..." >&6;}
17136 cf_save_CFLAGS="$CFLAGS"
17137 EXTRA_CFLAGS="-Wall"
17149 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17150 if { (eval echo "$as_me:17150: \"$ac_compile\"") >&5
17151 (eval $ac_compile) 2>&5
17153 echo "$as_me:17153: \$? = $ac_status" >&5
17154 (exit $ac_status); }; then
17155 test -n "$verbose" && echo "$as_me:17155: result: ... -$cf_opt" >&5
17156 echo "${ECHO_T}... -$cf_opt" >&6
17157 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17160 CFLAGS="$cf_save_CFLAGS"
17162 elif test "$GCC" = yes
17164 { echo "$as_me:17164: checking for $CC warning options..." >&5
17165 echo "$as_me: checking for $CC warning options..." >&6;}
17166 cf_save_CFLAGS="$CFLAGS"
17169 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17170 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17171 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17172 for cf_opt in W Wall \
17173 Wbad-function-cast \
17176 Wdeclaration-after-statement \
17179 Wmissing-declarations \
17180 Wmissing-prototypes \
17184 Wstrict-prototypes \
17185 Wundef $cf_gcc_warnings $cf_warn_CONST
17187 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17188 if { (eval echo "$as_me:17188: \"$ac_compile\"") >&5
17189 (eval $ac_compile) 2>&5
17191 echo "$as_me:17191: \$? = $ac_status" >&5
17192 (exit $ac_status); }; then
17193 test -n "$verbose" && echo "$as_me:17193: result: ... -$cf_opt" >&5
17194 echo "${ECHO_T}... -$cf_opt" >&6
17197 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17200 case $GCC_VERSION in
17202 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17204 echo "${as_me:-configure}:17204: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17210 case $GCC_VERSION in
17212 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17214 echo "${as_me:-configure}:17214: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17220 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17223 CFLAGS="$cf_save_CFLAGS"
17230 echo "$as_me:17230: checking if you want to use dmalloc for testing" >&5
17231 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17233 # Check whether --with-dmalloc or --without-dmalloc was given.
17234 if test "${with_dmalloc+set}" = set; then
17235 withval="$with_dmalloc"
17237 cat >>confdefs.h <<EOF
17238 #define USE_DMALLOC 1
17241 : ${with_cflags:=-g}
17242 : ${with_no_leaks:=yes}
17247 echo "$as_me:17247: result: ${with_dmalloc:-no}" >&5
17248 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17250 case .$with_cflags in
17260 cf_new_extra_cppflags=
17262 for cf_add_cflags in -g
17264 case $cf_fix_cppflags in
17266 case $cf_add_cflags in
17267 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17268 case $cf_add_cflags in
17270 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17272 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17273 && test -z "${cf_tst_cflags}" \
17274 && cf_fix_cppflags=yes
17276 if test $cf_fix_cppflags = yes ; then
17277 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17279 elif test "${cf_tst_cflags}" = "\"'" ; then
17280 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17285 case "$CPPFLAGS" in
17289 case $cf_add_cflags in
17291 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17293 CPPFLAGS=`echo "$CPPFLAGS" | \
17294 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17295 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17299 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17304 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17309 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17311 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17313 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17314 && test -z "${cf_tst_cflags}" \
17315 && cf_fix_cppflags=no
17320 if test -n "$cf_new_cflags" ; then
17322 CFLAGS="$CFLAGS $cf_new_cflags"
17325 if test -n "$cf_new_cppflags" ; then
17327 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17330 if test -n "$cf_new_extra_cppflags" ; then
17332 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17340 if test "$with_dmalloc" = yes ; then
17341 echo "$as_me:17341: checking for dmalloc.h" >&5
17342 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17343 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17344 echo $ECHO_N "(cached) $ECHO_C" >&6
17346 cat >conftest.$ac_ext <<_ACEOF
17347 #line 17347 "configure"
17348 #include "confdefs.h"
17349 #include <dmalloc.h>
17351 if { (eval echo "$as_me:17351: \"$ac_cpp conftest.$ac_ext\"") >&5
17352 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17354 egrep -v '^ *\+' conftest.er1 >conftest.err
17356 cat conftest.err >&5
17357 echo "$as_me:17357: \$? = $ac_status" >&5
17358 (exit $ac_status); } >/dev/null; then
17359 if test -s conftest.err; then
17360 ac_cpp_err=$ac_c_preproc_warn_flag
17367 if test -z "$ac_cpp_err"; then
17368 ac_cv_header_dmalloc_h=yes
17370 echo "$as_me: failed program was:" >&5
17371 cat conftest.$ac_ext >&5
17372 ac_cv_header_dmalloc_h=no
17374 rm -f conftest.err conftest.$ac_ext
17376 echo "$as_me:17376: result: $ac_cv_header_dmalloc_h" >&5
17377 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17378 if test $ac_cv_header_dmalloc_h = yes; then
17380 echo "$as_me:17380: checking for dmalloc_debug in -ldmalloc" >&5
17381 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17382 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17383 echo $ECHO_N "(cached) $ECHO_C" >&6
17385 ac_check_lib_save_LIBS=$LIBS
17386 LIBS="-ldmalloc $LIBS"
17387 cat >conftest.$ac_ext <<_ACEOF
17388 #line 17388 "configure"
17389 #include "confdefs.h"
17391 /* Override any gcc2 internal prototype to avoid an error. */
17395 /* We use char because int might match the return type of a gcc2
17396 builtin and then its argument prototype would still apply. */
17397 char dmalloc_debug ();
17406 rm -f conftest.$ac_objext conftest$ac_exeext
17407 if { (eval echo "$as_me:17407: \"$ac_link\"") >&5
17408 (eval $ac_link) 2>&5
17410 echo "$as_me:17410: \$? = $ac_status" >&5
17411 (exit $ac_status); } &&
17412 { ac_try='test -s conftest$ac_exeext'
17413 { (eval echo "$as_me:17413: \"$ac_try\"") >&5
17414 (eval $ac_try) 2>&5
17416 echo "$as_me:17416: \$? = $ac_status" >&5
17417 (exit $ac_status); }; }; then
17418 ac_cv_lib_dmalloc_dmalloc_debug=yes
17420 echo "$as_me: failed program was:" >&5
17421 cat conftest.$ac_ext >&5
17422 ac_cv_lib_dmalloc_dmalloc_debug=no
17424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17425 LIBS=$ac_check_lib_save_LIBS
17427 echo "$as_me:17427: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17428 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17429 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17430 cat >>confdefs.h <<EOF
17431 #define HAVE_LIBDMALLOC 1
17434 LIBS="-ldmalloc $LIBS"
17442 echo "$as_me:17442: checking if you want to use dbmalloc for testing" >&5
17443 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17445 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17446 if test "${with_dbmalloc+set}" = set; then
17447 withval="$with_dbmalloc"
17449 cat >>confdefs.h <<EOF
17450 #define USE_DBMALLOC 1
17453 : ${with_cflags:=-g}
17454 : ${with_no_leaks:=yes}
17459 echo "$as_me:17459: result: ${with_dbmalloc:-no}" >&5
17460 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17462 case .$with_cflags in
17472 cf_new_extra_cppflags=
17474 for cf_add_cflags in -g
17476 case $cf_fix_cppflags in
17478 case $cf_add_cflags in
17479 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17480 case $cf_add_cflags in
17482 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17484 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17485 && test -z "${cf_tst_cflags}" \
17486 && cf_fix_cppflags=yes
17488 if test $cf_fix_cppflags = yes ; then
17489 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17491 elif test "${cf_tst_cflags}" = "\"'" ; then
17492 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17497 case "$CPPFLAGS" in
17501 case $cf_add_cflags in
17503 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17505 CPPFLAGS=`echo "$CPPFLAGS" | \
17506 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17507 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17511 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17516 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17521 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17523 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17526 && test -z "${cf_tst_cflags}" \
17527 && cf_fix_cppflags=no
17532 if test -n "$cf_new_cflags" ; then
17534 CFLAGS="$CFLAGS $cf_new_cflags"
17537 if test -n "$cf_new_cppflags" ; then
17539 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17542 if test -n "$cf_new_extra_cppflags" ; then
17544 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17552 if test "$with_dbmalloc" = yes ; then
17553 echo "$as_me:17553: checking for dbmalloc.h" >&5
17554 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17555 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17556 echo $ECHO_N "(cached) $ECHO_C" >&6
17558 cat >conftest.$ac_ext <<_ACEOF
17559 #line 17559 "configure"
17560 #include "confdefs.h"
17561 #include <dbmalloc.h>
17563 if { (eval echo "$as_me:17563: \"$ac_cpp conftest.$ac_ext\"") >&5
17564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17566 egrep -v '^ *\+' conftest.er1 >conftest.err
17568 cat conftest.err >&5
17569 echo "$as_me:17569: \$? = $ac_status" >&5
17570 (exit $ac_status); } >/dev/null; then
17571 if test -s conftest.err; then
17572 ac_cpp_err=$ac_c_preproc_warn_flag
17579 if test -z "$ac_cpp_err"; then
17580 ac_cv_header_dbmalloc_h=yes
17582 echo "$as_me: failed program was:" >&5
17583 cat conftest.$ac_ext >&5
17584 ac_cv_header_dbmalloc_h=no
17586 rm -f conftest.err conftest.$ac_ext
17588 echo "$as_me:17588: result: $ac_cv_header_dbmalloc_h" >&5
17589 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17590 if test $ac_cv_header_dbmalloc_h = yes; then
17592 echo "$as_me:17592: checking for debug_malloc in -ldbmalloc" >&5
17593 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17594 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17595 echo $ECHO_N "(cached) $ECHO_C" >&6
17597 ac_check_lib_save_LIBS=$LIBS
17598 LIBS="-ldbmalloc $LIBS"
17599 cat >conftest.$ac_ext <<_ACEOF
17600 #line 17600 "configure"
17601 #include "confdefs.h"
17603 /* Override any gcc2 internal prototype to avoid an error. */
17607 /* We use char because int might match the return type of a gcc2
17608 builtin and then its argument prototype would still apply. */
17609 char debug_malloc ();
17618 rm -f conftest.$ac_objext conftest$ac_exeext
17619 if { (eval echo "$as_me:17619: \"$ac_link\"") >&5
17620 (eval $ac_link) 2>&5
17622 echo "$as_me:17622: \$? = $ac_status" >&5
17623 (exit $ac_status); } &&
17624 { ac_try='test -s conftest$ac_exeext'
17625 { (eval echo "$as_me:17625: \"$ac_try\"") >&5
17626 (eval $ac_try) 2>&5
17628 echo "$as_me:17628: \$? = $ac_status" >&5
17629 (exit $ac_status); }; }; then
17630 ac_cv_lib_dbmalloc_debug_malloc=yes
17632 echo "$as_me: failed program was:" >&5
17633 cat conftest.$ac_ext >&5
17634 ac_cv_lib_dbmalloc_debug_malloc=no
17636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17637 LIBS=$ac_check_lib_save_LIBS
17639 echo "$as_me:17639: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17640 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17641 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17642 cat >>confdefs.h <<EOF
17643 #define HAVE_LIBDBMALLOC 1
17646 LIBS="-ldbmalloc $LIBS"
17654 echo "$as_me:17654: checking if you want to use valgrind for testing" >&5
17655 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17657 # Check whether --with-valgrind or --without-valgrind was given.
17658 if test "${with_valgrind+set}" = set; then
17659 withval="$with_valgrind"
17661 cat >>confdefs.h <<EOF
17662 #define USE_VALGRIND 1
17665 : ${with_cflags:=-g}
17666 : ${with_no_leaks:=yes}
17671 echo "$as_me:17671: result: ${with_valgrind:-no}" >&5
17672 echo "${ECHO_T}${with_valgrind:-no}" >&6
17674 case .$with_cflags in
17684 cf_new_extra_cppflags=
17686 for cf_add_cflags in -g
17688 case $cf_fix_cppflags in
17690 case $cf_add_cflags in
17691 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17692 case $cf_add_cflags in
17694 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17696 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17697 && test -z "${cf_tst_cflags}" \
17698 && cf_fix_cppflags=yes
17700 if test $cf_fix_cppflags = yes ; then
17701 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17703 elif test "${cf_tst_cflags}" = "\"'" ; then
17704 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17709 case "$CPPFLAGS" in
17713 case $cf_add_cflags in
17715 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17717 CPPFLAGS=`echo "$CPPFLAGS" | \
17718 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17719 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17723 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17728 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17733 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17735 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17737 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17738 && test -z "${cf_tst_cflags}" \
17739 && cf_fix_cppflags=no
17744 if test -n "$cf_new_cflags" ; then
17746 CFLAGS="$CFLAGS $cf_new_cflags"
17749 if test -n "$cf_new_cppflags" ; then
17751 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17754 if test -n "$cf_new_extra_cppflags" ; then
17756 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17764 echo "$as_me:17764: checking if you want to perform memory-leak testing" >&5
17765 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17767 # Check whether --enable-leaks or --disable-leaks was given.
17768 if test "${enable_leaks+set}" = set; then
17769 enableval="$enable_leaks"
17770 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17772 : ${with_no_leaks:=no}
17774 echo "$as_me:17774: result: $with_no_leaks" >&5
17775 echo "${ECHO_T}$with_no_leaks" >&6
17777 if test "$with_no_leaks" = yes ; then
17779 cat >>confdefs.h <<\EOF
17783 cat >>confdefs.h <<\EOF
17784 #define YY_NO_LEAKS 1
17790 echo "$as_me:17790: checking for an rpath option" >&5
17791 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17792 case $cf_cv_system_name in
17794 if test "$GCC" = yes; then
17795 LD_RPATH_OPT="-Wl,-rpath,"
17797 LD_RPATH_OPT="-rpath "
17800 (linux*|gnu*|k*bsd*-gnu|freebsd*)
17801 LD_RPATH_OPT="-Wl,-rpath,"
17803 (openbsd[2-9].*|mirbsd*)
17804 LD_RPATH_OPT="-Wl,-rpath,"
17807 LD_RPATH_OPT="-rpath "
17810 LD_RPATH_OPT="-Wl,-rpath,"
17813 LD_RPATH_OPT="-rpath "
17821 echo "$as_me:17821: result: $LD_RPATH_OPT" >&5
17822 echo "${ECHO_T}$LD_RPATH_OPT" >&6
17824 case "x$LD_RPATH_OPT" in
17826 echo "$as_me:17826: checking if we need a space after rpath option" >&5
17827 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17828 cf_save_LIBS="$LIBS"
17830 cf_add_libs="${LD_RPATH_OPT}$libdir"
17831 # Filter out duplicates - this happens with badly-designed ".pc" files...
17832 for cf_add_1lib in $LIBS
17834 for cf_add_2lib in $cf_add_libs
17836 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17842 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17844 LIBS="$cf_add_libs"
17846 cat >conftest.$ac_ext <<_ACEOF
17847 #line 17847 "configure"
17848 #include "confdefs.h"
17858 rm -f conftest.$ac_objext conftest$ac_exeext
17859 if { (eval echo "$as_me:17859: \"$ac_link\"") >&5
17860 (eval $ac_link) 2>&5
17862 echo "$as_me:17862: \$? = $ac_status" >&5
17863 (exit $ac_status); } &&
17864 { ac_try='test -s conftest$ac_exeext'
17865 { (eval echo "$as_me:17865: \"$ac_try\"") >&5
17866 (eval $ac_try) 2>&5
17868 echo "$as_me:17868: \$? = $ac_status" >&5
17869 (exit $ac_status); }; }; then
17872 echo "$as_me: failed program was:" >&5
17873 cat conftest.$ac_ext >&5
17876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17877 LIBS="$cf_save_LIBS"
17878 echo "$as_me:17878: result: $cf_rpath_space" >&5
17879 echo "${ECHO_T}$cf_rpath_space" >&6
17880 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17884 echo "$as_me:17884: checking if rpath-hack should be disabled" >&5
17885 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17887 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17888 if test "${enable_rpath_hack+set}" = set; then
17889 enableval="$enable_rpath_hack"
17890 test "$enableval" != no && enableval=yes
17891 if test "$enableval" != "yes" ; then
17892 cf_disable_rpath_hack=yes
17894 cf_disable_rpath_hack=no
17898 cf_disable_rpath_hack=no
17901 echo "$as_me:17901: result: $cf_disable_rpath_hack" >&5
17902 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17903 if test "$cf_disable_rpath_hack" = no ; then
17905 echo "$as_me:17905: checking for updated LDFLAGS" >&5
17906 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17907 if test -n "$LD_RPATH_OPT" ; then
17908 echo "$as_me:17908: result: maybe" >&5
17909 echo "${ECHO_T}maybe" >&6
17913 # Extract the first word of "$ac_prog", so it can be a program name with args.
17914 set dummy $ac_prog; ac_word=$2
17915 echo "$as_me:17915: checking for $ac_word" >&5
17916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17917 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17918 echo $ECHO_N "(cached) $ECHO_C" >&6
17920 if test -n "$cf_ldd_prog"; then
17921 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17923 ac_save_IFS=$IFS; IFS=$ac_path_separator
17925 for ac_dir in $ac_dummy; do
17927 test -z "$ac_dir" && ac_dir=.
17928 $as_executable_p "$ac_dir/$ac_word" || continue
17929 ac_cv_prog_cf_ldd_prog="$ac_prog"
17930 echo "$as_me:17930: found $ac_dir/$ac_word" >&5
17936 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17937 if test -n "$cf_ldd_prog"; then
17938 echo "$as_me:17938: result: $cf_ldd_prog" >&5
17939 echo "${ECHO_T}$cf_ldd_prog" >&6
17941 echo "$as_me:17941: result: no" >&5
17942 echo "${ECHO_T}no" >&6
17945 test -n "$cf_ldd_prog" && break
17947 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
17949 cf_rpath_list="/usr/lib /lib"
17950 if test "$cf_ldd_prog" != no
17954 cat >conftest.$ac_ext <<_ACEOF
17955 #line 17955 "configure"
17956 #include "confdefs.h"
17966 rm -f conftest.$ac_objext conftest$ac_exeext
17967 if { (eval echo "$as_me:17967: \"$ac_link\"") >&5
17968 (eval $ac_link) 2>&5
17970 echo "$as_me:17970: \$? = $ac_status" >&5
17971 (exit $ac_status); } &&
17972 { ac_try='test -s conftest$ac_exeext'
17973 { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974 (eval $ac_try) 2>&5
17976 echo "$as_me:17976: \$? = $ac_status" >&5
17977 (exit $ac_status); }; }; then
17978 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
17979 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
17981 echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17986 # If we passed the link-test, but get a "not found" on a given library,
17987 # this could be due to inept reconfiguration of gcc to make it only
17988 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
17989 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
17990 # /usr/local libraries.
17991 if test -n "$cf_rpath_oops"
17993 for cf_rpath_src in $cf_rpath_oops
17995 for cf_rpath_dir in \
18000 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18002 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18004 echo "${as_me:-configure}:18004: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18006 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18014 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18016 echo "${as_me:-configure}:18016: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18018 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18020 echo "${as_me:-configure}:18020: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18023 for cf_rpath_src in $LDFLAGS
18025 case $cf_rpath_src in
18028 # check if this refers to a directory which we will ignore
18030 if test -n "$cf_rpath_list"
18032 for cf_rpath_item in $cf_rpath_list
18034 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18042 if test "$cf_rpath_skip" = no
18044 # transform the option
18045 if test "$LD_RPATH_OPT" = "-R " ; then
18046 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18048 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18051 # if we have not already added this, add it now
18052 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18053 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18055 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18057 echo "${as_me:-configure}:18057: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18059 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18064 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18066 LDFLAGS=$cf_rpath_dst
18068 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18070 echo "${as_me:-configure}:18070: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18072 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18074 echo "${as_me:-configure}:18074: testing ...checking LIBS $LIBS ..." 1>&5
18077 for cf_rpath_src in $LIBS
18079 case $cf_rpath_src in
18082 # check if this refers to a directory which we will ignore
18084 if test -n "$cf_rpath_list"
18086 for cf_rpath_item in $cf_rpath_list
18088 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18096 if test "$cf_rpath_skip" = no
18098 # transform the option
18099 if test "$LD_RPATH_OPT" = "-R " ; then
18100 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18102 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18105 # if we have not already added this, add it now
18106 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18107 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18109 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18111 echo "${as_me:-configure}:18111: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18113 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18118 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18122 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18124 echo "${as_me:-configure}:18124: testing ...checked LIBS $LIBS ..." 1>&5
18126 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18128 echo "${as_me:-configure}:18128: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18131 echo "$as_me:18131: result: no" >&5
18132 echo "${ECHO_T}no" >&6
18140 ac_config_files="$ac_config_files Makefile"
18141 ac_config_commands="$ac_config_commands default"
18142 cat >confcache <<\_ACEOF
18143 # This file is a shell script that caches the results of configure
18144 # tests run on this system so they can be shared between configure
18145 # scripts and configure runs, see configure's option --config-cache.
18146 # It is not useful on other systems. If it contains results you don't
18147 # want to keep, you may remove or edit it.
18149 # config.status only pays attention to the cache file if you give it
18150 # the --recheck option to rerun configure.
18152 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18153 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18154 # following values.
18158 # The following way of writing the cache mishandles newlines in values,
18159 # but we know of no workaround that is simple, portable, and efficient.
18160 # So, don't put newlines in cache variables' values.
18161 # Ultrix sh set writes to stderr and can't be redirected directly,
18162 # and sets the high bit in the cache file unless we assign to the vars.
18165 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18167 # `set' does not quote correctly, so add quotes (double-quote
18168 # substitution turns \\\\ into \\, and sed turns \\ into \).
18171 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18174 # `set' quotes correctly as required by POSIX, so do not add quotes.
18176 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18183 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18185 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18187 if cmp -s $cache_file confcache; then :; else
18188 if test -w $cache_file; then
18189 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18190 cat confcache >$cache_file
18192 echo "not updating unwritable cache $cache_file"
18197 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18198 # Let make expand exec_prefix.
18199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18201 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18202 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18203 # trailing colons and then remove the whole line if VPATH becomes empty
18204 # (actually we leave an empty line to preserve line numbers).
18205 if test "x$srcdir" = x.; then
18206 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18207 s/:*\$(srcdir):*/:/;
18208 s/:*\${srcdir}:*/:/;
18210 s/^\([^=]*=[ ]*\):*/\1/;
18216 DEFS=-DHAVE_CONFIG_H
18218 : ${CONFIG_STATUS=./config.status}
18219 ac_clean_files_save=$ac_clean_files
18220 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18221 { echo "$as_me:18221: creating $CONFIG_STATUS" >&5
18222 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18223 cat >$CONFIG_STATUS <<_ACEOF
18225 # Generated automatically by configure.
18226 # Run this file to recreate the current configuration.
18227 # Compiler output produced by configure, useful for debugging
18228 # configure, is in config.log if it exists.
18231 SHELL=\${CONFIG_SHELL-$SHELL}
18232 ac_cs_invocation="\$0 \$@"
18236 cat >>$CONFIG_STATUS <<\_ACEOF
18237 # Be Bourne compatible
18238 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18241 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18245 # Name of the executable.
18246 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18248 if expr a : '\(a\)' >/dev/null 2>&1; then
18254 rm -f conf$$ conf$$.exe conf$$.file
18256 if ln -s conf$$.file conf$$ 2>/dev/null; then
18257 # We could just check for DJGPP; but this test a) works b) is more generic
18258 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18259 if test -f conf$$.exe; then
18260 # Don't use ln at all; we don't have any links
18265 elif ln conf$$.file conf$$ 2>/dev/null; then
18270 rm -f conf$$ conf$$.exe conf$$.file
18272 as_executable_p="test -f"
18274 # Support unset when possible.
18275 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18282 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18283 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18284 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18285 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18286 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18287 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18288 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18289 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18292 # We need space, tab and new line, in precisely that order.
18298 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18304 # Files that config.status was made for.
18305 if test -n "$ac_config_files"; then
18306 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18309 if test -n "$ac_config_headers"; then
18310 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18313 if test -n "$ac_config_links"; then
18314 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18317 if test -n "$ac_config_commands"; then
18318 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18321 cat >>$CONFIG_STATUS <<\EOF
18324 \`$as_me' instantiates files from templates according to the
18325 current configuration.
18327 Usage: $0 [OPTIONS] [FILE]...
18329 -h, --help print this help, then exit
18330 -V, --version print version number, then exit
18331 -d, --debug don't remove temporary files
18332 --recheck update $as_me by reconfiguring in the same conditions
18333 --file=FILE[:TEMPLATE]
18334 instantiate the configuration file FILE
18335 --header=FILE[:TEMPLATE]
18336 instantiate the configuration header FILE
18338 Configuration files:
18341 Configuration headers:
18344 Configuration commands:
18347 Report bugs to <dickey@invisible-island.net>."
18350 cat >>$CONFIG_STATUS <<EOF
18353 configured by $0, generated by GNU Autoconf 2.52.20150926,
18354 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18356 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18357 Free Software Foundation, Inc.
18358 This config.status script is free software; the Free Software Foundation
18359 gives unlimited permission to copy, distribute and modify it."
18364 cat >>$CONFIG_STATUS <<\EOF
18365 # If no file are specified by the user, then we need to provide default
18366 # value. By we need to know if files were specified by the user.
18372 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18373 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18375 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18379 *) # This is not an option, so the user has probably given explicit
18381 ac_need_defaults=false;;
18385 # Handling of the options.
18387 cat >>$CONFIG_STATUS <<EOF
18388 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18389 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18390 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18392 cat >>$CONFIG_STATUS <<\EOF
18393 --version | --vers* | -V )
18394 echo "$ac_cs_version"; exit 0 ;;
18396 # Conflict between --help and --header
18397 { { echo "$as_me:18397: error: ambiguous option: $1
18398 Try \`$0 --help' for more information." >&5
18399 echo "$as_me: error: ambiguous option: $1
18400 Try \`$0 --help' for more information." >&2;}
18401 { (exit 1); exit 1; }; };;
18402 --help | --hel | -h )
18403 echo "$ac_cs_usage"; exit 0 ;;
18404 --debug | --d* | -d )
18406 --file | --fil | --fi | --f )
18408 CONFIG_FILES="$CONFIG_FILES $1"
18409 ac_need_defaults=false;;
18410 --header | --heade | --head | --hea )
18412 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18413 ac_need_defaults=false;;
18415 # This is an error.
18416 -*) { { echo "$as_me:18416: error: unrecognized option: $1
18417 Try \`$0 --help' for more information." >&5
18418 echo "$as_me: error: unrecognized option: $1
18419 Try \`$0 --help' for more information." >&2;}
18420 { (exit 1); exit 1; }; } ;;
18422 *) ac_config_targets="$ac_config_targets $1" ;;
18431 ## ----------------------- ##
18432 ## Running config.status. ##
18433 ## ----------------------- ##
18435 This file was extended by $as_me 2.52.20150926, executed with
18436 CONFIG_FILES = $CONFIG_FILES
18437 CONFIG_HEADERS = $CONFIG_HEADERS
18438 CONFIG_LINKS = $CONFIG_LINKS
18439 CONFIG_COMMANDS = $CONFIG_COMMANDS
18440 > $ac_cs_invocation
18441 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18446 cat >>$CONFIG_STATUS <<EOF
18448 # INIT-COMMANDS section.
18458 cat >>$CONFIG_STATUS <<\EOF
18459 for ac_config_target in $ac_config_targets
18461 case "$ac_config_target" in
18462 # Handling of arguments.
18463 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18464 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18465 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18466 *) { { echo "$as_me:18466: error: invalid argument: $ac_config_target" >&5
18467 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18468 { (exit 1); exit 1; }; };;
18472 # If the user did not use the arguments to specify the items to instantiate,
18473 # then the envvar interface is used. Set only those that are not.
18474 # We use the long form for the default assignment because of an extremely
18475 # bizarre bug on SunOS 4.1.3.
18476 if $ac_need_defaults; then
18477 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18478 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18479 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18482 # Create a temporary directory, and hook for its removal unless debugging.
18485 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18486 trap '{ (exit 1); exit 1; }' 1 2 13 15
18489 # Create a (secure) tmp directory for tmp files.
18492 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18493 test -n "$tmp" && test -d "$tmp"
18496 tmp=$TMPDIR/cs$$-$RANDOM
18497 (umask 077 && mkdir $tmp)
18500 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18501 { (exit 1); exit 1; }
18506 cat >>$CONFIG_STATUS <<EOF
18509 # CONFIG_FILES section.
18512 # No need to generate the scripts if there are no CONFIG_FILES.
18513 # This happens for instance when ./config.status config.h
18514 if test -n "\$CONFIG_FILES"; then
18515 # Protect against being on the right side of a sed subst in config.status.
18516 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18517 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18518 s,@SHELL@,$SHELL,;t t
18519 s,@exec_prefix@,$exec_prefix,;t t
18520 s,@prefix@,$prefix,;t t
18521 s,@program_transform_name@,$program_transform_name,;t t
18522 s,@bindir@,$bindir,;t t
18523 s,@sbindir@,$sbindir,;t t
18524 s,@libexecdir@,$libexecdir,;t t
18525 s,@datarootdir@,$datarootdir,;t t
18526 s,@datadir@,$datadir,;t t
18527 s,@sysconfdir@,$sysconfdir,;t t
18528 s,@sharedstatedir@,$sharedstatedir,;t t
18529 s,@localstatedir@,$localstatedir,;t t
18530 s,@libdir@,$libdir,;t t
18531 s,@includedir@,$includedir,;t t
18532 s,@oldincludedir@,$oldincludedir,;t t
18533 s,@infodir@,$infodir,;t t
18534 s,@mandir@,$mandir,;t t
18535 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18536 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18537 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18538 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18539 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18540 s,@build_alias@,$build_alias,;t t
18541 s,@host_alias@,$host_alias,;t t
18542 s,@target_alias@,$target_alias,;t t
18543 s,@ECHO_C@,$ECHO_C,;t t
18544 s,@ECHO_N@,$ECHO_N,;t t
18545 s,@ECHO_T@,$ECHO_T,;t t
18546 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18547 s,@DEFS@,$DEFS,;t t
18548 s,@LIBS@,$LIBS,;t t
18549 s,@build@,$build,;t t
18550 s,@build_cpu@,$build_cpu,;t t
18551 s,@build_vendor@,$build_vendor,;t t
18552 s,@build_os@,$build_os,;t t
18553 s,@host@,$host,;t t
18554 s,@host_cpu@,$host_cpu,;t t
18555 s,@host_vendor@,$host_vendor,;t t
18556 s,@host_os@,$host_os,;t t
18557 s,@SET_MAKE@,$SET_MAKE,;t t
18559 s,@CFLAGS@,$CFLAGS,;t t
18560 s,@LDFLAGS@,$LDFLAGS,;t t
18561 s,@CPPFLAGS@,$CPPFLAGS,;t t
18562 s,@ac_ct_CC@,$ac_ct_CC,;t t
18563 s,@EXEEXT@,$EXEEXT,;t t
18564 s,@OBJEXT@,$OBJEXT,;t t
18565 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18568 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18569 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18570 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18571 s,@LINT@,$LINT,;t t
18572 s,@LINT_OPTS@,$LINT_OPTS,;t t
18573 s,@CTAGS@,$CTAGS,;t t
18574 s,@ETAGS@,$ETAGS,;t t
18575 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18576 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18577 s,@MATH_LIB@,$MATH_LIB,;t t
18578 s,@top_builddir@,$top_builddir,;t t
18579 s,@CC_G_OPT@,$CC_G_OPT,;t t
18580 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18581 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18582 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18583 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18585 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18586 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18587 s,@LD_MODEL@,$LD_MODEL,;t t
18588 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18589 s,@LIBTOOL@,$LIBTOOL,;t t
18590 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18591 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18592 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18593 s,@LIB_LINK@,$LIB_LINK,;t t
18594 s,@LINK_TESTS@,$LINK_TESTS,;t t
18595 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18596 s,@PACKAGE@,$PACKAGE,;t t
18597 s,@PTHREAD@,$PTHREAD,;t t
18598 s,@TEST_ARGS@,$TEST_ARGS,;t t
18599 s,@TEST_DEPS@,$TEST_DEPS,;t t
18600 s,@TEST_LIBS@,$TEST_LIBS,;t t
18601 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18602 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18603 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18604 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18605 s,@includesubdir@,$includesubdir,;t t
18606 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18607 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18608 s,@ECHO_LT@,$ECHO_LT,;t t
18609 s,@ECHO_LD@,$ECHO_LD,;t t
18610 s,@RULE_CC@,$RULE_CC,;t t
18611 s,@SHOW_CC@,$SHOW_CC,;t t
18612 s,@ECHO_CC@,$ECHO_CC,;t t
18613 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18614 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18615 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18616 s,@X_CFLAGS@,$X_CFLAGS,;t t
18617 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18618 s,@X_LIBS@,$X_LIBS,;t t
18619 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18620 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18621 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18622 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18623 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18624 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18629 cat >>$CONFIG_STATUS <<\EOF
18630 # Split the substitutions into bite-sized pieces for seds with
18631 # small command number limits, like on Digital OSF/1 and HP-UX.
18632 ac_max_sed_lines=48
18633 ac_sed_frag=1 # Number of current file.
18634 ac_beg=1 # First line for current file.
18635 ac_end=$ac_max_sed_lines # Line after last line for current file.
18638 while $ac_more_lines; do
18639 if test $ac_beg -gt 1; then
18640 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18642 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18644 if test ! -s $tmp/subs.frag; then
18645 ac_more_lines=false
18647 # The purpose of the label and of the branching condition is to
18648 # speed up the sed processing (if there are no `@' at all, there
18649 # is no need to browse any of the substitutions).
18650 # These are the two extra sed commands mentioned above.
18652 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18653 # It is possible to make a multiline substitution using escaped newlines.
18654 # Ensure that we do not split the substitution between script fragments.
18656 ac_END=`expr $ac_end + $ac_max_sed_lines`
18657 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18658 if test -s $tmp/subs.next; then
18659 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18660 if test ! -s $tmp/subs.edit; then
18661 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18662 if test ! -s $tmp/subs.edit; then
18663 if test $ac_beg -gt 1; then
18664 ac_end=`expr $ac_end - 1`
18671 if test -z "$ac_sed_cmds"; then
18672 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18674 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18676 ac_sed_frag=`expr $ac_sed_frag + 1`
18678 ac_end=`expr $ac_end + $ac_max_sed_lines`
18681 if test -z "$ac_sed_cmds"; then
18684 fi # test -n "$CONFIG_FILES"
18687 cat >>$CONFIG_STATUS <<\EOF
18688 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18689 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18691 - | *:- | *:-:* ) # input from stdin
18693 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18694 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18695 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18696 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18697 * ) ac_file_in=$ac_file.in ;;
18700 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18701 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18702 X"$ac_file" : 'X\(//\)[^/]' \| \
18703 X"$ac_file" : 'X\(//\)$' \| \
18704 X"$ac_file" : 'X\(/\)' \| \
18705 . : '\(.\)' 2>/dev/null ||
18707 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18708 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18709 /^X\(\/\/\)$/{ s//\1/; q; }
18710 /^X\(\/\).*/{ s//\1/; q; }
18712 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18713 { case "$ac_dir" in
18714 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18718 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18719 case $as_mkdir_dir in
18720 # Skip DOS drivespec
18721 ?:) as_incr_dir=$as_mkdir_dir ;;
18723 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18724 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18729 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18730 # A "../" for each directory in $ac_dir_suffix.
18731 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18733 ac_dir_suffix= ac_dots=
18738 if test -z "$ac_dots"; then
18741 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18743 [\\/]* | ?:[\\/]* )
18744 ac_srcdir=$srcdir$ac_dir_suffix;
18745 ac_top_srcdir=$srcdir ;;
18746 *) # Relative path.
18747 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18748 ac_top_srcdir=$ac_dots$srcdir ;;
18752 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18753 *) ac_INSTALL=$ac_dots$INSTALL ;;
18756 if test x"$ac_file" != x-; then
18757 { echo "$as_me:18757: creating $ac_file" >&5
18758 echo "$as_me: creating $ac_file" >&6;}
18761 # Let's still pretend it is `configure' which instantiates (i.e., don't
18762 # use $as_me), people would be surprised to read:
18763 # /* config.h. Generated automatically by config.status. */
18764 configure_input="Generated automatically from `echo $ac_file_in |
18765 sed 's,.*/,,'` by configure."
18767 # First look for the input files in the build tree, otherwise in the
18769 ac_file_inputs=`IFS=:
18770 for f in $ac_file_in; do
18772 -) echo $tmp/stdin ;;
18774 # Absolute (can't be DOS-style, as IFS=:)
18775 test -f "$f" || { { echo "$as_me:18775: error: cannot find input file: $f" >&5
18776 echo "$as_me: error: cannot find input file: $f" >&2;}
18777 { (exit 1); exit 1; }; }
18780 if test -f "$f"; then
18783 elif test -f "$srcdir/$f"; then
18788 { { echo "$as_me:18788: error: cannot find input file: $f" >&5
18789 echo "$as_me: error: cannot find input file: $f" >&2;}
18790 { (exit 1); exit 1; }; }
18793 done` || { (exit 1); exit 1; }
18795 cat >>$CONFIG_STATUS <<\EOF
18796 ac_warn_datarootdir=no
18797 if test x"$ac_file" != x-; then
18798 for ac_item in $ac_file_inputs
18800 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18801 if test -n "$ac_seen"; then
18802 ac_used=`grep '@datarootdir@' $ac_item`
18803 if test -z "$ac_used"; then
18804 { echo "$as_me:18804: WARNING: datarootdir was used implicitly but not set:
18806 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18808 ac_warn_datarootdir=yes
18811 ac_seen=`grep '${datarootdir}' $ac_item`
18812 if test -n "$ac_seen"; then
18813 { echo "$as_me:18813: WARNING: datarootdir was used explicitly but not set:
18815 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18817 ac_warn_datarootdir=yes
18822 if test "x$ac_warn_datarootdir" = xyes; then
18823 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18827 cat >>$CONFIG_STATUS <<EOF
18831 cat >>$CONFIG_STATUS <<\EOF
18833 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18834 s,@configure_input@,$configure_input,;t t
18835 s,@srcdir@,$ac_srcdir,;t t
18836 s,@top_srcdir@,$ac_top_srcdir,;t t
18837 s,@INSTALL@,$ac_INSTALL,;t t
18838 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18840 if test x"$ac_file" != x-; then
18841 cp $tmp/out $ac_file
18843 for ac_name in prefix exec_prefix datarootdir
18845 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18846 if test -n "$ac_seen"; then
18847 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18848 if test -z "$ac_init"; then
18849 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18850 { echo "$as_me:18850: WARNING: Variable $ac_name is used but was not set:
18852 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18857 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18858 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18859 if test -s $tmp/out; then
18860 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18861 { echo "$as_me:18861: WARNING: Some variables may not be substituted:
18863 echo "$as_me: WARNING: Some variables may not be substituted:
18873 cat >>$CONFIG_STATUS <<\EOF
18876 # CONFIG_HEADER section.
18879 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18880 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18882 # ac_d sets the value in "#define NAME VALUE" lines.
18883 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18884 ac_dB='[ ].*$,\1#\2'
18887 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18888 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18889 ac_iB='\([ ]\),\1#\2define\3'
18892 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18893 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18894 ac_uB='$,\1#\2define\3'
18898 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18899 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18901 - | *:- | *:-:* ) # input from stdin
18903 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18904 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18905 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18906 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18907 * ) ac_file_in=$ac_file.in ;;
18910 test x"$ac_file" != x- && { echo "$as_me:18910: creating $ac_file" >&5
18911 echo "$as_me: creating $ac_file" >&6;}
18913 # First look for the input files in the build tree, otherwise in the
18915 ac_file_inputs=`IFS=:
18916 for f in $ac_file_in; do
18918 -) echo $tmp/stdin ;;
18920 # Absolute (can't be DOS-style, as IFS=:)
18921 test -f "$f" || { { echo "$as_me:18921: error: cannot find input file: $f" >&5
18922 echo "$as_me: error: cannot find input file: $f" >&2;}
18923 { (exit 1); exit 1; }; }
18926 if test -f "$f"; then
18929 elif test -f "$srcdir/$f"; then
18934 { { echo "$as_me:18934: error: cannot find input file: $f" >&5
18935 echo "$as_me: error: cannot find input file: $f" >&2;}
18936 { (exit 1); exit 1; }; }
18939 done` || { (exit 1); exit 1; }
18940 # Remove the trailing spaces.
18941 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18945 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18946 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18947 # be either 'cat' or 'sort'.
18948 cat confdefs.h | uniq >conftest.vals
18950 # Break up conftest.vals because some shells have a limit on
18951 # the size of here documents, and old seds have small limits too.
18953 rm -f conftest.tail
18954 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18955 while grep . conftest.vals >/dev/null
18957 # Write chunks of a limited-size here document to conftest.frag.
18958 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18959 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18960 echo 'CEOF' >> $CONFIG_STATUS
18961 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18962 rm -f conftest.vals
18963 mv conftest.tail conftest.vals
18965 rm -f conftest.vals
18967 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18969 echo ' cat >> conftest.edit <<CEOF
18970 /@DEFS@/r conftest.frag
18973 sed -f conftest.edit $tmp/in > $tmp/out
18975 mv $tmp/out $tmp/in
18976 rm -f conftest.edit conftest.frag
18977 ' >> $CONFIG_STATUS
18979 cat >>$CONFIG_STATUS <<\EOF
18980 # Let's still pretend it is `configure' which instantiates (i.e., don't
18981 # use $as_me), people would be surprised to read:
18982 # /* config.h. Generated automatically by config.status. */
18983 if test x"$ac_file" = x-; then
18984 echo "/* Generated automatically by configure. */" >$tmp/config.h
18986 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18988 cat $tmp/in >>$tmp/config.h
18990 if test x"$ac_file" != x-; then
18991 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18992 { echo "$as_me:18992: $ac_file is unchanged" >&5
18993 echo "$as_me: $ac_file is unchanged" >&6;}
18995 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18996 X"$ac_file" : 'X\(//\)[^/]' \| \
18997 X"$ac_file" : 'X\(//\)$' \| \
18998 X"$ac_file" : 'X\(/\)' \| \
18999 . : '\(.\)' 2>/dev/null ||
19001 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19002 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19003 /^X\(\/\/\)$/{ s//\1/; q; }
19004 /^X\(\/\).*/{ s//\1/; q; }
19006 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19007 { case "$ac_dir" in
19008 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19012 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19013 case $as_mkdir_dir in
19014 # Skip DOS drivespec
19015 ?:) as_incr_dir=$as_mkdir_dir ;;
19017 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19018 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19025 mv $tmp/config.h $ac_file
19029 rm -f $tmp/config.h
19033 cat >>$CONFIG_STATUS <<\EOF
19035 # CONFIG_COMMANDS section.
19037 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19038 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19039 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19046 if test ! -d $srcdir/$cf_dir; then
19048 elif test -f $srcdir/$cf_dir/programs; then
19049 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19053 cat >>Makefile <<TEST_EOF
19055 # These rules are generated so we do not rely on suffix rules, which do not
19056 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19057 # some, and the '\$x' confuses others).
19060 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19063 cat >>Makefile <<TEST_EOF
19065 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19066 \$(srcdir)/test.priv.h \\
19069 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
19073 if test -f ../config.guess && test -f ../config.sub
19075 cat >>Makefile <<TEST_EOF
19077 # if we used CF_INHERIT for getting these files, we can remove them
19079 rm -f config.guess config.sub
19087 cat >>$CONFIG_STATUS <<\EOF
19089 { (exit 0); exit 0; }
19091 chmod +x $CONFIG_STATUS
19092 ac_clean_files=$ac_clean_files_save
19094 # configure is writing to config.log, and then calls config.status.
19095 # config.status does its own redirection, appending to config.log.
19096 # Unfortunately, on DOS this fails, as config.log is still kept open
19097 # by configure, so config.status won't be able to write to it; its
19098 # output is simply discarded. So we exec the FD to /dev/null,
19099 # effectively closing config.log, so it can be properly (re)opened and
19100 # appended to by config.status. When coming back to configure, we
19101 # need to make the FD available again.
19102 if test "$no_create" != yes; then
19105 $SHELL $CONFIG_STATUS || ac_cs_success=false
19107 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19108 # would make configure fail if this is the last instruction.
19109 $ac_cs_success || { (exit 1); exit 1; }