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 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
651 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
654 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
655 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
657 --enable-string-hacks work around bogus compiler/loader warnings
659 --with-pkg-config{=path} enable/disable use of pkg-config
660 --disable-echo do not display "compiling" commands
661 Curses Version-dependent Options:
662 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
663 --disable-widec disable checks for wide-character functions
664 --with-curses-dir=DIR directory in which (n)curses is installed
665 --with-screen=XXX use specified curses-libraries
666 --with-ncursesw use wide ncurses-libraries
667 --with-ncurses use ncurses-libraries
668 --with-pdcurses compile/link with pdcurses X11 library
669 --with-curses-colr compile/link with HPUX 10.x color-curses
670 --with-curses-5lib compile/link with SunOS 5lib curses
671 --with-Xaw3d link with Xaw 3d library
672 --with-Xaw3dxft link with Xaw 3d xft library
673 --with-neXtaw link with neXT Athena library
674 --with-XawPlus link with Athena-Plus library
675 --with-x use the X Window System
676 Testing/development Options:
677 --enable-warnings test: turn on gcc compiler warnings
678 --with-dmalloc test: use Gray Watson's dmalloc library
679 --with-dbmalloc test: use Conor Cahill's dbmalloc library
680 --with-valgrind test: use valgrind
681 --disable-leaks test: free permanent memory, analyze leaks
682 --disable-rpath-hack don't add rpath options for additional libraries
684 Some influential environment variables:
685 CC C compiler command
686 CFLAGS C compiler flags
687 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
688 nonstandard directory <lib dir>
689 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
690 headers in a nonstandard directory <include dir>
693 Use these variables to override the choices made by `configure' or to help
694 it to find libraries and programs with nonstandard names/locations.
699 if test "$ac_init_help" = "recursive"; then
700 # If there are subdirs, report their specific --help.
702 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
704 # A "../" for each directory in /$ac_subdir.
705 ac_dots=`echo $ac_subdir |
706 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
709 .) # No --srcdir option. We are building in place.
710 ac_sub_srcdir=$srcdir ;;
711 [\\/]* | ?:[\\/]* ) # Absolute path.
712 ac_sub_srcdir=$srcdir/$ac_subdir ;;
714 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
717 # Check for guested configure; otherwise get Cygnus style configure.
718 if test -f $ac_sub_srcdir/configure.gnu; then
720 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
721 elif test -f $ac_sub_srcdir/configure; then
723 $SHELL $ac_sub_srcdir/configure --help=recursive
724 elif test -f $ac_sub_srcdir/configure.ac ||
725 test -f $ac_sub_srcdir/configure.in; then
729 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
735 test -n "$ac_init_help" && exit 0
736 if $ac_init_version; then
739 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
740 Free Software Foundation, Inc.
741 This configure script is free software; the Free Software Foundation
742 gives unlimited permission to copy, distribute and modify it.
748 This file contains any messages produced by compilers while
749 running configure, to aid debugging if configure makes a mistake.
751 It was created by $as_me, which was
752 generated by GNU Autoconf 2.52.20150926. Invocation command line was
763 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
764 uname -m = `(uname -m) 2>/dev/null || echo unknown`
765 uname -r = `(uname -r) 2>/dev/null || echo unknown`
766 uname -s = `(uname -s) 2>/dev/null || echo unknown`
767 uname -v = `(uname -v) 2>/dev/null || echo unknown`
769 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
770 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
772 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
773 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
774 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
775 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
776 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
777 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
778 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
792 # Keep a trace of the command line.
793 # Strip out --no-create and --no-recursion so they do not pile up.
794 # Also quote any args containing shell meta-characters.
800 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
801 | --no-cr | --no-c) ;;
802 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
803 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
804 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
805 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
806 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
808 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
811 # Get rid of the leading space.
814 # When interrupted or exit'd, cleanup temporary files, and complete
815 # config.log. We remove comments because anyway the quotes in there
816 # would cause problems or look ugly.
818 # Save into config.log some information that might help in debugging.
820 echo "## ----------------- ##" >&5
821 echo "## Cache variables. ##" >&5
822 echo "## ----------------- ##" >&5
824 # The following way of writing the cache mishandles newlines in values,
827 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
830 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
831 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
835 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
839 sed "/^$/d" confdefs.h >conftest.log
840 if test -s conftest.log; then
842 echo "## ------------ ##" >&5
843 echo "## confdefs.h. ##" >&5
844 echo "## ------------ ##" >&5
849 test "$ac_signal" != 0 &&
850 echo "$as_me: caught signal $ac_signal" >&5
851 echo "$as_me: exit $exit_status" >&5
852 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
855 for ac_signal in 1 2 13 15; do
856 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
860 # confdefs.h avoids OS command line length limits that DEFS can exceed.
861 rm -rf conftest* confdefs.h
862 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
865 # Let the site file select an alternate cache file if it wants to.
866 # Prefer explicitly selected file to automatically selected ones.
867 if test -z "$CONFIG_SITE"; then
868 if test "x$prefix" != xNONE; then
869 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
871 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
874 for ac_site_file in $CONFIG_SITE; do
875 if test -r "$ac_site_file"; then
876 { echo "$as_me:876: loading site script $ac_site_file" >&5
877 echo "$as_me: loading site script $ac_site_file" >&6;}
878 cat "$ac_site_file" >&5
883 if test -r "$cache_file"; then
884 # Some versions of bash will fail to source /dev/null (special
885 # files actually), so we avoid doing that.
886 if test -f "$cache_file"; then
887 { echo "$as_me:887: loading cache $cache_file" >&5
888 echo "$as_me: loading cache $cache_file" >&6;}
890 [\\/]* | ?:[\\/]* ) . $cache_file;;
895 { echo "$as_me:895: creating cache $cache_file" >&5
896 echo "$as_me: creating cache $cache_file" >&6;}
900 # Check that the precious variables saved in the cache have kept the same
902 ac_cache_corrupted=false
903 for ac_var in `(set) 2>&1 |
904 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
905 eval ac_old_set=\$ac_cv_env_${ac_var}_set
906 eval ac_new_set=\$ac_env_${ac_var}_set
907 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
908 eval ac_new_val="\$ac_env_${ac_var}_value"
909 case $ac_old_set,$ac_new_set in
911 { echo "$as_me:911: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
912 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
913 ac_cache_corrupted=: ;;
915 { echo "$as_me:915: error: \`$ac_var' was not set in the previous run" >&5
916 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
917 ac_cache_corrupted=: ;;
920 if test "x$ac_old_val" != "x$ac_new_val"; then
921 { echo "$as_me:921: error: \`$ac_var' has changed since the previous run:" >&5
922 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
923 { echo "$as_me:923: former value: $ac_old_val" >&5
924 echo "$as_me: former value: $ac_old_val" >&2;}
925 { echo "$as_me:925: current value: $ac_new_val" >&5
926 echo "$as_me: current value: $ac_new_val" >&2;}
930 # Pass precious variables to config.status. It doesn't matter if
931 # we pass some twice (in addition to the command line arguments).
932 if test "$ac_new_set" = set; then
934 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
935 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
936 ac_configure_args="$ac_configure_args '$ac_arg'"
938 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
943 if $ac_cache_corrupted; then
944 { echo "$as_me:944: error: changes in the environment can compromise the build" >&5
945 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
946 { { echo "$as_me:946: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
947 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
948 { (exit 1); exit 1; }; }
952 ac_cpp='$CPP $CPPFLAGS'
953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
955 ac_compiler_gnu=$ac_cv_c_compiler_gnu
956 ac_main_return=return
958 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
959 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
961 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
962 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
964 echo "#! $SHELL" >conftest.sh
965 echo "exit 0" >>conftest.sh
967 if { (echo "$as_me:967: PATH=\".;.\"; conftest.sh") >&5
968 (PATH=".;."; conftest.sh) 2>&5
970 echo "$as_me:970: \$? = $ac_status" >&5
971 (exit $ac_status); }; then
972 ac_path_separator=';'
976 PATH_SEPARATOR="$ac_path_separator"
979 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
981 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
983 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
986 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
987 if test -f $ac_dir/install-sh; then
989 ac_install_sh="$ac_aux_dir/install-sh -c"
991 elif test -f $ac_dir/install.sh; then
993 ac_install_sh="$ac_aux_dir/install.sh -c"
995 elif test -f $ac_dir/shtool; then
997 ac_install_sh="$ac_aux_dir/shtool install -c"
1001 if test -z "$ac_aux_dir"; then
1002 { { echo "$as_me:1002: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1003 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1004 { (exit 1); exit 1; }; }
1006 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1007 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1008 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1010 # Make sure we can run config.sub.
1011 $ac_config_sub sun4 >/dev/null 2>&1 ||
1012 { { echo "$as_me:1012: error: cannot run $ac_config_sub" >&5
1013 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1014 { (exit 1); exit 1; }; }
1016 echo "$as_me:1016: checking build system type" >&5
1017 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1018 if test "${ac_cv_build+set}" = set; then
1019 echo $ECHO_N "(cached) $ECHO_C" >&6
1021 ac_cv_build_alias=$build_alias
1022 test -z "$ac_cv_build_alias" &&
1023 ac_cv_build_alias=`$ac_config_guess`
1024 test -z "$ac_cv_build_alias" &&
1025 { { echo "$as_me:1025: error: cannot guess build type; you must specify one" >&5
1026 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1027 { (exit 1); exit 1; }; }
1028 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1029 { { echo "$as_me:1029: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1030 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1031 { (exit 1); exit 1; }; }
1034 echo "$as_me:1034: result: $ac_cv_build" >&5
1035 echo "${ECHO_T}$ac_cv_build" >&6
1037 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1038 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1039 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1041 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1042 echo "$as_me:1042: checking host system type" >&5
1043 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1044 if test "${ac_cv_host+set}" = set; then
1045 echo $ECHO_N "(cached) $ECHO_C" >&6
1047 ac_cv_host_alias=$host_alias
1048 test -z "$ac_cv_host_alias" &&
1049 ac_cv_host_alias=$ac_cv_build_alias
1050 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1051 { { echo "$as_me:1051: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1052 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1053 { (exit 1); exit 1; }; }
1056 echo "$as_me:1056: result: $ac_cv_host" >&5
1057 echo "${ECHO_T}$ac_cv_host" >&6
1059 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1060 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1061 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1063 system_name="$host_os"
1065 system_name="`(uname -s -r) 2>/dev/null`"
1066 if test -z "$system_name" ; then
1067 system_name="`(hostname) 2>/dev/null`"
1070 test -n "$system_name" &&
1071 cat >>confdefs.h <<EOF
1072 #define SYSTEM_NAME "$system_name"
1075 if test "${cf_cv_system_name+set}" = set; then
1076 echo $ECHO_N "(cached) $ECHO_C" >&6
1078 cf_cv_system_name="$system_name"
1081 test -z "$system_name" && system_name="$cf_cv_system_name"
1082 test -n "$cf_cv_system_name" && echo "$as_me:1082: result: Configuring for $cf_cv_system_name" >&5
1083 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1085 if test ".$system_name" != ".$cf_cv_system_name" ; then
1086 echo "$as_me:1086: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1087 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1088 { { echo "$as_me:1088: error: \"Please remove config.cache and try again.\"" >&5
1089 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1090 { (exit 1); exit 1; }; }
1093 test "$program_prefix" != NONE &&
1094 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1095 # Use a double $ so make ignores it.
1096 test "$program_suffix" != NONE &&
1097 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1098 # Double any \ or $. echo might interpret backslashes.
1099 # By default was `s,x,x', remove it if useless.
1100 cat <<\_ACEOF >conftest.sed
1101 s/[\\$]/&&/g;s/;s,x,x,$//
1103 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1106 echo "$as_me:1106: checking whether ${MAKE-make} sets \${MAKE}" >&5
1107 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1108 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1109 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1110 echo $ECHO_N "(cached) $ECHO_C" >&6
1112 cat >conftest.make <<\EOF
1114 @echo 'ac_maketemp="${MAKE}"'
1116 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1117 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1118 if test -n "$ac_maketemp"; then
1119 eval ac_cv_prog_make_${ac_make}_set=yes
1121 eval ac_cv_prog_make_${ac_make}_set=no
1125 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1126 echo "$as_me:1126: result: yes" >&5
1127 echo "${ECHO_T}yes" >&6
1130 echo "$as_me:1130: result: no" >&5
1131 echo "${ECHO_T}no" >&6
1132 SET_MAKE="MAKE=${MAKE-make}"
1136 ac_cpp='$CPP $CPPFLAGS'
1137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1140 ac_main_return=return
1141 if test -n "$ac_tool_prefix"; then
1142 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1143 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1144 echo "$as_me:1144: checking for $ac_word" >&5
1145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1146 if test "${ac_cv_prog_CC+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 if test -n "$CC"; then
1150 ac_cv_prog_CC="$CC" # Let the user override the test.
1152 ac_save_IFS=$IFS; IFS=$ac_path_separator
1154 for ac_dir in $ac_dummy; do
1156 test -z "$ac_dir" && ac_dir=.
1157 $as_executable_p "$ac_dir/$ac_word" || continue
1158 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1159 echo "$as_me:1159: found $ac_dir/$ac_word" >&5
1166 if test -n "$CC"; then
1167 echo "$as_me:1167: result: $CC" >&5
1168 echo "${ECHO_T}$CC" >&6
1170 echo "$as_me:1170: result: no" >&5
1171 echo "${ECHO_T}no" >&6
1175 if test -z "$ac_cv_prog_CC"; then
1177 # Extract the first word of "gcc", so it can be a program name with args.
1178 set dummy gcc; ac_word=$2
1179 echo "$as_me:1179: checking for $ac_word" >&5
1180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1181 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 if test -n "$ac_ct_CC"; then
1185 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1187 ac_save_IFS=$IFS; IFS=$ac_path_separator
1189 for ac_dir in $ac_dummy; do
1191 test -z "$ac_dir" && ac_dir=.
1192 $as_executable_p "$ac_dir/$ac_word" || continue
1193 ac_cv_prog_ac_ct_CC="gcc"
1194 echo "$as_me:1194: found $ac_dir/$ac_word" >&5
1200 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1201 if test -n "$ac_ct_CC"; then
1202 echo "$as_me:1202: result: $ac_ct_CC" >&5
1203 echo "${ECHO_T}$ac_ct_CC" >&6
1205 echo "$as_me:1205: result: no" >&5
1206 echo "${ECHO_T}no" >&6
1214 if test -z "$CC"; then
1215 if test -n "$ac_tool_prefix"; then
1216 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1217 set dummy ${ac_tool_prefix}cc; ac_word=$2
1218 echo "$as_me:1218: checking for $ac_word" >&5
1219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1220 if test "${ac_cv_prog_CC+set}" = set; then
1221 echo $ECHO_N "(cached) $ECHO_C" >&6
1223 if test -n "$CC"; then
1224 ac_cv_prog_CC="$CC" # Let the user override the test.
1226 ac_save_IFS=$IFS; IFS=$ac_path_separator
1228 for ac_dir in $ac_dummy; do
1230 test -z "$ac_dir" && ac_dir=.
1231 $as_executable_p "$ac_dir/$ac_word" || continue
1232 ac_cv_prog_CC="${ac_tool_prefix}cc"
1233 echo "$as_me:1233: found $ac_dir/$ac_word" >&5
1240 if test -n "$CC"; then
1241 echo "$as_me:1241: result: $CC" >&5
1242 echo "${ECHO_T}$CC" >&6
1244 echo "$as_me:1244: result: no" >&5
1245 echo "${ECHO_T}no" >&6
1249 if test -z "$ac_cv_prog_CC"; then
1251 # Extract the first word of "cc", so it can be a program name with args.
1252 set dummy cc; ac_word=$2
1253 echo "$as_me:1253: checking for $ac_word" >&5
1254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1255 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if test -n "$ac_ct_CC"; then
1259 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1261 ac_save_IFS=$IFS; IFS=$ac_path_separator
1263 for ac_dir in $ac_dummy; do
1265 test -z "$ac_dir" && ac_dir=.
1266 $as_executable_p "$ac_dir/$ac_word" || continue
1267 ac_cv_prog_ac_ct_CC="cc"
1268 echo "$as_me:1268: found $ac_dir/$ac_word" >&5
1274 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1275 if test -n "$ac_ct_CC"; then
1276 echo "$as_me:1276: result: $ac_ct_CC" >&5
1277 echo "${ECHO_T}$ac_ct_CC" >&6
1279 echo "$as_me:1279: result: no" >&5
1280 echo "${ECHO_T}no" >&6
1289 if test -z "$CC"; then
1290 # Extract the first word of "cc", so it can be a program name with args.
1291 set dummy cc; ac_word=$2
1292 echo "$as_me:1292: checking for $ac_word" >&5
1293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1294 if test "${ac_cv_prog_CC+set}" = set; then
1295 echo $ECHO_N "(cached) $ECHO_C" >&6
1297 if test -n "$CC"; then
1298 ac_cv_prog_CC="$CC" # Let the user override the test.
1301 ac_save_IFS=$IFS; IFS=$ac_path_separator
1303 for ac_dir in $ac_dummy; do
1305 test -z "$ac_dir" && ac_dir=.
1306 $as_executable_p "$ac_dir/$ac_word" || continue
1307 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1308 ac_prog_rejected=yes
1312 echo "$as_me:1312: found $ac_dir/$ac_word" >&5
1316 if test $ac_prog_rejected = yes; then
1317 # We found a bogon in the path, so make sure we never use it.
1318 set dummy $ac_cv_prog_CC
1320 if test $# != 0; then
1321 # We chose a different compiler from the bogus one.
1322 # However, it has the same basename, so the bogon will be chosen
1323 # first if we set CC to just the basename; use the full file name.
1325 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1333 if test -n "$CC"; then
1334 echo "$as_me:1334: result: $CC" >&5
1335 echo "${ECHO_T}$CC" >&6
1337 echo "$as_me:1337: result: no" >&5
1338 echo "${ECHO_T}no" >&6
1342 if test -z "$CC"; then
1343 if test -n "$ac_tool_prefix"; then
1346 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1347 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1348 echo "$as_me:1348: checking for $ac_word" >&5
1349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1350 if test "${ac_cv_prog_CC+set}" = set; then
1351 echo $ECHO_N "(cached) $ECHO_C" >&6
1353 if test -n "$CC"; then
1354 ac_cv_prog_CC="$CC" # Let the user override the test.
1356 ac_save_IFS=$IFS; IFS=$ac_path_separator
1358 for ac_dir in $ac_dummy; do
1360 test -z "$ac_dir" && ac_dir=.
1361 $as_executable_p "$ac_dir/$ac_word" || continue
1362 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1363 echo "$as_me:1363: found $ac_dir/$ac_word" >&5
1370 if test -n "$CC"; then
1371 echo "$as_me:1371: result: $CC" >&5
1372 echo "${ECHO_T}$CC" >&6
1374 echo "$as_me:1374: result: no" >&5
1375 echo "${ECHO_T}no" >&6
1378 test -n "$CC" && break
1381 if test -z "$CC"; then
1385 # Extract the first word of "$ac_prog", so it can be a program name with args.
1386 set dummy $ac_prog; ac_word=$2
1387 echo "$as_me:1387: checking for $ac_word" >&5
1388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1389 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1390 echo $ECHO_N "(cached) $ECHO_C" >&6
1392 if test -n "$ac_ct_CC"; then
1393 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1395 ac_save_IFS=$IFS; IFS=$ac_path_separator
1397 for ac_dir in $ac_dummy; do
1399 test -z "$ac_dir" && ac_dir=.
1400 $as_executable_p "$ac_dir/$ac_word" || continue
1401 ac_cv_prog_ac_ct_CC="$ac_prog"
1402 echo "$as_me:1402: found $ac_dir/$ac_word" >&5
1408 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1409 if test -n "$ac_ct_CC"; then
1410 echo "$as_me:1410: result: $ac_ct_CC" >&5
1411 echo "${ECHO_T}$ac_ct_CC" >&6
1413 echo "$as_me:1413: result: no" >&5
1414 echo "${ECHO_T}no" >&6
1417 test -n "$ac_ct_CC" && break
1425 test -z "$CC" && { { echo "$as_me:1425: error: no acceptable cc found in \$PATH" >&5
1426 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1427 { (exit 1); exit 1; }; }
1429 # Provide some information about the compiler.
1430 echo "$as_me:1430:" \
1431 "checking for C compiler version" >&5
1432 ac_compiler=`set X $ac_compile; echo $2`
1433 { (eval echo "$as_me:1433: \"$ac_compiler --version </dev/null >&5\"") >&5
1434 (eval $ac_compiler --version </dev/null >&5) 2>&5
1436 echo "$as_me:1436: \$? = $ac_status" >&5
1437 (exit $ac_status); }
1438 { (eval echo "$as_me:1438: \"$ac_compiler -v </dev/null >&5\"") >&5
1439 (eval $ac_compiler -v </dev/null >&5) 2>&5
1441 echo "$as_me:1441: \$? = $ac_status" >&5
1442 (exit $ac_status); }
1443 { (eval echo "$as_me:1443: \"$ac_compiler -V </dev/null >&5\"") >&5
1444 (eval $ac_compiler -V </dev/null >&5) 2>&5
1446 echo "$as_me:1446: \$? = $ac_status" >&5
1447 (exit $ac_status); }
1449 cat >conftest.$ac_ext <<_ACEOF
1450 #line 1450 "configure"
1451 #include "confdefs.h"
1461 ac_clean_files_save=$ac_clean_files
1462 ac_clean_files="$ac_clean_files a.out a.exe"
1463 # Try to create an executable without -o first, disregard a.out.
1464 # It will help us diagnose broken compilers, and finding out an intuition
1466 echo "$as_me:1466: checking for C compiler default output" >&5
1467 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1468 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1469 if { (eval echo "$as_me:1469: \"$ac_link_default\"") >&5
1470 (eval $ac_link_default) 2>&5
1472 echo "$as_me:1472: \$? = $ac_status" >&5
1473 (exit $ac_status); }; then
1474 # Find the output, starting from the most likely. This scheme is
1475 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1477 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1478 ls a.out conftest 2>/dev/null;
1479 ls a.* conftest.* 2>/dev/null`; do
1481 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1482 a.out ) # We found the default executable, but exeext='' is most
1485 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1486 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1493 echo "$as_me: failed program was:" >&5
1494 cat conftest.$ac_ext >&5
1495 { { echo "$as_me:1495: error: C compiler cannot create executables" >&5
1496 echo "$as_me: error: C compiler cannot create executables" >&2;}
1497 { (exit 77); exit 77; }; }
1500 ac_exeext=$ac_cv_exeext
1501 echo "$as_me:1501: result: $ac_file" >&5
1502 echo "${ECHO_T}$ac_file" >&6
1504 # Check the compiler produces executables we can run. If not, either
1505 # the compiler is broken, or we cross compile.
1506 echo "$as_me:1506: checking whether the C compiler works" >&5
1507 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1508 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1509 # If not cross compiling, check that we can run a simple program.
1510 if test "$cross_compiling" != yes; then
1511 if { ac_try='./$ac_file'
1512 { (eval echo "$as_me:1512: \"$ac_try\"") >&5
1515 echo "$as_me:1515: \$? = $ac_status" >&5
1516 (exit $ac_status); }; }; then
1519 if test "$cross_compiling" = maybe; then
1522 { { echo "$as_me:1522: error: cannot run C compiled programs.
1523 If you meant to cross compile, use \`--host'." >&5
1524 echo "$as_me: error: cannot run C compiled programs.
1525 If you meant to cross compile, use \`--host'." >&2;}
1526 { (exit 1); exit 1; }; }
1530 echo "$as_me:1530: result: yes" >&5
1531 echo "${ECHO_T}yes" >&6
1533 rm -f a.out a.exe conftest$ac_cv_exeext
1534 ac_clean_files=$ac_clean_files_save
1535 # Check the compiler produces executables we can run. If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether we are cross compiling" >&5
1538 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1539 echo "$as_me:1539: result: $cross_compiling" >&5
1540 echo "${ECHO_T}$cross_compiling" >&6
1542 echo "$as_me:1542: checking for executable suffix" >&5
1543 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1544 if { (eval echo "$as_me:1544: \"$ac_link\"") >&5
1545 (eval $ac_link) 2>&5
1547 echo "$as_me:1547: \$? = $ac_status" >&5
1548 (exit $ac_status); }; then
1549 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1550 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1551 # work properly (i.e., refer to `conftest.exe'), while it won't with
1553 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1555 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1556 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1563 { { echo "$as_me:1563: error: cannot compute EXEEXT: cannot compile and link" >&5
1564 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1565 { (exit 1); exit 1; }; }
1568 rm -f conftest$ac_cv_exeext
1569 echo "$as_me:1569: result: $ac_cv_exeext" >&5
1570 echo "${ECHO_T}$ac_cv_exeext" >&6
1572 rm -f conftest.$ac_ext
1573 EXEEXT=$ac_cv_exeext
1575 echo "$as_me:1575: checking for object suffix" >&5
1576 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1577 if test "${ac_cv_objext+set}" = set; then
1578 echo $ECHO_N "(cached) $ECHO_C" >&6
1580 cat >conftest.$ac_ext <<_ACEOF
1581 #line 1581 "configure"
1582 #include "confdefs.h"
1592 rm -f conftest.o conftest.obj
1593 if { (eval echo "$as_me:1593: \"$ac_compile\"") >&5
1594 (eval $ac_compile) 2>&5
1596 echo "$as_me:1596: \$? = $ac_status" >&5
1597 (exit $ac_status); }; then
1598 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1600 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1601 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1606 echo "$as_me: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 { { echo "$as_me:1608: error: cannot compute OBJEXT: cannot compile" >&5
1609 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1610 { (exit 1); exit 1; }; }
1613 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1615 echo "$as_me:1615: result: $ac_cv_objext" >&5
1616 echo "${ECHO_T}$ac_cv_objext" >&6
1617 OBJEXT=$ac_cv_objext
1619 echo "$as_me:1619: checking whether we are using the GNU C compiler" >&5
1620 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1621 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1622 echo $ECHO_N "(cached) $ECHO_C" >&6
1624 cat >conftest.$ac_ext <<_ACEOF
1625 #line 1625 "configure"
1626 #include "confdefs.h"
1639 rm -f conftest.$ac_objext
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641 (eval $ac_compile) 2>&5
1643 echo "$as_me:1643: \$? = $ac_status" >&5
1644 (exit $ac_status); } &&
1645 { ac_try='test -s conftest.$ac_objext'
1646 { (eval echo "$as_me:1646: \"$ac_try\"") >&5
1649 echo "$as_me:1649: \$? = $ac_status" >&5
1650 (exit $ac_status); }; }; then
1653 echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1657 rm -f conftest.$ac_objext conftest.$ac_ext
1658 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1661 echo "$as_me:1661: result: $ac_cv_c_compiler_gnu" >&5
1662 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1663 GCC=`test $ac_compiler_gnu = yes && echo yes`
1664 ac_test_CFLAGS=${CFLAGS+set}
1665 ac_save_CFLAGS=$CFLAGS
1667 echo "$as_me:1667: checking whether $CC accepts -g" >&5
1668 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1669 if test "${ac_cv_prog_cc_g+set}" = set; then
1670 echo $ECHO_N "(cached) $ECHO_C" >&6
1672 cat >conftest.$ac_ext <<_ACEOF
1673 #line 1673 "configure"
1674 #include "confdefs.h"
1684 rm -f conftest.$ac_objext
1685 if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686 (eval $ac_compile) 2>&5
1688 echo "$as_me:1688: \$? = $ac_status" >&5
1689 (exit $ac_status); } &&
1690 { ac_try='test -s conftest.$ac_objext'
1691 { (eval echo "$as_me:1691: \"$ac_try\"") >&5
1694 echo "$as_me:1694: \$? = $ac_status" >&5
1695 (exit $ac_status); }; }; then
1698 echo "$as_me: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1702 rm -f conftest.$ac_objext conftest.$ac_ext
1704 echo "$as_me:1704: result: $ac_cv_prog_cc_g" >&5
1705 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1706 if test "$ac_test_CFLAGS" = set; then
1707 CFLAGS=$ac_save_CFLAGS
1708 elif test $ac_cv_prog_cc_g = yes; then
1709 if test "$GCC" = yes; then
1715 if test "$GCC" = yes; then
1721 # Some people use a C++ compiler to compile C. Since we use `exit',
1722 # in C++ we need to declare it. In case someone uses the same compiler
1723 # for both compiling C and C++ we need to have the C++ compiler decide
1724 # the declaration of exit, since it's the most demanding environment.
1725 cat >conftest.$ac_ext <<_ACEOF
1730 rm -f conftest.$ac_objext
1731 if { (eval echo "$as_me:1731: \"$ac_compile\"") >&5
1732 (eval $ac_compile) 2>&5
1734 echo "$as_me:1734: \$? = $ac_status" >&5
1735 (exit $ac_status); } &&
1736 { ac_try='test -s conftest.$ac_objext'
1737 { (eval echo "$as_me:1737: \"$ac_try\"") >&5
1740 echo "$as_me:1740: \$? = $ac_status" >&5
1741 (exit $ac_status); }; }; then
1742 for ac_declaration in \
1744 '#include <stdlib.h>' \
1745 'extern "C" void std::exit (int) throw (); using std::exit;' \
1746 'extern "C" void std::exit (int); using std::exit;' \
1747 'extern "C" void exit (int) throw ();' \
1748 'extern "C" void exit (int);' \
1751 cat >conftest.$ac_ext <<_ACEOF
1752 #line 1752 "configure"
1753 #include "confdefs.h"
1764 rm -f conftest.$ac_objext
1765 if { (eval echo "$as_me:1765: \"$ac_compile\"") >&5
1766 (eval $ac_compile) 2>&5
1768 echo "$as_me:1768: \$? = $ac_status" >&5
1769 (exit $ac_status); } &&
1770 { ac_try='test -s conftest.$ac_objext'
1771 { (eval echo "$as_me:1771: \"$ac_try\"") >&5
1774 echo "$as_me:1774: \$? = $ac_status" >&5
1775 (exit $ac_status); }; }; then
1778 echo "$as_me: failed program was:" >&5
1779 cat conftest.$ac_ext >&5
1782 rm -f conftest.$ac_objext conftest.$ac_ext
1783 cat >conftest.$ac_ext <<_ACEOF
1784 #line 1784 "configure"
1785 #include "confdefs.h"
1795 rm -f conftest.$ac_objext
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit $ac_status); } &&
1801 { ac_try='test -s conftest.$ac_objext'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit $ac_status); }; }; then
1809 echo "$as_me: failed program was:" >&5
1810 cat conftest.$ac_ext >&5
1812 rm -f conftest.$ac_objext conftest.$ac_ext
1815 if test -n "$ac_declaration"; then
1816 echo '#ifdef __cplusplus' >>confdefs.h
1817 echo $ac_declaration >>confdefs.h
1818 echo '#endif' >>confdefs.h
1822 echo "$as_me: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1825 rm -f conftest.$ac_objext conftest.$ac_ext
1827 ac_cpp='$CPP $CPPFLAGS'
1828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1831 ac_main_return=return
1834 if test "$GCC" = yes ; then
1835 echo "$as_me:1835: checking version of $CC" >&5
1836 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1837 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.].*//'`"
1838 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1839 echo "$as_me:1839: result: $GCC_VERSION" >&5
1840 echo "${ECHO_T}$GCC_VERSION" >&6
1843 echo "$as_me:1843: checking for $CC option to accept ANSI C" >&5
1844 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1845 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1846 echo $ECHO_N "(cached) $ECHO_C" >&6
1848 ac_cv_prog_cc_stdc=no
1850 cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1855 #include <sys/types.h>
1856 #include <sys/stat.h>
1857 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1858 struct buf { int x; };
1859 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1860 static char *e (p, i)
1866 static char *f (char * (*g) (char **, int), char **p, ...)
1871 s = g (p, va_arg (v,int));
1875 int test (int i, double x);
1876 struct s1 {int (*f) (int a);};
1877 struct s2 {int (*f) (double a);};
1878 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1884 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1889 # Don't try gcc -ansi; that turns off useful extensions and
1890 # breaks some systems' header files.
1891 # AIX -qlanglvl=ansi
1892 # Ultrix and OSF/1 -std1
1893 # HP-UX 10.20 and later -Ae
1894 # HP-UX older versions -Aa -D_HPUX_SOURCE
1895 # SVR4 -Xc -D__EXTENSIONS__
1896 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1898 CC="$ac_save_CC $ac_arg"
1899 rm -f conftest.$ac_objext
1900 if { (eval echo "$as_me:1900: \"$ac_compile\"") >&5
1901 (eval $ac_compile) 2>&5
1903 echo "$as_me:1903: \$? = $ac_status" >&5
1904 (exit $ac_status); } &&
1905 { ac_try='test -s conftest.$ac_objext'
1906 { (eval echo "$as_me:1906: \"$ac_try\"") >&5
1909 echo "$as_me:1909: \$? = $ac_status" >&5
1910 (exit $ac_status); }; }; then
1911 ac_cv_prog_cc_stdc=$ac_arg
1914 echo "$as_me: failed program was:" >&5
1915 cat conftest.$ac_ext >&5
1917 rm -f conftest.$ac_objext
1919 rm -f conftest.$ac_ext conftest.$ac_objext
1924 case "x$ac_cv_prog_cc_stdc" in
1926 echo "$as_me:1926: result: none needed" >&5
1927 echo "${ECHO_T}none needed" >&6 ;;
1929 echo "$as_me:1929: result: $ac_cv_prog_cc_stdc" >&5
1930 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1931 CC="$CC $ac_cv_prog_cc_stdc" ;;
1934 # This should have been defined by AC_PROG_CC
1937 echo "$as_me:1937: checking \$CC variable" >&5
1938 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1941 echo "$as_me:1941: result: broken" >&5
1942 echo "${ECHO_T}broken" >&6
1943 { echo "$as_me:1943: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1944 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1946 cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
1947 CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
1948 for cf_arg in $cf_flags
1956 cf_new_extra_cppflags=
1958 for cf_add_cflags in $cf_flags
1960 case $cf_fix_cppflags in
1962 case $cf_add_cflags in
1963 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1964 case $cf_add_cflags in
1966 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1968 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1969 && test -z "${cf_tst_cflags}" \
1970 && cf_fix_cppflags=yes
1972 if test $cf_fix_cppflags = yes ; then
1973 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1975 elif test "${cf_tst_cflags}" = "\"'" ; then
1976 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1985 case $cf_add_cflags in
1987 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1989 CPPFLAGS=`echo "$CPPFLAGS" | \
1990 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1991 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1995 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2000 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2005 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2007 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2009 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2010 && test -z "${cf_tst_cflags}" \
2011 && cf_fix_cppflags=no
2016 if test -n "$cf_new_cflags" ; then
2018 CFLAGS="$CFLAGS $cf_new_cflags"
2021 if test -n "$cf_new_cppflags" ; then
2023 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2026 if test -n "$cf_new_extra_cppflags" ; then
2028 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2037 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2039 echo "${as_me:-configure}:2039: testing resulting CC: '$CC' ..." 1>&5
2041 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2043 echo "${as_me:-configure}:2043: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2045 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2047 echo "${as_me:-configure}:2047: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2051 echo "$as_me:2051: result: ok" >&5
2052 echo "${ECHO_T}ok" >&6
2057 ac_cpp='$CPP $CPPFLAGS'
2058 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2059 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2060 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2061 ac_main_return=return
2062 echo "$as_me:2062: checking how to run the C preprocessor" >&5
2063 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2064 # On Suns, sometimes $CPP names a directory.
2065 if test -n "$CPP" && test -d "$CPP"; then
2068 if test -z "$CPP"; then
2069 if test "${ac_cv_prog_CPP+set}" = set; then
2070 echo $ECHO_N "(cached) $ECHO_C" >&6
2072 # Double quotes because CPP needs to be expanded
2073 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2076 for ac_c_preproc_warn_flag in '' yes
2078 # Use a header file that comes with gcc, so configuring glibc
2079 # with a fresh cross-compiler works.
2080 # On the NeXT, cc -E runs the code through the compiler's parser,
2081 # not just through cpp. "Syntax error" is here to catch this case.
2082 cat >conftest.$ac_ext <<_ACEOF
2083 #line 2083 "configure"
2084 #include "confdefs.h"
2088 if { (eval echo "$as_me:2088: \"$ac_cpp conftest.$ac_ext\"") >&5
2089 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2091 egrep -v '^ *\+' conftest.er1 >conftest.err
2093 cat conftest.err >&5
2094 echo "$as_me:2094: \$? = $ac_status" >&5
2095 (exit $ac_status); } >/dev/null; then
2096 if test -s conftest.err; then
2097 ac_cpp_err=$ac_c_preproc_warn_flag
2104 if test -z "$ac_cpp_err"; then
2107 echo "$as_me: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
2109 # Broken: fails on valid input.
2112 rm -f conftest.err conftest.$ac_ext
2114 # OK, works on sane cases. Now check whether non-existent headers
2115 # can be detected and how.
2116 cat >conftest.$ac_ext <<_ACEOF
2117 #line 2117 "configure"
2118 #include "confdefs.h"
2119 #include <ac_nonexistent.h>
2121 if { (eval echo "$as_me:2121: \"$ac_cpp conftest.$ac_ext\"") >&5
2122 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2124 egrep -v '^ *\+' conftest.er1 >conftest.err
2126 cat conftest.err >&5
2127 echo "$as_me:2127: \$? = $ac_status" >&5
2128 (exit $ac_status); } >/dev/null; then
2129 if test -s conftest.err; then
2130 ac_cpp_err=$ac_c_preproc_warn_flag
2137 if test -z "$ac_cpp_err"; then
2138 # Broken: success on invalid input.
2141 echo "$as_me: failed program was:" >&5
2142 cat conftest.$ac_ext >&5
2143 # Passes both tests.
2147 rm -f conftest.err conftest.$ac_ext
2150 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2151 rm -f conftest.err conftest.$ac_ext
2152 if $ac_preproc_ok; then
2164 echo "$as_me:2164: result: $CPP" >&5
2165 echo "${ECHO_T}$CPP" >&6
2167 for ac_c_preproc_warn_flag in '' yes
2169 # Use a header file that comes with gcc, so configuring glibc
2170 # with a fresh cross-compiler works.
2171 # On the NeXT, cc -E runs the code through the compiler's parser,
2172 # not just through cpp. "Syntax error" is here to catch this case.
2173 cat >conftest.$ac_ext <<_ACEOF
2174 #line 2174 "configure"
2175 #include "confdefs.h"
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2182 egrep -v '^ *\+' conftest.er1 >conftest.err
2184 cat conftest.err >&5
2185 echo "$as_me:2185: \$? = $ac_status" >&5
2186 (exit $ac_status); } >/dev/null; then
2187 if test -s conftest.err; then
2188 ac_cpp_err=$ac_c_preproc_warn_flag
2195 if test -z "$ac_cpp_err"; then
2198 echo "$as_me: failed program was:" >&5
2199 cat conftest.$ac_ext >&5
2200 # Broken: fails on valid input.
2203 rm -f conftest.err conftest.$ac_ext
2205 # OK, works on sane cases. Now check whether non-existent headers
2206 # can be detected and how.
2207 cat >conftest.$ac_ext <<_ACEOF
2208 #line 2208 "configure"
2209 #include "confdefs.h"
2210 #include <ac_nonexistent.h>
2212 if { (eval echo "$as_me:2212: \"$ac_cpp conftest.$ac_ext\"") >&5
2213 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2215 egrep -v '^ *\+' conftest.er1 >conftest.err
2217 cat conftest.err >&5
2218 echo "$as_me:2218: \$? = $ac_status" >&5
2219 (exit $ac_status); } >/dev/null; then
2220 if test -s conftest.err; then
2221 ac_cpp_err=$ac_c_preproc_warn_flag
2228 if test -z "$ac_cpp_err"; then
2229 # Broken: success on invalid input.
2232 echo "$as_me: failed program was:" >&5
2233 cat conftest.$ac_ext >&5
2234 # Passes both tests.
2238 rm -f conftest.err conftest.$ac_ext
2241 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2242 rm -f conftest.err conftest.$ac_ext
2243 if $ac_preproc_ok; then
2246 { { echo "$as_me:2246: error: C preprocessor \"$CPP\" fails sanity check" >&5
2247 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2248 { (exit 1); exit 1; }; }
2252 ac_cpp='$CPP $CPPFLAGS'
2253 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2254 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2255 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2256 ac_main_return=return
2258 for ac_prog in mawk gawk nawk awk
2260 # Extract the first word of "$ac_prog", so it can be a program name with args.
2261 set dummy $ac_prog; ac_word=$2
2262 echo "$as_me:2262: checking for $ac_word" >&5
2263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2264 if test "${ac_cv_prog_AWK+set}" = set; then
2265 echo $ECHO_N "(cached) $ECHO_C" >&6
2267 if test -n "$AWK"; then
2268 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2270 ac_save_IFS=$IFS; IFS=$ac_path_separator
2272 for ac_dir in $ac_dummy; do
2274 test -z "$ac_dir" && ac_dir=.
2275 $as_executable_p "$ac_dir/$ac_word" || continue
2276 ac_cv_prog_AWK="$ac_prog"
2277 echo "$as_me:2277: found $ac_dir/$ac_word" >&5
2284 if test -n "$AWK"; then
2285 echo "$as_me:2285: result: $AWK" >&5
2286 echo "${ECHO_T}$AWK" >&6
2288 echo "$as_me:2288: result: no" >&5
2289 echo "${ECHO_T}no" >&6
2292 test -n "$AWK" && break
2295 # Find a good install program. We prefer a C program (faster),
2296 # so one script is as good as another. But avoid the broken or
2297 # incompatible versions:
2298 # SysV /etc/install, /usr/sbin/install
2299 # SunOS /usr/etc/install
2300 # IRIX /sbin/install
2302 # AmigaOS /C/install, which installs bootblocks on floppy discs
2303 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2304 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2305 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2306 # ./install, which can be erroneously created by make from ./install.sh.
2307 echo "$as_me:2307: checking for a BSD compatible install" >&5
2308 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2309 if test -z "$INSTALL"; then
2310 if test "${ac_cv_path_install+set}" = set; then
2311 echo $ECHO_N "(cached) $ECHO_C" >&6
2313 ac_save_IFS=$IFS; IFS=$ac_path_separator
2314 for ac_dir in $PATH; do
2316 # Account for people who put trailing slashes in PATH elements.
2318 / | ./ | .// | /cC/* \
2319 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2322 # OSF1 and SCO ODT 3.0 have their own names for install.
2323 # Don't use installbsd from OSF since it installs stuff as root
2325 for ac_prog in ginstall scoinst install; do
2326 if $as_executable_p "$ac_dir/$ac_prog"; then
2327 if test $ac_prog = install &&
2328 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2329 # AIX install. It has an incompatible calling convention.
2331 elif test $ac_prog = install &&
2332 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2333 # program-specific install script used by HP pwplus--don't use.
2336 ac_cv_path_install="$ac_dir/$ac_prog -c"
2346 if test "${ac_cv_path_install+set}" = set; then
2347 INSTALL=$ac_cv_path_install
2349 # As a last resort, use the slow shell script. We don't cache a
2350 # path for INSTALL within a source directory, because that will
2351 # break other packages using the cache if that directory is
2352 # removed, or if the path is relative.
2353 INSTALL=$ac_install_sh
2356 echo "$as_me:2356: result: $INSTALL" >&5
2357 echo "${ECHO_T}$INSTALL" >&6
2359 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2360 # It thinks the first close brace ends the variable substitution.
2361 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2363 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2365 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2371 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2372 test -z "$cf_dir" && cf_dir=.
2373 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2377 for ac_prog in lint cppcheck splint
2379 # Extract the first word of "$ac_prog", so it can be a program name with args.
2380 set dummy $ac_prog; ac_word=$2
2381 echo "$as_me:2381: checking for $ac_word" >&5
2382 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2383 if test "${ac_cv_prog_LINT+set}" = set; then
2384 echo $ECHO_N "(cached) $ECHO_C" >&6
2386 if test -n "$LINT"; then
2387 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2389 ac_save_IFS=$IFS; IFS=$ac_path_separator
2391 for ac_dir in $ac_dummy; do
2393 test -z "$ac_dir" && ac_dir=.
2394 $as_executable_p "$ac_dir/$ac_word" || continue
2395 ac_cv_prog_LINT="$ac_prog"
2396 echo "$as_me:2396: found $ac_dir/$ac_word" >&5
2402 LINT=$ac_cv_prog_LINT
2403 if test -n "$LINT"; then
2404 echo "$as_me:2404: result: $LINT" >&5
2405 echo "${ECHO_T}$LINT" >&6
2407 echo "$as_me:2407: result: no" >&5
2408 echo "${ECHO_T}no" >&6
2411 test -n "$LINT" && break
2414 echo "$as_me:2414: checking if filesystem supports mixed-case filenames" >&5
2415 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2416 if test "${cf_cv_mixedcase+set}" = set; then
2417 echo $ECHO_N "(cached) $ECHO_C" >&6
2420 if test "$cross_compiling" = yes ; then
2421 case $target_alias in
2422 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2430 rm -f conftest CONFTEST
2432 if test -f CONFTEST ; then
2437 rm -f conftest CONFTEST
2441 echo "$as_me:2441: result: $cf_cv_mixedcase" >&5
2442 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2443 test "$cf_cv_mixedcase" = yes &&
2444 cat >>confdefs.h <<\EOF
2445 #define MIXEDCASE_FILENAMES 1
2448 for ac_prog in exctags ctags
2450 # Extract the first word of "$ac_prog", so it can be a program name with args.
2451 set dummy $ac_prog; ac_word=$2
2452 echo "$as_me:2452: checking for $ac_word" >&5
2453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2454 if test "${ac_cv_prog_CTAGS+set}" = set; then
2455 echo $ECHO_N "(cached) $ECHO_C" >&6
2457 if test -n "$CTAGS"; then
2458 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2460 ac_save_IFS=$IFS; IFS=$ac_path_separator
2462 for ac_dir in $ac_dummy; do
2464 test -z "$ac_dir" && ac_dir=.
2465 $as_executable_p "$ac_dir/$ac_word" || continue
2466 ac_cv_prog_CTAGS="$ac_prog"
2467 echo "$as_me:2467: found $ac_dir/$ac_word" >&5
2473 CTAGS=$ac_cv_prog_CTAGS
2474 if test -n "$CTAGS"; then
2475 echo "$as_me:2475: result: $CTAGS" >&5
2476 echo "${ECHO_T}$CTAGS" >&6
2478 echo "$as_me:2478: result: no" >&5
2479 echo "${ECHO_T}no" >&6
2482 test -n "$CTAGS" && break
2485 for ac_prog in exetags etags
2487 # Extract the first word of "$ac_prog", so it can be a program name with args.
2488 set dummy $ac_prog; ac_word=$2
2489 echo "$as_me:2489: checking for $ac_word" >&5
2490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2491 if test "${ac_cv_prog_ETAGS+set}" = set; then
2492 echo $ECHO_N "(cached) $ECHO_C" >&6
2494 if test -n "$ETAGS"; then
2495 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2497 ac_save_IFS=$IFS; IFS=$ac_path_separator
2499 for ac_dir in $ac_dummy; do
2501 test -z "$ac_dir" && ac_dir=.
2502 $as_executable_p "$ac_dir/$ac_word" || continue
2503 ac_cv_prog_ETAGS="$ac_prog"
2504 echo "$as_me:2504: found $ac_dir/$ac_word" >&5
2510 ETAGS=$ac_cv_prog_ETAGS
2511 if test -n "$ETAGS"; then
2512 echo "$as_me:2512: result: $ETAGS" >&5
2513 echo "${ECHO_T}$ETAGS" >&6
2515 echo "$as_me:2515: result: no" >&5
2516 echo "${ECHO_T}no" >&6
2519 test -n "$ETAGS" && break
2522 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2523 set dummy ${CTAGS:-ctags}; ac_word=$2
2524 echo "$as_me:2524: checking for $ac_word" >&5
2525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2526 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2527 echo $ECHO_N "(cached) $ECHO_C" >&6
2529 if test -n "$MAKE_LOWER_TAGS"; then
2530 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2532 ac_save_IFS=$IFS; IFS=$ac_path_separator
2534 for ac_dir in $ac_dummy; do
2536 test -z "$ac_dir" && ac_dir=.
2537 $as_executable_p "$ac_dir/$ac_word" || continue
2538 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2539 echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2543 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2546 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2547 if test -n "$MAKE_LOWER_TAGS"; then
2548 echo "$as_me:2548: result: $MAKE_LOWER_TAGS" >&5
2549 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2551 echo "$as_me:2551: result: no" >&5
2552 echo "${ECHO_T}no" >&6
2555 if test "$cf_cv_mixedcase" = yes ; then
2556 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2557 set dummy ${ETAGS:-etags}; ac_word=$2
2558 echo "$as_me:2558: checking for $ac_word" >&5
2559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2560 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2561 echo $ECHO_N "(cached) $ECHO_C" >&6
2563 if test -n "$MAKE_UPPER_TAGS"; then
2564 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2566 ac_save_IFS=$IFS; IFS=$ac_path_separator
2568 for ac_dir in $ac_dummy; do
2570 test -z "$ac_dir" && ac_dir=.
2571 $as_executable_p "$ac_dir/$ac_word" || continue
2572 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2573 echo "$as_me:2573: found $ac_dir/$ac_word" >&5
2577 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2580 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2581 if test -n "$MAKE_UPPER_TAGS"; then
2582 echo "$as_me:2582: result: $MAKE_UPPER_TAGS" >&5
2583 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2585 echo "$as_me:2585: result: no" >&5
2586 echo "${ECHO_T}no" >&6
2593 if test "$MAKE_UPPER_TAGS" = yes ; then
2599 if test "$MAKE_LOWER_TAGS" = yes ; then
2605 echo "$as_me:2605: checking if -lm needed for math functions" >&5
2606 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2607 if test "${cf_cv_need_libm+set}" = set; then
2608 echo $ECHO_N "(cached) $ECHO_C" >&6
2611 cat >conftest.$ac_ext <<_ACEOF
2612 #line 2612 "configure"
2613 #include "confdefs.h"
2621 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2626 rm -f conftest.$ac_objext conftest$ac_exeext
2627 if { (eval echo "$as_me:2627: \"$ac_link\"") >&5
2628 (eval $ac_link) 2>&5
2630 echo "$as_me:2630: \$? = $ac_status" >&5
2631 (exit $ac_status); } &&
2632 { ac_try='test -s conftest$ac_exeext'
2633 { (eval echo "$as_me:2633: \"$ac_try\"") >&5
2636 echo "$as_me:2636: \$? = $ac_status" >&5
2637 (exit $ac_status); }; }; then
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2646 echo "$as_me:2646: result: $cf_cv_need_libm" >&5
2647 echo "${ECHO_T}$cf_cv_need_libm" >&6
2648 if test "$cf_cv_need_libm" = yes
2656 CC_SHARED_OPTS=unknown
2657 CPPFLAGS="$CPPFLAGS"
2659 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2660 DFT_UPR_MODEL="NORMAL"
2673 PACKAGE="ncurses-examples"
2679 TINFO_LIBS='$(LIBS_CURSES)'
2680 cf_cv_abi_version=""
2681 cf_cv_rel_version=""
2687 if test "$GCC" = yes
2689 cat > conftest.i <<EOF
2691 #define GCC_PRINTF 0
2696 #ifndef GCC_NORETURN
2697 #define GCC_NORETURN /* nothing */
2700 #define GCC_UNUSED /* nothing */
2703 if test "$GCC" = yes
2705 { echo "$as_me:2705: checking for $CC __attribute__ directives..." >&5
2706 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2708 "${as_me:-configure}"
2709 #include "confdefs.h"
2710 #include "conftest.h"
2711 #include "conftest.i"
2713 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2715 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2718 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2720 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2722 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2723 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2724 extern void foo(void) GCC_NORETURN;
2725 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2727 cf_printf_attribute=no
2728 cf_scanf_attribute=no
2729 for cf_attribute in scanf printf unused noreturn
2732 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2734 cf_directive="__attribute__(($cf_attribute))"
2735 echo "checking for $CC $cf_directive" 1>&5
2737 case $cf_attribute in
2739 cf_printf_attribute=yes
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE 1
2745 cf_scanf_attribute=yes
2746 cat >conftest.h <<EOF
2747 #define GCC_$cf_ATTRIBUTE 1
2751 cat >conftest.h <<EOF
2752 #define GCC_$cf_ATTRIBUTE $cf_directive
2757 if { (eval echo "$as_me:2757: \"$ac_compile\"") >&5
2758 (eval $ac_compile) 2>&5
2760 echo "$as_me:2760: \$? = $ac_status" >&5
2761 (exit $ac_status); }; then
2762 test -n "$verbose" && echo "$as_me:2762: result: ... $cf_attribute" >&5
2763 echo "${ECHO_T}... $cf_attribute" >&6
2764 cat conftest.h >>confdefs.h
2765 case $cf_attribute in
2768 cat >>confdefs.h <<EOF
2769 #define GCC_NORETURN $cf_directive
2774 cf_value='/* nothing */'
2775 if test "$cf_printf_attribute" != no ; then
2776 cf_value='__attribute__((format(printf,fmt,var)))'
2778 cat >>confdefs.h <<\EOF
2779 #define GCC_PRINTF 1
2784 cat >>confdefs.h <<EOF
2785 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2790 cf_value='/* nothing */'
2791 if test "$cf_scanf_attribute" != no ; then
2792 cf_value='__attribute__((format(scanf,fmt,var)))'
2794 cat >>confdefs.h <<\EOF
2800 cat >>confdefs.h <<EOF
2801 #define GCC_SCANFLIKE(fmt,var) $cf_value
2807 cat >>confdefs.h <<EOF
2808 #define GCC_UNUSED $cf_directive
2816 fgrep define conftest.i >>confdefs.h
2821 echo "$as_me:2821: checking if you want to work around bogus compiler/loader warnings" >&5
2822 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2824 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2825 if test "${enable_string_hacks+set}" = set; then
2826 enableval="$enable_string_hacks"
2827 with_string_hacks=$enableval
2829 with_string_hacks=no
2831 echo "$as_me:2831: result: $with_string_hacks" >&5
2832 echo "${ECHO_T}$with_string_hacks" >&6
2834 if test "x$with_string_hacks" = "xyes"; then
2836 cat >>confdefs.h <<\EOF
2837 #define USE_STRING_HACKS 1
2840 { echo "$as_me:2840: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2841 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2842 echo "$as_me:2842: checking for strlcat" >&5
2843 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2844 if test "${ac_cv_func_strlcat+set}" = set; then
2845 echo $ECHO_N "(cached) $ECHO_C" >&6
2847 cat >conftest.$ac_ext <<_ACEOF
2848 #line 2848 "configure"
2849 #include "confdefs.h"
2850 /* System header to define __stub macros and hopefully few prototypes,
2851 which can conflict with char strlcat (); below. */
2853 /* Override any gcc2 internal prototype to avoid an error. */
2857 /* We use char because int might match the return type of a gcc2
2858 builtin and then its argument prototype would still apply. */
2865 /* The GNU C library defines this for functions which it implements
2866 to always fail with ENOSYS. Some functions are actually named
2867 something starting with __ and the normal name is an alias. */
2868 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2871 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
2878 rm -f conftest.$ac_objext conftest$ac_exeext
2879 if { (eval echo "$as_me:2879: \"$ac_link\"") >&5
2880 (eval $ac_link) 2>&5
2882 echo "$as_me:2882: \$? = $ac_status" >&5
2883 (exit $ac_status); } &&
2884 { ac_try='test -s conftest$ac_exeext'
2885 { (eval echo "$as_me:2885: \"$ac_try\"") >&5
2888 echo "$as_me:2888: \$? = $ac_status" >&5
2889 (exit $ac_status); }; }; then
2890 ac_cv_func_strlcat=yes
2892 echo "$as_me: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 ac_cv_func_strlcat=no
2896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2898 echo "$as_me:2898: result: $ac_cv_func_strlcat" >&5
2899 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
2900 if test $ac_cv_func_strlcat = yes; then
2904 echo "$as_me:2904: checking for strlcat in -lbsd" >&5
2905 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
2906 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
2907 echo $ECHO_N "(cached) $ECHO_C" >&6
2909 ac_check_lib_save_LIBS=$LIBS
2911 cat >conftest.$ac_ext <<_ACEOF
2912 #line 2912 "configure"
2913 #include "confdefs.h"
2915 /* Override any gcc2 internal prototype to avoid an error. */
2919 /* We use char because int might match the return type of a gcc2
2920 builtin and then its argument prototype would still apply. */
2930 rm -f conftest.$ac_objext conftest$ac_exeext
2931 if { (eval echo "$as_me:2931: \"$ac_link\"") >&5
2932 (eval $ac_link) 2>&5
2934 echo "$as_me:2934: \$? = $ac_status" >&5
2935 (exit $ac_status); } &&
2936 { ac_try='test -s conftest$ac_exeext'
2937 { (eval echo "$as_me:2937: \"$ac_try\"") >&5
2940 echo "$as_me:2940: \$? = $ac_status" >&5
2941 (exit $ac_status); }; }; then
2942 ac_cv_lib_bsd_strlcat=yes
2944 echo "$as_me: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
2946 ac_cv_lib_bsd_strlcat=no
2948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2949 LIBS=$ac_check_lib_save_LIBS
2951 echo "$as_me:2951: result: $ac_cv_lib_bsd_strlcat" >&5
2952 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
2953 if test $ac_cv_lib_bsd_strlcat = yes; then
2956 # Filter out duplicates - this happens with badly-designed ".pc" files...
2957 for cf_add_1lib in $LIBS
2959 for cf_add_2lib in $cf_add_libs
2961 if test "x$cf_add_1lib" = "x$cf_add_2lib"
2967 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
2971 for ac_header in bsd/string.h
2973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2974 echo "$as_me:2974: checking for $ac_header" >&5
2975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
2977 echo $ECHO_N "(cached) $ECHO_C" >&6
2979 cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <$ac_header>
2984 if { (eval echo "$as_me:2984: \"$ac_cpp conftest.$ac_ext\"") >&5
2985 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2987 egrep -v '^ *\+' conftest.er1 >conftest.err
2989 cat conftest.err >&5
2990 echo "$as_me:2990: \$? = $ac_status" >&5
2991 (exit $ac_status); } >/dev/null; then
2992 if test -s conftest.err; then
2993 ac_cpp_err=$ac_c_preproc_warn_flag
3000 if test -z "$ac_cpp_err"; then
3001 eval "$as_ac_Header=yes"
3003 echo "$as_me: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 eval "$as_ac_Header=no"
3007 rm -f conftest.err conftest.$ac_ext
3009 echo "$as_me:3009: result: `eval echo '${'$as_ac_Header'}'`" >&5
3010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3012 cat >>confdefs.h <<EOF
3013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3019 cat >>confdefs.h <<\EOF
3020 #define HAVE_STRLCAT 1
3027 for ac_func in strlcpy snprintf
3029 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3030 echo "$as_me:3030: checking for $ac_func" >&5
3031 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3032 if eval "test \"\${$as_ac_var+set}\" = set"; then
3033 echo $ECHO_N "(cached) $ECHO_C" >&6
3035 cat >conftest.$ac_ext <<_ACEOF
3036 #line 3036 "configure"
3037 #include "confdefs.h"
3038 /* System header to define __stub macros and hopefully few prototypes,
3039 which can conflict with char $ac_func (); below. */
3041 /* Override any gcc2 internal prototype to avoid an error. */
3045 /* We use char because int might match the return type of a gcc2
3046 builtin and then its argument prototype would still apply. */
3053 /* The GNU C library defines this for functions which it implements
3054 to always fail with ENOSYS. Some functions are actually named
3055 something starting with __ and the normal name is an alias. */
3056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3059 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3066 rm -f conftest.$ac_objext conftest$ac_exeext
3067 if { (eval echo "$as_me:3067: \"$ac_link\"") >&5
3068 (eval $ac_link) 2>&5
3070 echo "$as_me:3070: \$? = $ac_status" >&5
3071 (exit $ac_status); } &&
3072 { ac_try='test -s conftest$ac_exeext'
3073 { (eval echo "$as_me:3073: \"$ac_try\"") >&5
3076 echo "$as_me:3076: \$? = $ac_status" >&5
3077 (exit $ac_status); }; }; then
3078 eval "$as_ac_var=yes"
3080 echo "$as_me: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3082 eval "$as_ac_var=no"
3084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3086 echo "$as_me:3086: result: `eval echo '${'$as_ac_var'}'`" >&5
3087 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3088 if test `eval echo '${'$as_ac_var'}'` = yes; then
3089 cat >>confdefs.h <<EOF
3090 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3099 cf_POSIX_C_SOURCE=199506L
3104 cf_xopen_source="-D_ALL_SOURCE"
3110 cf_xopen_source="-D_APPLE_C_SOURCE"
3113 cf_xopen_source="-D_DARWIN_C_SOURCE"
3116 (freebsd*|dragonfly*)
3117 # 5.x headers associate
3118 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3119 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3120 cf_POSIX_C_SOURCE=200112L
3122 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3125 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3128 cf_xopen_source="-D_HPUX_SOURCE"
3131 cf_xopen_source="-D_SGI_SOURCE"
3134 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3136 echo "$as_me:3136: checking if we must define _GNU_SOURCE" >&5
3137 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3138 if test "${cf_cv_gnu_source+set}" = set; then
3139 echo $ECHO_N "(cached) $ECHO_C" >&6
3142 cat >conftest.$ac_ext <<_ACEOF
3143 #line 3143 "configure"
3144 #include "confdefs.h"
3145 #include <sys/types.h>
3150 #ifndef _XOPEN_SOURCE
3157 rm -f conftest.$ac_objext
3158 if { (eval echo "$as_me:3158: \"$ac_compile\"") >&5
3159 (eval $ac_compile) 2>&5
3161 echo "$as_me:3161: \$? = $ac_status" >&5
3162 (exit $ac_status); } &&
3163 { ac_try='test -s conftest.$ac_objext'
3164 { (eval echo "$as_me:3164: \"$ac_try\"") >&5
3167 echo "$as_me:3167: \$? = $ac_status" >&5
3168 (exit $ac_status); }; }; then
3171 echo "$as_me: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3174 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3175 cat >conftest.$ac_ext <<_ACEOF
3176 #line 3176 "configure"
3177 #include "confdefs.h"
3178 #include <sys/types.h>
3183 #ifdef _XOPEN_SOURCE
3190 rm -f conftest.$ac_objext
3191 if { (eval echo "$as_me:3191: \"$ac_compile\"") >&5
3192 (eval $ac_compile) 2>&5
3194 echo "$as_me:3194: \$? = $ac_status" >&5
3195 (exit $ac_status); } &&
3196 { ac_try='test -s conftest.$ac_objext'
3197 { (eval echo "$as_me:3197: \"$ac_try\"") >&5
3200 echo "$as_me:3200: \$? = $ac_status" >&5
3201 (exit $ac_status); }; }; then
3204 echo "$as_me: failed program was:" >&5
3205 cat conftest.$ac_ext >&5
3206 cf_cv_gnu_source=yes
3208 rm -f conftest.$ac_objext conftest.$ac_ext
3212 rm -f conftest.$ac_objext conftest.$ac_ext
3215 echo "$as_me:3215: result: $cf_cv_gnu_source" >&5
3216 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3218 if test "$cf_cv_gnu_source" = yes
3220 echo "$as_me:3220: checking if we should also define _DEFAULT_SOURCE" >&5
3221 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3222 if test "${cf_cv_default_source+set}" = set; then
3223 echo $ECHO_N "(cached) $ECHO_C" >&6
3226 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3227 cat >conftest.$ac_ext <<_ACEOF
3228 #line 3228 "configure"
3229 #include "confdefs.h"
3230 #include <sys/types.h>
3235 #ifdef _DEFAULT_SOURCE
3242 rm -f conftest.$ac_objext
3243 if { (eval echo "$as_me:3243: \"$ac_compile\"") >&5
3244 (eval $ac_compile) 2>&5
3246 echo "$as_me:3246: \$? = $ac_status" >&5
3247 (exit $ac_status); } &&
3248 { ac_try='test -s conftest.$ac_objext'
3249 { (eval echo "$as_me:3249: \"$ac_try\"") >&5
3252 echo "$as_me:3252: \$? = $ac_status" >&5
3253 (exit $ac_status); }; }; then
3254 cf_cv_default_source=no
3256 echo "$as_me: failed program was:" >&5
3257 cat conftest.$ac_ext >&5
3258 cf_cv_default_source=yes
3260 rm -f conftest.$ac_objext conftest.$ac_ext
3263 echo "$as_me:3263: result: $cf_cv_default_source" >&5
3264 echo "${ECHO_T}$cf_cv_default_source" >&6
3265 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3270 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3273 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3276 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3278 cf_save_CFLAGS="$CFLAGS"
3279 cf_save_CPPFLAGS="$CPPFLAGS"
3281 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3282 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3283 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3285 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3286 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3287 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3289 echo "$as_me:3289: checking if we should define _POSIX_C_SOURCE" >&5
3290 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3291 if test "${cf_cv_posix_c_source+set}" = set; then
3292 echo $ECHO_N "(cached) $ECHO_C" >&6
3295 echo "${as_me:-configure}:3295: testing if the symbol is already defined go no further ..." 1>&5
3297 cat >conftest.$ac_ext <<_ACEOF
3298 #line 3298 "configure"
3299 #include "confdefs.h"
3300 #include <sys/types.h>
3305 #ifndef _POSIX_C_SOURCE
3312 rm -f conftest.$ac_objext
3313 if { (eval echo "$as_me:3313: \"$ac_compile\"") >&5
3314 (eval $ac_compile) 2>&5
3316 echo "$as_me:3316: \$? = $ac_status" >&5
3317 (exit $ac_status); } &&
3318 { ac_try='test -s conftest.$ac_objext'
3319 { (eval echo "$as_me:3319: \"$ac_try\"") >&5
3322 echo "$as_me:3322: \$? = $ac_status" >&5
3323 (exit $ac_status); }; }; then
3324 cf_cv_posix_c_source=no
3326 echo "$as_me: failed program was:" >&5
3327 cat conftest.$ac_ext >&5
3328 cf_want_posix_source=no
3329 case .$cf_POSIX_C_SOURCE in
3331 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3334 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3335 cf_want_posix_source=yes
3338 cf_want_posix_source=yes
3341 if test "$cf_want_posix_source" = yes ; then
3342 cat >conftest.$ac_ext <<_ACEOF
3343 #line 3343 "configure"
3344 #include "confdefs.h"
3345 #include <sys/types.h>
3350 #ifdef _POSIX_SOURCE
3357 rm -f conftest.$ac_objext
3358 if { (eval echo "$as_me:3358: \"$ac_compile\"") >&5
3359 (eval $ac_compile) 2>&5
3361 echo "$as_me:3361: \$? = $ac_status" >&5
3362 (exit $ac_status); } &&
3363 { ac_try='test -s conftest.$ac_objext'
3364 { (eval echo "$as_me:3364: \"$ac_try\"") >&5
3367 echo "$as_me:3367: \$? = $ac_status" >&5
3368 (exit $ac_status); }; }; then
3371 echo "$as_me: failed program was:" >&5
3372 cat conftest.$ac_ext >&5
3373 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3375 rm -f conftest.$ac_objext conftest.$ac_ext
3378 echo "${as_me:-configure}:3378: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3380 CFLAGS="$cf_trim_CFLAGS"
3381 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3383 echo "${as_me:-configure}:3383: testing if the second compile does not leave our definition intact error ..." 1>&5
3385 cat >conftest.$ac_ext <<_ACEOF
3386 #line 3386 "configure"
3387 #include "confdefs.h"
3388 #include <sys/types.h>
3393 #ifndef _POSIX_C_SOURCE
3400 rm -f conftest.$ac_objext
3401 if { (eval echo "$as_me:3401: \"$ac_compile\"") >&5
3402 (eval $ac_compile) 2>&5
3404 echo "$as_me:3404: \$? = $ac_status" >&5
3405 (exit $ac_status); } &&
3406 { ac_try='test -s conftest.$ac_objext'
3407 { (eval echo "$as_me:3407: \"$ac_try\"") >&5
3410 echo "$as_me:3410: \$? = $ac_status" >&5
3411 (exit $ac_status); }; }; then
3414 echo "$as_me: failed program was:" >&5
3415 cat conftest.$ac_ext >&5
3416 cf_cv_posix_c_source=no
3418 rm -f conftest.$ac_objext conftest.$ac_ext
3419 CFLAGS="$cf_save_CFLAGS"
3420 CPPFLAGS="$cf_save_CPPFLAGS"
3423 rm -f conftest.$ac_objext conftest.$ac_ext
3426 echo "$as_me:3426: result: $cf_cv_posix_c_source" >&5
3427 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3429 if test "$cf_cv_posix_c_source" != no ; then
3430 CFLAGS="$cf_trim_CFLAGS"
3431 CPPFLAGS="$cf_trim_CPPFLAGS"
3436 cf_new_extra_cppflags=
3438 for cf_add_cflags in $cf_cv_posix_c_source
3440 case $cf_fix_cppflags in
3442 case $cf_add_cflags in
3443 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3444 case $cf_add_cflags in
3446 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3448 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3449 && test -z "${cf_tst_cflags}" \
3450 && cf_fix_cppflags=yes
3452 if test $cf_fix_cppflags = yes ; then
3453 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3455 elif test "${cf_tst_cflags}" = "\"'" ; then
3456 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3465 case $cf_add_cflags in
3467 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3469 CPPFLAGS=`echo "$CPPFLAGS" | \
3470 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3471 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3475 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3480 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3485 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3487 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3489 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3490 && test -z "${cf_tst_cflags}" \
3491 && cf_fix_cppflags=no
3496 if test -n "$cf_new_cflags" ; then
3498 CFLAGS="$CFLAGS $cf_new_cflags"
3501 if test -n "$cf_new_cppflags" ; then
3503 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3506 if test -n "$cf_new_extra_cppflags" ; then
3508 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3515 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3518 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3519 cf_xopen_source="-D_BSD_SOURCE"
3523 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3526 cf_xopen_source="-D_OSF_SOURCE"
3529 cf_xopen_source="-D_QNX_SOURCE"
3532 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3535 cf_xopen_source="-D__EXTENSIONS__"
3536 cf_cv_xopen_source=broken
3538 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3544 echo "$as_me:3544: checking if we should define _XOPEN_SOURCE" >&5
3545 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3546 if test "${cf_cv_xopen_source+set}" = set; then
3547 echo $ECHO_N "(cached) $ECHO_C" >&6
3550 cat >conftest.$ac_ext <<_ACEOF
3551 #line 3551 "configure"
3552 #include "confdefs.h"
3556 #include <sys/types.h>
3562 #ifndef _XOPEN_SOURCE
3569 rm -f conftest.$ac_objext
3570 if { (eval echo "$as_me:3570: \"$ac_compile\"") >&5
3571 (eval $ac_compile) 2>&5
3573 echo "$as_me:3573: \$? = $ac_status" >&5
3574 (exit $ac_status); } &&
3575 { ac_try='test -s conftest.$ac_objext'
3576 { (eval echo "$as_me:3576: \"$ac_try\"") >&5
3579 echo "$as_me:3579: \$? = $ac_status" >&5
3580 (exit $ac_status); }; }; then
3581 cf_cv_xopen_source=no
3583 echo "$as_me: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3586 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3587 cat >conftest.$ac_ext <<_ACEOF
3588 #line 3588 "configure"
3589 #include "confdefs.h"
3593 #include <sys/types.h>
3599 #ifdef _XOPEN_SOURCE
3606 rm -f conftest.$ac_objext
3607 if { (eval echo "$as_me:3607: \"$ac_compile\"") >&5
3608 (eval $ac_compile) 2>&5
3610 echo "$as_me:3610: \$? = $ac_status" >&5
3611 (exit $ac_status); } &&
3612 { ac_try='test -s conftest.$ac_objext'
3613 { (eval echo "$as_me:3613: \"$ac_try\"") >&5
3616 echo "$as_me:3616: \$? = $ac_status" >&5
3617 (exit $ac_status); }; }; then
3618 cf_cv_xopen_source=no
3620 echo "$as_me: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
3622 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3624 rm -f conftest.$ac_objext conftest.$ac_ext
3628 rm -f conftest.$ac_objext conftest.$ac_ext
3631 echo "$as_me:3631: result: $cf_cv_xopen_source" >&5
3632 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3634 if test "$cf_cv_xopen_source" != no ; then
3636 CFLAGS=`echo "$CFLAGS" | \
3637 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3638 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3640 CPPFLAGS=`echo "$CPPFLAGS" | \
3641 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3642 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3644 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3649 cf_new_extra_cppflags=
3651 for cf_add_cflags in $cf_temp_xopen_source
3653 case $cf_fix_cppflags in
3655 case $cf_add_cflags in
3656 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3657 case $cf_add_cflags in
3659 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3661 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3662 && test -z "${cf_tst_cflags}" \
3663 && cf_fix_cppflags=yes
3665 if test $cf_fix_cppflags = yes ; then
3666 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3668 elif test "${cf_tst_cflags}" = "\"'" ; then
3669 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3678 case $cf_add_cflags in
3680 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3682 CPPFLAGS=`echo "$CPPFLAGS" | \
3683 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3684 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3688 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3693 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3698 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3700 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3702 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3703 && test -z "${cf_tst_cflags}" \
3704 && cf_fix_cppflags=no
3709 if test -n "$cf_new_cflags" ; then
3711 CFLAGS="$CFLAGS $cf_new_cflags"
3714 if test -n "$cf_new_cppflags" ; then
3716 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3719 if test -n "$cf_new_extra_cppflags" ; then
3721 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3726 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3728 cf_save_CFLAGS="$CFLAGS"
3729 cf_save_CPPFLAGS="$CPPFLAGS"
3731 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3732 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3733 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3735 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3736 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3737 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3739 echo "$as_me:3739: checking if we should define _POSIX_C_SOURCE" >&5
3740 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3741 if test "${cf_cv_posix_c_source+set}" = set; then
3742 echo $ECHO_N "(cached) $ECHO_C" >&6
3745 echo "${as_me:-configure}:3745: testing if the symbol is already defined go no further ..." 1>&5
3747 cat >conftest.$ac_ext <<_ACEOF
3748 #line 3748 "configure"
3749 #include "confdefs.h"
3750 #include <sys/types.h>
3755 #ifndef _POSIX_C_SOURCE
3762 rm -f conftest.$ac_objext
3763 if { (eval echo "$as_me:3763: \"$ac_compile\"") >&5
3764 (eval $ac_compile) 2>&5
3766 echo "$as_me:3766: \$? = $ac_status" >&5
3767 (exit $ac_status); } &&
3768 { ac_try='test -s conftest.$ac_objext'
3769 { (eval echo "$as_me:3769: \"$ac_try\"") >&5
3772 echo "$as_me:3772: \$? = $ac_status" >&5
3773 (exit $ac_status); }; }; then
3774 cf_cv_posix_c_source=no
3776 echo "$as_me: failed program was:" >&5
3777 cat conftest.$ac_ext >&5
3778 cf_want_posix_source=no
3779 case .$cf_POSIX_C_SOURCE in
3781 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3784 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3785 cf_want_posix_source=yes
3788 cf_want_posix_source=yes
3791 if test "$cf_want_posix_source" = yes ; then
3792 cat >conftest.$ac_ext <<_ACEOF
3793 #line 3793 "configure"
3794 #include "confdefs.h"
3795 #include <sys/types.h>
3800 #ifdef _POSIX_SOURCE
3807 rm -f conftest.$ac_objext
3808 if { (eval echo "$as_me:3808: \"$ac_compile\"") >&5
3809 (eval $ac_compile) 2>&5
3811 echo "$as_me:3811: \$? = $ac_status" >&5
3812 (exit $ac_status); } &&
3813 { ac_try='test -s conftest.$ac_objext'
3814 { (eval echo "$as_me:3814: \"$ac_try\"") >&5
3817 echo "$as_me:3817: \$? = $ac_status" >&5
3818 (exit $ac_status); }; }; then
3821 echo "$as_me: failed program was:" >&5
3822 cat conftest.$ac_ext >&5
3823 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3825 rm -f conftest.$ac_objext conftest.$ac_ext
3828 echo "${as_me:-configure}:3828: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3830 CFLAGS="$cf_trim_CFLAGS"
3831 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3833 echo "${as_me:-configure}:3833: testing if the second compile does not leave our definition intact error ..." 1>&5
3835 cat >conftest.$ac_ext <<_ACEOF
3836 #line 3836 "configure"
3837 #include "confdefs.h"
3838 #include <sys/types.h>
3843 #ifndef _POSIX_C_SOURCE
3850 rm -f conftest.$ac_objext
3851 if { (eval echo "$as_me:3851: \"$ac_compile\"") >&5
3852 (eval $ac_compile) 2>&5
3854 echo "$as_me:3854: \$? = $ac_status" >&5
3855 (exit $ac_status); } &&
3856 { ac_try='test -s conftest.$ac_objext'
3857 { (eval echo "$as_me:3857: \"$ac_try\"") >&5
3860 echo "$as_me:3860: \$? = $ac_status" >&5
3861 (exit $ac_status); }; }; then
3864 echo "$as_me: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3866 cf_cv_posix_c_source=no
3868 rm -f conftest.$ac_objext conftest.$ac_ext
3869 CFLAGS="$cf_save_CFLAGS"
3870 CPPFLAGS="$cf_save_CPPFLAGS"
3873 rm -f conftest.$ac_objext conftest.$ac_ext
3876 echo "$as_me:3876: result: $cf_cv_posix_c_source" >&5
3877 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3879 if test "$cf_cv_posix_c_source" != no ; then
3880 CFLAGS="$cf_trim_CFLAGS"
3881 CPPFLAGS="$cf_trim_CPPFLAGS"
3886 cf_new_extra_cppflags=
3888 for cf_add_cflags in $cf_cv_posix_c_source
3890 case $cf_fix_cppflags in
3892 case $cf_add_cflags in
3893 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3894 case $cf_add_cflags in
3896 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3898 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3899 && test -z "${cf_tst_cflags}" \
3900 && cf_fix_cppflags=yes
3902 if test $cf_fix_cppflags = yes ; then
3903 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3905 elif test "${cf_tst_cflags}" = "\"'" ; then
3906 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3915 case $cf_add_cflags in
3917 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3919 CPPFLAGS=`echo "$CPPFLAGS" | \
3920 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3921 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3925 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3930 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3935 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3940 && test -z "${cf_tst_cflags}" \
3941 && cf_fix_cppflags=no
3946 if test -n "$cf_new_cflags" ; then
3948 CFLAGS="$CFLAGS $cf_new_cflags"
3951 if test -n "$cf_new_cppflags" ; then
3953 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3956 if test -n "$cf_new_extra_cppflags" ; then
3958 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3966 if test -n "$cf_xopen_source" ; then
3971 cf_new_extra_cppflags=
3973 for cf_add_cflags in $cf_xopen_source
3975 case $cf_fix_cppflags in
3977 case $cf_add_cflags in
3978 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3979 case $cf_add_cflags in
3981 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3984 && test -z "${cf_tst_cflags}" \
3985 && cf_fix_cppflags=yes
3987 if test $cf_fix_cppflags = yes ; then
3988 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3990 elif test "${cf_tst_cflags}" = "\"'" ; then
3991 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4000 case $cf_add_cflags in
4002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4004 CPPFLAGS=`echo "$CPPFLAGS" | \
4005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4010 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4015 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4020 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4022 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4025 && test -z "${cf_tst_cflags}" \
4026 && cf_fix_cppflags=no
4031 if test -n "$cf_new_cflags" ; then
4032 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4034 echo "${as_me:-configure}:4034: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4036 CFLAGS="$CFLAGS $cf_new_cflags"
4039 if test -n "$cf_new_cppflags" ; then
4040 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4042 echo "${as_me:-configure}:4042: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4044 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4047 if test -n "$cf_new_extra_cppflags" ; then
4048 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4050 echo "${as_me:-configure}:4050: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4052 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4057 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4058 echo "$as_me:4058: checking if _XOPEN_SOURCE really is set" >&5
4059 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4060 cat >conftest.$ac_ext <<_ACEOF
4061 #line 4061 "configure"
4062 #include "confdefs.h"
4068 #ifndef _XOPEN_SOURCE
4075 rm -f conftest.$ac_objext
4076 if { (eval echo "$as_me:4076: \"$ac_compile\"") >&5
4077 (eval $ac_compile) 2>&5
4079 echo "$as_me:4079: \$? = $ac_status" >&5
4080 (exit $ac_status); } &&
4081 { ac_try='test -s conftest.$ac_objext'
4082 { (eval echo "$as_me:4082: \"$ac_try\"") >&5
4085 echo "$as_me:4085: \$? = $ac_status" >&5
4086 (exit $ac_status); }; }; then
4087 cf_XOPEN_SOURCE_set=yes
4089 echo "$as_me: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 cf_XOPEN_SOURCE_set=no
4093 rm -f conftest.$ac_objext conftest.$ac_ext
4094 echo "$as_me:4094: result: $cf_XOPEN_SOURCE_set" >&5
4095 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4096 if test $cf_XOPEN_SOURCE_set = yes
4098 cat >conftest.$ac_ext <<_ACEOF
4099 #line 4099 "configure"
4100 #include "confdefs.h"
4106 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4113 rm -f conftest.$ac_objext
4114 if { (eval echo "$as_me:4114: \"$ac_compile\"") >&5
4115 (eval $ac_compile) 2>&5
4117 echo "$as_me:4117: \$? = $ac_status" >&5
4118 (exit $ac_status); } &&
4119 { ac_try='test -s conftest.$ac_objext'
4120 { (eval echo "$as_me:4120: \"$ac_try\"") >&5
4123 echo "$as_me:4123: \$? = $ac_status" >&5
4124 (exit $ac_status); }; }; then
4125 cf_XOPEN_SOURCE_set_ok=yes
4127 echo "$as_me: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129 cf_XOPEN_SOURCE_set_ok=no
4131 rm -f conftest.$ac_objext conftest.$ac_ext
4132 if test $cf_XOPEN_SOURCE_set_ok = no
4134 { echo "$as_me:4134: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4135 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4139 echo "$as_me:4139: checking if we should define _XOPEN_SOURCE" >&5
4140 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4141 if test "${cf_cv_xopen_source+set}" = set; then
4142 echo $ECHO_N "(cached) $ECHO_C" >&6
4145 cat >conftest.$ac_ext <<_ACEOF
4146 #line 4146 "configure"
4147 #include "confdefs.h"
4151 #include <sys/types.h>
4157 #ifndef _XOPEN_SOURCE
4164 rm -f conftest.$ac_objext
4165 if { (eval echo "$as_me:4165: \"$ac_compile\"") >&5
4166 (eval $ac_compile) 2>&5
4168 echo "$as_me:4168: \$? = $ac_status" >&5
4169 (exit $ac_status); } &&
4170 { ac_try='test -s conftest.$ac_objext'
4171 { (eval echo "$as_me:4171: \"$ac_try\"") >&5
4174 echo "$as_me:4174: \$? = $ac_status" >&5
4175 (exit $ac_status); }; }; then
4176 cf_cv_xopen_source=no
4178 echo "$as_me: failed program was:" >&5
4179 cat conftest.$ac_ext >&5
4181 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4182 cat >conftest.$ac_ext <<_ACEOF
4183 #line 4183 "configure"
4184 #include "confdefs.h"
4188 #include <sys/types.h>
4194 #ifdef _XOPEN_SOURCE
4201 rm -f conftest.$ac_objext
4202 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203 (eval $ac_compile) 2>&5
4205 echo "$as_me:4205: \$? = $ac_status" >&5
4206 (exit $ac_status); } &&
4207 { ac_try='test -s conftest.$ac_objext'
4208 { (eval echo "$as_me:4208: \"$ac_try\"") >&5
4211 echo "$as_me:4211: \$? = $ac_status" >&5
4212 (exit $ac_status); }; }; then
4213 cf_cv_xopen_source=no
4215 echo "$as_me: failed program was:" >&5
4216 cat conftest.$ac_ext >&5
4217 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4219 rm -f conftest.$ac_objext conftest.$ac_ext
4223 rm -f conftest.$ac_objext conftest.$ac_ext
4226 echo "$as_me:4226: result: $cf_cv_xopen_source" >&5
4227 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4229 if test "$cf_cv_xopen_source" != no ; then
4231 CFLAGS=`echo "$CFLAGS" | \
4232 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4233 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4235 CPPFLAGS=`echo "$CPPFLAGS" | \
4236 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4237 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4239 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4244 cf_new_extra_cppflags=
4246 for cf_add_cflags in $cf_temp_xopen_source
4248 case $cf_fix_cppflags in
4250 case $cf_add_cflags in
4251 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4252 case $cf_add_cflags in
4254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4257 && test -z "${cf_tst_cflags}" \
4258 && cf_fix_cppflags=yes
4260 if test $cf_fix_cppflags = yes ; then
4261 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4263 elif test "${cf_tst_cflags}" = "\"'" ; then
4264 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4273 case $cf_add_cflags in
4275 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4277 CPPFLAGS=`echo "$CPPFLAGS" | \
4278 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4279 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4283 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4288 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4293 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4295 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4298 && test -z "${cf_tst_cflags}" \
4299 && cf_fix_cppflags=no
4304 if test -n "$cf_new_cflags" ; then
4306 CFLAGS="$CFLAGS $cf_new_cflags"
4309 if test -n "$cf_new_cppflags" ; then
4311 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4314 if test -n "$cf_new_extra_cppflags" ; then
4316 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4324 echo "$as_me:4324: checking for signal global datatype" >&5
4325 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4326 if test "${cf_cv_sig_atomic_t+set}" = set; then
4327 echo $ECHO_N "(cached) $ECHO_C" >&6
4331 "volatile sig_atomic_t" \
4335 cat >conftest.$ac_ext <<_ACEOF
4336 #line 4336 "configure"
4337 #include "confdefs.h"
4339 #include <sys/types.h>
4345 static void handler(int sig)
4352 signal(SIGINT, handler);
4358 rm -f conftest.$ac_objext
4359 if { (eval echo "$as_me:4359: \"$ac_compile\"") >&5
4360 (eval $ac_compile) 2>&5
4362 echo "$as_me:4362: \$? = $ac_status" >&5
4363 (exit $ac_status); } &&
4364 { ac_try='test -s conftest.$ac_objext'
4365 { (eval echo "$as_me:4365: \"$ac_try\"") >&5
4368 echo "$as_me:4368: \$? = $ac_status" >&5
4369 (exit $ac_status); }; }; then
4370 cf_cv_sig_atomic_t=$cf_type
4372 echo "$as_me: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 cf_cv_sig_atomic_t=no
4376 rm -f conftest.$ac_objext conftest.$ac_ext
4377 test "$cf_cv_sig_atomic_t" != no && break
4382 echo "$as_me:4382: result: $cf_cv_sig_atomic_t" >&5
4383 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4384 test "$cf_cv_sig_atomic_t" != no &&
4385 cat >>confdefs.h <<EOF
4386 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4389 # Work around breakage on OS X
4391 echo "$as_me:4391: checking if SIGWINCH is defined" >&5
4392 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4393 if test "${cf_cv_define_sigwinch+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
4397 cat >conftest.$ac_ext <<_ACEOF
4398 #line 4398 "configure"
4399 #include "confdefs.h"
4401 #include <sys/types.h>
4402 #include <sys/signal.h>
4412 rm -f conftest.$ac_objext
4413 if { (eval echo "$as_me:4413: \"$ac_compile\"") >&5
4414 (eval $ac_compile) 2>&5
4416 echo "$as_me:4416: \$? = $ac_status" >&5
4417 (exit $ac_status); } &&
4418 { ac_try='test -s conftest.$ac_objext'
4419 { (eval echo "$as_me:4419: \"$ac_try\"") >&5
4422 echo "$as_me:4422: \$? = $ac_status" >&5
4423 (exit $ac_status); }; }; then
4424 cf_cv_define_sigwinch=yes
4426 echo "$as_me: failed program was:" >&5
4427 cat conftest.$ac_ext >&5
4428 cat >conftest.$ac_ext <<_ACEOF
4429 #line 4429 "configure"
4430 #include "confdefs.h"
4432 #undef _XOPEN_SOURCE
4433 #undef _POSIX_SOURCE
4434 #undef _POSIX_C_SOURCE
4435 #include <sys/types.h>
4436 #include <sys/signal.h>
4446 rm -f conftest.$ac_objext
4447 if { (eval echo "$as_me:4447: \"$ac_compile\"") >&5
4448 (eval $ac_compile) 2>&5
4450 echo "$as_me:4450: \$? = $ac_status" >&5
4451 (exit $ac_status); } &&
4452 { ac_try='test -s conftest.$ac_objext'
4453 { (eval echo "$as_me:4453: \"$ac_try\"") >&5
4456 echo "$as_me:4456: \$? = $ac_status" >&5
4457 (exit $ac_status); }; }; then
4458 cf_cv_define_sigwinch=maybe
4460 echo "$as_me: failed program was:" >&5
4461 cat conftest.$ac_ext >&5
4462 cf_cv_define_sigwinch=no
4464 rm -f conftest.$ac_objext conftest.$ac_ext
4467 rm -f conftest.$ac_objext conftest.$ac_ext
4470 echo "$as_me:4470: result: $cf_cv_define_sigwinch" >&5
4471 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4473 if test "$cf_cv_define_sigwinch" = maybe ; then
4474 echo "$as_me:4474: checking for actual SIGWINCH definition" >&5
4475 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4476 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4477 echo $ECHO_N "(cached) $ECHO_C" >&6
4480 cf_cv_fixup_sigwinch=unknown
4482 while test $cf_sigwinch != 1
4484 cat >conftest.$ac_ext <<_ACEOF
4485 #line 4485 "configure"
4486 #include "confdefs.h"
4488 #undef _XOPEN_SOURCE
4489 #undef _POSIX_SOURCE
4490 #undef _POSIX_C_SOURCE
4491 #include <sys/types.h>
4492 #include <sys/signal.h>
4498 #if SIGWINCH != $cf_sigwinch
4506 rm -f conftest.$ac_objext
4507 if { (eval echo "$as_me:4507: \"$ac_compile\"") >&5
4508 (eval $ac_compile) 2>&5
4510 echo "$as_me:4510: \$? = $ac_status" >&5
4511 (exit $ac_status); } &&
4512 { ac_try='test -s conftest.$ac_objext'
4513 { (eval echo "$as_me:4513: \"$ac_try\"") >&5
4516 echo "$as_me:4516: \$? = $ac_status" >&5
4517 (exit $ac_status); }; }; then
4518 cf_cv_fixup_sigwinch=$cf_sigwinch
4521 echo "$as_me: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4524 rm -f conftest.$ac_objext conftest.$ac_ext
4526 cf_sigwinch=`expr $cf_sigwinch - 1`
4530 echo "$as_me:4530: result: $cf_cv_fixup_sigwinch" >&5
4531 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4533 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4534 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4538 # Checks for CODESET support.
4540 echo "$as_me:4540: checking for nl_langinfo and CODESET" >&5
4541 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4542 if test "${am_cv_langinfo_codeset+set}" = set; then
4543 echo $ECHO_N "(cached) $ECHO_C" >&6
4545 cat >conftest.$ac_ext <<_ACEOF
4546 #line 4546 "configure"
4547 #include "confdefs.h"
4548 #include <langinfo.h>
4552 char* cs = nl_langinfo(CODESET);
4557 rm -f conftest.$ac_objext conftest$ac_exeext
4558 if { (eval echo "$as_me:4558: \"$ac_link\"") >&5
4559 (eval $ac_link) 2>&5
4561 echo "$as_me:4561: \$? = $ac_status" >&5
4562 (exit $ac_status); } &&
4563 { ac_try='test -s conftest$ac_exeext'
4564 { (eval echo "$as_me:4564: \"$ac_try\"") >&5
4567 echo "$as_me:4567: \$? = $ac_status" >&5
4568 (exit $ac_status); }; }; then
4569 am_cv_langinfo_codeset=yes
4571 echo "$as_me: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 am_cv_langinfo_codeset=no
4575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4578 echo "$as_me:4578: result: $am_cv_langinfo_codeset" >&5
4579 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4580 if test $am_cv_langinfo_codeset = yes; then
4582 cat >>confdefs.h <<\EOF
4583 #define HAVE_LANGINFO_CODESET 1
4588 echo "$as_me:4588: checking if you want to use pkg-config" >&5
4589 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4591 # Check whether --with-pkg-config or --without-pkg-config was given.
4592 if test "${with_pkg_config+set}" = set; then
4593 withval="$with_pkg_config"
4594 cf_pkg_config=$withval
4598 echo "$as_me:4598: result: $cf_pkg_config" >&5
4599 echo "${ECHO_T}$cf_pkg_config" >&6
4601 case $cf_pkg_config in
4607 if test -n "$ac_tool_prefix"; then
4608 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4609 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4610 echo "$as_me:4610: checking for $ac_word" >&5
4611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4612 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4613 echo $ECHO_N "(cached) $ECHO_C" >&6
4617 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4620 ac_save_IFS=$IFS; IFS=$ac_path_separator
4622 for ac_dir in $ac_dummy; do
4624 test -z "$ac_dir" && ac_dir=.
4625 if $as_executable_p "$ac_dir/$ac_word"; then
4626 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4627 echo "$as_me:4627: found $ac_dir/$ac_word" >&5
4635 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4637 if test -n "$PKG_CONFIG"; then
4638 echo "$as_me:4638: result: $PKG_CONFIG" >&5
4639 echo "${ECHO_T}$PKG_CONFIG" >&6
4641 echo "$as_me:4641: result: no" >&5
4642 echo "${ECHO_T}no" >&6
4646 if test -z "$ac_cv_path_PKG_CONFIG"; then
4647 ac_pt_PKG_CONFIG=$PKG_CONFIG
4648 # Extract the first word of "pkg-config", so it can be a program name with args.
4649 set dummy pkg-config; ac_word=$2
4650 echo "$as_me:4650: checking for $ac_word" >&5
4651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4652 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4655 case $ac_pt_PKG_CONFIG in
4657 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4660 ac_save_IFS=$IFS; IFS=$ac_path_separator
4662 for ac_dir in $ac_dummy; do
4664 test -z "$ac_dir" && ac_dir=.
4665 if $as_executable_p "$ac_dir/$ac_word"; then
4666 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4667 echo "$as_me:4667: found $ac_dir/$ac_word" >&5
4672 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4676 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4678 if test -n "$ac_pt_PKG_CONFIG"; then
4679 echo "$as_me:4679: result: $ac_pt_PKG_CONFIG" >&5
4680 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4682 echo "$as_me:4682: result: no" >&5
4683 echo "${ECHO_T}no" >&6
4686 PKG_CONFIG=$ac_pt_PKG_CONFIG
4688 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4697 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4698 if test "$PKG_CONFIG" != none ; then
4700 if test "x$prefix" != xNONE; then
4701 cf_path_syntax="$prefix"
4703 cf_path_syntax="$ac_default_prefix"
4706 case ".$PKG_CONFIG" in
4711 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4713 (.\${*prefix}*|.\${*dir}*)
4714 eval PKG_CONFIG="$PKG_CONFIG"
4715 case ".$PKG_CONFIG" in
4717 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4722 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4725 { { echo "$as_me:4725: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4726 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4727 { (exit 1); exit 1; }; }
4731 elif test "x$cf_pkg_config" != xno ; then
4732 { echo "$as_me:4732: WARNING: pkg-config is not installed" >&5
4733 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4736 echo "$as_me:4736: checking if you want to see long compiling messages" >&5
4737 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4739 # Check whether --enable-echo or --disable-echo was given.
4740 if test "${enable_echo+set}" = set; then
4741 enableval="$enable_echo"
4742 test "$enableval" != no && enableval=yes
4743 if test "$enableval" != "yes" ; then
4746 ECHO_LD='@echo linking $@;'
4747 RULE_CC='@echo compiling $<'
4748 SHOW_CC='@echo compiling $@'
4770 echo "$as_me:4770: result: $enableval" >&5
4771 echo "${ECHO_T}$enableval" >&6
4773 echo "$as_me:4773: checking for ncurses wrap-prefix" >&5
4774 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4776 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4777 if test "${with_ncurses_wrap_prefix+set}" = set; then
4778 withval="$with_ncurses_wrap_prefix"
4779 NCURSES_WRAP_PREFIX=$withval
4781 NCURSES_WRAP_PREFIX=_nc_
4783 echo "$as_me:4783: result: $NCURSES_WRAP_PREFIX" >&5
4784 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4786 echo "$as_me:4786: checking if you want to check for wide-character functions" >&5
4787 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4789 # Check whether --enable-widec or --disable-widec was given.
4790 if test "${enable_widec+set}" = set; then
4791 enableval="$enable_widec"
4792 test "$enableval" != no && enableval=yes
4793 if test "$enableval" != "yes" ; then
4803 echo "$as_me:4803: result: $cf_enable_widec" >&5
4804 echo "${ECHO_T}$cf_enable_widec" >&6
4806 echo "$as_me:4806: checking for specific curses-directory" >&5
4807 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4809 # Check whether --with-curses-dir or --without-curses-dir was given.
4810 if test "${with_curses_dir+set}" = set; then
4811 withval="$with_curses_dir"
4812 cf_cv_curses_dir=$withval
4816 echo "$as_me:4816: result: $cf_cv_curses_dir" >&5
4817 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4819 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4822 if test "x$prefix" != xNONE; then
4823 cf_path_syntax="$prefix"
4825 cf_path_syntax="$ac_default_prefix"
4833 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4835 (.\${*prefix}*|.\${*dir}*)
4836 eval withval="$withval"
4839 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4844 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4847 { { echo "$as_me:4847: error: expected a pathname, not \"$withval\"" >&5
4848 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4849 { (exit 1); exit 1; }; }
4853 if test -d "$cf_cv_curses_dir"
4856 if test -n "$cf_cv_curses_dir/include" ; then
4857 for cf_add_incdir in $cf_cv_curses_dir/include
4859 while test $cf_add_incdir != /usr/include
4861 if test -d $cf_add_incdir
4864 if test -n "$CFLAGS$CPPFLAGS" ; then
4865 # a loop is needed to ensure we can add subdirs of existing dirs
4866 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4867 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4868 cf_have_incdir=yes; break
4873 if test "$cf_have_incdir" = no ; then
4874 if test "$cf_add_incdir" = /usr/local/include ; then
4875 if test "$GCC" = yes
4877 cf_save_CPPFLAGS=$CPPFLAGS
4878 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4879 cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4891 rm -f conftest.$ac_objext
4892 if { (eval echo "$as_me:4892: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>&5
4895 echo "$as_me:4895: \$? = $ac_status" >&5
4896 (exit $ac_status); } &&
4897 { ac_try='test -s conftest.$ac_objext'
4898 { (eval echo "$as_me:4898: \"$ac_try\"") >&5
4901 echo "$as_me:4901: \$? = $ac_status" >&5
4902 (exit $ac_status); }; }; then
4905 echo "$as_me: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
4909 rm -f conftest.$ac_objext conftest.$ac_ext
4910 CPPFLAGS=$cf_save_CPPFLAGS
4915 if test "$cf_have_incdir" = no ; then
4916 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4918 echo "${as_me:-configure}:4918: testing adding $cf_add_incdir to include-path ..." 1>&5
4920 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4922 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4923 test "$cf_top_incdir" = "$cf_add_incdir" && break
4924 cf_add_incdir="$cf_top_incdir"
4935 if test -n "$cf_cv_curses_dir/lib" ; then
4936 for cf_add_libdir in $cf_cv_curses_dir/lib
4938 if test $cf_add_libdir = /usr/lib ; then
4940 elif test -d $cf_add_libdir
4943 if test -n "$LDFLAGS$LIBS" ; then
4944 # a loop is needed to ensure we can add subdirs of existing dirs
4945 for cf_test_libdir in $LDFLAGS $LIBS ; do
4946 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4947 cf_have_libdir=yes; break
4951 if test "$cf_have_libdir" = no ; then
4952 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4954 echo "${as_me:-configure}:4954: testing adding $cf_add_libdir to library-path ..." 1>&5
4956 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4967 echo "$as_me:4967: checking for specified curses library type" >&5
4968 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4970 # Check whether --with-screen or --without-screen was given.
4971 if test "${with_screen+set}" = set; then
4972 withval="$with_screen"
4973 cf_cv_screen=$withval
4976 # Check whether --with-ncursesw or --without-ncursesw was given.
4977 if test "${with_ncursesw+set}" = set; then
4978 withval="$with_ncursesw"
4979 cf_cv_screen=ncursesw
4982 # Check whether --with-ncurses or --without-ncurses was given.
4983 if test "${with_ncurses+set}" = set; then
4984 withval="$with_ncurses"
4985 cf_cv_screen=ncurses
4988 # Check whether --with-pdcurses or --without-pdcurses was given.
4989 if test "${with_pdcurses+set}" = set; then
4990 withval="$with_pdcurses"
4991 cf_cv_screen=pdcurses
4994 # Check whether --with-curses-colr or --without-curses-colr was given.
4995 if test "${with_curses_colr+set}" = set; then
4996 withval="$with_curses_colr"
4997 cf_cv_screen=curses_colr
5000 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5001 if test "${with_curses_5lib+set}" = set; then
5002 withval="$with_curses_5lib"
5003 cf_cv_screen=curses_5lib
5011 echo "$as_me:5011: result: $cf_cv_screen" >&5
5012 echo "${ECHO_T}$cf_cv_screen" >&6
5014 case $cf_cv_screen in
5017 echo "$as_me:5017: checking for extra include directories" >&5
5018 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5019 if test "${cf_cv_curses_incdir+set}" = set; then
5020 echo $ECHO_N "(cached) $ECHO_C" >&6
5023 cf_cv_curses_incdir=no
5026 if test "x$cf_cv_screen" = "xcurses_colr"
5028 test -d /usr/include/curses_colr && \
5029 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5033 if test "x$cf_cv_screen" = "xcurses_5lib"
5035 test -d /usr/5lib && \
5036 test -d /usr/5include && \
5037 cf_cv_curses_incdir="-I/usr/5include"
5043 echo "$as_me:5043: result: $cf_cv_curses_incdir" >&5
5044 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5045 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5047 echo "$as_me:5047: checking if we have identified curses headers" >&5
5048 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5049 if test "${cf_cv_ncurses_header+set}" = set; then
5050 echo $ECHO_N "(cached) $ECHO_C" >&6
5053 cf_cv_ncurses_header=none
5056 curses.h ncurses/ncurses.h ncurses/curses.h
5058 cat >conftest.$ac_ext <<_ACEOF
5059 #line 5059 "configure"
5060 #include "confdefs.h"
5061 #include <${cf_header}>
5065 initscr(); tgoto("?", 0,0)
5070 rm -f conftest.$ac_objext
5071 if { (eval echo "$as_me:5071: \"$ac_compile\"") >&5
5072 (eval $ac_compile) 2>&5
5074 echo "$as_me:5074: \$? = $ac_status" >&5
5075 (exit $ac_status); } &&
5076 { ac_try='test -s conftest.$ac_objext'
5077 { (eval echo "$as_me:5077: \"$ac_try\"") >&5
5080 echo "$as_me:5080: \$? = $ac_status" >&5
5081 (exit $ac_status); }; }; then
5082 cf_cv_ncurses_header=$cf_header; break
5084 echo "$as_me: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5087 rm -f conftest.$ac_objext conftest.$ac_ext
5091 echo "$as_me:5091: result: $cf_cv_ncurses_header" >&5
5092 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5094 if test "$cf_cv_ncurses_header" = none ; then
5095 { { echo "$as_me:5095: error: No curses header-files found" >&5
5096 echo "$as_me: error: No curses header-files found" >&2;}
5097 { (exit 1); exit 1; }; }
5100 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5102 for ac_header in $cf_cv_ncurses_header
5104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5105 echo "$as_me:5105: checking for $ac_header" >&5
5106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5108 echo $ECHO_N "(cached) $ECHO_C" >&6
5110 cat >conftest.$ac_ext <<_ACEOF
5111 #line 5111 "configure"
5112 #include "confdefs.h"
5113 #include <$ac_header>
5115 if { (eval echo "$as_me:5115: \"$ac_cpp conftest.$ac_ext\"") >&5
5116 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5118 egrep -v '^ *\+' conftest.er1 >conftest.err
5120 cat conftest.err >&5
5121 echo "$as_me:5121: \$? = $ac_status" >&5
5122 (exit $ac_status); } >/dev/null; then
5123 if test -s conftest.err; then
5124 ac_cpp_err=$ac_c_preproc_warn_flag
5131 if test -z "$ac_cpp_err"; then
5132 eval "$as_ac_Header=yes"
5134 echo "$as_me: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 eval "$as_ac_Header=no"
5138 rm -f conftest.err conftest.$ac_ext
5140 echo "$as_me:5140: result: `eval echo '${'$as_ac_Header'}'`" >&5
5141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5143 cat >>confdefs.h <<EOF
5144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5150 echo "$as_me:5150: checking for terminfo header" >&5
5151 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5152 if test "${cf_cv_term_header+set}" = set; then
5153 echo $ECHO_N "(cached) $ECHO_C" >&6
5156 case ${cf_cv_ncurses_header} in
5157 (*/ncurses.h|*/ncursesw.h)
5158 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5161 cf_term_header=term.h
5165 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5167 cat >conftest.$ac_ext <<_ACEOF
5168 #line 5168 "configure"
5169 #include "confdefs.h"
5171 #include <${cf_cv_ncurses_header:-curses.h}>
5177 int x = auto_left_margin
5182 rm -f conftest.$ac_objext
5183 if { (eval echo "$as_me:5183: \"$ac_compile\"") >&5
5184 (eval $ac_compile) 2>&5
5186 echo "$as_me:5186: \$? = $ac_status" >&5
5187 (exit $ac_status); } &&
5188 { ac_try='test -s conftest.$ac_objext'
5189 { (eval echo "$as_me:5189: \"$ac_try\"") >&5
5192 echo "$as_me:5192: \$? = $ac_status" >&5
5193 (exit $ac_status); }; }; then
5195 cf_cv_term_header="$cf_test"
5197 echo "$as_me: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5200 cf_cv_term_header=unknown
5203 rm -f conftest.$ac_objext conftest.$ac_ext
5204 test "$cf_cv_term_header" != unknown && break
5208 echo "$as_me:5208: result: $cf_cv_term_header" >&5
5209 echo "${ECHO_T}$cf_cv_term_header" >&6
5211 # Set definitions to allow ifdef'ing to accommodate subdirectories
5213 case $cf_cv_term_header in
5216 cat >>confdefs.h <<\EOF
5217 #define HAVE_TERM_H 1
5223 case $cf_cv_term_header in
5226 cat >>confdefs.h <<\EOF
5227 #define HAVE_NCURSES_TERM_H 1
5233 cat >>confdefs.h <<\EOF
5234 #define HAVE_NCURSESW_TERM_H 1
5240 echo "$as_me:5240: checking for ncurses version" >&5
5241 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5242 if test "${cf_cv_ncurses_version+set}" = set; then
5243 echo $ECHO_N "(cached) $ECHO_C" >&6
5246 cf_cv_ncurses_version=no
5249 if test "$cross_compiling" = yes; then
5251 # This will not work if the preprocessor splits the line after the
5252 # Autoconf token. The 'unproto' program does that.
5253 cat > conftest.$ac_ext <<EOF
5254 #include <${cf_cv_ncurses_header:-curses.h}>
5256 #ifdef NCURSES_VERSION
5257 Autoconf NCURSES_VERSION
5265 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5266 { (eval echo "$as_me:5266: \"$cf_try\"") >&5
5269 echo "$as_me:5269: \$? = $ac_status" >&5
5270 (exit $ac_status); }
5271 if test -f conftest.out ; then
5272 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5273 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5278 cat >conftest.$ac_ext <<_ACEOF
5279 #line 5279 "configure"
5280 #include "confdefs.h"
5282 #include <${cf_cv_ncurses_header:-curses.h}>
5286 FILE *fp = fopen("$cf_tempfile", "w");
5287 #ifdef NCURSES_VERSION
5288 # ifdef NCURSES_VERSION_PATCH
5289 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5291 fprintf(fp, "%s\n", NCURSES_VERSION);
5295 fprintf(fp, "old\n");
5300 ${cf_cv_main_return:-return}(0);
5303 rm -f conftest$ac_exeext
5304 if { (eval echo "$as_me:5304: \"$ac_link\"") >&5
5305 (eval $ac_link) 2>&5
5307 echo "$as_me:5307: \$? = $ac_status" >&5
5308 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5309 { (eval echo "$as_me:5309: \"$ac_try\"") >&5
5312 echo "$as_me:5312: \$? = $ac_status" >&5
5313 (exit $ac_status); }; }; then
5315 cf_cv_ncurses_version=`cat $cf_tempfile`
5317 echo "$as_me: program exited with status $ac_status" >&5
5318 echo "$as_me: failed program was:" >&5
5319 cat conftest.$ac_ext >&5
5321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5326 echo "$as_me:5326: result: $cf_cv_ncurses_version" >&5
5327 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5328 test "$cf_cv_ncurses_version" = no ||
5329 cat >>confdefs.h <<\EOF
5333 echo "$as_me:5333: checking if we have identified curses libraries" >&5
5334 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5335 cat >conftest.$ac_ext <<_ACEOF
5336 #line 5336 "configure"
5337 #include "confdefs.h"
5338 #include <${cf_cv_ncurses_header:-curses.h}>
5342 initscr(); tgoto("?", 0,0)
5347 rm -f conftest.$ac_objext conftest$ac_exeext
5348 if { (eval echo "$as_me:5348: \"$ac_link\"") >&5
5349 (eval $ac_link) 2>&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit $ac_status); } &&
5353 { ac_try='test -s conftest$ac_exeext'
5354 { (eval echo "$as_me:5354: \"$ac_try\"") >&5
5357 echo "$as_me:5357: \$? = $ac_status" >&5
5358 (exit $ac_status); }; }; then
5361 echo "$as_me: failed program was:" >&5
5362 cat conftest.$ac_ext >&5
5365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5366 echo "$as_me:5366: result: $cf_result" >&5
5367 echo "${ECHO_T}$cf_result" >&6
5369 if test "$cf_result" = no ; then
5372 echo "$as_me:5372: checking for tgoto in -lmytinfo" >&5
5373 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5374 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5375 echo $ECHO_N "(cached) $ECHO_C" >&6
5377 ac_check_lib_save_LIBS=$LIBS
5378 LIBS="-lmytinfo $LIBS"
5379 cat >conftest.$ac_ext <<_ACEOF
5380 #line 5380 "configure"
5381 #include "confdefs.h"
5383 /* Override any gcc2 internal prototype to avoid an error. */
5387 /* We use char because int might match the return type of a gcc2
5388 builtin and then its argument prototype would still apply. */
5398 rm -f conftest.$ac_objext conftest$ac_exeext
5399 if { (eval echo "$as_me:5399: \"$ac_link\"") >&5
5400 (eval $ac_link) 2>&5
5402 echo "$as_me:5402: \$? = $ac_status" >&5
5403 (exit $ac_status); } &&
5404 { ac_try='test -s conftest$ac_exeext'
5405 { (eval echo "$as_me:5405: \"$ac_try\"") >&5
5408 echo "$as_me:5408: \$? = $ac_status" >&5
5409 (exit $ac_status); }; }; then
5410 ac_cv_lib_mytinfo_tgoto=yes
5412 echo "$as_me: failed program was:" >&5
5413 cat conftest.$ac_ext >&5
5414 ac_cv_lib_mytinfo_tgoto=no
5416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5417 LIBS=$ac_check_lib_save_LIBS
5419 echo "$as_me:5419: result: $ac_cv_lib_mytinfo_tgoto" >&5
5420 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5421 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5423 cf_add_libs="-lmytinfo"
5424 # Filter out duplicates - this happens with badly-designed ".pc" files...
5425 for cf_add_1lib in $LIBS
5427 for cf_add_2lib in $cf_add_libs
5429 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5435 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5443 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5444 # next (1998), and xcurses "newer" (2000). There is no header file for
5445 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5446 # term.h) for cur_colr
5447 if test "x$cf_cv_screen" = "xcurses_colr"
5449 echo "$as_me:5449: checking for initscr in -lcur_colr" >&5
5450 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5451 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5452 echo $ECHO_N "(cached) $ECHO_C" >&6
5454 ac_check_lib_save_LIBS=$LIBS
5455 LIBS="-lcur_colr $LIBS"
5456 cat >conftest.$ac_ext <<_ACEOF
5457 #line 5457 "configure"
5458 #include "confdefs.h"
5460 /* Override any gcc2 internal prototype to avoid an error. */
5464 /* We use char because int might match the return type of a gcc2
5465 builtin and then its argument prototype would still apply. */
5475 rm -f conftest.$ac_objext conftest$ac_exeext
5476 if { (eval echo "$as_me:5476: \"$ac_link\"") >&5
5477 (eval $ac_link) 2>&5
5479 echo "$as_me:5479: \$? = $ac_status" >&5
5480 (exit $ac_status); } &&
5481 { ac_try='test -s conftest$ac_exeext'
5482 { (eval echo "$as_me:5482: \"$ac_try\"") >&5
5485 echo "$as_me:5485: \$? = $ac_status" >&5
5486 (exit $ac_status); }; }; then
5487 ac_cv_lib_cur_colr_initscr=yes
5489 echo "$as_me: failed program was:" >&5
5490 cat conftest.$ac_ext >&5
5491 ac_cv_lib_cur_colr_initscr=no
5493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5494 LIBS=$ac_check_lib_save_LIBS
5496 echo "$as_me:5496: result: $ac_cv_lib_cur_colr_initscr" >&5
5497 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5498 if test $ac_cv_lib_cur_colr_initscr = yes; then
5500 cf_add_libs="-lcur_colr"
5501 # Filter out duplicates - this happens with badly-designed ".pc" files...
5502 for cf_add_1lib in $LIBS
5504 for cf_add_2lib in $cf_add_libs
5506 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5512 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5516 ac_cv_func_initscr=yes
5520 echo "$as_me:5520: checking for initscr in -lHcurses" >&5
5521 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5522 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5523 echo $ECHO_N "(cached) $ECHO_C" >&6
5525 ac_check_lib_save_LIBS=$LIBS
5526 LIBS="-lHcurses $LIBS"
5527 cat >conftest.$ac_ext <<_ACEOF
5528 #line 5528 "configure"
5529 #include "confdefs.h"
5531 /* Override any gcc2 internal prototype to avoid an error. */
5535 /* We use char because int might match the return type of a gcc2
5536 builtin and then its argument prototype would still apply. */
5546 rm -f conftest.$ac_objext conftest$ac_exeext
5547 if { (eval echo "$as_me:5547: \"$ac_link\"") >&5
5548 (eval $ac_link) 2>&5
5550 echo "$as_me:5550: \$? = $ac_status" >&5
5551 (exit $ac_status); } &&
5552 { ac_try='test -s conftest$ac_exeext'
5553 { (eval echo "$as_me:5553: \"$ac_try\"") >&5
5556 echo "$as_me:5556: \$? = $ac_status" >&5
5557 (exit $ac_status); }; }; then
5558 ac_cv_lib_Hcurses_initscr=yes
5560 echo "$as_me: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 ac_cv_lib_Hcurses_initscr=no
5564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5565 LIBS=$ac_check_lib_save_LIBS
5567 echo "$as_me:5567: result: $ac_cv_lib_Hcurses_initscr" >&5
5568 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5569 if test $ac_cv_lib_Hcurses_initscr = yes; then
5571 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5573 cf_add_libs="-lHcurses"
5574 # Filter out duplicates - this happens with badly-designed ".pc" files...
5575 for cf_add_1lib in $LIBS
5577 for cf_add_2lib in $cf_add_libs
5579 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5585 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5589 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5590 ac_cv_func_initscr=yes
5599 case `arch 2>/dev/null` in
5604 if test -n "/lib64" ; then
5605 for cf_add_libdir in /lib64
5607 if test $cf_add_libdir = /usr/lib ; then
5609 elif test -d $cf_add_libdir
5612 if test -n "$LDFLAGS$LIBS" ; then
5613 # a loop is needed to ensure we can add subdirs of existing dirs
5614 for cf_test_libdir in $LDFLAGS $LIBS ; do
5615 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5616 cf_have_libdir=yes; break
5620 if test "$cf_have_libdir" = no ; then
5621 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5623 echo "${as_me:-configure}:5623: testing adding $cf_add_libdir to library-path ..." 1>&5
5625 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5633 if test -n "/lib" ; then
5634 for cf_add_libdir in /lib
5636 if test $cf_add_libdir = /usr/lib ; then
5638 elif test -d $cf_add_libdir
5641 if test -n "$LDFLAGS$LIBS" ; then
5642 # a loop is needed to ensure we can add subdirs of existing dirs
5643 for cf_test_libdir in $LDFLAGS $LIBS ; do
5644 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5645 cf_have_libdir=yes; break
5649 if test "$cf_have_libdir" = no ; then
5650 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5652 echo "${as_me:-configure}:5652: testing adding $cf_add_libdir to library-path ..." 1>&5
5654 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5664 if test -n "/lib" ; then
5665 for cf_add_libdir in /lib
5667 if test $cf_add_libdir = /usr/lib ; then
5669 elif test -d $cf_add_libdir
5672 if test -n "$LDFLAGS$LIBS" ; then
5673 # a loop is needed to ensure we can add subdirs of existing dirs
5674 for cf_test_libdir in $LDFLAGS $LIBS ; do
5675 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5676 cf_have_libdir=yes; break
5680 if test "$cf_have_libdir" = no ; then
5681 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5683 echo "${as_me:-configure}:5683: testing adding $cf_add_libdir to library-path ..." 1>&5
5685 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5695 if test "x$cf_cv_screen" = "xcurses_5lib"
5697 if test -d /usr/5lib ; then
5699 if test -n "/usr/5lib" ; then
5700 for cf_add_libdir in /usr/5lib
5702 if test $cf_add_libdir = /usr/lib ; then
5704 elif test -d $cf_add_libdir
5707 if test -n "$LDFLAGS$LIBS" ; then
5708 # a loop is needed to ensure we can add subdirs of existing dirs
5709 for cf_test_libdir in $LDFLAGS $LIBS ; do
5710 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5711 cf_have_libdir=yes; break
5715 if test "$cf_have_libdir" = no ; then
5716 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5718 echo "${as_me:-configure}:5718: testing adding $cf_add_libdir to library-path ..." 1>&5
5720 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5726 cf_add_libs="-lcurses -ltermcap"
5727 # Filter out duplicates - this happens with badly-designed ".pc" files...
5728 for cf_add_1lib in $LIBS
5730 for cf_add_2lib in $cf_add_libs
5732 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5744 ac_cv_func_initscr=yes
5748 if test ".$ac_cv_func_initscr" != .yes ; then
5749 cf_save_LIBS="$LIBS"
5751 if test ".${cf_cv_ncurses_version:-no}" != .no
5753 cf_check_list="ncurses curses cursesX"
5755 cf_check_list="cursesX curses ncurses"
5758 # Check for library containing tgoto. Do this before curses library
5759 # because it may be needed to link the test-case for initscr.
5760 if test "x$cf_term_lib" = x
5762 echo "$as_me:5762: checking for tgoto" >&5
5763 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5764 if test "${ac_cv_func_tgoto+set}" = set; then
5765 echo $ECHO_N "(cached) $ECHO_C" >&6
5767 cat >conftest.$ac_ext <<_ACEOF
5768 #line 5768 "configure"
5769 #include "confdefs.h"
5770 /* System header to define __stub macros and hopefully few prototypes,
5771 which can conflict with char tgoto (); below. */
5773 /* Override any gcc2 internal prototype to avoid an error. */
5777 /* We use char because int might match the return type of a gcc2
5778 builtin and then its argument prototype would still apply. */
5785 /* The GNU C library defines this for functions which it implements
5786 to always fail with ENOSYS. Some functions are actually named
5787 something starting with __ and the normal name is an alias. */
5788 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5791 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5798 rm -f conftest.$ac_objext conftest$ac_exeext
5799 if { (eval echo "$as_me:5799: \"$ac_link\"") >&5
5800 (eval $ac_link) 2>&5
5802 echo "$as_me:5802: \$? = $ac_status" >&5
5803 (exit $ac_status); } &&
5804 { ac_try='test -s conftest$ac_exeext'
5805 { (eval echo "$as_me:5805: \"$ac_try\"") >&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit $ac_status); }; }; then
5810 ac_cv_func_tgoto=yes
5812 echo "$as_me: failed program was:" >&5
5813 cat conftest.$ac_ext >&5
5816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5818 echo "$as_me:5818: result: $ac_cv_func_tgoto" >&5
5819 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5820 if test $ac_cv_func_tgoto = yes; then
5821 cf_term_lib=predefined
5824 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5826 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5827 echo "$as_me:5827: checking for tgoto in -l$cf_term_lib" >&5
5828 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5829 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5830 echo $ECHO_N "(cached) $ECHO_C" >&6
5832 ac_check_lib_save_LIBS=$LIBS
5833 LIBS="-l$cf_term_lib $LIBS"
5834 cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5838 /* Override any gcc2 internal prototype to avoid an error. */
5842 /* We use char because int might match the return type of a gcc2
5843 builtin and then its argument prototype would still apply. */
5853 rm -f conftest.$ac_objext conftest$ac_exeext
5854 if { (eval echo "$as_me:5854: \"$ac_link\"") >&5
5855 (eval $ac_link) 2>&5
5857 echo "$as_me:5857: \$? = $ac_status" >&5
5858 (exit $ac_status); } &&
5859 { ac_try='test -s conftest$ac_exeext'
5860 { (eval echo "$as_me:5860: \"$ac_try\"") >&5
5863 echo "$as_me:5863: \$? = $ac_status" >&5
5864 (exit $ac_status); }; }; then
5865 eval "$as_ac_Lib=yes"
5867 echo "$as_me: failed program was:" >&5
5868 cat conftest.$ac_ext >&5
5869 eval "$as_ac_Lib=no"
5871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5872 LIBS=$ac_check_lib_save_LIBS
5874 echo "$as_me:5874: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5875 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5876 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5886 # Check for library containing initscr
5887 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5888 if test "x$cf_curs_lib" = x
5890 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5892 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5893 echo "$as_me:5893: checking for initscr in -l$cf_curs_lib" >&5
5894 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5895 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5896 echo $ECHO_N "(cached) $ECHO_C" >&6
5898 ac_check_lib_save_LIBS=$LIBS
5899 LIBS="-l$cf_curs_lib $LIBS"
5900 cat >conftest.$ac_ext <<_ACEOF
5901 #line 5901 "configure"
5902 #include "confdefs.h"
5904 /* Override any gcc2 internal prototype to avoid an error. */
5908 /* We use char because int might match the return type of a gcc2
5909 builtin and then its argument prototype would still apply. */
5919 rm -f conftest.$ac_objext conftest$ac_exeext
5920 if { (eval echo "$as_me:5920: \"$ac_link\"") >&5
5921 (eval $ac_link) 2>&5
5923 echo "$as_me:5923: \$? = $ac_status" >&5
5924 (exit $ac_status); } &&
5925 { ac_try='test -s conftest$ac_exeext'
5926 { (eval echo "$as_me:5926: \"$ac_try\"") >&5
5929 echo "$as_me:5929: \$? = $ac_status" >&5
5930 (exit $ac_status); }; }; then
5931 eval "$as_ac_Lib=yes"
5933 echo "$as_me: failed program was:" >&5
5934 cat conftest.$ac_ext >&5
5935 eval "$as_ac_Lib=no"
5937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5938 LIBS=$ac_check_lib_save_LIBS
5940 echo "$as_me:5940: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5941 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5942 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5948 test $cf_curs_lib = unknown && { { echo "$as_me:5948: error: no curses library found" >&5
5949 echo "$as_me: error: no curses library found" >&2;}
5950 { (exit 1); exit 1; }; }
5952 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5953 if test "$cf_term_lib" = unknown ; then
5954 echo "$as_me:5954: checking if we can link with $cf_curs_lib library" >&5
5955 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5956 cat >conftest.$ac_ext <<_ACEOF
5957 #line 5957 "configure"
5958 #include "confdefs.h"
5959 #include <${cf_cv_ncurses_header:-curses.h}>
5968 rm -f conftest.$ac_objext conftest$ac_exeext
5969 if { (eval echo "$as_me:5969: \"$ac_link\"") >&5
5970 (eval $ac_link) 2>&5
5972 echo "$as_me:5972: \$? = $ac_status" >&5
5973 (exit $ac_status); } &&
5974 { ac_try='test -s conftest$ac_exeext'
5975 { (eval echo "$as_me:5975: \"$ac_try\"") >&5
5978 echo "$as_me:5978: \$? = $ac_status" >&5
5979 (exit $ac_status); }; }; then
5982 echo "$as_me: failed program was:" >&5
5983 cat conftest.$ac_ext >&5
5986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5987 echo "$as_me:5987: result: $cf_result" >&5
5988 echo "${ECHO_T}$cf_result" >&6
5989 test $cf_result = no && { { echo "$as_me:5989: error: Cannot link curses library" >&5
5990 echo "$as_me: error: Cannot link curses library" >&2;}
5991 { (exit 1); exit 1; }; }
5992 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5994 elif test "$cf_term_lib" != predefined ; then
5995 echo "$as_me:5995: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5996 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5997 cat >conftest.$ac_ext <<_ACEOF
5998 #line 5998 "configure"
5999 #include "confdefs.h"
6000 #include <${cf_cv_ncurses_header:-curses.h}>
6004 initscr(); tgoto((char *)0, 0, 0);
6009 rm -f conftest.$ac_objext conftest$ac_exeext
6010 if { (eval echo "$as_me:6010: \"$ac_link\"") >&5
6011 (eval $ac_link) 2>&5
6013 echo "$as_me:6013: \$? = $ac_status" >&5
6014 (exit $ac_status); } &&
6015 { ac_try='test -s conftest$ac_exeext'
6016 { (eval echo "$as_me:6016: \"$ac_try\"") >&5
6019 echo "$as_me:6019: \$? = $ac_status" >&5
6020 (exit $ac_status); }; }; then
6023 echo "$as_me: failed program was:" >&5
6024 cat conftest.$ac_ext >&5
6026 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6027 cat >conftest.$ac_ext <<_ACEOF
6028 #line 6028 "configure"
6029 #include "confdefs.h"
6030 #include <${cf_cv_ncurses_header:-curses.h}>
6039 rm -f conftest.$ac_objext conftest$ac_exeext
6040 if { (eval echo "$as_me:6040: \"$ac_link\"") >&5
6041 (eval $ac_link) 2>&5
6043 echo "$as_me:6043: \$? = $ac_status" >&5
6044 (exit $ac_status); } &&
6045 { ac_try='test -s conftest$ac_exeext'
6046 { (eval echo "$as_me:6046: \"$ac_try\"") >&5
6049 echo "$as_me:6049: \$? = $ac_status" >&5
6050 (exit $ac_status); }; }; then
6053 echo "$as_me: failed program was:" >&5
6054 cat conftest.$ac_ext >&5
6057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6061 echo "$as_me:6061: result: $cf_result" >&5
6062 echo "${ECHO_T}$cf_result" >&6
6070 echo "$as_me:6070: checking for multibyte character support" >&5
6071 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6072 if test "${cf_cv_utf8_lib+set}" = set; then
6073 echo $ECHO_N "(cached) $ECHO_C" >&6
6076 cf_save_LIBS="$LIBS"
6077 cat >conftest.$ac_ext <<_ACEOF
6078 #line 6078 "configure"
6079 #include "confdefs.h"
6090 rm -f conftest.$ac_objext conftest$ac_exeext
6091 if { (eval echo "$as_me:6091: \"$ac_link\"") >&5
6092 (eval $ac_link) 2>&5
6094 echo "$as_me:6094: \$? = $ac_status" >&5
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest$ac_exeext'
6097 { (eval echo "$as_me:6097: \"$ac_try\"") >&5
6100 echo "$as_me:6100: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
6104 echo "$as_me: failed program was:" >&5
6105 cat conftest.$ac_ext >&5
6107 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6108 # will be set on completion of the AC_TRY_LINK below.
6109 cf_cv_header_path_utf8=
6110 cf_cv_library_path_utf8=
6112 echo "${as_me:-configure}:6112: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6114 cf_save_LIBS="$LIBS"
6116 cat >conftest.$ac_ext <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6120 #include <libutf8.h>
6129 rm -f conftest.$ac_objext conftest$ac_exeext
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131 (eval $ac_link) 2>&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit $ac_status); } &&
6135 { ac_try='test -s conftest$ac_exeext'
6136 { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6139 echo "$as_me:6139: \$? = $ac_status" >&5
6140 (exit $ac_status); }; }; then
6142 cf_cv_find_linkage_utf8=yes
6143 cf_cv_header_path_utf8=/usr/include
6144 cf_cv_library_path_utf8=/usr/lib
6147 echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6150 LIBS="-lutf8 $cf_save_LIBS"
6152 cat >conftest.$ac_ext <<_ACEOF
6153 #line 6153 "configure"
6154 #include "confdefs.h"
6156 #include <libutf8.h>
6165 rm -f conftest.$ac_objext conftest$ac_exeext
6166 if { (eval echo "$as_me:6166: \"$ac_link\"") >&5
6167 (eval $ac_link) 2>&5
6169 echo "$as_me:6169: \$? = $ac_status" >&5
6170 (exit $ac_status); } &&
6171 { ac_try='test -s conftest$ac_exeext'
6172 { (eval echo "$as_me:6172: \"$ac_try\"") >&5
6175 echo "$as_me:6175: \$? = $ac_status" >&5
6176 (exit $ac_status); }; }; then
6178 cf_cv_find_linkage_utf8=yes
6179 cf_cv_header_path_utf8=/usr/include
6180 cf_cv_library_path_utf8=/usr/lib
6181 cf_cv_library_file_utf8="-lutf8"
6184 echo "$as_me: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6187 cf_cv_find_linkage_utf8=no
6188 LIBS="$cf_save_LIBS"
6190 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6192 echo "${as_me:-configure}:6192: testing find linkage for utf8 library ..." 1>&5
6194 echo "${as_me:-configure}:6194: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6196 cf_save_CPPFLAGS="$CPPFLAGS"
6197 cf_test_CPPFLAGS="$CPPFLAGS"
6201 # collect the current set of include-directories from compiler flags
6202 cf_header_path_list=""
6203 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6204 for cf_header_path in $CPPFLAGS $CFLAGS
6206 case $cf_header_path in
6208 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6210 test "x$cf_header_path" != "xNONE" && \
6211 test -d "$cf_header_path" && \
6213 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6214 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6215 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6216 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6217 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6218 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6221 cf_header_path_list="$cf_header_path_list $cf_search"
6227 # add the variations for the package we are looking for
6231 test "x$prefix" != "xNONE" && \
6232 test -d "$prefix" && \
6234 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6235 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6236 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6237 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6238 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6239 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6242 for cf_subdir_prefix in \
6251 test "x$cf_subdir_prefix" != "x$prefix" && \
6252 test -d "$cf_subdir_prefix" && \
6253 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6254 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6255 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6256 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6257 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6258 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6259 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6264 test "$includedir" != NONE && \
6265 test "$includedir" != "/usr/include" && \
6266 test -d "$includedir" && {
6267 test -d $includedir && cf_search="$cf_search $includedir"
6268 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6271 test "$oldincludedir" != NONE && \
6272 test "$oldincludedir" != "/usr/include" && \
6273 test -d "$oldincludedir" && {
6274 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6275 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6278 cf_search="$cf_search $cf_header_path_list"
6280 for cf_cv_header_path_utf8 in $cf_search
6282 if test -d $cf_cv_header_path_utf8 ; then
6283 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6285 echo "${as_me:-configure}:6285: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6287 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6288 cat >conftest.$ac_ext <<_ACEOF
6289 #line 6289 "configure"
6290 #include "confdefs.h"
6292 #include <libutf8.h>
6301 rm -f conftest.$ac_objext
6302 if { (eval echo "$as_me:6302: \"$ac_compile\"") >&5
6303 (eval $ac_compile) 2>&5
6305 echo "$as_me:6305: \$? = $ac_status" >&5
6306 (exit $ac_status); } &&
6307 { ac_try='test -s conftest.$ac_objext'
6308 { (eval echo "$as_me:6308: \"$ac_try\"") >&5
6311 echo "$as_me:6311: \$? = $ac_status" >&5
6312 (exit $ac_status); }; }; then
6314 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6316 echo "${as_me:-configure}:6316: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6318 cf_cv_find_linkage_utf8=maybe
6319 cf_test_CPPFLAGS="$CPPFLAGS"
6322 echo "$as_me: failed program was:" >&5
6323 cat conftest.$ac_ext >&5
6325 CPPFLAGS="$cf_save_CPPFLAGS"
6328 rm -f conftest.$ac_objext conftest.$ac_ext
6332 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6334 echo "${as_me:-configure}:6334: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6336 cf_save_LIBS="$LIBS"
6337 cf_save_LDFLAGS="$LDFLAGS"
6339 if test "$cf_cv_find_linkage_utf8" != yes ; then
6342 cf_library_path_list=""
6343 if test -n "${LDFLAGS}${LIBS}" ; then
6344 for cf_library_path in $LDFLAGS $LIBS
6346 case $cf_library_path in
6348 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6350 test "x$cf_library_path" != "xNONE" && \
6351 test -d "$cf_library_path" && \
6353 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6354 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6355 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6356 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6357 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6358 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6361 cf_library_path_list="$cf_library_path_list $cf_search"
6369 test "x$prefix" != "xNONE" && \
6370 test -d "$prefix" && \
6372 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6373 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6374 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6375 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6376 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6377 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6380 for cf_subdir_prefix in \
6389 test "x$cf_subdir_prefix" != "x$prefix" && \
6390 test -d "$cf_subdir_prefix" && \
6391 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6392 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6393 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6394 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6395 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6396 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6397 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6402 cf_search="$cf_library_path_list $cf_search"
6404 for cf_cv_library_path_utf8 in $cf_search
6406 if test -d $cf_cv_library_path_utf8 ; then
6407 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6409 echo "${as_me:-configure}:6409: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6411 CPPFLAGS="$cf_test_CPPFLAGS"
6412 LIBS="-lutf8 $cf_save_LIBS"
6413 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6414 cat >conftest.$ac_ext <<_ACEOF
6415 #line 6415 "configure"
6416 #include "confdefs.h"
6418 #include <libutf8.h>
6427 rm -f conftest.$ac_objext conftest$ac_exeext
6428 if { (eval echo "$as_me:6428: \"$ac_link\"") >&5
6429 (eval $ac_link) 2>&5
6431 echo "$as_me:6431: \$? = $ac_status" >&5
6432 (exit $ac_status); } &&
6433 { ac_try='test -s conftest$ac_exeext'
6434 { (eval echo "$as_me:6434: \"$ac_try\"") >&5
6437 echo "$as_me:6437: \$? = $ac_status" >&5
6438 (exit $ac_status); }; }; then
6440 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6442 echo "${as_me:-configure}:6442: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6444 cf_cv_find_linkage_utf8=yes
6445 cf_cv_library_file_utf8="-lutf8"
6448 echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6451 CPPFLAGS="$cf_save_CPPFLAGS"
6452 LIBS="$cf_save_LIBS"
6453 LDFLAGS="$cf_save_LDFLAGS"
6456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6459 CPPFLAGS="$cf_save_CPPFLAGS"
6460 LDFLAGS="$cf_save_LDFLAGS"
6464 cf_cv_find_linkage_utf8=no
6468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6473 LIBS="$cf_save_LIBS"
6475 if test "$cf_cv_find_linkage_utf8" = yes ; then
6476 cf_cv_utf8_lib=add-on
6482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6484 echo "$as_me:6484: result: $cf_cv_utf8_lib" >&5
6485 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6487 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6489 if test "$cf_cv_utf8_lib" = "add-on" ; then
6491 cat >>confdefs.h <<\EOF
6492 #define HAVE_LIBUTF8_H 1
6495 if test -n "$cf_cv_header_path_utf8" ; then
6496 for cf_add_incdir in $cf_cv_header_path_utf8
6498 while test $cf_add_incdir != /usr/include
6500 if test -d $cf_add_incdir
6503 if test -n "$CFLAGS$CPPFLAGS" ; then
6504 # a loop is needed to ensure we can add subdirs of existing dirs
6505 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6506 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6507 cf_have_incdir=yes; break
6512 if test "$cf_have_incdir" = no ; then
6513 if test "$cf_add_incdir" = /usr/local/include ; then
6514 if test "$GCC" = yes
6516 cf_save_CPPFLAGS=$CPPFLAGS
6517 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6518 cat >conftest.$ac_ext <<_ACEOF
6519 #line 6519 "configure"
6520 #include "confdefs.h"
6530 rm -f conftest.$ac_objext
6531 if { (eval echo "$as_me:6531: \"$ac_compile\"") >&5
6532 (eval $ac_compile) 2>&5
6534 echo "$as_me:6534: \$? = $ac_status" >&5
6535 (exit $ac_status); } &&
6536 { ac_try='test -s conftest.$ac_objext'
6537 { (eval echo "$as_me:6537: \"$ac_try\"") >&5
6540 echo "$as_me:6540: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
6544 echo "$as_me: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6548 rm -f conftest.$ac_objext conftest.$ac_ext
6549 CPPFLAGS=$cf_save_CPPFLAGS
6554 if test "$cf_have_incdir" = no ; then
6555 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6557 echo "${as_me:-configure}:6557: testing adding $cf_add_incdir to include-path ..." 1>&5
6559 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6561 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6562 test "$cf_top_incdir" = "$cf_add_incdir" && break
6563 cf_add_incdir="$cf_top_incdir"
6574 if test -n "$cf_cv_library_path_utf8" ; then
6575 for cf_add_libdir in $cf_cv_library_path_utf8
6577 if test $cf_add_libdir = /usr/lib ; then
6579 elif test -d $cf_add_libdir
6582 if test -n "$LDFLAGS$LIBS" ; then
6583 # a loop is needed to ensure we can add subdirs of existing dirs
6584 for cf_test_libdir in $LDFLAGS $LIBS ; do
6585 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6586 cf_have_libdir=yes; break
6590 if test "$cf_have_libdir" = no ; then
6591 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6593 echo "${as_me:-configure}:6593: testing adding $cf_add_libdir to library-path ..." 1>&5
6595 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6601 cf_add_libs="$cf_cv_library_file_utf8"
6602 # Filter out duplicates - this happens with badly-designed ".pc" files...
6603 for cf_add_1lib in $LIBS
6605 for cf_add_2lib in $cf_add_libs
6607 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6619 cf_ncuconfig_root=$cf_cv_screen
6620 cf_have_ncuconfig=no
6622 if test "x${PKG_CONFIG:=none}" != xnone; then
6623 echo "$as_me:6623: checking pkg-config for $cf_ncuconfig_root" >&5
6624 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6625 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6626 echo "$as_me:6626: result: yes" >&5
6627 echo "${ECHO_T}yes" >&6
6629 echo "$as_me:6629: checking if the $cf_ncuconfig_root package files work" >&5
6630 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6631 cf_have_ncuconfig=unknown
6633 cf_save_CPPFLAGS="$CPPFLAGS"
6634 cf_save_LIBS="$LIBS"
6636 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6638 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6639 # Filter out duplicates - this happens with badly-designed ".pc" files...
6640 for cf_add_1lib in $LIBS
6642 for cf_add_2lib in $cf_add_libs
6644 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6650 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6654 cat >conftest.$ac_ext <<_ACEOF
6655 #line 6655 "configure"
6656 #include "confdefs.h"
6657 #include <${cf_cv_ncurses_header:-curses.h}>
6661 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6666 rm -f conftest.$ac_objext conftest$ac_exeext
6667 if { (eval echo "$as_me:6667: \"$ac_link\"") >&5
6668 (eval $ac_link) 2>&5
6670 echo "$as_me:6670: \$? = $ac_status" >&5
6671 (exit $ac_status); } &&
6672 { ac_try='test -s conftest$ac_exeext'
6673 { (eval echo "$as_me:6673: \"$ac_try\"") >&5
6676 echo "$as_me:6676: \$? = $ac_status" >&5
6677 (exit $ac_status); }; }; then
6678 if test "$cross_compiling" = yes; then
6679 cf_have_ncuconfig=maybe
6681 cat >conftest.$ac_ext <<_ACEOF
6682 #line 6682 "configure"
6683 #include "confdefs.h"
6684 #include <${cf_cv_ncurses_header:-curses.h}>
6686 { char *xx = curses_version(); return (xx == 0); }
6688 rm -f conftest$ac_exeext
6689 if { (eval echo "$as_me:6689: \"$ac_link\"") >&5
6690 (eval $ac_link) 2>&5
6692 echo "$as_me:6692: \$? = $ac_status" >&5
6693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6694 { (eval echo "$as_me:6694: \"$ac_try\"") >&5
6697 echo "$as_me:6697: \$? = $ac_status" >&5
6698 (exit $ac_status); }; }; then
6699 cf_have_ncuconfig=yes
6701 echo "$as_me: program exited with status $ac_status" >&5
6702 echo "$as_me: failed program was:" >&5
6703 cat conftest.$ac_ext >&5
6704 cf_have_ncuconfig=no
6706 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6709 echo "$as_me: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6711 cf_have_ncuconfig=no
6713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6714 echo "$as_me:6714: result: $cf_have_ncuconfig" >&5
6715 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6716 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6717 if test "$cf_have_ncuconfig" != "yes"
6719 CPPFLAGS="$cf_save_CPPFLAGS"
6720 LIBS="$cf_save_LIBS"
6721 NCURSES_CONFIG_PKG=none
6724 cat >>confdefs.h <<\EOF
6728 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6732 echo "$as_me:6732: result: no" >&5
6733 echo "${ECHO_T}no" >&6
6734 NCURSES_CONFIG_PKG=none
6737 NCURSES_CONFIG_PKG=none
6740 if test "x$cf_have_ncuconfig" = "xno"; then
6741 echo "Looking for ${cf_ncuconfig_root}-config"
6743 if test -n "$ac_tool_prefix"; then
6744 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6746 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6747 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6748 echo "$as_me:6748: checking for $ac_word" >&5
6749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6750 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6751 echo $ECHO_N "(cached) $ECHO_C" >&6
6753 if test -n "$NCURSES_CONFIG"; then
6754 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6756 ac_save_IFS=$IFS; IFS=$ac_path_separator
6758 for ac_dir in $ac_dummy; do
6760 test -z "$ac_dir" && ac_dir=.
6761 $as_executable_p "$ac_dir/$ac_word" || continue
6762 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6763 echo "$as_me:6763: found $ac_dir/$ac_word" >&5
6769 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6770 if test -n "$NCURSES_CONFIG"; then
6771 echo "$as_me:6771: result: $NCURSES_CONFIG" >&5
6772 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6774 echo "$as_me:6774: result: no" >&5
6775 echo "${ECHO_T}no" >&6
6778 test -n "$NCURSES_CONFIG" && break
6781 if test -z "$NCURSES_CONFIG"; then
6782 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6783 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6785 # Extract the first word of "$ac_prog", so it can be a program name with args.
6786 set dummy $ac_prog; ac_word=$2
6787 echo "$as_me:6787: checking for $ac_word" >&5
6788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6789 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6790 echo $ECHO_N "(cached) $ECHO_C" >&6
6792 if test -n "$ac_ct_NCURSES_CONFIG"; then
6793 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6795 ac_save_IFS=$IFS; IFS=$ac_path_separator
6797 for ac_dir in $ac_dummy; do
6799 test -z "$ac_dir" && ac_dir=.
6800 $as_executable_p "$ac_dir/$ac_word" || continue
6801 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6802 echo "$as_me:6802: found $ac_dir/$ac_word" >&5
6808 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6809 if test -n "$ac_ct_NCURSES_CONFIG"; then
6810 echo "$as_me:6810: result: $ac_ct_NCURSES_CONFIG" >&5
6811 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6813 echo "$as_me:6813: result: no" >&5
6814 echo "${ECHO_T}no" >&6
6817 test -n "$ac_ct_NCURSES_CONFIG" && break
6819 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6821 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6824 if test "$NCURSES_CONFIG" != none ; then
6826 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6828 cf_add_libs="`$NCURSES_CONFIG --libs`"
6829 # Filter out duplicates - this happens with badly-designed ".pc" files...
6830 for cf_add_1lib in $LIBS
6832 for cf_add_2lib in $cf_add_libs
6834 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6844 # even with config script, some packages use no-override for curses.h
6846 echo "$as_me:6846: checking if we have identified curses headers" >&5
6847 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6848 if test "${cf_cv_ncurses_header+set}" = set; then
6849 echo $ECHO_N "(cached) $ECHO_C" >&6
6852 cf_cv_ncurses_header=none
6854 ncurses.h $cf_cv_screen/ncurses.h \
6855 curses.h $cf_cv_screen/curses.h
6857 cat >conftest.$ac_ext <<_ACEOF
6858 #line 6858 "configure"
6859 #include "confdefs.h"
6860 #include <${cf_header}>
6864 initscr(); tgoto("?", 0,0)
6869 rm -f conftest.$ac_objext
6870 if { (eval echo "$as_me:6870: \"$ac_compile\"") >&5
6871 (eval $ac_compile) 2>&5
6873 echo "$as_me:6873: \$? = $ac_status" >&5
6874 (exit $ac_status); } &&
6875 { ac_try='test -s conftest.$ac_objext'
6876 { (eval echo "$as_me:6876: \"$ac_try\"") >&5
6879 echo "$as_me:6879: \$? = $ac_status" >&5
6880 (exit $ac_status); }; }; then
6881 cf_cv_ncurses_header=$cf_header; break
6883 echo "$as_me: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6886 rm -f conftest.$ac_objext conftest.$ac_ext
6890 echo "$as_me:6890: result: $cf_cv_ncurses_header" >&5
6891 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6893 if test "$cf_cv_ncurses_header" = none ; then
6894 { { echo "$as_me:6894: error: No curses header-files found" >&5
6895 echo "$as_me: error: No curses header-files found" >&2;}
6896 { (exit 1); exit 1; }; }
6899 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6901 for ac_header in $cf_cv_ncurses_header
6903 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6904 echo "$as_me:6904: checking for $ac_header" >&5
6905 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6906 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6907 echo $ECHO_N "(cached) $ECHO_C" >&6
6909 cat >conftest.$ac_ext <<_ACEOF
6910 #line 6910 "configure"
6911 #include "confdefs.h"
6912 #include <$ac_header>
6914 if { (eval echo "$as_me:6914: \"$ac_cpp conftest.$ac_ext\"") >&5
6915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6917 egrep -v '^ *\+' conftest.er1 >conftest.err
6919 cat conftest.err >&5
6920 echo "$as_me:6920: \$? = $ac_status" >&5
6921 (exit $ac_status); } >/dev/null; then
6922 if test -s conftest.err; then
6923 ac_cpp_err=$ac_c_preproc_warn_flag
6930 if test -z "$ac_cpp_err"; then
6931 eval "$as_ac_Header=yes"
6933 echo "$as_me: failed program was:" >&5
6934 cat conftest.$ac_ext >&5
6935 eval "$as_ac_Header=no"
6937 rm -f conftest.err conftest.$ac_ext
6939 echo "$as_me:6939: result: `eval echo '${'$as_ac_Header'}'`" >&5
6940 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6941 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6942 cat >>confdefs.h <<EOF
6943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6949 cat >>confdefs.h <<\EOF
6953 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6955 cat >>confdefs.h <<EOF
6956 #define $cf_nculib_ROOT 1
6959 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6963 cf_ncuhdr_root=$cf_cv_screen
6965 test -n "$cf_cv_curses_dir" && \
6966 test "$cf_cv_curses_dir" != "no" && { \
6968 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6969 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6971 while test $cf_add_incdir != /usr/include
6973 if test -d $cf_add_incdir
6976 if test -n "$CFLAGS$CPPFLAGS" ; then
6977 # a loop is needed to ensure we can add subdirs of existing dirs
6978 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6979 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6980 cf_have_incdir=yes; break
6985 if test "$cf_have_incdir" = no ; then
6986 if test "$cf_add_incdir" = /usr/local/include ; then
6987 if test "$GCC" = yes
6989 cf_save_CPPFLAGS=$CPPFLAGS
6990 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6991 cat >conftest.$ac_ext <<_ACEOF
6992 #line 6992 "configure"
6993 #include "confdefs.h"
7003 rm -f conftest.$ac_objext
7004 if { (eval echo "$as_me:7004: \"$ac_compile\"") >&5
7005 (eval $ac_compile) 2>&5
7007 echo "$as_me:7007: \$? = $ac_status" >&5
7008 (exit $ac_status); } &&
7009 { ac_try='test -s conftest.$ac_objext'
7010 { (eval echo "$as_me:7010: \"$ac_try\"") >&5
7013 echo "$as_me:7013: \$? = $ac_status" >&5
7014 (exit $ac_status); }; }; then
7017 echo "$as_me: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7021 rm -f conftest.$ac_objext conftest.$ac_ext
7022 CPPFLAGS=$cf_save_CPPFLAGS
7027 if test "$cf_have_incdir" = no ; then
7028 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7030 echo "${as_me:-configure}:7030: testing adding $cf_add_incdir to include-path ..." 1>&5
7032 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7034 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7035 test "$cf_top_incdir" = "$cf_add_incdir" && break
7036 cf_add_incdir="$cf_top_incdir"
7049 echo "$as_me:7049: checking for $cf_ncuhdr_root header in include-path" >&5
7050 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7051 if test "${cf_cv_ncurses_h+set}" = set; then
7052 echo $ECHO_N "(cached) $ECHO_C" >&6
7055 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7056 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7057 for cf_header in $cf_header_list
7060 cat >conftest.$ac_ext <<_ACEOF
7061 #line 7061 "configure"
7062 #include "confdefs.h"
7064 #include <$cf_header>
7069 #ifdef NCURSES_VERSION
7071 printf("%s\n", NCURSES_VERSION);
7084 rm -f conftest.$ac_objext
7085 if { (eval echo "$as_me:7085: \"$ac_compile\"") >&5
7086 (eval $ac_compile) 2>&5
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
7090 { ac_try='test -s conftest.$ac_objext'
7091 { (eval echo "$as_me:7091: \"$ac_try\"") >&5
7094 echo "$as_me:7094: \$? = $ac_status" >&5
7095 (exit $ac_status); }; }; then
7096 cf_cv_ncurses_h=$cf_header
7099 echo "$as_me: failed program was:" >&5
7100 cat conftest.$ac_ext >&5
7103 rm -f conftest.$ac_objext conftest.$ac_ext
7105 test "$cf_cv_ncurses_h" != no && break
7109 echo "$as_me:7109: result: $cf_cv_ncurses_h" >&5
7110 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7112 if test "$cf_cv_ncurses_h" != no ; then
7113 cf_cv_ncurses_header=$cf_cv_ncurses_h
7116 echo "$as_me:7116: checking for $cf_ncuhdr_root include-path" >&5
7117 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7118 if test "${cf_cv_ncurses_h2+set}" = set; then
7119 echo $ECHO_N "(cached) $ECHO_C" >&6
7122 test -n "$verbose" && echo
7126 # collect the current set of include-directories from compiler flags
7127 cf_header_path_list=""
7128 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7129 for cf_header_path in $CPPFLAGS $CFLAGS
7131 case $cf_header_path in
7133 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7135 test "x$cf_header_path" != "xNONE" && \
7136 test -d "$cf_header_path" && \
7138 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7139 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7140 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7141 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7142 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7143 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"
7146 cf_header_path_list="$cf_header_path_list $cf_search"
7152 # add the variations for the package we are looking for
7156 test "x$prefix" != "xNONE" && \
7157 test -d "$prefix" && \
7159 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7160 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7161 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7162 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7163 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7164 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7167 for cf_subdir_prefix in \
7176 test "x$cf_subdir_prefix" != "x$prefix" && \
7177 test -d "$cf_subdir_prefix" && \
7178 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7179 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7180 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7181 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7182 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7183 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7184 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"
7189 test "$includedir" != NONE && \
7190 test "$includedir" != "/usr/include" && \
7191 test -d "$includedir" && {
7192 test -d $includedir && cf_search="$cf_search $includedir"
7193 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7196 test "$oldincludedir" != NONE && \
7197 test "$oldincludedir" != "/usr/include" && \
7198 test -d "$oldincludedir" && {
7199 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7200 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7203 cf_search="$cf_search $cf_header_path_list"
7205 test -n "$verbose" && echo search path $cf_search
7206 cf_save2_CPPFLAGS="$CPPFLAGS"
7207 for cf_incdir in $cf_search
7210 if test -n "$cf_incdir" ; then
7211 for cf_add_incdir in $cf_incdir
7213 while test $cf_add_incdir != /usr/include
7215 if test -d $cf_add_incdir
7218 if test -n "$CFLAGS$CPPFLAGS" ; then
7219 # a loop is needed to ensure we can add subdirs of existing dirs
7220 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7221 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7222 cf_have_incdir=yes; break
7227 if test "$cf_have_incdir" = no ; then
7228 if test "$cf_add_incdir" = /usr/local/include ; then
7229 if test "$GCC" = yes
7231 cf_save_CPPFLAGS=$CPPFLAGS
7232 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7233 cat >conftest.$ac_ext <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7245 rm -f conftest.$ac_objext
7246 if { (eval echo "$as_me:7246: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7249 echo "$as_me:7249: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:7252: \"$ac_try\"") >&5
7255 echo "$as_me:7255: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7259 echo "$as_me: failed program was:" >&5
7260 cat conftest.$ac_ext >&5
7263 rm -f conftest.$ac_objext conftest.$ac_ext
7264 CPPFLAGS=$cf_save_CPPFLAGS
7269 if test "$cf_have_incdir" = no ; then
7270 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7272 echo "${as_me:-configure}:7272: testing adding $cf_add_incdir to include-path ..." 1>&5
7274 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7276 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7277 test "$cf_top_incdir" = "$cf_add_incdir" && break
7278 cf_add_incdir="$cf_top_incdir"
7294 cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7298 #include <$cf_header>
7303 #ifdef NCURSES_VERSION
7305 printf("%s\n", NCURSES_VERSION);
7318 rm -f conftest.$ac_objext
7319 if { (eval echo "$as_me:7319: \"$ac_compile\"") >&5
7320 (eval $ac_compile) 2>&5
7322 echo "$as_me:7322: \$? = $ac_status" >&5
7323 (exit $ac_status); } &&
7324 { ac_try='test -s conftest.$ac_objext'
7325 { (eval echo "$as_me:7325: \"$ac_try\"") >&5
7328 echo "$as_me:7328: \$? = $ac_status" >&5
7329 (exit $ac_status); }; }; then
7330 cf_cv_ncurses_h2=$cf_header
7333 echo "$as_me: failed program was:" >&5
7334 cat conftest.$ac_ext >&5
7337 rm -f conftest.$ac_objext conftest.$ac_ext
7339 if test "$cf_cv_ncurses_h2" != no ; then
7340 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7341 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7344 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7346 CPPFLAGS="$cf_save2_CPPFLAGS"
7347 test "$cf_cv_ncurses_h2" != no && break
7349 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7349: error: not found" >&5
7350 echo "$as_me: error: not found" >&2;}
7351 { (exit 1); exit 1; }; }
7354 echo "$as_me:7354: result: $cf_cv_ncurses_h2" >&5
7355 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7357 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7358 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7359 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7360 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7363 if test -n "$cf_1st_incdir" ; then
7364 for cf_add_incdir in $cf_1st_incdir
7366 while test $cf_add_incdir != /usr/include
7368 if test -d $cf_add_incdir
7371 if test -n "$CFLAGS$CPPFLAGS" ; then
7372 # a loop is needed to ensure we can add subdirs of existing dirs
7373 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7374 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7375 cf_have_incdir=yes; break
7380 if test "$cf_have_incdir" = no ; then
7381 if test "$cf_add_incdir" = /usr/local/include ; then
7382 if test "$GCC" = yes
7384 cf_save_CPPFLAGS=$CPPFLAGS
7385 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7386 cat >conftest.$ac_ext <<_ACEOF
7387 #line 7387 "configure"
7388 #include "confdefs.h"
7398 rm -f conftest.$ac_objext
7399 if { (eval echo "$as_me:7399: \"$ac_compile\"") >&5
7400 (eval $ac_compile) 2>&5
7402 echo "$as_me:7402: \$? = $ac_status" >&5
7403 (exit $ac_status); } &&
7404 { ac_try='test -s conftest.$ac_objext'
7405 { (eval echo "$as_me:7405: \"$ac_try\"") >&5
7408 echo "$as_me:7408: \$? = $ac_status" >&5
7409 (exit $ac_status); }; }; then
7412 echo "$as_me: failed program was:" >&5
7413 cat conftest.$ac_ext >&5
7416 rm -f conftest.$ac_objext conftest.$ac_ext
7417 CPPFLAGS=$cf_save_CPPFLAGS
7422 if test "$cf_have_incdir" = no ; then
7423 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7425 echo "${as_me:-configure}:7425: testing adding $cf_add_incdir to include-path ..." 1>&5
7427 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7429 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7430 test "$cf_top_incdir" = "$cf_add_incdir" && break
7431 cf_add_incdir="$cf_top_incdir"
7444 # Set definitions to allow ifdef'ing for ncurses.h
7446 case $cf_cv_ncurses_header in
7449 cat >>confdefs.h <<\EOF
7450 #define HAVE_NCURSES_H 1
7456 case $cf_cv_ncurses_header in
7457 (ncurses/curses.h|ncurses/ncurses.h)
7459 cat >>confdefs.h <<\EOF
7460 #define HAVE_NCURSES_NCURSES_H 1
7464 (ncursesw/curses.h|ncursesw/ncurses.h)
7466 cat >>confdefs.h <<\EOF
7467 #define HAVE_NCURSESW_NCURSES_H 1
7473 echo "$as_me:7473: checking for terminfo header" >&5
7474 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7475 if test "${cf_cv_term_header+set}" = set; then
7476 echo $ECHO_N "(cached) $ECHO_C" >&6
7479 case ${cf_cv_ncurses_header} in
7480 (*/ncurses.h|*/ncursesw.h)
7481 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7484 cf_term_header=term.h
7488 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7490 cat >conftest.$ac_ext <<_ACEOF
7491 #line 7491 "configure"
7492 #include "confdefs.h"
7494 #include <${cf_cv_ncurses_header:-curses.h}>
7500 int x = auto_left_margin
7505 rm -f conftest.$ac_objext
7506 if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507 (eval $ac_compile) 2>&5
7509 echo "$as_me:7509: \$? = $ac_status" >&5
7510 (exit $ac_status); } &&
7511 { ac_try='test -s conftest.$ac_objext'
7512 { (eval echo "$as_me:7512: \"$ac_try\"") >&5
7515 echo "$as_me:7515: \$? = $ac_status" >&5
7516 (exit $ac_status); }; }; then
7518 cf_cv_term_header="$cf_test"
7520 echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7523 cf_cv_term_header=unknown
7526 rm -f conftest.$ac_objext conftest.$ac_ext
7527 test "$cf_cv_term_header" != unknown && break
7531 echo "$as_me:7531: result: $cf_cv_term_header" >&5
7532 echo "${ECHO_T}$cf_cv_term_header" >&6
7534 # Set definitions to allow ifdef'ing to accommodate subdirectories
7536 case $cf_cv_term_header in
7539 cat >>confdefs.h <<\EOF
7540 #define HAVE_TERM_H 1
7546 case $cf_cv_term_header in
7549 cat >>confdefs.h <<\EOF
7550 #define HAVE_NCURSES_TERM_H 1
7556 cat >>confdefs.h <<\EOF
7557 #define HAVE_NCURSESW_TERM_H 1
7563 # some applications need this, but should check for NCURSES_VERSION
7565 cat >>confdefs.h <<\EOF
7569 echo "$as_me:7569: checking for ncurses version" >&5
7570 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7571 if test "${cf_cv_ncurses_version+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7575 cf_cv_ncurses_version=no
7578 if test "$cross_compiling" = yes; then
7580 # This will not work if the preprocessor splits the line after the
7581 # Autoconf token. The 'unproto' program does that.
7582 cat > conftest.$ac_ext <<EOF
7583 #include <${cf_cv_ncurses_header:-curses.h}>
7585 #ifdef NCURSES_VERSION
7586 Autoconf NCURSES_VERSION
7594 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7595 { (eval echo "$as_me:7595: \"$cf_try\"") >&5
7598 echo "$as_me:7598: \$? = $ac_status" >&5
7599 (exit $ac_status); }
7600 if test -f conftest.out ; then
7601 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7602 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7607 cat >conftest.$ac_ext <<_ACEOF
7608 #line 7608 "configure"
7609 #include "confdefs.h"
7611 #include <${cf_cv_ncurses_header:-curses.h}>
7615 FILE *fp = fopen("$cf_tempfile", "w");
7616 #ifdef NCURSES_VERSION
7617 # ifdef NCURSES_VERSION_PATCH
7618 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7620 fprintf(fp, "%s\n", NCURSES_VERSION);
7624 fprintf(fp, "old\n");
7629 ${cf_cv_main_return:-return}(0);
7632 rm -f conftest$ac_exeext
7633 if { (eval echo "$as_me:7633: \"$ac_link\"") >&5
7634 (eval $ac_link) 2>&5
7636 echo "$as_me:7636: \$? = $ac_status" >&5
7637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7638 { (eval echo "$as_me:7638: \"$ac_try\"") >&5
7641 echo "$as_me:7641: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7644 cf_cv_ncurses_version=`cat $cf_tempfile`
7646 echo "$as_me: program exited with status $ac_status" >&5
7647 echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7655 echo "$as_me:7655: result: $cf_cv_ncurses_version" >&5
7656 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7657 test "$cf_cv_ncurses_version" = no ||
7658 cat >>confdefs.h <<\EOF
7662 cf_nculib_root=$cf_cv_screen
7663 # This works, except for the special case where we find gpm, but
7664 # ncurses is in a nonstandard location via $LIBS, and we really want
7667 cf_ncurses_SAVE="$LIBS"
7668 echo "$as_me:7668: checking for Gpm_Open in -lgpm" >&5
7669 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7670 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7671 echo $ECHO_N "(cached) $ECHO_C" >&6
7673 ac_check_lib_save_LIBS=$LIBS
7675 cat >conftest.$ac_ext <<_ACEOF
7676 #line 7676 "configure"
7677 #include "confdefs.h"
7679 /* Override any gcc2 internal prototype to avoid an error. */
7683 /* We use char because int might match the return type of a gcc2
7684 builtin and then its argument prototype would still apply. */
7694 rm -f conftest.$ac_objext conftest$ac_exeext
7695 if { (eval echo "$as_me:7695: \"$ac_link\"") >&5
7696 (eval $ac_link) 2>&5
7698 echo "$as_me:7698: \$? = $ac_status" >&5
7699 (exit $ac_status); } &&
7700 { ac_try='test -s conftest$ac_exeext'
7701 { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7704 echo "$as_me:7704: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_cv_lib_gpm_Gpm_Open=yes
7708 echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 ac_cv_lib_gpm_Gpm_Open=no
7712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7713 LIBS=$ac_check_lib_save_LIBS
7715 echo "$as_me:7715: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7716 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7717 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7718 echo "$as_me:7718: checking for initscr in -lgpm" >&5
7719 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7720 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7721 echo $ECHO_N "(cached) $ECHO_C" >&6
7723 ac_check_lib_save_LIBS=$LIBS
7725 cat >conftest.$ac_ext <<_ACEOF
7726 #line 7726 "configure"
7727 #include "confdefs.h"
7729 /* Override any gcc2 internal prototype to avoid an error. */
7733 /* We use char because int might match the return type of a gcc2
7734 builtin and then its argument prototype would still apply. */
7744 rm -f conftest.$ac_objext conftest$ac_exeext
7745 if { (eval echo "$as_me:7745: \"$ac_link\"") >&5
7746 (eval $ac_link) 2>&5
7748 echo "$as_me:7748: \$? = $ac_status" >&5
7749 (exit $ac_status); } &&
7750 { ac_try='test -s conftest$ac_exeext'
7751 { (eval echo "$as_me:7751: \"$ac_try\"") >&5
7754 echo "$as_me:7754: \$? = $ac_status" >&5
7755 (exit $ac_status); }; }; then
7756 ac_cv_lib_gpm_initscr=yes
7758 echo "$as_me: failed program was:" >&5
7759 cat conftest.$ac_ext >&5
7760 ac_cv_lib_gpm_initscr=no
7762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7763 LIBS=$ac_check_lib_save_LIBS
7765 echo "$as_me:7765: result: $ac_cv_lib_gpm_initscr" >&5
7766 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7767 if test $ac_cv_lib_gpm_initscr = yes; then
7768 LIBS="$cf_ncurses_SAVE"
7770 cf_ncurses_LIBS="-lgpm"
7777 # This is only necessary if you are linking against an obsolete
7778 # version of ncurses (but it should do no harm, since it's static).
7779 if test "$cf_nculib_root" = ncurses ; then
7780 echo "$as_me:7780: checking for tgoto in -lmytinfo" >&5
7781 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7782 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7783 echo $ECHO_N "(cached) $ECHO_C" >&6
7785 ac_check_lib_save_LIBS=$LIBS
7786 LIBS="-lmytinfo $LIBS"
7787 cat >conftest.$ac_ext <<_ACEOF
7788 #line 7788 "configure"
7789 #include "confdefs.h"
7791 /* Override any gcc2 internal prototype to avoid an error. */
7795 /* We use char because int might match the return type of a gcc2
7796 builtin and then its argument prototype would still apply. */
7806 rm -f conftest.$ac_objext conftest$ac_exeext
7807 if { (eval echo "$as_me:7807: \"$ac_link\"") >&5
7808 (eval $ac_link) 2>&5
7810 echo "$as_me:7810: \$? = $ac_status" >&5
7811 (exit $ac_status); } &&
7812 { ac_try='test -s conftest$ac_exeext'
7813 { (eval echo "$as_me:7813: \"$ac_try\"") >&5
7816 echo "$as_me:7816: \$? = $ac_status" >&5
7817 (exit $ac_status); }; }; then
7818 ac_cv_lib_mytinfo_tgoto=yes
7820 echo "$as_me: failed program was:" >&5
7821 cat conftest.$ac_ext >&5
7822 ac_cv_lib_mytinfo_tgoto=no
7824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7825 LIBS=$ac_check_lib_save_LIBS
7827 echo "$as_me:7827: result: $ac_cv_lib_mytinfo_tgoto" >&5
7828 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7829 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7830 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7837 cf_add_libs="$cf_ncurses_LIBS"
7838 # Filter out duplicates - this happens with badly-designed ".pc" files...
7839 for cf_add_1lib in $LIBS
7841 for cf_add_2lib in $cf_add_libs
7843 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7849 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7853 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7856 cf_add_libs="-l$cf_nculib_root"
7857 # Filter out duplicates - this happens with badly-designed ".pc" files...
7858 for cf_add_1lib in $LIBS
7860 for cf_add_2lib in $cf_add_libs
7862 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7874 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7876 echo "$as_me:7876: checking for initscr" >&5
7877 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7878 if test "${ac_cv_func_initscr+set}" = set; then
7879 echo $ECHO_N "(cached) $ECHO_C" >&6
7881 cat >conftest.$ac_ext <<_ACEOF
7882 #line 7882 "configure"
7883 #include "confdefs.h"
7884 /* System header to define __stub macros and hopefully few prototypes,
7885 which can conflict with char initscr (); below. */
7887 /* Override any gcc2 internal prototype to avoid an error. */
7891 /* We use char because int might match the return type of a gcc2
7892 builtin and then its argument prototype would still apply. */
7899 /* The GNU C library defines this for functions which it implements
7900 to always fail with ENOSYS. Some functions are actually named
7901 something starting with __ and the normal name is an alias. */
7902 #if defined (__stub_initscr) || defined (__stub___initscr)
7905 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7912 rm -f conftest.$ac_objext conftest$ac_exeext
7913 if { (eval echo "$as_me:7913: \"$ac_link\"") >&5
7914 (eval $ac_link) 2>&5
7916 echo "$as_me:7916: \$? = $ac_status" >&5
7917 (exit $ac_status); } &&
7918 { ac_try='test -s conftest$ac_exeext'
7919 { (eval echo "$as_me:7919: \"$ac_try\"") >&5
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit $ac_status); }; }; then
7924 ac_cv_func_initscr=yes
7926 echo "$as_me: failed program was:" >&5
7927 cat conftest.$ac_ext >&5
7928 ac_cv_func_initscr=no
7930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7932 echo "$as_me:7932: result: $ac_cv_func_initscr" >&5
7933 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7934 if test $ac_cv_func_initscr = yes; then
7935 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7938 cf_save_LIBS="$LIBS"
7939 echo "$as_me:7939: checking for initscr in -l$cf_nculib_root" >&5
7940 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7941 LIBS="-l$cf_nculib_root $LIBS"
7942 cat >conftest.$ac_ext <<_ACEOF
7943 #line 7943 "configure"
7944 #include "confdefs.h"
7945 #include <${cf_cv_ncurses_header:-curses.h}>
7954 rm -f conftest.$ac_objext conftest$ac_exeext
7955 if { (eval echo "$as_me:7955: \"$ac_link\"") >&5
7956 (eval $ac_link) 2>&5
7958 echo "$as_me:7958: \$? = $ac_status" >&5
7959 (exit $ac_status); } &&
7960 { ac_try='test -s conftest$ac_exeext'
7961 { (eval echo "$as_me:7961: \"$ac_try\"") >&5
7964 echo "$as_me:7964: \$? = $ac_status" >&5
7965 (exit $ac_status); }; }; then
7966 echo "$as_me:7966: result: yes" >&5
7967 echo "${ECHO_T}yes" >&6
7968 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7971 echo "$as_me: failed program was:" >&5
7972 cat conftest.$ac_ext >&5
7973 echo "$as_me:7973: result: no" >&5
7974 echo "${ECHO_T}no" >&6
7977 cf_library_path_list=""
7978 if test -n "${LDFLAGS}${LIBS}" ; then
7979 for cf_library_path in $LDFLAGS $LIBS
7981 case $cf_library_path in
7983 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7985 test "x$cf_library_path" != "xNONE" && \
7986 test -d "$cf_library_path" && \
7988 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7989 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7990 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7991 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7992 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7993 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"
7996 cf_library_path_list="$cf_library_path_list $cf_search"
8004 test "x$prefix" != "xNONE" && \
8005 test -d "$prefix" && \
8007 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8008 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8009 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8010 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8011 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8012 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8015 for cf_subdir_prefix in \
8024 test "x$cf_subdir_prefix" != "x$prefix" && \
8025 test -d "$cf_subdir_prefix" && \
8026 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8027 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8028 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8029 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8030 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8031 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8032 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"
8037 cf_search="$cf_library_path_list $cf_search"
8039 for cf_libdir in $cf_search
8041 echo "$as_me:8041: checking for -l$cf_nculib_root in $cf_libdir" >&5
8042 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8043 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8044 cat >conftest.$ac_ext <<_ACEOF
8045 #line 8045 "configure"
8046 #include "confdefs.h"
8047 #include <${cf_cv_ncurses_header:-curses.h}>
8056 rm -f conftest.$ac_objext conftest$ac_exeext
8057 if { (eval echo "$as_me:8057: \"$ac_link\"") >&5
8058 (eval $ac_link) 2>&5
8060 echo "$as_me:8060: \$? = $ac_status" >&5
8061 (exit $ac_status); } &&
8062 { ac_try='test -s conftest$ac_exeext'
8063 { (eval echo "$as_me:8063: \"$ac_try\"") >&5
8066 echo "$as_me:8066: \$? = $ac_status" >&5
8067 (exit $ac_status); }; }; then
8068 echo "$as_me:8068: result: yes" >&5
8069 echo "${ECHO_T}yes" >&6
8070 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8073 echo "$as_me: failed program was:" >&5
8074 cat conftest.$ac_ext >&5
8075 echo "$as_me:8075: result: no" >&5
8076 echo "${ECHO_T}no" >&6
8077 LIBS="$cf_save_LIBS"
8079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8087 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8089 if test $cf_found_library = no ; then
8090 { { echo "$as_me:8090: error: Cannot link $cf_nculib_root library" >&5
8091 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8092 { (exit 1); exit 1; }; }
8097 if test -n "$cf_ncurses_LIBS" ; then
8098 echo "$as_me:8098: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8099 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8100 cf_ncurses_SAVE="$LIBS"
8101 for p in $cf_ncurses_LIBS ; do
8102 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8103 if test "$q" != "$LIBS" ; then
8107 cat >conftest.$ac_ext <<_ACEOF
8108 #line 8108 "configure"
8109 #include "confdefs.h"
8110 #include <${cf_cv_ncurses_header:-curses.h}>
8114 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8119 rm -f conftest.$ac_objext conftest$ac_exeext
8120 if { (eval echo "$as_me:8120: \"$ac_link\"") >&5
8121 (eval $ac_link) 2>&5
8123 echo "$as_me:8123: \$? = $ac_status" >&5
8124 (exit $ac_status); } &&
8125 { ac_try='test -s conftest$ac_exeext'
8126 { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit $ac_status); }; }; then
8131 echo "$as_me:8131: result: yes" >&5
8132 echo "${ECHO_T}yes" >&6
8134 echo "$as_me: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8136 echo "$as_me:8136: result: no" >&5
8137 echo "${ECHO_T}no" >&6
8138 LIBS="$cf_ncurses_SAVE"
8140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8143 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8145 cat >>confdefs.h <<EOF
8146 #define $cf_nculib_ROOT 1
8157 cf_ncuconfig_root=$cf_cv_screen
8158 cf_have_ncuconfig=no
8160 if test "x${PKG_CONFIG:=none}" != xnone; then
8161 echo "$as_me:8161: checking pkg-config for $cf_ncuconfig_root" >&5
8162 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8163 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8164 echo "$as_me:8164: result: yes" >&5
8165 echo "${ECHO_T}yes" >&6
8167 echo "$as_me:8167: checking if the $cf_ncuconfig_root package files work" >&5
8168 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8169 cf_have_ncuconfig=unknown
8171 cf_save_CPPFLAGS="$CPPFLAGS"
8172 cf_save_LIBS="$LIBS"
8174 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8176 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8177 # Filter out duplicates - this happens with badly-designed ".pc" files...
8178 for cf_add_1lib in $LIBS
8180 for cf_add_2lib in $cf_add_libs
8182 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8188 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8192 cat >conftest.$ac_ext <<_ACEOF
8193 #line 8193 "configure"
8194 #include "confdefs.h"
8195 #include <${cf_cv_ncurses_header:-curses.h}>
8199 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8204 rm -f conftest.$ac_objext conftest$ac_exeext
8205 if { (eval echo "$as_me:8205: \"$ac_link\"") >&5
8206 (eval $ac_link) 2>&5
8208 echo "$as_me:8208: \$? = $ac_status" >&5
8209 (exit $ac_status); } &&
8210 { ac_try='test -s conftest$ac_exeext'
8211 { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8214 echo "$as_me:8214: \$? = $ac_status" >&5
8215 (exit $ac_status); }; }; then
8216 if test "$cross_compiling" = yes; then
8217 cf_have_ncuconfig=maybe
8219 cat >conftest.$ac_ext <<_ACEOF
8220 #line 8220 "configure"
8221 #include "confdefs.h"
8222 #include <${cf_cv_ncurses_header:-curses.h}>
8224 { char *xx = curses_version(); return (xx == 0); }
8226 rm -f conftest$ac_exeext
8227 if { (eval echo "$as_me:8227: \"$ac_link\"") >&5
8228 (eval $ac_link) 2>&5
8230 echo "$as_me:8230: \$? = $ac_status" >&5
8231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8232 { (eval echo "$as_me:8232: \"$ac_try\"") >&5
8235 echo "$as_me:8235: \$? = $ac_status" >&5
8236 (exit $ac_status); }; }; then
8237 cf_have_ncuconfig=yes
8239 echo "$as_me: program exited with status $ac_status" >&5
8240 echo "$as_me: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 cf_have_ncuconfig=no
8244 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8247 echo "$as_me: failed program was:" >&5
8248 cat conftest.$ac_ext >&5
8249 cf_have_ncuconfig=no
8251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8252 echo "$as_me:8252: result: $cf_have_ncuconfig" >&5
8253 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8254 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8255 if test "$cf_have_ncuconfig" != "yes"
8257 CPPFLAGS="$cf_save_CPPFLAGS"
8258 LIBS="$cf_save_LIBS"
8259 NCURSES_CONFIG_PKG=none
8262 cat >>confdefs.h <<\EOF
8266 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8270 echo "$as_me:8270: result: no" >&5
8271 echo "${ECHO_T}no" >&6
8272 NCURSES_CONFIG_PKG=none
8275 NCURSES_CONFIG_PKG=none
8278 if test "x$cf_have_ncuconfig" = "xno"; then
8279 echo "Looking for ${cf_ncuconfig_root}-config"
8281 if test -n "$ac_tool_prefix"; then
8282 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8284 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8285 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8286 echo "$as_me:8286: checking for $ac_word" >&5
8287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8288 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8289 echo $ECHO_N "(cached) $ECHO_C" >&6
8291 if test -n "$NCURSES_CONFIG"; then
8292 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8294 ac_save_IFS=$IFS; IFS=$ac_path_separator
8296 for ac_dir in $ac_dummy; do
8298 test -z "$ac_dir" && ac_dir=.
8299 $as_executable_p "$ac_dir/$ac_word" || continue
8300 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8301 echo "$as_me:8301: found $ac_dir/$ac_word" >&5
8307 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8308 if test -n "$NCURSES_CONFIG"; then
8309 echo "$as_me:8309: result: $NCURSES_CONFIG" >&5
8310 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8312 echo "$as_me:8312: result: no" >&5
8313 echo "${ECHO_T}no" >&6
8316 test -n "$NCURSES_CONFIG" && break
8319 if test -z "$NCURSES_CONFIG"; then
8320 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8321 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8323 # Extract the first word of "$ac_prog", so it can be a program name with args.
8324 set dummy $ac_prog; ac_word=$2
8325 echo "$as_me:8325: checking for $ac_word" >&5
8326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8327 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8328 echo $ECHO_N "(cached) $ECHO_C" >&6
8330 if test -n "$ac_ct_NCURSES_CONFIG"; then
8331 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8333 ac_save_IFS=$IFS; IFS=$ac_path_separator
8335 for ac_dir in $ac_dummy; do
8337 test -z "$ac_dir" && ac_dir=.
8338 $as_executable_p "$ac_dir/$ac_word" || continue
8339 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8340 echo "$as_me:8340: found $ac_dir/$ac_word" >&5
8346 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8347 if test -n "$ac_ct_NCURSES_CONFIG"; then
8348 echo "$as_me:8348: result: $ac_ct_NCURSES_CONFIG" >&5
8349 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8351 echo "$as_me:8351: result: no" >&5
8352 echo "${ECHO_T}no" >&6
8355 test -n "$ac_ct_NCURSES_CONFIG" && break
8357 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8359 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8362 if test "$NCURSES_CONFIG" != none ; then
8364 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8366 cf_add_libs="`$NCURSES_CONFIG --libs`"
8367 # Filter out duplicates - this happens with badly-designed ".pc" files...
8368 for cf_add_1lib in $LIBS
8370 for cf_add_2lib in $cf_add_libs
8372 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8378 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8382 # even with config script, some packages use no-override for curses.h
8384 echo "$as_me:8384: checking if we have identified curses headers" >&5
8385 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8386 if test "${cf_cv_ncurses_header+set}" = set; then
8387 echo $ECHO_N "(cached) $ECHO_C" >&6
8390 cf_cv_ncurses_header=none
8392 ncurses.h $cf_cv_screen/ncurses.h \
8393 curses.h $cf_cv_screen/curses.h
8395 cat >conftest.$ac_ext <<_ACEOF
8396 #line 8396 "configure"
8397 #include "confdefs.h"
8398 #include <${cf_header}>
8402 initscr(); tgoto("?", 0,0)
8407 rm -f conftest.$ac_objext
8408 if { (eval echo "$as_me:8408: \"$ac_compile\"") >&5
8409 (eval $ac_compile) 2>&5
8411 echo "$as_me:8411: \$? = $ac_status" >&5
8412 (exit $ac_status); } &&
8413 { ac_try='test -s conftest.$ac_objext'
8414 { (eval echo "$as_me:8414: \"$ac_try\"") >&5
8417 echo "$as_me:8417: \$? = $ac_status" >&5
8418 (exit $ac_status); }; }; then
8419 cf_cv_ncurses_header=$cf_header; break
8421 echo "$as_me: failed program was:" >&5
8422 cat conftest.$ac_ext >&5
8424 rm -f conftest.$ac_objext conftest.$ac_ext
8428 echo "$as_me:8428: result: $cf_cv_ncurses_header" >&5
8429 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8431 if test "$cf_cv_ncurses_header" = none ; then
8432 { { echo "$as_me:8432: error: No curses header-files found" >&5
8433 echo "$as_me: error: No curses header-files found" >&2;}
8434 { (exit 1); exit 1; }; }
8437 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8439 for ac_header in $cf_cv_ncurses_header
8441 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8442 echo "$as_me:8442: checking for $ac_header" >&5
8443 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8444 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8445 echo $ECHO_N "(cached) $ECHO_C" >&6
8447 cat >conftest.$ac_ext <<_ACEOF
8448 #line 8448 "configure"
8449 #include "confdefs.h"
8450 #include <$ac_header>
8452 if { (eval echo "$as_me:8452: \"$ac_cpp conftest.$ac_ext\"") >&5
8453 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8455 egrep -v '^ *\+' conftest.er1 >conftest.err
8457 cat conftest.err >&5
8458 echo "$as_me:8458: \$? = $ac_status" >&5
8459 (exit $ac_status); } >/dev/null; then
8460 if test -s conftest.err; then
8461 ac_cpp_err=$ac_c_preproc_warn_flag
8468 if test -z "$ac_cpp_err"; then
8469 eval "$as_ac_Header=yes"
8471 echo "$as_me: failed program was:" >&5
8472 cat conftest.$ac_ext >&5
8473 eval "$as_ac_Header=no"
8475 rm -f conftest.err conftest.$ac_ext
8477 echo "$as_me:8477: result: `eval echo '${'$as_ac_Header'}'`" >&5
8478 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8479 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8480 cat >>confdefs.h <<EOF
8481 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8487 cat >>confdefs.h <<\EOF
8491 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8493 cat >>confdefs.h <<EOF
8494 #define $cf_nculib_ROOT 1
8497 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8501 cf_ncuhdr_root=$cf_cv_screen
8503 test -n "$cf_cv_curses_dir" && \
8504 test "$cf_cv_curses_dir" != "no" && { \
8506 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8507 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8509 while test $cf_add_incdir != /usr/include
8511 if test -d $cf_add_incdir
8514 if test -n "$CFLAGS$CPPFLAGS" ; then
8515 # a loop is needed to ensure we can add subdirs of existing dirs
8516 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8517 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8518 cf_have_incdir=yes; break
8523 if test "$cf_have_incdir" = no ; then
8524 if test "$cf_add_incdir" = /usr/local/include ; then
8525 if test "$GCC" = yes
8527 cf_save_CPPFLAGS=$CPPFLAGS
8528 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8529 cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8541 rm -f conftest.$ac_objext
8542 if { (eval echo "$as_me:8542: \"$ac_compile\"") >&5
8543 (eval $ac_compile) 2>&5
8545 echo "$as_me:8545: \$? = $ac_status" >&5
8546 (exit $ac_status); } &&
8547 { ac_try='test -s conftest.$ac_objext'
8548 { (eval echo "$as_me:8548: \"$ac_try\"") >&5
8551 echo "$as_me:8551: \$? = $ac_status" >&5
8552 (exit $ac_status); }; }; then
8555 echo "$as_me: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8559 rm -f conftest.$ac_objext conftest.$ac_ext
8560 CPPFLAGS=$cf_save_CPPFLAGS
8565 if test "$cf_have_incdir" = no ; then
8566 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8568 echo "${as_me:-configure}:8568: testing adding $cf_add_incdir to include-path ..." 1>&5
8570 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8572 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8573 test "$cf_top_incdir" = "$cf_add_incdir" && break
8574 cf_add_incdir="$cf_top_incdir"
8587 echo "$as_me:8587: checking for $cf_ncuhdr_root header in include-path" >&5
8588 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8589 if test "${cf_cv_ncurses_h+set}" = set; then
8590 echo $ECHO_N "(cached) $ECHO_C" >&6
8593 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8594 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8595 for cf_header in $cf_header_list
8598 cat >conftest.$ac_ext <<_ACEOF
8599 #line 8599 "configure"
8600 #include "confdefs.h"
8602 #include <$cf_header>
8607 #ifdef NCURSES_VERSION
8609 printf("%s\n", NCURSES_VERSION);
8622 rm -f conftest.$ac_objext
8623 if { (eval echo "$as_me:8623: \"$ac_compile\"") >&5
8624 (eval $ac_compile) 2>&5
8626 echo "$as_me:8626: \$? = $ac_status" >&5
8627 (exit $ac_status); } &&
8628 { ac_try='test -s conftest.$ac_objext'
8629 { (eval echo "$as_me:8629: \"$ac_try\"") >&5
8632 echo "$as_me:8632: \$? = $ac_status" >&5
8633 (exit $ac_status); }; }; then
8634 cf_cv_ncurses_h=$cf_header
8637 echo "$as_me: failed program was:" >&5
8638 cat conftest.$ac_ext >&5
8641 rm -f conftest.$ac_objext conftest.$ac_ext
8643 test "$cf_cv_ncurses_h" != no && break
8647 echo "$as_me:8647: result: $cf_cv_ncurses_h" >&5
8648 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8650 if test "$cf_cv_ncurses_h" != no ; then
8651 cf_cv_ncurses_header=$cf_cv_ncurses_h
8654 echo "$as_me:8654: checking for $cf_ncuhdr_root include-path" >&5
8655 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8656 if test "${cf_cv_ncurses_h2+set}" = set; then
8657 echo $ECHO_N "(cached) $ECHO_C" >&6
8660 test -n "$verbose" && echo
8664 # collect the current set of include-directories from compiler flags
8665 cf_header_path_list=""
8666 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8667 for cf_header_path in $CPPFLAGS $CFLAGS
8669 case $cf_header_path in
8671 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8673 test "x$cf_header_path" != "xNONE" && \
8674 test -d "$cf_header_path" && \
8676 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8677 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8678 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8679 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8680 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8681 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"
8684 cf_header_path_list="$cf_header_path_list $cf_search"
8690 # add the variations for the package we are looking for
8694 test "x$prefix" != "xNONE" && \
8695 test -d "$prefix" && \
8697 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8698 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8699 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8700 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8701 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8702 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8705 for cf_subdir_prefix in \
8714 test "x$cf_subdir_prefix" != "x$prefix" && \
8715 test -d "$cf_subdir_prefix" && \
8716 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8717 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8718 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8719 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8720 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8721 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8722 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"
8727 test "$includedir" != NONE && \
8728 test "$includedir" != "/usr/include" && \
8729 test -d "$includedir" && {
8730 test -d $includedir && cf_search="$cf_search $includedir"
8731 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8734 test "$oldincludedir" != NONE && \
8735 test "$oldincludedir" != "/usr/include" && \
8736 test -d "$oldincludedir" && {
8737 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8738 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8741 cf_search="$cf_search $cf_header_path_list"
8743 test -n "$verbose" && echo search path $cf_search
8744 cf_save2_CPPFLAGS="$CPPFLAGS"
8745 for cf_incdir in $cf_search
8748 if test -n "$cf_incdir" ; then
8749 for cf_add_incdir in $cf_incdir
8751 while test $cf_add_incdir != /usr/include
8753 if test -d $cf_add_incdir
8756 if test -n "$CFLAGS$CPPFLAGS" ; then
8757 # a loop is needed to ensure we can add subdirs of existing dirs
8758 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8759 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8760 cf_have_incdir=yes; break
8765 if test "$cf_have_incdir" = no ; then
8766 if test "$cf_add_incdir" = /usr/local/include ; then
8767 if test "$GCC" = yes
8769 cf_save_CPPFLAGS=$CPPFLAGS
8770 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8771 cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8783 rm -f conftest.$ac_objext
8784 if { (eval echo "$as_me:8784: \"$ac_compile\"") >&5
8785 (eval $ac_compile) 2>&5
8787 echo "$as_me:8787: \$? = $ac_status" >&5
8788 (exit $ac_status); } &&
8789 { ac_try='test -s conftest.$ac_objext'
8790 { (eval echo "$as_me:8790: \"$ac_try\"") >&5
8793 echo "$as_me:8793: \$? = $ac_status" >&5
8794 (exit $ac_status); }; }; then
8797 echo "$as_me: failed program was:" >&5
8798 cat conftest.$ac_ext >&5
8801 rm -f conftest.$ac_objext conftest.$ac_ext
8802 CPPFLAGS=$cf_save_CPPFLAGS
8807 if test "$cf_have_incdir" = no ; then
8808 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8810 echo "${as_me:-configure}:8810: testing adding $cf_add_incdir to include-path ..." 1>&5
8812 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8814 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8815 test "$cf_top_incdir" = "$cf_add_incdir" && break
8816 cf_add_incdir="$cf_top_incdir"
8832 cat >conftest.$ac_ext <<_ACEOF
8833 #line 8833 "configure"
8834 #include "confdefs.h"
8836 #include <$cf_header>
8841 #ifdef NCURSES_VERSION
8843 printf("%s\n", NCURSES_VERSION);
8856 rm -f conftest.$ac_objext
8857 if { (eval echo "$as_me:8857: \"$ac_compile\"") >&5
8858 (eval $ac_compile) 2>&5
8860 echo "$as_me:8860: \$? = $ac_status" >&5
8861 (exit $ac_status); } &&
8862 { ac_try='test -s conftest.$ac_objext'
8863 { (eval echo "$as_me:8863: \"$ac_try\"") >&5
8866 echo "$as_me:8866: \$? = $ac_status" >&5
8867 (exit $ac_status); }; }; then
8868 cf_cv_ncurses_h2=$cf_header
8871 echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8875 rm -f conftest.$ac_objext conftest.$ac_ext
8877 if test "$cf_cv_ncurses_h2" != no ; then
8878 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8879 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8882 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8884 CPPFLAGS="$cf_save2_CPPFLAGS"
8885 test "$cf_cv_ncurses_h2" != no && break
8887 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8887: error: not found" >&5
8888 echo "$as_me: error: not found" >&2;}
8889 { (exit 1); exit 1; }; }
8892 echo "$as_me:8892: result: $cf_cv_ncurses_h2" >&5
8893 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8895 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8896 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8897 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8898 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8901 if test -n "$cf_1st_incdir" ; then
8902 for cf_add_incdir in $cf_1st_incdir
8904 while test $cf_add_incdir != /usr/include
8906 if test -d $cf_add_incdir
8909 if test -n "$CFLAGS$CPPFLAGS" ; then
8910 # a loop is needed to ensure we can add subdirs of existing dirs
8911 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8912 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8913 cf_have_incdir=yes; break
8918 if test "$cf_have_incdir" = no ; then
8919 if test "$cf_add_incdir" = /usr/local/include ; then
8920 if test "$GCC" = yes
8922 cf_save_CPPFLAGS=$CPPFLAGS
8923 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8924 cat >conftest.$ac_ext <<_ACEOF
8925 #line 8925 "configure"
8926 #include "confdefs.h"
8936 rm -f conftest.$ac_objext
8937 if { (eval echo "$as_me:8937: \"$ac_compile\"") >&5
8938 (eval $ac_compile) 2>&5
8940 echo "$as_me:8940: \$? = $ac_status" >&5
8941 (exit $ac_status); } &&
8942 { ac_try='test -s conftest.$ac_objext'
8943 { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8946 echo "$as_me:8946: \$? = $ac_status" >&5
8947 (exit $ac_status); }; }; then
8950 echo "$as_me: failed program was:" >&5
8951 cat conftest.$ac_ext >&5
8954 rm -f conftest.$ac_objext conftest.$ac_ext
8955 CPPFLAGS=$cf_save_CPPFLAGS
8960 if test "$cf_have_incdir" = no ; then
8961 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8963 echo "${as_me:-configure}:8963: testing adding $cf_add_incdir to include-path ..." 1>&5
8965 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8967 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8968 test "$cf_top_incdir" = "$cf_add_incdir" && break
8969 cf_add_incdir="$cf_top_incdir"
8982 # Set definitions to allow ifdef'ing for ncurses.h
8984 case $cf_cv_ncurses_header in
8987 cat >>confdefs.h <<\EOF
8988 #define HAVE_NCURSES_H 1
8994 case $cf_cv_ncurses_header in
8995 (ncurses/curses.h|ncurses/ncurses.h)
8997 cat >>confdefs.h <<\EOF
8998 #define HAVE_NCURSES_NCURSES_H 1
9002 (ncursesw/curses.h|ncursesw/ncurses.h)
9004 cat >>confdefs.h <<\EOF
9005 #define HAVE_NCURSESW_NCURSES_H 1
9011 echo "$as_me:9011: checking for terminfo header" >&5
9012 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9013 if test "${cf_cv_term_header+set}" = set; then
9014 echo $ECHO_N "(cached) $ECHO_C" >&6
9017 case ${cf_cv_ncurses_header} in
9018 (*/ncurses.h|*/ncursesw.h)
9019 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9022 cf_term_header=term.h
9026 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9028 cat >conftest.$ac_ext <<_ACEOF
9029 #line 9029 "configure"
9030 #include "confdefs.h"
9032 #include <${cf_cv_ncurses_header:-curses.h}>
9038 int x = auto_left_margin
9043 rm -f conftest.$ac_objext
9044 if { (eval echo "$as_me:9044: \"$ac_compile\"") >&5
9045 (eval $ac_compile) 2>&5
9047 echo "$as_me:9047: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest.$ac_objext'
9050 { (eval echo "$as_me:9050: \"$ac_try\"") >&5
9053 echo "$as_me:9053: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
9056 cf_cv_term_header="$cf_test"
9058 echo "$as_me: failed program was:" >&5
9059 cat conftest.$ac_ext >&5
9061 cf_cv_term_header=unknown
9064 rm -f conftest.$ac_objext conftest.$ac_ext
9065 test "$cf_cv_term_header" != unknown && break
9069 echo "$as_me:9069: result: $cf_cv_term_header" >&5
9070 echo "${ECHO_T}$cf_cv_term_header" >&6
9072 # Set definitions to allow ifdef'ing to accommodate subdirectories
9074 case $cf_cv_term_header in
9077 cat >>confdefs.h <<\EOF
9078 #define HAVE_TERM_H 1
9084 case $cf_cv_term_header in
9087 cat >>confdefs.h <<\EOF
9088 #define HAVE_NCURSES_TERM_H 1
9094 cat >>confdefs.h <<\EOF
9095 #define HAVE_NCURSESW_TERM_H 1
9101 # some applications need this, but should check for NCURSES_VERSION
9103 cat >>confdefs.h <<\EOF
9107 echo "$as_me:9107: checking for ncurses version" >&5
9108 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9109 if test "${cf_cv_ncurses_version+set}" = set; then
9110 echo $ECHO_N "(cached) $ECHO_C" >&6
9113 cf_cv_ncurses_version=no
9116 if test "$cross_compiling" = yes; then
9118 # This will not work if the preprocessor splits the line after the
9119 # Autoconf token. The 'unproto' program does that.
9120 cat > conftest.$ac_ext <<EOF
9121 #include <${cf_cv_ncurses_header:-curses.h}>
9123 #ifdef NCURSES_VERSION
9124 Autoconf NCURSES_VERSION
9132 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9133 { (eval echo "$as_me:9133: \"$cf_try\"") >&5
9136 echo "$as_me:9136: \$? = $ac_status" >&5
9137 (exit $ac_status); }
9138 if test -f conftest.out ; then
9139 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9140 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9145 cat >conftest.$ac_ext <<_ACEOF
9146 #line 9146 "configure"
9147 #include "confdefs.h"
9149 #include <${cf_cv_ncurses_header:-curses.h}>
9153 FILE *fp = fopen("$cf_tempfile", "w");
9154 #ifdef NCURSES_VERSION
9155 # ifdef NCURSES_VERSION_PATCH
9156 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9158 fprintf(fp, "%s\n", NCURSES_VERSION);
9162 fprintf(fp, "old\n");
9167 ${cf_cv_main_return:-return}(0);
9170 rm -f conftest$ac_exeext
9171 if { (eval echo "$as_me:9171: \"$ac_link\"") >&5
9172 (eval $ac_link) 2>&5
9174 echo "$as_me:9174: \$? = $ac_status" >&5
9175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9176 { (eval echo "$as_me:9176: \"$ac_try\"") >&5
9179 echo "$as_me:9179: \$? = $ac_status" >&5
9180 (exit $ac_status); }; }; then
9182 cf_cv_ncurses_version=`cat $cf_tempfile`
9184 echo "$as_me: program exited with status $ac_status" >&5
9185 echo "$as_me: failed program was:" >&5
9186 cat conftest.$ac_ext >&5
9188 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9193 echo "$as_me:9193: result: $cf_cv_ncurses_version" >&5
9194 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9195 test "$cf_cv_ncurses_version" = no ||
9196 cat >>confdefs.h <<\EOF
9200 cf_nculib_root=$cf_cv_screen
9201 # This works, except for the special case where we find gpm, but
9202 # ncurses is in a nonstandard location via $LIBS, and we really want
9205 cf_ncurses_SAVE="$LIBS"
9206 echo "$as_me:9206: checking for Gpm_Open in -lgpm" >&5
9207 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9208 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9209 echo $ECHO_N "(cached) $ECHO_C" >&6
9211 ac_check_lib_save_LIBS=$LIBS
9213 cat >conftest.$ac_ext <<_ACEOF
9214 #line 9214 "configure"
9215 #include "confdefs.h"
9217 /* Override any gcc2 internal prototype to avoid an error. */
9221 /* We use char because int might match the return type of a gcc2
9222 builtin and then its argument prototype would still apply. */
9232 rm -f conftest.$ac_objext conftest$ac_exeext
9233 if { (eval echo "$as_me:9233: \"$ac_link\"") >&5
9234 (eval $ac_link) 2>&5
9236 echo "$as_me:9236: \$? = $ac_status" >&5
9237 (exit $ac_status); } &&
9238 { ac_try='test -s conftest$ac_exeext'
9239 { (eval echo "$as_me:9239: \"$ac_try\"") >&5
9242 echo "$as_me:9242: \$? = $ac_status" >&5
9243 (exit $ac_status); }; }; then
9244 ac_cv_lib_gpm_Gpm_Open=yes
9246 echo "$as_me: failed program was:" >&5
9247 cat conftest.$ac_ext >&5
9248 ac_cv_lib_gpm_Gpm_Open=no
9250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9251 LIBS=$ac_check_lib_save_LIBS
9253 echo "$as_me:9253: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9254 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9255 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9256 echo "$as_me:9256: checking for initscr in -lgpm" >&5
9257 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9258 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9259 echo $ECHO_N "(cached) $ECHO_C" >&6
9261 ac_check_lib_save_LIBS=$LIBS
9263 cat >conftest.$ac_ext <<_ACEOF
9264 #line 9264 "configure"
9265 #include "confdefs.h"
9267 /* Override any gcc2 internal prototype to avoid an error. */
9271 /* We use char because int might match the return type of a gcc2
9272 builtin and then its argument prototype would still apply. */
9282 rm -f conftest.$ac_objext conftest$ac_exeext
9283 if { (eval echo "$as_me:9283: \"$ac_link\"") >&5
9284 (eval $ac_link) 2>&5
9286 echo "$as_me:9286: \$? = $ac_status" >&5
9287 (exit $ac_status); } &&
9288 { ac_try='test -s conftest$ac_exeext'
9289 { (eval echo "$as_me:9289: \"$ac_try\"") >&5
9292 echo "$as_me:9292: \$? = $ac_status" >&5
9293 (exit $ac_status); }; }; then
9294 ac_cv_lib_gpm_initscr=yes
9296 echo "$as_me: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9298 ac_cv_lib_gpm_initscr=no
9300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9301 LIBS=$ac_check_lib_save_LIBS
9303 echo "$as_me:9303: result: $ac_cv_lib_gpm_initscr" >&5
9304 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9305 if test $ac_cv_lib_gpm_initscr = yes; then
9306 LIBS="$cf_ncurses_SAVE"
9308 cf_ncurses_LIBS="-lgpm"
9315 # This is only necessary if you are linking against an obsolete
9316 # version of ncurses (but it should do no harm, since it's static).
9317 if test "$cf_nculib_root" = ncurses ; then
9318 echo "$as_me:9318: checking for tgoto in -lmytinfo" >&5
9319 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9320 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9321 echo $ECHO_N "(cached) $ECHO_C" >&6
9323 ac_check_lib_save_LIBS=$LIBS
9324 LIBS="-lmytinfo $LIBS"
9325 cat >conftest.$ac_ext <<_ACEOF
9326 #line 9326 "configure"
9327 #include "confdefs.h"
9329 /* Override any gcc2 internal prototype to avoid an error. */
9333 /* We use char because int might match the return type of a gcc2
9334 builtin and then its argument prototype would still apply. */
9344 rm -f conftest.$ac_objext conftest$ac_exeext
9345 if { (eval echo "$as_me:9345: \"$ac_link\"") >&5
9346 (eval $ac_link) 2>&5
9348 echo "$as_me:9348: \$? = $ac_status" >&5
9349 (exit $ac_status); } &&
9350 { ac_try='test -s conftest$ac_exeext'
9351 { (eval echo "$as_me:9351: \"$ac_try\"") >&5
9354 echo "$as_me:9354: \$? = $ac_status" >&5
9355 (exit $ac_status); }; }; then
9356 ac_cv_lib_mytinfo_tgoto=yes
9358 echo "$as_me: failed program was:" >&5
9359 cat conftest.$ac_ext >&5
9360 ac_cv_lib_mytinfo_tgoto=no
9362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9363 LIBS=$ac_check_lib_save_LIBS
9365 echo "$as_me:9365: result: $ac_cv_lib_mytinfo_tgoto" >&5
9366 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9367 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9368 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9375 cf_add_libs="$cf_ncurses_LIBS"
9376 # Filter out duplicates - this happens with badly-designed ".pc" files...
9377 for cf_add_1lib in $LIBS
9379 for cf_add_2lib in $cf_add_libs
9381 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9387 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9391 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9394 cf_add_libs="-l$cf_nculib_root"
9395 # Filter out duplicates - this happens with badly-designed ".pc" files...
9396 for cf_add_1lib in $LIBS
9398 for cf_add_2lib in $cf_add_libs
9400 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9406 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9412 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9414 echo "$as_me:9414: checking for initscr" >&5
9415 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9416 if test "${ac_cv_func_initscr+set}" = set; then
9417 echo $ECHO_N "(cached) $ECHO_C" >&6
9419 cat >conftest.$ac_ext <<_ACEOF
9420 #line 9420 "configure"
9421 #include "confdefs.h"
9422 /* System header to define __stub macros and hopefully few prototypes,
9423 which can conflict with char initscr (); below. */
9425 /* Override any gcc2 internal prototype to avoid an error. */
9429 /* We use char because int might match the return type of a gcc2
9430 builtin and then its argument prototype would still apply. */
9437 /* The GNU C library defines this for functions which it implements
9438 to always fail with ENOSYS. Some functions are actually named
9439 something starting with __ and the normal name is an alias. */
9440 #if defined (__stub_initscr) || defined (__stub___initscr)
9443 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9450 rm -f conftest.$ac_objext conftest$ac_exeext
9451 if { (eval echo "$as_me:9451: \"$ac_link\"") >&5
9452 (eval $ac_link) 2>&5
9454 echo "$as_me:9454: \$? = $ac_status" >&5
9455 (exit $ac_status); } &&
9456 { ac_try='test -s conftest$ac_exeext'
9457 { (eval echo "$as_me:9457: \"$ac_try\"") >&5
9460 echo "$as_me:9460: \$? = $ac_status" >&5
9461 (exit $ac_status); }; }; then
9462 ac_cv_func_initscr=yes
9464 echo "$as_me: failed program was:" >&5
9465 cat conftest.$ac_ext >&5
9466 ac_cv_func_initscr=no
9468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9470 echo "$as_me:9470: result: $ac_cv_func_initscr" >&5
9471 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9472 if test $ac_cv_func_initscr = yes; then
9473 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9476 cf_save_LIBS="$LIBS"
9477 echo "$as_me:9477: checking for initscr in -l$cf_nculib_root" >&5
9478 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9479 LIBS="-l$cf_nculib_root $LIBS"
9480 cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483 #include <${cf_cv_ncurses_header:-curses.h}>
9492 rm -f conftest.$ac_objext conftest$ac_exeext
9493 if { (eval echo "$as_me:9493: \"$ac_link\"") >&5
9494 (eval $ac_link) 2>&5
9496 echo "$as_me:9496: \$? = $ac_status" >&5
9497 (exit $ac_status); } &&
9498 { ac_try='test -s conftest$ac_exeext'
9499 { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9502 echo "$as_me:9502: \$? = $ac_status" >&5
9503 (exit $ac_status); }; }; then
9504 echo "$as_me:9504: result: yes" >&5
9505 echo "${ECHO_T}yes" >&6
9506 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9509 echo "$as_me: failed program was:" >&5
9510 cat conftest.$ac_ext >&5
9511 echo "$as_me:9511: result: no" >&5
9512 echo "${ECHO_T}no" >&6
9515 cf_library_path_list=""
9516 if test -n "${LDFLAGS}${LIBS}" ; then
9517 for cf_library_path in $LDFLAGS $LIBS
9519 case $cf_library_path in
9521 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9523 test "x$cf_library_path" != "xNONE" && \
9524 test -d "$cf_library_path" && \
9526 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9527 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9528 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9529 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9530 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9531 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"
9534 cf_library_path_list="$cf_library_path_list $cf_search"
9542 test "x$prefix" != "xNONE" && \
9543 test -d "$prefix" && \
9545 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9546 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9547 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9548 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9549 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9550 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9553 for cf_subdir_prefix in \
9562 test "x$cf_subdir_prefix" != "x$prefix" && \
9563 test -d "$cf_subdir_prefix" && \
9564 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9565 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9566 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9567 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9568 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9569 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9570 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"
9575 cf_search="$cf_library_path_list $cf_search"
9577 for cf_libdir in $cf_search
9579 echo "$as_me:9579: checking for -l$cf_nculib_root in $cf_libdir" >&5
9580 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9581 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9582 cat >conftest.$ac_ext <<_ACEOF
9583 #line 9583 "configure"
9584 #include "confdefs.h"
9585 #include <${cf_cv_ncurses_header:-curses.h}>
9594 rm -f conftest.$ac_objext conftest$ac_exeext
9595 if { (eval echo "$as_me:9595: \"$ac_link\"") >&5
9596 (eval $ac_link) 2>&5
9598 echo "$as_me:9598: \$? = $ac_status" >&5
9599 (exit $ac_status); } &&
9600 { ac_try='test -s conftest$ac_exeext'
9601 { (eval echo "$as_me:9601: \"$ac_try\"") >&5
9604 echo "$as_me:9604: \$? = $ac_status" >&5
9605 (exit $ac_status); }; }; then
9606 echo "$as_me:9606: result: yes" >&5
9607 echo "${ECHO_T}yes" >&6
9608 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9611 echo "$as_me: failed program was:" >&5
9612 cat conftest.$ac_ext >&5
9613 echo "$as_me:9613: result: no" >&5
9614 echo "${ECHO_T}no" >&6
9615 LIBS="$cf_save_LIBS"
9617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9625 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9627 if test $cf_found_library = no ; then
9628 { { echo "$as_me:9628: error: Cannot link $cf_nculib_root library" >&5
9629 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9630 { (exit 1); exit 1; }; }
9635 if test -n "$cf_ncurses_LIBS" ; then
9636 echo "$as_me:9636: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9637 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9638 cf_ncurses_SAVE="$LIBS"
9639 for p in $cf_ncurses_LIBS ; do
9640 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9641 if test "$q" != "$LIBS" ; then
9645 cat >conftest.$ac_ext <<_ACEOF
9646 #line 9646 "configure"
9647 #include "confdefs.h"
9648 #include <${cf_cv_ncurses_header:-curses.h}>
9652 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9657 rm -f conftest.$ac_objext conftest$ac_exeext
9658 if { (eval echo "$as_me:9658: \"$ac_link\"") >&5
9659 (eval $ac_link) 2>&5
9661 echo "$as_me:9661: \$? = $ac_status" >&5
9662 (exit $ac_status); } &&
9663 { ac_try='test -s conftest$ac_exeext'
9664 { (eval echo "$as_me:9664: \"$ac_try\"") >&5
9667 echo "$as_me:9667: \$? = $ac_status" >&5
9668 (exit $ac_status); }; }; then
9669 echo "$as_me:9669: result: yes" >&5
9670 echo "${ECHO_T}yes" >&6
9672 echo "$as_me: failed program was:" >&5
9673 cat conftest.$ac_ext >&5
9674 echo "$as_me:9674: result: no" >&5
9675 echo "${ECHO_T}no" >&6
9676 LIBS="$cf_ncurses_SAVE"
9678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9681 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9683 cat >>confdefs.h <<EOF
9684 #define $cf_nculib_ROOT 1
9694 echo "$as_me:9694: checking for X" >&5
9695 echo $ECHO_N "checking for X... $ECHO_C" >&6
9697 # Check whether --with-x or --without-x was given.
9698 if test "${with_x+set}" = set; then
9702 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9703 if test "x$with_x" = xno; then
9704 # The user explicitly disabled X.
9707 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9708 # Both variables are already set.
9711 if test "${ac_cv_have_x+set}" = set; then
9712 echo $ECHO_N "(cached) $ECHO_C" >&6
9714 # One or both of the vars are not set, and there is no cached value.
9715 ac_x_includes=no ac_x_libraries=no
9717 if mkdir conftest.dir; then
9719 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9720 cat >Imakefile <<'EOF'
9722 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9724 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9725 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9726 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9727 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9728 for ac_extension in a so sl dylib dll; do
9729 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9730 test -f $ac_im_libdir/libX11.$ac_extension; then
9731 ac_im_usrlibdir=$ac_im_libdir; break
9734 # Screen out bogus values from the imake configuration. They are
9735 # bogus both because they are the default anyway, and because
9736 # using them would break gcc on systems where it needs fixed includes.
9737 case $ac_im_incroot in
9739 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9741 case $ac_im_usrlibdir in
9743 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9750 # Standard set of common directories for X headers.
9751 # Check X11 before X11Rn because it is often a symlink to the current release.
9763 /usr/local/X11/include
9764 /usr/local/X11R6/include
9765 /usr/local/X11R5/include
9766 /usr/local/X11R4/include
9768 /usr/local/include/X11
9769 /usr/local/include/X11R6
9770 /usr/local/include/X11R5
9771 /usr/local/include/X11R4
9775 /usr/XFree86/include/X11
9779 /usr/unsupported/include
9781 /usr/local/x11r5/include
9782 /usr/lpp/Xamples/include
9784 /usr/openwin/include
9785 /usr/openwin/share/include'
9787 if test "$ac_x_includes" = no; then
9788 # Guess where to find include files, by looking for Intrinsic.h.
9789 # First, try using that file with no special directory specified.
9790 cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9793 #include <X11/Intrinsic.h>
9795 if { (eval echo "$as_me:9795: \"$ac_cpp conftest.$ac_ext\"") >&5
9796 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9798 egrep -v '^ *\+' conftest.er1 >conftest.err
9800 cat conftest.err >&5
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit $ac_status); } >/dev/null; then
9803 if test -s conftest.err; then
9804 ac_cpp_err=$ac_c_preproc_warn_flag
9811 if test -z "$ac_cpp_err"; then
9812 # We can compile using X headers with no special include directory.
9815 echo "$as_me: failed program was:" >&5
9816 cat conftest.$ac_ext >&5
9817 for ac_dir in $ac_x_header_dirs; do
9818 if test -r "$ac_dir/X11/Intrinsic.h"; then
9819 ac_x_includes=$ac_dir
9824 rm -f conftest.err conftest.$ac_ext
9825 fi # $ac_x_includes = no
9827 if test "$ac_x_libraries" = no; then
9828 # Check for the libraries.
9829 # See if we find them without any special options.
9830 # Don't add to $LIBS permanently.
9833 cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9836 #include <X11/Intrinsic.h>
9845 rm -f conftest.$ac_objext conftest$ac_exeext
9846 if { (eval echo "$as_me:9846: \"$ac_link\"") >&5
9847 (eval $ac_link) 2>&5
9849 echo "$as_me:9849: \$? = $ac_status" >&5
9850 (exit $ac_status); } &&
9851 { ac_try='test -s conftest$ac_exeext'
9852 { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9855 echo "$as_me:9855: \$? = $ac_status" >&5
9856 (exit $ac_status); }; }; then
9858 # We can link X programs with no special library path.
9861 echo "$as_me: failed program was:" >&5
9862 cat conftest.$ac_ext >&5
9864 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9866 # Don't even attempt the hair of trying to link an X program!
9867 for ac_extension in a so sl dylib dll; do
9868 if test -r $ac_dir/libXt.$ac_extension; then
9869 ac_x_libraries=$ac_dir
9875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9876 fi # $ac_x_libraries = no
9878 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9879 # Didn't find X anywhere. Cache the known absence of X.
9880 ac_cv_have_x="have_x=no"
9882 # Record where we found X for the cache.
9883 ac_cv_have_x="have_x=yes \
9884 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9889 eval "$ac_cv_have_x"
9892 if test "$have_x" != yes; then
9893 echo "$as_me:9893: result: $have_x" >&5
9894 echo "${ECHO_T}$have_x" >&6
9897 # If each of the values was on the command line, it overrides each guess.
9898 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9899 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9900 # Update the cache value to reflect the command line values.
9901 ac_cv_have_x="have_x=yes \
9902 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9903 echo "$as_me:9903: result: libraries $x_libraries, headers $x_includes" >&5
9904 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9907 if test "$no_x" = yes; then
9908 # Not all programs may use this symbol, but it does not hurt to define it.
9910 cat >>confdefs.h <<\EOF
9911 #define X_DISPLAY_MISSING 1
9914 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9916 if test -n "$x_includes"; then
9917 X_CFLAGS="$X_CFLAGS -I$x_includes"
9920 # It would also be nice to do this for all -L options, not just this one.
9921 if test -n "$x_libraries"; then
9922 X_LIBS="$X_LIBS -L$x_libraries"
9923 # For Solaris; some versions of Sun CC require a space after -R and
9924 # others require no space. Words are not sufficient . . . .
9925 case `(uname -sr) 2>/dev/null` in
9927 echo "$as_me:9927: checking whether -R must be followed by a space" >&5
9928 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9929 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9930 cat >conftest.$ac_ext <<_ACEOF
9931 #line 9931 "configure"
9932 #include "confdefs.h"
9942 rm -f conftest.$ac_objext conftest$ac_exeext
9943 if { (eval echo "$as_me:9943: \"$ac_link\"") >&5
9944 (eval $ac_link) 2>&5
9946 echo "$as_me:9946: \$? = $ac_status" >&5
9947 (exit $ac_status); } &&
9948 { ac_try='test -s conftest$ac_exeext'
9949 { (eval echo "$as_me:9949: \"$ac_try\"") >&5
9952 echo "$as_me:9952: \$? = $ac_status" >&5
9953 (exit $ac_status); }; }; then
9956 echo "$as_me: failed program was:" >&5
9957 cat conftest.$ac_ext >&5
9960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9961 if test $ac_R_nospace = yes; then
9962 echo "$as_me:9962: result: no" >&5
9963 echo "${ECHO_T}no" >&6
9964 X_LIBS="$X_LIBS -R$x_libraries"
9966 LIBS="$ac_xsave_LIBS -R $x_libraries"
9967 cat >conftest.$ac_ext <<_ACEOF
9968 #line 9968 "configure"
9969 #include "confdefs.h"
9979 rm -f conftest.$ac_objext conftest$ac_exeext
9980 if { (eval echo "$as_me:9980: \"$ac_link\"") >&5
9981 (eval $ac_link) 2>&5
9983 echo "$as_me:9983: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -s conftest$ac_exeext'
9986 { (eval echo "$as_me:9986: \"$ac_try\"") >&5
9989 echo "$as_me:9989: \$? = $ac_status" >&5
9990 (exit $ac_status); }; }; then
9993 echo "$as_me: failed program was:" >&5
9994 cat conftest.$ac_ext >&5
9997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9998 if test $ac_R_space = yes; then
9999 echo "$as_me:9999: result: yes" >&5
10000 echo "${ECHO_T}yes" >&6
10001 X_LIBS="$X_LIBS -R $x_libraries"
10003 echo "$as_me:10003: result: neither works" >&5
10004 echo "${ECHO_T}neither works" >&6
10007 LIBS=$ac_xsave_LIBS
10011 # Check for system-dependent libraries X programs must link with.
10012 # Do this before checking for the system-independent R6 libraries
10013 # (-lICE), since we may need -lsocket or whatever for X linking.
10015 if test "$ISC" = yes; then
10016 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10018 # Martyn Johnson says this is needed for Ultrix, if the X
10019 # libraries were built with DECnet support. And Karl Berry says
10020 # the Alpha needs dnet_stub (dnet does not exist).
10021 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10022 cat >conftest.$ac_ext <<_ACEOF
10023 #line 10023 "configure"
10024 #include "confdefs.h"
10026 /* Override any gcc2 internal prototype to avoid an error. */
10030 /* We use char because int might match the return type of a gcc2
10031 builtin and then its argument prototype would still apply. */
10032 char XOpenDisplay ();
10041 rm -f conftest.$ac_objext conftest$ac_exeext
10042 if { (eval echo "$as_me:10042: \"$ac_link\"") >&5
10043 (eval $ac_link) 2>&5
10045 echo "$as_me:10045: \$? = $ac_status" >&5
10046 (exit $ac_status); } &&
10047 { ac_try='test -s conftest$ac_exeext'
10048 { (eval echo "$as_me:10048: \"$ac_try\"") >&5
10049 (eval $ac_try) 2>&5
10051 echo "$as_me:10051: \$? = $ac_status" >&5
10052 (exit $ac_status); }; }; then
10055 echo "$as_me: failed program was:" >&5
10056 cat conftest.$ac_ext >&5
10057 echo "$as_me:10057: checking for dnet_ntoa in -ldnet" >&5
10058 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10059 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10060 echo $ECHO_N "(cached) $ECHO_C" >&6
10062 ac_check_lib_save_LIBS=$LIBS
10063 LIBS="-ldnet $LIBS"
10064 cat >conftest.$ac_ext <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10068 /* Override any gcc2 internal prototype to avoid an error. */
10072 /* We use char because int might match the return type of a gcc2
10073 builtin and then its argument prototype would still apply. */
10083 rm -f conftest.$ac_objext conftest$ac_exeext
10084 if { (eval echo "$as_me:10084: \"$ac_link\"") >&5
10085 (eval $ac_link) 2>&5
10087 echo "$as_me:10087: \$? = $ac_status" >&5
10088 (exit $ac_status); } &&
10089 { ac_try='test -s conftest$ac_exeext'
10090 { (eval echo "$as_me:10090: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10093 echo "$as_me:10093: \$? = $ac_status" >&5
10094 (exit $ac_status); }; }; then
10095 ac_cv_lib_dnet_dnet_ntoa=yes
10097 echo "$as_me: failed program was:" >&5
10098 cat conftest.$ac_ext >&5
10099 ac_cv_lib_dnet_dnet_ntoa=no
10101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10102 LIBS=$ac_check_lib_save_LIBS
10104 echo "$as_me:10104: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10105 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10106 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10107 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10110 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10111 echo "$as_me:10111: checking for dnet_ntoa in -ldnet_stub" >&5
10112 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10113 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
10116 ac_check_lib_save_LIBS=$LIBS
10117 LIBS="-ldnet_stub $LIBS"
10118 cat >conftest.$ac_ext <<_ACEOF
10119 #line 10119 "configure"
10120 #include "confdefs.h"
10122 /* Override any gcc2 internal prototype to avoid an error. */
10126 /* We use char because int might match the return type of a gcc2
10127 builtin and then its argument prototype would still apply. */
10137 rm -f conftest.$ac_objext conftest$ac_exeext
10138 if { (eval echo "$as_me:10138: \"$ac_link\"") >&5
10139 (eval $ac_link) 2>&5
10141 echo "$as_me:10141: \$? = $ac_status" >&5
10142 (exit $ac_status); } &&
10143 { ac_try='test -s conftest$ac_exeext'
10144 { (eval echo "$as_me:10144: \"$ac_try\"") >&5
10145 (eval $ac_try) 2>&5
10147 echo "$as_me:10147: \$? = $ac_status" >&5
10148 (exit $ac_status); }; }; then
10149 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10151 echo "$as_me: failed program was:" >&5
10152 cat conftest.$ac_ext >&5
10153 ac_cv_lib_dnet_stub_dnet_ntoa=no
10155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10156 LIBS=$ac_check_lib_save_LIBS
10158 echo "$as_me:10158: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10159 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10160 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10161 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10167 LIBS="$ac_xsave_LIBS"
10169 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10170 # to get the SysV transport functions.
10171 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10173 # The nsl library prevents programs from opening the X display
10174 # on Irix 5.2, according to T.E. Dickey.
10175 # The functions gethostbyname, getservbyname, and inet_addr are
10176 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10177 echo "$as_me:10177: checking for gethostbyname" >&5
10178 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10179 if test "${ac_cv_func_gethostbyname+set}" = set; then
10180 echo $ECHO_N "(cached) $ECHO_C" >&6
10182 cat >conftest.$ac_ext <<_ACEOF
10183 #line 10183 "configure"
10184 #include "confdefs.h"
10185 /* System header to define __stub macros and hopefully few prototypes,
10186 which can conflict with char gethostbyname (); below. */
10187 #include <assert.h>
10188 /* Override any gcc2 internal prototype to avoid an error. */
10192 /* We use char because int might match the return type of a gcc2
10193 builtin and then its argument prototype would still apply. */
10194 char gethostbyname ();
10200 /* The GNU C library defines this for functions which it implements
10201 to always fail with ENOSYS. Some functions are actually named
10202 something starting with __ and the normal name is an alias. */
10203 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10206 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10213 rm -f conftest.$ac_objext conftest$ac_exeext
10214 if { (eval echo "$as_me:10214: \"$ac_link\"") >&5
10215 (eval $ac_link) 2>&5
10217 echo "$as_me:10217: \$? = $ac_status" >&5
10218 (exit $ac_status); } &&
10219 { ac_try='test -s conftest$ac_exeext'
10220 { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10223 echo "$as_me:10223: \$? = $ac_status" >&5
10224 (exit $ac_status); }; }; then
10225 ac_cv_func_gethostbyname=yes
10227 echo "$as_me: failed program was:" >&5
10228 cat conftest.$ac_ext >&5
10229 ac_cv_func_gethostbyname=no
10231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10233 echo "$as_me:10233: result: $ac_cv_func_gethostbyname" >&5
10234 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10236 if test $ac_cv_func_gethostbyname = no; then
10237 echo "$as_me:10237: checking for gethostbyname in -lnsl" >&5
10238 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10239 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10240 echo $ECHO_N "(cached) $ECHO_C" >&6
10242 ac_check_lib_save_LIBS=$LIBS
10244 cat >conftest.$ac_ext <<_ACEOF
10245 #line 10245 "configure"
10246 #include "confdefs.h"
10248 /* Override any gcc2 internal prototype to avoid an error. */
10252 /* We use char because int might match the return type of a gcc2
10253 builtin and then its argument prototype would still apply. */
10254 char gethostbyname ();
10263 rm -f conftest.$ac_objext conftest$ac_exeext
10264 if { (eval echo "$as_me:10264: \"$ac_link\"") >&5
10265 (eval $ac_link) 2>&5
10267 echo "$as_me:10267: \$? = $ac_status" >&5
10268 (exit $ac_status); } &&
10269 { ac_try='test -s conftest$ac_exeext'
10270 { (eval echo "$as_me:10270: \"$ac_try\"") >&5
10271 (eval $ac_try) 2>&5
10273 echo "$as_me:10273: \$? = $ac_status" >&5
10274 (exit $ac_status); }; }; then
10275 ac_cv_lib_nsl_gethostbyname=yes
10277 echo "$as_me: failed program was:" >&5
10278 cat conftest.$ac_ext >&5
10279 ac_cv_lib_nsl_gethostbyname=no
10281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10282 LIBS=$ac_check_lib_save_LIBS
10284 echo "$as_me:10284: result: $ac_cv_lib_nsl_gethostbyname" >&5
10285 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10286 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10287 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10290 if test $ac_cv_lib_nsl_gethostbyname = no; then
10291 echo "$as_me:10291: checking for gethostbyname in -lbsd" >&5
10292 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10293 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10294 echo $ECHO_N "(cached) $ECHO_C" >&6
10296 ac_check_lib_save_LIBS=$LIBS
10298 cat >conftest.$ac_ext <<_ACEOF
10299 #line 10299 "configure"
10300 #include "confdefs.h"
10302 /* Override any gcc2 internal prototype to avoid an error. */
10306 /* We use char because int might match the return type of a gcc2
10307 builtin and then its argument prototype would still apply. */
10308 char gethostbyname ();
10317 rm -f conftest.$ac_objext conftest$ac_exeext
10318 if { (eval echo "$as_me:10318: \"$ac_link\"") >&5
10319 (eval $ac_link) 2>&5
10321 echo "$as_me:10321: \$? = $ac_status" >&5
10322 (exit $ac_status); } &&
10323 { ac_try='test -s conftest$ac_exeext'
10324 { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325 (eval $ac_try) 2>&5
10327 echo "$as_me:10327: \$? = $ac_status" >&5
10328 (exit $ac_status); }; }; then
10329 ac_cv_lib_bsd_gethostbyname=yes
10331 echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 ac_cv_lib_bsd_gethostbyname=no
10335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10336 LIBS=$ac_check_lib_save_LIBS
10338 echo "$as_me:10338: result: $ac_cv_lib_bsd_gethostbyname" >&5
10339 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10340 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10341 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10347 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10348 # socket/setsockopt and other routines are undefined under SCO ODT
10349 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10350 # on later versions), says Simon Leinen: it contains gethostby*
10351 # variants that don't use the nameserver (or something). -lsocket
10352 # must be given before -lnsl if both are needed. We assume that
10353 # if connect needs -lnsl, so does gethostbyname.
10354 echo "$as_me:10354: checking for connect" >&5
10355 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10356 if test "${ac_cv_func_connect+set}" = set; then
10357 echo $ECHO_N "(cached) $ECHO_C" >&6
10359 cat >conftest.$ac_ext <<_ACEOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362 /* System header to define __stub macros and hopefully few prototypes,
10363 which can conflict with char connect (); below. */
10364 #include <assert.h>
10365 /* Override any gcc2 internal prototype to avoid an error. */
10369 /* We use char because int might match the return type of a gcc2
10370 builtin and then its argument prototype would still apply. */
10377 /* The GNU C library defines this for functions which it implements
10378 to always fail with ENOSYS. Some functions are actually named
10379 something starting with __ and the normal name is an alias. */
10380 #if defined (__stub_connect) || defined (__stub___connect)
10383 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10390 rm -f conftest.$ac_objext conftest$ac_exeext
10391 if { (eval echo "$as_me:10391: \"$ac_link\"") >&5
10392 (eval $ac_link) 2>&5
10394 echo "$as_me:10394: \$? = $ac_status" >&5
10395 (exit $ac_status); } &&
10396 { ac_try='test -s conftest$ac_exeext'
10397 { (eval echo "$as_me:10397: \"$ac_try\"") >&5
10398 (eval $ac_try) 2>&5
10400 echo "$as_me:10400: \$? = $ac_status" >&5
10401 (exit $ac_status); }; }; then
10402 ac_cv_func_connect=yes
10404 echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406 ac_cv_func_connect=no
10408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10410 echo "$as_me:10410: result: $ac_cv_func_connect" >&5
10411 echo "${ECHO_T}$ac_cv_func_connect" >&6
10413 if test $ac_cv_func_connect = no; then
10414 echo "$as_me:10414: checking for connect in -lsocket" >&5
10415 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10416 if test "${ac_cv_lib_socket_connect+set}" = set; then
10417 echo $ECHO_N "(cached) $ECHO_C" >&6
10419 ac_check_lib_save_LIBS=$LIBS
10420 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10421 cat >conftest.$ac_ext <<_ACEOF
10422 #line 10422 "configure"
10423 #include "confdefs.h"
10425 /* Override any gcc2 internal prototype to avoid an error. */
10429 /* We use char because int might match the return type of a gcc2
10430 builtin and then its argument prototype would still apply. */
10440 rm -f conftest.$ac_objext conftest$ac_exeext
10441 if { (eval echo "$as_me:10441: \"$ac_link\"") >&5
10442 (eval $ac_link) 2>&5
10444 echo "$as_me:10444: \$? = $ac_status" >&5
10445 (exit $ac_status); } &&
10446 { ac_try='test -s conftest$ac_exeext'
10447 { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448 (eval $ac_try) 2>&5
10450 echo "$as_me:10450: \$? = $ac_status" >&5
10451 (exit $ac_status); }; }; then
10452 ac_cv_lib_socket_connect=yes
10454 echo "$as_me: failed program was:" >&5
10455 cat conftest.$ac_ext >&5
10456 ac_cv_lib_socket_connect=no
10458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10459 LIBS=$ac_check_lib_save_LIBS
10461 echo "$as_me:10461: result: $ac_cv_lib_socket_connect" >&5
10462 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10463 if test $ac_cv_lib_socket_connect = yes; then
10464 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10469 # Guillermo Gomez says -lposix is necessary on A/UX.
10470 echo "$as_me:10470: checking for remove" >&5
10471 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10472 if test "${ac_cv_func_remove+set}" = set; then
10473 echo $ECHO_N "(cached) $ECHO_C" >&6
10475 cat >conftest.$ac_ext <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478 /* System header to define __stub macros and hopefully few prototypes,
10479 which can conflict with char remove (); below. */
10480 #include <assert.h>
10481 /* Override any gcc2 internal prototype to avoid an error. */
10485 /* We use char because int might match the return type of a gcc2
10486 builtin and then its argument prototype would still apply. */
10493 /* The GNU C library defines this for functions which it implements
10494 to always fail with ENOSYS. Some functions are actually named
10495 something starting with __ and the normal name is an alias. */
10496 #if defined (__stub_remove) || defined (__stub___remove)
10499 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10506 rm -f conftest.$ac_objext conftest$ac_exeext
10507 if { (eval echo "$as_me:10507: \"$ac_link\"") >&5
10508 (eval $ac_link) 2>&5
10510 echo "$as_me:10510: \$? = $ac_status" >&5
10511 (exit $ac_status); } &&
10512 { ac_try='test -s conftest$ac_exeext'
10513 { (eval echo "$as_me:10513: \"$ac_try\"") >&5
10514 (eval $ac_try) 2>&5
10516 echo "$as_me:10516: \$? = $ac_status" >&5
10517 (exit $ac_status); }; }; then
10518 ac_cv_func_remove=yes
10520 echo "$as_me: failed program was:" >&5
10521 cat conftest.$ac_ext >&5
10522 ac_cv_func_remove=no
10524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10526 echo "$as_me:10526: result: $ac_cv_func_remove" >&5
10527 echo "${ECHO_T}$ac_cv_func_remove" >&6
10529 if test $ac_cv_func_remove = no; then
10530 echo "$as_me:10530: checking for remove in -lposix" >&5
10531 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10532 if test "${ac_cv_lib_posix_remove+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
10535 ac_check_lib_save_LIBS=$LIBS
10536 LIBS="-lposix $LIBS"
10537 cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10541 /* Override any gcc2 internal prototype to avoid an error. */
10545 /* We use char because int might match the return type of a gcc2
10546 builtin and then its argument prototype would still apply. */
10556 rm -f conftest.$ac_objext conftest$ac_exeext
10557 if { (eval echo "$as_me:10557: \"$ac_link\"") >&5
10558 (eval $ac_link) 2>&5
10560 echo "$as_me:10560: \$? = $ac_status" >&5
10561 (exit $ac_status); } &&
10562 { ac_try='test -s conftest$ac_exeext'
10563 { (eval echo "$as_me:10563: \"$ac_try\"") >&5
10564 (eval $ac_try) 2>&5
10566 echo "$as_me:10566: \$? = $ac_status" >&5
10567 (exit $ac_status); }; }; then
10568 ac_cv_lib_posix_remove=yes
10570 echo "$as_me: failed program was:" >&5
10571 cat conftest.$ac_ext >&5
10572 ac_cv_lib_posix_remove=no
10574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10575 LIBS=$ac_check_lib_save_LIBS
10577 echo "$as_me:10577: result: $ac_cv_lib_posix_remove" >&5
10578 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10579 if test $ac_cv_lib_posix_remove = yes; then
10580 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10585 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10586 echo "$as_me:10586: checking for shmat" >&5
10587 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10588 if test "${ac_cv_func_shmat+set}" = set; then
10589 echo $ECHO_N "(cached) $ECHO_C" >&6
10591 cat >conftest.$ac_ext <<_ACEOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594 /* System header to define __stub macros and hopefully few prototypes,
10595 which can conflict with char shmat (); below. */
10596 #include <assert.h>
10597 /* Override any gcc2 internal prototype to avoid an error. */
10601 /* We use char because int might match the return type of a gcc2
10602 builtin and then its argument prototype would still apply. */
10609 /* The GNU C library defines this for functions which it implements
10610 to always fail with ENOSYS. Some functions are actually named
10611 something starting with __ and the normal name is an alias. */
10612 #if defined (__stub_shmat) || defined (__stub___shmat)
10615 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624 (eval $ac_link) 2>&5
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit $ac_status); } &&
10628 { ac_try='test -s conftest$ac_exeext'
10629 { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10632 echo "$as_me:10632: \$? = $ac_status" >&5
10633 (exit $ac_status); }; }; then
10634 ac_cv_func_shmat=yes
10636 echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_func_shmat=no
10640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10642 echo "$as_me:10642: result: $ac_cv_func_shmat" >&5
10643 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10645 if test $ac_cv_func_shmat = no; then
10646 echo "$as_me:10646: checking for shmat in -lipc" >&5
10647 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10648 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10649 echo $ECHO_N "(cached) $ECHO_C" >&6
10651 ac_check_lib_save_LIBS=$LIBS
10653 cat >conftest.$ac_ext <<_ACEOF
10654 #line 10654 "configure"
10655 #include "confdefs.h"
10657 /* Override any gcc2 internal prototype to avoid an error. */
10661 /* We use char because int might match the return type of a gcc2
10662 builtin and then its argument prototype would still apply. */
10672 rm -f conftest.$ac_objext conftest$ac_exeext
10673 if { (eval echo "$as_me:10673: \"$ac_link\"") >&5
10674 (eval $ac_link) 2>&5
10676 echo "$as_me:10676: \$? = $ac_status" >&5
10677 (exit $ac_status); } &&
10678 { ac_try='test -s conftest$ac_exeext'
10679 { (eval echo "$as_me:10679: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10682 echo "$as_me:10682: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 ac_cv_lib_ipc_shmat=yes
10686 echo "$as_me: failed program was:" >&5
10687 cat conftest.$ac_ext >&5
10688 ac_cv_lib_ipc_shmat=no
10690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10691 LIBS=$ac_check_lib_save_LIBS
10693 echo "$as_me:10693: result: $ac_cv_lib_ipc_shmat" >&5
10694 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10695 if test $ac_cv_lib_ipc_shmat = yes; then
10696 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10702 # Check for libraries that X11R6 Xt/Xaw programs need.
10703 ac_save_LDFLAGS=$LDFLAGS
10704 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10705 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10706 # check for ICE first), but we must link in the order -lSM -lICE or
10707 # we get undefined symbols. So assume we have SM if we have ICE.
10708 # These have to be linked with before -lX11, unlike the other
10709 # libraries we check for below, so use a different variable.
10710 # John Interrante, Karl Berry
10711 echo "$as_me:10711: checking for IceConnectionNumber in -lICE" >&5
10712 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10713 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10714 echo $ECHO_N "(cached) $ECHO_C" >&6
10716 ac_check_lib_save_LIBS=$LIBS
10717 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10718 cat >conftest.$ac_ext <<_ACEOF
10719 #line 10719 "configure"
10720 #include "confdefs.h"
10722 /* Override any gcc2 internal prototype to avoid an error. */
10726 /* We use char because int might match the return type of a gcc2
10727 builtin and then its argument prototype would still apply. */
10728 char IceConnectionNumber ();
10732 IceConnectionNumber ();
10737 rm -f conftest.$ac_objext conftest$ac_exeext
10738 if { (eval echo "$as_me:10738: \"$ac_link\"") >&5
10739 (eval $ac_link) 2>&5
10741 echo "$as_me:10741: \$? = $ac_status" >&5
10742 (exit $ac_status); } &&
10743 { ac_try='test -s conftest$ac_exeext'
10744 { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745 (eval $ac_try) 2>&5
10747 echo "$as_me:10747: \$? = $ac_status" >&5
10748 (exit $ac_status); }; }; then
10749 ac_cv_lib_ICE_IceConnectionNumber=yes
10751 echo "$as_me: failed program was:" >&5
10752 cat conftest.$ac_ext >&5
10753 ac_cv_lib_ICE_IceConnectionNumber=no
10755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10756 LIBS=$ac_check_lib_save_LIBS
10758 echo "$as_me:10758: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10759 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10760 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10761 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10764 LDFLAGS=$ac_save_LDFLAGS
10768 cf_x_athena=${cf_x_athena:-Xaw}
10770 echo "$as_me:10770: checking if you want to link with Xaw 3d library" >&5
10771 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10774 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10775 if test "${with_Xaw3d+set}" = set; then
10776 withval="$with_Xaw3d"
10779 if test "$withval" = yes ; then
10781 echo "$as_me:10781: result: yes" >&5
10782 echo "${ECHO_T}yes" >&6
10784 echo "$as_me:10784: result: no" >&5
10785 echo "${ECHO_T}no" >&6
10788 echo "$as_me:10788: checking if you want to link with Xaw 3d xft library" >&5
10789 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10792 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10793 if test "${with_Xaw3dxft+set}" = set; then
10794 withval="$with_Xaw3dxft"
10797 if test "$withval" = yes ; then
10798 cf_x_athena=Xaw3dxft
10799 echo "$as_me:10799: result: yes" >&5
10800 echo "${ECHO_T}yes" >&6
10802 echo "$as_me:10802: result: no" >&5
10803 echo "${ECHO_T}no" >&6
10806 echo "$as_me:10806: checking if you want to link with neXT Athena library" >&5
10807 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10810 # Check whether --with-neXtaw or --without-neXtaw was given.
10811 if test "${with_neXtaw+set}" = set; then
10812 withval="$with_neXtaw"
10815 if test "$withval" = yes ; then
10817 echo "$as_me:10817: result: yes" >&5
10818 echo "${ECHO_T}yes" >&6
10820 echo "$as_me:10820: result: no" >&5
10821 echo "${ECHO_T}no" >&6
10824 echo "$as_me:10824: checking if you want to link with Athena-Plus library" >&5
10825 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10828 # Check whether --with-XawPlus or --without-XawPlus was given.
10829 if test "${with_XawPlus+set}" = set; then
10830 withval="$with_XawPlus"
10833 if test "$withval" = yes ; then
10834 cf_x_athena=XawPlus
10835 echo "$as_me:10835: result: yes" >&5
10836 echo "${ECHO_T}yes" >&6
10838 echo "$as_me:10838: result: no" >&5
10839 echo "${ECHO_T}no" >&6
10844 if test "$PKG_CONFIG" != none ; then
10846 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10847 for cf_athena_pkg in \
10850 ${cf_x_athena}-devel \
10851 lib${cf_x_athena} \
10852 lib${cf_x_athena}-devel
10855 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10856 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10858 echo "${as_me:-configure}:10858: testing found package $cf_athena_pkg ..." 1>&5
10860 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10861 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10862 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10864 echo "${as_me:-configure}:10864: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10866 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10868 echo "${as_me:-configure}:10868: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10873 cf_new_extra_cppflags=
10875 for cf_add_cflags in $cf_pkgconfig_incs
10877 case $cf_fix_cppflags in
10879 case $cf_add_cflags in
10880 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10881 case $cf_add_cflags in
10883 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10885 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10886 && test -z "${cf_tst_cflags}" \
10887 && cf_fix_cppflags=yes
10889 if test $cf_fix_cppflags = yes ; then
10890 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10892 elif test "${cf_tst_cflags}" = "\"'" ; then
10893 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10898 case "$CPPFLAGS" in
10902 case $cf_add_cflags in
10904 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10906 CPPFLAGS=`echo "$CPPFLAGS" | \
10907 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10908 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10912 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10917 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10922 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10924 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10926 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10927 && test -z "${cf_tst_cflags}" \
10928 && cf_fix_cppflags=no
10933 if test -n "$cf_new_cflags" ; then
10935 CFLAGS="$CFLAGS $cf_new_cflags"
10938 if test -n "$cf_new_cppflags" ; then
10940 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10943 if test -n "$cf_new_extra_cppflags" ; then
10945 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10948 cf_add_libs="$cf_pkgconfig_libs"
10949 # Filter out duplicates - this happens with badly-designed ".pc" files...
10950 for cf_add_1lib in $LIBS
10952 for cf_add_2lib in $cf_add_libs
10954 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10960 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10962 LIBS="$cf_add_libs"
10964 cf_x_athena_lib="$cf_pkgconfig_libs"
10966 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10968 cat >>confdefs.h <<EOF
10969 #define $cf_x_athena_LIBS 1
10972 for cf_trim_lib in Xmu Xt X11
10975 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10976 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10977 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10979 echo "${as_me:-configure}:10979: testing ..trimmed $LIBS ..." 1>&5
10985 echo "$as_me:10985: checking for usable $cf_x_athena/Xmu package" >&5
10986 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10987 if test "${cf_cv_xaw_compat+set}" = set; then
10988 echo $ECHO_N "(cached) $ECHO_C" >&6
10991 cat >conftest.$ac_ext <<_ACEOF
10992 #line 10992 "configure"
10993 #include "confdefs.h"
10995 #include <X11/Xmu/CharSet.h>
11001 int check = XmuCompareISOLatin1("big", "small")
11007 rm -f conftest.$ac_objext conftest$ac_exeext
11008 if { (eval echo "$as_me:11008: \"$ac_link\"") >&5
11009 (eval $ac_link) 2>&5
11011 echo "$as_me:11011: \$? = $ac_status" >&5
11012 (exit $ac_status); } &&
11013 { ac_try='test -s conftest$ac_exeext'
11014 { (eval echo "$as_me:11014: \"$ac_try\"") >&5
11015 (eval $ac_try) 2>&5
11017 echo "$as_me:11017: \$? = $ac_status" >&5
11018 (exit $ac_status); }; }; then
11019 cf_cv_xaw_compat=yes
11021 echo "$as_me: failed program was:" >&5
11022 cat conftest.$ac_ext >&5
11023 cf_cv_xaw_compat=no
11025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11027 echo "$as_me:11027: result: $cf_cv_xaw_compat" >&5
11028 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11030 if test "$cf_cv_xaw_compat" = no
11032 # workaround for broken ".pc" files...
11033 case "$cf_x_athena_lib" in
11037 test -n "$verbose" && echo " work around broken package" 1>&6
11039 echo "${as_me:-configure}:11039: testing work around broken package ..." 1>&5
11041 cf_save_xmu="$LIBS"
11042 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
11044 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11045 test -n "$verbose" && echo " found package xmu" 1>&6
11047 echo "${as_me:-configure}:11047: testing found package xmu ..." 1>&5
11049 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11050 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11051 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11053 echo "${as_me:-configure}:11053: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11055 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11057 echo "${as_me:-configure}:11057: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11062 cf_new_extra_cppflags=
11064 for cf_add_cflags in $cf_pkgconfig_incs
11066 case $cf_fix_cppflags in
11068 case $cf_add_cflags in
11069 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11070 case $cf_add_cflags in
11072 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11075 && test -z "${cf_tst_cflags}" \
11076 && cf_fix_cppflags=yes
11078 if test $cf_fix_cppflags = yes ; then
11079 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11081 elif test "${cf_tst_cflags}" = "\"'" ; then
11082 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11087 case "$CPPFLAGS" in
11091 case $cf_add_cflags in
11093 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11095 CPPFLAGS=`echo "$CPPFLAGS" | \
11096 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11097 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11101 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11106 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11111 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11113 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11115 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11116 && test -z "${cf_tst_cflags}" \
11117 && cf_fix_cppflags=no
11122 if test -n "$cf_new_cflags" ; then
11124 CFLAGS="$CFLAGS $cf_new_cflags"
11127 if test -n "$cf_new_cppflags" ; then
11129 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11132 if test -n "$cf_new_extra_cppflags" ; then
11134 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11137 cf_add_libs="$cf_pkgconfig_libs"
11138 # Filter out duplicates - this happens with badly-designed ".pc" files...
11139 for cf_add_1lib in $LIBS
11141 for cf_add_2lib in $cf_add_libs
11143 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11149 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11151 LIBS="$cf_add_libs"
11153 LIBS="$cf_save_xmu"
11155 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11157 echo "${as_me:-configure}:11157: testing ...before $LIBS ..." 1>&5
11159 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
11160 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11162 echo "${as_me:-configure}:11162: testing ...after $LIBS ..." 1>&5
11168 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11170 echo "${as_me:-configure}:11170: testing ...before $LIBS ..." 1>&5
11172 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
11173 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11175 echo "${as_me:-configure}:11175: testing ...after $LIBS ..." 1>&5
11179 for cf_trim_lib in Xmu Xt X11
11182 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11183 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11184 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11186 echo "${as_me:-configure}:11186: testing ..trimmed $LIBS ..." 1>&5
11206 if test -z "$cf_x_athena_lib" ; then
11208 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11209 test -n "$verbose" && echo " found package Xext" 1>&6
11211 echo "${as_me:-configure}:11211: testing found package Xext ..." 1>&5
11213 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11214 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11215 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11217 echo "${as_me:-configure}:11217: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11219 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11221 echo "${as_me:-configure}:11221: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11226 cf_new_extra_cppflags=
11228 for cf_add_cflags in $cf_pkgconfig_incs
11230 case $cf_fix_cppflags in
11232 case $cf_add_cflags in
11233 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11234 case $cf_add_cflags in
11236 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11238 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11239 && test -z "${cf_tst_cflags}" \
11240 && cf_fix_cppflags=yes
11242 if test $cf_fix_cppflags = yes ; then
11243 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11245 elif test "${cf_tst_cflags}" = "\"'" ; then
11246 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11251 case "$CPPFLAGS" in
11255 case $cf_add_cflags in
11257 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11259 CPPFLAGS=`echo "$CPPFLAGS" | \
11260 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11261 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11265 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11270 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11275 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11277 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11280 && test -z "${cf_tst_cflags}" \
11281 && cf_fix_cppflags=no
11286 if test -n "$cf_new_cflags" ; then
11288 CFLAGS="$CFLAGS $cf_new_cflags"
11291 if test -n "$cf_new_cppflags" ; then
11293 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11296 if test -n "$cf_new_extra_cppflags" ; then
11298 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11301 cf_add_libs="$cf_pkgconfig_libs"
11302 # Filter out duplicates - this happens with badly-designed ".pc" files...
11303 for cf_add_1lib in $LIBS
11305 for cf_add_2lib in $cf_add_libs
11307 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11313 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11315 LIBS="$cf_add_libs"
11322 echo "$as_me:11322: checking for XextCreateExtension in -lXext" >&5
11323 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11324 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11325 echo $ECHO_N "(cached) $ECHO_C" >&6
11327 ac_check_lib_save_LIBS=$LIBS
11328 LIBS="-lXext $LIBS"
11329 cat >conftest.$ac_ext <<_ACEOF
11330 #line 11330 "configure"
11331 #include "confdefs.h"
11333 /* Override any gcc2 internal prototype to avoid an error. */
11337 /* We use char because int might match the return type of a gcc2
11338 builtin and then its argument prototype would still apply. */
11339 char XextCreateExtension ();
11343 XextCreateExtension ();
11348 rm -f conftest.$ac_objext conftest$ac_exeext
11349 if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
11350 (eval $ac_link) 2>&5
11352 echo "$as_me:11352: \$? = $ac_status" >&5
11353 (exit $ac_status); } &&
11354 { ac_try='test -s conftest$ac_exeext'
11355 { (eval echo "$as_me:11355: \"$ac_try\"") >&5
11356 (eval $ac_try) 2>&5
11358 echo "$as_me:11358: \$? = $ac_status" >&5
11359 (exit $ac_status); }; }; then
11360 ac_cv_lib_Xext_XextCreateExtension=yes
11362 echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_cv_lib_Xext_XextCreateExtension=no
11366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11367 LIBS=$ac_check_lib_save_LIBS
11369 echo "$as_me:11369: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11370 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11371 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11373 cf_add_libs="-lXext"
11374 # Filter out duplicates - this happens with badly-designed ".pc" files...
11375 for cf_add_1lib in $LIBS
11377 for cf_add_2lib in $cf_add_libs
11379 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11385 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11387 LIBS="$cf_add_libs"
11393 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11394 # in some cases has installed dummy files in the former, other cases replaced
11395 # it with a link to the new location). This complicates the configure script.
11396 # Check for that pitfall, and recover using pkg-config
11398 # If none of these are set, the configuration is almost certainly broken.
11399 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11402 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11403 test -n "$verbose" && echo " found package x11" 1>&6
11405 echo "${as_me:-configure}:11405: testing found package x11 ..." 1>&5
11407 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11408 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11409 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11411 echo "${as_me:-configure}:11411: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11413 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11415 echo "${as_me:-configure}:11415: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11420 cf_new_extra_cppflags=
11422 for cf_add_cflags in $cf_pkgconfig_incs
11424 case $cf_fix_cppflags in
11426 case $cf_add_cflags in
11427 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11428 case $cf_add_cflags in
11430 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11432 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11433 && test -z "${cf_tst_cflags}" \
11434 && cf_fix_cppflags=yes
11436 if test $cf_fix_cppflags = yes ; then
11437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11439 elif test "${cf_tst_cflags}" = "\"'" ; then
11440 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11445 case "$CPPFLAGS" in
11449 case $cf_add_cflags in
11451 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11453 CPPFLAGS=`echo "$CPPFLAGS" | \
11454 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11455 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11459 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11464 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11469 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11471 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11473 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11474 && test -z "${cf_tst_cflags}" \
11475 && cf_fix_cppflags=no
11480 if test -n "$cf_new_cflags" ; then
11482 CFLAGS="$CFLAGS $cf_new_cflags"
11485 if test -n "$cf_new_cppflags" ; then
11487 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11490 if test -n "$cf_new_extra_cppflags" ; then
11492 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11495 cf_add_libs="$cf_pkgconfig_libs"
11496 # Filter out duplicates - this happens with badly-designed ".pc" files...
11497 for cf_add_1lib in $LIBS
11499 for cf_add_2lib in $cf_add_libs
11501 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11507 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11509 LIBS="$cf_add_libs"
11515 { echo "$as_me:11515: WARNING: unable to find X11 library" >&5
11516 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11519 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11520 test -n "$verbose" && echo " found package ice" 1>&6
11522 echo "${as_me:-configure}:11522: testing found package ice ..." 1>&5
11524 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11525 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11526 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11528 echo "${as_me:-configure}:11528: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11530 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11532 echo "${as_me:-configure}:11532: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11537 cf_new_extra_cppflags=
11539 for cf_add_cflags in $cf_pkgconfig_incs
11541 case $cf_fix_cppflags in
11543 case $cf_add_cflags in
11544 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11545 case $cf_add_cflags in
11547 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11550 && test -z "${cf_tst_cflags}" \
11551 && cf_fix_cppflags=yes
11553 if test $cf_fix_cppflags = yes ; then
11554 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11556 elif test "${cf_tst_cflags}" = "\"'" ; then
11557 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11562 case "$CPPFLAGS" in
11566 case $cf_add_cflags in
11568 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11570 CPPFLAGS=`echo "$CPPFLAGS" | \
11571 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11572 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11576 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11581 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11586 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11588 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11591 && test -z "${cf_tst_cflags}" \
11592 && cf_fix_cppflags=no
11597 if test -n "$cf_new_cflags" ; then
11599 CFLAGS="$CFLAGS $cf_new_cflags"
11602 if test -n "$cf_new_cppflags" ; then
11604 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11607 if test -n "$cf_new_extra_cppflags" ; then
11609 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11612 cf_add_libs="$cf_pkgconfig_libs"
11613 # Filter out duplicates - this happens with badly-designed ".pc" files...
11614 for cf_add_1lib in $LIBS
11616 for cf_add_2lib in $cf_add_libs
11618 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11624 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11626 LIBS="$cf_add_libs"
11632 { echo "$as_me:11632: WARNING: unable to find ICE library" >&5
11633 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11636 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11637 test -n "$verbose" && echo " found package sm" 1>&6
11639 echo "${as_me:-configure}:11639: testing found package sm ..." 1>&5
11641 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11642 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11643 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11645 echo "${as_me:-configure}:11645: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11647 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11649 echo "${as_me:-configure}:11649: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11654 cf_new_extra_cppflags=
11656 for cf_add_cflags in $cf_pkgconfig_incs
11658 case $cf_fix_cppflags in
11660 case $cf_add_cflags in
11661 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11662 case $cf_add_cflags in
11664 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11666 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11667 && test -z "${cf_tst_cflags}" \
11668 && cf_fix_cppflags=yes
11670 if test $cf_fix_cppflags = yes ; then
11671 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11673 elif test "${cf_tst_cflags}" = "\"'" ; then
11674 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11679 case "$CPPFLAGS" in
11683 case $cf_add_cflags in
11685 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11687 CPPFLAGS=`echo "$CPPFLAGS" | \
11688 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11689 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11693 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11698 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11703 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11705 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11708 && test -z "${cf_tst_cflags}" \
11709 && cf_fix_cppflags=no
11714 if test -n "$cf_new_cflags" ; then
11716 CFLAGS="$CFLAGS $cf_new_cflags"
11719 if test -n "$cf_new_cppflags" ; then
11721 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11724 if test -n "$cf_new_extra_cppflags" ; then
11726 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11729 cf_add_libs="$cf_pkgconfig_libs"
11730 # Filter out duplicates - this happens with badly-designed ".pc" files...
11731 for cf_add_1lib in $LIBS
11733 for cf_add_2lib in $cf_add_libs
11735 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11741 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11743 LIBS="$cf_add_libs"
11749 { echo "$as_me:11749: WARNING: unable to find SM library" >&5
11750 echo "$as_me: WARNING: unable to find SM library" >&2;}
11753 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11754 test -n "$verbose" && echo " found package xt" 1>&6
11756 echo "${as_me:-configure}:11756: testing found package xt ..." 1>&5
11758 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11759 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11760 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11762 echo "${as_me:-configure}:11762: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11764 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11766 echo "${as_me:-configure}:11766: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11771 cf_new_extra_cppflags=
11773 for cf_add_cflags in $cf_pkgconfig_incs
11775 case $cf_fix_cppflags in
11777 case $cf_add_cflags in
11778 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11779 case $cf_add_cflags in
11781 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11783 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11784 && test -z "${cf_tst_cflags}" \
11785 && cf_fix_cppflags=yes
11787 if test $cf_fix_cppflags = yes ; then
11788 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11790 elif test "${cf_tst_cflags}" = "\"'" ; then
11791 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11796 case "$CPPFLAGS" in
11800 case $cf_add_cflags in
11802 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11804 CPPFLAGS=`echo "$CPPFLAGS" | \
11805 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11806 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11810 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11815 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11820 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11822 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11825 && test -z "${cf_tst_cflags}" \
11826 && cf_fix_cppflags=no
11831 if test -n "$cf_new_cflags" ; then
11833 CFLAGS="$CFLAGS $cf_new_cflags"
11836 if test -n "$cf_new_cppflags" ; then
11838 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11841 if test -n "$cf_new_extra_cppflags" ; then
11843 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11846 cf_add_libs="$cf_pkgconfig_libs"
11847 # Filter out duplicates - this happens with badly-designed ".pc" files...
11848 for cf_add_1lib in $LIBS
11850 for cf_add_2lib in $cf_add_libs
11852 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11858 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11860 LIBS="$cf_add_libs"
11866 { echo "$as_me:11866: WARNING: unable to find Xt library" >&5
11867 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11874 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11875 test -n "$verbose" && echo " found package xt" 1>&6
11877 echo "${as_me:-configure}:11877: testing found package xt ..." 1>&5
11879 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11880 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11881 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11883 echo "${as_me:-configure}:11883: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11885 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11887 echo "${as_me:-configure}:11887: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11892 cf_new_extra_cppflags=
11894 for cf_add_cflags in $cf_pkgconfig_incs
11896 case $cf_fix_cppflags in
11898 case $cf_add_cflags in
11899 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11900 case $cf_add_cflags in
11902 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11905 && test -z "${cf_tst_cflags}" \
11906 && cf_fix_cppflags=yes
11908 if test $cf_fix_cppflags = yes ; then
11909 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11911 elif test "${cf_tst_cflags}" = "\"'" ; then
11912 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11917 case "$CPPFLAGS" in
11921 case $cf_add_cflags in
11923 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11925 CPPFLAGS=`echo "$CPPFLAGS" | \
11926 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11927 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11931 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11936 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11941 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11946 && test -z "${cf_tst_cflags}" \
11947 && cf_fix_cppflags=no
11952 if test -n "$cf_new_cflags" ; then
11954 CFLAGS="$CFLAGS $cf_new_cflags"
11957 if test -n "$cf_new_cppflags" ; then
11959 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11962 if test -n "$cf_new_extra_cppflags" ; then
11964 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11967 cf_add_libs="$cf_pkgconfig_libs"
11968 # Filter out duplicates - this happens with badly-designed ".pc" files...
11969 for cf_add_1lib in $LIBS
11971 for cf_add_2lib in $cf_add_libs
11973 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11981 LIBS="$cf_add_libs"
11987 # we have an "xt" package, but it may omit Xt's dependency on X11
11988 echo "$as_me:11988: checking for usable X dependency" >&5
11989 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11990 if test "${cf_cv_xt_x11_compat+set}" = set; then
11991 echo $ECHO_N "(cached) $ECHO_C" >&6
11994 cat >conftest.$ac_ext <<_ACEOF
11995 #line 11995 "configure"
11996 #include "confdefs.h"
11998 #include <X11/Xlib.h>
12004 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12005 int rc2 = XClearWindow((Display*) 0, (Window) 0);
12006 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12007 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12013 rm -f conftest.$ac_objext conftest$ac_exeext
12014 if { (eval echo "$as_me:12014: \"$ac_link\"") >&5
12015 (eval $ac_link) 2>&5
12017 echo "$as_me:12017: \$? = $ac_status" >&5
12018 (exit $ac_status); } &&
12019 { ac_try='test -s conftest$ac_exeext'
12020 { (eval echo "$as_me:12020: \"$ac_try\"") >&5
12021 (eval $ac_try) 2>&5
12023 echo "$as_me:12023: \$? = $ac_status" >&5
12024 (exit $ac_status); }; }; then
12025 cf_cv_xt_x11_compat=yes
12027 echo "$as_me: failed program was:" >&5
12028 cat conftest.$ac_ext >&5
12029 cf_cv_xt_x11_compat=no
12031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12033 echo "$as_me:12033: result: $cf_cv_xt_x11_compat" >&5
12034 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12035 if test "$cf_cv_xt_x11_compat" = no
12037 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
12039 echo "${as_me:-configure}:12039: testing work around broken X11 dependency ..." 1>&5
12041 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12043 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12044 test -n "$verbose" && echo " found package x11" 1>&6
12046 echo "${as_me:-configure}:12046: testing found package x11 ..." 1>&5
12048 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12049 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12050 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12052 echo "${as_me:-configure}:12052: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12054 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12056 echo "${as_me:-configure}:12056: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12061 cf_new_extra_cppflags=
12063 for cf_add_cflags in $cf_pkgconfig_incs
12065 case $cf_fix_cppflags in
12067 case $cf_add_cflags in
12068 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12069 case $cf_add_cflags in
12071 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12073 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12074 && test -z "${cf_tst_cflags}" \
12075 && cf_fix_cppflags=yes
12077 if test $cf_fix_cppflags = yes ; then
12078 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12080 elif test "${cf_tst_cflags}" = "\"'" ; then
12081 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12086 case "$CPPFLAGS" in
12090 case $cf_add_cflags in
12092 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12094 CPPFLAGS=`echo "$CPPFLAGS" | \
12095 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12096 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12100 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12105 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12110 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12112 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12115 && test -z "${cf_tst_cflags}" \
12116 && cf_fix_cppflags=no
12121 if test -n "$cf_new_cflags" ; then
12123 CFLAGS="$CFLAGS $cf_new_cflags"
12126 if test -n "$cf_new_cppflags" ; then
12128 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12131 if test -n "$cf_new_extra_cppflags" ; then
12133 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12136 cf_add_libs="$cf_pkgconfig_libs"
12137 # Filter out duplicates - this happens with badly-designed ".pc" files...
12138 for cf_add_1lib in $LIBS
12140 for cf_add_2lib in $cf_add_libs
12142 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12148 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12150 LIBS="$cf_add_libs"
12157 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12159 echo "${as_me:-configure}:12159: testing ...before $LIBS ..." 1>&5
12161 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12162 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12164 echo "${as_me:-configure}:12164: testing ...after $LIBS ..." 1>&5
12172 echo "$as_me:12172: checking for usable X Toolkit package" >&5
12173 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12174 if test "${cf_cv_xt_ice_compat+set}" = set; then
12175 echo $ECHO_N "(cached) $ECHO_C" >&6
12178 cat >conftest.$ac_ext <<_ACEOF
12179 #line 12179 "configure"
12180 #include "confdefs.h"
12182 #include <X11/Shell.h>
12187 int num = IceConnectionNumber(0)
12193 rm -f conftest.$ac_objext conftest$ac_exeext
12194 if { (eval echo "$as_me:12194: \"$ac_link\"") >&5
12195 (eval $ac_link) 2>&5
12197 echo "$as_me:12197: \$? = $ac_status" >&5
12198 (exit $ac_status); } &&
12199 { ac_try='test -s conftest$ac_exeext'
12200 { (eval echo "$as_me:12200: \"$ac_try\"") >&5
12201 (eval $ac_try) 2>&5
12203 echo "$as_me:12203: \$? = $ac_status" >&5
12204 (exit $ac_status); }; }; then
12205 cf_cv_xt_ice_compat=yes
12207 echo "$as_me: failed program was:" >&5
12208 cat conftest.$ac_ext >&5
12209 cf_cv_xt_ice_compat=no
12211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12213 echo "$as_me:12213: result: $cf_cv_xt_ice_compat" >&5
12214 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12216 if test "$cf_cv_xt_ice_compat" = no
12218 # workaround for broken ".pc" files used for X Toolkit.
12219 case "x$X_PRE_LIBS" in
12225 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12227 echo "${as_me:-configure}:12227: testing work around broken ICE dependency ..." 1>&5
12229 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12230 test -n "$verbose" && echo " found package ice" 1>&6
12232 echo "${as_me:-configure}:12232: testing found package ice ..." 1>&5
12234 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12235 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12236 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12238 echo "${as_me:-configure}:12238: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12240 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12242 echo "${as_me:-configure}:12242: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12247 cf_new_extra_cppflags=
12249 for cf_add_cflags in $cf_pkgconfig_incs
12251 case $cf_fix_cppflags in
12253 case $cf_add_cflags in
12254 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12255 case $cf_add_cflags in
12257 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12259 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12260 && test -z "${cf_tst_cflags}" \
12261 && cf_fix_cppflags=yes
12263 if test $cf_fix_cppflags = yes ; then
12264 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12266 elif test "${cf_tst_cflags}" = "\"'" ; then
12267 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12272 case "$CPPFLAGS" in
12276 case $cf_add_cflags in
12278 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12280 CPPFLAGS=`echo "$CPPFLAGS" | \
12281 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12282 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12286 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12291 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12296 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12298 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12300 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12301 && test -z "${cf_tst_cflags}" \
12302 && cf_fix_cppflags=no
12307 if test -n "$cf_new_cflags" ; then
12309 CFLAGS="$CFLAGS $cf_new_cflags"
12312 if test -n "$cf_new_cppflags" ; then
12314 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12317 if test -n "$cf_new_extra_cppflags" ; then
12319 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12322 cf_add_libs="$cf_pkgconfig_libs"
12323 # Filter out duplicates - this happens with badly-designed ".pc" files...
12324 for cf_add_1lib in $LIBS
12326 for cf_add_2lib in $cf_add_libs
12328 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12334 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12336 LIBS="$cf_add_libs"
12338 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12339 test -n "$verbose" && echo " found package sm" 1>&6
12341 echo "${as_me:-configure}:12341: testing found package sm ..." 1>&5
12343 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12344 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12345 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12347 echo "${as_me:-configure}:12347: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12349 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12351 echo "${as_me:-configure}:12351: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12356 cf_new_extra_cppflags=
12358 for cf_add_cflags in $cf_pkgconfig_incs
12360 case $cf_fix_cppflags in
12362 case $cf_add_cflags in
12363 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12364 case $cf_add_cflags in
12366 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12368 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12369 && test -z "${cf_tst_cflags}" \
12370 && cf_fix_cppflags=yes
12372 if test $cf_fix_cppflags = yes ; then
12373 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12375 elif test "${cf_tst_cflags}" = "\"'" ; then
12376 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12381 case "$CPPFLAGS" in
12385 case $cf_add_cflags in
12387 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12389 CPPFLAGS=`echo "$CPPFLAGS" | \
12390 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12391 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12395 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12400 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12405 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12407 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12409 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12410 && test -z "${cf_tst_cflags}" \
12411 && cf_fix_cppflags=no
12416 if test -n "$cf_new_cflags" ; then
12418 CFLAGS="$CFLAGS $cf_new_cflags"
12421 if test -n "$cf_new_cppflags" ; then
12423 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12426 if test -n "$cf_new_extra_cppflags" ; then
12428 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12431 cf_add_libs="$cf_pkgconfig_libs"
12432 # Filter out duplicates - this happens with badly-designed ".pc" files...
12433 for cf_add_1lib in $LIBS
12435 for cf_add_2lib in $cf_add_libs
12437 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12443 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12445 LIBS="$cf_add_libs"
12458 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12460 echo "${as_me:-configure}:12460: testing ...before $LIBS ..." 1>&5
12462 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12463 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12465 echo "${as_me:-configure}:12465: testing ...after $LIBS ..." 1>&5
12481 LDFLAGS="$X_LIBS $LDFLAGS"
12483 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12485 echo "${as_me:-configure}:12485: testing checking additions to CFLAGS ..." 1>&5
12487 cf_check_cflags="$CFLAGS"
12488 cf_check_cppflags="$CPPFLAGS"
12493 cf_new_extra_cppflags=
12495 for cf_add_cflags in $X_CFLAGS
12497 case $cf_fix_cppflags in
12499 case $cf_add_cflags in
12500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12501 case $cf_add_cflags in
12503 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12506 && test -z "${cf_tst_cflags}" \
12507 && cf_fix_cppflags=yes
12509 if test $cf_fix_cppflags = yes ; then
12510 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12512 elif test "${cf_tst_cflags}" = "\"'" ; then
12513 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12518 case "$CPPFLAGS" in
12522 case $cf_add_cflags in
12524 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12526 CPPFLAGS=`echo "$CPPFLAGS" | \
12527 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12528 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12532 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12537 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12542 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12544 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12547 && test -z "${cf_tst_cflags}" \
12548 && cf_fix_cppflags=no
12553 if test -n "$cf_new_cflags" ; then
12554 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12556 echo "${as_me:-configure}:12556: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12558 CFLAGS="$CFLAGS $cf_new_cflags"
12561 if test -n "$cf_new_cppflags" ; then
12562 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12564 echo "${as_me:-configure}:12564: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12566 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12569 if test -n "$cf_new_extra_cppflags" ; then
12570 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12572 echo "${as_me:-configure}:12572: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12574 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12577 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12578 cat >conftest.$ac_ext <<_ACEOF
12579 #line 12579 "configure"
12580 #include "confdefs.h"
12585 printf("Hello world");
12590 rm -f conftest.$ac_objext conftest$ac_exeext
12591 if { (eval echo "$as_me:12591: \"$ac_link\"") >&5
12592 (eval $ac_link) 2>&5
12594 echo "$as_me:12594: \$? = $ac_status" >&5
12595 (exit $ac_status); } &&
12596 { ac_try='test -s conftest$ac_exeext'
12597 { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598 (eval $ac_try) 2>&5
12600 echo "$as_me:12600: \$? = $ac_status" >&5
12601 (exit $ac_status); }; }; then
12604 echo "$as_me: failed program was:" >&5
12605 cat conftest.$ac_ext >&5
12606 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12608 echo "${as_me:-configure}:12608: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12610 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12611 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12613 echo "${as_me:-configure}:12613: testing but keeping change to \$CPPFLAGS ..." 1>&5
12616 CFLAGS="$cf_check_flags"
12618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12621 echo "$as_me:12621: checking for XOpenDisplay" >&5
12622 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12623 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12624 echo $ECHO_N "(cached) $ECHO_C" >&6
12626 cat >conftest.$ac_ext <<_ACEOF
12627 #line 12627 "configure"
12628 #include "confdefs.h"
12629 /* System header to define __stub macros and hopefully few prototypes,
12630 which can conflict with char XOpenDisplay (); below. */
12631 #include <assert.h>
12632 /* Override any gcc2 internal prototype to avoid an error. */
12636 /* We use char because int might match the return type of a gcc2
12637 builtin and then its argument prototype would still apply. */
12638 char XOpenDisplay ();
12644 /* The GNU C library defines this for functions which it implements
12645 to always fail with ENOSYS. Some functions are actually named
12646 something starting with __ and the normal name is an alias. */
12647 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12650 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12657 rm -f conftest.$ac_objext conftest$ac_exeext
12658 if { (eval echo "$as_me:12658: \"$ac_link\"") >&5
12659 (eval $ac_link) 2>&5
12661 echo "$as_me:12661: \$? = $ac_status" >&5
12662 (exit $ac_status); } &&
12663 { ac_try='test -s conftest$ac_exeext'
12664 { (eval echo "$as_me:12664: \"$ac_try\"") >&5
12665 (eval $ac_try) 2>&5
12667 echo "$as_me:12667: \$? = $ac_status" >&5
12668 (exit $ac_status); }; }; then
12669 ac_cv_func_XOpenDisplay=yes
12671 echo "$as_me: failed program was:" >&5
12672 cat conftest.$ac_ext >&5
12673 ac_cv_func_XOpenDisplay=no
12675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12677 echo "$as_me:12677: result: $ac_cv_func_XOpenDisplay" >&5
12678 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12679 if test $ac_cv_func_XOpenDisplay = yes; then
12683 echo "$as_me:12683: checking for XOpenDisplay in -lX11" >&5
12684 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12685 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12686 echo $ECHO_N "(cached) $ECHO_C" >&6
12688 ac_check_lib_save_LIBS=$LIBS
12689 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12690 cat >conftest.$ac_ext <<_ACEOF
12691 #line 12691 "configure"
12692 #include "confdefs.h"
12694 /* Override any gcc2 internal prototype to avoid an error. */
12698 /* We use char because int might match the return type of a gcc2
12699 builtin and then its argument prototype would still apply. */
12700 char XOpenDisplay ();
12709 rm -f conftest.$ac_objext conftest$ac_exeext
12710 if { (eval echo "$as_me:12710: \"$ac_link\"") >&5
12711 (eval $ac_link) 2>&5
12713 echo "$as_me:12713: \$? = $ac_status" >&5
12714 (exit $ac_status); } &&
12715 { ac_try='test -s conftest$ac_exeext'
12716 { (eval echo "$as_me:12716: \"$ac_try\"") >&5
12717 (eval $ac_try) 2>&5
12719 echo "$as_me:12719: \$? = $ac_status" >&5
12720 (exit $ac_status); }; }; then
12721 ac_cv_lib_X11_XOpenDisplay=yes
12723 echo "$as_me: failed program was:" >&5
12724 cat conftest.$ac_ext >&5
12725 ac_cv_lib_X11_XOpenDisplay=no
12727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12728 LIBS=$ac_check_lib_save_LIBS
12730 echo "$as_me:12730: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12731 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12732 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12734 cf_add_libs="-lX11"
12735 # Filter out duplicates - this happens with badly-designed ".pc" files...
12736 for cf_add_1lib in $LIBS
12738 for cf_add_2lib in $cf_add_libs
12740 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12746 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12748 LIBS="$cf_add_libs"
12754 echo "$as_me:12754: checking for XtAppInitialize" >&5
12755 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12756 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12757 echo $ECHO_N "(cached) $ECHO_C" >&6
12759 cat >conftest.$ac_ext <<_ACEOF
12760 #line 12760 "configure"
12761 #include "confdefs.h"
12762 /* System header to define __stub macros and hopefully few prototypes,
12763 which can conflict with char XtAppInitialize (); below. */
12764 #include <assert.h>
12765 /* Override any gcc2 internal prototype to avoid an error. */
12769 /* We use char because int might match the return type of a gcc2
12770 builtin and then its argument prototype would still apply. */
12771 char XtAppInitialize ();
12777 /* The GNU C library defines this for functions which it implements
12778 to always fail with ENOSYS. Some functions are actually named
12779 something starting with __ and the normal name is an alias. */
12780 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12783 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12790 rm -f conftest.$ac_objext conftest$ac_exeext
12791 if { (eval echo "$as_me:12791: \"$ac_link\"") >&5
12792 (eval $ac_link) 2>&5
12794 echo "$as_me:12794: \$? = $ac_status" >&5
12795 (exit $ac_status); } &&
12796 { ac_try='test -s conftest$ac_exeext'
12797 { (eval echo "$as_me:12797: \"$ac_try\"") >&5
12798 (eval $ac_try) 2>&5
12800 echo "$as_me:12800: \$? = $ac_status" >&5
12801 (exit $ac_status); }; }; then
12802 ac_cv_func_XtAppInitialize=yes
12804 echo "$as_me: failed program was:" >&5
12805 cat conftest.$ac_ext >&5
12806 ac_cv_func_XtAppInitialize=no
12808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12810 echo "$as_me:12810: result: $ac_cv_func_XtAppInitialize" >&5
12811 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12812 if test $ac_cv_func_XtAppInitialize = yes; then
12816 echo "$as_me:12816: checking for XtAppInitialize in -lXt" >&5
12817 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12818 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12819 echo $ECHO_N "(cached) $ECHO_C" >&6
12821 ac_check_lib_save_LIBS=$LIBS
12822 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12823 cat >conftest.$ac_ext <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12827 /* Override any gcc2 internal prototype to avoid an error. */
12831 /* We use char because int might match the return type of a gcc2
12832 builtin and then its argument prototype would still apply. */
12833 char XtAppInitialize ();
12837 XtAppInitialize ();
12842 rm -f conftest.$ac_objext conftest$ac_exeext
12843 if { (eval echo "$as_me:12843: \"$ac_link\"") >&5
12844 (eval $ac_link) 2>&5
12846 echo "$as_me:12846: \$? = $ac_status" >&5
12847 (exit $ac_status); } &&
12848 { ac_try='test -s conftest$ac_exeext'
12849 { (eval echo "$as_me:12849: \"$ac_try\"") >&5
12850 (eval $ac_try) 2>&5
12852 echo "$as_me:12852: \$? = $ac_status" >&5
12853 (exit $ac_status); }; }; then
12854 ac_cv_lib_Xt_XtAppInitialize=yes
12856 echo "$as_me: failed program was:" >&5
12857 cat conftest.$ac_ext >&5
12858 ac_cv_lib_Xt_XtAppInitialize=no
12860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12861 LIBS=$ac_check_lib_save_LIBS
12863 echo "$as_me:12863: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12864 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12865 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12867 cat >>confdefs.h <<\EOF
12868 #define HAVE_LIBXT 1
12872 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12879 if test $cf_have_X_LIBS = no ; then
12880 { echo "$as_me:12880: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12881 test program. You will have to check and add the proper libraries by hand
12883 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12884 test program. You will have to check and add the proper libraries by hand
12885 to makefile." >&2;}
12888 cf_x_athena_root=$cf_x_athena
12891 for cf_path in default \
12892 /usr/contrib/X11R6 \
12893 /usr/contrib/X11R5 \
12897 if test -z "$cf_x_athena_inc" ; then
12898 cf_save="$CPPFLAGS"
12899 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12900 if test $cf_path != default ; then
12901 CPPFLAGS="$cf_save -I$cf_path/include"
12902 echo "$as_me:12902: checking for $cf_test in $cf_path" >&5
12903 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12905 echo "$as_me:12905: checking for $cf_test" >&5
12906 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12908 cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12912 #include <X11/Intrinsic.h>
12913 #include <$cf_test>
12922 rm -f conftest.$ac_objext
12923 if { (eval echo "$as_me:12923: \"$ac_compile\"") >&5
12924 (eval $ac_compile) 2>&5
12926 echo "$as_me:12926: \$? = $ac_status" >&5
12927 (exit $ac_status); } &&
12928 { ac_try='test -s conftest.$ac_objext'
12929 { (eval echo "$as_me:12929: \"$ac_try\"") >&5
12930 (eval $ac_try) 2>&5
12932 echo "$as_me:12932: \$? = $ac_status" >&5
12933 (exit $ac_status); }; }; then
12936 echo "$as_me: failed program was:" >&5
12937 cat conftest.$ac_ext >&5
12940 rm -f conftest.$ac_objext conftest.$ac_ext
12941 echo "$as_me:12941: result: $cf_result" >&5
12942 echo "${ECHO_T}$cf_result" >&6
12943 if test "$cf_result" = yes ; then
12944 cf_x_athena_inc=$cf_path
12947 CPPFLAGS="$cf_save"
12952 if test -z "$cf_x_athena_inc" ; then
12953 { echo "$as_me:12953: WARNING: Unable to successfully find Athena header files with test program" >&5
12954 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12955 elif test "$cf_x_athena_inc" != default ; then
12956 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12959 cf_x_athena_root=$cf_x_athena
12962 for cf_path in default \
12963 /usr/contrib/X11R6 \
12964 /usr/contrib/X11R5 \
12969 ${cf_x_athena_root} \
12970 ${cf_x_athena_root}7 \
12971 ${cf_x_athena_root}6
12974 "-l$cf_lib -lXmu" \
12975 "-l$cf_lib -lXpm -lXmu" \
12976 "-l${cf_lib}_s -lXmu_s"
12978 if test -z "$cf_x_athena_lib" ; then
12980 cf_test=XawSimpleMenuAddGlobalActions
12981 if test $cf_path != default ; then
12983 cf_add_libs="-L$cf_path/lib $cf_libs"
12984 # Filter out duplicates - this happens with badly-designed ".pc" files...
12985 for cf_add_1lib in $LIBS
12987 for cf_add_2lib in $cf_add_libs
12989 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12995 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12997 LIBS="$cf_add_libs"
12999 echo "$as_me:12999: checking for $cf_libs in $cf_path" >&5
13000 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13003 cf_add_libs="$cf_libs"
13004 # Filter out duplicates - this happens with badly-designed ".pc" files...
13005 for cf_add_1lib in $LIBS
13007 for cf_add_2lib in $cf_add_libs
13009 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13015 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13017 LIBS="$cf_add_libs"
13019 echo "$as_me:13019: checking for $cf_test in $cf_libs" >&5
13020 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13022 cat >conftest.$ac_ext <<_ACEOF
13023 #line 13023 "configure"
13024 #include "confdefs.h"
13026 #include <X11/Intrinsic.h>
13027 #include <X11/$cf_x_athena_root/SimpleMenu.h>
13033 $cf_test((XtAppContext) 0)
13038 rm -f conftest.$ac_objext conftest$ac_exeext
13039 if { (eval echo "$as_me:13039: \"$ac_link\"") >&5
13040 (eval $ac_link) 2>&5
13042 echo "$as_me:13042: \$? = $ac_status" >&5
13043 (exit $ac_status); } &&
13044 { ac_try='test -s conftest$ac_exeext'
13045 { (eval echo "$as_me:13045: \"$ac_try\"") >&5
13046 (eval $ac_try) 2>&5
13048 echo "$as_me:13048: \$? = $ac_status" >&5
13049 (exit $ac_status); }; }; then
13052 echo "$as_me: failed program was:" >&5
13053 cat conftest.$ac_ext >&5
13056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13057 echo "$as_me:13057: result: $cf_result" >&5
13058 echo "${ECHO_T}$cf_result" >&6
13059 if test "$cf_result" = yes ; then
13060 cf_x_athena_lib="$cf_libs"
13066 test -n "$cf_x_athena_lib" && break
13070 if test -z "$cf_x_athena_lib" ; then
13071 { { echo "$as_me:13071: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13072 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13073 { (exit 1); exit 1; }; }
13076 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13078 cat >>confdefs.h <<EOF
13079 #define $cf_x_athena_LIBS 1
13084 if test -n "$ac_tool_prefix"; then
13085 for ac_prog in xcurses-config
13087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13089 echo "$as_me:13089: checking for $ac_word" >&5
13090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13091 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
13092 echo $ECHO_N "(cached) $ECHO_C" >&6
13094 if test -n "$XCURSES_CONFIG"; then
13095 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
13097 ac_save_IFS=$IFS; IFS=$ac_path_separator
13099 for ac_dir in $ac_dummy; do
13101 test -z "$ac_dir" && ac_dir=.
13102 $as_executable_p "$ac_dir/$ac_word" || continue
13103 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
13104 echo "$as_me:13104: found $ac_dir/$ac_word" >&5
13110 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
13111 if test -n "$XCURSES_CONFIG"; then
13112 echo "$as_me:13112: result: $XCURSES_CONFIG" >&5
13113 echo "${ECHO_T}$XCURSES_CONFIG" >&6
13115 echo "$as_me:13115: result: no" >&5
13116 echo "${ECHO_T}no" >&6
13119 test -n "$XCURSES_CONFIG" && break
13122 if test -z "$XCURSES_CONFIG"; then
13123 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
13124 for ac_prog in xcurses-config
13126 # Extract the first word of "$ac_prog", so it can be a program name with args.
13127 set dummy $ac_prog; ac_word=$2
13128 echo "$as_me:13128: checking for $ac_word" >&5
13129 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13130 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
13131 echo $ECHO_N "(cached) $ECHO_C" >&6
13133 if test -n "$ac_ct_XCURSES_CONFIG"; then
13134 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
13136 ac_save_IFS=$IFS; IFS=$ac_path_separator
13138 for ac_dir in $ac_dummy; do
13140 test -z "$ac_dir" && ac_dir=.
13141 $as_executable_p "$ac_dir/$ac_word" || continue
13142 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
13143 echo "$as_me:13143: found $ac_dir/$ac_word" >&5
13149 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
13150 if test -n "$ac_ct_XCURSES_CONFIG"; then
13151 echo "$as_me:13151: result: $ac_ct_XCURSES_CONFIG" >&5
13152 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
13154 echo "$as_me:13154: result: no" >&5
13155 echo "${ECHO_T}no" >&6
13158 test -n "$ac_ct_XCURSES_CONFIG" && break
13160 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
13162 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
13165 if test "$XCURSES_CONFIG" != none ; then
13167 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
13169 cf_add_libs="`$XCURSES_CONFIG --libs`"
13170 # Filter out duplicates - this happens with badly-designed ".pc" files...
13171 for cf_add_1lib in $LIBS
13173 for cf_add_2lib in $cf_add_libs
13175 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13181 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13183 LIBS="$cf_add_libs"
13185 cf_cv_lib_XCurses=yes
13189 LDFLAGS="$LDFLAGS $X_LIBS"
13191 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13193 echo "${as_me:-configure}:13193: testing checking additions to CFLAGS ..." 1>&5
13195 cf_check_cflags="$CFLAGS"
13196 cf_check_cppflags="$CPPFLAGS"
13201 cf_new_extra_cppflags=
13203 for cf_add_cflags in $X_CFLAGS
13205 case $cf_fix_cppflags in
13207 case $cf_add_cflags in
13208 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13209 case $cf_add_cflags in
13211 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13214 && test -z "${cf_tst_cflags}" \
13215 && cf_fix_cppflags=yes
13217 if test $cf_fix_cppflags = yes ; then
13218 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13220 elif test "${cf_tst_cflags}" = "\"'" ; then
13221 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13226 case "$CPPFLAGS" in
13230 case $cf_add_cflags in
13232 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13234 CPPFLAGS=`echo "$CPPFLAGS" | \
13235 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13236 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13240 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13245 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13250 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13252 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13255 && test -z "${cf_tst_cflags}" \
13256 && cf_fix_cppflags=no
13261 if test -n "$cf_new_cflags" ; then
13262 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13264 echo "${as_me:-configure}:13264: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13266 CFLAGS="$CFLAGS $cf_new_cflags"
13269 if test -n "$cf_new_cppflags" ; then
13270 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13272 echo "${as_me:-configure}:13272: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13274 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13277 if test -n "$cf_new_extra_cppflags" ; then
13278 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13280 echo "${as_me:-configure}:13280: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13282 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13285 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13286 cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13293 printf("Hello world");
13298 rm -f conftest.$ac_objext conftest$ac_exeext
13299 if { (eval echo "$as_me:13299: \"$ac_link\"") >&5
13300 (eval $ac_link) 2>&5
13302 echo "$as_me:13302: \$? = $ac_status" >&5
13303 (exit $ac_status); } &&
13304 { ac_try='test -s conftest$ac_exeext'
13305 { (eval echo "$as_me:13305: \"$ac_try\"") >&5
13306 (eval $ac_try) 2>&5
13308 echo "$as_me:13308: \$? = $ac_status" >&5
13309 (exit $ac_status); }; }; then
13312 echo "$as_me: failed program was:" >&5
13313 cat conftest.$ac_ext >&5
13314 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13316 echo "${as_me:-configure}:13316: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13318 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13319 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13321 echo "${as_me:-configure}:13321: testing but keeping change to \$CPPFLAGS ..." 1>&5
13324 CFLAGS="$cf_check_flags"
13326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13329 echo "$as_me:13329: checking for XOpenDisplay in -lX11" >&5
13330 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13331 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13332 echo $ECHO_N "(cached) $ECHO_C" >&6
13334 ac_check_lib_save_LIBS=$LIBS
13335 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13336 cat >conftest.$ac_ext <<_ACEOF
13337 #line 13337 "configure"
13338 #include "confdefs.h"
13340 /* Override any gcc2 internal prototype to avoid an error. */
13344 /* We use char because int might match the return type of a gcc2
13345 builtin and then its argument prototype would still apply. */
13346 char XOpenDisplay ();
13355 rm -f conftest.$ac_objext conftest$ac_exeext
13356 if { (eval echo "$as_me:13356: \"$ac_link\"") >&5
13357 (eval $ac_link) 2>&5
13359 echo "$as_me:13359: \$? = $ac_status" >&5
13360 (exit $ac_status); } &&
13361 { ac_try='test -s conftest$ac_exeext'
13362 { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13365 echo "$as_me:13365: \$? = $ac_status" >&5
13366 (exit $ac_status); }; }; then
13367 ac_cv_lib_X11_XOpenDisplay=yes
13369 echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 ac_cv_lib_X11_XOpenDisplay=no
13373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13374 LIBS=$ac_check_lib_save_LIBS
13376 echo "$as_me:13376: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13377 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13378 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13380 cf_add_libs="-lX11"
13381 # Filter out duplicates - this happens with badly-designed ".pc" files...
13382 for cf_add_1lib in $LIBS
13384 for cf_add_2lib in $cf_add_libs
13386 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13392 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13394 LIBS="$cf_add_libs"
13398 echo "$as_me:13398: checking for XCurses library" >&5
13399 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
13400 if test "${cf_cv_lib_XCurses+set}" = set; then
13401 echo $ECHO_N "(cached) $ECHO_C" >&6
13404 cf_add_libs="-lXCurses"
13405 # Filter out duplicates - this happens with badly-designed ".pc" files...
13406 for cf_add_1lib in $LIBS
13408 for cf_add_2lib in $cf_add_libs
13410 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13416 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13418 LIBS="$cf_add_libs"
13420 cat >conftest.$ac_ext <<_ACEOF
13421 #line 13421 "configure"
13422 #include "confdefs.h"
13424 #include <xcurses.h>
13425 char *XCursesProgramName = "test";
13435 rm -f conftest.$ac_objext conftest$ac_exeext
13436 if { (eval echo "$as_me:13436: \"$ac_link\"") >&5
13437 (eval $ac_link) 2>&5
13439 echo "$as_me:13439: \$? = $ac_status" >&5
13440 (exit $ac_status); } &&
13441 { ac_try='test -s conftest$ac_exeext'
13442 { (eval echo "$as_me:13442: \"$ac_try\"") >&5
13443 (eval $ac_try) 2>&5
13445 echo "$as_me:13445: \$? = $ac_status" >&5
13446 (exit $ac_status); }; }; then
13447 cf_cv_lib_XCurses=yes
13449 echo "$as_me: failed program was:" >&5
13450 cat conftest.$ac_ext >&5
13451 cf_cv_lib_XCurses=no
13453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13456 echo "$as_me:13456: result: $cf_cv_lib_XCurses" >&5
13457 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13461 if test $cf_cv_lib_XCurses = yes ; then
13463 cat >>confdefs.h <<\EOF
13467 cat >>confdefs.h <<\EOF
13471 echo "$as_me:13471: checking for xcurses.h" >&5
13472 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13473 if test "${ac_cv_header_xcurses_h+set}" = set; then
13474 echo $ECHO_N "(cached) $ECHO_C" >&6
13476 cat >conftest.$ac_ext <<_ACEOF
13477 #line 13477 "configure"
13478 #include "confdefs.h"
13479 #include <xcurses.h>
13481 if { (eval echo "$as_me:13481: \"$ac_cpp conftest.$ac_ext\"") >&5
13482 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13484 egrep -v '^ *\+' conftest.er1 >conftest.err
13486 cat conftest.err >&5
13487 echo "$as_me:13487: \$? = $ac_status" >&5
13488 (exit $ac_status); } >/dev/null; then
13489 if test -s conftest.err; then
13490 ac_cpp_err=$ac_c_preproc_warn_flag
13497 if test -z "$ac_cpp_err"; then
13498 ac_cv_header_xcurses_h=yes
13500 echo "$as_me: failed program was:" >&5
13501 cat conftest.$ac_ext >&5
13502 ac_cv_header_xcurses_h=no
13504 rm -f conftest.err conftest.$ac_ext
13506 echo "$as_me:13506: result: $ac_cv_header_xcurses_h" >&5
13507 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13508 if test $ac_cv_header_xcurses_h = yes; then
13510 cat >>confdefs.h <<\EOF
13511 #define HAVE_XCURSES 1
13517 { { echo "$as_me:13517: error: Cannot link with XCurses" >&5
13518 echo "$as_me: error: Cannot link with XCurses" >&2;}
13519 { (exit 1); exit 1; }; }
13524 { { echo "$as_me:13524: error: unexpected screen-value: $cf_cv_screen" >&5
13525 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
13526 { (exit 1); exit 1; }; }
13530 : ${cf_nculib_root:=$cf_cv_screen}
13531 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
13532 echo "$as_me:13532: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
13533 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
13534 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13535 echo $ECHO_N "(cached) $ECHO_C" >&6
13537 ac_check_lib_save_LIBS=$LIBS
13538 LIBS="-l$cf_nculib_root $LIBS"
13539 cat >conftest.$ac_ext <<_ACEOF
13540 #line 13540 "configure"
13541 #include "confdefs.h"
13543 /* Override any gcc2 internal prototype to avoid an error. */
13547 /* We use char because int might match the return type of a gcc2
13548 builtin and then its argument prototype would still apply. */
13549 char _nc_init_pthreads ();
13553 _nc_init_pthreads ();
13558 rm -f conftest.$ac_objext conftest$ac_exeext
13559 if { (eval echo "$as_me:13559: \"$ac_link\"") >&5
13560 (eval $ac_link) 2>&5
13562 echo "$as_me:13562: \$? = $ac_status" >&5
13563 (exit $ac_status); } &&
13564 { ac_try='test -s conftest$ac_exeext'
13565 { (eval echo "$as_me:13565: \"$ac_try\"") >&5
13566 (eval $ac_try) 2>&5
13568 echo "$as_me:13568: \$? = $ac_status" >&5
13569 (exit $ac_status); }; }; then
13570 eval "$as_ac_Lib=yes"
13572 echo "$as_me: failed program was:" >&5
13573 cat conftest.$ac_ext >&5
13574 eval "$as_ac_Lib=no"
13576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13577 LIBS=$ac_check_lib_save_LIBS
13579 echo "$as_me:13579: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13580 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13581 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13582 cf_cv_ncurses_pthreads=yes
13584 cf_cv_ncurses_pthreads=no
13587 if test "$cf_cv_ncurses_pthreads" = yes
13590 cf_add_libs="-lpthread"
13591 # Filter out duplicates - this happens with badly-designed ".pc" files...
13592 for cf_add_1lib in $LIBS
13594 for cf_add_2lib in $cf_add_libs
13596 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13602 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13604 LIBS="$cf_add_libs"
13608 case $cf_cv_screen in
13610 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
13614 echo "$as_me:13614: checking for NetBSD form.h" >&5
13615 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13616 if test "${cf_cv_netbsd_form_h+set}" = set; then
13617 echo $ECHO_N "(cached) $ECHO_C" >&6
13620 cat >conftest.$ac_ext <<_ACEOF
13621 #line 13621 "configure"
13622 #include "confdefs.h"
13624 #include <${cf_cv_ncurses_header:-curses.h}>
13632 int y = current_field(form)->cursor_ypos;
13633 int x = current_field(form)->cursor_xpos;
13639 rm -f conftest.$ac_objext
13640 if { (eval echo "$as_me:13640: \"$ac_compile\"") >&5
13641 (eval $ac_compile) 2>&5
13643 echo "$as_me:13643: \$? = $ac_status" >&5
13644 (exit $ac_status); } &&
13645 { ac_try='test -s conftest.$ac_objext'
13646 { (eval echo "$as_me:13646: \"$ac_try\"") >&5
13647 (eval $ac_try) 2>&5
13649 echo "$as_me:13649: \$? = $ac_status" >&5
13650 (exit $ac_status); }; }; then
13651 cf_cv_netbsd_form_h=yes
13654 echo "$as_me: failed program was:" >&5
13655 cat conftest.$ac_ext >&5
13656 cf_cv_netbsd_form_h=no
13658 rm -f conftest.$ac_objext conftest.$ac_ext
13661 echo "$as_me:13661: result: $cf_cv_netbsd_form_h" >&5
13662 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13664 test "$cf_cv_netbsd_form_h" = yes &&
13665 cat >>confdefs.h <<\EOF
13666 #define HAVE_NETBSD_FORM_H 1
13669 echo "$as_me:13669: checking for NetBSD menu.h" >&5
13670 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13671 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13672 echo $ECHO_N "(cached) $ECHO_C" >&6
13675 cat >conftest.$ac_ext <<_ACEOF
13676 #line 13676 "configure"
13677 #include "confdefs.h"
13679 #include <${cf_cv_ncurses_header:-curses.h}>
13687 int y = menu->max_item_width;
13693 rm -f conftest.$ac_objext
13694 if { (eval echo "$as_me:13694: \"$ac_compile\"") >&5
13695 (eval $ac_compile) 2>&5
13697 echo "$as_me:13697: \$? = $ac_status" >&5
13698 (exit $ac_status); } &&
13699 { ac_try='test -s conftest.$ac_objext'
13700 { (eval echo "$as_me:13700: \"$ac_try\"") >&5
13701 (eval $ac_try) 2>&5
13703 echo "$as_me:13703: \$? = $ac_status" >&5
13704 (exit $ac_status); }; }; then
13705 cf_cv_netbsd_menu_h=yes
13708 echo "$as_me: failed program was:" >&5
13709 cat conftest.$ac_ext >&5
13710 cf_cv_netbsd_menu_h=no
13712 rm -f conftest.$ac_objext conftest.$ac_ext
13715 echo "$as_me:13715: result: $cf_cv_netbsd_menu_h" >&5
13716 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13718 test "$cf_cv_netbsd_menu_h" = yes &&
13719 cat >>confdefs.h <<\EOF
13720 #define HAVE_NETBSD_MENU_H 1
13726 case $cf_cv_screen in
13730 # look for curses-related libraries
13732 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13733 echo "$as_me:13733: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13734 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13735 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13736 echo $ECHO_N "(cached) $ECHO_C" >&6
13738 ac_check_lib_save_LIBS=$LIBS
13739 LIBS="-lpanel$cf_cv_libtype $LIBS"
13740 cat >conftest.$ac_ext <<_ACEOF
13741 #line 13741 "configure"
13742 #include "confdefs.h"
13744 /* Override any gcc2 internal prototype to avoid an error. */
13748 /* We use char because int might match the return type of a gcc2
13749 builtin and then its argument prototype would still apply. */
13759 rm -f conftest.$ac_objext conftest$ac_exeext
13760 if { (eval echo "$as_me:13760: \"$ac_link\"") >&5
13761 (eval $ac_link) 2>&5
13763 echo "$as_me:13763: \$? = $ac_status" >&5
13764 (exit $ac_status); } &&
13765 { ac_try='test -s conftest$ac_exeext'
13766 { (eval echo "$as_me:13766: \"$ac_try\"") >&5
13767 (eval $ac_try) 2>&5
13769 echo "$as_me:13769: \$? = $ac_status" >&5
13770 (exit $ac_status); }; }; then
13771 eval "$as_ac_Lib=yes"
13773 echo "$as_me: failed program was:" >&5
13774 cat conftest.$ac_ext >&5
13775 eval "$as_ac_Lib=no"
13777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13778 LIBS=$ac_check_lib_save_LIBS
13780 echo "$as_me:13780: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13781 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13782 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13784 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13786 cf_add_libs="-lpanel$cf_cv_libtype"
13787 # Filter out duplicates - this happens with badly-designed ".pc" files...
13788 for cf_add_1lib in $LIBS
13790 for cf_add_2lib in $cf_add_libs
13792 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13798 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13800 LIBS="$cf_add_libs"
13802 cat >>confdefs.h <<EOF
13803 #define $cf_upper 1
13808 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13809 echo "$as_me:13809: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13810 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13811 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13812 echo $ECHO_N "(cached) $ECHO_C" >&6
13814 ac_check_lib_save_LIBS=$LIBS
13815 LIBS="-lmenu$cf_cv_libtype $LIBS"
13816 cat >conftest.$ac_ext <<_ACEOF
13817 #line 13817 "configure"
13818 #include "confdefs.h"
13820 /* Override any gcc2 internal prototype to avoid an error. */
13824 /* We use char because int might match the return type of a gcc2
13825 builtin and then its argument prototype would still apply. */
13826 char menu_driver ();
13835 rm -f conftest.$ac_objext conftest$ac_exeext
13836 if { (eval echo "$as_me:13836: \"$ac_link\"") >&5
13837 (eval $ac_link) 2>&5
13839 echo "$as_me:13839: \$? = $ac_status" >&5
13840 (exit $ac_status); } &&
13841 { ac_try='test -s conftest$ac_exeext'
13842 { (eval echo "$as_me:13842: \"$ac_try\"") >&5
13843 (eval $ac_try) 2>&5
13845 echo "$as_me:13845: \$? = $ac_status" >&5
13846 (exit $ac_status); }; }; then
13847 eval "$as_ac_Lib=yes"
13849 echo "$as_me: failed program was:" >&5
13850 cat conftest.$ac_ext >&5
13851 eval "$as_ac_Lib=no"
13853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13854 LIBS=$ac_check_lib_save_LIBS
13856 echo "$as_me:13856: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13857 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13858 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13860 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13862 cf_add_libs="-lmenu$cf_cv_libtype"
13863 # Filter out duplicates - this happens with badly-designed ".pc" files...
13864 for cf_add_1lib in $LIBS
13866 for cf_add_2lib in $cf_add_libs
13868 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13874 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13876 LIBS="$cf_add_libs"
13878 cat >>confdefs.h <<EOF
13879 #define $cf_upper 1
13884 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13885 echo "$as_me:13885: checking for form_driver in -lform$cf_cv_libtype" >&5
13886 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13887 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13888 echo $ECHO_N "(cached) $ECHO_C" >&6
13890 ac_check_lib_save_LIBS=$LIBS
13891 LIBS="-lform$cf_cv_libtype $LIBS"
13892 cat >conftest.$ac_ext <<_ACEOF
13893 #line 13893 "configure"
13894 #include "confdefs.h"
13896 /* Override any gcc2 internal prototype to avoid an error. */
13900 /* We use char because int might match the return type of a gcc2
13901 builtin and then its argument prototype would still apply. */
13902 char form_driver ();
13911 rm -f conftest.$ac_objext conftest$ac_exeext
13912 if { (eval echo "$as_me:13912: \"$ac_link\"") >&5
13913 (eval $ac_link) 2>&5
13915 echo "$as_me:13915: \$? = $ac_status" >&5
13916 (exit $ac_status); } &&
13917 { ac_try='test -s conftest$ac_exeext'
13918 { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919 (eval $ac_try) 2>&5
13921 echo "$as_me:13921: \$? = $ac_status" >&5
13922 (exit $ac_status); }; }; then
13923 eval "$as_ac_Lib=yes"
13925 echo "$as_me: failed program was:" >&5
13926 cat conftest.$ac_ext >&5
13927 eval "$as_ac_Lib=no"
13929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13930 LIBS=$ac_check_lib_save_LIBS
13932 echo "$as_me:13932: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13933 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13934 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13936 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13938 cf_add_libs="-lform$cf_cv_libtype"
13939 # Filter out duplicates - this happens with badly-designed ".pc" files...
13940 for cf_add_1lib in $LIBS
13942 for cf_add_2lib in $cf_add_libs
13944 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13950 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13952 LIBS="$cf_add_libs"
13954 cat >>confdefs.h <<EOF
13955 #define $cf_upper 1
13960 # look for curses-related headers
13971 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13972 echo "$as_me:13972: checking for $ac_header" >&5
13973 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13974 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13975 echo $ECHO_N "(cached) $ECHO_C" >&6
13977 cat >conftest.$ac_ext <<_ACEOF
13978 #line 13978 "configure"
13979 #include "confdefs.h"
13980 #include <$ac_header>
13982 if { (eval echo "$as_me:13982: \"$ac_cpp conftest.$ac_ext\"") >&5
13983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13985 egrep -v '^ *\+' conftest.er1 >conftest.err
13987 cat conftest.err >&5
13988 echo "$as_me:13988: \$? = $ac_status" >&5
13989 (exit $ac_status); } >/dev/null; then
13990 if test -s conftest.err; then
13991 ac_cpp_err=$ac_c_preproc_warn_flag
13998 if test -z "$ac_cpp_err"; then
13999 eval "$as_ac_Header=yes"
14001 echo "$as_me: failed program was:" >&5
14002 cat conftest.$ac_ext >&5
14003 eval "$as_ac_Header=no"
14005 rm -f conftest.err conftest.$ac_ext
14007 echo "$as_me:14007: result: `eval echo '${'$as_ac_Header'}'`" >&5
14008 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14009 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14010 cat >>confdefs.h <<EOF
14011 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14020 echo "$as_me:14020: checking for ANSI C header files" >&5
14021 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14022 if test "${ac_cv_header_stdc+set}" = set; then
14023 echo $ECHO_N "(cached) $ECHO_C" >&6
14025 cat >conftest.$ac_ext <<_ACEOF
14026 #line 14026 "configure"
14027 #include "confdefs.h"
14028 #include <stdlib.h>
14029 #include <stdarg.h>
14030 #include <string.h>
14034 if { (eval echo "$as_me:14034: \"$ac_cpp conftest.$ac_ext\"") >&5
14035 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14037 egrep -v '^ *\+' conftest.er1 >conftest.err
14039 cat conftest.err >&5
14040 echo "$as_me:14040: \$? = $ac_status" >&5
14041 (exit $ac_status); } >/dev/null; then
14042 if test -s conftest.err; then
14043 ac_cpp_err=$ac_c_preproc_warn_flag
14050 if test -z "$ac_cpp_err"; then
14051 ac_cv_header_stdc=yes
14053 echo "$as_me: failed program was:" >&5
14054 cat conftest.$ac_ext >&5
14055 ac_cv_header_stdc=no
14057 rm -f conftest.err conftest.$ac_ext
14059 if test $ac_cv_header_stdc = yes; then
14060 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14061 cat >conftest.$ac_ext <<_ACEOF
14062 #line 14062 "configure"
14063 #include "confdefs.h"
14064 #include <string.h>
14067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14068 egrep "memchr" >/dev/null 2>&1; then
14071 ac_cv_header_stdc=no
14077 if test $ac_cv_header_stdc = yes; then
14078 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14079 cat >conftest.$ac_ext <<_ACEOF
14080 #line 14080 "configure"
14081 #include "confdefs.h"
14082 #include <stdlib.h>
14085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14086 egrep "free" >/dev/null 2>&1; then
14089 ac_cv_header_stdc=no
14095 if test $ac_cv_header_stdc = yes; then
14096 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14097 if test "$cross_compiling" = yes; then
14100 cat >conftest.$ac_ext <<_ACEOF
14101 #line 14101 "configure"
14102 #include "confdefs.h"
14104 #if ((' ' & 0x0FF) == 0x020)
14105 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14106 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14108 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14109 || ('j' <= (c) && (c) <= 'r') \
14110 || ('s' <= (c) && (c) <= 'z'))
14111 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14114 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14119 for (i = 0; i < 256; i++)
14120 if (XOR (islower (i), ISLOWER (i))
14121 || toupper (i) != TOUPPER (i))
14122 $ac_main_return(2);
14123 $ac_main_return (0);
14126 rm -f conftest$ac_exeext
14127 if { (eval echo "$as_me:14127: \"$ac_link\"") >&5
14128 (eval $ac_link) 2>&5
14130 echo "$as_me:14130: \$? = $ac_status" >&5
14131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14132 { (eval echo "$as_me:14132: \"$ac_try\"") >&5
14133 (eval $ac_try) 2>&5
14135 echo "$as_me:14135: \$? = $ac_status" >&5
14136 (exit $ac_status); }; }; then
14139 echo "$as_me: program exited with status $ac_status" >&5
14140 echo "$as_me: failed program was:" >&5
14141 cat conftest.$ac_ext >&5
14142 ac_cv_header_stdc=no
14144 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14148 echo "$as_me:14148: result: $ac_cv_header_stdc" >&5
14149 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14150 if test $ac_cv_header_stdc = yes; then
14152 cat >>confdefs.h <<\EOF
14153 #define STDC_HEADERS 1
14158 echo "$as_me:14158: checking whether time.h and sys/time.h may both be included" >&5
14159 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14160 if test "${ac_cv_header_time+set}" = set; then
14161 echo $ECHO_N "(cached) $ECHO_C" >&6
14163 cat >conftest.$ac_ext <<_ACEOF
14164 #line 14164 "configure"
14165 #include "confdefs.h"
14166 #include <sys/types.h>
14167 #include <sys/time.h>
14173 if ((struct tm *) 0)
14179 rm -f conftest.$ac_objext
14180 if { (eval echo "$as_me:14180: \"$ac_compile\"") >&5
14181 (eval $ac_compile) 2>&5
14183 echo "$as_me:14183: \$? = $ac_status" >&5
14184 (exit $ac_status); } &&
14185 { ac_try='test -s conftest.$ac_objext'
14186 { (eval echo "$as_me:14186: \"$ac_try\"") >&5
14187 (eval $ac_try) 2>&5
14189 echo "$as_me:14189: \$? = $ac_status" >&5
14190 (exit $ac_status); }; }; then
14191 ac_cv_header_time=yes
14193 echo "$as_me: failed program was:" >&5
14194 cat conftest.$ac_ext >&5
14195 ac_cv_header_time=no
14197 rm -f conftest.$ac_objext conftest.$ac_ext
14199 echo "$as_me:14199: result: $ac_cv_header_time" >&5
14200 echo "${ECHO_T}$ac_cv_header_time" >&6
14201 if test $ac_cv_header_time = yes; then
14203 cat >>confdefs.h <<\EOF
14204 #define TIME_WITH_SYS_TIME 1
14221 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14222 echo "$as_me:14222: checking for $ac_header" >&5
14223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14225 echo $ECHO_N "(cached) $ECHO_C" >&6
14227 cat >conftest.$ac_ext <<_ACEOF
14228 #line 14228 "configure"
14229 #include "confdefs.h"
14230 #include <$ac_header>
14232 if { (eval echo "$as_me:14232: \"$ac_cpp conftest.$ac_ext\"") >&5
14233 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14235 egrep -v '^ *\+' conftest.er1 >conftest.err
14237 cat conftest.err >&5
14238 echo "$as_me:14238: \$? = $ac_status" >&5
14239 (exit $ac_status); } >/dev/null; then
14240 if test -s conftest.err; then
14241 ac_cpp_err=$ac_c_preproc_warn_flag
14248 if test -z "$ac_cpp_err"; then
14249 eval "$as_ac_Header=yes"
14251 echo "$as_me: failed program was:" >&5
14252 cat conftest.$ac_ext >&5
14253 eval "$as_ac_Header=no"
14255 rm -f conftest.err conftest.$ac_ext
14257 echo "$as_me:14257: result: `eval echo '${'$as_ac_Header'}'`" >&5
14258 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14259 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14260 cat >>confdefs.h <<EOF
14261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14267 for ac_header in unistd.h getopt.h
14269 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14270 echo "$as_me:14270: checking for $ac_header" >&5
14271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14272 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14273 echo $ECHO_N "(cached) $ECHO_C" >&6
14275 cat >conftest.$ac_ext <<_ACEOF
14276 #line 14276 "configure"
14277 #include "confdefs.h"
14278 #include <$ac_header>
14280 if { (eval echo "$as_me:14280: \"$ac_cpp conftest.$ac_ext\"") >&5
14281 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14283 egrep -v '^ *\+' conftest.er1 >conftest.err
14285 cat conftest.err >&5
14286 echo "$as_me:14286: \$? = $ac_status" >&5
14287 (exit $ac_status); } >/dev/null; then
14288 if test -s conftest.err; then
14289 ac_cpp_err=$ac_c_preproc_warn_flag
14296 if test -z "$ac_cpp_err"; then
14297 eval "$as_ac_Header=yes"
14299 echo "$as_me: failed program was:" >&5
14300 cat conftest.$ac_ext >&5
14301 eval "$as_ac_Header=no"
14303 rm -f conftest.err conftest.$ac_ext
14305 echo "$as_me:14305: result: `eval echo '${'$as_ac_Header'}'`" >&5
14306 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14307 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14308 cat >>confdefs.h <<EOF
14309 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14315 echo "$as_me:14315: checking for header declaring getopt variables" >&5
14316 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14317 if test "${cf_cv_getopt_header+set}" = set; then
14318 echo $ECHO_N "(cached) $ECHO_C" >&6
14321 cf_cv_getopt_header=none
14322 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14324 cat >conftest.$ac_ext <<_ACEOF
14325 #line 14325 "configure"
14326 #include "confdefs.h"
14328 #include <$cf_header>
14332 int x = optind; char *y = optarg
14337 rm -f conftest.$ac_objext
14338 if { (eval echo "$as_me:14338: \"$ac_compile\"") >&5
14339 (eval $ac_compile) 2>&5
14341 echo "$as_me:14341: \$? = $ac_status" >&5
14342 (exit $ac_status); } &&
14343 { ac_try='test -s conftest.$ac_objext'
14344 { (eval echo "$as_me:14344: \"$ac_try\"") >&5
14345 (eval $ac_try) 2>&5
14347 echo "$as_me:14347: \$? = $ac_status" >&5
14348 (exit $ac_status); }; }; then
14349 cf_cv_getopt_header=$cf_header
14352 echo "$as_me: failed program was:" >&5
14353 cat conftest.$ac_ext >&5
14355 rm -f conftest.$ac_objext conftest.$ac_ext
14359 echo "$as_me:14359: result: $cf_cv_getopt_header" >&5
14360 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14361 if test $cf_cv_getopt_header != none ; then
14363 cat >>confdefs.h <<\EOF
14364 #define HAVE_GETOPT_HEADER 1
14368 if test $cf_cv_getopt_header = getopt.h ; then
14370 cat >>confdefs.h <<\EOF
14371 #define NEED_GETOPT_H 1
14381 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14382 echo "$as_me:14382: checking for $ac_func" >&5
14383 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14384 if eval "test \"\${$as_ac_var+set}\" = set"; then
14385 echo $ECHO_N "(cached) $ECHO_C" >&6
14387 cat >conftest.$ac_ext <<_ACEOF
14388 #line 14388 "configure"
14389 #include "confdefs.h"
14390 /* System header to define __stub macros and hopefully few prototypes,
14391 which can conflict with char $ac_func (); below. */
14392 #include <assert.h>
14393 /* Override any gcc2 internal prototype to avoid an error. */
14397 /* We use char because int might match the return type of a gcc2
14398 builtin and then its argument prototype would still apply. */
14405 /* The GNU C library defines this for functions which it implements
14406 to always fail with ENOSYS. Some functions are actually named
14407 something starting with __ and the normal name is an alias. */
14408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14411 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14418 rm -f conftest.$ac_objext conftest$ac_exeext
14419 if { (eval echo "$as_me:14419: \"$ac_link\"") >&5
14420 (eval $ac_link) 2>&5
14422 echo "$as_me:14422: \$? = $ac_status" >&5
14423 (exit $ac_status); } &&
14424 { ac_try='test -s conftest$ac_exeext'
14425 { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14428 echo "$as_me:14428: \$? = $ac_status" >&5
14429 (exit $ac_status); }; }; then
14430 eval "$as_ac_var=yes"
14432 echo "$as_me: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14434 eval "$as_ac_var=no"
14436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14438 echo "$as_me:14438: result: `eval echo '${'$as_ac_var'}'`" >&5
14439 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14440 if test `eval echo '${'$as_ac_var'}'` = yes; then
14441 cat >>confdefs.h <<EOF
14442 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14448 if test "x$ac_cv_func_getopt" = xno; then
14449 { { echo "$as_me:14449: error: getopt is required for building programs" >&5
14450 echo "$as_me: error: getopt is required for building programs" >&2;}
14451 { (exit 1); exit 1; }; }
14454 if test "$cf_enable_widec" = yes; then
14467 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14468 echo "$as_me:14468: checking for $ac_func" >&5
14469 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14470 if eval "test \"\${$as_ac_var+set}\" = set"; then
14471 echo $ECHO_N "(cached) $ECHO_C" >&6
14473 cat >conftest.$ac_ext <<_ACEOF
14474 #line 14474 "configure"
14475 #include "confdefs.h"
14476 /* System header to define __stub macros and hopefully few prototypes,
14477 which can conflict with char $ac_func (); below. */
14478 #include <assert.h>
14479 /* Override any gcc2 internal prototype to avoid an error. */
14483 /* We use char because int might match the return type of a gcc2
14484 builtin and then its argument prototype would still apply. */
14491 /* The GNU C library defines this for functions which it implements
14492 to always fail with ENOSYS. Some functions are actually named
14493 something starting with __ and the normal name is an alias. */
14494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14497 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14504 rm -f conftest.$ac_objext conftest$ac_exeext
14505 if { (eval echo "$as_me:14505: \"$ac_link\"") >&5
14506 (eval $ac_link) 2>&5
14508 echo "$as_me:14508: \$? = $ac_status" >&5
14509 (exit $ac_status); } &&
14510 { ac_try='test -s conftest$ac_exeext'
14511 { (eval echo "$as_me:14511: \"$ac_try\"") >&5
14512 (eval $ac_try) 2>&5
14514 echo "$as_me:14514: \$? = $ac_status" >&5
14515 (exit $ac_status); }; }; then
14516 eval "$as_ac_var=yes"
14518 echo "$as_me: failed program was:" >&5
14519 cat conftest.$ac_ext >&5
14520 eval "$as_ac_var=no"
14522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14524 echo "$as_me:14524: result: `eval echo '${'$as_ac_var'}'`" >&5
14525 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14526 if test `eval echo '${'$as_ac_var'}'` = yes; then
14527 cat >>confdefs.h <<EOF
14528 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14536 echo "$as_me:14536: checking definition to turn on extended curses functions" >&5
14537 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
14538 if test "${cf_cv_need_xopen_extension+set}" = set; then
14539 echo $ECHO_N "(cached) $ECHO_C" >&6
14542 cf_cv_need_xopen_extension=unknown
14543 cat >conftest.$ac_ext <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14547 #include <stdlib.h>
14548 #include <${cf_cv_ncurses_header:-curses.h}>
14553 #if defined(NCURSES_VERSION_PATCH)
14554 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14558 #ifdef NCURSES_VERSION
14560 int check2 = curs_set((int)sizeof(check));
14562 long x = winnstr(stdscr, "", 0);
14564 getbegyx(stdscr, y1, x1)
14569 rm -f conftest.$ac_objext conftest$ac_exeext
14570 if { (eval echo "$as_me:14570: \"$ac_link\"") >&5
14571 (eval $ac_link) 2>&5
14573 echo "$as_me:14573: \$? = $ac_status" >&5
14574 (exit $ac_status); } &&
14575 { ac_try='test -s conftest$ac_exeext'
14576 { (eval echo "$as_me:14576: \"$ac_try\"") >&5
14577 (eval $ac_try) 2>&5
14579 echo "$as_me:14579: \$? = $ac_status" >&5
14580 (exit $ac_status); }; }; then
14581 cf_cv_need_xopen_extension=none
14583 echo "$as_me: failed program was:" >&5
14584 cat conftest.$ac_ext >&5
14586 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
14588 cat >conftest.$ac_ext <<_ACEOF
14589 #line 14589 "configure"
14590 #include "confdefs.h"
14592 #define $cf_try_xopen_extension 1
14593 #include <stdlib.h>
14594 #include <${cf_cv_ncurses_header:-curses.h}>
14599 #ifdef NCURSES_VERSION
14601 int check2 = curs_set((int)sizeof(check));
14603 long x = winnstr(stdscr, "", 0);
14605 getbegyx(stdscr, y1, x1)
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612 (eval $ac_link) 2>&5
14614 echo "$as_me:14614: \$? = $ac_status" >&5
14615 (exit $ac_status); } &&
14616 { ac_try='test -s conftest$ac_exeext'
14617 { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14620 echo "$as_me:14620: \$? = $ac_status" >&5
14621 (exit $ac_status); }; }; then
14622 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
14624 echo "$as_me: failed program was:" >&5
14625 cat conftest.$ac_ext >&5
14627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14634 echo "$as_me:14634: result: $cf_cv_need_xopen_extension" >&5
14635 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14637 case $cf_cv_need_xopen_extension in
14639 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
14643 echo "$as_me:14643: checking for term.h" >&5
14644 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14645 if test "${cf_cv_term_header+set}" = set; then
14646 echo $ECHO_N "(cached) $ECHO_C" >&6
14649 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14650 # for <term.h> if we do not find the variant.
14652 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14654 case ${cf_cv_ncurses_header:-curses.h} in
14656 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14657 cf_header_list="$cf_header_item $cf_header_list"
14661 for cf_header in $cf_header_list
14663 cat >conftest.$ac_ext <<_ACEOF
14664 #line 14664 "configure"
14665 #include "confdefs.h"
14667 #include <${cf_cv_ncurses_header:-curses.h}>
14668 #include <${cf_header}>
14677 rm -f conftest.$ac_objext
14678 if { (eval echo "$as_me:14678: \"$ac_compile\"") >&5
14679 (eval $ac_compile) 2>&5
14681 echo "$as_me:14681: \$? = $ac_status" >&5
14682 (exit $ac_status); } &&
14683 { ac_try='test -s conftest.$ac_objext'
14684 { (eval echo "$as_me:14684: \"$ac_try\"") >&5
14685 (eval $ac_try) 2>&5
14687 echo "$as_me:14687: \$? = $ac_status" >&5
14688 (exit $ac_status); }; }; then
14689 cf_cv_term_header=$cf_header
14692 echo "$as_me: failed program was:" >&5
14693 cat conftest.$ac_ext >&5
14694 cf_cv_term_header=no
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14699 case $cf_cv_term_header in
14701 # If curses is ncurses, some packagers still mess it up by trying to make
14702 # us use GNU termcap. This handles the most common case.
14703 for cf_header in ncurses/term.h ncursesw/term.h
14705 cat >conftest.$ac_ext <<_ACEOF
14706 #line 14706 "configure"
14707 #include "confdefs.h"
14709 #include <${cf_cv_ncurses_header:-curses.h}>
14710 #ifdef NCURSES_VERSION
14711 #include <${cf_header}>
14723 rm -f conftest.$ac_objext
14724 if { (eval echo "$as_me:14724: \"$ac_compile\"") >&5
14725 (eval $ac_compile) 2>&5
14727 echo "$as_me:14727: \$? = $ac_status" >&5
14728 (exit $ac_status); } &&
14729 { ac_try='test -s conftest.$ac_objext'
14730 { (eval echo "$as_me:14730: \"$ac_try\"") >&5
14731 (eval $ac_try) 2>&5
14733 echo "$as_me:14733: \$? = $ac_status" >&5
14734 (exit $ac_status); }; }; then
14735 cf_cv_term_header=$cf_header
14738 echo "$as_me: failed program was:" >&5
14739 cat conftest.$ac_ext >&5
14740 cf_cv_term_header=no
14742 rm -f conftest.$ac_objext conftest.$ac_ext
14748 echo "$as_me:14748: result: $cf_cv_term_header" >&5
14749 echo "${ECHO_T}$cf_cv_term_header" >&6
14751 case $cf_cv_term_header in
14754 cat >>confdefs.h <<\EOF
14755 #define HAVE_TERM_H 1
14761 cat >>confdefs.h <<\EOF
14762 #define HAVE_NCURSES_TERM_H 1
14768 cat >>confdefs.h <<\EOF
14769 #define HAVE_NCURSESW_TERM_H 1
14775 echo "$as_me:14775: checking for unctrl.h" >&5
14776 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14777 if test "${cf_cv_unctrl_header+set}" = set; then
14778 echo $ECHO_N "(cached) $ECHO_C" >&6
14781 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14782 # for <unctrl.h> if we do not find the variant.
14784 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14786 case ${cf_cv_ncurses_header:-curses.h} in
14788 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14789 cf_header_list="$cf_header_item $cf_header_list"
14793 for cf_header in $cf_header_list
14795 cat >conftest.$ac_ext <<_ACEOF
14796 #line 14796 "configure"
14797 #include "confdefs.h"
14799 #include <${cf_cv_ncurses_header:-curses.h}>
14800 #include <${cf_header}>
14809 rm -f conftest.$ac_objext
14810 if { (eval echo "$as_me:14810: \"$ac_compile\"") >&5
14811 (eval $ac_compile) 2>&5
14813 echo "$as_me:14813: \$? = $ac_status" >&5
14814 (exit $ac_status); } &&
14815 { ac_try='test -s conftest.$ac_objext'
14816 { (eval echo "$as_me:14816: \"$ac_try\"") >&5
14817 (eval $ac_try) 2>&5
14819 echo "$as_me:14819: \$? = $ac_status" >&5
14820 (exit $ac_status); }; }; then
14821 cf_cv_unctrl_header=$cf_header
14824 echo "$as_me: failed program was:" >&5
14825 cat conftest.$ac_ext >&5
14826 cf_cv_unctrl_header=no
14828 rm -f conftest.$ac_objext conftest.$ac_ext
14832 echo "$as_me:14832: result: $cf_cv_unctrl_header" >&5
14833 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14835 case $cf_cv_unctrl_header in
14837 { echo "$as_me:14837: WARNING: unctrl.h header not found" >&5
14838 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14842 case $cf_cv_unctrl_header in
14845 cat >>confdefs.h <<\EOF
14846 #define HAVE_UNCTRL_H 1
14852 cat >>confdefs.h <<\EOF
14853 #define HAVE_NCURSES_UNCTRL_H 1
14857 (ncursesw/unctrl.h)
14859 cat >>confdefs.h <<\EOF
14860 #define HAVE_NCURSESW_UNCTRL_H 1
14867 assume_default_colors \
14894 use_default_colors \
14896 use_extended_names \
14910 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14912 echo "$as_me:14912: checking for ${cf_func}" >&5
14913 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14915 echo "${as_me:-configure}:14915: testing ${cf_func} ..." 1>&5
14917 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14918 echo $ECHO_N "(cached) $ECHO_C" >&6
14921 eval cf_result='$ac_cv_func_'$cf_func
14922 if test ".$cf_result" != ".no"; then
14923 cat >conftest.$ac_ext <<_ACEOF
14924 #line 14924 "configure"
14925 #include "confdefs.h"
14927 #ifdef HAVE_XCURSES
14928 #include <xcurses.h>
14929 char * XCursesProgramName = "test";
14931 #include <${cf_cv_ncurses_header:-curses.h}>
14932 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14933 #include <ncursesw/term.h>
14934 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14935 #include <ncurses/term.h>
14936 #elif defined(HAVE_TERM_H)
14946 long foo = (long)(&${cf_func});
14947 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14948 if (foo + 1234 > 5678)
14949 ${cf_cv_main_return:-return}(foo);
14956 rm -f conftest.$ac_objext conftest$ac_exeext
14957 if { (eval echo "$as_me:14957: \"$ac_link\"") >&5
14958 (eval $ac_link) 2>&5
14960 echo "$as_me:14960: \$? = $ac_status" >&5
14961 (exit $ac_status); } &&
14962 { ac_try='test -s conftest$ac_exeext'
14963 { (eval echo "$as_me:14963: \"$ac_try\"") >&5
14964 (eval $ac_try) 2>&5
14966 echo "$as_me:14966: \$? = $ac_status" >&5
14967 (exit $ac_status); }; }; then
14970 echo "$as_me: failed program was:" >&5
14971 cat conftest.$ac_ext >&5
14974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14976 eval 'cf_cv_func_'$cf_func'=$cf_result'
14980 # use the computed/retrieved cache-value:
14981 eval 'cf_result=$cf_cv_func_'$cf_func
14982 echo "$as_me:14982: result: $cf_result" >&5
14983 echo "${ECHO_T}$cf_result" >&6
14984 if test $cf_result != no; then
14985 cat >>confdefs.h <<EOF
14986 #define HAVE_${cf_tr_func} 1
14992 for cf_func in tputs
14995 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14997 echo "$as_me:14997: checking for ${cf_func}" >&5
14998 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15000 echo "${as_me:-configure}:15000: testing ${cf_func} ..." 1>&5
15002 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15003 echo $ECHO_N "(cached) $ECHO_C" >&6
15006 eval cf_result='$ac_cv_func_'$cf_func
15007 if test ".$cf_result" != ".no"; then
15008 cat >conftest.$ac_ext <<_ACEOF
15009 #line 15009 "configure"
15010 #include "confdefs.h"
15012 #ifdef HAVE_XCURSES
15013 #include <xcurses.h>
15014 char * XCursesProgramName = "test";
15016 #include <${cf_cv_ncurses_header:-curses.h}>
15017 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15018 #include <ncursesw/term.h>
15019 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15020 #include <ncurses/term.h>
15021 #elif defined(HAVE_TERM_H)
15031 long foo = (long)(&${cf_func});
15032 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
15033 if (foo + 1234 > 5678)
15034 ${cf_cv_main_return:-return}(foo);
15041 rm -f conftest.$ac_objext conftest$ac_exeext
15042 if { (eval echo "$as_me:15042: \"$ac_link\"") >&5
15043 (eval $ac_link) 2>&5
15045 echo "$as_me:15045: \$? = $ac_status" >&5
15046 (exit $ac_status); } &&
15047 { ac_try='test -s conftest$ac_exeext'
15048 { (eval echo "$as_me:15048: \"$ac_try\"") >&5
15049 (eval $ac_try) 2>&5
15051 echo "$as_me:15051: \$? = $ac_status" >&5
15052 (exit $ac_status); }; }; then
15055 echo "$as_me: failed program was:" >&5
15056 cat conftest.$ac_ext >&5
15059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15061 eval 'cf_cv_func_'$cf_func'=$cf_result'
15065 # use the computed/retrieved cache-value:
15066 eval 'cf_result=$cf_cv_func_'$cf_func
15067 echo "$as_me:15067: result: $cf_result" >&5
15068 echo "${ECHO_T}$cf_result" >&6
15069 if test $cf_result != no; then
15070 cat >>confdefs.h <<EOF
15071 #define HAVE_${cf_tr_func} 1
15077 if test x$cf_cv_func_tputs = xyes
15080 for cf_arg in int char
15082 for cf_ret in int void
15084 if test $cf_ret = void
15086 cf_return="/* nothing */"
15088 cf_return="return value"
15090 cat >conftest.$ac_ext <<_ACEOF
15091 #line 15091 "configure"
15092 #include "confdefs.h"
15094 #include <${cf_cv_ncurses_header:-curses.h}>
15095 #include <$cf_cv_term_header>
15097 static $cf_ret outc($cf_arg value) { $cf_return; }
15103 tputs("hello", 0, outc);
15104 ${cf_cv_main_return:-return}(0);
15110 rm -f conftest.$ac_objext
15111 if { (eval echo "$as_me:15111: \"$ac_compile\"") >&5
15112 (eval $ac_compile) 2>&5
15114 echo "$as_me:15114: \$? = $ac_status" >&5
15115 (exit $ac_status); } &&
15116 { ac_try='test -s conftest.$ac_objext'
15117 { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118 (eval $ac_try) 2>&5
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit $ac_status); }; }; then
15123 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
15125 echo "${as_me:-configure}:15125: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
15127 cat >>confdefs.h <<EOF
15128 #define TPUTS_ARG $cf_arg
15129 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
15130 #define TPUTS_RETURN(value) $cf_return
15136 echo "$as_me: failed program was:" >&5
15137 cat conftest.$ac_ext >&5
15139 rm -f conftest.$ac_objext conftest.$ac_ext
15141 test $cf_done = yes && break
15145 echo "$as_me:15145: checking for ncurses extended functions" >&5
15146 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
15147 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
15148 echo $ECHO_N "(cached) $ECHO_C" >&6
15151 cat >conftest.$ac_ext <<_ACEOF
15152 #line 15152 "configure"
15153 #include "confdefs.h"
15155 #include <${cf_cv_ncurses_header:-curses.h}>
15160 int x = NCURSES_EXT_FUNCS
15166 rm -f conftest.$ac_objext
15167 if { (eval echo "$as_me:15167: \"$ac_compile\"") >&5
15168 (eval $ac_compile) 2>&5
15170 echo "$as_me:15170: \$? = $ac_status" >&5
15171 (exit $ac_status); } &&
15172 { ac_try='test -s conftest.$ac_objext'
15173 { (eval echo "$as_me:15173: \"$ac_try\"") >&5
15174 (eval $ac_try) 2>&5
15176 echo "$as_me:15176: \$? = $ac_status" >&5
15177 (exit $ac_status); }; }; then
15178 cf_cv_ncurses_ext_funcs=defined
15180 echo "$as_me: failed program was:" >&5
15181 cat conftest.$ac_ext >&5
15183 cat >conftest.$ac_ext <<_ACEOF
15184 #line 15184 "configure"
15185 #include "confdefs.h"
15187 #include <${cf_cv_ncurses_header:-curses.h}>
15192 (void) assume_default_colors (0, 0);
15193 (void) curses_version ();
15194 (void) define_key (0, 0);
15195 (void) is_term_resized (0, 0);
15196 (void) key_defined (0);
15197 (void) keybound (0, 0);
15198 (void) keyok (0, 0);
15199 (void) resize_term (0, 0);
15200 (void) resizeterm (0, 0);
15201 (void) use_default_colors ();
15202 (void) use_extended_names (0);
15203 (void) wresize (0, 0, 0);
15208 rm -f conftest.$ac_objext conftest$ac_exeext
15209 if { (eval echo "$as_me:15209: \"$ac_link\"") >&5
15210 (eval $ac_link) 2>&5
15212 echo "$as_me:15212: \$? = $ac_status" >&5
15213 (exit $ac_status); } &&
15214 { ac_try='test -s conftest$ac_exeext'
15215 { (eval echo "$as_me:15215: \"$ac_try\"") >&5
15216 (eval $ac_try) 2>&5
15218 echo "$as_me:15218: \$? = $ac_status" >&5
15219 (exit $ac_status); }; }; then
15220 cf_cv_ncurses_ext_funcs=yes
15222 echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_cv_ncurses_ext_funcs=no
15226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15229 rm -f conftest.$ac_objext conftest.$ac_ext
15232 echo "$as_me:15232: result: $cf_cv_ncurses_ext_funcs" >&5
15233 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
15234 test "$cf_cv_ncurses_ext_funcs" = yes &&
15235 cat >>confdefs.h <<\EOF
15236 #define NCURSES_EXT_FUNCS 1
15239 if test "$cf_enable_widec" = yes
15241 # workaround for systems with ncurses before 20111029, due to change of
15242 # feature test macro from _XPG5 to _XOPEN_SOURCE
15243 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
15246 echo "$as_me:15246: checking if _XPG5 should be defined to enable wide-characters" >&5
15247 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
15249 cat >conftest.$ac_ext <<_ACEOF
15250 #line 15250 "configure"
15251 #include "confdefs.h"
15253 #include <${cf_cv_ncurses_header:-curses.h}>
15262 rm -f conftest.$ac_objext
15263 if { (eval echo "$as_me:15263: \"$ac_compile\"") >&5
15264 (eval $ac_compile) 2>&5
15266 echo "$as_me:15266: \$? = $ac_status" >&5
15267 (exit $ac_status); } &&
15268 { ac_try='test -s conftest.$ac_objext'
15269 { (eval echo "$as_me:15269: \"$ac_try\"") >&5
15270 (eval $ac_try) 2>&5
15272 echo "$as_me:15272: \$? = $ac_status" >&5
15273 (exit $ac_status); }; }; then
15276 echo "$as_me: failed program was:" >&5
15277 cat conftest.$ac_ext >&5
15278 cf_save_cppflags="$CPPFLAGS"
15279 CPPFLAGS="$CPPFLAGS -D_XPG5"
15280 cat >conftest.$ac_ext <<_ACEOF
15281 #line 15281 "configure"
15282 #include "confdefs.h"
15284 #include <${cf_cv_ncurses_header:-curses.h}>
15293 rm -f conftest.$ac_objext
15294 if { (eval echo "$as_me:15294: \"$ac_compile\"") >&5
15295 (eval $ac_compile) 2>&5
15297 echo "$as_me:15297: \$? = $ac_status" >&5
15298 (exit $ac_status); } &&
15299 { ac_try='test -s conftest.$ac_objext'
15300 { (eval echo "$as_me:15300: \"$ac_try\"") >&5
15301 (eval $ac_try) 2>&5
15303 echo "$as_me:15303: \$? = $ac_status" >&5
15304 (exit $ac_status); }; }; then
15307 echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15310 rm -f conftest.$ac_objext conftest.$ac_ext
15311 CPPFLAGS="$cf_save_cppflags"
15313 rm -f conftest.$ac_objext conftest.$ac_ext
15314 echo "$as_me:15314: result: $cf_define_xpg5" >&5
15315 echo "${ECHO_T}$cf_define_xpg5" >&6
15317 if test "$cf_define_xpg5" = yes
15319 CPPFLAGS="$CPPFLAGS -D_XPG5"
15323 echo "$as_me:15323: checking for wide-character functions" >&5
15324 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
15325 if test "${cf_cv_widechar_funcs+set}" = set; then
15326 echo $ECHO_N "(cached) $ECHO_C" >&6
15329 cat >conftest.$ac_ext <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15333 #include <${cf_cv_ncurses_header:-curses.h}>
15338 static wchar_t src_wchar[2];
15339 static cchar_t dst_cchar;
15340 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
15346 rm -f conftest.$ac_objext conftest$ac_exeext
15347 if { (eval echo "$as_me:15347: \"$ac_link\"") >&5
15348 (eval $ac_link) 2>&5
15350 echo "$as_me:15350: \$? = $ac_status" >&5
15351 (exit $ac_status); } &&
15352 { ac_try='test -s conftest$ac_exeext'
15353 { (eval echo "$as_me:15353: \"$ac_try\"") >&5
15354 (eval $ac_try) 2>&5
15356 echo "$as_me:15356: \$? = $ac_status" >&5
15357 (exit $ac_status); }; }; then
15358 cf_cv_widechar_funcs=yes
15360 echo "$as_me: failed program was:" >&5
15361 cat conftest.$ac_ext >&5
15362 cf_cv_widechar_funcs=no
15364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15367 echo "$as_me:15367: result: $cf_cv_widechar_funcs" >&5
15368 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
15369 if test "$cf_cv_widechar_funcs" != no ; then
15371 cat >>confdefs.h <<\EOF
15372 #define USE_WIDEC_SUPPORT 1
15376 cat >>confdefs.h <<\EOF
15377 #define USE_WIDEC_SUPPORT 0
15382 cat >>confdefs.h <<\EOF
15383 #define USE_WIDEC_SUPPORT 0
15388 echo "$as_me:15388: checking if $cf_cv_screen library uses pthreads" >&5
15389 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
15390 if test "${cf_cv_use_pthreads+set}" = set; then
15391 echo $ECHO_N "(cached) $ECHO_C" >&6
15394 cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15398 #include <${cf_cv_ncurses_header:-curses.h}>
15399 extern void _nc_init_pthreads(void);
15406 _nc_init_pthreads();
15412 rm -f conftest.$ac_objext conftest$ac_exeext
15413 if { (eval echo "$as_me:15413: \"$ac_link\"") >&5
15414 (eval $ac_link) 2>&5
15416 echo "$as_me:15416: \$? = $ac_status" >&5
15417 (exit $ac_status); } &&
15418 { ac_try='test -s conftest$ac_exeext'
15419 { (eval echo "$as_me:15419: \"$ac_try\"") >&5
15420 (eval $ac_try) 2>&5
15422 echo "$as_me:15422: \$? = $ac_status" >&5
15423 (exit $ac_status); }; }; then
15424 cf_cv_use_pthreads=yes
15426 echo "$as_me: failed program was:" >&5
15427 cat conftest.$ac_ext >&5
15428 cf_cv_use_pthreads=no
15430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15433 echo "$as_me:15433: result: $cf_cv_use_pthreads" >&5
15434 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
15435 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
15436 #define USE_PTHREADS 1
15439 echo "$as_me:15439: checking if sys/time.h works with sys/select.h" >&5
15440 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15441 if test "${cf_cv_sys_time_select+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
15445 cat >conftest.$ac_ext <<_ACEOF
15446 #line 15446 "configure"
15447 #include "confdefs.h"
15449 #include <sys/types.h>
15450 #ifdef HAVE_SYS_TIME_H
15451 #include <sys/time.h>
15453 #ifdef HAVE_SYS_SELECT_H
15454 #include <sys/select.h>
15465 rm -f conftest.$ac_objext
15466 if { (eval echo "$as_me:15466: \"$ac_compile\"") >&5
15467 (eval $ac_compile) 2>&5
15469 echo "$as_me:15469: \$? = $ac_status" >&5
15470 (exit $ac_status); } &&
15471 { ac_try='test -s conftest.$ac_objext'
15472 { (eval echo "$as_me:15472: \"$ac_try\"") >&5
15473 (eval $ac_try) 2>&5
15475 echo "$as_me:15475: \$? = $ac_status" >&5
15476 (exit $ac_status); }; }; then
15477 cf_cv_sys_time_select=yes
15479 echo "$as_me: failed program was:" >&5
15480 cat conftest.$ac_ext >&5
15481 cf_cv_sys_time_select=no
15483 rm -f conftest.$ac_objext conftest.$ac_ext
15487 echo "$as_me:15487: result: $cf_cv_sys_time_select" >&5
15488 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15489 test "$cf_cv_sys_time_select" = yes &&
15490 cat >>confdefs.h <<\EOF
15491 #define HAVE_SYS_TIME_SELECT 1
15494 # special check for test/ditto.c
15496 echo "$as_me:15496: checking for openpty in -lutil" >&5
15497 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15498 if test "${ac_cv_lib_util_openpty+set}" = set; then
15499 echo $ECHO_N "(cached) $ECHO_C" >&6
15501 ac_check_lib_save_LIBS=$LIBS
15502 LIBS="-lutil $LIBS"
15503 cat >conftest.$ac_ext <<_ACEOF
15504 #line 15504 "configure"
15505 #include "confdefs.h"
15507 /* Override any gcc2 internal prototype to avoid an error. */
15511 /* We use char because int might match the return type of a gcc2
15512 builtin and then its argument prototype would still apply. */
15522 rm -f conftest.$ac_objext conftest$ac_exeext
15523 if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
15524 (eval $ac_link) 2>&5
15526 echo "$as_me:15526: \$? = $ac_status" >&5
15527 (exit $ac_status); } &&
15528 { ac_try='test -s conftest$ac_exeext'
15529 { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530 (eval $ac_try) 2>&5
15532 echo "$as_me:15532: \$? = $ac_status" >&5
15533 (exit $ac_status); }; }; then
15534 ac_cv_lib_util_openpty=yes
15536 echo "$as_me: failed program was:" >&5
15537 cat conftest.$ac_ext >&5
15538 ac_cv_lib_util_openpty=no
15540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15541 LIBS=$ac_check_lib_save_LIBS
15543 echo "$as_me:15543: result: $ac_cv_lib_util_openpty" >&5
15544 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15545 if test $ac_cv_lib_util_openpty = yes; then
15551 echo "$as_me:15551: checking for openpty header" >&5
15552 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15553 if test "${cf_cv_func_openpty+set}" = set; then
15554 echo $ECHO_N "(cached) $ECHO_C" >&6
15557 cf_save_LIBS="$LIBS"
15558 test $cf_cv_lib_util = yes && {
15559 cf_add_libs="-lutil"
15560 # Filter out duplicates - this happens with badly-designed ".pc" files...
15561 for cf_add_1lib in $LIBS
15563 for cf_add_2lib in $cf_add_libs
15565 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15573 LIBS="$cf_add_libs"
15575 for cf_header in pty.h libutil.h util.h
15577 cat >conftest.$ac_ext <<_ACEOF
15578 #line 15578 "configure"
15579 #include "confdefs.h"
15581 #include <$cf_header>
15587 int x = openpty((int *)0, (int *)0, (char *)0,
15588 (struct termios *)0, (struct winsize *)0);
15594 rm -f conftest.$ac_objext conftest$ac_exeext
15595 if { (eval echo "$as_me:15595: \"$ac_link\"") >&5
15596 (eval $ac_link) 2>&5
15598 echo "$as_me:15598: \$? = $ac_status" >&5
15599 (exit $ac_status); } &&
15600 { ac_try='test -s conftest$ac_exeext'
15601 { (eval echo "$as_me:15601: \"$ac_try\"") >&5
15602 (eval $ac_try) 2>&5
15604 echo "$as_me:15604: \$? = $ac_status" >&5
15605 (exit $ac_status); }; }; then
15607 cf_cv_func_openpty=$cf_header
15611 echo "$as_me: failed program was:" >&5
15612 cat conftest.$ac_ext >&5
15614 cf_cv_func_openpty=no
15617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15619 LIBS="$cf_save_LIBS"
15622 echo "$as_me:15622: result: $cf_cv_func_openpty" >&5
15623 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15625 if test "$cf_cv_func_openpty" != no ; then
15627 cat >>confdefs.h <<EOF
15628 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15631 cat >>confdefs.h <<\EOF
15632 #define USE_XTERM_PTY 1
15635 if test "x$cf_cv_lib_util" = xyes ; then
15637 cf_add_libs="-lutil"
15638 # Filter out duplicates - this happens with badly-designed ".pc" files...
15639 for cf_add_1lib in $TEST_LIBS
15641 for cf_add_2lib in $cf_add_libs
15643 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15649 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15651 TEST_LIBS="$cf_add_libs"
15656 echo "$as_me:15656: checking for function curses_version" >&5
15657 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
15658 if test "${cf_cv_func_curses_version+set}" = set; then
15659 echo $ECHO_N "(cached) $ECHO_C" >&6
15662 if test "$cross_compiling" = yes; then
15663 cf_cv_func_curses_version=unknown
15665 cat >conftest.$ac_ext <<_ACEOF
15666 #line 15666 "configure"
15667 #include "confdefs.h"
15669 #include <${cf_cv_ncurses_header:-curses.h}>
15673 sprintf(temp, "%s\n", curses_version());
15674 ${cf_cv_main_return:-return}(0);
15678 rm -f conftest$ac_exeext
15679 if { (eval echo "$as_me:15679: \"$ac_link\"") >&5
15680 (eval $ac_link) 2>&5
15682 echo "$as_me:15682: \$? = $ac_status" >&5
15683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15684 { (eval echo "$as_me:15684: \"$ac_try\"") >&5
15685 (eval $ac_try) 2>&5
15687 echo "$as_me:15687: \$? = $ac_status" >&5
15688 (exit $ac_status); }; }; then
15689 cf_cv_func_curses_version=yes
15692 echo "$as_me: program exited with status $ac_status" >&5
15693 echo "$as_me: failed program was:" >&5
15694 cat conftest.$ac_ext >&5
15695 cf_cv_func_curses_version=no
15698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15702 echo "$as_me:15702: result: $cf_cv_func_curses_version" >&5
15703 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
15704 test "$cf_cv_func_curses_version" = yes &&
15705 cat >>confdefs.h <<\EOF
15706 #define HAVE_CURSES_VERSION 1
15709 echo "$as_me:15709: checking for alternate character set array" >&5
15710 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
15711 if test "${cf_cv_curses_acs_map+set}" = set; then
15712 echo $ECHO_N "(cached) $ECHO_C" >&6
15715 cf_cv_curses_acs_map=unknown
15716 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
15718 cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15722 #include <${cf_cv_ncurses_header:-curses.h}>
15728 $name['k'] = ACS_PLUS
15734 rm -f conftest.$ac_objext conftest$ac_exeext
15735 if { (eval echo "$as_me:15735: \"$ac_link\"") >&5
15736 (eval $ac_link) 2>&5
15738 echo "$as_me:15738: \$? = $ac_status" >&5
15739 (exit $ac_status); } &&
15740 { ac_try='test -s conftest$ac_exeext'
15741 { (eval echo "$as_me:15741: \"$ac_try\"") >&5
15742 (eval $ac_try) 2>&5
15744 echo "$as_me:15744: \$? = $ac_status" >&5
15745 (exit $ac_status); }; }; then
15746 cf_cv_curses_acs_map=$name; break
15748 echo "$as_me: failed program was:" >&5
15749 cat conftest.$ac_ext >&5
15751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15755 echo "$as_me:15755: result: $cf_cv_curses_acs_map" >&5
15756 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
15758 test "$cf_cv_curses_acs_map" != unknown &&
15759 cat >>confdefs.h <<EOF
15760 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
15763 if test "$cf_enable_widec" = yes; then
15765 echo "$as_me:15765: checking for wide alternate character set array" >&5
15766 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
15767 if test "${cf_cv_curses_wacs_map+set}" = set; then
15768 echo $ECHO_N "(cached) $ECHO_C" >&6
15771 cf_cv_curses_wacs_map=unknown
15772 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
15774 cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15778 #ifndef _XOPEN_SOURCE_EXTENDED
15779 #define _XOPEN_SOURCE_EXTENDED
15781 #include <${cf_cv_ncurses_header:-curses.h}>
15785 void *foo = &($name['k'])
15790 rm -f conftest.$ac_objext conftest$ac_exeext
15791 if { (eval echo "$as_me:15791: \"$ac_link\"") >&5
15792 (eval $ac_link) 2>&5
15794 echo "$as_me:15794: \$? = $ac_status" >&5
15795 (exit $ac_status); } &&
15796 { ac_try='test -s conftest$ac_exeext'
15797 { (eval echo "$as_me:15797: \"$ac_try\"") >&5
15798 (eval $ac_try) 2>&5
15800 echo "$as_me:15800: \$? = $ac_status" >&5
15801 (exit $ac_status); }; }; then
15802 cf_cv_curses_wacs_map=$name
15805 echo "$as_me: failed program was:" >&5
15806 cat conftest.$ac_ext >&5
15808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15811 echo "$as_me:15811: result: $cf_cv_curses_wacs_map" >&5
15812 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15814 test "$cf_cv_curses_wacs_map" != unknown &&
15815 cat >>confdefs.h <<EOF
15816 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15819 echo "$as_me:15819: checking for wide alternate character constants" >&5
15820 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15821 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15822 echo $ECHO_N "(cached) $ECHO_C" >&6
15825 cf_cv_curses_wacs_symbols=no
15826 if test "$cf_cv_curses_wacs_map" != unknown
15828 cat >conftest.$ac_ext <<_ACEOF
15829 #line 15829 "configure"
15830 #include "confdefs.h"
15832 #ifndef _XOPEN_SOURCE_EXTENDED
15833 #define _XOPEN_SOURCE_EXTENDED
15835 #include <${cf_cv_ncurses_header:-curses.h}>
15839 cchar_t *foo = WACS_PLUS;
15840 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15845 rm -f conftest.$ac_objext conftest$ac_exeext
15846 if { (eval echo "$as_me:15846: \"$ac_link\"") >&5
15847 (eval $ac_link) 2>&5
15849 echo "$as_me:15849: \$? = $ac_status" >&5
15850 (exit $ac_status); } &&
15851 { ac_try='test -s conftest$ac_exeext'
15852 { (eval echo "$as_me:15852: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15855 echo "$as_me:15855: \$? = $ac_status" >&5
15856 (exit $ac_status); }; }; then
15857 cf_cv_curses_wacs_symbols=yes
15859 echo "$as_me: failed program was:" >&5
15860 cat conftest.$ac_ext >&5
15862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15864 cat >conftest.$ac_ext <<_ACEOF
15865 #line 15865 "configure"
15866 #include "confdefs.h"
15868 #ifndef _XOPEN_SOURCE_EXTENDED
15869 #define _XOPEN_SOURCE_EXTENDED
15871 #include <${cf_cv_ncurses_header:-curses.h}>
15875 cchar_t *foo = WACS_PLUS
15880 rm -f conftest.$ac_objext conftest$ac_exeext
15881 if { (eval echo "$as_me:15881: \"$ac_link\"") >&5
15882 (eval $ac_link) 2>&5
15884 echo "$as_me:15884: \$? = $ac_status" >&5
15885 (exit $ac_status); } &&
15886 { ac_try='test -s conftest$ac_exeext'
15887 { (eval echo "$as_me:15887: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15890 echo "$as_me:15890: \$? = $ac_status" >&5
15891 (exit $ac_status); }; }; then
15892 cf_cv_curses_wacs_symbols=yes
15894 echo "$as_me: failed program was:" >&5
15895 cat conftest.$ac_ext >&5
15897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15901 echo "$as_me:15901: result: $cf_cv_curses_wacs_symbols" >&5
15902 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15904 test "$cf_cv_curses_wacs_symbols" != no &&
15905 cat >>confdefs.h <<\EOF
15906 #define CURSES_WACS_SYMBOLS 1
15911 echo "$as_me:15911: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15912 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15913 cat >conftest.$ac_ext <<_ACEOF
15914 #line 15914 "configure"
15915 #include "confdefs.h"
15917 #ifndef _XOPEN_SOURCE_EXTENDED
15918 #define _XOPEN_SOURCE_EXTENDED
15920 #include <${cf_cv_ncurses_header:-curses.h}>
15931 rm -f conftest.$ac_objext
15932 if { (eval echo "$as_me:15932: \"$ac_compile\"") >&5
15933 (eval $ac_compile) 2>&5
15935 echo "$as_me:15935: \$? = $ac_status" >&5
15936 (exit $ac_status); } &&
15937 { ac_try='test -s conftest.$ac_objext'
15938 { (eval echo "$as_me:15938: \"$ac_try\"") >&5
15939 (eval $ac_try) 2>&5
15941 echo "$as_me:15941: \$? = $ac_status" >&5
15942 (exit $ac_status); }; }; then
15945 echo "$as_me: failed program was:" >&5
15946 cat conftest.$ac_ext >&5
15949 rm -f conftest.$ac_objext conftest.$ac_ext
15950 echo "$as_me:15950: result: $cf_result" >&5
15951 echo "${ECHO_T}$cf_result" >&6
15952 if test $cf_result = yes ; then
15954 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15956 cat >>confdefs.h <<EOF
15957 #define $cf_result 1
15962 cat >>confdefs.h <<EOF
15963 #define attr_t long
15968 if test "$cf_enable_widec" = yes; then
15970 # This is needed on Tru64 5.0 to declare mbstate_t
15971 echo "$as_me:15971: checking if we must include wchar.h to declare mbstate_t" >&5
15972 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15973 if test "${cf_cv_mbstate_t+set}" = set; then
15974 echo $ECHO_N "(cached) $ECHO_C" >&6
15977 cat >conftest.$ac_ext <<_ACEOF
15978 #line 15978 "configure"
15979 #include "confdefs.h"
15981 #include <stdlib.h>
15982 #include <stdarg.h>
15984 #ifdef HAVE_LIBUTF8_H
15985 #include <libutf8.h>
15995 rm -f conftest.$ac_objext
15996 if { (eval echo "$as_me:15996: \"$ac_compile\"") >&5
15997 (eval $ac_compile) 2>&5
15999 echo "$as_me:15999: \$? = $ac_status" >&5
16000 (exit $ac_status); } &&
16001 { ac_try='test -s conftest.$ac_objext'
16002 { (eval echo "$as_me:16002: \"$ac_try\"") >&5
16003 (eval $ac_try) 2>&5
16005 echo "$as_me:16005: \$? = $ac_status" >&5
16006 (exit $ac_status); }; }; then
16009 echo "$as_me: failed program was:" >&5
16010 cat conftest.$ac_ext >&5
16011 cat >conftest.$ac_ext <<_ACEOF
16012 #line 16012 "configure"
16013 #include "confdefs.h"
16015 #include <stdlib.h>
16016 #include <stdarg.h>
16019 #ifdef HAVE_LIBUTF8_H
16020 #include <libutf8.h>
16030 rm -f conftest.$ac_objext
16031 if { (eval echo "$as_me:16031: \"$ac_compile\"") >&5
16032 (eval $ac_compile) 2>&5
16034 echo "$as_me:16034: \$? = $ac_status" >&5
16035 (exit $ac_status); } &&
16036 { ac_try='test -s conftest.$ac_objext'
16037 { (eval echo "$as_me:16037: \"$ac_try\"") >&5
16038 (eval $ac_try) 2>&5
16040 echo "$as_me:16040: \$? = $ac_status" >&5
16041 (exit $ac_status); }; }; then
16042 cf_cv_mbstate_t=yes
16044 echo "$as_me: failed program was:" >&5
16045 cat conftest.$ac_ext >&5
16046 cf_cv_mbstate_t=unknown
16048 rm -f conftest.$ac_objext conftest.$ac_ext
16050 rm -f conftest.$ac_objext conftest.$ac_ext
16052 echo "$as_me:16052: result: $cf_cv_mbstate_t" >&5
16053 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
16055 if test "$cf_cv_mbstate_t" = yes ; then
16057 cat >>confdefs.h <<\EOF
16058 #define NEED_WCHAR_H 1
16064 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
16065 if test "$cf_cv_mbstate_t" = unknown ; then
16066 NCURSES_MBSTATE_T=1
16069 # if we find mbstate_t in either place, use substitution to provide a fallback.
16070 if test "$cf_cv_mbstate_t" != unknown ; then
16071 NCURSES_OK_MBSTATE_T=1
16074 # This is needed on Tru64 5.0 to declare wchar_t
16075 echo "$as_me:16075: checking if we must include wchar.h to declare wchar_t" >&5
16076 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
16077 if test "${cf_cv_wchar_t+set}" = set; then
16078 echo $ECHO_N "(cached) $ECHO_C" >&6
16081 cat >conftest.$ac_ext <<_ACEOF
16082 #line 16082 "configure"
16083 #include "confdefs.h"
16085 #include <stdlib.h>
16086 #include <stdarg.h>
16088 #ifdef HAVE_LIBUTF8_H
16089 #include <libutf8.h>
16099 rm -f conftest.$ac_objext
16100 if { (eval echo "$as_me:16100: \"$ac_compile\"") >&5
16101 (eval $ac_compile) 2>&5
16103 echo "$as_me:16103: \$? = $ac_status" >&5
16104 (exit $ac_status); } &&
16105 { ac_try='test -s conftest.$ac_objext'
16106 { (eval echo "$as_me:16106: \"$ac_try\"") >&5
16107 (eval $ac_try) 2>&5
16109 echo "$as_me:16109: \$? = $ac_status" >&5
16110 (exit $ac_status); }; }; then
16113 echo "$as_me: failed program was:" >&5
16114 cat conftest.$ac_ext >&5
16115 cat >conftest.$ac_ext <<_ACEOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16119 #include <stdlib.h>
16120 #include <stdarg.h>
16123 #ifdef HAVE_LIBUTF8_H
16124 #include <libutf8.h>
16134 rm -f conftest.$ac_objext
16135 if { (eval echo "$as_me:16135: \"$ac_compile\"") >&5
16136 (eval $ac_compile) 2>&5
16138 echo "$as_me:16138: \$? = $ac_status" >&5
16139 (exit $ac_status); } &&
16140 { ac_try='test -s conftest.$ac_objext'
16141 { (eval echo "$as_me:16141: \"$ac_try\"") >&5
16142 (eval $ac_try) 2>&5
16144 echo "$as_me:16144: \$? = $ac_status" >&5
16145 (exit $ac_status); }; }; then
16148 echo "$as_me: failed program was:" >&5
16149 cat conftest.$ac_ext >&5
16150 cf_cv_wchar_t=unknown
16152 rm -f conftest.$ac_objext conftest.$ac_ext
16154 rm -f conftest.$ac_objext conftest.$ac_ext
16156 echo "$as_me:16156: result: $cf_cv_wchar_t" >&5
16157 echo "${ECHO_T}$cf_cv_wchar_t" >&6
16159 if test "$cf_cv_wchar_t" = yes ; then
16161 cat >>confdefs.h <<\EOF
16162 #define NEED_WCHAR_H 1
16168 # if we do not find wchar_t in either place, use substitution to provide a fallback.
16169 if test "$cf_cv_wchar_t" = unknown ; then
16173 # if we find wchar_t in either place, use substitution to provide a fallback.
16174 if test "$cf_cv_wchar_t" != unknown ; then
16175 NCURSES_OK_WCHAR_T=1
16178 # This is needed on Tru64 5.0 to declare wint_t
16179 echo "$as_me:16179: checking if we must include wchar.h to declare wint_t" >&5
16180 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
16181 if test "${cf_cv_wint_t+set}" = set; then
16182 echo $ECHO_N "(cached) $ECHO_C" >&6
16185 cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16189 #include <stdlib.h>
16190 #include <stdarg.h>
16192 #ifdef HAVE_LIBUTF8_H
16193 #include <libutf8.h>
16203 rm -f conftest.$ac_objext
16204 if { (eval echo "$as_me:16204: \"$ac_compile\"") >&5
16205 (eval $ac_compile) 2>&5
16207 echo "$as_me:16207: \$? = $ac_status" >&5
16208 (exit $ac_status); } &&
16209 { ac_try='test -s conftest.$ac_objext'
16210 { (eval echo "$as_me:16210: \"$ac_try\"") >&5
16211 (eval $ac_try) 2>&5
16213 echo "$as_me:16213: \$? = $ac_status" >&5
16214 (exit $ac_status); }; }; then
16217 echo "$as_me: failed program was:" >&5
16218 cat conftest.$ac_ext >&5
16219 cat >conftest.$ac_ext <<_ACEOF
16220 #line 16220 "configure"
16221 #include "confdefs.h"
16223 #include <stdlib.h>
16224 #include <stdarg.h>
16227 #ifdef HAVE_LIBUTF8_H
16228 #include <libutf8.h>
16238 rm -f conftest.$ac_objext
16239 if { (eval echo "$as_me:16239: \"$ac_compile\"") >&5
16240 (eval $ac_compile) 2>&5
16242 echo "$as_me:16242: \$? = $ac_status" >&5
16243 (exit $ac_status); } &&
16244 { ac_try='test -s conftest.$ac_objext'
16245 { (eval echo "$as_me:16245: \"$ac_try\"") >&5
16246 (eval $ac_try) 2>&5
16248 echo "$as_me:16248: \$? = $ac_status" >&5
16249 (exit $ac_status); }; }; then
16252 echo "$as_me: failed program was:" >&5
16253 cat conftest.$ac_ext >&5
16254 cf_cv_wint_t=unknown
16256 rm -f conftest.$ac_objext conftest.$ac_ext
16258 rm -f conftest.$ac_objext conftest.$ac_ext
16260 echo "$as_me:16260: result: $cf_cv_wint_t" >&5
16261 echo "${ECHO_T}$cf_cv_wint_t" >&6
16263 if test "$cf_cv_wint_t" = yes ; then
16265 cat >>confdefs.h <<\EOF
16266 #define NEED_WCHAR_H 1
16272 # if we do not find wint_t in either place, use substitution to provide a fallback.
16273 if test "$cf_cv_wint_t" = unknown ; then
16277 # if we find wint_t in either place, use substitution to provide a fallback.
16278 if test "$cf_cv_wint_t" != unknown ; then
16279 NCURSES_OK_WINT_T=1
16282 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
16284 echo "$as_me:16284: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16285 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16286 cat >conftest.$ac_ext <<_ACEOF
16287 #line 16287 "configure"
16288 #include "confdefs.h"
16290 #ifndef _XOPEN_SOURCE_EXTENDED
16291 #define _XOPEN_SOURCE_EXTENDED
16293 #include <${cf_cv_ncurses_header:-curses.h}>
16304 rm -f conftest.$ac_objext
16305 if { (eval echo "$as_me:16305: \"$ac_compile\"") >&5
16306 (eval $ac_compile) 2>&5
16308 echo "$as_me:16308: \$? = $ac_status" >&5
16309 (exit $ac_status); } &&
16310 { ac_try='test -s conftest.$ac_objext'
16311 { (eval echo "$as_me:16311: \"$ac_try\"") >&5
16312 (eval $ac_try) 2>&5
16314 echo "$as_me:16314: \$? = $ac_status" >&5
16315 (exit $ac_status); }; }; then
16318 echo "$as_me: failed program was:" >&5
16319 cat conftest.$ac_ext >&5
16322 rm -f conftest.$ac_objext conftest.$ac_ext
16323 echo "$as_me:16323: result: $cf_result" >&5
16324 echo "${ECHO_T}$cf_result" >&6
16325 if test $cf_result = yes ; then
16327 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16329 cat >>confdefs.h <<EOF
16330 #define $cf_result 1
16335 cat >>confdefs.h <<EOF
16336 #define mbstate_t long
16343 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
16345 echo "$as_me:16345: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16346 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16347 cat >conftest.$ac_ext <<_ACEOF
16348 #line 16348 "configure"
16349 #include "confdefs.h"
16351 #ifndef _XOPEN_SOURCE_EXTENDED
16352 #define _XOPEN_SOURCE_EXTENDED
16354 #include <${cf_cv_ncurses_header:-curses.h}>
16365 rm -f conftest.$ac_objext
16366 if { (eval echo "$as_me:16366: \"$ac_compile\"") >&5
16367 (eval $ac_compile) 2>&5
16369 echo "$as_me:16369: \$? = $ac_status" >&5
16370 (exit $ac_status); } &&
16371 { ac_try='test -s conftest.$ac_objext'
16372 { (eval echo "$as_me:16372: \"$ac_try\"") >&5
16373 (eval $ac_try) 2>&5
16375 echo "$as_me:16375: \$? = $ac_status" >&5
16376 (exit $ac_status); }; }; then
16379 echo "$as_me: failed program was:" >&5
16380 cat conftest.$ac_ext >&5
16383 rm -f conftest.$ac_objext conftest.$ac_ext
16384 echo "$as_me:16384: result: $cf_result" >&5
16385 echo "${ECHO_T}$cf_result" >&6
16386 if test $cf_result = yes ; then
16388 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16390 cat >>confdefs.h <<EOF
16391 #define $cf_result 1
16396 cat >>confdefs.h <<EOF
16397 #define wchar_t long
16404 if test "$NCURSES_OK_WINT_T" = 0 ; then
16406 echo "$as_me:16406: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
16407 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16408 cat >conftest.$ac_ext <<_ACEOF
16409 #line 16409 "configure"
16410 #include "confdefs.h"
16412 #ifndef _XOPEN_SOURCE_EXTENDED
16413 #define _XOPEN_SOURCE_EXTENDED
16415 #include <${cf_cv_ncurses_header:-curses.h}>
16426 rm -f conftest.$ac_objext
16427 if { (eval echo "$as_me:16427: \"$ac_compile\"") >&5
16428 (eval $ac_compile) 2>&5
16430 echo "$as_me:16430: \$? = $ac_status" >&5
16431 (exit $ac_status); } &&
16432 { ac_try='test -s conftest.$ac_objext'
16433 { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434 (eval $ac_try) 2>&5
16436 echo "$as_me:16436: \$? = $ac_status" >&5
16437 (exit $ac_status); }; }; then
16440 echo "$as_me: failed program was:" >&5
16441 cat conftest.$ac_ext >&5
16444 rm -f conftest.$ac_objext conftest.$ac_ext
16445 echo "$as_me:16445: result: $cf_result" >&5
16446 echo "${ECHO_T}$cf_result" >&6
16447 if test $cf_result = yes ; then
16449 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16451 cat >>confdefs.h <<EOF
16452 #define $cf_result 1
16457 cat >>confdefs.h <<EOF
16458 #define wint_t long
16466 echo "$as_me:16466: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16467 echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16469 cat >conftest.$ac_ext <<_ACEOF
16470 #line 16470 "configure"
16471 #include "confdefs.h"
16473 #ifdef HAVE_XCURSES
16474 #include <xcurses.h>
16475 char * XCursesProgramName = "test";
16477 #include <${cf_cv_ncurses_header:-curses.h}>
16478 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16479 #include <ncursesw/term.h>
16480 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16481 #include <ncurses/term.h>
16482 #elif defined(HAVE_TERM_H)
16491 void *foo = &(ospeed)
16497 rm -f conftest.$ac_objext
16498 if { (eval echo "$as_me:16498: \"$ac_compile\"") >&5
16499 (eval $ac_compile) 2>&5
16501 echo "$as_me:16501: \$? = $ac_status" >&5
16502 (exit $ac_status); } &&
16503 { ac_try='test -s conftest.$ac_objext'
16504 { (eval echo "$as_me:16504: \"$ac_try\"") >&5
16505 (eval $ac_try) 2>&5
16507 echo "$as_me:16507: \$? = $ac_status" >&5
16508 (exit $ac_status); }; }; then
16511 echo "$as_me: failed program was:" >&5
16512 cat conftest.$ac_ext >&5
16515 rm -f conftest.$ac_objext conftest.$ac_ext
16516 echo "$as_me:16516: result: $cf_result" >&5
16517 echo "${ECHO_T}$cf_result" >&6
16519 if test $cf_result = yes ; then
16521 cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16523 cat >>confdefs.h <<EOF
16524 #define $cf_result 1
16528 echo "$as_me:16528: checking for data ospeed in library" >&5
16529 echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
16530 # BSD linkers insist on making weak linkage, but resolve at runtime.
16531 if test "$cross_compiling" = yes; then
16534 cat >conftest.$ac_ext <<_ACEOF
16535 #line 16535 "configure"
16536 #include "confdefs.h"
16538 #ifdef HAVE_XCURSES
16539 #include <xcurses.h>
16540 char * XCursesProgramName = "test";
16542 #include <${cf_cv_ncurses_header:-curses.h}>
16543 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16544 #include <ncursesw/term.h>
16545 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16546 #include <ncurses/term.h>
16547 #elif defined(HAVE_TERM_H)
16552 extern char ospeed;
16558 void *foo = &(ospeed);
16559 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16560 ${cf_cv_main_return:-return}(foo == 0);
16567 rm -f conftest.$ac_objext conftest$ac_exeext
16568 if { (eval echo "$as_me:16568: \"$ac_link\"") >&5
16569 (eval $ac_link) 2>&5
16571 echo "$as_me:16571: \$? = $ac_status" >&5
16572 (exit $ac_status); } &&
16573 { ac_try='test -s conftest$ac_exeext'
16574 { (eval echo "$as_me:16574: \"$ac_try\"") >&5
16575 (eval $ac_try) 2>&5
16577 echo "$as_me:16577: \$? = $ac_status" >&5
16578 (exit $ac_status); }; }; then
16581 echo "$as_me: failed program was:" >&5
16582 cat conftest.$ac_ext >&5
16585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16588 cat >conftest.$ac_ext <<_ACEOF
16589 #line 16589 "configure"
16590 #include "confdefs.h"
16592 #ifdef HAVE_XCURSES
16593 #include <xcurses.h>
16594 char * XCursesProgramName = "test";
16596 #include <${cf_cv_ncurses_header:-curses.h}>
16597 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16598 #include <ncursesw/term.h>
16599 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16600 #include <ncurses/term.h>
16601 #elif defined(HAVE_TERM_H)
16606 extern char ospeed;
16609 void *foo = &(ospeed);
16610 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
16611 ${cf_cv_main_return:-return}(foo == 0);
16614 rm -f conftest$ac_exeext
16615 if { (eval echo "$as_me:16615: \"$ac_link\"") >&5
16616 (eval $ac_link) 2>&5
16618 echo "$as_me:16618: \$? = $ac_status" >&5
16619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16620 { (eval echo "$as_me:16620: \"$ac_try\"") >&5
16621 (eval $ac_try) 2>&5
16623 echo "$as_me:16623: \$? = $ac_status" >&5
16624 (exit $ac_status); }; }; then
16627 echo "$as_me: program exited with status $ac_status" >&5
16628 echo "$as_me: failed program was:" >&5
16629 cat conftest.$ac_ext >&5
16632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16634 echo "$as_me:16634: result: $cf_result" >&5
16635 echo "${ECHO_T}$cf_result" >&6
16636 if test $cf_result = yes ; then
16638 cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16640 cat >>confdefs.h <<EOF
16641 #define $cf_result 1
16647 echo "$as_me:16647: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16648 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16650 cat >conftest.$ac_ext <<_ACEOF
16651 #line 16651 "configure"
16652 #include "confdefs.h"
16654 #ifdef HAVE_XCURSES
16655 #include <xcurses.h>
16656 char * XCursesProgramName = "test";
16658 #include <${cf_cv_ncurses_header:-curses.h}>
16659 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16660 #include <ncursesw/term.h>
16661 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16662 #include <ncurses/term.h>
16663 #elif defined(HAVE_TERM_H)
16672 void *foo = &(boolnames)
16678 rm -f conftest.$ac_objext
16679 if { (eval echo "$as_me:16679: \"$ac_compile\"") >&5
16680 (eval $ac_compile) 2>&5
16682 echo "$as_me:16682: \$? = $ac_status" >&5
16683 (exit $ac_status); } &&
16684 { ac_try='test -s conftest.$ac_objext'
16685 { (eval echo "$as_me:16685: \"$ac_try\"") >&5
16686 (eval $ac_try) 2>&5
16688 echo "$as_me:16688: \$? = $ac_status" >&5
16689 (exit $ac_status); }; }; then
16692 echo "$as_me: failed program was:" >&5
16693 cat conftest.$ac_ext >&5
16696 rm -f conftest.$ac_objext conftest.$ac_ext
16697 echo "$as_me:16697: result: $cf_result" >&5
16698 echo "${ECHO_T}$cf_result" >&6
16700 if test $cf_result = yes ; then
16702 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16704 cat >>confdefs.h <<EOF
16705 #define $cf_result 1
16709 echo "$as_me:16709: checking for data boolnames in library" >&5
16710 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
16711 # BSD linkers insist on making weak linkage, but resolve at runtime.
16712 if test "$cross_compiling" = yes; then
16715 cat >conftest.$ac_ext <<_ACEOF
16716 #line 16716 "configure"
16717 #include "confdefs.h"
16719 #ifdef HAVE_XCURSES
16720 #include <xcurses.h>
16721 char * XCursesProgramName = "test";
16723 #include <${cf_cv_ncurses_header:-curses.h}>
16724 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16725 #include <ncursesw/term.h>
16726 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16727 #include <ncurses/term.h>
16728 #elif defined(HAVE_TERM_H)
16733 extern char boolnames;
16739 void *foo = &(boolnames);
16740 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16741 ${cf_cv_main_return:-return}(foo == 0);
16748 rm -f conftest.$ac_objext conftest$ac_exeext
16749 if { (eval echo "$as_me:16749: \"$ac_link\"") >&5
16750 (eval $ac_link) 2>&5
16752 echo "$as_me:16752: \$? = $ac_status" >&5
16753 (exit $ac_status); } &&
16754 { ac_try='test -s conftest$ac_exeext'
16755 { (eval echo "$as_me:16755: \"$ac_try\"") >&5
16756 (eval $ac_try) 2>&5
16758 echo "$as_me:16758: \$? = $ac_status" >&5
16759 (exit $ac_status); }; }; then
16762 echo "$as_me: failed program was:" >&5
16763 cat conftest.$ac_ext >&5
16766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16769 cat >conftest.$ac_ext <<_ACEOF
16770 #line 16770 "configure"
16771 #include "confdefs.h"
16773 #ifdef HAVE_XCURSES
16774 #include <xcurses.h>
16775 char * XCursesProgramName = "test";
16777 #include <${cf_cv_ncurses_header:-curses.h}>
16778 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16779 #include <ncursesw/term.h>
16780 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16781 #include <ncurses/term.h>
16782 #elif defined(HAVE_TERM_H)
16787 extern char boolnames;
16790 void *foo = &(boolnames);
16791 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
16792 ${cf_cv_main_return:-return}(foo == 0);
16795 rm -f conftest$ac_exeext
16796 if { (eval echo "$as_me:16796: \"$ac_link\"") >&5
16797 (eval $ac_link) 2>&5
16799 echo "$as_me:16799: \$? = $ac_status" >&5
16800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16801 { (eval echo "$as_me:16801: \"$ac_try\"") >&5
16802 (eval $ac_try) 2>&5
16804 echo "$as_me:16804: \$? = $ac_status" >&5
16805 (exit $ac_status); }; }; then
16808 echo "$as_me: program exited with status $ac_status" >&5
16809 echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16813 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16815 echo "$as_me:16815: result: $cf_result" >&5
16816 echo "${ECHO_T}$cf_result" >&6
16817 if test $cf_result = yes ; then
16819 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16821 cat >>confdefs.h <<EOF
16822 #define $cf_result 1
16828 echo "$as_me:16828: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16829 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16831 cat >conftest.$ac_ext <<_ACEOF
16832 #line 16832 "configure"
16833 #include "confdefs.h"
16835 #ifdef HAVE_XCURSES
16836 #include <xcurses.h>
16837 char * XCursesProgramName = "test";
16839 #include <${cf_cv_ncurses_header:-curses.h}>
16840 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16841 #include <ncursesw/term.h>
16842 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16843 #include <ncurses/term.h>
16844 #elif defined(HAVE_TERM_H)
16853 void *foo = &(boolfnames)
16859 rm -f conftest.$ac_objext
16860 if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5
16861 (eval $ac_compile) 2>&5
16863 echo "$as_me:16863: \$? = $ac_status" >&5
16864 (exit $ac_status); } &&
16865 { ac_try='test -s conftest.$ac_objext'
16866 { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867 (eval $ac_try) 2>&5
16869 echo "$as_me:16869: \$? = $ac_status" >&5
16870 (exit $ac_status); }; }; then
16873 echo "$as_me: failed program was:" >&5
16874 cat conftest.$ac_ext >&5
16877 rm -f conftest.$ac_objext conftest.$ac_ext
16878 echo "$as_me:16878: result: $cf_result" >&5
16879 echo "${ECHO_T}$cf_result" >&6
16881 if test $cf_result = yes ; then
16883 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16885 cat >>confdefs.h <<EOF
16886 #define $cf_result 1
16890 echo "$as_me:16890: checking for data boolfnames in library" >&5
16891 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16892 # BSD linkers insist on making weak linkage, but resolve at runtime.
16893 if test "$cross_compiling" = yes; then
16896 cat >conftest.$ac_ext <<_ACEOF
16897 #line 16897 "configure"
16898 #include "confdefs.h"
16900 #ifdef HAVE_XCURSES
16901 #include <xcurses.h>
16902 char * XCursesProgramName = "test";
16904 #include <${cf_cv_ncurses_header:-curses.h}>
16905 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16906 #include <ncursesw/term.h>
16907 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16908 #include <ncurses/term.h>
16909 #elif defined(HAVE_TERM_H)
16914 extern char boolfnames;
16920 void *foo = &(boolfnames);
16921 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16922 ${cf_cv_main_return:-return}(foo == 0);
16929 rm -f conftest.$ac_objext conftest$ac_exeext
16930 if { (eval echo "$as_me:16930: \"$ac_link\"") >&5
16931 (eval $ac_link) 2>&5
16933 echo "$as_me:16933: \$? = $ac_status" >&5
16934 (exit $ac_status); } &&
16935 { ac_try='test -s conftest$ac_exeext'
16936 { (eval echo "$as_me:16936: \"$ac_try\"") >&5
16937 (eval $ac_try) 2>&5
16939 echo "$as_me:16939: \$? = $ac_status" >&5
16940 (exit $ac_status); }; }; then
16943 echo "$as_me: failed program was:" >&5
16944 cat conftest.$ac_ext >&5
16947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16950 cat >conftest.$ac_ext <<_ACEOF
16951 #line 16951 "configure"
16952 #include "confdefs.h"
16954 #ifdef HAVE_XCURSES
16955 #include <xcurses.h>
16956 char * XCursesProgramName = "test";
16958 #include <${cf_cv_ncurses_header:-curses.h}>
16959 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16960 #include <ncursesw/term.h>
16961 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16962 #include <ncurses/term.h>
16963 #elif defined(HAVE_TERM_H)
16968 extern char boolfnames;
16971 void *foo = &(boolfnames);
16972 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16973 ${cf_cv_main_return:-return}(foo == 0);
16976 rm -f conftest$ac_exeext
16977 if { (eval echo "$as_me:16977: \"$ac_link\"") >&5
16978 (eval $ac_link) 2>&5
16980 echo "$as_me:16980: \$? = $ac_status" >&5
16981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16982 { (eval echo "$as_me:16982: \"$ac_try\"") >&5
16983 (eval $ac_try) 2>&5
16985 echo "$as_me:16985: \$? = $ac_status" >&5
16986 (exit $ac_status); }; }; then
16989 echo "$as_me: program exited with status $ac_status" >&5
16990 echo "$as_me: failed program was:" >&5
16991 cat conftest.$ac_ext >&5
16994 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16996 echo "$as_me:16996: result: $cf_result" >&5
16997 echo "${ECHO_T}$cf_result" >&6
16998 if test $cf_result = yes ; then
17000 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17002 cat >>confdefs.h <<EOF
17003 #define $cf_result 1
17009 echo "$as_me:17009: checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17010 echo $ECHO_N "checking for data ttytype declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17012 cat >conftest.$ac_ext <<_ACEOF
17013 #line 17013 "configure"
17014 #include "confdefs.h"
17016 #ifdef HAVE_XCURSES
17017 #include <xcurses.h>
17018 char * XCursesProgramName = "test";
17020 #include <${cf_cv_ncurses_header:-curses.h}>
17021 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17022 #include <ncursesw/term.h>
17023 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17024 #include <ncurses/term.h>
17025 #elif defined(HAVE_TERM_H)
17034 void *foo = &(ttytype)
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
17054 echo "$as_me: failed program was:" >&5
17055 cat conftest.$ac_ext >&5
17058 rm -f conftest.$ac_objext conftest.$ac_ext
17059 echo "$as_me:17059: result: $cf_result" >&5
17060 echo "${ECHO_T}$cf_result" >&6
17062 if test $cf_result = yes ; then
17064 cf_result=`echo "have_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17066 cat >>confdefs.h <<EOF
17067 #define $cf_result 1
17071 echo "$as_me:17071: checking for data ttytype in library" >&5
17072 echo $ECHO_N "checking for data ttytype in library... $ECHO_C" >&6
17073 # BSD linkers insist on making weak linkage, but resolve at runtime.
17074 if test "$cross_compiling" = yes; then
17077 cat >conftest.$ac_ext <<_ACEOF
17078 #line 17078 "configure"
17079 #include "confdefs.h"
17081 #ifdef HAVE_XCURSES
17082 #include <xcurses.h>
17083 char * XCursesProgramName = "test";
17085 #include <${cf_cv_ncurses_header:-curses.h}>
17086 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17087 #include <ncursesw/term.h>
17088 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17089 #include <ncurses/term.h>
17090 #elif defined(HAVE_TERM_H)
17095 extern char ttytype;
17101 void *foo = &(ttytype);
17102 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
17103 ${cf_cv_main_return:-return}(foo == 0);
17110 rm -f conftest.$ac_objext conftest$ac_exeext
17111 if { (eval echo "$as_me:17111: \"$ac_link\"") >&5
17112 (eval $ac_link) 2>&5
17114 echo "$as_me:17114: \$? = $ac_status" >&5
17115 (exit $ac_status); } &&
17116 { ac_try='test -s conftest$ac_exeext'
17117 { (eval echo "$as_me:17117: \"$ac_try\"") >&5
17118 (eval $ac_try) 2>&5
17120 echo "$as_me:17120: \$? = $ac_status" >&5
17121 (exit $ac_status); }; }; then
17124 echo "$as_me: failed program was:" >&5
17125 cat conftest.$ac_ext >&5
17128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17131 cat >conftest.$ac_ext <<_ACEOF
17132 #line 17132 "configure"
17133 #include "confdefs.h"
17135 #ifdef HAVE_XCURSES
17136 #include <xcurses.h>
17137 char * XCursesProgramName = "test";
17139 #include <${cf_cv_ncurses_header:-curses.h}>
17140 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17141 #include <ncursesw/term.h>
17142 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17143 #include <ncurses/term.h>
17144 #elif defined(HAVE_TERM_H)
17149 extern char ttytype;
17152 void *foo = &(ttytype);
17153 fprintf(stderr, "testing linkage of ttytype:%p\n", foo);
17154 ${cf_cv_main_return:-return}(foo == 0);
17157 rm -f conftest$ac_exeext
17158 if { (eval echo "$as_me:17158: \"$ac_link\"") >&5
17159 (eval $ac_link) 2>&5
17161 echo "$as_me:17161: \$? = $ac_status" >&5
17162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17163 { (eval echo "$as_me:17163: \"$ac_try\"") >&5
17164 (eval $ac_try) 2>&5
17166 echo "$as_me:17166: \$? = $ac_status" >&5
17167 (exit $ac_status); }; }; then
17170 echo "$as_me: program exited with status $ac_status" >&5
17171 echo "$as_me: failed program was:" >&5
17172 cat conftest.$ac_ext >&5
17175 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17177 echo "$as_me:17177: result: $cf_result" >&5
17178 echo "${ECHO_T}$cf_result" >&6
17179 if test $cf_result = yes ; then
17181 cf_result=`echo "decl_curses_data_ttytype" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17183 cat >>confdefs.h <<EOF
17184 #define $cf_result 1
17190 if ( test "$GCC" = yes || test "$GXX" = yes )
17192 echo "$as_me:17192: checking if you want to turn on gcc warnings" >&5
17193 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17195 # Check whether --enable-warnings or --disable-warnings was given.
17196 if test "${enable_warnings+set}" = set; then
17197 enableval="$enable_warnings"
17198 test "$enableval" != yes && enableval=no
17199 if test "$enableval" != "no" ; then
17209 echo "$as_me:17209: result: $with_warnings" >&5
17210 echo "${ECHO_T}$with_warnings" >&6
17211 if test "$with_warnings" = "yes"
17214 if test "$GCC" = yes
17216 cat > conftest.i <<EOF
17218 #define GCC_PRINTF 0
17221 #define GCC_SCANF 0
17223 #ifndef GCC_NORETURN
17224 #define GCC_NORETURN /* nothing */
17227 #define GCC_UNUSED /* nothing */
17230 if test "$GCC" = yes
17232 { echo "$as_me:17232: checking for $CC __attribute__ directives..." >&5
17233 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17234 cat > conftest.$ac_ext <<EOF
17235 #line 17235 "${as_me:-configure}"
17236 #include "confdefs.h"
17237 #include "conftest.h"
17238 #include "conftest.i"
17240 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17242 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17245 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
17247 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
17249 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17250 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
17251 extern void foo(void) GCC_NORETURN;
17252 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
17254 cf_printf_attribute=no
17255 cf_scanf_attribute=no
17256 for cf_attribute in scanf printf unused noreturn
17259 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17261 cf_directive="__attribute__(($cf_attribute))"
17262 echo "checking for $CC $cf_directive" 1>&5
17264 case $cf_attribute in
17266 cf_printf_attribute=yes
17267 cat >conftest.h <<EOF
17268 #define GCC_$cf_ATTRIBUTE 1
17272 cf_scanf_attribute=yes
17273 cat >conftest.h <<EOF
17274 #define GCC_$cf_ATTRIBUTE 1
17278 cat >conftest.h <<EOF
17279 #define GCC_$cf_ATTRIBUTE $cf_directive
17284 if { (eval echo "$as_me:17284: \"$ac_compile\"") >&5
17285 (eval $ac_compile) 2>&5
17287 echo "$as_me:17287: \$? = $ac_status" >&5
17288 (exit $ac_status); }; then
17289 test -n "$verbose" && echo "$as_me:17289: result: ... $cf_attribute" >&5
17290 echo "${ECHO_T}... $cf_attribute" >&6
17291 cat conftest.h >>confdefs.h
17292 case $cf_attribute in
17295 cat >>confdefs.h <<EOF
17296 #define GCC_NORETURN $cf_directive
17301 cf_value='/* nothing */'
17302 if test "$cf_printf_attribute" != no ; then
17303 cf_value='__attribute__((format(printf,fmt,var)))'
17305 cat >>confdefs.h <<\EOF
17306 #define GCC_PRINTF 1
17311 cat >>confdefs.h <<EOF
17312 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17317 cf_value='/* nothing */'
17318 if test "$cf_scanf_attribute" != no ; then
17319 cf_value='__attribute__((format(scanf,fmt,var)))'
17321 cat >>confdefs.h <<\EOF
17322 #define GCC_SCANF 1
17327 cat >>confdefs.h <<EOF
17328 #define GCC_SCANFLIKE(fmt,var) $cf_value
17334 cat >>confdefs.h <<EOF
17335 #define GCC_UNUSED $cf_directive
17343 fgrep define conftest.i >>confdefs.h
17350 if test "$GCC" = yes ; then
17353 echo "$as_me:17353: checking if this is really Intel C compiler" >&5
17354 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17355 cf_save_CFLAGS="$CFLAGS"
17356 CFLAGS="$CFLAGS -no-gcc"
17357 cat >conftest.$ac_ext <<_ACEOF
17358 #line 17358 "configure"
17359 #include "confdefs.h"
17365 #ifdef __INTEL_COMPILER
17374 rm -f conftest.$ac_objext
17375 if { (eval echo "$as_me:17375: \"$ac_compile\"") >&5
17376 (eval $ac_compile) 2>&5
17378 echo "$as_me:17378: \$? = $ac_status" >&5
17379 (exit $ac_status); } &&
17380 { ac_try='test -s conftest.$ac_objext'
17381 { (eval echo "$as_me:17381: \"$ac_try\"") >&5
17382 (eval $ac_try) 2>&5
17384 echo "$as_me:17384: \$? = $ac_status" >&5
17385 (exit $ac_status); }; }; then
17387 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17390 echo "$as_me: failed program was:" >&5
17391 cat conftest.$ac_ext >&5
17393 rm -f conftest.$ac_objext conftest.$ac_ext
17394 CFLAGS="$cf_save_CFLAGS"
17395 echo "$as_me:17395: result: $INTEL_COMPILER" >&5
17396 echo "${ECHO_T}$INTEL_COMPILER" >&6
17403 if test "$GCC" = yes ; then
17404 echo "$as_me:17404: checking if this is really Clang C compiler" >&5
17405 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17406 cf_save_CFLAGS="$CFLAGS"
17407 CFLAGS="$CFLAGS -Qunused-arguments"
17408 cat >conftest.$ac_ext <<_ACEOF
17409 #line 17409 "configure"
17410 #include "confdefs.h"
17425 rm -f conftest.$ac_objext
17426 if { (eval echo "$as_me:17426: \"$ac_compile\"") >&5
17427 (eval $ac_compile) 2>&5
17429 echo "$as_me:17429: \$? = $ac_status" >&5
17430 (exit $ac_status); } &&
17431 { ac_try='test -s conftest.$ac_objext'
17432 { (eval echo "$as_me:17432: \"$ac_try\"") >&5
17433 (eval $ac_try) 2>&5
17435 echo "$as_me:17435: \$? = $ac_status" >&5
17436 (exit $ac_status); }; }; then
17438 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17441 echo "$as_me: failed program was:" >&5
17442 cat conftest.$ac_ext >&5
17444 rm -f conftest.$ac_objext conftest.$ac_ext
17445 CFLAGS="$cf_save_CFLAGS"
17446 echo "$as_me:17446: result: $CLANG_COMPILER" >&5
17447 echo "${ECHO_T}$CLANG_COMPILER" >&6
17450 cat > conftest.$ac_ext <<EOF
17451 #line 17451 "${as_me:-configure}"
17452 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17455 if test "$INTEL_COMPILER" = yes
17457 # The "-wdXXX" options suppress warnings:
17458 # remark #1419: external declaration in primary source file
17459 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17460 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17461 # remark #193: zero used for undefined preprocessing identifier
17462 # remark #593: variable "curs_sb_left_arrow" was set but never used
17463 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17464 # remark #869: parameter "tw" was never referenced
17465 # remark #981: operands are evaluated in unspecified order
17466 # warning #279: controlling expression is constant
17468 { echo "$as_me:17468: checking for $CC warning options..." >&5
17469 echo "$as_me: checking for $CC warning options..." >&6;}
17470 cf_save_CFLAGS="$CFLAGS"
17471 EXTRA_CFLAGS="-Wall"
17483 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17484 if { (eval echo "$as_me:17484: \"$ac_compile\"") >&5
17485 (eval $ac_compile) 2>&5
17487 echo "$as_me:17487: \$? = $ac_status" >&5
17488 (exit $ac_status); }; then
17489 test -n "$verbose" && echo "$as_me:17489: result: ... -$cf_opt" >&5
17490 echo "${ECHO_T}... -$cf_opt" >&6
17491 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17494 CFLAGS="$cf_save_CFLAGS"
17496 elif test "$GCC" = yes
17498 { echo "$as_me:17498: checking for $CC warning options..." >&5
17499 echo "$as_me: checking for $CC warning options..." >&6;}
17500 cf_save_CFLAGS="$CFLAGS"
17503 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17504 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17505 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17506 for cf_opt in W Wall \
17507 Wbad-function-cast \
17510 Wdeclaration-after-statement \
17513 Wmissing-declarations \
17514 Wmissing-prototypes \
17518 Wstrict-prototypes \
17519 Wundef $cf_gcc_warnings $cf_warn_CONST
17521 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17522 if { (eval echo "$as_me:17522: \"$ac_compile\"") >&5
17523 (eval $ac_compile) 2>&5
17525 echo "$as_me:17525: \$? = $ac_status" >&5
17526 (exit $ac_status); }; then
17527 test -n "$verbose" && echo "$as_me:17527: result: ... -$cf_opt" >&5
17528 echo "${ECHO_T}... -$cf_opt" >&6
17531 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
17534 case $GCC_VERSION in
17536 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17538 echo "${as_me:-configure}:17538: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17544 case $GCC_VERSION in
17546 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17548 echo "${as_me:-configure}:17548: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17554 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17557 CFLAGS="$cf_save_CFLAGS"
17564 echo "$as_me:17564: checking if you want to use dmalloc for testing" >&5
17565 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17567 # Check whether --with-dmalloc or --without-dmalloc was given.
17568 if test "${with_dmalloc+set}" = set; then
17569 withval="$with_dmalloc"
17571 cat >>confdefs.h <<EOF
17572 #define USE_DMALLOC 1
17575 : ${with_cflags:=-g}
17576 : ${with_no_leaks:=yes}
17581 echo "$as_me:17581: result: ${with_dmalloc:-no}" >&5
17582 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17584 case .$with_cflags in
17594 cf_new_extra_cppflags=
17596 for cf_add_cflags in -g
17598 case $cf_fix_cppflags in
17600 case $cf_add_cflags in
17601 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17602 case $cf_add_cflags in
17604 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17607 && test -z "${cf_tst_cflags}" \
17608 && cf_fix_cppflags=yes
17610 if test $cf_fix_cppflags = yes ; then
17611 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17613 elif test "${cf_tst_cflags}" = "\"'" ; then
17614 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17619 case "$CPPFLAGS" in
17623 case $cf_add_cflags in
17625 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17627 CPPFLAGS=`echo "$CPPFLAGS" | \
17628 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17629 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17633 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17638 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17643 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17645 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17647 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17648 && test -z "${cf_tst_cflags}" \
17649 && cf_fix_cppflags=no
17654 if test -n "$cf_new_cflags" ; then
17656 CFLAGS="$CFLAGS $cf_new_cflags"
17659 if test -n "$cf_new_cppflags" ; then
17661 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17664 if test -n "$cf_new_extra_cppflags" ; then
17666 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17674 if test "$with_dmalloc" = yes ; then
17675 echo "$as_me:17675: checking for dmalloc.h" >&5
17676 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17677 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17678 echo $ECHO_N "(cached) $ECHO_C" >&6
17680 cat >conftest.$ac_ext <<_ACEOF
17681 #line 17681 "configure"
17682 #include "confdefs.h"
17683 #include <dmalloc.h>
17685 if { (eval echo "$as_me:17685: \"$ac_cpp conftest.$ac_ext\"") >&5
17686 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17688 egrep -v '^ *\+' conftest.er1 >conftest.err
17690 cat conftest.err >&5
17691 echo "$as_me:17691: \$? = $ac_status" >&5
17692 (exit $ac_status); } >/dev/null; then
17693 if test -s conftest.err; then
17694 ac_cpp_err=$ac_c_preproc_warn_flag
17701 if test -z "$ac_cpp_err"; then
17702 ac_cv_header_dmalloc_h=yes
17704 echo "$as_me: failed program was:" >&5
17705 cat conftest.$ac_ext >&5
17706 ac_cv_header_dmalloc_h=no
17708 rm -f conftest.err conftest.$ac_ext
17710 echo "$as_me:17710: result: $ac_cv_header_dmalloc_h" >&5
17711 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17712 if test $ac_cv_header_dmalloc_h = yes; then
17714 echo "$as_me:17714: checking for dmalloc_debug in -ldmalloc" >&5
17715 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17716 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17717 echo $ECHO_N "(cached) $ECHO_C" >&6
17719 ac_check_lib_save_LIBS=$LIBS
17720 LIBS="-ldmalloc $LIBS"
17721 cat >conftest.$ac_ext <<_ACEOF
17722 #line 17722 "configure"
17723 #include "confdefs.h"
17725 /* Override any gcc2 internal prototype to avoid an error. */
17729 /* We use char because int might match the return type of a gcc2
17730 builtin and then its argument prototype would still apply. */
17731 char dmalloc_debug ();
17740 rm -f conftest.$ac_objext conftest$ac_exeext
17741 if { (eval echo "$as_me:17741: \"$ac_link\"") >&5
17742 (eval $ac_link) 2>&5
17744 echo "$as_me:17744: \$? = $ac_status" >&5
17745 (exit $ac_status); } &&
17746 { ac_try='test -s conftest$ac_exeext'
17747 { (eval echo "$as_me:17747: \"$ac_try\"") >&5
17748 (eval $ac_try) 2>&5
17750 echo "$as_me:17750: \$? = $ac_status" >&5
17751 (exit $ac_status); }; }; then
17752 ac_cv_lib_dmalloc_dmalloc_debug=yes
17754 echo "$as_me: failed program was:" >&5
17755 cat conftest.$ac_ext >&5
17756 ac_cv_lib_dmalloc_dmalloc_debug=no
17758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17759 LIBS=$ac_check_lib_save_LIBS
17761 echo "$as_me:17761: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17762 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17763 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17764 cat >>confdefs.h <<EOF
17765 #define HAVE_LIBDMALLOC 1
17768 LIBS="-ldmalloc $LIBS"
17776 echo "$as_me:17776: checking if you want to use dbmalloc for testing" >&5
17777 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17779 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17780 if test "${with_dbmalloc+set}" = set; then
17781 withval="$with_dbmalloc"
17783 cat >>confdefs.h <<EOF
17784 #define USE_DBMALLOC 1
17787 : ${with_cflags:=-g}
17788 : ${with_no_leaks:=yes}
17793 echo "$as_me:17793: result: ${with_dbmalloc:-no}" >&5
17794 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17796 case .$with_cflags in
17806 cf_new_extra_cppflags=
17808 for cf_add_cflags in -g
17810 case $cf_fix_cppflags in
17812 case $cf_add_cflags in
17813 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17814 case $cf_add_cflags in
17816 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17818 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17819 && test -z "${cf_tst_cflags}" \
17820 && cf_fix_cppflags=yes
17822 if test $cf_fix_cppflags = yes ; then
17823 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17825 elif test "${cf_tst_cflags}" = "\"'" ; then
17826 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17831 case "$CPPFLAGS" in
17835 case $cf_add_cflags in
17837 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17839 CPPFLAGS=`echo "$CPPFLAGS" | \
17840 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17841 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17845 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17850 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17855 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17857 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17859 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17860 && test -z "${cf_tst_cflags}" \
17861 && cf_fix_cppflags=no
17866 if test -n "$cf_new_cflags" ; then
17868 CFLAGS="$CFLAGS $cf_new_cflags"
17871 if test -n "$cf_new_cppflags" ; then
17873 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17876 if test -n "$cf_new_extra_cppflags" ; then
17878 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17886 if test "$with_dbmalloc" = yes ; then
17887 echo "$as_me:17887: checking for dbmalloc.h" >&5
17888 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17889 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17890 echo $ECHO_N "(cached) $ECHO_C" >&6
17892 cat >conftest.$ac_ext <<_ACEOF
17893 #line 17893 "configure"
17894 #include "confdefs.h"
17895 #include <dbmalloc.h>
17897 if { (eval echo "$as_me:17897: \"$ac_cpp conftest.$ac_ext\"") >&5
17898 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17900 egrep -v '^ *\+' conftest.er1 >conftest.err
17902 cat conftest.err >&5
17903 echo "$as_me:17903: \$? = $ac_status" >&5
17904 (exit $ac_status); } >/dev/null; then
17905 if test -s conftest.err; then
17906 ac_cpp_err=$ac_c_preproc_warn_flag
17913 if test -z "$ac_cpp_err"; then
17914 ac_cv_header_dbmalloc_h=yes
17916 echo "$as_me: failed program was:" >&5
17917 cat conftest.$ac_ext >&5
17918 ac_cv_header_dbmalloc_h=no
17920 rm -f conftest.err conftest.$ac_ext
17922 echo "$as_me:17922: result: $ac_cv_header_dbmalloc_h" >&5
17923 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17924 if test $ac_cv_header_dbmalloc_h = yes; then
17926 echo "$as_me:17926: checking for debug_malloc in -ldbmalloc" >&5
17927 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17928 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17929 echo $ECHO_N "(cached) $ECHO_C" >&6
17931 ac_check_lib_save_LIBS=$LIBS
17932 LIBS="-ldbmalloc $LIBS"
17933 cat >conftest.$ac_ext <<_ACEOF
17934 #line 17934 "configure"
17935 #include "confdefs.h"
17937 /* Override any gcc2 internal prototype to avoid an error. */
17941 /* We use char because int might match the return type of a gcc2
17942 builtin and then its argument prototype would still apply. */
17943 char debug_malloc ();
17952 rm -f conftest.$ac_objext conftest$ac_exeext
17953 if { (eval echo "$as_me:17953: \"$ac_link\"") >&5
17954 (eval $ac_link) 2>&5
17956 echo "$as_me:17956: \$? = $ac_status" >&5
17957 (exit $ac_status); } &&
17958 { ac_try='test -s conftest$ac_exeext'
17959 { (eval echo "$as_me:17959: \"$ac_try\"") >&5
17960 (eval $ac_try) 2>&5
17962 echo "$as_me:17962: \$? = $ac_status" >&5
17963 (exit $ac_status); }; }; then
17964 ac_cv_lib_dbmalloc_debug_malloc=yes
17966 echo "$as_me: failed program was:" >&5
17967 cat conftest.$ac_ext >&5
17968 ac_cv_lib_dbmalloc_debug_malloc=no
17970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17971 LIBS=$ac_check_lib_save_LIBS
17973 echo "$as_me:17973: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17974 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17975 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17976 cat >>confdefs.h <<EOF
17977 #define HAVE_LIBDBMALLOC 1
17980 LIBS="-ldbmalloc $LIBS"
17988 echo "$as_me:17988: checking if you want to use valgrind for testing" >&5
17989 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17991 # Check whether --with-valgrind or --without-valgrind was given.
17992 if test "${with_valgrind+set}" = set; then
17993 withval="$with_valgrind"
17995 cat >>confdefs.h <<EOF
17996 #define USE_VALGRIND 1
17999 : ${with_cflags:=-g}
18000 : ${with_no_leaks:=yes}
18005 echo "$as_me:18005: result: ${with_valgrind:-no}" >&5
18006 echo "${ECHO_T}${with_valgrind:-no}" >&6
18008 case .$with_cflags in
18018 cf_new_extra_cppflags=
18020 for cf_add_cflags in -g
18022 case $cf_fix_cppflags in
18024 case $cf_add_cflags in
18025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18026 case $cf_add_cflags in
18028 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18031 && test -z "${cf_tst_cflags}" \
18032 && cf_fix_cppflags=yes
18034 if test $cf_fix_cppflags = yes ; then
18035 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18037 elif test "${cf_tst_cflags}" = "\"'" ; then
18038 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18043 case "$CPPFLAGS" in
18047 case $cf_add_cflags in
18049 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18051 CPPFLAGS=`echo "$CPPFLAGS" | \
18052 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18053 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18057 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18062 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18067 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18069 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18072 && test -z "${cf_tst_cflags}" \
18073 && cf_fix_cppflags=no
18078 if test -n "$cf_new_cflags" ; then
18080 CFLAGS="$CFLAGS $cf_new_cflags"
18083 if test -n "$cf_new_cppflags" ; then
18085 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18088 if test -n "$cf_new_extra_cppflags" ; then
18090 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18098 echo "$as_me:18098: checking if you want to perform memory-leak testing" >&5
18099 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18101 # Check whether --enable-leaks or --disable-leaks was given.
18102 if test "${enable_leaks+set}" = set; then
18103 enableval="$enable_leaks"
18104 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18106 : ${with_no_leaks:=no}
18108 echo "$as_me:18108: result: $with_no_leaks" >&5
18109 echo "${ECHO_T}$with_no_leaks" >&6
18111 if test "$with_no_leaks" = yes ; then
18113 cat >>confdefs.h <<\EOF
18117 cat >>confdefs.h <<\EOF
18118 #define YY_NO_LEAKS 1
18124 echo "$as_me:18124: checking for an rpath option" >&5
18125 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
18126 case $cf_cv_system_name in
18128 if test "$GCC" = yes; then
18129 LD_RPATH_OPT="-Wl,-rpath,"
18131 LD_RPATH_OPT="-rpath "
18134 (linux*|gnu*|k*bsd*-gnu|freebsd*)
18135 LD_RPATH_OPT="-Wl,-rpath,"
18137 (openbsd[2-9].*|mirbsd*)
18138 LD_RPATH_OPT="-Wl,-rpath,"
18141 LD_RPATH_OPT="-rpath "
18144 LD_RPATH_OPT="-Wl,-rpath,"
18147 LD_RPATH_OPT="-rpath "
18155 echo "$as_me:18155: result: $LD_RPATH_OPT" >&5
18156 echo "${ECHO_T}$LD_RPATH_OPT" >&6
18158 case "x$LD_RPATH_OPT" in
18160 echo "$as_me:18160: checking if we need a space after rpath option" >&5
18161 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
18162 cf_save_LIBS="$LIBS"
18164 cf_add_libs="${LD_RPATH_OPT}$libdir"
18165 # Filter out duplicates - this happens with badly-designed ".pc" files...
18166 for cf_add_1lib in $LIBS
18168 for cf_add_2lib in $cf_add_libs
18170 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18176 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18178 LIBS="$cf_add_libs"
18180 cat >conftest.$ac_ext <<_ACEOF
18181 #line 18181 "configure"
18182 #include "confdefs.h"
18192 rm -f conftest.$ac_objext conftest$ac_exeext
18193 if { (eval echo "$as_me:18193: \"$ac_link\"") >&5
18194 (eval $ac_link) 2>&5
18196 echo "$as_me:18196: \$? = $ac_status" >&5
18197 (exit $ac_status); } &&
18198 { ac_try='test -s conftest$ac_exeext'
18199 { (eval echo "$as_me:18199: \"$ac_try\"") >&5
18200 (eval $ac_try) 2>&5
18202 echo "$as_me:18202: \$? = $ac_status" >&5
18203 (exit $ac_status); }; }; then
18206 echo "$as_me: failed program was:" >&5
18207 cat conftest.$ac_ext >&5
18210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18211 LIBS="$cf_save_LIBS"
18212 echo "$as_me:18212: result: $cf_rpath_space" >&5
18213 echo "${ECHO_T}$cf_rpath_space" >&6
18214 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
18218 echo "$as_me:18218: checking if rpath-hack should be disabled" >&5
18219 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
18221 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18222 if test "${enable_rpath_hack+set}" = set; then
18223 enableval="$enable_rpath_hack"
18224 test "$enableval" != no && enableval=yes
18225 if test "$enableval" != "yes" ; then
18226 cf_disable_rpath_hack=yes
18228 cf_disable_rpath_hack=no
18232 cf_disable_rpath_hack=no
18235 echo "$as_me:18235: result: $cf_disable_rpath_hack" >&5
18236 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18237 if test "$cf_disable_rpath_hack" = no ; then
18239 echo "$as_me:18239: checking for updated LDFLAGS" >&5
18240 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18241 if test -n "$LD_RPATH_OPT" ; then
18242 echo "$as_me:18242: result: maybe" >&5
18243 echo "${ECHO_T}maybe" >&6
18247 # Extract the first word of "$ac_prog", so it can be a program name with args.
18248 set dummy $ac_prog; ac_word=$2
18249 echo "$as_me:18249: checking for $ac_word" >&5
18250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18251 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18252 echo $ECHO_N "(cached) $ECHO_C" >&6
18254 if test -n "$cf_ldd_prog"; then
18255 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18257 ac_save_IFS=$IFS; IFS=$ac_path_separator
18259 for ac_dir in $ac_dummy; do
18261 test -z "$ac_dir" && ac_dir=.
18262 $as_executable_p "$ac_dir/$ac_word" || continue
18263 ac_cv_prog_cf_ldd_prog="$ac_prog"
18264 echo "$as_me:18264: found $ac_dir/$ac_word" >&5
18270 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18271 if test -n "$cf_ldd_prog"; then
18272 echo "$as_me:18272: result: $cf_ldd_prog" >&5
18273 echo "${ECHO_T}$cf_ldd_prog" >&6
18275 echo "$as_me:18275: result: no" >&5
18276 echo "${ECHO_T}no" >&6
18279 test -n "$cf_ldd_prog" && break
18281 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18283 cf_rpath_list="/usr/lib /lib"
18284 if test "$cf_ldd_prog" != no
18288 cat >conftest.$ac_ext <<_ACEOF
18289 #line 18289 "configure"
18290 #include "confdefs.h"
18300 rm -f conftest.$ac_objext conftest$ac_exeext
18301 if { (eval echo "$as_me:18301: \"$ac_link\"") >&5
18302 (eval $ac_link) 2>&5
18304 echo "$as_me:18304: \$? = $ac_status" >&5
18305 (exit $ac_status); } &&
18306 { ac_try='test -s conftest$ac_exeext'
18307 { (eval echo "$as_me:18307: \"$ac_try\"") >&5
18308 (eval $ac_try) 2>&5
18310 echo "$as_me:18310: \$? = $ac_status" >&5
18311 (exit $ac_status); }; }; then
18312 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
18313 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
18315 echo "$as_me: failed program was:" >&5
18316 cat conftest.$ac_ext >&5
18318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18320 # If we passed the link-test, but get a "not found" on a given library,
18321 # this could be due to inept reconfiguration of gcc to make it only
18322 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
18323 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
18324 # /usr/local libraries.
18325 if test -n "$cf_rpath_oops"
18327 for cf_rpath_src in $cf_rpath_oops
18329 for cf_rpath_dir in \
18334 if test -f $cf_rpath_dir/lib/$cf_rpath_src
18336 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18338 echo "${as_me:-configure}:18338: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18340 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18348 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18350 echo "${as_me:-configure}:18350: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18352 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
18354 echo "${as_me:-configure}:18354: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18357 for cf_rpath_src in $LDFLAGS
18359 case $cf_rpath_src in
18362 # check if this refers to a directory which we will ignore
18364 if test -n "$cf_rpath_list"
18366 for cf_rpath_item in $cf_rpath_list
18368 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18376 if test "$cf_rpath_skip" = no
18378 # transform the option
18379 if test "$LD_RPATH_OPT" = "-R " ; then
18380 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18382 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18385 # if we have not already added this, add it now
18386 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18387 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18389 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18391 echo "${as_me:-configure}:18391: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18393 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18398 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18400 LDFLAGS=$cf_rpath_dst
18402 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
18404 echo "${as_me:-configure}:18404: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18406 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
18408 echo "${as_me:-configure}:18408: testing ...checking LIBS $LIBS ..." 1>&5
18411 for cf_rpath_src in $LIBS
18413 case $cf_rpath_src in
18416 # check if this refers to a directory which we will ignore
18418 if test -n "$cf_rpath_list"
18420 for cf_rpath_item in $cf_rpath_list
18422 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18430 if test "$cf_rpath_skip" = no
18432 # transform the option
18433 if test "$LD_RPATH_OPT" = "-R " ; then
18434 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18436 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18439 # if we have not already added this, add it now
18440 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18441 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18443 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18445 echo "${as_me:-configure}:18445: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18447 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18452 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18456 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
18458 echo "${as_me:-configure}:18458: testing ...checked LIBS $LIBS ..." 1>&5
18460 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18462 echo "${as_me:-configure}:18462: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18465 echo "$as_me:18465: result: no" >&5
18466 echo "${ECHO_T}no" >&6
18474 ac_config_files="$ac_config_files Makefile"
18475 ac_config_commands="$ac_config_commands default"
18476 cat >confcache <<\_ACEOF
18477 # This file is a shell script that caches the results of configure
18478 # tests run on this system so they can be shared between configure
18479 # scripts and configure runs, see configure's option --config-cache.
18480 # It is not useful on other systems. If it contains results you don't
18481 # want to keep, you may remove or edit it.
18483 # config.status only pays attention to the cache file if you give it
18484 # the --recheck option to rerun configure.
18486 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18487 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18488 # following values.
18492 # The following way of writing the cache mishandles newlines in values,
18493 # but we know of no workaround that is simple, portable, and efficient.
18494 # So, don't put newlines in cache variables' values.
18495 # Ultrix sh set writes to stderr and can't be redirected directly,
18496 # and sets the high bit in the cache file unless we assign to the vars.
18499 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18501 # `set' does not quote correctly, so add quotes (double-quote
18502 # substitution turns \\\\ into \\, and sed turns \\ into \).
18505 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18508 # `set' quotes correctly as required by POSIX, so do not add quotes.
18510 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18517 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18519 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18521 if cmp -s $cache_file confcache; then :; else
18522 if test -w $cache_file; then
18523 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18524 cat confcache >$cache_file
18526 echo "not updating unwritable cache $cache_file"
18531 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18532 # Let make expand exec_prefix.
18533 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18535 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18536 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18537 # trailing colons and then remove the whole line if VPATH becomes empty
18538 # (actually we leave an empty line to preserve line numbers).
18539 if test "x$srcdir" = x.; then
18540 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18541 s/:*\$(srcdir):*/:/;
18542 s/:*\${srcdir}:*/:/;
18544 s/^\([^=]*=[ ]*\):*/\1/;
18550 DEFS=-DHAVE_CONFIG_H
18552 : ${CONFIG_STATUS=./config.status}
18553 ac_clean_files_save=$ac_clean_files
18554 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18555 { echo "$as_me:18555: creating $CONFIG_STATUS" >&5
18556 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18557 cat >$CONFIG_STATUS <<_ACEOF
18559 # Generated automatically by configure.
18560 # Run this file to recreate the current configuration.
18561 # Compiler output produced by configure, useful for debugging
18562 # configure, is in config.log if it exists.
18565 SHELL=\${CONFIG_SHELL-$SHELL}
18566 ac_cs_invocation="\$0 \$@"
18570 cat >>$CONFIG_STATUS <<\_ACEOF
18571 # Be Bourne compatible
18572 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18575 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18579 # Name of the executable.
18580 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18582 if expr a : '\(a\)' >/dev/null 2>&1; then
18588 rm -f conf$$ conf$$.exe conf$$.file
18590 if ln -s conf$$.file conf$$ 2>/dev/null; then
18591 # We could just check for DJGPP; but this test a) works b) is more generic
18592 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18593 if test -f conf$$.exe; then
18594 # Don't use ln at all; we don't have any links
18599 elif ln conf$$.file conf$$ 2>/dev/null; then
18604 rm -f conf$$ conf$$.exe conf$$.file
18606 as_executable_p="test -f"
18608 # Support unset when possible.
18609 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18616 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18617 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18618 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18619 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18620 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18621 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18622 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18623 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18626 # We need space, tab and new line, in precisely that order.
18632 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18638 # Files that config.status was made for.
18639 if test -n "$ac_config_files"; then
18640 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18643 if test -n "$ac_config_headers"; then
18644 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18647 if test -n "$ac_config_links"; then
18648 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18651 if test -n "$ac_config_commands"; then
18652 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18655 cat >>$CONFIG_STATUS <<\EOF
18658 \`$as_me' instantiates files from templates according to the
18659 current configuration.
18661 Usage: $0 [OPTIONS] [FILE]...
18663 -h, --help print this help, then exit
18664 -V, --version print version number, then exit
18665 -d, --debug don't remove temporary files
18666 --recheck update $as_me by reconfiguring in the same conditions
18667 --file=FILE[:TEMPLATE]
18668 instantiate the configuration file FILE
18669 --header=FILE[:TEMPLATE]
18670 instantiate the configuration header FILE
18672 Configuration files:
18675 Configuration headers:
18678 Configuration commands:
18681 Report bugs to <dickey@invisible-island.net>."
18684 cat >>$CONFIG_STATUS <<EOF
18687 configured by $0, generated by GNU Autoconf 2.52.20150926,
18688 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18690 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18691 Free Software Foundation, Inc.
18692 This config.status script is free software; the Free Software Foundation
18693 gives unlimited permission to copy, distribute and modify it."
18698 cat >>$CONFIG_STATUS <<\EOF
18699 # If no file are specified by the user, then we need to provide default
18700 # value. By we need to know if files were specified by the user.
18706 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18707 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18709 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18713 *) # This is not an option, so the user has probably given explicit
18715 ac_need_defaults=false;;
18719 # Handling of the options.
18721 cat >>$CONFIG_STATUS <<EOF
18722 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18723 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18724 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18726 cat >>$CONFIG_STATUS <<\EOF
18727 --version | --vers* | -V )
18728 echo "$ac_cs_version"; exit 0 ;;
18730 # Conflict between --help and --header
18731 { { echo "$as_me:18731: error: ambiguous option: $1
18732 Try \`$0 --help' for more information." >&5
18733 echo "$as_me: error: ambiguous option: $1
18734 Try \`$0 --help' for more information." >&2;}
18735 { (exit 1); exit 1; }; };;
18736 --help | --hel | -h )
18737 echo "$ac_cs_usage"; exit 0 ;;
18738 --debug | --d* | -d )
18740 --file | --fil | --fi | --f )
18742 CONFIG_FILES="$CONFIG_FILES $1"
18743 ac_need_defaults=false;;
18744 --header | --heade | --head | --hea )
18746 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18747 ac_need_defaults=false;;
18749 # This is an error.
18750 -*) { { echo "$as_me:18750: error: unrecognized option: $1
18751 Try \`$0 --help' for more information." >&5
18752 echo "$as_me: error: unrecognized option: $1
18753 Try \`$0 --help' for more information." >&2;}
18754 { (exit 1); exit 1; }; } ;;
18756 *) ac_config_targets="$ac_config_targets $1" ;;
18765 ## ----------------------- ##
18766 ## Running config.status. ##
18767 ## ----------------------- ##
18769 This file was extended by $as_me 2.52.20150926, executed with
18770 CONFIG_FILES = $CONFIG_FILES
18771 CONFIG_HEADERS = $CONFIG_HEADERS
18772 CONFIG_LINKS = $CONFIG_LINKS
18773 CONFIG_COMMANDS = $CONFIG_COMMANDS
18774 > $ac_cs_invocation
18775 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18780 cat >>$CONFIG_STATUS <<EOF
18782 # INIT-COMMANDS section.
18792 cat >>$CONFIG_STATUS <<\EOF
18793 for ac_config_target in $ac_config_targets
18795 case "$ac_config_target" in
18796 # Handling of arguments.
18797 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18798 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18799 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
18800 *) { { echo "$as_me:18800: error: invalid argument: $ac_config_target" >&5
18801 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18802 { (exit 1); exit 1; }; };;
18806 # If the user did not use the arguments to specify the items to instantiate,
18807 # then the envvar interface is used. Set only those that are not.
18808 # We use the long form for the default assignment because of an extremely
18809 # bizarre bug on SunOS 4.1.3.
18810 if $ac_need_defaults; then
18811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18813 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18816 # Create a temporary directory, and hook for its removal unless debugging.
18819 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18820 trap '{ (exit 1); exit 1; }' 1 2 13 15
18823 # Create a (secure) tmp directory for tmp files.
18826 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18827 test -n "$tmp" && test -d "$tmp"
18830 tmp=$TMPDIR/cs$$-$RANDOM
18831 (umask 077 && mkdir $tmp)
18834 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18835 { (exit 1); exit 1; }
18840 cat >>$CONFIG_STATUS <<EOF
18843 # CONFIG_FILES section.
18846 # No need to generate the scripts if there are no CONFIG_FILES.
18847 # This happens for instance when ./config.status config.h
18848 if test -n "\$CONFIG_FILES"; then
18849 # Protect against being on the right side of a sed subst in config.status.
18850 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18851 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18852 s,@SHELL@,$SHELL,;t t
18853 s,@exec_prefix@,$exec_prefix,;t t
18854 s,@prefix@,$prefix,;t t
18855 s,@program_transform_name@,$program_transform_name,;t t
18856 s,@bindir@,$bindir,;t t
18857 s,@sbindir@,$sbindir,;t t
18858 s,@libexecdir@,$libexecdir,;t t
18859 s,@datarootdir@,$datarootdir,;t t
18860 s,@datadir@,$datadir,;t t
18861 s,@sysconfdir@,$sysconfdir,;t t
18862 s,@sharedstatedir@,$sharedstatedir,;t t
18863 s,@localstatedir@,$localstatedir,;t t
18864 s,@libdir@,$libdir,;t t
18865 s,@includedir@,$includedir,;t t
18866 s,@oldincludedir@,$oldincludedir,;t t
18867 s,@infodir@,$infodir,;t t
18868 s,@mandir@,$mandir,;t t
18869 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18870 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18871 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18872 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18873 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18874 s,@build_alias@,$build_alias,;t t
18875 s,@host_alias@,$host_alias,;t t
18876 s,@target_alias@,$target_alias,;t t
18877 s,@ECHO_C@,$ECHO_C,;t t
18878 s,@ECHO_N@,$ECHO_N,;t t
18879 s,@ECHO_T@,$ECHO_T,;t t
18880 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18881 s,@DEFS@,$DEFS,;t t
18882 s,@LIBS@,$LIBS,;t t
18883 s,@build@,$build,;t t
18884 s,@build_cpu@,$build_cpu,;t t
18885 s,@build_vendor@,$build_vendor,;t t
18886 s,@build_os@,$build_os,;t t
18887 s,@host@,$host,;t t
18888 s,@host_cpu@,$host_cpu,;t t
18889 s,@host_vendor@,$host_vendor,;t t
18890 s,@host_os@,$host_os,;t t
18891 s,@SET_MAKE@,$SET_MAKE,;t t
18893 s,@CFLAGS@,$CFLAGS,;t t
18894 s,@LDFLAGS@,$LDFLAGS,;t t
18895 s,@CPPFLAGS@,$CPPFLAGS,;t t
18896 s,@ac_ct_CC@,$ac_ct_CC,;t t
18897 s,@EXEEXT@,$EXEEXT,;t t
18898 s,@OBJEXT@,$OBJEXT,;t t
18899 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18902 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18903 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18904 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18905 s,@LINT@,$LINT,;t t
18906 s,@LINT_OPTS@,$LINT_OPTS,;t t
18907 s,@CTAGS@,$CTAGS,;t t
18908 s,@ETAGS@,$ETAGS,;t t
18909 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18910 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18911 s,@MATH_LIB@,$MATH_LIB,;t t
18912 s,@top_builddir@,$top_builddir,;t t
18913 s,@CC_G_OPT@,$CC_G_OPT,;t t
18914 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18915 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18916 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18917 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18919 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18920 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18921 s,@LD_MODEL@,$LD_MODEL,;t t
18922 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18923 s,@LIBTOOL@,$LIBTOOL,;t t
18924 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18925 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18926 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18927 s,@LIB_LINK@,$LIB_LINK,;t t
18928 s,@LINK_TESTS@,$LINK_TESTS,;t t
18929 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18930 s,@PACKAGE@,$PACKAGE,;t t
18931 s,@PTHREAD@,$PTHREAD,;t t
18932 s,@TEST_ARGS@,$TEST_ARGS,;t t
18933 s,@TEST_DEPS@,$TEST_DEPS,;t t
18934 s,@TEST_LIBS@,$TEST_LIBS,;t t
18935 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
18936 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18937 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18938 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18939 s,@includesubdir@,$includesubdir,;t t
18940 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18941 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18942 s,@ECHO_LT@,$ECHO_LT,;t t
18943 s,@ECHO_LD@,$ECHO_LD,;t t
18944 s,@RULE_CC@,$RULE_CC,;t t
18945 s,@SHOW_CC@,$SHOW_CC,;t t
18946 s,@ECHO_CC@,$ECHO_CC,;t t
18947 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18948 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18949 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18950 s,@X_CFLAGS@,$X_CFLAGS,;t t
18951 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18952 s,@X_LIBS@,$X_LIBS,;t t
18953 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18954 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
18955 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
18956 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18957 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
18958 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18963 cat >>$CONFIG_STATUS <<\EOF
18964 # Split the substitutions into bite-sized pieces for seds with
18965 # small command number limits, like on Digital OSF/1 and HP-UX.
18966 ac_max_sed_lines=48
18967 ac_sed_frag=1 # Number of current file.
18968 ac_beg=1 # First line for current file.
18969 ac_end=$ac_max_sed_lines # Line after last line for current file.
18972 while $ac_more_lines; do
18973 if test $ac_beg -gt 1; then
18974 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18976 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18978 if test ! -s $tmp/subs.frag; then
18979 ac_more_lines=false
18981 # The purpose of the label and of the branching condition is to
18982 # speed up the sed processing (if there are no `@' at all, there
18983 # is no need to browse any of the substitutions).
18984 # These are the two extra sed commands mentioned above.
18986 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18987 # It is possible to make a multiline substitution using escaped newlines.
18988 # Ensure that we do not split the substitution between script fragments.
18990 ac_END=`expr $ac_end + $ac_max_sed_lines`
18991 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18992 if test -s $tmp/subs.next; then
18993 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18994 if test ! -s $tmp/subs.edit; then
18995 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18996 if test ! -s $tmp/subs.edit; then
18997 if test $ac_beg -gt 1; then
18998 ac_end=`expr $ac_end - 1`
19005 if test -z "$ac_sed_cmds"; then
19006 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19008 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19010 ac_sed_frag=`expr $ac_sed_frag + 1`
19012 ac_end=`expr $ac_end + $ac_max_sed_lines`
19015 if test -z "$ac_sed_cmds"; then
19018 fi # test -n "$CONFIG_FILES"
19021 cat >>$CONFIG_STATUS <<\EOF
19022 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19023 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19025 - | *:- | *:-:* ) # input from stdin
19027 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19028 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19029 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19030 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19031 * ) ac_file_in=$ac_file.in ;;
19034 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19035 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19036 X"$ac_file" : 'X\(//\)[^/]' \| \
19037 X"$ac_file" : 'X\(//\)$' \| \
19038 X"$ac_file" : 'X\(/\)' \| \
19039 . : '\(.\)' 2>/dev/null ||
19041 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19042 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19043 /^X\(\/\/\)$/{ s//\1/; q; }
19044 /^X\(\/\).*/{ s//\1/; q; }
19046 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19047 { case "$ac_dir" in
19048 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19052 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19053 case $as_mkdir_dir in
19054 # Skip DOS drivespec
19055 ?:) as_incr_dir=$as_mkdir_dir ;;
19057 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19058 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19063 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19064 # A "../" for each directory in $ac_dir_suffix.
19065 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19067 ac_dir_suffix= ac_dots=
19072 if test -z "$ac_dots"; then
19075 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19077 [\\/]* | ?:[\\/]* )
19078 ac_srcdir=$srcdir$ac_dir_suffix;
19079 ac_top_srcdir=$srcdir ;;
19080 *) # Relative path.
19081 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19082 ac_top_srcdir=$ac_dots$srcdir ;;
19086 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19087 *) ac_INSTALL=$ac_dots$INSTALL ;;
19090 if test x"$ac_file" != x-; then
19091 { echo "$as_me:19091: creating $ac_file" >&5
19092 echo "$as_me: creating $ac_file" >&6;}
19095 # Let's still pretend it is `configure' which instantiates (i.e., don't
19096 # use $as_me), people would be surprised to read:
19097 # /* config.h. Generated automatically by config.status. */
19098 configure_input="Generated automatically from `echo $ac_file_in |
19099 sed 's,.*/,,'` by configure."
19101 # First look for the input files in the build tree, otherwise in the
19103 ac_file_inputs=`IFS=:
19104 for f in $ac_file_in; do
19106 -) echo $tmp/stdin ;;
19108 # Absolute (can't be DOS-style, as IFS=:)
19109 test -f "$f" || { { echo "$as_me:19109: error: cannot find input file: $f" >&5
19110 echo "$as_me: error: cannot find input file: $f" >&2;}
19111 { (exit 1); exit 1; }; }
19114 if test -f "$f"; then
19117 elif test -f "$srcdir/$f"; then
19122 { { echo "$as_me:19122: error: cannot find input file: $f" >&5
19123 echo "$as_me: error: cannot find input file: $f" >&2;}
19124 { (exit 1); exit 1; }; }
19127 done` || { (exit 1); exit 1; }
19129 cat >>$CONFIG_STATUS <<\EOF
19130 ac_warn_datarootdir=no
19131 if test x"$ac_file" != x-; then
19132 for ac_item in $ac_file_inputs
19134 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
19135 if test -n "$ac_seen"; then
19136 ac_used=`grep '@datarootdir@' $ac_item`
19137 if test -z "$ac_used"; then
19138 { echo "$as_me:19138: WARNING: datarootdir was used implicitly but not set:
19140 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19142 ac_warn_datarootdir=yes
19145 ac_seen=`grep '${datarootdir}' $ac_item`
19146 if test -n "$ac_seen"; then
19147 { echo "$as_me:19147: WARNING: datarootdir was used explicitly but not set:
19149 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19151 ac_warn_datarootdir=yes
19156 if test "x$ac_warn_datarootdir" = xyes; then
19157 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19161 cat >>$CONFIG_STATUS <<EOF
19165 cat >>$CONFIG_STATUS <<\EOF
19167 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19168 s,@configure_input@,$configure_input,;t t
19169 s,@srcdir@,$ac_srcdir,;t t
19170 s,@top_srcdir@,$ac_top_srcdir,;t t
19171 s,@INSTALL@,$ac_INSTALL,;t t
19172 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19174 if test x"$ac_file" != x-; then
19175 cp $tmp/out $ac_file
19177 for ac_name in prefix exec_prefix datarootdir
19179 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
19180 if test -n "$ac_seen"; then
19181 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
19182 if test -z "$ac_init"; then
19183 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19184 { echo "$as_me:19184: WARNING: Variable $ac_name is used but was not set:
19186 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19191 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
19192 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
19193 if test -s $tmp/out; then
19194 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19195 { echo "$as_me:19195: WARNING: Some variables may not be substituted:
19197 echo "$as_me: WARNING: Some variables may not be substituted:
19207 cat >>$CONFIG_STATUS <<\EOF
19210 # CONFIG_HEADER section.
19213 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19214 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19216 # ac_d sets the value in "#define NAME VALUE" lines.
19217 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19218 ac_dB='[ ].*$,\1#\2'
19221 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19222 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19223 ac_iB='\([ ]\),\1#\2define\3'
19226 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19227 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19228 ac_uB='$,\1#\2define\3'
19232 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19233 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19235 - | *:- | *:-:* ) # input from stdin
19237 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19238 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19239 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19240 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19241 * ) ac_file_in=$ac_file.in ;;
19244 test x"$ac_file" != x- && { echo "$as_me:19244: creating $ac_file" >&5
19245 echo "$as_me: creating $ac_file" >&6;}
19247 # First look for the input files in the build tree, otherwise in the
19249 ac_file_inputs=`IFS=:
19250 for f in $ac_file_in; do
19252 -) echo $tmp/stdin ;;
19254 # Absolute (can't be DOS-style, as IFS=:)
19255 test -f "$f" || { { echo "$as_me:19255: error: cannot find input file: $f" >&5
19256 echo "$as_me: error: cannot find input file: $f" >&2;}
19257 { (exit 1); exit 1; }; }
19260 if test -f "$f"; then
19263 elif test -f "$srcdir/$f"; then
19268 { { echo "$as_me:19268: error: cannot find input file: $f" >&5
19269 echo "$as_me: error: cannot find input file: $f" >&2;}
19270 { (exit 1); exit 1; }; }
19273 done` || { (exit 1); exit 1; }
19274 # Remove the trailing spaces.
19275 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19279 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19280 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19281 # be either 'cat' or 'sort'.
19282 cat confdefs.h | uniq >conftest.vals
19284 # Break up conftest.vals because some shells have a limit on
19285 # the size of here documents, and old seds have small limits too.
19287 rm -f conftest.tail
19288 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
19289 while grep . conftest.vals >/dev/null
19291 # Write chunks of a limited-size here document to conftest.frag.
19292 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19293 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19294 echo 'CEOF' >> $CONFIG_STATUS
19295 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19296 rm -f conftest.vals
19297 mv conftest.tail conftest.vals
19299 rm -f conftest.vals
19301 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19303 echo ' cat >> conftest.edit <<CEOF
19304 /@DEFS@/r conftest.frag
19307 sed -f conftest.edit $tmp/in > $tmp/out
19309 mv $tmp/out $tmp/in
19310 rm -f conftest.edit conftest.frag
19311 ' >> $CONFIG_STATUS
19313 cat >>$CONFIG_STATUS <<\EOF
19314 # Let's still pretend it is `configure' which instantiates (i.e., don't
19315 # use $as_me), people would be surprised to read:
19316 # /* config.h. Generated automatically by config.status. */
19317 if test x"$ac_file" = x-; then
19318 echo "/* Generated automatically by configure. */" >$tmp/config.h
19320 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19322 cat $tmp/in >>$tmp/config.h
19324 if test x"$ac_file" != x-; then
19325 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19326 { echo "$as_me:19326: $ac_file is unchanged" >&5
19327 echo "$as_me: $ac_file is unchanged" >&6;}
19329 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19330 X"$ac_file" : 'X\(//\)[^/]' \| \
19331 X"$ac_file" : 'X\(//\)$' \| \
19332 X"$ac_file" : 'X\(/\)' \| \
19333 . : '\(.\)' 2>/dev/null ||
19335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19336 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19337 /^X\(\/\/\)$/{ s//\1/; q; }
19338 /^X\(\/\).*/{ s//\1/; q; }
19340 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19341 { case "$ac_dir" in
19342 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19346 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19347 case $as_mkdir_dir in
19348 # Skip DOS drivespec
19349 ?:) as_incr_dir=$as_mkdir_dir ;;
19351 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19352 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19359 mv $tmp/config.h $ac_file
19363 rm -f $tmp/config.h
19367 cat >>$CONFIG_STATUS <<\EOF
19369 # CONFIG_COMMANDS section.
19371 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19372 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19373 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19380 if test ! -d $srcdir/$cf_dir; then
19382 elif test -f $srcdir/$cf_dir/programs; then
19383 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19387 cat >>Makefile <<TEST_EOF
19389 # These rules are generated so we do not rely on suffix rules, which do not
19390 # work consistently for different make-programs (the '\$(MODEL)/' confuses
19391 # some, and the '\$x' confuses others).
19394 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
19397 cat >>Makefile <<TEST_EOF
19399 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
19400 \$(srcdir)/test.priv.h \\
19403 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
19407 if test -f ../config.guess && test -f ../config.sub
19409 cat >>Makefile <<TEST_EOF
19411 # if we used CF_INHERIT for getting these files, we can remove them
19413 rm -f config.guess config.sub
19421 cat >>$CONFIG_STATUS <<\EOF
19423 { (exit 0); exit 0; }
19425 chmod +x $CONFIG_STATUS
19426 ac_clean_files=$ac_clean_files_save
19428 # configure is writing to config.log, and then calls config.status.
19429 # config.status does its own redirection, appending to config.log.
19430 # Unfortunately, on DOS this fails, as config.log is still kept open
19431 # by configure, so config.status won't be able to write to it; its
19432 # output is simply discarded. So we exec the FD to /dev/null,
19433 # effectively closing config.log, so it can be properly (re)opened and
19434 # appended to by config.status. When coming back to configure, we
19435 # need to make the FD available again.
19436 if test "$no_create" != yes; then
19439 $SHELL $CONFIG_STATUS || ac_cs_success=false
19441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19442 # would make configure fail if this is the last instruction.
19443 $ac_cs_success || { (exit 1); exit 1; }