2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20120310.
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 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
147 # Identity of this package.
157 # If the previous option needs an argument, assign it.
158 if test -n "$ac_prev"; then
159 eval "$ac_prev=\$ac_option"
164 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166 # Accept the important Cygnus configure options, so we can diagnose typos.
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175 -build | --build | --buil | --bui | --bu)
176 ac_prev=build_alias ;;
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build_alias=$ac_optarg ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file=$ac_optarg ;;
188 cache_file=config.cache ;;
190 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194 datadir=$ac_optarg ;;
196 -disable-* | --disable-*)
197 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198 # Reject names that are not valid shell variable names.
199 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201 { (exit 1); exit 1; }; }
202 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203 eval "enable_$ac_feature=no" ;;
205 -enable-* | --enable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
216 eval "enable_$ac_feature='$ac_optarg'" ;;
218 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220 | --exec | --exe | --ex)
221 ac_prev=exec_prefix ;;
222 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224 | --exec=* | --exe=* | --ex=*)
225 exec_prefix=$ac_optarg ;;
227 -gas | --gas | --ga | --g)
228 # Obsolete; use --with-gas.
231 -help | --help | --hel | --he | -h)
233 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234 ac_init_help=recursive ;;
235 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236 ac_init_help=short ;;
238 -host | --host | --hos | --ho)
239 ac_prev=host_alias ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host_alias=$ac_optarg ;;
243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir=$ac_optarg ;;
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir=$ac_optarg ;;
255 -libdir | --libdir | --libdi | --libd)
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir=$ac_optarg ;;
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir=$ac_optarg ;;
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
282 # Obsolete; use --without-fp.
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir=$ac_optarg ;;
302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix=$ac_optarg ;;
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix=$ac_optarg ;;
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
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 program_transform_name=$ac_optarg ;;
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346 sbindir=$ac_optarg ;;
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357 sharedstatedir=$ac_optarg ;;
359 -site | --site | --sit)
361 -site=* | --site=* | --sit=*)
364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374 sysconfdir=$ac_optarg ;;
376 -target | --target | --targe | --targ | --tar | --ta | --t)
377 ac_prev=target_alias ;;
378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379 target_alias=$ac_optarg ;;
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
384 -version | --version | --versio | --versi | --vers | -V)
388 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389 # Reject names that are not valid shell variable names.
390 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391 { echo "$as_me: error: invalid package name: $ac_package" >&2
392 { (exit 1); exit 1; }; }
393 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
398 eval "with_$ac_package='$ac_optarg'" ;;
400 -without-* | --without-*)
401 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402 # Reject names that are not valid shell variable names.
403 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404 { echo "$as_me: error: invalid package name: $ac_package" >&2
405 { (exit 1); exit 1; }; }
406 ac_package=`echo $ac_package | sed 's/-/_/g'`
407 eval "with_$ac_package=no" ;;
410 # Obsolete; use --with-x.
413 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414 | --x-incl | --x-inc | --x-in | --x-i)
415 ac_prev=x_includes ;;
416 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418 x_includes=$ac_optarg ;;
420 -x-libraries | --x-libraries | --x-librarie | --x-librari \
421 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422 ac_prev=x_libraries ;;
423 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425 x_libraries=$ac_optarg ;;
427 -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429 { (exit 1); exit 1; }; }
433 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434 # Reject names that are not valid shell variable names.
435 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437 { (exit 1); exit 1; }; }
438 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439 eval "$ac_envvar='$ac_optarg'"
443 # FIXME: should be removed in autoconf 3.0.
444 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
453 if test -n "$ac_prev"; then
454 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455 { echo "$as_me: error: missing argument to $ac_option" >&2
456 { (exit 1); exit 1; }; }
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
462 eval ac_val=$`echo $ac_var`
464 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466 { (exit 1); exit 1; }; };;
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472 localstatedir libdir includedir oldincludedir infodir mandir
474 eval ac_val=$`echo $ac_var`
476 [\\/$]* | ?:[\\/]* ) ;;
477 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478 { (exit 1); exit 1; }; };;
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490 if test "x$build_alias" = x; then
491 cross_compiling=maybe
492 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493 If a cross compiler is detected then cross compile mode will be used." >&2
494 elif test "x$build_alias" != "x$host_alias"; then
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502 test "$silent" = yes && exec 6>/dev/null
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506 ac_srcdir_defaulted=yes
507 # Try the directory containing this script, then its parent.
509 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 if test ! -r $srcdir/$ac_unique_file; then
516 ac_srcdir_defaulted=no
518 if test ! -r $srcdir/$ac_unique_file; then
519 if test "$ac_srcdir_defaulted" = yes; then
520 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521 { (exit 1); exit 1; }; }
523 { echo "$as_me: error: cannot find sources in $srcdir" >&2
524 { (exit 1); exit 1; }; }
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
562 # Report the --help message.
564 if test "$ac_init_help" = "long"; then
565 # Omit some internal or obsolete options to make the list less imposing.
566 # This message is too long to be a string in the A/UX 3.1 sh.
568 \`configure' configures this package to adapt to many kinds of systems.
570 Usage: $0 [OPTION]... [VAR=VALUE]...
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE. See below for descriptions of some of the useful variables.
575 Defaults for the options are specified in brackets.
578 -h, --help display this help and exit
579 --help=short display options specific to this package
580 --help=recursive display the short help of all the included packages
581 -V, --version display version information and exit
582 -q, --quiet, --silent do not print \`checking...' messages
583 --cache-file=FILE cache test results in FILE [disabled]
584 -C, --config-cache alias for \`--cache-file=config.cache'
585 -n, --no-create do not create output files
586 --srcdir=DIR find the sources in DIR [configure dir or \`..']
591 Installation directories:
592 --prefix=PREFIX install architecture-independent files in PREFIX
594 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
602 For better control, use the options below.
604 Fine tuning of the installation directories:
605 --bindir=DIR user executables [EPREFIX/bin]
606 --sbindir=DIR system admin executables [EPREFIX/sbin]
607 --libexecdir=DIR program executables [EPREFIX/libexec]
608 --datadir=DIR read-only architecture-independent data [PREFIX/share]
609 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
610 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
611 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
612 --libdir=DIR object code libraries [EPREFIX/lib]
613 --includedir=DIR C header files [PREFIX/include]
614 --oldincludedir=DIR C header files for non-gcc [/usr/include]
615 --infodir=DIR info documentation [PREFIX/info]
616 --mandir=DIR man documentation [PREFIX/man]
622 --program-prefix=PREFIX prepend PREFIX to installed program names
623 --program-suffix=SUFFIX append SUFFIX to installed program names
624 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
627 --x-includes=DIR X include files are in DIR
628 --x-libraries=DIR X library files are in DIR
631 --build=BUILD configure for building on BUILD [guessed]
632 --host=HOST build programs to run on HOST [BUILD]
636 if test -n "$ac_init_help"; then
641 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
642 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
645 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
646 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
648 --disable-echo display "compiling" commands
649 --enable-warnings test: turn on gcc compiler warnings
650 --with-dmalloc test: use Gray Watson's dmalloc library
651 --with-dbmalloc test: use Conor Cahill's dbmalloc library
652 --with-valgrind test: use valgrind
653 --disable-leaks test: free permanent memory, analyze leaks
654 --disable-widec disable checks for wide-character functions
655 --with-curses-dir=DIR directory in which (n)curses is installed
656 --with-ncursesw use wide ncurses-libraries
657 --with-ncurses use ncurses-libraries
658 --with-pdcurses compile/link with pdcurses X11 library
659 --with-curses-colr compile/link with HPUX 10.x color-curses
660 --with-curses-5lib compile/link with SunOS 5lib curses
661 --with-Xaw3d link with Xaw 3d library
662 --with-neXtaw link with neXT Athena library
663 --with-XawPlus link with Athena-Plus library
664 --with-pkg-config{=path} enable/disable use of pkg-config
665 --with-x use the X Window System
666 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667 --disable-rpath-hack don't add rpath options for additional libraries
669 Some influential environment variables:
670 CC C compiler command
671 CFLAGS C compiler flags
672 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
673 nonstandard directory <lib dir>
674 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
675 headers in a nonstandard directory <include dir>
678 Use these variables to override the choices made by `configure' or to help
679 it to find libraries and programs with nonstandard names/locations.
684 if test "$ac_init_help" = "recursive"; then
685 # If there are subdirs, report their specific --help.
687 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
689 # A "../" for each directory in /$ac_subdir.
690 ac_dots=`echo $ac_subdir |
691 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
694 .) # No --srcdir option. We are building in place.
695 ac_sub_srcdir=$srcdir ;;
696 [\\/]* | ?:[\\/]* ) # Absolute path.
697 ac_sub_srcdir=$srcdir/$ac_subdir ;;
699 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
702 # Check for guested configure; otherwise get Cygnus style configure.
703 if test -f $ac_sub_srcdir/configure.gnu; then
705 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
706 elif test -f $ac_sub_srcdir/configure; then
708 $SHELL $ac_sub_srcdir/configure --help=recursive
709 elif test -f $ac_sub_srcdir/configure.ac ||
710 test -f $ac_sub_srcdir/configure.in; then
714 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
720 test -n "$ac_init_help" && exit 0
721 if $ac_init_version; then
724 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
725 Free Software Foundation, Inc.
726 This configure script is free software; the Free Software Foundation
727 gives unlimited permission to copy, distribute and modify it.
733 This file contains any messages produced by compilers while
734 running configure, to aid debugging if configure makes a mistake.
736 It was created by $as_me, which was
737 generated by GNU Autoconf 2.52.20120310. Invocation command line was
748 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
749 uname -m = `(uname -m) 2>/dev/null || echo unknown`
750 uname -r = `(uname -r) 2>/dev/null || echo unknown`
751 uname -s = `(uname -s) 2>/dev/null || echo unknown`
752 uname -v = `(uname -v) 2>/dev/null || echo unknown`
754 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
755 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
757 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
758 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
759 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
760 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
761 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
762 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
763 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
777 # Keep a trace of the command line.
778 # Strip out --no-create and --no-recursion so they do not pile up.
779 # Also quote any args containing shell meta-characters.
785 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
786 | --no-cr | --no-c) ;;
787 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
788 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
789 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
790 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
791 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
793 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
796 # Get rid of the leading space.
799 # When interrupted or exit'd, cleanup temporary files, and complete
800 # config.log. We remove comments because anyway the quotes in there
801 # would cause problems or look ugly.
803 # Save into config.log some information that might help in debugging.
805 echo "## ----------------- ##" >&5
806 echo "## Cache variables. ##" >&5
807 echo "## ----------------- ##" >&5
809 # The following way of writing the cache mishandles newlines in values,
812 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
815 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
816 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
820 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
824 sed "/^$/d" confdefs.h >conftest.log
825 if test -s conftest.log; then
827 echo "## ------------ ##" >&5
828 echo "## confdefs.h. ##" >&5
829 echo "## ------------ ##" >&5
834 test "$ac_signal" != 0 &&
835 echo "$as_me: caught signal $ac_signal" >&5
836 echo "$as_me: exit $exit_status" >&5
837 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
840 for ac_signal in 1 2 13 15; do
841 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
845 # confdefs.h avoids OS command line length limits that DEFS can exceed.
846 rm -rf conftest* confdefs.h
847 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
850 # Let the site file select an alternate cache file if it wants to.
851 # Prefer explicitly selected file to automatically selected ones.
852 if test -z "$CONFIG_SITE"; then
853 if test "x$prefix" != xNONE; then
854 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
856 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
859 for ac_site_file in $CONFIG_SITE; do
860 if test -r "$ac_site_file"; then
861 { echo "$as_me:861: loading site script $ac_site_file" >&5
862 echo "$as_me: loading site script $ac_site_file" >&6;}
863 cat "$ac_site_file" >&5
868 if test -r "$cache_file"; then
869 # Some versions of bash will fail to source /dev/null (special
870 # files actually), so we avoid doing that.
871 if test -f "$cache_file"; then
872 { echo "$as_me:872: loading cache $cache_file" >&5
873 echo "$as_me: loading cache $cache_file" >&6;}
875 [\\/]* | ?:[\\/]* ) . $cache_file;;
880 { echo "$as_me:880: creating cache $cache_file" >&5
881 echo "$as_me: creating cache $cache_file" >&6;}
885 # Check that the precious variables saved in the cache have kept the same
887 ac_cache_corrupted=false
888 for ac_var in `(set) 2>&1 |
889 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
890 eval ac_old_set=\$ac_cv_env_${ac_var}_set
891 eval ac_new_set=\$ac_env_${ac_var}_set
892 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
893 eval ac_new_val="\$ac_env_${ac_var}_value"
894 case $ac_old_set,$ac_new_set in
896 { echo "$as_me:896: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
897 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
898 ac_cache_corrupted=: ;;
900 { echo "$as_me:900: error: \`$ac_var' was not set in the previous run" >&5
901 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
902 ac_cache_corrupted=: ;;
905 if test "x$ac_old_val" != "x$ac_new_val"; then
906 { echo "$as_me:906: error: \`$ac_var' has changed since the previous run:" >&5
907 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
908 { echo "$as_me:908: former value: $ac_old_val" >&5
909 echo "$as_me: former value: $ac_old_val" >&2;}
910 { echo "$as_me:910: current value: $ac_new_val" >&5
911 echo "$as_me: current value: $ac_new_val" >&2;}
915 # Pass precious variables to config.status. It doesn't matter if
916 # we pass some twice (in addition to the command line arguments).
917 if test "$ac_new_set" = set; then
919 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
920 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
921 ac_configure_args="$ac_configure_args '$ac_arg'"
923 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
928 if $ac_cache_corrupted; then
929 { echo "$as_me:929: error: changes in the environment can compromise the build" >&5
930 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
931 { { echo "$as_me:931: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
932 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
933 { (exit 1); exit 1; }; }
937 ac_cpp='$CPP $CPPFLAGS'
938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
941 ac_main_return=return
943 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
944 *c*,-n*) ECHO_N= ECHO_C='
946 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
947 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
949 echo "#! $SHELL" >conftest.sh
950 echo "exit 0" >>conftest.sh
952 if { (echo "$as_me:952: PATH=\".;.\"; conftest.sh") >&5
953 (PATH=".;."; conftest.sh) 2>&5
955 echo "$as_me:955: \$? = $ac_status" >&5
956 (exit $ac_status); }; then
957 ac_path_separator=';'
961 PATH_SEPARATOR="$ac_path_separator"
964 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
966 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
968 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
971 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
972 if test -f $ac_dir/install-sh; then
974 ac_install_sh="$ac_aux_dir/install-sh -c"
976 elif test -f $ac_dir/install.sh; then
978 ac_install_sh="$ac_aux_dir/install.sh -c"
980 elif test -f $ac_dir/shtool; then
982 ac_install_sh="$ac_aux_dir/shtool install -c"
986 if test -z "$ac_aux_dir"; then
987 { { echo "$as_me:987: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
988 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
989 { (exit 1); exit 1; }; }
991 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
992 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
993 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
995 # Make sure we can run config.sub.
996 $ac_config_sub sun4 >/dev/null 2>&1 ||
997 { { echo "$as_me:997: error: cannot run $ac_config_sub" >&5
998 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
999 { (exit 1); exit 1; }; }
1001 echo "$as_me:1001: checking build system type" >&5
1002 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1003 if test "${ac_cv_build+set}" = set; then
1004 echo $ECHO_N "(cached) $ECHO_C" >&6
1006 ac_cv_build_alias=$build_alias
1007 test -z "$ac_cv_build_alias" &&
1008 ac_cv_build_alias=`$ac_config_guess`
1009 test -z "$ac_cv_build_alias" &&
1010 { { echo "$as_me:1010: error: cannot guess build type; you must specify one" >&5
1011 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1012 { (exit 1); exit 1; }; }
1013 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1014 { { echo "$as_me:1014: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1015 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1016 { (exit 1); exit 1; }; }
1019 echo "$as_me:1019: result: $ac_cv_build" >&5
1020 echo "${ECHO_T}$ac_cv_build" >&6
1022 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1023 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1024 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1026 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1027 echo "$as_me:1027: checking host system type" >&5
1028 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1029 if test "${ac_cv_host+set}" = set; then
1030 echo $ECHO_N "(cached) $ECHO_C" >&6
1032 ac_cv_host_alias=$host_alias
1033 test -z "$ac_cv_host_alias" &&
1034 ac_cv_host_alias=$ac_cv_build_alias
1035 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1036 { { echo "$as_me:1036: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1037 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1038 { (exit 1); exit 1; }; }
1041 echo "$as_me:1041: result: $ac_cv_host" >&5
1042 echo "${ECHO_T}$ac_cv_host" >&6
1044 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1045 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1046 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1048 system_name="$host_os"
1050 system_name="`(uname -s -r) 2>/dev/null`"
1051 if test -z "$system_name" ; then
1052 system_name="`(hostname) 2>/dev/null`"
1055 test -n "$system_name" && cat >>confdefs.h <<EOF
1056 #define SYSTEM_NAME "$system_name"
1059 if test "${cf_cv_system_name+set}" = set; then
1060 echo $ECHO_N "(cached) $ECHO_C" >&6
1062 cf_cv_system_name="$system_name"
1065 test -z "$system_name" && system_name="$cf_cv_system_name"
1066 test -n "$cf_cv_system_name" && echo "$as_me:1066: result: Configuring for $cf_cv_system_name" >&5
1067 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1069 if test ".$system_name" != ".$cf_cv_system_name" ; then
1070 echo "$as_me:1070: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1071 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1072 { { echo "$as_me:1072: error: \"Please remove config.cache and try again.\"" >&5
1073 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1074 { (exit 1); exit 1; }; }
1077 test "$program_prefix" != NONE &&
1078 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1079 # Use a double $ so make ignores it.
1080 test "$program_suffix" != NONE &&
1081 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1082 # Double any \ or $. echo might interpret backslashes.
1083 # By default was `s,x,x', remove it if useless.
1084 cat <<\_ACEOF >conftest.sed
1085 s/[\\$]/&&/g;s/;s,x,x,$//
1087 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1090 echo "$as_me:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5
1091 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1092 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1093 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1094 echo $ECHO_N "(cached) $ECHO_C" >&6
1096 cat >conftest.make <<\EOF
1098 @echo 'ac_maketemp="${MAKE}"'
1100 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1101 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1102 if test -n "$ac_maketemp"; then
1103 eval ac_cv_prog_make_${ac_make}_set=yes
1105 eval ac_cv_prog_make_${ac_make}_set=no
1109 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1110 echo "$as_me:1110: result: yes" >&5
1111 echo "${ECHO_T}yes" >&6
1114 echo "$as_me:1114: result: no" >&5
1115 echo "${ECHO_T}no" >&6
1116 SET_MAKE="MAKE=${MAKE-make}"
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125 if test -n "$ac_tool_prefix"; then
1126 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1127 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1128 echo "$as_me:1128: checking for $ac_word" >&5
1129 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1130 if test "${ac_cv_prog_CC+set}" = set; then
1131 echo $ECHO_N "(cached) $ECHO_C" >&6
1133 if test -n "$CC"; then
1134 ac_cv_prog_CC="$CC" # Let the user override the test.
1136 ac_save_IFS=$IFS; IFS=$ac_path_separator
1138 for ac_dir in $ac_dummy; do
1140 test -z "$ac_dir" && ac_dir=.
1141 $as_executable_p "$ac_dir/$ac_word" || continue
1142 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1143 echo "$as_me:1143: found $ac_dir/$ac_word" >&5
1150 if test -n "$CC"; then
1151 echo "$as_me:1151: result: $CC" >&5
1152 echo "${ECHO_T}$CC" >&6
1154 echo "$as_me:1154: result: no" >&5
1155 echo "${ECHO_T}no" >&6
1159 if test -z "$ac_cv_prog_CC"; then
1161 # Extract the first word of "gcc", so it can be a program name with args.
1162 set dummy gcc; ac_word=$2
1163 echo "$as_me:1163: checking for $ac_word" >&5
1164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1165 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1166 echo $ECHO_N "(cached) $ECHO_C" >&6
1168 if test -n "$ac_ct_CC"; then
1169 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1171 ac_save_IFS=$IFS; IFS=$ac_path_separator
1173 for ac_dir in $ac_dummy; do
1175 test -z "$ac_dir" && ac_dir=.
1176 $as_executable_p "$ac_dir/$ac_word" || continue
1177 ac_cv_prog_ac_ct_CC="gcc"
1178 echo "$as_me:1178: found $ac_dir/$ac_word" >&5
1184 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1185 if test -n "$ac_ct_CC"; then
1186 echo "$as_me:1186: result: $ac_ct_CC" >&5
1187 echo "${ECHO_T}$ac_ct_CC" >&6
1189 echo "$as_me:1189: result: no" >&5
1190 echo "${ECHO_T}no" >&6
1198 if test -z "$CC"; then
1199 if test -n "$ac_tool_prefix"; then
1200 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1201 set dummy ${ac_tool_prefix}cc; ac_word=$2
1202 echo "$as_me:1202: checking for $ac_word" >&5
1203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1204 if test "${ac_cv_prog_CC+set}" = set; then
1205 echo $ECHO_N "(cached) $ECHO_C" >&6
1207 if test -n "$CC"; then
1208 ac_cv_prog_CC="$CC" # Let the user override the test.
1210 ac_save_IFS=$IFS; IFS=$ac_path_separator
1212 for ac_dir in $ac_dummy; do
1214 test -z "$ac_dir" && ac_dir=.
1215 $as_executable_p "$ac_dir/$ac_word" || continue
1216 ac_cv_prog_CC="${ac_tool_prefix}cc"
1217 echo "$as_me:1217: found $ac_dir/$ac_word" >&5
1224 if test -n "$CC"; then
1225 echo "$as_me:1225: result: $CC" >&5
1226 echo "${ECHO_T}$CC" >&6
1228 echo "$as_me:1228: result: no" >&5
1229 echo "${ECHO_T}no" >&6
1233 if test -z "$ac_cv_prog_CC"; then
1235 # Extract the first word of "cc", so it can be a program name with args.
1236 set dummy cc; ac_word=$2
1237 echo "$as_me:1237: checking for $ac_word" >&5
1238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1239 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1240 echo $ECHO_N "(cached) $ECHO_C" >&6
1242 if test -n "$ac_ct_CC"; then
1243 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1245 ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 for ac_dir in $ac_dummy; do
1249 test -z "$ac_dir" && ac_dir=.
1250 $as_executable_p "$ac_dir/$ac_word" || continue
1251 ac_cv_prog_ac_ct_CC="cc"
1252 echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1258 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1259 if test -n "$ac_ct_CC"; then
1260 echo "$as_me:1260: result: $ac_ct_CC" >&5
1261 echo "${ECHO_T}$ac_ct_CC" >&6
1263 echo "$as_me:1263: result: no" >&5
1264 echo "${ECHO_T}no" >&6
1273 if test -z "$CC"; then
1274 # Extract the first word of "cc", so it can be a program name with args.
1275 set dummy cc; ac_word=$2
1276 echo "$as_me:1276: checking for $ac_word" >&5
1277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1278 if test "${ac_cv_prog_CC+set}" = set; then
1279 echo $ECHO_N "(cached) $ECHO_C" >&6
1281 if test -n "$CC"; then
1282 ac_cv_prog_CC="$CC" # Let the user override the test.
1285 ac_save_IFS=$IFS; IFS=$ac_path_separator
1287 for ac_dir in $ac_dummy; do
1289 test -z "$ac_dir" && ac_dir=.
1290 $as_executable_p "$ac_dir/$ac_word" || continue
1291 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1292 ac_prog_rejected=yes
1296 echo "$as_me:1296: found $ac_dir/$ac_word" >&5
1300 if test $ac_prog_rejected = yes; then
1301 # We found a bogon in the path, so make sure we never use it.
1302 set dummy $ac_cv_prog_CC
1304 if test $# != 0; then
1305 # We chose a different compiler from the bogus one.
1306 # However, it has the same basename, so the bogon will be chosen
1307 # first if we set CC to just the basename; use the full file name.
1309 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1317 if test -n "$CC"; then
1318 echo "$as_me:1318: result: $CC" >&5
1319 echo "${ECHO_T}$CC" >&6
1321 echo "$as_me:1321: result: no" >&5
1322 echo "${ECHO_T}no" >&6
1326 if test -z "$CC"; then
1327 if test -n "$ac_tool_prefix"; then
1330 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1331 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1332 echo "$as_me:1332: checking for $ac_word" >&5
1333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1334 if test "${ac_cv_prog_CC+set}" = set; then
1335 echo $ECHO_N "(cached) $ECHO_C" >&6
1337 if test -n "$CC"; then
1338 ac_cv_prog_CC="$CC" # Let the user override the test.
1340 ac_save_IFS=$IFS; IFS=$ac_path_separator
1342 for ac_dir in $ac_dummy; do
1344 test -z "$ac_dir" && ac_dir=.
1345 $as_executable_p "$ac_dir/$ac_word" || continue
1346 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1347 echo "$as_me:1347: found $ac_dir/$ac_word" >&5
1354 if test -n "$CC"; then
1355 echo "$as_me:1355: result: $CC" >&5
1356 echo "${ECHO_T}$CC" >&6
1358 echo "$as_me:1358: result: no" >&5
1359 echo "${ECHO_T}no" >&6
1362 test -n "$CC" && break
1365 if test -z "$CC"; then
1369 # Extract the first word of "$ac_prog", so it can be a program name with args.
1370 set dummy $ac_prog; ac_word=$2
1371 echo "$as_me:1371: checking for $ac_word" >&5
1372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1373 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1374 echo $ECHO_N "(cached) $ECHO_C" >&6
1376 if test -n "$ac_ct_CC"; then
1377 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1379 ac_save_IFS=$IFS; IFS=$ac_path_separator
1381 for ac_dir in $ac_dummy; do
1383 test -z "$ac_dir" && ac_dir=.
1384 $as_executable_p "$ac_dir/$ac_word" || continue
1385 ac_cv_prog_ac_ct_CC="$ac_prog"
1386 echo "$as_me:1386: found $ac_dir/$ac_word" >&5
1392 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1393 if test -n "$ac_ct_CC"; then
1394 echo "$as_me:1394: result: $ac_ct_CC" >&5
1395 echo "${ECHO_T}$ac_ct_CC" >&6
1397 echo "$as_me:1397: result: no" >&5
1398 echo "${ECHO_T}no" >&6
1401 test -n "$ac_ct_CC" && break
1409 test -z "$CC" && { { echo "$as_me:1409: error: no acceptable cc found in \$PATH" >&5
1410 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1411 { (exit 1); exit 1; }; }
1413 # Provide some information about the compiler.
1414 echo "$as_me:1414:" \
1415 "checking for C compiler version" >&5
1416 ac_compiler=`set X $ac_compile; echo $2`
1417 { (eval echo "$as_me:1417: \"$ac_compiler --version </dev/null >&5\"") >&5
1418 (eval $ac_compiler --version </dev/null >&5) 2>&5
1420 echo "$as_me:1420: \$? = $ac_status" >&5
1421 (exit $ac_status); }
1422 { (eval echo "$as_me:1422: \"$ac_compiler -v </dev/null >&5\"") >&5
1423 (eval $ac_compiler -v </dev/null >&5) 2>&5
1425 echo "$as_me:1425: \$? = $ac_status" >&5
1426 (exit $ac_status); }
1427 { (eval echo "$as_me:1427: \"$ac_compiler -V </dev/null >&5\"") >&5
1428 (eval $ac_compiler -V </dev/null >&5) 2>&5
1430 echo "$as_me:1430: \$? = $ac_status" >&5
1431 (exit $ac_status); }
1433 cat >conftest.$ac_ext <<_ACEOF
1434 #line 1434 "configure"
1435 #include "confdefs.h"
1445 ac_clean_files_save=$ac_clean_files
1446 ac_clean_files="$ac_clean_files a.out a.exe"
1447 # Try to create an executable without -o first, disregard a.out.
1448 # It will help us diagnose broken compilers, and finding out an intuition
1450 echo "$as_me:1450: checking for C compiler default output" >&5
1451 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1452 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1453 if { (eval echo "$as_me:1453: \"$ac_link_default\"") >&5
1454 (eval $ac_link_default) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit $ac_status); }; then
1458 # Find the output, starting from the most likely. This scheme is
1459 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1461 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1462 ls a.out conftest 2>/dev/null;
1463 ls a.* conftest.* 2>/dev/null`; do
1465 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1466 a.out ) # We found the default executable, but exeext='' is most
1469 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1477 echo "$as_me: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
1479 { { echo "$as_me:1479: error: C compiler cannot create executables" >&5
1480 echo "$as_me: error: C compiler cannot create executables" >&2;}
1481 { (exit 77); exit 77; }; }
1484 ac_exeext=$ac_cv_exeext
1485 echo "$as_me:1485: result: $ac_file" >&5
1486 echo "${ECHO_T}$ac_file" >&6
1488 # Check the compiler produces executables we can run. If not, either
1489 # the compiler is broken, or we cross compile.
1490 echo "$as_me:1490: checking whether the C compiler works" >&5
1491 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1492 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1493 # If not cross compiling, check that we can run a simple program.
1494 if test "$cross_compiling" != yes; then
1495 if { ac_try='./$ac_file'
1496 { (eval echo "$as_me:1496: \"$ac_try\"") >&5
1499 echo "$as_me:1499: \$? = $ac_status" >&5
1500 (exit $ac_status); }; }; then
1503 if test "$cross_compiling" = maybe; then
1506 { { echo "$as_me:1506: error: cannot run C compiled programs.
1507 If you meant to cross compile, use \`--host'." >&5
1508 echo "$as_me: error: cannot run C compiled programs.
1509 If you meant to cross compile, use \`--host'." >&2;}
1510 { (exit 1); exit 1; }; }
1514 echo "$as_me:1514: result: yes" >&5
1515 echo "${ECHO_T}yes" >&6
1517 rm -f a.out a.exe conftest$ac_cv_exeext
1518 ac_clean_files=$ac_clean_files_save
1519 # Check the compiler produces executables we can run. If not, either
1520 # the compiler is broken, or we cross compile.
1521 echo "$as_me:1521: checking whether we are cross compiling" >&5
1522 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1523 echo "$as_me:1523: result: $cross_compiling" >&5
1524 echo "${ECHO_T}$cross_compiling" >&6
1526 echo "$as_me:1526: checking for executable suffix" >&5
1527 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1528 if { (eval echo "$as_me:1528: \"$ac_link\"") >&5
1529 (eval $ac_link) 2>&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; then
1533 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1534 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1535 # work properly (i.e., refer to `conftest.exe'), while it won't with
1537 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1539 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1540 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1547 { { echo "$as_me:1547: error: cannot compute EXEEXT: cannot compile and link" >&5
1548 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1549 { (exit 1); exit 1; }; }
1552 rm -f conftest$ac_cv_exeext
1553 echo "$as_me:1553: result: $ac_cv_exeext" >&5
1554 echo "${ECHO_T}$ac_cv_exeext" >&6
1556 rm -f conftest.$ac_ext
1557 EXEEXT=$ac_cv_exeext
1559 echo "$as_me:1559: checking for object suffix" >&5
1560 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1561 if test "${ac_cv_objext+set}" = set; then
1562 echo $ECHO_N "(cached) $ECHO_C" >&6
1564 cat >conftest.$ac_ext <<_ACEOF
1565 #line 1565 "configure"
1566 #include "confdefs.h"
1576 rm -f conftest.o conftest.obj
1577 if { (eval echo "$as_me:1577: \"$ac_compile\"") >&5
1578 (eval $ac_compile) 2>&5
1580 echo "$as_me:1580: \$? = $ac_status" >&5
1581 (exit $ac_status); }; then
1582 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1584 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1585 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1590 echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: cannot compute OBJEXT: cannot compile" >&5
1593 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1594 { (exit 1); exit 1; }; }
1597 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1599 echo "$as_me:1599: result: $ac_cv_objext" >&5
1600 echo "${ECHO_T}$ac_cv_objext" >&6
1601 OBJEXT=$ac_cv_objext
1603 echo "$as_me:1603: checking whether we are using the GNU C compiler" >&5
1604 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1605 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1606 echo $ECHO_N "(cached) $ECHO_C" >&6
1608 cat >conftest.$ac_ext <<_ACEOF
1609 #line 1609 "configure"
1610 #include "confdefs.h"
1623 rm -f conftest.$ac_objext
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit $ac_status); } &&
1629 { ac_try='test -s conftest.$ac_objext'
1630 { (eval echo "$as_me:1630: \"$ac_try\"") >&5
1633 echo "$as_me:1633: \$? = $ac_status" >&5
1634 (exit $ac_status); }; }; then
1637 echo "$as_me: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1641 rm -f conftest.$ac_objext conftest.$ac_ext
1642 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1645 echo "$as_me:1645: result: $ac_cv_c_compiler_gnu" >&5
1646 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1647 GCC=`test $ac_compiler_gnu = yes && echo yes`
1648 ac_test_CFLAGS=${CFLAGS+set}
1649 ac_save_CFLAGS=$CFLAGS
1651 echo "$as_me:1651: checking whether $CC accepts -g" >&5
1652 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1653 if test "${ac_cv_prog_cc_g+set}" = set; then
1654 echo $ECHO_N "(cached) $ECHO_C" >&6
1656 cat >conftest.$ac_ext <<_ACEOF
1657 #line 1657 "configure"
1658 #include "confdefs.h"
1668 rm -f conftest.$ac_objext
1669 if { (eval echo "$as_me:1669: \"$ac_compile\"") >&5
1670 (eval $ac_compile) 2>&5
1672 echo "$as_me:1672: \$? = $ac_status" >&5
1673 (exit $ac_status); } &&
1674 { ac_try='test -s conftest.$ac_objext'
1675 { (eval echo "$as_me:1675: \"$ac_try\"") >&5
1678 echo "$as_me:1678: \$? = $ac_status" >&5
1679 (exit $ac_status); }; }; then
1682 echo "$as_me: failed program was:" >&5
1683 cat conftest.$ac_ext >&5
1686 rm -f conftest.$ac_objext conftest.$ac_ext
1688 echo "$as_me:1688: result: $ac_cv_prog_cc_g" >&5
1689 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1690 if test "$ac_test_CFLAGS" = set; then
1691 CFLAGS=$ac_save_CFLAGS
1692 elif test $ac_cv_prog_cc_g = yes; then
1693 if test "$GCC" = yes; then
1699 if test "$GCC" = yes; then
1705 # Some people use a C++ compiler to compile C. Since we use `exit',
1706 # in C++ we need to declare it. In case someone uses the same compiler
1707 # for both compiling C and C++ we need to have the C++ compiler decide
1708 # the declaration of exit, since it's the most demanding environment.
1709 cat >conftest.$ac_ext <<_ACEOF
1714 rm -f conftest.$ac_objext
1715 if { (eval echo "$as_me:1715: \"$ac_compile\"") >&5
1716 (eval $ac_compile) 2>&5
1718 echo "$as_me:1718: \$? = $ac_status" >&5
1719 (exit $ac_status); } &&
1720 { ac_try='test -s conftest.$ac_objext'
1721 { (eval echo "$as_me:1721: \"$ac_try\"") >&5
1724 echo "$as_me:1724: \$? = $ac_status" >&5
1725 (exit $ac_status); }; }; then
1726 for ac_declaration in \
1728 '#include <stdlib.h>' \
1729 'extern "C" void std::exit (int) throw (); using std::exit;' \
1730 'extern "C" void std::exit (int); using std::exit;' \
1731 'extern "C" void exit (int) throw ();' \
1732 'extern "C" void exit (int);' \
1735 cat >conftest.$ac_ext <<_ACEOF
1736 #line 1736 "configure"
1737 #include "confdefs.h"
1748 rm -f conftest.$ac_objext
1749 if { (eval echo "$as_me:1749: \"$ac_compile\"") >&5
1750 (eval $ac_compile) 2>&5
1752 echo "$as_me:1752: \$? = $ac_status" >&5
1753 (exit $ac_status); } &&
1754 { ac_try='test -s conftest.$ac_objext'
1755 { (eval echo "$as_me:1755: \"$ac_try\"") >&5
1758 echo "$as_me:1758: \$? = $ac_status" >&5
1759 (exit $ac_status); }; }; then
1762 echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1766 rm -f conftest.$ac_objext conftest.$ac_ext
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1779 rm -f conftest.$ac_objext
1780 if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781 (eval $ac_compile) 2>&5
1783 echo "$as_me:1783: \$? = $ac_status" >&5
1784 (exit $ac_status); } &&
1785 { ac_try='test -s conftest.$ac_objext'
1786 { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1789 echo "$as_me:1789: \$? = $ac_status" >&5
1790 (exit $ac_status); }; }; then
1793 echo "$as_me: failed program was:" >&5
1794 cat conftest.$ac_ext >&5
1796 rm -f conftest.$ac_objext conftest.$ac_ext
1799 if test -n "$ac_declaration"; then
1800 echo '#ifdef __cplusplus' >>confdefs.h
1801 echo $ac_declaration >>confdefs.h
1802 echo '#endif' >>confdefs.h
1806 echo "$as_me: failed program was:" >&5
1807 cat conftest.$ac_ext >&5
1809 rm -f conftest.$ac_objext conftest.$ac_ext
1811 ac_cpp='$CPP $CPPFLAGS'
1812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1815 ac_main_return=return
1818 ac_cpp='$CPP $CPPFLAGS'
1819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1822 ac_main_return=return
1823 echo "$as_me:1823: checking how to run the C preprocessor" >&5
1824 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1825 # On Suns, sometimes $CPP names a directory.
1826 if test -n "$CPP" && test -d "$CPP"; then
1829 if test -z "$CPP"; then
1830 if test "${ac_cv_prog_CPP+set}" = set; then
1831 echo $ECHO_N "(cached) $ECHO_C" >&6
1833 # Double quotes because CPP needs to be expanded
1834 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1837 for ac_c_preproc_warn_flag in '' yes
1839 # Use a header file that comes with gcc, so configuring glibc
1840 # with a fresh cross-compiler works.
1841 # On the NeXT, cc -E runs the code through the compiler's parser,
1842 # not just through cpp. "Syntax error" is here to catch this case.
1843 cat >conftest.$ac_ext <<_ACEOF
1844 #line 1844 "configure"
1845 #include "confdefs.h"
1849 if { (eval echo "$as_me:1849: \"$ac_cpp conftest.$ac_ext\"") >&5
1850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1852 egrep -v '^ *\+' conftest.er1 >conftest.err
1854 cat conftest.err >&5
1855 echo "$as_me:1855: \$? = $ac_status" >&5
1856 (exit $ac_status); } >/dev/null; then
1857 if test -s conftest.err; then
1858 ac_cpp_err=$ac_c_preproc_warn_flag
1865 if test -z "$ac_cpp_err"; then
1868 echo "$as_me: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1870 # Broken: fails on valid input.
1873 rm -f conftest.err conftest.$ac_ext
1875 # OK, works on sane cases. Now check whether non-existent headers
1876 # can be detected and how.
1877 cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880 #include <ac_nonexistent.h>
1882 if { (eval echo "$as_me:1882: \"$ac_cpp conftest.$ac_ext\"") >&5
1883 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1885 egrep -v '^ *\+' conftest.er1 >conftest.err
1887 cat conftest.err >&5
1888 echo "$as_me:1888: \$? = $ac_status" >&5
1889 (exit $ac_status); } >/dev/null; then
1890 if test -s conftest.err; then
1891 ac_cpp_err=$ac_c_preproc_warn_flag
1898 if test -z "$ac_cpp_err"; then
1899 # Broken: success on invalid input.
1902 echo "$as_me: failed program was:" >&5
1903 cat conftest.$ac_ext >&5
1904 # Passes both tests.
1908 rm -f conftest.err conftest.$ac_ext
1911 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1912 rm -f conftest.err conftest.$ac_ext
1913 if $ac_preproc_ok; then
1925 echo "$as_me:1925: result: $CPP" >&5
1926 echo "${ECHO_T}$CPP" >&6
1928 for ac_c_preproc_warn_flag in '' yes
1930 # Use a header file that comes with gcc, so configuring glibc
1931 # with a fresh cross-compiler works.
1932 # On the NeXT, cc -E runs the code through the compiler's parser,
1933 # not just through cpp. "Syntax error" is here to catch this case.
1934 cat >conftest.$ac_ext <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1940 if { (eval echo "$as_me:1940: \"$ac_cpp conftest.$ac_ext\"") >&5
1941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1943 egrep -v '^ *\+' conftest.er1 >conftest.err
1945 cat conftest.err >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit $ac_status); } >/dev/null; then
1948 if test -s conftest.err; then
1949 ac_cpp_err=$ac_c_preproc_warn_flag
1956 if test -z "$ac_cpp_err"; then
1959 echo "$as_me: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1961 # Broken: fails on valid input.
1964 rm -f conftest.err conftest.$ac_ext
1966 # OK, works on sane cases. Now check whether non-existent headers
1967 # can be detected and how.
1968 cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1971 #include <ac_nonexistent.h>
1973 if { (eval echo "$as_me:1973: \"$ac_cpp conftest.$ac_ext\"") >&5
1974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1976 egrep -v '^ *\+' conftest.er1 >conftest.err
1978 cat conftest.err >&5
1979 echo "$as_me:1979: \$? = $ac_status" >&5
1980 (exit $ac_status); } >/dev/null; then
1981 if test -s conftest.err; then
1982 ac_cpp_err=$ac_c_preproc_warn_flag
1989 if test -z "$ac_cpp_err"; then
1990 # Broken: success on invalid input.
1993 echo "$as_me: failed program was:" >&5
1994 cat conftest.$ac_ext >&5
1995 # Passes both tests.
1999 rm -f conftest.err conftest.$ac_ext
2002 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2003 rm -f conftest.err conftest.$ac_ext
2004 if $ac_preproc_ok; then
2007 { { echo "$as_me:2007: error: C preprocessor \"$CPP\" fails sanity check" >&5
2008 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2009 { (exit 1); exit 1; }; }
2013 ac_cpp='$CPP $CPPFLAGS'
2014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2017 ac_main_return=return
2019 for ac_prog in mawk gawk nawk awk
2021 # Extract the first word of "$ac_prog", so it can be a program name with args.
2022 set dummy $ac_prog; ac_word=$2
2023 echo "$as_me:2023: checking for $ac_word" >&5
2024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025 if test "${ac_cv_prog_AWK+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2028 if test -n "$AWK"; then
2029 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2031 ac_save_IFS=$IFS; IFS=$ac_path_separator
2033 for ac_dir in $ac_dummy; do
2035 test -z "$ac_dir" && ac_dir=.
2036 $as_executable_p "$ac_dir/$ac_word" || continue
2037 ac_cv_prog_AWK="$ac_prog"
2038 echo "$as_me:2038: found $ac_dir/$ac_word" >&5
2045 if test -n "$AWK"; then
2046 echo "$as_me:2046: result: $AWK" >&5
2047 echo "${ECHO_T}$AWK" >&6
2049 echo "$as_me:2049: result: no" >&5
2050 echo "${ECHO_T}no" >&6
2053 test -n "$AWK" && break
2056 # Find a good install program. We prefer a C program (faster),
2057 # so one script is as good as another. But avoid the broken or
2058 # incompatible versions:
2059 # SysV /etc/install, /usr/sbin/install
2060 # SunOS /usr/etc/install
2061 # IRIX /sbin/install
2063 # AmigaOS /C/install, which installs bootblocks on floppy discs
2064 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2065 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2066 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2067 # ./install, which can be erroneously created by make from ./install.sh.
2068 echo "$as_me:2068: checking for a BSD compatible install" >&5
2069 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2070 if test -z "$INSTALL"; then
2071 if test "${ac_cv_path_install+set}" = set; then
2072 echo $ECHO_N "(cached) $ECHO_C" >&6
2074 ac_save_IFS=$IFS; IFS=$ac_path_separator
2075 for ac_dir in $PATH; do
2077 # Account for people who put trailing slashes in PATH elements.
2079 / | ./ | .// | /cC/* \
2080 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2083 # OSF1 and SCO ODT 3.0 have their own names for install.
2084 # Don't use installbsd from OSF since it installs stuff as root
2086 for ac_prog in ginstall scoinst install; do
2087 if $as_executable_p "$ac_dir/$ac_prog"; then
2088 if test $ac_prog = install &&
2089 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2090 # AIX install. It has an incompatible calling convention.
2092 elif test $ac_prog = install &&
2093 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2094 # program-specific install script used by HP pwplus--don't use.
2097 ac_cv_path_install="$ac_dir/$ac_prog -c"
2107 if test "${ac_cv_path_install+set}" = set; then
2108 INSTALL=$ac_cv_path_install
2110 # As a last resort, use the slow shell script. We don't cache a
2111 # path for INSTALL within a source directory, because that will
2112 # break other packages using the cache if that directory is
2113 # removed, or if the path is relative.
2114 INSTALL=$ac_install_sh
2117 echo "$as_me:2117: result: $INSTALL" >&5
2118 echo "${ECHO_T}$INSTALL" >&6
2120 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2121 # It thinks the first close brace ends the variable substitution.
2122 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2124 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2126 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2132 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2133 test -z "$cf_dir" && cf_dir=.
2134 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2138 for ac_prog in tdlint lint alint splint lclint
2140 # Extract the first word of "$ac_prog", so it can be a program name with args.
2141 set dummy $ac_prog; ac_word=$2
2142 echo "$as_me:2142: checking for $ac_word" >&5
2143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2144 if test "${ac_cv_prog_LINT+set}" = set; then
2145 echo $ECHO_N "(cached) $ECHO_C" >&6
2147 if test -n "$LINT"; then
2148 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2150 ac_save_IFS=$IFS; IFS=$ac_path_separator
2152 for ac_dir in $ac_dummy; do
2154 test -z "$ac_dir" && ac_dir=.
2155 $as_executable_p "$ac_dir/$ac_word" || continue
2156 ac_cv_prog_LINT="$ac_prog"
2157 echo "$as_me:2157: found $ac_dir/$ac_word" >&5
2163 LINT=$ac_cv_prog_LINT
2164 if test -n "$LINT"; then
2165 echo "$as_me:2165: result: $LINT" >&5
2166 echo "${ECHO_T}$LINT" >&6
2168 echo "$as_me:2168: result: no" >&5
2169 echo "${ECHO_T}no" >&6
2172 test -n "$LINT" && break
2175 echo "$as_me:2175: checking if filesystem supports mixed-case filenames" >&5
2176 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2177 if test "${cf_cv_mixedcase+set}" = set; then
2178 echo $ECHO_N "(cached) $ECHO_C" >&6
2181 if test "$cross_compiling" = yes ; then
2182 case $target_alias in #(vi
2183 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2191 rm -f conftest CONFTEST
2193 if test -f CONFTEST ; then
2198 rm -f conftest CONFTEST
2202 echo "$as_me:2202: result: $cf_cv_mixedcase" >&5
2203 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2204 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2205 #define MIXEDCASE_FILENAMES 1
2208 for ac_prog in exctags ctags
2210 # Extract the first word of "$ac_prog", so it can be a program name with args.
2211 set dummy $ac_prog; ac_word=$2
2212 echo "$as_me:2212: checking for $ac_word" >&5
2213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2214 if test "${ac_cv_prog_CTAGS+set}" = set; then
2215 echo $ECHO_N "(cached) $ECHO_C" >&6
2217 if test -n "$CTAGS"; then
2218 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2220 ac_save_IFS=$IFS; IFS=$ac_path_separator
2222 for ac_dir in $ac_dummy; do
2224 test -z "$ac_dir" && ac_dir=.
2225 $as_executable_p "$ac_dir/$ac_word" || continue
2226 ac_cv_prog_CTAGS="$ac_prog"
2227 echo "$as_me:2227: found $ac_dir/$ac_word" >&5
2233 CTAGS=$ac_cv_prog_CTAGS
2234 if test -n "$CTAGS"; then
2235 echo "$as_me:2235: result: $CTAGS" >&5
2236 echo "${ECHO_T}$CTAGS" >&6
2238 echo "$as_me:2238: result: no" >&5
2239 echo "${ECHO_T}no" >&6
2242 test -n "$CTAGS" && break
2245 for ac_prog in exetags etags
2247 # Extract the first word of "$ac_prog", so it can be a program name with args.
2248 set dummy $ac_prog; ac_word=$2
2249 echo "$as_me:2249: checking for $ac_word" >&5
2250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2251 if test "${ac_cv_prog_ETAGS+set}" = set; then
2252 echo $ECHO_N "(cached) $ECHO_C" >&6
2254 if test -n "$ETAGS"; then
2255 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2257 ac_save_IFS=$IFS; IFS=$ac_path_separator
2259 for ac_dir in $ac_dummy; do
2261 test -z "$ac_dir" && ac_dir=.
2262 $as_executable_p "$ac_dir/$ac_word" || continue
2263 ac_cv_prog_ETAGS="$ac_prog"
2264 echo "$as_me:2264: found $ac_dir/$ac_word" >&5
2270 ETAGS=$ac_cv_prog_ETAGS
2271 if test -n "$ETAGS"; then
2272 echo "$as_me:2272: result: $ETAGS" >&5
2273 echo "${ECHO_T}$ETAGS" >&6
2275 echo "$as_me:2275: result: no" >&5
2276 echo "${ECHO_T}no" >&6
2279 test -n "$ETAGS" && break
2282 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2283 set dummy ${CTAGS:-ctags}; ac_word=$2
2284 echo "$as_me:2284: checking for $ac_word" >&5
2285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2286 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2287 echo $ECHO_N "(cached) $ECHO_C" >&6
2289 if test -n "$MAKE_LOWER_TAGS"; then
2290 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2292 ac_save_IFS=$IFS; IFS=$ac_path_separator
2294 for ac_dir in $ac_dummy; do
2296 test -z "$ac_dir" && ac_dir=.
2297 $as_executable_p "$ac_dir/$ac_word" || continue
2298 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2299 echo "$as_me:2299: found $ac_dir/$ac_word" >&5
2303 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2306 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2307 if test -n "$MAKE_LOWER_TAGS"; then
2308 echo "$as_me:2308: result: $MAKE_LOWER_TAGS" >&5
2309 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2311 echo "$as_me:2311: result: no" >&5
2312 echo "${ECHO_T}no" >&6
2315 if test "$cf_cv_mixedcase" = yes ; then
2316 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2317 set dummy ${ETAGS:-etags}; ac_word=$2
2318 echo "$as_me:2318: checking for $ac_word" >&5
2319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2320 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
2323 if test -n "$MAKE_UPPER_TAGS"; then
2324 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2326 ac_save_IFS=$IFS; IFS=$ac_path_separator
2328 for ac_dir in $ac_dummy; do
2330 test -z "$ac_dir" && ac_dir=.
2331 $as_executable_p "$ac_dir/$ac_word" || continue
2332 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2333 echo "$as_me:2333: found $ac_dir/$ac_word" >&5
2337 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2340 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2341 if test -n "$MAKE_UPPER_TAGS"; then
2342 echo "$as_me:2342: result: $MAKE_UPPER_TAGS" >&5
2343 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2345 echo "$as_me:2345: result: no" >&5
2346 echo "${ECHO_T}no" >&6
2353 if test "$MAKE_UPPER_TAGS" = yes ; then
2359 if test "$MAKE_LOWER_TAGS" = yes ; then
2365 echo "$as_me:2365: checking if -lm needed for math functions" >&5
2366 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2367 if test "${cf_cv_need_libm+set}" = set; then
2368 echo $ECHO_N "(cached) $ECHO_C" >&6
2371 cat >conftest.$ac_ext <<_ACEOF
2372 #line 2372 "configure"
2373 #include "confdefs.h"
2381 double x = rand(); printf("result = %g\n", sin(x))
2386 rm -f conftest.$ac_objext conftest$ac_exeext
2387 if { (eval echo "$as_me:2387: \"$ac_link\"") >&5
2388 (eval $ac_link) 2>&5
2390 echo "$as_me:2390: \$? = $ac_status" >&5
2391 (exit $ac_status); } &&
2392 { ac_try='test -s conftest$ac_exeext'
2393 { (eval echo "$as_me:2393: \"$ac_try\"") >&5
2396 echo "$as_me:2396: \$? = $ac_status" >&5
2397 (exit $ac_status); }; }; then
2400 echo "$as_me: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2406 echo "$as_me:2406: result: $cf_cv_need_libm" >&5
2407 echo "${ECHO_T}$cf_cv_need_libm" >&6
2408 if test "$cf_cv_need_libm" = yes
2416 CC_SHARED_OPTS=unknown
2417 CPPFLAGS="$CPPFLAGS"
2419 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2420 DFT_UPR_MODEL="NORMAL"
2437 TINFO_LIBS='$(LIBS_CURSES)'
2438 cf_cv_abi_version=""
2439 cf_cv_rel_version=""
2444 # This should have been defined by AC_PROG_CC
2447 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2448 # into CC. This will not help with broken scripts that wrap the compiler with
2449 # options, but eliminates a more common category of user confusion.
2450 echo "$as_me:2450: checking \$CC variable" >&5
2451 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2454 echo "$as_me:2454: result: broken" >&5
2455 echo "${ECHO_T}broken" >&6
2456 { echo "$as_me:2456: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2457 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2459 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
2460 CC=`echo "$CC" | sed -e 's/[ ].*//'`
2465 cf_new_extra_cppflags=
2467 for cf_add_cflags in $cf_flags
2469 case $cf_fix_cppflags in
2471 case $cf_add_cflags in #(vi
2472 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2473 case $cf_add_cflags in
2475 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2477 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2478 && test -z "${cf_tst_cflags}" \
2479 && cf_fix_cppflags=yes
2481 if test $cf_fix_cppflags = yes ; then
2482 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2484 elif test "${cf_tst_cflags}" = "\"'" ; then
2485 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2491 *$cf_add_cflags) #(vi
2494 case $cf_add_cflags in #(vi
2496 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2498 CPPFLAGS=`echo "$CPPFLAGS" | \
2499 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2500 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2504 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2509 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2514 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2516 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2518 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2519 && test -z "${cf_tst_cflags}" \
2520 && cf_fix_cppflags=no
2525 if test -n "$cf_new_cflags" ; then
2527 CFLAGS="$CFLAGS $cf_new_cflags"
2530 if test -n "$cf_new_cppflags" ; then
2532 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2535 if test -n "$cf_new_extra_cppflags" ; then
2537 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2542 echo "$as_me:2542: result: ok" >&5
2543 echo "${ECHO_T}ok" >&6
2547 echo "$as_me:2547: checking for ${CC:-cc} option to accept ANSI C" >&5
2548 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2549 if test "${cf_cv_ansi_cc+set}" = set; then
2550 echo $ECHO_N "(cached) $ECHO_C" >&6
2554 cf_save_CFLAGS="$CFLAGS"
2555 cf_save_CPPFLAGS="$CPPFLAGS"
2556 # Don't try gcc -ansi; that turns off useful extensions and
2557 # breaks some systems' header files.
2558 # AIX -qlanglvl=ansi
2559 # Ultrix and OSF/1 -std1
2560 # HP-UX -Aa -D_HPUX_SOURCE
2562 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
2563 for cf_arg in "-DCC_HAS_PROTOS" \
2568 "-Aa -D_HPUX_SOURCE" \
2575 cf_new_extra_cppflags=
2577 for cf_add_cflags in $cf_arg
2579 case $cf_fix_cppflags in
2581 case $cf_add_cflags in #(vi
2582 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2583 case $cf_add_cflags in
2585 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2587 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2588 && test -z "${cf_tst_cflags}" \
2589 && cf_fix_cppflags=yes
2591 if test $cf_fix_cppflags = yes ; then
2592 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594 elif test "${cf_tst_cflags}" = "\"'" ; then
2595 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601 *$cf_add_cflags) #(vi
2604 case $cf_add_cflags in #(vi
2606 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2608 CPPFLAGS=`echo "$CPPFLAGS" | \
2609 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2610 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2614 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2619 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2626 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2628 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2629 && test -z "${cf_tst_cflags}" \
2630 && cf_fix_cppflags=no
2635 if test -n "$cf_new_cflags" ; then
2637 CFLAGS="$CFLAGS $cf_new_cflags"
2640 if test -n "$cf_new_cppflags" ; then
2642 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2645 if test -n "$cf_new_extra_cppflags" ; then
2647 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2650 cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2654 #ifndef CC_HAS_PROTOS
2655 #if !defined(__STDC__) || (__STDC__ != 1)
2664 int test (int i, double x);
2665 struct s1 {int (*f) (int a);};
2666 struct s2 {int (*f) (double a);};
2671 rm -f conftest.$ac_objext
2672 if { (eval echo "$as_me:2672: \"$ac_compile\"") >&5
2673 (eval $ac_compile) 2>&5
2675 echo "$as_me:2675: \$? = $ac_status" >&5
2676 (exit $ac_status); } &&
2677 { ac_try='test -s conftest.$ac_objext'
2678 { (eval echo "$as_me:2678: \"$ac_try\"") >&5
2681 echo "$as_me:2681: \$? = $ac_status" >&5
2682 (exit $ac_status); }; }; then
2683 cf_cv_ansi_cc="$cf_arg"; break
2685 echo "$as_me: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2688 rm -f conftest.$ac_objext conftest.$ac_ext
2690 CFLAGS="$cf_save_CFLAGS"
2691 CPPFLAGS="$cf_save_CPPFLAGS"
2694 echo "$as_me:2694: result: $cf_cv_ansi_cc" >&5
2695 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2697 if test "$cf_cv_ansi_cc" != "no"; then
2698 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2703 cf_new_extra_cppflags=
2705 for cf_add_cflags in $cf_cv_ansi_cc
2707 case $cf_fix_cppflags in
2709 case $cf_add_cflags in #(vi
2710 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2711 case $cf_add_cflags in
2713 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2715 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2716 && test -z "${cf_tst_cflags}" \
2717 && cf_fix_cppflags=yes
2719 if test $cf_fix_cppflags = yes ; then
2720 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2722 elif test "${cf_tst_cflags}" = "\"'" ; then
2723 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2729 *$cf_add_cflags) #(vi
2732 case $cf_add_cflags in #(vi
2734 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2736 CPPFLAGS=`echo "$CPPFLAGS" | \
2737 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2738 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2742 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2747 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2752 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2754 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2756 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2757 && test -z "${cf_tst_cflags}" \
2758 && cf_fix_cppflags=no
2763 if test -n "$cf_new_cflags" ; then
2765 CFLAGS="$CFLAGS $cf_new_cflags"
2768 if test -n "$cf_new_cppflags" ; then
2770 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2773 if test -n "$cf_new_extra_cppflags" ; then
2775 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2779 cat >>confdefs.h <<\EOF
2780 #define CC_HAS_PROTOS 1
2786 if test "$cf_cv_ansi_cc" = "no"; then
2787 { { echo "$as_me:2787: error: Your compiler does not appear to recognize prototypes.
2788 You have the following choices:
2789 a. adjust your compiler options
2790 b. get an up-to-date compiler
2791 c. use a wrapper such as unproto" >&5
2792 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2793 You have the following choices:
2794 a. adjust your compiler options
2795 b. get an up-to-date compiler
2796 c. use a wrapper such as unproto" >&2;}
2797 { (exit 1); exit 1; }; }
2800 if test "$GCC" = yes
2802 cat > conftest.i <<EOF
2804 #define GCC_PRINTF 0
2809 #ifndef GCC_NORETURN
2810 #define GCC_NORETURN /* nothing */
2813 #define GCC_UNUSED /* nothing */
2816 if test "$GCC" = yes
2818 { echo "$as_me:2818: checking for $CC __attribute__ directives..." >&5
2819 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2820 cat > conftest.$ac_ext <<EOF
2821 #line 2821 "${as_me:-configure}"
2822 #include "confdefs.h"
2823 #include "conftest.h"
2824 #include "conftest.i"
2826 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2828 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2831 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2833 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2835 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2836 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2837 extern void foo(void) GCC_NORETURN;
2838 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2840 cf_printf_attribute=no
2841 cf_scanf_attribute=no
2842 for cf_attribute in scanf printf unused noreturn
2845 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2847 cf_directive="__attribute__(($cf_attribute))"
2848 echo "checking for $CC $cf_directive" 1>&5
2850 case $cf_attribute in #(vi
2852 cf_printf_attribute=yes
2853 cat >conftest.h <<EOF
2854 #define GCC_$cf_ATTRIBUTE 1
2858 cf_scanf_attribute=yes
2859 cat >conftest.h <<EOF
2860 #define GCC_$cf_ATTRIBUTE 1
2864 cat >conftest.h <<EOF
2865 #define GCC_$cf_ATTRIBUTE $cf_directive
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871 (eval $ac_compile) 2>&5
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); }; then
2875 test -n "$verbose" && echo "$as_me:2875: result: ... $cf_attribute" >&5
2876 echo "${ECHO_T}... $cf_attribute" >&6
2877 cat conftest.h >>confdefs.h
2878 case $cf_attribute in #(vi
2880 if test "$cf_printf_attribute" = no ; then
2881 cat >>confdefs.h <<EOF
2882 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2885 cat >>confdefs.h <<EOF
2886 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2891 if test "$cf_scanf_attribute" = no ; then
2892 cat >>confdefs.h <<EOF
2893 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2896 cat >>confdefs.h <<EOF
2897 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2905 fgrep define conftest.i >>confdefs.h
2911 cf_POSIX_C_SOURCE=199506L
2914 case $host_os in #(vi
2916 cf_xopen_source="-D_ALL_SOURCE"
2922 cf_xopen_source="-D_APPLE_C_SOURCE"
2925 cf_xopen_source="-D_DARWIN_C_SOURCE"
2928 freebsd*|dragonfly*) #(vi
2929 # 5.x headers associate
2930 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2931 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2932 cf_POSIX_C_SOURCE=200112L
2934 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2937 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2940 cf_xopen_source="-D_HPUX_SOURCE"
2943 cf_xopen_source="-D_SGI_SOURCE"
2946 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2948 echo "$as_me:2948: checking if we must define _GNU_SOURCE" >&5
2949 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2950 if test "${cf_cv_gnu_source+set}" = set; then
2951 echo $ECHO_N "(cached) $ECHO_C" >&6
2954 cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2962 #ifndef _XOPEN_SOURCE
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971 (eval $ac_compile) 2>&5
2973 echo "$as_me:2973: \$? = $ac_status" >&5
2974 (exit $ac_status); } &&
2975 { ac_try='test -s conftest.$ac_objext'
2976 { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2979 echo "$as_me:2979: \$? = $ac_status" >&5
2980 (exit $ac_status); }; }; then
2983 echo "$as_me: failed program was:" >&5
2984 cat conftest.$ac_ext >&5
2986 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2987 cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2995 #ifdef _XOPEN_SOURCE
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004 (eval $ac_compile) 2>&5
3006 echo "$as_me:3006: \$? = $ac_status" >&5
3007 (exit $ac_status); } &&
3008 { ac_try='test -s conftest.$ac_objext'
3009 { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3012 echo "$as_me:3012: \$? = $ac_status" >&5
3013 (exit $ac_status); }; }; then
3016 echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_gnu_source=yes
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3024 rm -f conftest.$ac_objext conftest.$ac_ext
3027 echo "$as_me:3027: result: $cf_cv_gnu_source" >&5
3028 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3029 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3033 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3036 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3038 cf_save_CFLAGS="$CFLAGS"
3039 cf_save_CPPFLAGS="$CPPFLAGS"
3041 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3042 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3043 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3045 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3046 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3047 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3049 echo "$as_me:3049: checking if we should define _POSIX_C_SOURCE" >&5
3050 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3051 if test "${cf_cv_posix_c_source+set}" = set; then
3052 echo $ECHO_N "(cached) $ECHO_C" >&6
3055 echo "${as_me:-configure}:3055: testing if the symbol is already defined go no further ..." 1>&5
3057 cat >conftest.$ac_ext <<_ACEOF
3058 #line 3058 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3065 #ifndef _POSIX_C_SOURCE
3072 rm -f conftest.$ac_objext
3073 if { (eval echo "$as_me:3073: \"$ac_compile\"") >&5
3074 (eval $ac_compile) 2>&5
3076 echo "$as_me:3076: \$? = $ac_status" >&5
3077 (exit $ac_status); } &&
3078 { ac_try='test -s conftest.$ac_objext'
3079 { (eval echo "$as_me:3079: \"$ac_try\"") >&5
3082 echo "$as_me:3082: \$? = $ac_status" >&5
3083 (exit $ac_status); }; }; then
3084 cf_cv_posix_c_source=no
3086 echo "$as_me: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 cf_want_posix_source=no
3089 case .$cf_POSIX_C_SOURCE in #(vi
3091 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3094 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3095 cf_want_posix_source=yes
3098 cf_want_posix_source=yes
3101 if test "$cf_want_posix_source" = yes ; then
3102 cat >conftest.$ac_ext <<_ACEOF
3103 #line 3103 "configure"
3104 #include "confdefs.h"
3105 #include <sys/types.h>
3110 #ifdef _POSIX_SOURCE
3117 rm -f conftest.$ac_objext
3118 if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
3119 (eval $ac_compile) 2>&5
3121 echo "$as_me:3121: \$? = $ac_status" >&5
3122 (exit $ac_status); } &&
3123 { ac_try='test -s conftest.$ac_objext'
3124 { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3127 echo "$as_me:3127: \$? = $ac_status" >&5
3128 (exit $ac_status); }; }; then
3131 echo "$as_me: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3138 echo "${as_me:-configure}:3138: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3140 CFLAGS="$cf_trim_CFLAGS"
3141 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3143 echo "${as_me:-configure}:3143: testing if the second compile does not leave our definition intact error ..." 1>&5
3145 cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <sys/types.h>
3153 #ifndef _POSIX_C_SOURCE
3160 rm -f conftest.$ac_objext
3161 if { (eval echo "$as_me:3161: \"$ac_compile\"") >&5
3162 (eval $ac_compile) 2>&5
3164 echo "$as_me:3164: \$? = $ac_status" >&5
3165 (exit $ac_status); } &&
3166 { ac_try='test -s conftest.$ac_objext'
3167 { (eval echo "$as_me:3167: \"$ac_try\"") >&5
3170 echo "$as_me:3170: \$? = $ac_status" >&5
3171 (exit $ac_status); }; }; then
3174 echo "$as_me: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 cf_cv_posix_c_source=no
3178 rm -f conftest.$ac_objext conftest.$ac_ext
3179 CFLAGS="$cf_save_CFLAGS"
3180 CPPFLAGS="$cf_save_CPPFLAGS"
3183 rm -f conftest.$ac_objext conftest.$ac_ext
3186 echo "$as_me:3186: result: $cf_cv_posix_c_source" >&5
3187 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3189 if test "$cf_cv_posix_c_source" != no ; then
3190 CFLAGS="$cf_trim_CFLAGS"
3191 CPPFLAGS="$cf_trim_CPPFLAGS"
3196 cf_new_extra_cppflags=
3198 for cf_add_cflags in $cf_cv_posix_c_source
3200 case $cf_fix_cppflags in
3202 case $cf_add_cflags in #(vi
3203 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3204 case $cf_add_cflags in
3206 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3208 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3209 && test -z "${cf_tst_cflags}" \
3210 && cf_fix_cppflags=yes
3212 if test $cf_fix_cppflags = yes ; then
3213 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3215 elif test "${cf_tst_cflags}" = "\"'" ; then
3216 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3222 *$cf_add_cflags) #(vi
3225 case $cf_add_cflags in #(vi
3227 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3229 CPPFLAGS=`echo "$CPPFLAGS" | \
3230 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3231 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3235 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3240 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3245 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3247 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3249 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3250 && test -z "${cf_tst_cflags}" \
3251 && cf_fix_cppflags=no
3256 if test -n "$cf_new_cflags" ; then
3258 CFLAGS="$CFLAGS $cf_new_cflags"
3261 if test -n "$cf_new_cppflags" ; then
3263 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3266 if test -n "$cf_new_extra_cppflags" ; then
3268 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3275 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3278 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3279 cf_xopen_source="-D_BSD_SOURCE"
3283 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3286 cf_xopen_source="-D_OSF_SOURCE"
3289 cf_xopen_source="-D_QNX_SOURCE"
3292 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3295 cf_xopen_source="-D__EXTENSIONS__"
3299 echo "$as_me:3299: checking if we should define _XOPEN_SOURCE" >&5
3300 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3301 if test "${cf_cv_xopen_source+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
3305 cat >conftest.$ac_ext <<_ACEOF
3306 #line 3306 "configure"
3307 #include "confdefs.h"
3311 #include <sys/types.h>
3317 #ifndef _XOPEN_SOURCE
3324 rm -f conftest.$ac_objext
3325 if { (eval echo "$as_me:3325: \"$ac_compile\"") >&5
3326 (eval $ac_compile) 2>&5
3328 echo "$as_me:3328: \$? = $ac_status" >&5
3329 (exit $ac_status); } &&
3330 { ac_try='test -s conftest.$ac_objext'
3331 { (eval echo "$as_me:3331: \"$ac_try\"") >&5
3334 echo "$as_me:3334: \$? = $ac_status" >&5
3335 (exit $ac_status); }; }; then
3336 cf_cv_xopen_source=no
3338 echo "$as_me: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3341 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3342 cat >conftest.$ac_ext <<_ACEOF
3343 #line 3343 "configure"
3344 #include "confdefs.h"
3348 #include <sys/types.h>
3354 #ifdef _XOPEN_SOURCE
3361 rm -f conftest.$ac_objext
3362 if { (eval echo "$as_me:3362: \"$ac_compile\"") >&5
3363 (eval $ac_compile) 2>&5
3365 echo "$as_me:3365: \$? = $ac_status" >&5
3366 (exit $ac_status); } &&
3367 { ac_try='test -s conftest.$ac_objext'
3368 { (eval echo "$as_me:3368: \"$ac_try\"") >&5
3371 echo "$as_me:3371: \$? = $ac_status" >&5
3372 (exit $ac_status); }; }; then
3373 cf_cv_xopen_source=no
3375 echo "$as_me: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3379 rm -f conftest.$ac_objext conftest.$ac_ext
3383 rm -f conftest.$ac_objext conftest.$ac_ext
3386 echo "$as_me:3386: result: $cf_cv_xopen_source" >&5
3387 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3389 if test "$cf_cv_xopen_source" != no ; then
3391 CFLAGS=`echo "$CFLAGS" | \
3392 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3393 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3395 CPPFLAGS=`echo "$CPPFLAGS" | \
3396 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3397 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3399 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3404 cf_new_extra_cppflags=
3406 for cf_add_cflags in $cf_temp_xopen_source
3408 case $cf_fix_cppflags in
3410 case $cf_add_cflags in #(vi
3411 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3412 case $cf_add_cflags in
3414 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3416 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3417 && test -z "${cf_tst_cflags}" \
3418 && cf_fix_cppflags=yes
3420 if test $cf_fix_cppflags = yes ; then
3421 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3423 elif test "${cf_tst_cflags}" = "\"'" ; then
3424 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3430 *$cf_add_cflags) #(vi
3433 case $cf_add_cflags in #(vi
3435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3437 CPPFLAGS=`echo "$CPPFLAGS" | \
3438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3443 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3448 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3453 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3455 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3457 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3458 && test -z "${cf_tst_cflags}" \
3459 && cf_fix_cppflags=no
3464 if test -n "$cf_new_cflags" ; then
3466 CFLAGS="$CFLAGS $cf_new_cflags"
3469 if test -n "$cf_new_cppflags" ; then
3471 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3474 if test -n "$cf_new_extra_cppflags" ; then
3476 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3481 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3483 cf_save_CFLAGS="$CFLAGS"
3484 cf_save_CPPFLAGS="$CPPFLAGS"
3486 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3487 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3488 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3490 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3491 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3492 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3494 echo "$as_me:3494: checking if we should define _POSIX_C_SOURCE" >&5
3495 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3496 if test "${cf_cv_posix_c_source+set}" = set; then
3497 echo $ECHO_N "(cached) $ECHO_C" >&6
3500 echo "${as_me:-configure}:3500: testing if the symbol is already defined go no further ..." 1>&5
3502 cat >conftest.$ac_ext <<_ACEOF
3503 #line 3503 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3510 #ifndef _POSIX_C_SOURCE
3517 rm -f conftest.$ac_objext
3518 if { (eval echo "$as_me:3518: \"$ac_compile\"") >&5
3519 (eval $ac_compile) 2>&5
3521 echo "$as_me:3521: \$? = $ac_status" >&5
3522 (exit $ac_status); } &&
3523 { ac_try='test -s conftest.$ac_objext'
3524 { (eval echo "$as_me:3524: \"$ac_try\"") >&5
3527 echo "$as_me:3527: \$? = $ac_status" >&5
3528 (exit $ac_status); }; }; then
3529 cf_cv_posix_c_source=no
3531 echo "$as_me: failed program was:" >&5
3532 cat conftest.$ac_ext >&5
3533 cf_want_posix_source=no
3534 case .$cf_POSIX_C_SOURCE in #(vi
3536 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3539 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3540 cf_want_posix_source=yes
3543 cf_want_posix_source=yes
3546 if test "$cf_want_posix_source" = yes ; then
3547 cat >conftest.$ac_ext <<_ACEOF
3548 #line 3548 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3555 #ifdef _POSIX_SOURCE
3562 rm -f conftest.$ac_objext
3563 if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564 (eval $ac_compile) 2>&5
3566 echo "$as_me:3566: \$? = $ac_status" >&5
3567 (exit $ac_status); } &&
3568 { ac_try='test -s conftest.$ac_objext'
3569 { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3572 echo "$as_me:3572: \$? = $ac_status" >&5
3573 (exit $ac_status); }; }; then
3576 echo "$as_me: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3580 rm -f conftest.$ac_objext conftest.$ac_ext
3583 echo "${as_me:-configure}:3583: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3585 CFLAGS="$cf_trim_CFLAGS"
3586 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3588 echo "${as_me:-configure}:3588: testing if the second compile does not leave our definition intact error ..." 1>&5
3590 cat >conftest.$ac_ext <<_ACEOF
3591 #line 3591 "configure"
3592 #include "confdefs.h"
3593 #include <sys/types.h>
3598 #ifndef _POSIX_C_SOURCE
3605 rm -f conftest.$ac_objext
3606 if { (eval echo "$as_me:3606: \"$ac_compile\"") >&5
3607 (eval $ac_compile) 2>&5
3609 echo "$as_me:3609: \$? = $ac_status" >&5
3610 (exit $ac_status); } &&
3611 { ac_try='test -s conftest.$ac_objext'
3612 { (eval echo "$as_me:3612: \"$ac_try\"") >&5
3615 echo "$as_me:3615: \$? = $ac_status" >&5
3616 (exit $ac_status); }; }; then
3619 echo "$as_me: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 cf_cv_posix_c_source=no
3623 rm -f conftest.$ac_objext conftest.$ac_ext
3624 CFLAGS="$cf_save_CFLAGS"
3625 CPPFLAGS="$cf_save_CPPFLAGS"
3628 rm -f conftest.$ac_objext conftest.$ac_ext
3631 echo "$as_me:3631: result: $cf_cv_posix_c_source" >&5
3632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3634 if test "$cf_cv_posix_c_source" != no ; then
3635 CFLAGS="$cf_trim_CFLAGS"
3636 CPPFLAGS="$cf_trim_CPPFLAGS"
3641 cf_new_extra_cppflags=
3643 for cf_add_cflags in $cf_cv_posix_c_source
3645 case $cf_fix_cppflags in
3647 case $cf_add_cflags in #(vi
3648 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3649 case $cf_add_cflags in
3651 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3653 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3654 && test -z "${cf_tst_cflags}" \
3655 && cf_fix_cppflags=yes
3657 if test $cf_fix_cppflags = yes ; then
3658 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3660 elif test "${cf_tst_cflags}" = "\"'" ; then
3661 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3667 *$cf_add_cflags) #(vi
3670 case $cf_add_cflags in #(vi
3672 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3674 CPPFLAGS=`echo "$CPPFLAGS" | \
3675 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3676 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3680 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3685 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3690 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3692 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3694 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3695 && test -z "${cf_tst_cflags}" \
3696 && cf_fix_cppflags=no
3701 if test -n "$cf_new_cflags" ; then
3703 CFLAGS="$CFLAGS $cf_new_cflags"
3706 if test -n "$cf_new_cppflags" ; then
3708 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3711 if test -n "$cf_new_extra_cppflags" ; then
3713 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3721 if test -n "$cf_xopen_source" ; then
3726 cf_new_extra_cppflags=
3728 for cf_add_cflags in $cf_xopen_source
3730 case $cf_fix_cppflags in
3732 case $cf_add_cflags in #(vi
3733 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3734 case $cf_add_cflags in
3736 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3738 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3739 && test -z "${cf_tst_cflags}" \
3740 && cf_fix_cppflags=yes
3742 if test $cf_fix_cppflags = yes ; then
3743 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3745 elif test "${cf_tst_cflags}" = "\"'" ; then
3746 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3752 *$cf_add_cflags) #(vi
3755 case $cf_add_cflags in #(vi
3757 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3759 CPPFLAGS=`echo "$CPPFLAGS" | \
3760 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3761 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3765 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3770 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3775 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3777 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3779 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3780 && test -z "${cf_tst_cflags}" \
3781 && cf_fix_cppflags=no
3786 if test -n "$cf_new_cflags" ; then
3788 CFLAGS="$CFLAGS $cf_new_cflags"
3791 if test -n "$cf_new_cppflags" ; then
3793 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3796 if test -n "$cf_new_extra_cppflags" ; then
3798 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3803 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3804 echo "$as_me:3804: checking if _XOPEN_SOURCE really is set" >&5
3805 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3806 cat >conftest.$ac_ext <<_ACEOF
3807 #line 3807 "configure"
3808 #include "confdefs.h"
3814 #ifndef _XOPEN_SOURCE
3821 rm -f conftest.$ac_objext
3822 if { (eval echo "$as_me:3822: \"$ac_compile\"") >&5
3823 (eval $ac_compile) 2>&5
3825 echo "$as_me:3825: \$? = $ac_status" >&5
3826 (exit $ac_status); } &&
3827 { ac_try='test -s conftest.$ac_objext'
3828 { (eval echo "$as_me:3828: \"$ac_try\"") >&5
3831 echo "$as_me:3831: \$? = $ac_status" >&5
3832 (exit $ac_status); }; }; then
3833 cf_XOPEN_SOURCE_set=yes
3835 echo "$as_me: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 cf_XOPEN_SOURCE_set=no
3839 rm -f conftest.$ac_objext conftest.$ac_ext
3840 echo "$as_me:3840: result: $cf_XOPEN_SOURCE_set" >&5
3841 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3842 if test $cf_XOPEN_SOURCE_set = yes
3844 cat >conftest.$ac_ext <<_ACEOF
3845 #line 3845 "configure"
3846 #include "confdefs.h"
3852 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3859 rm -f conftest.$ac_objext
3860 if { (eval echo "$as_me:3860: \"$ac_compile\"") >&5
3861 (eval $ac_compile) 2>&5
3863 echo "$as_me:3863: \$? = $ac_status" >&5
3864 (exit $ac_status); } &&
3865 { ac_try='test -s conftest.$ac_objext'
3866 { (eval echo "$as_me:3866: \"$ac_try\"") >&5
3869 echo "$as_me:3869: \$? = $ac_status" >&5
3870 (exit $ac_status); }; }; then
3871 cf_XOPEN_SOURCE_set_ok=yes
3873 echo "$as_me: failed program was:" >&5
3874 cat conftest.$ac_ext >&5
3875 cf_XOPEN_SOURCE_set_ok=no
3877 rm -f conftest.$ac_objext conftest.$ac_ext
3878 if test $cf_XOPEN_SOURCE_set_ok = no
3880 { echo "$as_me:3880: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3881 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3885 echo "$as_me:3885: checking if we should define _XOPEN_SOURCE" >&5
3886 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3887 if test "${cf_cv_xopen_source+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3891 cat >conftest.$ac_ext <<_ACEOF
3892 #line 3892 "configure"
3893 #include "confdefs.h"
3897 #include <sys/types.h>
3903 #ifndef _XOPEN_SOURCE
3910 rm -f conftest.$ac_objext
3911 if { (eval echo "$as_me:3911: \"$ac_compile\"") >&5
3912 (eval $ac_compile) 2>&5
3914 echo "$as_me:3914: \$? = $ac_status" >&5
3915 (exit $ac_status); } &&
3916 { ac_try='test -s conftest.$ac_objext'
3917 { (eval echo "$as_me:3917: \"$ac_try\"") >&5
3920 echo "$as_me:3920: \$? = $ac_status" >&5
3921 (exit $ac_status); }; }; then
3922 cf_cv_xopen_source=no
3924 echo "$as_me: failed program was:" >&5
3925 cat conftest.$ac_ext >&5
3927 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3928 cat >conftest.$ac_ext <<_ACEOF
3929 #line 3929 "configure"
3930 #include "confdefs.h"
3934 #include <sys/types.h>
3940 #ifdef _XOPEN_SOURCE
3947 rm -f conftest.$ac_objext
3948 if { (eval echo "$as_me:3948: \"$ac_compile\"") >&5
3949 (eval $ac_compile) 2>&5
3951 echo "$as_me:3951: \$? = $ac_status" >&5
3952 (exit $ac_status); } &&
3953 { ac_try='test -s conftest.$ac_objext'
3954 { (eval echo "$as_me:3954: \"$ac_try\"") >&5
3957 echo "$as_me:3957: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 cf_cv_xopen_source=no
3961 echo "$as_me: failed program was:" >&5
3962 cat conftest.$ac_ext >&5
3963 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3965 rm -f conftest.$ac_objext conftest.$ac_ext
3969 rm -f conftest.$ac_objext conftest.$ac_ext
3972 echo "$as_me:3972: result: $cf_cv_xopen_source" >&5
3973 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3975 if test "$cf_cv_xopen_source" != no ; then
3977 CFLAGS=`echo "$CFLAGS" | \
3978 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3979 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3981 CPPFLAGS=`echo "$CPPFLAGS" | \
3982 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3983 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3985 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3990 cf_new_extra_cppflags=
3992 for cf_add_cflags in $cf_temp_xopen_source
3994 case $cf_fix_cppflags in
3996 case $cf_add_cflags in #(vi
3997 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3998 case $cf_add_cflags in
4000 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4002 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4003 && test -z "${cf_tst_cflags}" \
4004 && cf_fix_cppflags=yes
4006 if test $cf_fix_cppflags = yes ; then
4007 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4009 elif test "${cf_tst_cflags}" = "\"'" ; then
4010 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4016 *$cf_add_cflags) #(vi
4019 case $cf_add_cflags in #(vi
4021 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4023 CPPFLAGS=`echo "$CPPFLAGS" | \
4024 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4025 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4029 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4034 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4039 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4041 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4043 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4044 && test -z "${cf_tst_cflags}" \
4045 && cf_fix_cppflags=no
4050 if test -n "$cf_new_cflags" ; then
4052 CFLAGS="$CFLAGS $cf_new_cflags"
4055 if test -n "$cf_new_cppflags" ; then
4057 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4060 if test -n "$cf_new_extra_cppflags" ; then
4062 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4070 echo "$as_me:4070: checking for $CC option to accept ANSI C" >&5
4071 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4072 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
4075 ac_cv_prog_cc_stdc=no
4077 cat >conftest.$ac_ext <<_ACEOF
4078 #line 4078 "configure"
4079 #include "confdefs.h"
4082 #include <sys/types.h>
4083 #include <sys/stat.h>
4084 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4085 struct buf { int x; };
4086 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4087 static char *e (p, i)
4093 static char *f (char * (*g) (char **, int), char **p, ...)
4098 s = g (p, va_arg (v,int));
4102 int test (int i, double x);
4103 struct s1 {int (*f) (int a);};
4104 struct s2 {int (*f) (double a);};
4105 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4111 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4116 # Don't try gcc -ansi; that turns off useful extensions and
4117 # breaks some systems' header files.
4118 # AIX -qlanglvl=ansi
4119 # Ultrix and OSF/1 -std1
4120 # HP-UX 10.20 and later -Ae
4121 # HP-UX older versions -Aa -D_HPUX_SOURCE
4122 # SVR4 -Xc -D__EXTENSIONS__
4123 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4125 CC="$ac_save_CC $ac_arg"
4126 rm -f conftest.$ac_objext
4127 if { (eval echo "$as_me:4127: \"$ac_compile\"") >&5
4128 (eval $ac_compile) 2>&5
4130 echo "$as_me:4130: \$? = $ac_status" >&5
4131 (exit $ac_status); } &&
4132 { ac_try='test -s conftest.$ac_objext'
4133 { (eval echo "$as_me:4133: \"$ac_try\"") >&5
4136 echo "$as_me:4136: \$? = $ac_status" >&5
4137 (exit $ac_status); }; }; then
4138 ac_cv_prog_cc_stdc=$ac_arg
4141 echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4144 rm -f conftest.$ac_objext
4146 rm -f conftest.$ac_ext conftest.$ac_objext
4151 case "x$ac_cv_prog_cc_stdc" in
4153 echo "$as_me:4153: result: none needed" >&5
4154 echo "${ECHO_T}none needed" >&6 ;;
4156 echo "$as_me:4156: result: $ac_cv_prog_cc_stdc" >&5
4157 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4158 CC="$CC $ac_cv_prog_cc_stdc" ;;
4161 echo "$as_me:4161: checking for an ANSI C-conforming const" >&5
4162 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4163 if test "${ac_cv_c_const+set}" = set; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
4166 cat >conftest.$ac_ext <<_ACEOF
4167 #line 4167 "configure"
4168 #include "confdefs.h"
4173 /* FIXME: Include the comments suggested by Paul. */
4175 /* Ultrix mips cc rejects this. */
4176 typedef int charset[2];
4178 /* SunOS 4.1.1 cc rejects this. */
4179 char const *const *ccp;
4181 /* NEC SVR4.0.2 mips cc rejects this. */
4182 struct point {int x, y;};
4183 static struct point const zero = {0,0};
4184 /* AIX XL C 1.02.0.0 rejects this.
4185 It does not let you subtract one const X* pointer from another in
4186 an arm of an if-expression whose if-part is not a constant
4188 const char *g = "string";
4189 ccp = &g + (g ? g-g : 0);
4190 /* HPUX 7.0 cc rejects these. */
4193 ccp = (char const *const *) p;
4194 { /* SCO 3.2v4 cc rejects this. */
4196 char const *s = 0 ? (char *) 0 : (char const *) 0;
4200 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4202 const int *foo = &x[0];
4205 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4206 typedef const int *iptr;
4210 { /* AIX XL C 1.02.0.0 rejects this saying
4211 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4212 struct s { int j; const int *ap[3]; };
4213 struct s *b; b->j = 5;
4215 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4224 rm -f conftest.$ac_objext
4225 if { (eval echo "$as_me:4225: \"$ac_compile\"") >&5
4226 (eval $ac_compile) 2>&5
4228 echo "$as_me:4228: \$? = $ac_status" >&5
4229 (exit $ac_status); } &&
4230 { ac_try='test -s conftest.$ac_objext'
4231 { (eval echo "$as_me:4231: \"$ac_try\"") >&5
4234 echo "$as_me:4234: \$? = $ac_status" >&5
4235 (exit $ac_status); }; }; then
4238 echo "$as_me: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4242 rm -f conftest.$ac_objext conftest.$ac_ext
4244 echo "$as_me:4244: result: $ac_cv_c_const" >&5
4245 echo "${ECHO_T}$ac_cv_c_const" >&6
4246 if test $ac_cv_c_const = no; then
4248 cat >>confdefs.h <<\EOF
4254 echo "$as_me:4254: checking for signal global datatype" >&5
4255 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4256 if test "${cf_cv_sig_atomic_t+set}" = set; then
4257 echo $ECHO_N "(cached) $ECHO_C" >&6
4261 "volatile sig_atomic_t" \
4265 cat >conftest.$ac_ext <<_ACEOF
4266 #line 4266 "configure"
4267 #include "confdefs.h"
4269 #include <sys/types.h>
4275 static void handler(int sig)
4282 signal(SIGINT, handler);
4288 rm -f conftest.$ac_objext
4289 if { (eval echo "$as_me:4289: \"$ac_compile\"") >&5
4290 (eval $ac_compile) 2>&5
4292 echo "$as_me:4292: \$? = $ac_status" >&5
4293 (exit $ac_status); } &&
4294 { ac_try='test -s conftest.$ac_objext'
4295 { (eval echo "$as_me:4295: \"$ac_try\"") >&5
4298 echo "$as_me:4298: \$? = $ac_status" >&5
4299 (exit $ac_status); }; }; then
4300 cf_cv_sig_atomic_t=$cf_type
4302 echo "$as_me: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304 cf_cv_sig_atomic_t=no
4306 rm -f conftest.$ac_objext conftest.$ac_ext
4307 test "$cf_cv_sig_atomic_t" != no && break
4312 echo "$as_me:4312: result: $cf_cv_sig_atomic_t" >&5
4313 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4314 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
4315 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4318 echo "$as_me:4318: checking if you want to see long compiling messages" >&5
4319 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4321 # Check whether --enable-echo or --disable-echo was given.
4322 if test "${enable_echo+set}" = set; then
4323 enableval="$enable_echo"
4324 test "$enableval" != no && enableval=yes
4325 if test "$enableval" != "yes" ; then
4328 ECHO_LD='@echo linking $@;'
4329 RULE_CC='@echo compiling $<'
4330 SHOW_CC='@echo compiling $@'
4352 echo "$as_me:4352: result: $enableval" >&5
4353 echo "${ECHO_T}$enableval" >&6
4356 if test "$GCC" = yes ; then
4357 echo "$as_me:4357: checking version of $CC" >&5
4358 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
4359 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
4360 test -z "$GCC_VERSION" && GCC_VERSION=unknown
4361 echo "$as_me:4361: result: $GCC_VERSION" >&5
4362 echo "${ECHO_T}$GCC_VERSION" >&6
4365 if ( test "$GCC" = yes || test "$GXX" = yes )
4367 echo "$as_me:4367: checking if you want to turn on gcc warnings" >&5
4368 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
4370 # Check whether --enable-warnings or --disable-warnings was given.
4371 if test "${enable_warnings+set}" = set; then
4372 enableval="$enable_warnings"
4373 test "$enableval" != yes && enableval=no
4374 if test "$enableval" != "no" ; then
4384 echo "$as_me:4384: result: $with_warnings" >&5
4385 echo "${ECHO_T}$with_warnings" >&6
4386 if test "$with_warnings" = "yes"
4389 if test "$GCC" = yes
4391 cat > conftest.i <<EOF
4393 #define GCC_PRINTF 0
4398 #ifndef GCC_NORETURN
4399 #define GCC_NORETURN /* nothing */
4402 #define GCC_UNUSED /* nothing */
4405 if test "$GCC" = yes
4407 { echo "$as_me:4407: checking for $CC __attribute__ directives..." >&5
4408 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4410 "${as_me:-configure}"
4411 #include "confdefs.h"
4412 #include "conftest.h"
4413 #include "conftest.i"
4415 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4417 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4420 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4422 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
4424 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4425 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4426 extern void foo(void) GCC_NORETURN;
4427 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4429 cf_printf_attribute=no
4430 cf_scanf_attribute=no
4431 for cf_attribute in scanf printf unused noreturn
4434 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4436 cf_directive="__attribute__(($cf_attribute))"
4437 echo "checking for $CC $cf_directive" 1>&5
4439 case $cf_attribute in #(vi
4441 cf_printf_attribute=yes
4442 cat >conftest.h <<EOF
4443 #define GCC_$cf_ATTRIBUTE 1
4447 cf_scanf_attribute=yes
4448 cat >conftest.h <<EOF
4449 #define GCC_$cf_ATTRIBUTE 1
4453 cat >conftest.h <<EOF
4454 #define GCC_$cf_ATTRIBUTE $cf_directive
4459 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460 (eval $ac_compile) 2>&5
4462 echo "$as_me:4462: \$? = $ac_status" >&5
4463 (exit $ac_status); }; then
4464 test -n "$verbose" && echo "$as_me:4464: result: ... $cf_attribute" >&5
4465 echo "${ECHO_T}... $cf_attribute" >&6
4466 cat conftest.h >>confdefs.h
4467 case $cf_attribute in #(vi
4469 if test "$cf_printf_attribute" = no ; then
4470 cat >>confdefs.h <<EOF
4471 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4474 cat >>confdefs.h <<EOF
4475 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4480 if test "$cf_scanf_attribute" = no ; then
4481 cat >>confdefs.h <<EOF
4482 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4485 cat >>confdefs.h <<EOF
4486 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4494 fgrep define conftest.i >>confdefs.h
4501 if test "$GCC" = yes ; then
4504 echo "$as_me:4504: checking if this is really Intel C compiler" >&5
4505 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4506 cf_save_CFLAGS="$CFLAGS"
4507 CFLAGS="$CFLAGS -no-gcc"
4508 cat >conftest.$ac_ext <<_ACEOF
4509 #line 4509 "configure"
4510 #include "confdefs.h"
4516 #ifdef __INTEL_COMPILER
4525 rm -f conftest.$ac_objext
4526 if { (eval echo "$as_me:4526: \"$ac_compile\"") >&5
4527 (eval $ac_compile) 2>&5
4529 echo "$as_me:4529: \$? = $ac_status" >&5
4530 (exit $ac_status); } &&
4531 { ac_try='test -s conftest.$ac_objext'
4532 { (eval echo "$as_me:4532: \"$ac_try\"") >&5
4535 echo "$as_me:4535: \$? = $ac_status" >&5
4536 (exit $ac_status); }; }; then
4538 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4541 echo "$as_me: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4544 rm -f conftest.$ac_objext conftest.$ac_ext
4545 CFLAGS="$cf_save_CFLAGS"
4546 echo "$as_me:4546: result: $INTEL_COMPILER" >&5
4547 echo "${ECHO_T}$INTEL_COMPILER" >&6
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4553 "${as_me:-configure}"
4554 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4557 if test "$INTEL_COMPILER" = yes
4559 # The "-wdXXX" options suppress warnings:
4560 # remark #1419: external declaration in primary source file
4561 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4562 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4563 # remark #193: zero used for undefined preprocessing identifier
4564 # remark #593: variable "curs_sb_left_arrow" was set but never used
4565 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4566 # remark #869: parameter "tw" was never referenced
4567 # remark #981: operands are evaluated in unspecified order
4568 # warning #279: controlling expression is constant
4570 { echo "$as_me:4570: checking for $CC warning options..." >&5
4571 echo "$as_me: checking for $CC warning options..." >&6;}
4572 cf_save_CFLAGS="$CFLAGS"
4573 EXTRA_CFLAGS="-Wall"
4585 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4586 if { (eval echo "$as_me:4586: \"$ac_compile\"") >&5
4587 (eval $ac_compile) 2>&5
4589 echo "$as_me:4589: \$? = $ac_status" >&5
4590 (exit $ac_status); }; then
4591 test -n "$verbose" && echo "$as_me:4591: result: ... -$cf_opt" >&5
4592 echo "${ECHO_T}... -$cf_opt" >&6
4593 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4596 CFLAGS="$cf_save_CFLAGS"
4598 elif test "$GCC" = yes
4600 { echo "$as_me:4600: checking for $CC warning options..." >&5
4601 echo "$as_me: checking for $CC warning options..." >&6;}
4602 cf_save_CFLAGS="$CFLAGS"
4605 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4606 for cf_opt in W Wall \
4607 Wbad-function-cast \
4611 Wmissing-declarations \
4612 Wmissing-prototypes \
4616 Wstrict-prototypes \
4617 Wundef $cf_warn_CONST
4619 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4620 if { (eval echo "$as_me:4620: \"$ac_compile\"") >&5
4621 (eval $ac_compile) 2>&5
4623 echo "$as_me:4623: \$? = $ac_status" >&5
4624 (exit $ac_status); }; then
4625 test -n "$verbose" && echo "$as_me:4625: result: ... -$cf_opt" >&5
4626 echo "${ECHO_T}... -$cf_opt" >&6
4627 case $cf_opt in #(vi
4629 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4632 case $GCC_VERSION in
4634 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
4636 echo "${as_me:-configure}:4636: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4641 Wpointer-arith) #(vi
4642 case $GCC_VERSION in
4644 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
4646 echo "${as_me:-configure}:4646: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4652 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4655 CFLAGS="$cf_save_CFLAGS"
4662 echo "$as_me:4662: checking if you want to use dmalloc for testing" >&5
4663 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4665 # Check whether --with-dmalloc or --without-dmalloc was given.
4666 if test "${with_dmalloc+set}" = set; then
4667 withval="$with_dmalloc"
4668 cat >>confdefs.h <<\EOF
4669 #define USE_DMALLOC 1
4672 : ${with_cflags:=-g}
4673 : ${with_no_leaks:=yes}
4678 echo "$as_me:4678: result: ${with_dmalloc:-no}" >&5
4679 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4681 case .$with_cflags in #(vi
4683 case .$CFLAGS in #(vi
4691 cf_new_extra_cppflags=
4693 for cf_add_cflags in -g
4695 case $cf_fix_cppflags in
4697 case $cf_add_cflags in #(vi
4698 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4699 case $cf_add_cflags in
4701 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4703 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4704 && test -z "${cf_tst_cflags}" \
4705 && cf_fix_cppflags=yes
4707 if test $cf_fix_cppflags = yes ; then
4708 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4710 elif test "${cf_tst_cflags}" = "\"'" ; then
4711 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4717 *$cf_add_cflags) #(vi
4720 case $cf_add_cflags in #(vi
4722 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4724 CPPFLAGS=`echo "$CPPFLAGS" | \
4725 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4726 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4730 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4735 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4740 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4742 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4744 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4745 && test -z "${cf_tst_cflags}" \
4746 && cf_fix_cppflags=no
4751 if test -n "$cf_new_cflags" ; then
4753 CFLAGS="$CFLAGS $cf_new_cflags"
4756 if test -n "$cf_new_cppflags" ; then
4758 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4761 if test -n "$cf_new_extra_cppflags" ; then
4763 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4771 if test "$with_dmalloc" = yes ; then
4772 echo "$as_me:4772: checking for dmalloc.h" >&5
4773 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4774 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4775 echo $ECHO_N "(cached) $ECHO_C" >&6
4777 cat >conftest.$ac_ext <<_ACEOF
4778 #line 4778 "configure"
4779 #include "confdefs.h"
4780 #include <dmalloc.h>
4782 if { (eval echo "$as_me:4782: \"$ac_cpp conftest.$ac_ext\"") >&5
4783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4785 egrep -v '^ *\+' conftest.er1 >conftest.err
4787 cat conftest.err >&5
4788 echo "$as_me:4788: \$? = $ac_status" >&5
4789 (exit $ac_status); } >/dev/null; then
4790 if test -s conftest.err; then
4791 ac_cpp_err=$ac_c_preproc_warn_flag
4798 if test -z "$ac_cpp_err"; then
4799 ac_cv_header_dmalloc_h=yes
4801 echo "$as_me: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4803 ac_cv_header_dmalloc_h=no
4805 rm -f conftest.err conftest.$ac_ext
4807 echo "$as_me:4807: result: $ac_cv_header_dmalloc_h" >&5
4808 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4809 if test $ac_cv_header_dmalloc_h = yes; then
4811 echo "$as_me:4811: checking for dmalloc_debug in -ldmalloc" >&5
4812 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4813 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
4816 ac_check_lib_save_LIBS=$LIBS
4817 LIBS="-ldmalloc $LIBS"
4818 cat >conftest.$ac_ext <<_ACEOF
4819 #line 4819 "configure"
4820 #include "confdefs.h"
4822 /* Override any gcc2 internal prototype to avoid an error. */
4826 /* We use char because int might match the return type of a gcc2
4827 builtin and then its argument prototype would still apply. */
4828 char dmalloc_debug ();
4837 rm -f conftest.$ac_objext conftest$ac_exeext
4838 if { (eval echo "$as_me:4838: \"$ac_link\"") >&5
4839 (eval $ac_link) 2>&5
4841 echo "$as_me:4841: \$? = $ac_status" >&5
4842 (exit $ac_status); } &&
4843 { ac_try='test -s conftest$ac_exeext'
4844 { (eval echo "$as_me:4844: \"$ac_try\"") >&5
4847 echo "$as_me:4847: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
4849 ac_cv_lib_dmalloc_dmalloc_debug=yes
4851 echo "$as_me: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4853 ac_cv_lib_dmalloc_dmalloc_debug=no
4855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4856 LIBS=$ac_check_lib_save_LIBS
4858 echo "$as_me:4858: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4859 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4860 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4861 cat >>confdefs.h <<EOF
4862 #define HAVE_LIBDMALLOC 1
4865 LIBS="-ldmalloc $LIBS"
4873 echo "$as_me:4873: checking if you want to use dbmalloc for testing" >&5
4874 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4876 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4877 if test "${with_dbmalloc+set}" = set; then
4878 withval="$with_dbmalloc"
4879 cat >>confdefs.h <<\EOF
4880 #define USE_DBMALLOC 1
4883 : ${with_cflags:=-g}
4884 : ${with_no_leaks:=yes}
4889 echo "$as_me:4889: result: ${with_dbmalloc:-no}" >&5
4890 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4892 case .$with_cflags in #(vi
4894 case .$CFLAGS in #(vi
4902 cf_new_extra_cppflags=
4904 for cf_add_cflags in -g
4906 case $cf_fix_cppflags in
4908 case $cf_add_cflags in #(vi
4909 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4910 case $cf_add_cflags in
4912 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4914 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4915 && test -z "${cf_tst_cflags}" \
4916 && cf_fix_cppflags=yes
4918 if test $cf_fix_cppflags = yes ; then
4919 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4921 elif test "${cf_tst_cflags}" = "\"'" ; then
4922 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4928 *$cf_add_cflags) #(vi
4931 case $cf_add_cflags in #(vi
4933 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4935 CPPFLAGS=`echo "$CPPFLAGS" | \
4936 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4937 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4941 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4946 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4951 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4953 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4955 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4956 && test -z "${cf_tst_cflags}" \
4957 && cf_fix_cppflags=no
4962 if test -n "$cf_new_cflags" ; then
4964 CFLAGS="$CFLAGS $cf_new_cflags"
4967 if test -n "$cf_new_cppflags" ; then
4969 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4972 if test -n "$cf_new_extra_cppflags" ; then
4974 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4982 if test "$with_dbmalloc" = yes ; then
4983 echo "$as_me:4983: checking for dbmalloc.h" >&5
4984 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4985 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4986 echo $ECHO_N "(cached) $ECHO_C" >&6
4988 cat >conftest.$ac_ext <<_ACEOF
4989 #line 4989 "configure"
4990 #include "confdefs.h"
4991 #include <dbmalloc.h>
4993 if { (eval echo "$as_me:4993: \"$ac_cpp conftest.$ac_ext\"") >&5
4994 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4996 egrep -v '^ *\+' conftest.er1 >conftest.err
4998 cat conftest.err >&5
4999 echo "$as_me:4999: \$? = $ac_status" >&5
5000 (exit $ac_status); } >/dev/null; then
5001 if test -s conftest.err; then
5002 ac_cpp_err=$ac_c_preproc_warn_flag
5009 if test -z "$ac_cpp_err"; then
5010 ac_cv_header_dbmalloc_h=yes
5012 echo "$as_me: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5014 ac_cv_header_dbmalloc_h=no
5016 rm -f conftest.err conftest.$ac_ext
5018 echo "$as_me:5018: result: $ac_cv_header_dbmalloc_h" >&5
5019 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
5020 if test $ac_cv_header_dbmalloc_h = yes; then
5022 echo "$as_me:5022: checking for debug_malloc in -ldbmalloc" >&5
5023 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
5024 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
5025 echo $ECHO_N "(cached) $ECHO_C" >&6
5027 ac_check_lib_save_LIBS=$LIBS
5028 LIBS="-ldbmalloc $LIBS"
5029 cat >conftest.$ac_ext <<_ACEOF
5030 #line 5030 "configure"
5031 #include "confdefs.h"
5033 /* Override any gcc2 internal prototype to avoid an error. */
5037 /* We use char because int might match the return type of a gcc2
5038 builtin and then its argument prototype would still apply. */
5039 char debug_malloc ();
5048 rm -f conftest.$ac_objext conftest$ac_exeext
5049 if { (eval echo "$as_me:5049: \"$ac_link\"") >&5
5050 (eval $ac_link) 2>&5
5052 echo "$as_me:5052: \$? = $ac_status" >&5
5053 (exit $ac_status); } &&
5054 { ac_try='test -s conftest$ac_exeext'
5055 { (eval echo "$as_me:5055: \"$ac_try\"") >&5
5058 echo "$as_me:5058: \$? = $ac_status" >&5
5059 (exit $ac_status); }; }; then
5060 ac_cv_lib_dbmalloc_debug_malloc=yes
5062 echo "$as_me: failed program was:" >&5
5063 cat conftest.$ac_ext >&5
5064 ac_cv_lib_dbmalloc_debug_malloc=no
5066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5067 LIBS=$ac_check_lib_save_LIBS
5069 echo "$as_me:5069: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
5070 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
5071 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
5072 cat >>confdefs.h <<EOF
5073 #define HAVE_LIBDBMALLOC 1
5076 LIBS="-ldbmalloc $LIBS"
5084 echo "$as_me:5084: checking if you want to use valgrind for testing" >&5
5085 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
5087 # Check whether --with-valgrind or --without-valgrind was given.
5088 if test "${with_valgrind+set}" = set; then
5089 withval="$with_valgrind"
5090 cat >>confdefs.h <<\EOF
5091 #define USE_VALGRIND 1
5094 : ${with_cflags:=-g}
5095 : ${with_no_leaks:=yes}
5100 echo "$as_me:5100: result: ${with_valgrind:-no}" >&5
5101 echo "${ECHO_T}${with_valgrind:-no}" >&6
5103 case .$with_cflags in #(vi
5105 case .$CFLAGS in #(vi
5113 cf_new_extra_cppflags=
5115 for cf_add_cflags in -g
5117 case $cf_fix_cppflags in
5119 case $cf_add_cflags in #(vi
5120 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5121 case $cf_add_cflags in
5123 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5125 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5126 && test -z "${cf_tst_cflags}" \
5127 && cf_fix_cppflags=yes
5129 if test $cf_fix_cppflags = yes ; then
5130 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5132 elif test "${cf_tst_cflags}" = "\"'" ; then
5133 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5139 *$cf_add_cflags) #(vi
5142 case $cf_add_cflags in #(vi
5144 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5146 CPPFLAGS=`echo "$CPPFLAGS" | \
5147 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5148 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5152 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5157 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5162 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5164 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5166 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5167 && test -z "${cf_tst_cflags}" \
5168 && cf_fix_cppflags=no
5173 if test -n "$cf_new_cflags" ; then
5175 CFLAGS="$CFLAGS $cf_new_cflags"
5178 if test -n "$cf_new_cppflags" ; then
5180 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
5183 if test -n "$cf_new_extra_cppflags" ; then
5185 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5193 echo "$as_me:5193: checking if you want to perform memory-leak testing" >&5
5194 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
5196 # Check whether --enable-leaks or --disable-leaks was given.
5197 if test "${enable_leaks+set}" = set; then
5198 enableval="$enable_leaks"
5199 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
5201 : ${with_no_leaks:=no}
5203 echo "$as_me:5203: result: $with_no_leaks" >&5
5204 echo "${ECHO_T}$with_no_leaks" >&6
5206 if test "$with_no_leaks" = yes ; then
5207 cat >>confdefs.h <<\EOF
5211 cat >>confdefs.h <<\EOF
5212 #define YY_NO_LEAKS 1
5217 echo "$as_me:5217: checking if you want to check for wide-character functions" >&5
5218 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5220 # Check whether --enable-widec or --disable-widec was given.
5221 if test "${enable_widec+set}" = set; then
5222 enableval="$enable_widec"
5223 test "$enableval" != no && enableval=yes
5224 if test "$enableval" != "yes" ; then
5234 echo "$as_me:5234: result: $cf_enable_widec" >&5
5235 echo "${ECHO_T}$cf_enable_widec" >&6
5237 echo "$as_me:5237: checking for specific curses-directory" >&5
5238 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5240 # Check whether --with-curses-dir or --without-curses-dir was given.
5241 if test "${with_curses_dir+set}" = set; then
5242 withval="$with_curses_dir"
5243 cf_cv_curses_dir=$withval
5247 echo "$as_me:5247: result: $cf_cv_curses_dir" >&5
5248 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5250 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5253 if test "x$prefix" != xNONE; then
5254 cf_path_syntax="$prefix"
5256 cf_path_syntax="$ac_default_prefix"
5259 case ".$withval" in #(vi
5260 .\$\(*\)*|.\'*\'*) #(vi
5264 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5267 eval withval="$withval"
5268 case ".$withval" in #(vi
5270 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5275 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5278 { { echo "$as_me:5278: error: expected a pathname, not \"$withval\"" >&5
5279 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5280 { (exit 1); exit 1; }; }
5284 if test -d "$cf_cv_curses_dir"
5287 if test -n "$cf_cv_curses_dir/include" ; then
5288 for cf_add_incdir in $cf_cv_curses_dir/include
5290 while test $cf_add_incdir != /usr/include
5292 if test -d $cf_add_incdir
5295 if test -n "$CFLAGS$CPPFLAGS" ; then
5296 # a loop is needed to ensure we can add subdirs of existing dirs
5297 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5298 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5299 cf_have_incdir=yes; break
5304 if test "$cf_have_incdir" = no ; then
5305 if test "$cf_add_incdir" = /usr/local/include ; then
5306 if test "$GCC" = yes
5308 cf_save_CPPFLAGS=$CPPFLAGS
5309 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5310 cat >conftest.$ac_ext <<_ACEOF
5311 #line 5311 "configure"
5312 #include "confdefs.h"
5322 rm -f conftest.$ac_objext
5323 if { (eval echo "$as_me:5323: \"$ac_compile\"") >&5
5324 (eval $ac_compile) 2>&5
5326 echo "$as_me:5326: \$? = $ac_status" >&5
5327 (exit $ac_status); } &&
5328 { ac_try='test -s conftest.$ac_objext'
5329 { (eval echo "$as_me:5329: \"$ac_try\"") >&5
5332 echo "$as_me:5332: \$? = $ac_status" >&5
5333 (exit $ac_status); }; }; then
5336 echo "$as_me: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5340 rm -f conftest.$ac_objext conftest.$ac_ext
5341 CPPFLAGS=$cf_save_CPPFLAGS
5346 if test "$cf_have_incdir" = no ; then
5347 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5349 echo "${as_me:-configure}:5349: testing adding $cf_add_incdir to include-path ..." 1>&5
5351 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5353 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5354 test "$cf_top_incdir" = "$cf_add_incdir" && break
5355 cf_add_incdir="$cf_top_incdir"
5364 if test -n "$cf_cv_curses_dir/lib" ; then
5365 for cf_add_libdir in $cf_cv_curses_dir/lib
5367 if test $cf_add_libdir = /usr/lib ; then
5369 elif test -d $cf_add_libdir
5372 if test -n "$LDFLAGS$LIBS" ; then
5373 # a loop is needed to ensure we can add subdirs of existing dirs
5374 for cf_test_libdir in $LDFLAGS $LIBS ; do
5375 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5376 cf_have_libdir=yes; break
5380 if test "$cf_have_libdir" = no ; then
5381 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5383 echo "${as_me:-configure}:5383: testing adding $cf_add_libdir to library-path ..." 1>&5
5385 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5396 echo "$as_me:5396: checking for specified curses library type" >&5
5397 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5399 # Check whether --with-ncursesw or --without-ncursesw was given.
5400 if test "${with_ncursesw+set}" = set; then
5401 withval="$with_ncursesw"
5402 cf_cv_screen=ncursesw
5405 # Check whether --with-ncurses or --without-ncurses was given.
5406 if test "${with_ncurses+set}" = set; then
5407 withval="$with_ncurses"
5408 cf_cv_screen=ncurses
5411 # Check whether --with-pdcurses or --without-pdcurses was given.
5412 if test "${with_pdcurses+set}" = set; then
5413 withval="$with_pdcurses"
5414 cf_cv_screen=pdcurses
5417 # Check whether --with-curses-colr or --without-curses-colr was given.
5418 if test "${with_curses_colr+set}" = set; then
5419 withval="$with_curses_colr"
5420 cf_cv_screen=curses_colr
5423 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5424 if test "${with_curses_5lib+set}" = set; then
5425 withval="$with_curses_5lib"
5426 cf_cv_screen=curses_5lib
5433 echo "$as_me:5433: result: $cf_cv_screen" >&5
5434 echo "${ECHO_T}$cf_cv_screen" >&6
5436 case $cf_cv_screen in #(vi
5437 curses|curses_*) #(vi
5439 echo "$as_me:5439: checking for extra include directories" >&5
5440 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5441 if test "${cf_cv_curses_incdir+set}" = set; then
5442 echo $ECHO_N "(cached) $ECHO_C" >&6
5445 cf_cv_curses_incdir=no
5446 case $host_os in #(vi
5448 if test "x$cf_cv_screen" = "xcurses_colr"
5450 test -d /usr/include/curses_colr && \
5451 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5455 if test "x$cf_cv_screen" = "xcurses_5lib"
5457 test -d /usr/5lib && \
5458 test -d /usr/5include && \
5459 cf_cv_curses_incdir="-I/usr/5include"
5465 echo "$as_me:5465: result: $cf_cv_curses_incdir" >&5
5466 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5467 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5469 echo "$as_me:5469: checking if we have identified curses headers" >&5
5470 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5471 if test "${cf_cv_ncurses_header+set}" = set; then
5472 echo $ECHO_N "(cached) $ECHO_C" >&6
5475 cf_cv_ncurses_header=none
5478 curses.h ncurses/ncurses.h ncurses/curses.h
5480 cat >conftest.$ac_ext <<_ACEOF
5481 #line 5481 "configure"
5482 #include "confdefs.h"
5483 #include <${cf_header}>
5487 initscr(); tgoto("?", 0,0)
5492 rm -f conftest.$ac_objext
5493 if { (eval echo "$as_me:5493: \"$ac_compile\"") >&5
5494 (eval $ac_compile) 2>&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit $ac_status); } &&
5498 { ac_try='test -s conftest.$ac_objext'
5499 { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5502 echo "$as_me:5502: \$? = $ac_status" >&5
5503 (exit $ac_status); }; }; then
5504 cf_cv_ncurses_header=$cf_header; break
5506 echo "$as_me: failed program was:" >&5
5507 cat conftest.$ac_ext >&5
5509 rm -f conftest.$ac_objext conftest.$ac_ext
5513 echo "$as_me:5513: result: $cf_cv_ncurses_header" >&5
5514 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5516 if test "$cf_cv_ncurses_header" = none ; then
5517 { { echo "$as_me:5517: error: No curses header-files found" >&5
5518 echo "$as_me: error: No curses header-files found" >&2;}
5519 { (exit 1); exit 1; }; }
5522 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5524 for ac_header in $cf_cv_ncurses_header
5526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5527 echo "$as_me:5527: checking for $ac_header" >&5
5528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5530 echo $ECHO_N "(cached) $ECHO_C" >&6
5532 cat >conftest.$ac_ext <<_ACEOF
5533 #line 5533 "configure"
5534 #include "confdefs.h"
5535 #include <$ac_header>
5537 if { (eval echo "$as_me:5537: \"$ac_cpp conftest.$ac_ext\"") >&5
5538 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5540 egrep -v '^ *\+' conftest.er1 >conftest.err
5542 cat conftest.err >&5
5543 echo "$as_me:5543: \$? = $ac_status" >&5
5544 (exit $ac_status); } >/dev/null; then
5545 if test -s conftest.err; then
5546 ac_cpp_err=$ac_c_preproc_warn_flag
5553 if test -z "$ac_cpp_err"; then
5554 eval "$as_ac_Header=yes"
5556 echo "$as_me: failed program was:" >&5
5557 cat conftest.$ac_ext >&5
5558 eval "$as_ac_Header=no"
5560 rm -f conftest.err conftest.$ac_ext
5562 echo "$as_me:5562: result: `eval echo '${'$as_ac_Header'}'`" >&5
5563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5565 cat >>confdefs.h <<EOF
5566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5572 echo "$as_me:5572: checking for terminfo header" >&5
5573 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5574 if test "${cf_cv_term_header+set}" = set; then
5575 echo $ECHO_N "(cached) $ECHO_C" >&6
5578 case ${cf_cv_ncurses_header} in #(vi
5579 */ncurses.h|*/ncursesw.h) #(vi
5580 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5583 cf_term_header=term.h
5587 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5589 cat >conftest.$ac_ext <<_ACEOF
5590 #line 5590 "configure"
5591 #include "confdefs.h"
5593 #include <${cf_cv_ncurses_header:-curses.h}>
5599 int x = auto_left_margin
5604 rm -f conftest.$ac_objext
5605 if { (eval echo "$as_me:5605: \"$ac_compile\"") >&5
5606 (eval $ac_compile) 2>&5
5608 echo "$as_me:5608: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
5610 { ac_try='test -s conftest.$ac_objext'
5611 { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5614 echo "$as_me:5614: \$? = $ac_status" >&5
5615 (exit $ac_status); }; }; then
5617 cf_cv_term_header="$cf_test"
5619 echo "$as_me: failed program was:" >&5
5620 cat conftest.$ac_ext >&5
5622 cf_cv_term_header=unknown
5625 rm -f conftest.$ac_objext conftest.$ac_ext
5626 test "$cf_cv_term_header" != unknown && break
5630 echo "$as_me:5630: result: $cf_cv_term_header" >&5
5631 echo "${ECHO_T}$cf_cv_term_header" >&6
5633 # Set definitions to allow ifdef'ing to accommodate subdirectories
5635 case $cf_cv_term_header in # (vi
5637 cat >>confdefs.h <<\EOF
5638 #define HAVE_TERM_H 1
5644 case $cf_cv_term_header in # (vi
5645 ncurses/term.h) #(vi
5646 cat >>confdefs.h <<\EOF
5647 #define HAVE_NCURSES_TERM_H 1
5652 cat >>confdefs.h <<\EOF
5653 #define HAVE_NCURSESW_TERM_H 1
5659 echo "$as_me:5659: checking for ncurses version" >&5
5660 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5661 if test "${cf_cv_ncurses_version+set}" = set; then
5662 echo $ECHO_N "(cached) $ECHO_C" >&6
5665 cf_cv_ncurses_version=no
5668 if test "$cross_compiling" = yes; then
5670 # This will not work if the preprocessor splits the line after the
5671 # Autoconf token. The 'unproto' program does that.
5672 cat > conftest.$ac_ext <<EOF
5673 #include <${cf_cv_ncurses_header:-curses.h}>
5675 #ifdef NCURSES_VERSION
5676 Autoconf NCURSES_VERSION
5684 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5685 { (eval echo "$as_me:5685: \"$cf_try\"") >&5
5688 echo "$as_me:5688: \$? = $ac_status" >&5
5689 (exit $ac_status); }
5690 if test -f conftest.out ; then
5691 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5692 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5697 cat >conftest.$ac_ext <<_ACEOF
5698 #line 5698 "configure"
5699 #include "confdefs.h"
5701 #include <${cf_cv_ncurses_header:-curses.h}>
5705 FILE *fp = fopen("$cf_tempfile", "w");
5706 #ifdef NCURSES_VERSION
5707 # ifdef NCURSES_VERSION_PATCH
5708 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5710 fprintf(fp, "%s\n", NCURSES_VERSION);
5714 fprintf(fp, "old\n");
5719 ${cf_cv_main_return:-return}(0);
5722 rm -f conftest$ac_exeext
5723 if { (eval echo "$as_me:5723: \"$ac_link\"") >&5
5724 (eval $ac_link) 2>&5
5726 echo "$as_me:5726: \$? = $ac_status" >&5
5727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5728 { (eval echo "$as_me:5728: \"$ac_try\"") >&5
5731 echo "$as_me:5731: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5734 cf_cv_ncurses_version=`cat $cf_tempfile`
5736 echo "$as_me: program exited with status $ac_status" >&5
5737 echo "$as_me: failed program was:" >&5
5738 cat conftest.$ac_ext >&5
5740 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5745 echo "$as_me:5745: result: $cf_cv_ncurses_version" >&5
5746 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5747 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5751 echo "$as_me:5751: checking if we have identified curses libraries" >&5
5752 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5753 cat >conftest.$ac_ext <<_ACEOF
5754 #line 5754 "configure"
5755 #include "confdefs.h"
5756 #include <${cf_cv_ncurses_header:-curses.h}>
5760 initscr(); tgoto("?", 0,0)
5765 rm -f conftest.$ac_objext conftest$ac_exeext
5766 if { (eval echo "$as_me:5766: \"$ac_link\"") >&5
5767 (eval $ac_link) 2>&5
5769 echo "$as_me:5769: \$? = $ac_status" >&5
5770 (exit $ac_status); } &&
5771 { ac_try='test -s conftest$ac_exeext'
5772 { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5775 echo "$as_me:5775: \$? = $ac_status" >&5
5776 (exit $ac_status); }; }; then
5779 echo "$as_me: failed program was:" >&5
5780 cat conftest.$ac_ext >&5
5783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5784 echo "$as_me:5784: result: $cf_result" >&5
5785 echo "${ECHO_T}$cf_result" >&6
5787 if test "$cf_result" = no ; then
5788 case $host_os in #(vi
5790 echo "$as_me:5790: checking for tgoto in -lmytinfo" >&5
5791 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5792 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5793 echo $ECHO_N "(cached) $ECHO_C" >&6
5795 ac_check_lib_save_LIBS=$LIBS
5796 LIBS="-lmytinfo $LIBS"
5797 cat >conftest.$ac_ext <<_ACEOF
5798 #line 5798 "configure"
5799 #include "confdefs.h"
5801 /* Override any gcc2 internal prototype to avoid an error. */
5805 /* We use char because int might match the return type of a gcc2
5806 builtin and then its argument prototype would still apply. */
5816 rm -f conftest.$ac_objext conftest$ac_exeext
5817 if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
5818 (eval $ac_link) 2>&5
5820 echo "$as_me:5820: \$? = $ac_status" >&5
5821 (exit $ac_status); } &&
5822 { ac_try='test -s conftest$ac_exeext'
5823 { (eval echo "$as_me:5823: \"$ac_try\"") >&5
5826 echo "$as_me:5826: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
5828 ac_cv_lib_mytinfo_tgoto=yes
5830 echo "$as_me: failed program was:" >&5
5831 cat conftest.$ac_ext >&5
5832 ac_cv_lib_mytinfo_tgoto=no
5834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5835 LIBS=$ac_check_lib_save_LIBS
5837 echo "$as_me:5837: result: $ac_cv_lib_mytinfo_tgoto" >&5
5838 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5839 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5840 LIBS="-lmytinfo $LIBS"
5845 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5846 # next (1998), and xcurses "newer" (2000). There is no header file for
5847 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5848 # term.h) for cur_colr
5849 if test "x$cf_cv_screen" = "xcurses_colr"
5851 echo "$as_me:5851: checking for initscr in -lcur_colr" >&5
5852 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5853 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5854 echo $ECHO_N "(cached) $ECHO_C" >&6
5856 ac_check_lib_save_LIBS=$LIBS
5857 LIBS="-lcur_colr $LIBS"
5858 cat >conftest.$ac_ext <<_ACEOF
5859 #line 5859 "configure"
5860 #include "confdefs.h"
5862 /* Override any gcc2 internal prototype to avoid an error. */
5866 /* We use char because int might match the return type of a gcc2
5867 builtin and then its argument prototype would still apply. */
5877 rm -f conftest.$ac_objext conftest$ac_exeext
5878 if { (eval echo "$as_me:5878: \"$ac_link\"") >&5
5879 (eval $ac_link) 2>&5
5881 echo "$as_me:5881: \$? = $ac_status" >&5
5882 (exit $ac_status); } &&
5883 { ac_try='test -s conftest$ac_exeext'
5884 { (eval echo "$as_me:5884: \"$ac_try\"") >&5
5887 echo "$as_me:5887: \$? = $ac_status" >&5
5888 (exit $ac_status); }; }; then
5889 ac_cv_lib_cur_colr_initscr=yes
5891 echo "$as_me: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 ac_cv_lib_cur_colr_initscr=no
5895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5896 LIBS=$ac_check_lib_save_LIBS
5898 echo "$as_me:5898: result: $ac_cv_lib_cur_colr_initscr" >&5
5899 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5900 if test $ac_cv_lib_cur_colr_initscr = yes; then
5902 LIBS="-lcur_colr $LIBS"
5903 ac_cv_func_initscr=yes
5907 echo "$as_me:5907: checking for initscr in -lHcurses" >&5
5908 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5909 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5910 echo $ECHO_N "(cached) $ECHO_C" >&6
5912 ac_check_lib_save_LIBS=$LIBS
5913 LIBS="-lHcurses $LIBS"
5914 cat >conftest.$ac_ext <<_ACEOF
5915 #line 5915 "configure"
5916 #include "confdefs.h"
5918 /* Override any gcc2 internal prototype to avoid an error. */
5922 /* We use char because int might match the return type of a gcc2
5923 builtin and then its argument prototype would still apply. */
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934 if { (eval echo "$as_me:5934: \"$ac_link\"") >&5
5935 (eval $ac_link) 2>&5
5937 echo "$as_me:5937: \$? = $ac_status" >&5
5938 (exit $ac_status); } &&
5939 { ac_try='test -s conftest$ac_exeext'
5940 { (eval echo "$as_me:5940: \"$ac_try\"") >&5
5943 echo "$as_me:5943: \$? = $ac_status" >&5
5944 (exit $ac_status); }; }; then
5945 ac_cv_lib_Hcurses_initscr=yes
5947 echo "$as_me: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 ac_cv_lib_Hcurses_initscr=no
5951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5952 LIBS=$ac_check_lib_save_LIBS
5954 echo "$as_me:5954: result: $ac_cv_lib_Hcurses_initscr" >&5
5955 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5956 if test $ac_cv_lib_Hcurses_initscr = yes; then
5958 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5959 LIBS="-lHcurses $LIBS"
5960 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5961 ac_cv_func_initscr=yes
5970 case `arch 2>/dev/null` in
5975 if test -n "/lib64" ; then
5976 for cf_add_libdir in /lib64
5978 if test $cf_add_libdir = /usr/lib ; then
5980 elif test -d $cf_add_libdir
5983 if test -n "$LDFLAGS$LIBS" ; then
5984 # a loop is needed to ensure we can add subdirs of existing dirs
5985 for cf_test_libdir in $LDFLAGS $LIBS ; do
5986 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5987 cf_have_libdir=yes; break
5991 if test "$cf_have_libdir" = no ; then
5992 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5994 echo "${as_me:-configure}:5994: testing adding $cf_add_libdir to library-path ..." 1>&5
5996 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6004 if test -n "/lib" ; then
6005 for cf_add_libdir in /lib
6007 if test $cf_add_libdir = /usr/lib ; then
6009 elif test -d $cf_add_libdir
6012 if test -n "$LDFLAGS$LIBS" ; then
6013 # a loop is needed to ensure we can add subdirs of existing dirs
6014 for cf_test_libdir in $LDFLAGS $LIBS ; do
6015 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6016 cf_have_libdir=yes; break
6020 if test "$cf_have_libdir" = no ; then
6021 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6023 echo "${as_me:-configure}:6023: testing adding $cf_add_libdir to library-path ..." 1>&5
6025 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6035 if test -n "/lib" ; then
6036 for cf_add_libdir in /lib
6038 if test $cf_add_libdir = /usr/lib ; then
6040 elif test -d $cf_add_libdir
6043 if test -n "$LDFLAGS$LIBS" ; then
6044 # a loop is needed to ensure we can add subdirs of existing dirs
6045 for cf_test_libdir in $LDFLAGS $LIBS ; do
6046 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6047 cf_have_libdir=yes; break
6051 if test "$cf_have_libdir" = no ; then
6052 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6054 echo "${as_me:-configure}:6054: testing adding $cf_add_libdir to library-path ..." 1>&5
6056 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6066 if test "x$cf_cv_screen" = "xcurses_5lib"
6068 if test -d /usr/5lib ; then
6070 if test -n "/usr/5lib" ; then
6071 for cf_add_libdir in /usr/5lib
6073 if test $cf_add_libdir = /usr/lib ; then
6075 elif test -d $cf_add_libdir
6078 if test -n "$LDFLAGS$LIBS" ; then
6079 # a loop is needed to ensure we can add subdirs of existing dirs
6080 for cf_test_libdir in $LDFLAGS $LIBS ; do
6081 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6082 cf_have_libdir=yes; break
6086 if test "$cf_have_libdir" = no ; then
6087 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6089 echo "${as_me:-configure}:6089: testing adding $cf_add_libdir to library-path ..." 1>&5
6091 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6097 LIBS="-lcurses -ltermcap $LIBS"
6100 ac_cv_func_initscr=yes
6104 if test ".$ac_cv_func_initscr" != .yes ; then
6105 cf_save_LIBS="$LIBS"
6109 if test ".${cf_cv_ncurses_version:-no}" != .no
6111 cf_check_list="ncurses curses cursesX"
6113 cf_check_list="cursesX curses ncurses"
6116 # Check for library containing tgoto. Do this before curses library
6117 # because it may be needed to link the test-case for initscr.
6118 echo "$as_me:6118: checking for tgoto" >&5
6119 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6120 if test "${ac_cv_func_tgoto+set}" = set; then
6121 echo $ECHO_N "(cached) $ECHO_C" >&6
6123 cat >conftest.$ac_ext <<_ACEOF
6124 #line 6124 "configure"
6125 #include "confdefs.h"
6126 /* System header to define __stub macros and hopefully few prototypes,
6127 which can conflict with char tgoto (); below. */
6129 /* Override any gcc2 internal prototype to avoid an error. */
6133 /* We use char because int might match the return type of a gcc2
6134 builtin and then its argument prototype would still apply. */
6141 /* The GNU C library defines this for functions which it implements
6142 to always fail with ENOSYS. Some functions are actually named
6143 something starting with __ and the normal name is an alias. */
6144 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6147 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6154 rm -f conftest.$ac_objext conftest$ac_exeext
6155 if { (eval echo "$as_me:6155: \"$ac_link\"") >&5
6156 (eval $ac_link) 2>&5
6158 echo "$as_me:6158: \$? = $ac_status" >&5
6159 (exit $ac_status); } &&
6160 { ac_try='test -s conftest$ac_exeext'
6161 { (eval echo "$as_me:6161: \"$ac_try\"") >&5
6164 echo "$as_me:6164: \$? = $ac_status" >&5
6165 (exit $ac_status); }; }; then
6166 ac_cv_func_tgoto=yes
6168 echo "$as_me: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
6172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6174 echo "$as_me:6174: result: $ac_cv_func_tgoto" >&5
6175 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6176 if test $ac_cv_func_tgoto = yes; then
6177 cf_term_lib=predefined
6180 for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
6182 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6183 echo "$as_me:6183: checking for tgoto in -l$cf_term_lib" >&5
6184 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6185 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6188 ac_check_lib_save_LIBS=$LIBS
6189 LIBS="-l$cf_term_lib $LIBS"
6190 cat >conftest.$ac_ext <<_ACEOF
6191 #line 6191 "configure"
6192 #include "confdefs.h"
6194 /* Override any gcc2 internal prototype to avoid an error. */
6198 /* We use char because int might match the return type of a gcc2
6199 builtin and then its argument prototype would still apply. */
6209 rm -f conftest.$ac_objext conftest$ac_exeext
6210 if { (eval echo "$as_me:6210: \"$ac_link\"") >&5
6211 (eval $ac_link) 2>&5
6213 echo "$as_me:6213: \$? = $ac_status" >&5
6214 (exit $ac_status); } &&
6215 { ac_try='test -s conftest$ac_exeext'
6216 { (eval echo "$as_me:6216: \"$ac_try\"") >&5
6219 echo "$as_me:6219: \$? = $ac_status" >&5
6220 (exit $ac_status); }; }; then
6221 eval "$as_ac_Lib=yes"
6223 echo "$as_me: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6225 eval "$as_ac_Lib=no"
6227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6228 LIBS=$ac_check_lib_save_LIBS
6230 echo "$as_me:6230: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6231 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6232 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6240 # Check for library containing initscr
6241 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6242 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6244 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
6245 echo "$as_me:6245: checking for initscr in -l$cf_curs_lib" >&5
6246 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
6247 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6248 echo $ECHO_N "(cached) $ECHO_C" >&6
6250 ac_check_lib_save_LIBS=$LIBS
6251 LIBS="-l$cf_curs_lib $LIBS"
6252 cat >conftest.$ac_ext <<_ACEOF
6253 #line 6253 "configure"
6254 #include "confdefs.h"
6256 /* Override any gcc2 internal prototype to avoid an error. */
6260 /* We use char because int might match the return type of a gcc2
6261 builtin and then its argument prototype would still apply. */
6271 rm -f conftest.$ac_objext conftest$ac_exeext
6272 if { (eval echo "$as_me:6272: \"$ac_link\"") >&5
6273 (eval $ac_link) 2>&5
6275 echo "$as_me:6275: \$? = $ac_status" >&5
6276 (exit $ac_status); } &&
6277 { ac_try='test -s conftest$ac_exeext'
6278 { (eval echo "$as_me:6278: \"$ac_try\"") >&5
6281 echo "$as_me:6281: \$? = $ac_status" >&5
6282 (exit $ac_status); }; }; then
6283 eval "$as_ac_Lib=yes"
6285 echo "$as_me: failed program was:" >&5
6286 cat conftest.$ac_ext >&5
6287 eval "$as_ac_Lib=no"
6289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6290 LIBS=$ac_check_lib_save_LIBS
6292 echo "$as_me:6292: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6293 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6294 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6299 test $cf_curs_lib = unknown && { { echo "$as_me:6299: error: no curses library found" >&5
6300 echo "$as_me: error: no curses library found" >&2;}
6301 { (exit 1); exit 1; }; }
6303 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6304 if test "$cf_term_lib" = unknown ; then
6305 echo "$as_me:6305: checking if we can link with $cf_curs_lib library" >&5
6306 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6307 cat >conftest.$ac_ext <<_ACEOF
6308 #line 6308 "configure"
6309 #include "confdefs.h"
6310 #include <${cf_cv_ncurses_header:-curses.h}>
6319 rm -f conftest.$ac_objext conftest$ac_exeext
6320 if { (eval echo "$as_me:6320: \"$ac_link\"") >&5
6321 (eval $ac_link) 2>&5
6323 echo "$as_me:6323: \$? = $ac_status" >&5
6324 (exit $ac_status); } &&
6325 { ac_try='test -s conftest$ac_exeext'
6326 { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6329 echo "$as_me:6329: \$? = $ac_status" >&5
6330 (exit $ac_status); }; }; then
6333 echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6338 echo "$as_me:6338: result: $cf_result" >&5
6339 echo "${ECHO_T}$cf_result" >&6
6340 test $cf_result = no && { { echo "$as_me:6340: error: Cannot link curses library" >&5
6341 echo "$as_me: error: Cannot link curses library" >&2;}
6342 { (exit 1); exit 1; }; }
6343 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6345 elif test "$cf_term_lib" != predefined ; then
6346 echo "$as_me:6346: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6347 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6348 cat >conftest.$ac_ext <<_ACEOF
6349 #line 6349 "configure"
6350 #include "confdefs.h"
6351 #include <${cf_cv_ncurses_header:-curses.h}>
6355 initscr(); tgoto((char *)0, 0, 0);
6360 rm -f conftest.$ac_objext conftest$ac_exeext
6361 if { (eval echo "$as_me:6361: \"$ac_link\"") >&5
6362 (eval $ac_link) 2>&5
6364 echo "$as_me:6364: \$? = $ac_status" >&5
6365 (exit $ac_status); } &&
6366 { ac_try='test -s conftest$ac_exeext'
6367 { (eval echo "$as_me:6367: \"$ac_try\"") >&5
6370 echo "$as_me:6370: \$? = $ac_status" >&5
6371 (exit $ac_status); }; }; then
6374 echo "$as_me: failed program was:" >&5
6375 cat conftest.$ac_ext >&5
6377 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6378 cat >conftest.$ac_ext <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <${cf_cv_ncurses_header:-curses.h}>
6390 rm -f conftest.$ac_objext conftest$ac_exeext
6391 if { (eval echo "$as_me:6391: \"$ac_link\"") >&5
6392 (eval $ac_link) 2>&5
6394 echo "$as_me:6394: \$? = $ac_status" >&5
6395 (exit $ac_status); } &&
6396 { ac_try='test -s conftest$ac_exeext'
6397 { (eval echo "$as_me:6397: \"$ac_try\"") >&5
6400 echo "$as_me:6400: \$? = $ac_status" >&5
6401 (exit $ac_status); }; }; then
6404 echo "$as_me: failed program was:" >&5
6405 cat conftest.$ac_ext >&5
6408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6412 echo "$as_me:6412: result: $cf_result" >&5
6413 echo "${ECHO_T}$cf_result" >&6
6421 cf_ncuconfig_root=ncurses
6423 echo "Looking for ${cf_ncuconfig_root}-config"
6425 if test -n "$ac_tool_prefix"; then
6426 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6428 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6429 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6430 echo "$as_me:6430: checking for $ac_word" >&5
6431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6432 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6433 echo $ECHO_N "(cached) $ECHO_C" >&6
6435 if test -n "$NCURSES_CONFIG"; then
6436 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6438 ac_save_IFS=$IFS; IFS=$ac_path_separator
6440 for ac_dir in $ac_dummy; do
6442 test -z "$ac_dir" && ac_dir=.
6443 $as_executable_p "$ac_dir/$ac_word" || continue
6444 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6445 echo "$as_me:6445: found $ac_dir/$ac_word" >&5
6451 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6452 if test -n "$NCURSES_CONFIG"; then
6453 echo "$as_me:6453: result: $NCURSES_CONFIG" >&5
6454 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6456 echo "$as_me:6456: result: no" >&5
6457 echo "${ECHO_T}no" >&6
6460 test -n "$NCURSES_CONFIG" && break
6463 if test -z "$NCURSES_CONFIG"; then
6464 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6465 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6467 # Extract the first word of "$ac_prog", so it can be a program name with args.
6468 set dummy $ac_prog; ac_word=$2
6469 echo "$as_me:6469: checking for $ac_word" >&5
6470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6471 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6472 echo $ECHO_N "(cached) $ECHO_C" >&6
6474 if test -n "$ac_ct_NCURSES_CONFIG"; then
6475 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6477 ac_save_IFS=$IFS; IFS=$ac_path_separator
6479 for ac_dir in $ac_dummy; do
6481 test -z "$ac_dir" && ac_dir=.
6482 $as_executable_p "$ac_dir/$ac_word" || continue
6483 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6484 echo "$as_me:6484: found $ac_dir/$ac_word" >&5
6490 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6491 if test -n "$ac_ct_NCURSES_CONFIG"; then
6492 echo "$as_me:6492: result: $ac_ct_NCURSES_CONFIG" >&5
6493 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6495 echo "$as_me:6495: result: no" >&5
6496 echo "${ECHO_T}no" >&6
6499 test -n "$ac_ct_NCURSES_CONFIG" && break
6501 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6503 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6506 if test "$NCURSES_CONFIG" != none ; then
6508 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6509 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6511 # even with config script, some packages use no-override for curses.h
6513 echo "$as_me:6513: checking if we have identified curses headers" >&5
6514 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6515 if test "${cf_cv_ncurses_header+set}" = set; then
6516 echo $ECHO_N "(cached) $ECHO_C" >&6
6519 cf_cv_ncurses_header=none
6526 cat >conftest.$ac_ext <<_ACEOF
6527 #line 6527 "configure"
6528 #include "confdefs.h"
6529 #include <${cf_header}>
6533 initscr(); tgoto("?", 0,0)
6538 rm -f conftest.$ac_objext
6539 if { (eval echo "$as_me:6539: \"$ac_compile\"") >&5
6540 (eval $ac_compile) 2>&5
6542 echo "$as_me:6542: \$? = $ac_status" >&5
6543 (exit $ac_status); } &&
6544 { ac_try='test -s conftest.$ac_objext'
6545 { (eval echo "$as_me:6545: \"$ac_try\"") >&5
6548 echo "$as_me:6548: \$? = $ac_status" >&5
6549 (exit $ac_status); }; }; then
6550 cf_cv_ncurses_header=$cf_header; break
6552 echo "$as_me: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6555 rm -f conftest.$ac_objext conftest.$ac_ext
6559 echo "$as_me:6559: result: $cf_cv_ncurses_header" >&5
6560 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6562 if test "$cf_cv_ncurses_header" = none ; then
6563 { { echo "$as_me:6563: error: No curses header-files found" >&5
6564 echo "$as_me: error: No curses header-files found" >&2;}
6565 { (exit 1); exit 1; }; }
6568 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6570 for ac_header in $cf_cv_ncurses_header
6572 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6573 echo "$as_me:6573: checking for $ac_header" >&5
6574 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6576 echo $ECHO_N "(cached) $ECHO_C" >&6
6578 cat >conftest.$ac_ext <<_ACEOF
6579 #line 6579 "configure"
6580 #include "confdefs.h"
6581 #include <$ac_header>
6583 if { (eval echo "$as_me:6583: \"$ac_cpp conftest.$ac_ext\"") >&5
6584 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6586 egrep -v '^ *\+' conftest.er1 >conftest.err
6588 cat conftest.err >&5
6589 echo "$as_me:6589: \$? = $ac_status" >&5
6590 (exit $ac_status); } >/dev/null; then
6591 if test -s conftest.err; then
6592 ac_cpp_err=$ac_c_preproc_warn_flag
6599 if test -z "$ac_cpp_err"; then
6600 eval "$as_ac_Header=yes"
6602 echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 eval "$as_ac_Header=no"
6606 rm -f conftest.err conftest.$ac_ext
6608 echo "$as_me:6608: result: `eval echo '${'$as_ac_Header'}'`" >&5
6609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6611 cat >>confdefs.h <<EOF
6612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6618 cat >>confdefs.h <<\EOF
6622 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6624 cat >>confdefs.h <<EOF
6625 #define $cf_nculib_ROOT 1
6628 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6632 cf_ncuhdr_root=ncurses
6634 test -n "$cf_cv_curses_dir" && \
6635 test "$cf_cv_curses_dir" != "no" && { \
6637 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6638 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6640 while test $cf_add_incdir != /usr/include
6642 if test -d $cf_add_incdir
6645 if test -n "$CFLAGS$CPPFLAGS" ; then
6646 # a loop is needed to ensure we can add subdirs of existing dirs
6647 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6648 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6649 cf_have_incdir=yes; break
6654 if test "$cf_have_incdir" = no ; then
6655 if test "$cf_add_incdir" = /usr/local/include ; then
6656 if test "$GCC" = yes
6658 cf_save_CPPFLAGS=$CPPFLAGS
6659 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6660 cat >conftest.$ac_ext <<_ACEOF
6661 #line 6661 "configure"
6662 #include "confdefs.h"
6672 rm -f conftest.$ac_objext
6673 if { (eval echo "$as_me:6673: \"$ac_compile\"") >&5
6674 (eval $ac_compile) 2>&5
6676 echo "$as_me:6676: \$? = $ac_status" >&5
6677 (exit $ac_status); } &&
6678 { ac_try='test -s conftest.$ac_objext'
6679 { (eval echo "$as_me:6679: \"$ac_try\"") >&5
6682 echo "$as_me:6682: \$? = $ac_status" >&5
6683 (exit $ac_status); }; }; then
6686 echo "$as_me: failed program was:" >&5
6687 cat conftest.$ac_ext >&5
6690 rm -f conftest.$ac_objext conftest.$ac_ext
6691 CPPFLAGS=$cf_save_CPPFLAGS
6696 if test "$cf_have_incdir" = no ; then
6697 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6699 echo "${as_me:-configure}:6699: testing adding $cf_add_incdir to include-path ..." 1>&5
6701 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6703 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6704 test "$cf_top_incdir" = "$cf_add_incdir" && break
6705 cf_add_incdir="$cf_top_incdir"
6716 echo "$as_me:6716: checking for $cf_ncuhdr_root header in include-path" >&5
6717 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6718 if test "${cf_cv_ncurses_h+set}" = set; then
6719 echo $ECHO_N "(cached) $ECHO_C" >&6
6722 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6723 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6724 for cf_header in $cf_header_list
6727 cat >conftest.$ac_ext <<_ACEOF
6728 #line 6728 "configure"
6729 #include "confdefs.h"
6731 #include <$cf_header>
6736 #ifdef NCURSES_VERSION
6738 printf("%s\n", NCURSES_VERSION);
6751 rm -f conftest.$ac_objext
6752 if { (eval echo "$as_me:6752: \"$ac_compile\"") >&5
6753 (eval $ac_compile) 2>&5
6755 echo "$as_me:6755: \$? = $ac_status" >&5
6756 (exit $ac_status); } &&
6757 { ac_try='test -s conftest.$ac_objext'
6758 { (eval echo "$as_me:6758: \"$ac_try\"") >&5
6761 echo "$as_me:6761: \$? = $ac_status" >&5
6762 (exit $ac_status); }; }; then
6763 cf_cv_ncurses_h=$cf_header
6766 echo "$as_me: failed program was:" >&5
6767 cat conftest.$ac_ext >&5
6770 rm -f conftest.$ac_objext conftest.$ac_ext
6772 test "$cf_cv_ncurses_h" != no && break
6776 echo "$as_me:6776: result: $cf_cv_ncurses_h" >&5
6777 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6779 if test "$cf_cv_ncurses_h" != no ; then
6780 cf_cv_ncurses_header=$cf_cv_ncurses_h
6783 echo "$as_me:6783: checking for $cf_ncuhdr_root include-path" >&5
6784 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6785 if test "${cf_cv_ncurses_h2+set}" = set; then
6786 echo $ECHO_N "(cached) $ECHO_C" >&6
6789 test -n "$verbose" && echo
6793 # collect the current set of include-directories from compiler flags
6794 cf_header_path_list=""
6795 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6796 for cf_header_path in $CPPFLAGS $CFLAGS
6798 case $cf_header_path in #(vi
6800 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6802 test "$cf_header_path" != "NONE" && \
6803 test -d "$cf_header_path" && \
6805 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6806 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6807 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6808 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6809 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6810 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"
6813 cf_header_path_list="$cf_header_path_list $cf_search"
6819 # add the variations for the package we are looking for
6823 test "/usr" != "$prefix" && \
6825 (test $prefix = NONE || test "/usr" != "$prefix") && {
6826 test -n "$verbose" && echo " ... testing for include-directories under /usr"
6827 test -d /usr/include && cf_search="$cf_search /usr/include"
6828 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6829 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6830 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6831 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6834 test "$prefix" != "NONE" && \
6835 test -d "$prefix" && \
6837 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6838 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6839 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6840 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6841 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6842 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6845 test "/usr/local" != "$prefix" && \
6846 test -d "/usr/local" && \
6847 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6848 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
6849 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
6850 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6851 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6852 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6853 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6856 test "/opt" != "$prefix" && \
6858 (test $prefix = NONE || test "/opt" != "$prefix") && {
6859 test -n "$verbose" && echo " ... testing for include-directories under /opt"
6860 test -d /opt/include && cf_search="$cf_search /opt/include"
6861 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6862 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6863 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6864 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6867 test "$HOME" != "$prefix" && \
6868 test -d "$HOME" && \
6869 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6870 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
6871 test -d $HOME/include && cf_search="$cf_search $HOME/include"
6872 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6873 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6874 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6875 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6878 test "$includedir" != NONE && \
6879 test "$includedir" != "/usr/include" && \
6880 test -d "$includedir" && {
6881 test -d $includedir && cf_search="$cf_search $includedir"
6882 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6885 test "$oldincludedir" != NONE && \
6886 test "$oldincludedir" != "/usr/include" && \
6887 test -d "$oldincludedir" && {
6888 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6889 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6892 cf_search="$cf_search $cf_header_path_list"
6894 test -n "$verbose" && echo search path $cf_search
6895 cf_save2_CPPFLAGS="$CPPFLAGS"
6896 for cf_incdir in $cf_search
6899 if test -n "$cf_incdir" ; then
6900 for cf_add_incdir in $cf_incdir
6902 while test $cf_add_incdir != /usr/include
6904 if test -d $cf_add_incdir
6907 if test -n "$CFLAGS$CPPFLAGS" ; then
6908 # a loop is needed to ensure we can add subdirs of existing dirs
6909 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6910 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6911 cf_have_incdir=yes; break
6916 if test "$cf_have_incdir" = no ; then
6917 if test "$cf_add_incdir" = /usr/local/include ; then
6918 if test "$GCC" = yes
6920 cf_save_CPPFLAGS=$CPPFLAGS
6921 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6922 cat >conftest.$ac_ext <<_ACEOF
6923 #line 6923 "configure"
6924 #include "confdefs.h"
6934 rm -f conftest.$ac_objext
6935 if { (eval echo "$as_me:6935: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6938 echo "$as_me:6938: \$? = $ac_status" >&5
6939 (exit $ac_status); } &&
6940 { ac_try='test -s conftest.$ac_objext'
6941 { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6944 echo "$as_me:6944: \$? = $ac_status" >&5
6945 (exit $ac_status); }; }; then
6948 echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6952 rm -f conftest.$ac_objext conftest.$ac_ext
6953 CPPFLAGS=$cf_save_CPPFLAGS
6958 if test "$cf_have_incdir" = no ; then
6959 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6961 echo "${as_me:-configure}:6961: testing adding $cf_add_incdir to include-path ..." 1>&5
6963 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6965 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6966 test "$cf_top_incdir" = "$cf_add_incdir" && break
6967 cf_add_incdir="$cf_top_incdir"
6981 cat >conftest.$ac_ext <<_ACEOF
6982 #line 6982 "configure"
6983 #include "confdefs.h"
6985 #include <$cf_header>
6990 #ifdef NCURSES_VERSION
6992 printf("%s\n", NCURSES_VERSION);
7005 rm -f conftest.$ac_objext
7006 if { (eval echo "$as_me:7006: \"$ac_compile\"") >&5
7007 (eval $ac_compile) 2>&5
7009 echo "$as_me:7009: \$? = $ac_status" >&5
7010 (exit $ac_status); } &&
7011 { ac_try='test -s conftest.$ac_objext'
7012 { (eval echo "$as_me:7012: \"$ac_try\"") >&5
7015 echo "$as_me:7015: \$? = $ac_status" >&5
7016 (exit $ac_status); }; }; then
7017 cf_cv_ncurses_h2=$cf_header
7020 echo "$as_me: failed program was:" >&5
7021 cat conftest.$ac_ext >&5
7024 rm -f conftest.$ac_objext conftest.$ac_ext
7026 if test "$cf_cv_ncurses_h2" != no ; then
7027 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7028 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7031 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7033 CPPFLAGS="$cf_save2_CPPFLAGS"
7034 test "$cf_cv_ncurses_h2" != no && break
7036 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7036: error: not found" >&5
7037 echo "$as_me: error: not found" >&2;}
7038 { (exit 1); exit 1; }; }
7041 echo "$as_me:7041: result: $cf_cv_ncurses_h2" >&5
7042 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7044 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7045 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7046 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7047 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7050 if test -n "$cf_1st_incdir" ; then
7051 for cf_add_incdir in $cf_1st_incdir
7053 while test $cf_add_incdir != /usr/include
7055 if test -d $cf_add_incdir
7058 if test -n "$CFLAGS$CPPFLAGS" ; then
7059 # a loop is needed to ensure we can add subdirs of existing dirs
7060 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7061 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7062 cf_have_incdir=yes; break
7067 if test "$cf_have_incdir" = no ; then
7068 if test "$cf_add_incdir" = /usr/local/include ; then
7069 if test "$GCC" = yes
7071 cf_save_CPPFLAGS=$CPPFLAGS
7072 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7073 cat >conftest.$ac_ext <<_ACEOF
7074 #line 7074 "configure"
7075 #include "confdefs.h"
7085 rm -f conftest.$ac_objext
7086 if { (eval echo "$as_me:7086: \"$ac_compile\"") >&5
7087 (eval $ac_compile) 2>&5
7089 echo "$as_me:7089: \$? = $ac_status" >&5
7090 (exit $ac_status); } &&
7091 { ac_try='test -s conftest.$ac_objext'
7092 { (eval echo "$as_me:7092: \"$ac_try\"") >&5
7095 echo "$as_me:7095: \$? = $ac_status" >&5
7096 (exit $ac_status); }; }; then
7099 echo "$as_me: failed program was:" >&5
7100 cat conftest.$ac_ext >&5
7103 rm -f conftest.$ac_objext conftest.$ac_ext
7104 CPPFLAGS=$cf_save_CPPFLAGS
7109 if test "$cf_have_incdir" = no ; then
7110 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7112 echo "${as_me:-configure}:7112: testing adding $cf_add_incdir to include-path ..." 1>&5
7114 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7116 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7117 test "$cf_top_incdir" = "$cf_add_incdir" && break
7118 cf_add_incdir="$cf_top_incdir"
7129 # Set definitions to allow ifdef'ing for ncurses.h
7131 case $cf_cv_ncurses_header in # (vi
7133 cat >>confdefs.h <<\EOF
7134 #define HAVE_NCURSES_H 1
7140 case $cf_cv_ncurses_header in # (vi
7141 ncurses/curses.h|ncurses/ncurses.h)
7142 cat >>confdefs.h <<\EOF
7143 #define HAVE_NCURSES_NCURSES_H 1
7147 ncursesw/curses.h|ncursesw/ncurses.h)
7148 cat >>confdefs.h <<\EOF
7149 #define HAVE_NCURSESW_NCURSES_H 1
7155 echo "$as_me:7155: checking for terminfo header" >&5
7156 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7157 if test "${cf_cv_term_header+set}" = set; then
7158 echo $ECHO_N "(cached) $ECHO_C" >&6
7161 case ${cf_cv_ncurses_header} in #(vi
7162 */ncurses.h|*/ncursesw.h) #(vi
7163 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7166 cf_term_header=term.h
7170 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7172 cat >conftest.$ac_ext <<_ACEOF
7173 #line 7173 "configure"
7174 #include "confdefs.h"
7176 #include <${cf_cv_ncurses_header:-curses.h}>
7182 int x = auto_left_margin
7187 rm -f conftest.$ac_objext
7188 if { (eval echo "$as_me:7188: \"$ac_compile\"") >&5
7189 (eval $ac_compile) 2>&5
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit $ac_status); } &&
7193 { ac_try='test -s conftest.$ac_objext'
7194 { (eval echo "$as_me:7194: \"$ac_try\"") >&5
7197 echo "$as_me:7197: \$? = $ac_status" >&5
7198 (exit $ac_status); }; }; then
7200 cf_cv_term_header="$cf_test"
7202 echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7205 cf_cv_term_header=unknown
7208 rm -f conftest.$ac_objext conftest.$ac_ext
7209 test "$cf_cv_term_header" != unknown && break
7213 echo "$as_me:7213: result: $cf_cv_term_header" >&5
7214 echo "${ECHO_T}$cf_cv_term_header" >&6
7216 # Set definitions to allow ifdef'ing to accommodate subdirectories
7218 case $cf_cv_term_header in # (vi
7220 cat >>confdefs.h <<\EOF
7221 #define HAVE_TERM_H 1
7227 case $cf_cv_term_header in # (vi
7228 ncurses/term.h) #(vi
7229 cat >>confdefs.h <<\EOF
7230 #define HAVE_NCURSES_TERM_H 1
7235 cat >>confdefs.h <<\EOF
7236 #define HAVE_NCURSESW_TERM_H 1
7242 # some applications need this, but should check for NCURSES_VERSION
7243 cat >>confdefs.h <<\EOF
7247 echo "$as_me:7247: checking for ncurses version" >&5
7248 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7249 if test "${cf_cv_ncurses_version+set}" = set; then
7250 echo $ECHO_N "(cached) $ECHO_C" >&6
7253 cf_cv_ncurses_version=no
7256 if test "$cross_compiling" = yes; then
7258 # This will not work if the preprocessor splits the line after the
7259 # Autoconf token. The 'unproto' program does that.
7260 cat > conftest.$ac_ext <<EOF
7261 #include <${cf_cv_ncurses_header:-curses.h}>
7263 #ifdef NCURSES_VERSION
7264 Autoconf NCURSES_VERSION
7272 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7273 { (eval echo "$as_me:7273: \"$cf_try\"") >&5
7276 echo "$as_me:7276: \$? = $ac_status" >&5
7277 (exit $ac_status); }
7278 if test -f conftest.out ; then
7279 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7280 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7285 cat >conftest.$ac_ext <<_ACEOF
7286 #line 7286 "configure"
7287 #include "confdefs.h"
7289 #include <${cf_cv_ncurses_header:-curses.h}>
7293 FILE *fp = fopen("$cf_tempfile", "w");
7294 #ifdef NCURSES_VERSION
7295 # ifdef NCURSES_VERSION_PATCH
7296 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7298 fprintf(fp, "%s\n", NCURSES_VERSION);
7302 fprintf(fp, "old\n");
7307 ${cf_cv_main_return:-return}(0);
7310 rm -f conftest$ac_exeext
7311 if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
7312 (eval $ac_link) 2>&5
7314 echo "$as_me:7314: \$? = $ac_status" >&5
7315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7316 { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7319 echo "$as_me:7319: \$? = $ac_status" >&5
7320 (exit $ac_status); }; }; then
7322 cf_cv_ncurses_version=`cat $cf_tempfile`
7324 echo "$as_me: program exited with status $ac_status" >&5
7325 echo "$as_me: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7328 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7333 echo "$as_me:7333: result: $cf_cv_ncurses_version" >&5
7334 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7335 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7339 cf_nculib_root=ncurses
7340 # This works, except for the special case where we find gpm, but
7341 # ncurses is in a nonstandard location via $LIBS, and we really want
7344 cf_ncurses_SAVE="$LIBS"
7345 echo "$as_me:7345: checking for Gpm_Open in -lgpm" >&5
7346 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7347 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7348 echo $ECHO_N "(cached) $ECHO_C" >&6
7350 ac_check_lib_save_LIBS=$LIBS
7352 cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7356 /* Override any gcc2 internal prototype to avoid an error. */
7360 /* We use char because int might match the return type of a gcc2
7361 builtin and then its argument prototype would still apply. */
7371 rm -f conftest.$ac_objext conftest$ac_exeext
7372 if { (eval echo "$as_me:7372: \"$ac_link\"") >&5
7373 (eval $ac_link) 2>&5
7375 echo "$as_me:7375: \$? = $ac_status" >&5
7376 (exit $ac_status); } &&
7377 { ac_try='test -s conftest$ac_exeext'
7378 { (eval echo "$as_me:7378: \"$ac_try\"") >&5
7381 echo "$as_me:7381: \$? = $ac_status" >&5
7382 (exit $ac_status); }; }; then
7383 ac_cv_lib_gpm_Gpm_Open=yes
7385 echo "$as_me: failed program was:" >&5
7386 cat conftest.$ac_ext >&5
7387 ac_cv_lib_gpm_Gpm_Open=no
7389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7390 LIBS=$ac_check_lib_save_LIBS
7392 echo "$as_me:7392: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7393 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7394 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7395 echo "$as_me:7395: checking for initscr in -lgpm" >&5
7396 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7397 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7398 echo $ECHO_N "(cached) $ECHO_C" >&6
7400 ac_check_lib_save_LIBS=$LIBS
7402 cat >conftest.$ac_ext <<_ACEOF
7403 #line 7403 "configure"
7404 #include "confdefs.h"
7406 /* Override any gcc2 internal prototype to avoid an error. */
7410 /* We use char because int might match the return type of a gcc2
7411 builtin and then its argument prototype would still apply. */
7421 rm -f conftest.$ac_objext conftest$ac_exeext
7422 if { (eval echo "$as_me:7422: \"$ac_link\"") >&5
7423 (eval $ac_link) 2>&5
7425 echo "$as_me:7425: \$? = $ac_status" >&5
7426 (exit $ac_status); } &&
7427 { ac_try='test -s conftest$ac_exeext'
7428 { (eval echo "$as_me:7428: \"$ac_try\"") >&5
7431 echo "$as_me:7431: \$? = $ac_status" >&5
7432 (exit $ac_status); }; }; then
7433 ac_cv_lib_gpm_initscr=yes
7435 echo "$as_me: failed program was:" >&5
7436 cat conftest.$ac_ext >&5
7437 ac_cv_lib_gpm_initscr=no
7439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7440 LIBS=$ac_check_lib_save_LIBS
7442 echo "$as_me:7442: result: $ac_cv_lib_gpm_initscr" >&5
7443 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7444 if test $ac_cv_lib_gpm_initscr = yes; then
7445 LIBS="$cf_ncurses_SAVE"
7447 cf_ncurses_LIBS="-lgpm"
7452 case $host_os in #(vi
7454 # This is only necessary if you are linking against an obsolete
7455 # version of ncurses (but it should do no harm, since it's static).
7456 if test "$cf_nculib_root" = ncurses ; then
7457 echo "$as_me:7457: checking for tgoto in -lmytinfo" >&5
7458 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7459 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7460 echo $ECHO_N "(cached) $ECHO_C" >&6
7462 ac_check_lib_save_LIBS=$LIBS
7463 LIBS="-lmytinfo $LIBS"
7464 cat >conftest.$ac_ext <<_ACEOF
7465 #line 7465 "configure"
7466 #include "confdefs.h"
7468 /* Override any gcc2 internal prototype to avoid an error. */
7472 /* We use char because int might match the return type of a gcc2
7473 builtin and then its argument prototype would still apply. */
7483 rm -f conftest.$ac_objext conftest$ac_exeext
7484 if { (eval echo "$as_me:7484: \"$ac_link\"") >&5
7485 (eval $ac_link) 2>&5
7487 echo "$as_me:7487: \$? = $ac_status" >&5
7488 (exit $ac_status); } &&
7489 { ac_try='test -s conftest$ac_exeext'
7490 { (eval echo "$as_me:7490: \"$ac_try\"") >&5
7493 echo "$as_me:7493: \$? = $ac_status" >&5
7494 (exit $ac_status); }; }; then
7495 ac_cv_lib_mytinfo_tgoto=yes
7497 echo "$as_me: failed program was:" >&5
7498 cat conftest.$ac_ext >&5
7499 ac_cv_lib_mytinfo_tgoto=no
7501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7502 LIBS=$ac_check_lib_save_LIBS
7504 echo "$as_me:7504: result: $ac_cv_lib_mytinfo_tgoto" >&5
7505 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7506 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7507 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7514 LIBS="$cf_ncurses_LIBS $LIBS"
7516 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7518 LIBS="-l$cf_nculib_root $LIBS"
7521 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7523 echo "$as_me:7523: checking for initscr" >&5
7524 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7525 if test "${ac_cv_func_initscr+set}" = set; then
7526 echo $ECHO_N "(cached) $ECHO_C" >&6
7528 cat >conftest.$ac_ext <<_ACEOF
7529 #line 7529 "configure"
7530 #include "confdefs.h"
7531 /* System header to define __stub macros and hopefully few prototypes,
7532 which can conflict with char initscr (); below. */
7534 /* Override any gcc2 internal prototype to avoid an error. */
7538 /* We use char because int might match the return type of a gcc2
7539 builtin and then its argument prototype would still apply. */
7546 /* The GNU C library defines this for functions which it implements
7547 to always fail with ENOSYS. Some functions are actually named
7548 something starting with __ and the normal name is an alias. */
7549 #if defined (__stub_initscr) || defined (__stub___initscr)
7552 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7559 rm -f conftest.$ac_objext conftest$ac_exeext
7560 if { (eval echo "$as_me:7560: \"$ac_link\"") >&5
7561 (eval $ac_link) 2>&5
7563 echo "$as_me:7563: \$? = $ac_status" >&5
7564 (exit $ac_status); } &&
7565 { ac_try='test -s conftest$ac_exeext'
7566 { (eval echo "$as_me:7566: \"$ac_try\"") >&5
7569 echo "$as_me:7569: \$? = $ac_status" >&5
7570 (exit $ac_status); }; }; then
7571 ac_cv_func_initscr=yes
7573 echo "$as_me: failed program was:" >&5
7574 cat conftest.$ac_ext >&5
7575 ac_cv_func_initscr=no
7577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7579 echo "$as_me:7579: result: $ac_cv_func_initscr" >&5
7580 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7581 if test $ac_cv_func_initscr = yes; then
7582 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7585 cf_save_LIBS="$LIBS"
7586 echo "$as_me:7586: checking for initscr in -l$cf_nculib_root" >&5
7587 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7588 LIBS="-l$cf_nculib_root $LIBS"
7589 cat >conftest.$ac_ext <<_ACEOF
7590 #line 7590 "configure"
7591 #include "confdefs.h"
7592 #include <${cf_cv_ncurses_header:-curses.h}>
7601 rm -f conftest.$ac_objext conftest$ac_exeext
7602 if { (eval echo "$as_me:7602: \"$ac_link\"") >&5
7603 (eval $ac_link) 2>&5
7605 echo "$as_me:7605: \$? = $ac_status" >&5
7606 (exit $ac_status); } &&
7607 { ac_try='test -s conftest$ac_exeext'
7608 { (eval echo "$as_me:7608: \"$ac_try\"") >&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit $ac_status); }; }; then
7613 echo "$as_me:7613: result: yes" >&5
7614 echo "${ECHO_T}yes" >&6
7615 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7618 echo "$as_me: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7620 echo "$as_me:7620: result: no" >&5
7621 echo "${ECHO_T}no" >&6
7624 cf_library_path_list=""
7625 if test -n "${LDFLAGS}${LIBS}" ; then
7626 for cf_library_path in $LDFLAGS $LIBS
7628 case $cf_library_path in #(vi
7630 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7632 test "$cf_library_path" != "NONE" && \
7633 test -d "$cf_library_path" && \
7635 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7636 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7637 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7638 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7639 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7640 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"
7643 cf_library_path_list="$cf_library_path_list $cf_search"
7651 test "/usr" != "$prefix" && \
7653 (test $prefix = NONE || test "/usr" != "$prefix") && {
7654 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7655 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7656 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
7657 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7658 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
7659 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7662 test "$prefix" != "NONE" && \
7663 test -d "$prefix" && \
7665 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7666 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7667 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7668 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7669 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7670 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7673 test "/usr/local" != "$prefix" && \
7674 test -d "/usr/local" && \
7675 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7676 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7677 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7678 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7679 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7680 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7681 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7684 test "/opt" != "$prefix" && \
7686 (test $prefix = NONE || test "/opt" != "$prefix") && {
7687 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7688 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7689 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
7690 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7691 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
7692 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7695 test "$HOME" != "$prefix" && \
7696 test -d "$HOME" && \
7697 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7698 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
7699 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
7700 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7701 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7702 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7703 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7706 cf_search="$cf_library_path_list $cf_search"
7708 for cf_libdir in $cf_search
7710 echo "$as_me:7710: checking for -l$cf_nculib_root in $cf_libdir" >&5
7711 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7712 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7713 cat >conftest.$ac_ext <<_ACEOF
7714 #line 7714 "configure"
7715 #include "confdefs.h"
7716 #include <${cf_cv_ncurses_header:-curses.h}>
7725 rm -f conftest.$ac_objext conftest$ac_exeext
7726 if { (eval echo "$as_me:7726: \"$ac_link\"") >&5
7727 (eval $ac_link) 2>&5
7729 echo "$as_me:7729: \$? = $ac_status" >&5
7730 (exit $ac_status); } &&
7731 { ac_try='test -s conftest$ac_exeext'
7732 { (eval echo "$as_me:7732: \"$ac_try\"") >&5
7735 echo "$as_me:7735: \$? = $ac_status" >&5
7736 (exit $ac_status); }; }; then
7737 echo "$as_me:7737: result: yes" >&5
7738 echo "${ECHO_T}yes" >&6
7739 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7742 echo "$as_me: failed program was:" >&5
7743 cat conftest.$ac_ext >&5
7744 echo "$as_me:7744: result: no" >&5
7745 echo "${ECHO_T}no" >&6
7746 LIBS="$cf_save_LIBS"
7748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7756 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7758 if test $cf_found_library = no ; then
7759 { { echo "$as_me:7759: error: Cannot link $cf_nculib_root library" >&5
7760 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7761 { (exit 1); exit 1; }; }
7766 if test -n "$cf_ncurses_LIBS" ; then
7767 echo "$as_me:7767: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7768 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7769 cf_ncurses_SAVE="$LIBS"
7770 for p in $cf_ncurses_LIBS ; do
7771 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7772 if test "$q" != "$LIBS" ; then
7776 cat >conftest.$ac_ext <<_ACEOF
7777 #line 7777 "configure"
7778 #include "confdefs.h"
7779 #include <${cf_cv_ncurses_header:-curses.h}>
7783 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7788 rm -f conftest.$ac_objext conftest$ac_exeext
7789 if { (eval echo "$as_me:7789: \"$ac_link\"") >&5
7790 (eval $ac_link) 2>&5
7792 echo "$as_me:7792: \$? = $ac_status" >&5
7793 (exit $ac_status); } &&
7794 { ac_try='test -s conftest$ac_exeext'
7795 { (eval echo "$as_me:7795: \"$ac_try\"") >&5
7798 echo "$as_me:7798: \$? = $ac_status" >&5
7799 (exit $ac_status); }; }; then
7800 echo "$as_me:7800: result: yes" >&5
7801 echo "${ECHO_T}yes" >&6
7803 echo "$as_me: failed program was:" >&5
7804 cat conftest.$ac_ext >&5
7805 echo "$as_me:7805: result: no" >&5
7806 echo "${ECHO_T}no" >&6
7807 LIBS="$cf_ncurses_SAVE"
7809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7812 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7814 cat >>confdefs.h <<EOF
7815 #define $cf_nculib_ROOT 1
7823 echo "$as_me:7823: checking for multibyte character support" >&5
7824 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7825 if test "${cf_cv_utf8_lib+set}" = set; then
7826 echo $ECHO_N "(cached) $ECHO_C" >&6
7829 cf_save_LIBS="$LIBS"
7830 cat >conftest.$ac_ext <<_ACEOF
7831 #line 7831 "configure"
7832 #include "confdefs.h"
7843 rm -f conftest.$ac_objext conftest$ac_exeext
7844 if { (eval echo "$as_me:7844: \"$ac_link\"") >&5
7845 (eval $ac_link) 2>&5
7847 echo "$as_me:7847: \$? = $ac_status" >&5
7848 (exit $ac_status); } &&
7849 { ac_try='test -s conftest$ac_exeext'
7850 { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7853 echo "$as_me:7853: \$? = $ac_status" >&5
7854 (exit $ac_status); }; }; then
7857 echo "$as_me: failed program was:" >&5
7858 cat conftest.$ac_ext >&5
7860 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7861 # will be set on completion of the AC_TRY_LINK below.
7862 cf_cv_header_path_utf8=
7863 cf_cv_library_path_utf8=
7865 echo "${as_me:-configure}:7865: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7867 cf_save_LIBS="$LIBS"
7869 cat >conftest.$ac_ext <<_ACEOF
7870 #line 7870 "configure"
7871 #include "confdefs.h"
7873 #include <libutf8.h>
7882 rm -f conftest.$ac_objext conftest$ac_exeext
7883 if { (eval echo "$as_me:7883: \"$ac_link\"") >&5
7884 (eval $ac_link) 2>&5
7886 echo "$as_me:7886: \$? = $ac_status" >&5
7887 (exit $ac_status); } &&
7888 { ac_try='test -s conftest$ac_exeext'
7889 { (eval echo "$as_me:7889: \"$ac_try\"") >&5
7892 echo "$as_me:7892: \$? = $ac_status" >&5
7893 (exit $ac_status); }; }; then
7895 cf_cv_find_linkage_utf8=yes
7896 cf_cv_header_path_utf8=/usr/include
7897 cf_cv_library_path_utf8=/usr/lib
7900 echo "$as_me: failed program was:" >&5
7901 cat conftest.$ac_ext >&5
7903 LIBS="-lutf8 $cf_save_LIBS"
7905 cat >conftest.$ac_ext <<_ACEOF
7906 #line 7906 "configure"
7907 #include "confdefs.h"
7909 #include <libutf8.h>
7918 rm -f conftest.$ac_objext conftest$ac_exeext
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920 (eval $ac_link) 2>&5
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
7924 { ac_try='test -s conftest$ac_exeext'
7925 { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7931 cf_cv_find_linkage_utf8=yes
7932 cf_cv_header_path_utf8=/usr/include
7933 cf_cv_library_path_utf8=/usr/lib
7934 cf_cv_library_file_utf8="-lutf8"
7937 echo "$as_me: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7940 cf_cv_find_linkage_utf8=no
7941 LIBS="$cf_save_LIBS"
7943 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7945 echo "${as_me:-configure}:7945: testing find linkage for utf8 library ..." 1>&5
7947 echo "${as_me:-configure}:7947: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7949 cf_save_CPPFLAGS="$CPPFLAGS"
7950 cf_test_CPPFLAGS="$CPPFLAGS"
7954 # collect the current set of include-directories from compiler flags
7955 cf_header_path_list=""
7956 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7957 for cf_header_path in $CPPFLAGS $CFLAGS
7959 case $cf_header_path in #(vi
7961 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7963 test "$cf_header_path" != "NONE" && \
7964 test -d "$cf_header_path" && \
7966 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7967 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7968 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7969 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7970 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7971 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7974 cf_header_path_list="$cf_header_path_list $cf_search"
7980 # add the variations for the package we are looking for
7984 test "/usr" != "$prefix" && \
7986 (test $prefix = NONE || test "/usr" != "$prefix") && {
7987 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7988 test -d /usr/include && cf_search="$cf_search /usr/include"
7989 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
7990 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
7991 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
7992 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
7995 test "$prefix" != "NONE" && \
7996 test -d "$prefix" && \
7998 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7999 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8000 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
8001 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
8002 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
8003 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
8006 test "/usr/local" != "$prefix" && \
8007 test -d "/usr/local" && \
8008 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8009 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8010 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8011 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
8012 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
8013 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
8014 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
8017 test "/opt" != "$prefix" && \
8019 (test $prefix = NONE || test "/opt" != "$prefix") && {
8020 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8021 test -d /opt/include && cf_search="$cf_search /opt/include"
8022 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
8023 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
8024 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
8025 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
8028 test "$HOME" != "$prefix" && \
8029 test -d "$HOME" && \
8030 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8031 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8032 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8033 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
8034 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
8035 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
8036 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
8039 test "$includedir" != NONE && \
8040 test "$includedir" != "/usr/include" && \
8041 test -d "$includedir" && {
8042 test -d $includedir && cf_search="$cf_search $includedir"
8043 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8046 test "$oldincludedir" != NONE && \
8047 test "$oldincludedir" != "/usr/include" && \
8048 test -d "$oldincludedir" && {
8049 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8050 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8053 cf_search="$cf_search $cf_header_path_list"
8055 for cf_cv_header_path_utf8 in $cf_search
8057 if test -d $cf_cv_header_path_utf8 ; then
8058 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
8060 echo "${as_me:-configure}:8060: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8062 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8063 cat >conftest.$ac_ext <<_ACEOF
8064 #line 8064 "configure"
8065 #include "confdefs.h"
8067 #include <libutf8.h>
8076 rm -f conftest.$ac_objext
8077 if { (eval echo "$as_me:8077: \"$ac_compile\"") >&5
8078 (eval $ac_compile) 2>&5
8080 echo "$as_me:8080: \$? = $ac_status" >&5
8081 (exit $ac_status); } &&
8082 { ac_try='test -s conftest.$ac_objext'
8083 { (eval echo "$as_me:8083: \"$ac_try\"") >&5
8086 echo "$as_me:8086: \$? = $ac_status" >&5
8087 (exit $ac_status); }; }; then
8089 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8091 echo "${as_me:-configure}:8091: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8093 cf_cv_find_linkage_utf8=maybe
8094 cf_test_CPPFLAGS="$CPPFLAGS"
8097 echo "$as_me: failed program was:" >&5
8098 cat conftest.$ac_ext >&5
8100 CPPFLAGS="$cf_save_CPPFLAGS"
8103 rm -f conftest.$ac_objext conftest.$ac_ext
8107 if test "$cf_cv_find_linkage_utf8" = maybe ; then
8109 echo "${as_me:-configure}:8109: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8111 cf_save_LIBS="$LIBS"
8112 cf_save_LDFLAGS="$LDFLAGS"
8114 if test "$cf_cv_find_linkage_utf8" != yes ; then
8117 cf_library_path_list=""
8118 if test -n "${LDFLAGS}${LIBS}" ; then
8119 for cf_library_path in $LDFLAGS $LIBS
8121 case $cf_library_path in #(vi
8123 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8125 test "$cf_library_path" != "NONE" && \
8126 test -d "$cf_library_path" && \
8128 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8129 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8130 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
8131 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8132 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
8133 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8136 cf_library_path_list="$cf_library_path_list $cf_search"
8144 test "/usr" != "$prefix" && \
8146 (test $prefix = NONE || test "/usr" != "$prefix") && {
8147 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
8148 test -d /usr/lib && cf_search="$cf_search /usr/lib"
8149 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
8150 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
8151 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
8152 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
8155 test "$prefix" != "NONE" && \
8156 test -d "$prefix" && \
8158 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8159 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8160 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
8161 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
8162 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
8163 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
8166 test "/usr/local" != "$prefix" && \
8167 test -d "/usr/local" && \
8168 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8169 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
8170 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
8171 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
8172 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
8173 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
8174 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
8177 test "/opt" != "$prefix" && \
8179 (test $prefix = NONE || test "/opt" != "$prefix") && {
8180 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
8181 test -d /opt/lib && cf_search="$cf_search /opt/lib"
8182 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
8183 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
8184 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
8185 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
8188 test "$HOME" != "$prefix" && \
8189 test -d "$HOME" && \
8190 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8191 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
8192 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
8193 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
8194 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
8195 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
8196 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
8199 cf_search="$cf_library_path_list $cf_search"
8201 for cf_cv_library_path_utf8 in $cf_search
8203 if test -d $cf_cv_library_path_utf8 ; then
8204 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8206 echo "${as_me:-configure}:8206: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8208 CPPFLAGS="$cf_test_CPPFLAGS"
8209 LIBS="-lutf8 $cf_save_LIBS"
8210 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8211 cat >conftest.$ac_ext <<_ACEOF
8212 #line 8212 "configure"
8213 #include "confdefs.h"
8215 #include <libutf8.h>
8224 rm -f conftest.$ac_objext conftest$ac_exeext
8225 if { (eval echo "$as_me:8225: \"$ac_link\"") >&5
8226 (eval $ac_link) 2>&5
8228 echo "$as_me:8228: \$? = $ac_status" >&5
8229 (exit $ac_status); } &&
8230 { ac_try='test -s conftest$ac_exeext'
8231 { (eval echo "$as_me:8231: \"$ac_try\"") >&5
8234 echo "$as_me:8234: \$? = $ac_status" >&5
8235 (exit $ac_status); }; }; then
8237 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8239 echo "${as_me:-configure}:8239: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8241 cf_cv_find_linkage_utf8=yes
8242 cf_cv_library_file_utf8="-lutf8"
8245 echo "$as_me: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8248 CPPFLAGS="$cf_save_CPPFLAGS"
8249 LIBS="$cf_save_LIBS"
8250 LDFLAGS="$cf_save_LDFLAGS"
8253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8256 CPPFLAGS="$cf_save_CPPFLAGS"
8257 LDFLAGS="$cf_save_LDFLAGS"
8261 cf_cv_find_linkage_utf8=no
8265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8270 LIBS="$cf_save_LIBS"
8272 if test "$cf_cv_find_linkage_utf8" = yes ; then
8273 cf_cv_utf8_lib=add-on
8279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8281 echo "$as_me:8281: result: $cf_cv_utf8_lib" >&5
8282 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8284 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8286 if test "$cf_cv_utf8_lib" = "add-on" ; then
8287 cat >>confdefs.h <<\EOF
8288 #define HAVE_LIBUTF8_H 1
8291 if test -n "$cf_cv_header_path_utf8" ; then
8292 for cf_add_incdir in $cf_cv_header_path_utf8
8294 while test $cf_add_incdir != /usr/include
8296 if test -d $cf_add_incdir
8299 if test -n "$CFLAGS$CPPFLAGS" ; then
8300 # a loop is needed to ensure we can add subdirs of existing dirs
8301 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8302 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8303 cf_have_incdir=yes; break
8308 if test "$cf_have_incdir" = no ; then
8309 if test "$cf_add_incdir" = /usr/local/include ; then
8310 if test "$GCC" = yes
8312 cf_save_CPPFLAGS=$CPPFLAGS
8313 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8314 cat >conftest.$ac_ext <<_ACEOF
8315 #line 8315 "configure"
8316 #include "confdefs.h"
8326 rm -f conftest.$ac_objext
8327 if { (eval echo "$as_me:8327: \"$ac_compile\"") >&5
8328 (eval $ac_compile) 2>&5
8330 echo "$as_me:8330: \$? = $ac_status" >&5
8331 (exit $ac_status); } &&
8332 { ac_try='test -s conftest.$ac_objext'
8333 { (eval echo "$as_me:8333: \"$ac_try\"") >&5
8336 echo "$as_me:8336: \$? = $ac_status" >&5
8337 (exit $ac_status); }; }; then
8340 echo "$as_me: failed program was:" >&5
8341 cat conftest.$ac_ext >&5
8344 rm -f conftest.$ac_objext conftest.$ac_ext
8345 CPPFLAGS=$cf_save_CPPFLAGS
8350 if test "$cf_have_incdir" = no ; then
8351 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8353 echo "${as_me:-configure}:8353: testing adding $cf_add_incdir to include-path ..." 1>&5
8355 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8357 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8358 test "$cf_top_incdir" = "$cf_add_incdir" && break
8359 cf_add_incdir="$cf_top_incdir"
8368 if test -n "$cf_cv_library_path_utf8" ; then
8369 for cf_add_libdir in $cf_cv_library_path_utf8
8371 if test $cf_add_libdir = /usr/lib ; then
8373 elif test -d $cf_add_libdir
8376 if test -n "$LDFLAGS$LIBS" ; then
8377 # a loop is needed to ensure we can add subdirs of existing dirs
8378 for cf_test_libdir in $LDFLAGS $LIBS ; do
8379 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8380 cf_have_libdir=yes; break
8384 if test "$cf_have_libdir" = no ; then
8385 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8387 echo "${as_me:-configure}:8387: testing adding $cf_add_libdir to library-path ..." 1>&5
8389 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8395 LIBS="$cf_cv_library_file_utf8 $LIBS"
8398 cf_ncuconfig_root=ncursesw
8400 echo "Looking for ${cf_ncuconfig_root}-config"
8402 if test -n "$ac_tool_prefix"; then
8403 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8405 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8406 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8407 echo "$as_me:8407: checking for $ac_word" >&5
8408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8409 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8410 echo $ECHO_N "(cached) $ECHO_C" >&6
8412 if test -n "$NCURSES_CONFIG"; then
8413 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8415 ac_save_IFS=$IFS; IFS=$ac_path_separator
8417 for ac_dir in $ac_dummy; do
8419 test -z "$ac_dir" && ac_dir=.
8420 $as_executable_p "$ac_dir/$ac_word" || continue
8421 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8422 echo "$as_me:8422: found $ac_dir/$ac_word" >&5
8428 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8429 if test -n "$NCURSES_CONFIG"; then
8430 echo "$as_me:8430: result: $NCURSES_CONFIG" >&5
8431 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8433 echo "$as_me:8433: result: no" >&5
8434 echo "${ECHO_T}no" >&6
8437 test -n "$NCURSES_CONFIG" && break
8440 if test -z "$NCURSES_CONFIG"; then
8441 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8442 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8444 # Extract the first word of "$ac_prog", so it can be a program name with args.
8445 set dummy $ac_prog; ac_word=$2
8446 echo "$as_me:8446: checking for $ac_word" >&5
8447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8448 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8449 echo $ECHO_N "(cached) $ECHO_C" >&6
8451 if test -n "$ac_ct_NCURSES_CONFIG"; then
8452 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8454 ac_save_IFS=$IFS; IFS=$ac_path_separator
8456 for ac_dir in $ac_dummy; do
8458 test -z "$ac_dir" && ac_dir=.
8459 $as_executable_p "$ac_dir/$ac_word" || continue
8460 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8461 echo "$as_me:8461: found $ac_dir/$ac_word" >&5
8467 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8468 if test -n "$ac_ct_NCURSES_CONFIG"; then
8469 echo "$as_me:8469: result: $ac_ct_NCURSES_CONFIG" >&5
8470 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8472 echo "$as_me:8472: result: no" >&5
8473 echo "${ECHO_T}no" >&6
8476 test -n "$ac_ct_NCURSES_CONFIG" && break
8478 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8480 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8483 if test "$NCURSES_CONFIG" != none ; then
8485 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8486 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
8488 # even with config script, some packages use no-override for curses.h
8490 echo "$as_me:8490: checking if we have identified curses headers" >&5
8491 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8492 if test "${cf_cv_ncurses_header+set}" = set; then
8493 echo $ECHO_N "(cached) $ECHO_C" >&6
8496 cf_cv_ncurses_header=none
8498 ncursesw/ncurses.h \
8503 cat >conftest.$ac_ext <<_ACEOF
8504 #line 8504 "configure"
8505 #include "confdefs.h"
8506 #include <${cf_header}>
8510 initscr(); tgoto("?", 0,0)
8515 rm -f conftest.$ac_objext
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517 (eval $ac_compile) 2>&5
8519 echo "$as_me:8519: \$? = $ac_status" >&5
8520 (exit $ac_status); } &&
8521 { ac_try='test -s conftest.$ac_objext'
8522 { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8525 echo "$as_me:8525: \$? = $ac_status" >&5
8526 (exit $ac_status); }; }; then
8527 cf_cv_ncurses_header=$cf_header; break
8529 echo "$as_me: failed program was:" >&5
8530 cat conftest.$ac_ext >&5
8532 rm -f conftest.$ac_objext conftest.$ac_ext
8536 echo "$as_me:8536: result: $cf_cv_ncurses_header" >&5
8537 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8539 if test "$cf_cv_ncurses_header" = none ; then
8540 { { echo "$as_me:8540: error: No curses header-files found" >&5
8541 echo "$as_me: error: No curses header-files found" >&2;}
8542 { (exit 1); exit 1; }; }
8545 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8547 for ac_header in $cf_cv_ncurses_header
8549 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8550 echo "$as_me:8550: checking for $ac_header" >&5
8551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8553 echo $ECHO_N "(cached) $ECHO_C" >&6
8555 cat >conftest.$ac_ext <<_ACEOF
8556 #line 8556 "configure"
8557 #include "confdefs.h"
8558 #include <$ac_header>
8560 if { (eval echo "$as_me:8560: \"$ac_cpp conftest.$ac_ext\"") >&5
8561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8563 egrep -v '^ *\+' conftest.er1 >conftest.err
8565 cat conftest.err >&5
8566 echo "$as_me:8566: \$? = $ac_status" >&5
8567 (exit $ac_status); } >/dev/null; then
8568 if test -s conftest.err; then
8569 ac_cpp_err=$ac_c_preproc_warn_flag
8576 if test -z "$ac_cpp_err"; then
8577 eval "$as_ac_Header=yes"
8579 echo "$as_me: failed program was:" >&5
8580 cat conftest.$ac_ext >&5
8581 eval "$as_ac_Header=no"
8583 rm -f conftest.err conftest.$ac_ext
8585 echo "$as_me:8585: result: `eval echo '${'$as_ac_Header'}'`" >&5
8586 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8587 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8588 cat >>confdefs.h <<EOF
8589 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8595 cat >>confdefs.h <<\EOF
8599 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8601 cat >>confdefs.h <<EOF
8602 #define $cf_nculib_ROOT 1
8605 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8609 cf_ncuhdr_root=ncursesw
8611 test -n "$cf_cv_curses_dir" && \
8612 test "$cf_cv_curses_dir" != "no" && { \
8614 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8615 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8617 while test $cf_add_incdir != /usr/include
8619 if test -d $cf_add_incdir
8622 if test -n "$CFLAGS$CPPFLAGS" ; then
8623 # a loop is needed to ensure we can add subdirs of existing dirs
8624 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8625 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8626 cf_have_incdir=yes; break
8631 if test "$cf_have_incdir" = no ; then
8632 if test "$cf_add_incdir" = /usr/local/include ; then
8633 if test "$GCC" = yes
8635 cf_save_CPPFLAGS=$CPPFLAGS
8636 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8637 cat >conftest.$ac_ext <<_ACEOF
8638 #line 8638 "configure"
8639 #include "confdefs.h"
8649 rm -f conftest.$ac_objext
8650 if { (eval echo "$as_me:8650: \"$ac_compile\"") >&5
8651 (eval $ac_compile) 2>&5
8653 echo "$as_me:8653: \$? = $ac_status" >&5
8654 (exit $ac_status); } &&
8655 { ac_try='test -s conftest.$ac_objext'
8656 { (eval echo "$as_me:8656: \"$ac_try\"") >&5
8659 echo "$as_me:8659: \$? = $ac_status" >&5
8660 (exit $ac_status); }; }; then
8663 echo "$as_me: failed program was:" >&5
8664 cat conftest.$ac_ext >&5
8667 rm -f conftest.$ac_objext conftest.$ac_ext
8668 CPPFLAGS=$cf_save_CPPFLAGS
8673 if test "$cf_have_incdir" = no ; then
8674 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8676 echo "${as_me:-configure}:8676: testing adding $cf_add_incdir to include-path ..." 1>&5
8678 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8680 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8681 test "$cf_top_incdir" = "$cf_add_incdir" && break
8682 cf_add_incdir="$cf_top_incdir"
8693 echo "$as_me:8693: checking for $cf_ncuhdr_root header in include-path" >&5
8694 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8695 if test "${cf_cv_ncurses_h+set}" = set; then
8696 echo $ECHO_N "(cached) $ECHO_C" >&6
8699 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8700 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8701 for cf_header in $cf_header_list
8704 cat >conftest.$ac_ext <<_ACEOF
8705 #line 8705 "configure"
8706 #include "confdefs.h"
8708 #define _XOPEN_SOURCE_EXTENDED
8709 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8710 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8712 #include <$cf_header>
8717 #ifdef NCURSES_VERSION
8723 printf("%s\n", NCURSES_VERSION);
8736 rm -f conftest.$ac_objext
8737 if { (eval echo "$as_me:8737: \"$ac_compile\"") >&5
8738 (eval $ac_compile) 2>&5
8740 echo "$as_me:8740: \$? = $ac_status" >&5
8741 (exit $ac_status); } &&
8742 { ac_try='test -s conftest.$ac_objext'
8743 { (eval echo "$as_me:8743: \"$ac_try\"") >&5
8746 echo "$as_me:8746: \$? = $ac_status" >&5
8747 (exit $ac_status); }; }; then
8748 cf_cv_ncurses_h=$cf_header
8751 echo "$as_me: failed program was:" >&5
8752 cat conftest.$ac_ext >&5
8755 rm -f conftest.$ac_objext conftest.$ac_ext
8757 test "$cf_cv_ncurses_h" != no && break
8761 echo "$as_me:8761: result: $cf_cv_ncurses_h" >&5
8762 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8764 if test "$cf_cv_ncurses_h" != no ; then
8765 cf_cv_ncurses_header=$cf_cv_ncurses_h
8768 echo "$as_me:8768: checking for $cf_ncuhdr_root include-path" >&5
8769 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8770 if test "${cf_cv_ncurses_h2+set}" = set; then
8771 echo $ECHO_N "(cached) $ECHO_C" >&6
8774 test -n "$verbose" && echo
8778 # collect the current set of include-directories from compiler flags
8779 cf_header_path_list=""
8780 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8781 for cf_header_path in $CPPFLAGS $CFLAGS
8783 case $cf_header_path in #(vi
8785 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8787 test "$cf_header_path" != "NONE" && \
8788 test -d "$cf_header_path" && \
8790 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8791 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8792 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8793 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8794 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8795 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"
8798 cf_header_path_list="$cf_header_path_list $cf_search"
8804 # add the variations for the package we are looking for
8808 test "/usr" != "$prefix" && \
8810 (test $prefix = NONE || test "/usr" != "$prefix") && {
8811 test -n "$verbose" && echo " ... testing for include-directories under /usr"
8812 test -d /usr/include && cf_search="$cf_search /usr/include"
8813 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8814 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8815 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8816 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8819 test "$prefix" != "NONE" && \
8820 test -d "$prefix" && \
8822 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8823 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8824 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8825 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8826 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8827 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8830 test "/usr/local" != "$prefix" && \
8831 test -d "/usr/local" && \
8832 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8833 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8834 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8835 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8836 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8837 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8838 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8841 test "/opt" != "$prefix" && \
8843 (test $prefix = NONE || test "/opt" != "$prefix") && {
8844 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8845 test -d /opt/include && cf_search="$cf_search /opt/include"
8846 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8847 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8848 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8849 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8852 test "$HOME" != "$prefix" && \
8853 test -d "$HOME" && \
8854 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8855 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8856 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8857 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8858 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8859 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8860 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8863 test "$includedir" != NONE && \
8864 test "$includedir" != "/usr/include" && \
8865 test -d "$includedir" && {
8866 test -d $includedir && cf_search="$cf_search $includedir"
8867 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8870 test "$oldincludedir" != NONE && \
8871 test "$oldincludedir" != "/usr/include" && \
8872 test -d "$oldincludedir" && {
8873 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8874 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8877 cf_search="$cf_search $cf_header_path_list"
8879 test -n "$verbose" && echo search path $cf_search
8880 cf_save2_CPPFLAGS="$CPPFLAGS"
8881 for cf_incdir in $cf_search
8884 if test -n "$cf_incdir" ; then
8885 for cf_add_incdir in $cf_incdir
8887 while test $cf_add_incdir != /usr/include
8889 if test -d $cf_add_incdir
8892 if test -n "$CFLAGS$CPPFLAGS" ; then
8893 # a loop is needed to ensure we can add subdirs of existing dirs
8894 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8895 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8896 cf_have_incdir=yes; break
8901 if test "$cf_have_incdir" = no ; then
8902 if test "$cf_add_incdir" = /usr/local/include ; then
8903 if test "$GCC" = yes
8905 cf_save_CPPFLAGS=$CPPFLAGS
8906 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8907 cat >conftest.$ac_ext <<_ACEOF
8908 #line 8908 "configure"
8909 #include "confdefs.h"
8919 rm -f conftest.$ac_objext
8920 if { (eval echo "$as_me:8920: \"$ac_compile\"") >&5
8921 (eval $ac_compile) 2>&5
8923 echo "$as_me:8923: \$? = $ac_status" >&5
8924 (exit $ac_status); } &&
8925 { ac_try='test -s conftest.$ac_objext'
8926 { (eval echo "$as_me:8926: \"$ac_try\"") >&5
8929 echo "$as_me:8929: \$? = $ac_status" >&5
8930 (exit $ac_status); }; }; then
8933 echo "$as_me: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8937 rm -f conftest.$ac_objext conftest.$ac_ext
8938 CPPFLAGS=$cf_save_CPPFLAGS
8943 if test "$cf_have_incdir" = no ; then
8944 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8946 echo "${as_me:-configure}:8946: testing adding $cf_add_incdir to include-path ..." 1>&5
8948 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8950 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8951 test "$cf_top_incdir" = "$cf_add_incdir" && break
8952 cf_add_incdir="$cf_top_incdir"
8966 cat >conftest.$ac_ext <<_ACEOF
8967 #line 8967 "configure"
8968 #include "confdefs.h"
8970 #include <$cf_header>
8975 #ifdef NCURSES_VERSION
8977 printf("%s\n", NCURSES_VERSION);
8990 rm -f conftest.$ac_objext
8991 if { (eval echo "$as_me:8991: \"$ac_compile\"") >&5
8992 (eval $ac_compile) 2>&5
8994 echo "$as_me:8994: \$? = $ac_status" >&5
8995 (exit $ac_status); } &&
8996 { ac_try='test -s conftest.$ac_objext'
8997 { (eval echo "$as_me:8997: \"$ac_try\"") >&5
9000 echo "$as_me:9000: \$? = $ac_status" >&5
9001 (exit $ac_status); }; }; then
9002 cf_cv_ncurses_h2=$cf_header
9005 echo "$as_me: failed program was:" >&5
9006 cat conftest.$ac_ext >&5
9009 rm -f conftest.$ac_objext conftest.$ac_ext
9011 if test "$cf_cv_ncurses_h2" != no ; then
9012 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9013 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9016 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9018 CPPFLAGS="$cf_save2_CPPFLAGS"
9019 test "$cf_cv_ncurses_h2" != no && break
9021 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9021: error: not found" >&5
9022 echo "$as_me: error: not found" >&2;}
9023 { (exit 1); exit 1; }; }
9026 echo "$as_me:9026: result: $cf_cv_ncurses_h2" >&5
9027 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9029 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9030 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9031 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9032 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9035 if test -n "$cf_1st_incdir" ; then
9036 for cf_add_incdir in $cf_1st_incdir
9038 while test $cf_add_incdir != /usr/include
9040 if test -d $cf_add_incdir
9043 if test -n "$CFLAGS$CPPFLAGS" ; then
9044 # a loop is needed to ensure we can add subdirs of existing dirs
9045 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9046 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9047 cf_have_incdir=yes; break
9052 if test "$cf_have_incdir" = no ; then
9053 if test "$cf_add_incdir" = /usr/local/include ; then
9054 if test "$GCC" = yes
9056 cf_save_CPPFLAGS=$CPPFLAGS
9057 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9058 cat >conftest.$ac_ext <<_ACEOF
9059 #line 9059 "configure"
9060 #include "confdefs.h"
9070 rm -f conftest.$ac_objext
9071 if { (eval echo "$as_me:9071: \"$ac_compile\"") >&5
9072 (eval $ac_compile) 2>&5
9074 echo "$as_me:9074: \$? = $ac_status" >&5
9075 (exit $ac_status); } &&
9076 { ac_try='test -s conftest.$ac_objext'
9077 { (eval echo "$as_me:9077: \"$ac_try\"") >&5
9080 echo "$as_me:9080: \$? = $ac_status" >&5
9081 (exit $ac_status); }; }; then
9084 echo "$as_me: failed program was:" >&5
9085 cat conftest.$ac_ext >&5
9088 rm -f conftest.$ac_objext conftest.$ac_ext
9089 CPPFLAGS=$cf_save_CPPFLAGS
9094 if test "$cf_have_incdir" = no ; then
9095 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9097 echo "${as_me:-configure}:9097: testing adding $cf_add_incdir to include-path ..." 1>&5
9099 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9101 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9102 test "$cf_top_incdir" = "$cf_add_incdir" && break
9103 cf_add_incdir="$cf_top_incdir"
9114 # Set definitions to allow ifdef'ing for ncurses.h
9116 case $cf_cv_ncurses_header in # (vi
9118 cat >>confdefs.h <<\EOF
9119 #define HAVE_NCURSES_H 1
9125 case $cf_cv_ncurses_header in # (vi
9126 ncurses/curses.h|ncurses/ncurses.h)
9127 cat >>confdefs.h <<\EOF
9128 #define HAVE_NCURSES_NCURSES_H 1
9132 ncursesw/curses.h|ncursesw/ncurses.h)
9133 cat >>confdefs.h <<\EOF
9134 #define HAVE_NCURSESW_NCURSES_H 1
9140 echo "$as_me:9140: checking for terminfo header" >&5
9141 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9142 if test "${cf_cv_term_header+set}" = set; then
9143 echo $ECHO_N "(cached) $ECHO_C" >&6
9146 case ${cf_cv_ncurses_header} in #(vi
9147 */ncurses.h|*/ncursesw.h) #(vi
9148 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9151 cf_term_header=term.h
9155 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9157 cat >conftest.$ac_ext <<_ACEOF
9158 #line 9158 "configure"
9159 #include "confdefs.h"
9161 #include <${cf_cv_ncurses_header:-curses.h}>
9167 int x = auto_left_margin
9172 rm -f conftest.$ac_objext
9173 if { (eval echo "$as_me:9173: \"$ac_compile\"") >&5
9174 (eval $ac_compile) 2>&5
9176 echo "$as_me:9176: \$? = $ac_status" >&5
9177 (exit $ac_status); } &&
9178 { ac_try='test -s conftest.$ac_objext'
9179 { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9182 echo "$as_me:9182: \$? = $ac_status" >&5
9183 (exit $ac_status); }; }; then
9185 cf_cv_term_header="$cf_test"
9187 echo "$as_me: failed program was:" >&5
9188 cat conftest.$ac_ext >&5
9190 cf_cv_term_header=unknown
9193 rm -f conftest.$ac_objext conftest.$ac_ext
9194 test "$cf_cv_term_header" != unknown && break
9198 echo "$as_me:9198: result: $cf_cv_term_header" >&5
9199 echo "${ECHO_T}$cf_cv_term_header" >&6
9201 # Set definitions to allow ifdef'ing to accommodate subdirectories
9203 case $cf_cv_term_header in # (vi
9205 cat >>confdefs.h <<\EOF
9206 #define HAVE_TERM_H 1
9212 case $cf_cv_term_header in # (vi
9213 ncurses/term.h) #(vi
9214 cat >>confdefs.h <<\EOF
9215 #define HAVE_NCURSES_TERM_H 1
9220 cat >>confdefs.h <<\EOF
9221 #define HAVE_NCURSESW_TERM_H 1
9227 # some applications need this, but should check for NCURSES_VERSION
9228 cat >>confdefs.h <<\EOF
9232 echo "$as_me:9232: checking for ncurses version" >&5
9233 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9234 if test "${cf_cv_ncurses_version+set}" = set; then
9235 echo $ECHO_N "(cached) $ECHO_C" >&6
9238 cf_cv_ncurses_version=no
9241 if test "$cross_compiling" = yes; then
9243 # This will not work if the preprocessor splits the line after the
9244 # Autoconf token. The 'unproto' program does that.
9245 cat > conftest.$ac_ext <<EOF
9246 #include <${cf_cv_ncurses_header:-curses.h}>
9248 #ifdef NCURSES_VERSION
9249 Autoconf NCURSES_VERSION
9257 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9258 { (eval echo "$as_me:9258: \"$cf_try\"") >&5
9261 echo "$as_me:9261: \$? = $ac_status" >&5
9262 (exit $ac_status); }
9263 if test -f conftest.out ; then
9264 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9265 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9270 cat >conftest.$ac_ext <<_ACEOF
9271 #line 9271 "configure"
9272 #include "confdefs.h"
9274 #include <${cf_cv_ncurses_header:-curses.h}>
9278 FILE *fp = fopen("$cf_tempfile", "w");
9279 #ifdef NCURSES_VERSION
9280 # ifdef NCURSES_VERSION_PATCH
9281 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9283 fprintf(fp, "%s\n", NCURSES_VERSION);
9287 fprintf(fp, "old\n");
9292 ${cf_cv_main_return:-return}(0);
9295 rm -f conftest$ac_exeext
9296 if { (eval echo "$as_me:9296: \"$ac_link\"") >&5
9297 (eval $ac_link) 2>&5
9299 echo "$as_me:9299: \$? = $ac_status" >&5
9300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9301 { (eval echo "$as_me:9301: \"$ac_try\"") >&5
9304 echo "$as_me:9304: \$? = $ac_status" >&5
9305 (exit $ac_status); }; }; then
9307 cf_cv_ncurses_version=`cat $cf_tempfile`
9309 echo "$as_me: program exited with status $ac_status" >&5
9310 echo "$as_me: failed program was:" >&5
9311 cat conftest.$ac_ext >&5
9313 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9318 echo "$as_me:9318: result: $cf_cv_ncurses_version" >&5
9319 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9320 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
9324 cf_nculib_root=ncursesw
9325 # This works, except for the special case where we find gpm, but
9326 # ncurses is in a nonstandard location via $LIBS, and we really want
9329 cf_ncurses_SAVE="$LIBS"
9330 echo "$as_me:9330: checking for Gpm_Open in -lgpm" >&5
9331 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9332 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9333 echo $ECHO_N "(cached) $ECHO_C" >&6
9335 ac_check_lib_save_LIBS=$LIBS
9337 cat >conftest.$ac_ext <<_ACEOF
9338 #line 9338 "configure"
9339 #include "confdefs.h"
9341 /* Override any gcc2 internal prototype to avoid an error. */
9345 /* We use char because int might match the return type of a gcc2
9346 builtin and then its argument prototype would still apply. */
9356 rm -f conftest.$ac_objext conftest$ac_exeext
9357 if { (eval echo "$as_me:9357: \"$ac_link\"") >&5
9358 (eval $ac_link) 2>&5
9360 echo "$as_me:9360: \$? = $ac_status" >&5
9361 (exit $ac_status); } &&
9362 { ac_try='test -s conftest$ac_exeext'
9363 { (eval echo "$as_me:9363: \"$ac_try\"") >&5
9366 echo "$as_me:9366: \$? = $ac_status" >&5
9367 (exit $ac_status); }; }; then
9368 ac_cv_lib_gpm_Gpm_Open=yes
9370 echo "$as_me: failed program was:" >&5
9371 cat conftest.$ac_ext >&5
9372 ac_cv_lib_gpm_Gpm_Open=no
9374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9375 LIBS=$ac_check_lib_save_LIBS
9377 echo "$as_me:9377: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9378 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9379 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9380 echo "$as_me:9380: checking for initscr in -lgpm" >&5
9381 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9382 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9383 echo $ECHO_N "(cached) $ECHO_C" >&6
9385 ac_check_lib_save_LIBS=$LIBS
9387 cat >conftest.$ac_ext <<_ACEOF
9388 #line 9388 "configure"
9389 #include "confdefs.h"
9391 /* Override any gcc2 internal prototype to avoid an error. */
9395 /* We use char because int might match the return type of a gcc2
9396 builtin and then its argument prototype would still apply. */
9406 rm -f conftest.$ac_objext conftest$ac_exeext
9407 if { (eval echo "$as_me:9407: \"$ac_link\"") >&5
9408 (eval $ac_link) 2>&5
9410 echo "$as_me:9410: \$? = $ac_status" >&5
9411 (exit $ac_status); } &&
9412 { ac_try='test -s conftest$ac_exeext'
9413 { (eval echo "$as_me:9413: \"$ac_try\"") >&5
9416 echo "$as_me:9416: \$? = $ac_status" >&5
9417 (exit $ac_status); }; }; then
9418 ac_cv_lib_gpm_initscr=yes
9420 echo "$as_me: failed program was:" >&5
9421 cat conftest.$ac_ext >&5
9422 ac_cv_lib_gpm_initscr=no
9424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9425 LIBS=$ac_check_lib_save_LIBS
9427 echo "$as_me:9427: result: $ac_cv_lib_gpm_initscr" >&5
9428 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9429 if test $ac_cv_lib_gpm_initscr = yes; then
9430 LIBS="$cf_ncurses_SAVE"
9432 cf_ncurses_LIBS="-lgpm"
9437 case $host_os in #(vi
9439 # This is only necessary if you are linking against an obsolete
9440 # version of ncurses (but it should do no harm, since it's static).
9441 if test "$cf_nculib_root" = ncurses ; then
9442 echo "$as_me:9442: checking for tgoto in -lmytinfo" >&5
9443 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9444 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9445 echo $ECHO_N "(cached) $ECHO_C" >&6
9447 ac_check_lib_save_LIBS=$LIBS
9448 LIBS="-lmytinfo $LIBS"
9449 cat >conftest.$ac_ext <<_ACEOF
9450 #line 9450 "configure"
9451 #include "confdefs.h"
9453 /* Override any gcc2 internal prototype to avoid an error. */
9457 /* We use char because int might match the return type of a gcc2
9458 builtin and then its argument prototype would still apply. */
9468 rm -f conftest.$ac_objext conftest$ac_exeext
9469 if { (eval echo "$as_me:9469: \"$ac_link\"") >&5
9470 (eval $ac_link) 2>&5
9472 echo "$as_me:9472: \$? = $ac_status" >&5
9473 (exit $ac_status); } &&
9474 { ac_try='test -s conftest$ac_exeext'
9475 { (eval echo "$as_me:9475: \"$ac_try\"") >&5
9478 echo "$as_me:9478: \$? = $ac_status" >&5
9479 (exit $ac_status); }; }; then
9480 ac_cv_lib_mytinfo_tgoto=yes
9482 echo "$as_me: failed program was:" >&5
9483 cat conftest.$ac_ext >&5
9484 ac_cv_lib_mytinfo_tgoto=no
9486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9487 LIBS=$ac_check_lib_save_LIBS
9489 echo "$as_me:9489: result: $ac_cv_lib_mytinfo_tgoto" >&5
9490 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9491 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9492 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9499 LIBS="$cf_ncurses_LIBS $LIBS"
9501 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9503 LIBS="-l$cf_nculib_root $LIBS"
9506 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9508 echo "$as_me:9508: checking for initscr" >&5
9509 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9510 if test "${ac_cv_func_initscr+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516 /* System header to define __stub macros and hopefully few prototypes,
9517 which can conflict with char initscr (); below. */
9519 /* Override any gcc2 internal prototype to avoid an error. */
9523 /* We use char because int might match the return type of a gcc2
9524 builtin and then its argument prototype would still apply. */
9531 /* The GNU C library defines this for functions which it implements
9532 to always fail with ENOSYS. Some functions are actually named
9533 something starting with __ and the normal name is an alias. */
9534 #if defined (__stub_initscr) || defined (__stub___initscr)
9537 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9544 rm -f conftest.$ac_objext conftest$ac_exeext
9545 if { (eval echo "$as_me:9545: \"$ac_link\"") >&5
9546 (eval $ac_link) 2>&5
9548 echo "$as_me:9548: \$? = $ac_status" >&5
9549 (exit $ac_status); } &&
9550 { ac_try='test -s conftest$ac_exeext'
9551 { (eval echo "$as_me:9551: \"$ac_try\"") >&5
9554 echo "$as_me:9554: \$? = $ac_status" >&5
9555 (exit $ac_status); }; }; then
9556 ac_cv_func_initscr=yes
9558 echo "$as_me: failed program was:" >&5
9559 cat conftest.$ac_ext >&5
9560 ac_cv_func_initscr=no
9562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9564 echo "$as_me:9564: result: $ac_cv_func_initscr" >&5
9565 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9566 if test $ac_cv_func_initscr = yes; then
9567 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9570 cf_save_LIBS="$LIBS"
9571 echo "$as_me:9571: checking for initscr in -l$cf_nculib_root" >&5
9572 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9573 LIBS="-l$cf_nculib_root $LIBS"
9574 cat >conftest.$ac_ext <<_ACEOF
9575 #line 9575 "configure"
9576 #include "confdefs.h"
9577 #include <${cf_cv_ncurses_header:-curses.h}>
9586 rm -f conftest.$ac_objext conftest$ac_exeext
9587 if { (eval echo "$as_me:9587: \"$ac_link\"") >&5
9588 (eval $ac_link) 2>&5
9590 echo "$as_me:9590: \$? = $ac_status" >&5
9591 (exit $ac_status); } &&
9592 { ac_try='test -s conftest$ac_exeext'
9593 { (eval echo "$as_me:9593: \"$ac_try\"") >&5
9596 echo "$as_me:9596: \$? = $ac_status" >&5
9597 (exit $ac_status); }; }; then
9598 echo "$as_me:9598: result: yes" >&5
9599 echo "${ECHO_T}yes" >&6
9600 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9603 echo "$as_me: failed program was:" >&5
9604 cat conftest.$ac_ext >&5
9605 echo "$as_me:9605: result: no" >&5
9606 echo "${ECHO_T}no" >&6
9609 cf_library_path_list=""
9610 if test -n "${LDFLAGS}${LIBS}" ; then
9611 for cf_library_path in $LDFLAGS $LIBS
9613 case $cf_library_path in #(vi
9615 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9617 test "$cf_library_path" != "NONE" && \
9618 test -d "$cf_library_path" && \
9620 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9621 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9622 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9623 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9624 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9625 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"
9628 cf_library_path_list="$cf_library_path_list $cf_search"
9636 test "/usr" != "$prefix" && \
9638 (test $prefix = NONE || test "/usr" != "$prefix") && {
9639 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
9640 test -d /usr/lib && cf_search="$cf_search /usr/lib"
9641 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
9642 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9643 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
9644 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9647 test "$prefix" != "NONE" && \
9648 test -d "$prefix" && \
9650 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9651 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9652 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9653 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9654 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9655 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9658 test "/usr/local" != "$prefix" && \
9659 test -d "/usr/local" && \
9660 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9661 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
9662 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
9663 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9664 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9665 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9666 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9669 test "/opt" != "$prefix" && \
9671 (test $prefix = NONE || test "/opt" != "$prefix") && {
9672 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
9673 test -d /opt/lib && cf_search="$cf_search /opt/lib"
9674 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
9675 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9676 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
9677 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9680 test "$HOME" != "$prefix" && \
9681 test -d "$HOME" && \
9682 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9683 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
9684 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
9685 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9686 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9687 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9688 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9691 cf_search="$cf_library_path_list $cf_search"
9693 for cf_libdir in $cf_search
9695 echo "$as_me:9695: checking for -l$cf_nculib_root in $cf_libdir" >&5
9696 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9697 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9698 cat >conftest.$ac_ext <<_ACEOF
9699 #line 9699 "configure"
9700 #include "confdefs.h"
9701 #include <${cf_cv_ncurses_header:-curses.h}>
9710 rm -f conftest.$ac_objext conftest$ac_exeext
9711 if { (eval echo "$as_me:9711: \"$ac_link\"") >&5
9712 (eval $ac_link) 2>&5
9714 echo "$as_me:9714: \$? = $ac_status" >&5
9715 (exit $ac_status); } &&
9716 { ac_try='test -s conftest$ac_exeext'
9717 { (eval echo "$as_me:9717: \"$ac_try\"") >&5
9720 echo "$as_me:9720: \$? = $ac_status" >&5
9721 (exit $ac_status); }; }; then
9722 echo "$as_me:9722: result: yes" >&5
9723 echo "${ECHO_T}yes" >&6
9724 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9727 echo "$as_me: failed program was:" >&5
9728 cat conftest.$ac_ext >&5
9729 echo "$as_me:9729: result: no" >&5
9730 echo "${ECHO_T}no" >&6
9731 LIBS="$cf_save_LIBS"
9733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9741 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9743 if test $cf_found_library = no ; then
9744 { { echo "$as_me:9744: error: Cannot link $cf_nculib_root library" >&5
9745 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9746 { (exit 1); exit 1; }; }
9751 if test -n "$cf_ncurses_LIBS" ; then
9752 echo "$as_me:9752: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9753 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9754 cf_ncurses_SAVE="$LIBS"
9755 for p in $cf_ncurses_LIBS ; do
9756 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9757 if test "$q" != "$LIBS" ; then
9761 cat >conftest.$ac_ext <<_ACEOF
9762 #line 9762 "configure"
9763 #include "confdefs.h"
9764 #include <${cf_cv_ncurses_header:-curses.h}>
9768 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9773 rm -f conftest.$ac_objext conftest$ac_exeext
9774 if { (eval echo "$as_me:9774: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9777 echo "$as_me:9777: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:9780: \"$ac_try\"") >&5
9783 echo "$as_me:9783: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785 echo "$as_me:9785: result: yes" >&5
9786 echo "${ECHO_T}yes" >&6
9788 echo "$as_me: failed program was:" >&5
9789 cat conftest.$ac_ext >&5
9790 echo "$as_me:9790: result: no" >&5
9791 echo "${ECHO_T}no" >&6
9792 LIBS="$cf_ncurses_SAVE"
9794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9797 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9799 cat >>confdefs.h <<EOF
9800 #define $cf_nculib_ROOT 1
9808 echo "$as_me:9808: checking if you want to use pkg-config" >&5
9809 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9811 # Check whether --with-pkg-config or --without-pkg-config was given.
9812 if test "${with_pkg_config+set}" = set; then
9813 withval="$with_pkg_config"
9814 cf_pkg_config=$withval
9818 echo "$as_me:9818: result: $cf_pkg_config" >&5
9819 echo "${ECHO_T}$cf_pkg_config" >&6
9821 case $cf_pkg_config in #(vi
9827 if test -n "$ac_tool_prefix"; then
9828 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9829 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9830 echo "$as_me:9830: checking for $ac_word" >&5
9831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9832 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9833 echo $ECHO_N "(cached) $ECHO_C" >&6
9837 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9840 ac_save_IFS=$IFS; IFS=$ac_path_separator
9842 for ac_dir in $ac_dummy; do
9844 test -z "$ac_dir" && ac_dir=.
9845 if $as_executable_p "$ac_dir/$ac_word"; then
9846 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9847 echo "$as_me:9847: found $ac_dir/$ac_word" >&5
9855 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9857 if test -n "$PKG_CONFIG"; then
9858 echo "$as_me:9858: result: $PKG_CONFIG" >&5
9859 echo "${ECHO_T}$PKG_CONFIG" >&6
9861 echo "$as_me:9861: result: no" >&5
9862 echo "${ECHO_T}no" >&6
9866 if test -z "$ac_cv_path_PKG_CONFIG"; then
9867 ac_pt_PKG_CONFIG=$PKG_CONFIG
9868 # Extract the first word of "pkg-config", so it can be a program name with args.
9869 set dummy pkg-config; ac_word=$2
9870 echo "$as_me:9870: checking for $ac_word" >&5
9871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9872 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
9875 case $ac_pt_PKG_CONFIG in
9877 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9880 ac_save_IFS=$IFS; IFS=$ac_path_separator
9882 for ac_dir in $ac_dummy; do
9884 test -z "$ac_dir" && ac_dir=.
9885 if $as_executable_p "$ac_dir/$ac_word"; then
9886 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9887 echo "$as_me:9887: found $ac_dir/$ac_word" >&5
9892 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9896 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9898 if test -n "$ac_pt_PKG_CONFIG"; then
9899 echo "$as_me:9899: result: $ac_pt_PKG_CONFIG" >&5
9900 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9902 echo "$as_me:9902: result: no" >&5
9903 echo "${ECHO_T}no" >&6
9906 PKG_CONFIG=$ac_pt_PKG_CONFIG
9908 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9917 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9918 if test "$PKG_CONFIG" != none ; then
9920 if test "x$prefix" != xNONE; then
9921 cf_path_syntax="$prefix"
9923 cf_path_syntax="$ac_default_prefix"
9926 case ".$PKG_CONFIG" in #(vi
9927 .\$\(*\)*|.\'*\'*) #(vi
9931 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9934 eval PKG_CONFIG="$PKG_CONFIG"
9935 case ".$PKG_CONFIG" in #(vi
9937 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9942 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9945 { { echo "$as_me:9945: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9946 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9947 { (exit 1); exit 1; }; }
9953 echo "$as_me:9953: checking for X" >&5
9954 echo $ECHO_N "checking for X... $ECHO_C" >&6
9956 # Check whether --with-x or --without-x was given.
9957 if test "${with_x+set}" = set; then
9961 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9962 if test "x$with_x" = xno; then
9963 # The user explicitly disabled X.
9966 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9967 # Both variables are already set.
9970 if test "${ac_cv_have_x+set}" = set; then
9971 echo $ECHO_N "(cached) $ECHO_C" >&6
9973 # One or both of the vars are not set, and there is no cached value.
9974 ac_x_includes=no ac_x_libraries=no
9976 if mkdir conftest.dir; then
9978 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9979 cat >Imakefile <<'EOF'
9981 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9983 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9984 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9985 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9986 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9987 for ac_extension in a so sl dylib dll; do
9988 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9989 test -f $ac_im_libdir/libX11.$ac_extension; then
9990 ac_im_usrlibdir=$ac_im_libdir; break
9993 # Screen out bogus values from the imake configuration. They are
9994 # bogus both because they are the default anyway, and because
9995 # using them would break gcc on systems where it needs fixed includes.
9996 case $ac_im_incroot in
9998 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10000 case $ac_im_usrlibdir in
10001 /usr/lib | /lib) ;;
10002 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10006 rm -fr conftest.dir
10009 # Standard set of common directories for X headers.
10010 # Check X11 before X11Rn because it is often a symlink to the current release.
10022 /usr/local/X11/include
10023 /usr/local/X11R6/include
10024 /usr/local/X11R5/include
10025 /usr/local/X11R4/include
10027 /usr/local/include/X11
10028 /usr/local/include/X11R6
10029 /usr/local/include/X11R5
10030 /usr/local/include/X11R4
10034 /usr/XFree86/include/X11
10038 /usr/unsupported/include
10039 /usr/athena/include
10040 /usr/local/x11r5/include
10041 /usr/lpp/Xamples/include
10043 /usr/openwin/include
10044 /usr/openwin/share/include'
10046 if test "$ac_x_includes" = no; then
10047 # Guess where to find include files, by looking for Intrinsic.h.
10048 # First, try using that file with no special directory specified.
10049 cat >conftest.$ac_ext <<_ACEOF
10050 #line 10050 "configure"
10051 #include "confdefs.h"
10052 #include <X11/Intrinsic.h>
10054 if { (eval echo "$as_me:10054: \"$ac_cpp conftest.$ac_ext\"") >&5
10055 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10057 egrep -v '^ *\+' conftest.er1 >conftest.err
10059 cat conftest.err >&5
10060 echo "$as_me:10060: \$? = $ac_status" >&5
10061 (exit $ac_status); } >/dev/null; then
10062 if test -s conftest.err; then
10063 ac_cpp_err=$ac_c_preproc_warn_flag
10070 if test -z "$ac_cpp_err"; then
10071 # We can compile using X headers with no special include directory.
10074 echo "$as_me: failed program was:" >&5
10075 cat conftest.$ac_ext >&5
10076 for ac_dir in $ac_x_header_dirs; do
10077 if test -r "$ac_dir/X11/Intrinsic.h"; then
10078 ac_x_includes=$ac_dir
10083 rm -f conftest.err conftest.$ac_ext
10084 fi # $ac_x_includes = no
10086 if test "$ac_x_libraries" = no; then
10087 # Check for the libraries.
10088 # See if we find them without any special options.
10089 # Don't add to $LIBS permanently.
10092 cat >conftest.$ac_ext <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10095 #include <X11/Intrinsic.h>
10104 rm -f conftest.$ac_objext conftest$ac_exeext
10105 if { (eval echo "$as_me:10105: \"$ac_link\"") >&5
10106 (eval $ac_link) 2>&5
10108 echo "$as_me:10108: \$? = $ac_status" >&5
10109 (exit $ac_status); } &&
10110 { ac_try='test -s conftest$ac_exeext'
10111 { (eval echo "$as_me:10111: \"$ac_try\"") >&5
10112 (eval $ac_try) 2>&5
10114 echo "$as_me:10114: \$? = $ac_status" >&5
10115 (exit $ac_status); }; }; then
10117 # We can link X programs with no special library path.
10120 echo "$as_me: failed program was:" >&5
10121 cat conftest.$ac_ext >&5
10123 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10125 # Don't even attempt the hair of trying to link an X program!
10126 for ac_extension in a so sl dylib dll; do
10127 if test -r $ac_dir/libXt.$ac_extension; then
10128 ac_x_libraries=$ac_dir
10134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10135 fi # $ac_x_libraries = no
10137 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10138 # Didn't find X anywhere. Cache the known absence of X.
10139 ac_cv_have_x="have_x=no"
10141 # Record where we found X for the cache.
10142 ac_cv_have_x="have_x=yes \
10143 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10148 eval "$ac_cv_have_x"
10151 if test "$have_x" != yes; then
10152 echo "$as_me:10152: result: $have_x" >&5
10153 echo "${ECHO_T}$have_x" >&6
10156 # If each of the values was on the command line, it overrides each guess.
10157 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10158 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10159 # Update the cache value to reflect the command line values.
10160 ac_cv_have_x="have_x=yes \
10161 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10162 echo "$as_me:10162: result: libraries $x_libraries, headers $x_includes" >&5
10163 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10166 if test "$no_x" = yes; then
10167 # Not all programs may use this symbol, but it does not hurt to define it.
10169 cat >>confdefs.h <<\EOF
10170 #define X_DISPLAY_MISSING 1
10173 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10175 if test -n "$x_includes"; then
10176 X_CFLAGS="$X_CFLAGS -I$x_includes"
10179 # It would also be nice to do this for all -L options, not just this one.
10180 if test -n "$x_libraries"; then
10181 X_LIBS="$X_LIBS -L$x_libraries"
10182 # For Solaris; some versions of Sun CC require a space after -R and
10183 # others require no space. Words are not sufficient . . . .
10184 case `(uname -sr) 2>/dev/null` in
10186 echo "$as_me:10186: checking whether -R must be followed by a space" >&5
10187 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10188 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10189 cat >conftest.$ac_ext <<_ACEOF
10190 #line 10190 "configure"
10191 #include "confdefs.h"
10201 rm -f conftest.$ac_objext conftest$ac_exeext
10202 if { (eval echo "$as_me:10202: \"$ac_link\"") >&5
10203 (eval $ac_link) 2>&5
10205 echo "$as_me:10205: \$? = $ac_status" >&5
10206 (exit $ac_status); } &&
10207 { ac_try='test -s conftest$ac_exeext'
10208 { (eval echo "$as_me:10208: \"$ac_try\"") >&5
10209 (eval $ac_try) 2>&5
10211 echo "$as_me:10211: \$? = $ac_status" >&5
10212 (exit $ac_status); }; }; then
10215 echo "$as_me: failed program was:" >&5
10216 cat conftest.$ac_ext >&5
10219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10220 if test $ac_R_nospace = yes; then
10221 echo "$as_me:10221: result: no" >&5
10222 echo "${ECHO_T}no" >&6
10223 X_LIBS="$X_LIBS -R$x_libraries"
10225 LIBS="$ac_xsave_LIBS -R $x_libraries"
10226 cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10238 rm -f conftest.$ac_objext conftest$ac_exeext
10239 if { (eval echo "$as_me:10239: \"$ac_link\"") >&5
10240 (eval $ac_link) 2>&5
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit $ac_status); } &&
10244 { ac_try='test -s conftest$ac_exeext'
10245 { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246 (eval $ac_try) 2>&5
10248 echo "$as_me:10248: \$? = $ac_status" >&5
10249 (exit $ac_status); }; }; then
10252 echo "$as_me: failed program was:" >&5
10253 cat conftest.$ac_ext >&5
10256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10257 if test $ac_R_space = yes; then
10258 echo "$as_me:10258: result: yes" >&5
10259 echo "${ECHO_T}yes" >&6
10260 X_LIBS="$X_LIBS -R $x_libraries"
10262 echo "$as_me:10262: result: neither works" >&5
10263 echo "${ECHO_T}neither works" >&6
10266 LIBS=$ac_xsave_LIBS
10270 # Check for system-dependent libraries X programs must link with.
10271 # Do this before checking for the system-independent R6 libraries
10272 # (-lICE), since we may need -lsocket or whatever for X linking.
10274 if test "$ISC" = yes; then
10275 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10277 # Martyn Johnson says this is needed for Ultrix, if the X
10278 # libraries were built with DECnet support. And Karl Berry says
10279 # the Alpha needs dnet_stub (dnet does not exist).
10280 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10281 cat >conftest.$ac_ext <<_ACEOF
10282 #line 10282 "configure"
10283 #include "confdefs.h"
10285 /* Override any gcc2 internal prototype to avoid an error. */
10289 /* We use char because int might match the return type of a gcc2
10290 builtin and then its argument prototype would still apply. */
10291 char XOpenDisplay ();
10300 rm -f conftest.$ac_objext conftest$ac_exeext
10301 if { (eval echo "$as_me:10301: \"$ac_link\"") >&5
10302 (eval $ac_link) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit $ac_status); } &&
10306 { ac_try='test -s conftest$ac_exeext'
10307 { (eval echo "$as_me:10307: \"$ac_try\"") >&5
10308 (eval $ac_try) 2>&5
10310 echo "$as_me:10310: \$? = $ac_status" >&5
10311 (exit $ac_status); }; }; then
10314 echo "$as_me: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10316 echo "$as_me:10316: checking for dnet_ntoa in -ldnet" >&5
10317 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10318 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10319 echo $ECHO_N "(cached) $ECHO_C" >&6
10321 ac_check_lib_save_LIBS=$LIBS
10322 LIBS="-ldnet $LIBS"
10323 cat >conftest.$ac_ext <<_ACEOF
10324 #line 10324 "configure"
10325 #include "confdefs.h"
10327 /* Override any gcc2 internal prototype to avoid an error. */
10331 /* We use char because int might match the return type of a gcc2
10332 builtin and then its argument prototype would still apply. */
10342 rm -f conftest.$ac_objext conftest$ac_exeext
10343 if { (eval echo "$as_me:10343: \"$ac_link\"") >&5
10344 (eval $ac_link) 2>&5
10346 echo "$as_me:10346: \$? = $ac_status" >&5
10347 (exit $ac_status); } &&
10348 { ac_try='test -s conftest$ac_exeext'
10349 { (eval echo "$as_me:10349: \"$ac_try\"") >&5
10350 (eval $ac_try) 2>&5
10352 echo "$as_me:10352: \$? = $ac_status" >&5
10353 (exit $ac_status); }; }; then
10354 ac_cv_lib_dnet_dnet_ntoa=yes
10356 echo "$as_me: failed program was:" >&5
10357 cat conftest.$ac_ext >&5
10358 ac_cv_lib_dnet_dnet_ntoa=no
10360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10361 LIBS=$ac_check_lib_save_LIBS
10363 echo "$as_me:10363: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10364 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10365 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10366 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10369 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10370 echo "$as_me:10370: checking for dnet_ntoa in -ldnet_stub" >&5
10371 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10372 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10373 echo $ECHO_N "(cached) $ECHO_C" >&6
10375 ac_check_lib_save_LIBS=$LIBS
10376 LIBS="-ldnet_stub $LIBS"
10377 cat >conftest.$ac_ext <<_ACEOF
10378 #line 10378 "configure"
10379 #include "confdefs.h"
10381 /* Override any gcc2 internal prototype to avoid an error. */
10385 /* We use char because int might match the return type of a gcc2
10386 builtin and then its argument prototype would still apply. */
10396 rm -f conftest.$ac_objext conftest$ac_exeext
10397 if { (eval echo "$as_me:10397: \"$ac_link\"") >&5
10398 (eval $ac_link) 2>&5
10400 echo "$as_me:10400: \$? = $ac_status" >&5
10401 (exit $ac_status); } &&
10402 { ac_try='test -s conftest$ac_exeext'
10403 { (eval echo "$as_me:10403: \"$ac_try\"") >&5
10404 (eval $ac_try) 2>&5
10406 echo "$as_me:10406: \$? = $ac_status" >&5
10407 (exit $ac_status); }; }; then
10408 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10410 echo "$as_me: failed program was:" >&5
10411 cat conftest.$ac_ext >&5
10412 ac_cv_lib_dnet_stub_dnet_ntoa=no
10414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10415 LIBS=$ac_check_lib_save_LIBS
10417 echo "$as_me:10417: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10418 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10419 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10420 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10426 LIBS="$ac_xsave_LIBS"
10428 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10429 # to get the SysV transport functions.
10430 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10432 # The nsl library prevents programs from opening the X display
10433 # on Irix 5.2, according to T.E. Dickey.
10434 # The functions gethostbyname, getservbyname, and inet_addr are
10435 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10436 echo "$as_me:10436: checking for gethostbyname" >&5
10437 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10438 if test "${ac_cv_func_gethostbyname+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
10441 cat >conftest.$ac_ext <<_ACEOF
10442 #line 10442 "configure"
10443 #include "confdefs.h"
10444 /* System header to define __stub macros and hopefully few prototypes,
10445 which can conflict with char gethostbyname (); below. */
10446 #include <assert.h>
10447 /* Override any gcc2 internal prototype to avoid an error. */
10451 /* We use char because int might match the return type of a gcc2
10452 builtin and then its argument prototype would still apply. */
10453 char gethostbyname ();
10459 /* The GNU C library defines this for functions which it implements
10460 to always fail with ENOSYS. Some functions are actually named
10461 something starting with __ and the normal name is an alias. */
10462 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10465 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10472 rm -f conftest.$ac_objext conftest$ac_exeext
10473 if { (eval echo "$as_me:10473: \"$ac_link\"") >&5
10474 (eval $ac_link) 2>&5
10476 echo "$as_me:10476: \$? = $ac_status" >&5
10477 (exit $ac_status); } &&
10478 { ac_try='test -s conftest$ac_exeext'
10479 { (eval echo "$as_me:10479: \"$ac_try\"") >&5
10480 (eval $ac_try) 2>&5
10482 echo "$as_me:10482: \$? = $ac_status" >&5
10483 (exit $ac_status); }; }; then
10484 ac_cv_func_gethostbyname=yes
10486 echo "$as_me: failed program was:" >&5
10487 cat conftest.$ac_ext >&5
10488 ac_cv_func_gethostbyname=no
10490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10492 echo "$as_me:10492: result: $ac_cv_func_gethostbyname" >&5
10493 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10495 if test $ac_cv_func_gethostbyname = no; then
10496 echo "$as_me:10496: checking for gethostbyname in -lnsl" >&5
10497 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10498 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10499 echo $ECHO_N "(cached) $ECHO_C" >&6
10501 ac_check_lib_save_LIBS=$LIBS
10503 cat >conftest.$ac_ext <<_ACEOF
10504 #line 10504 "configure"
10505 #include "confdefs.h"
10507 /* Override any gcc2 internal prototype to avoid an error. */
10511 /* We use char because int might match the return type of a gcc2
10512 builtin and then its argument prototype would still apply. */
10513 char gethostbyname ();
10522 rm -f conftest.$ac_objext conftest$ac_exeext
10523 if { (eval echo "$as_me:10523: \"$ac_link\"") >&5
10524 (eval $ac_link) 2>&5
10526 echo "$as_me:10526: \$? = $ac_status" >&5
10527 (exit $ac_status); } &&
10528 { ac_try='test -s conftest$ac_exeext'
10529 { (eval echo "$as_me:10529: \"$ac_try\"") >&5
10530 (eval $ac_try) 2>&5
10532 echo "$as_me:10532: \$? = $ac_status" >&5
10533 (exit $ac_status); }; }; then
10534 ac_cv_lib_nsl_gethostbyname=yes
10536 echo "$as_me: failed program was:" >&5
10537 cat conftest.$ac_ext >&5
10538 ac_cv_lib_nsl_gethostbyname=no
10540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10541 LIBS=$ac_check_lib_save_LIBS
10543 echo "$as_me:10543: result: $ac_cv_lib_nsl_gethostbyname" >&5
10544 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10545 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10546 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10549 if test $ac_cv_lib_nsl_gethostbyname = no; then
10550 echo "$as_me:10550: checking for gethostbyname in -lbsd" >&5
10551 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10552 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10553 echo $ECHO_N "(cached) $ECHO_C" >&6
10555 ac_check_lib_save_LIBS=$LIBS
10557 cat >conftest.$ac_ext <<_ACEOF
10558 #line 10558 "configure"
10559 #include "confdefs.h"
10561 /* Override any gcc2 internal prototype to avoid an error. */
10565 /* We use char because int might match the return type of a gcc2
10566 builtin and then its argument prototype would still apply. */
10567 char gethostbyname ();
10576 rm -f conftest.$ac_objext conftest$ac_exeext
10577 if { (eval echo "$as_me:10577: \"$ac_link\"") >&5
10578 (eval $ac_link) 2>&5
10580 echo "$as_me:10580: \$? = $ac_status" >&5
10581 (exit $ac_status); } &&
10582 { ac_try='test -s conftest$ac_exeext'
10583 { (eval echo "$as_me:10583: \"$ac_try\"") >&5
10584 (eval $ac_try) 2>&5
10586 echo "$as_me:10586: \$? = $ac_status" >&5
10587 (exit $ac_status); }; }; then
10588 ac_cv_lib_bsd_gethostbyname=yes
10590 echo "$as_me: failed program was:" >&5
10591 cat conftest.$ac_ext >&5
10592 ac_cv_lib_bsd_gethostbyname=no
10594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10595 LIBS=$ac_check_lib_save_LIBS
10597 echo "$as_me:10597: result: $ac_cv_lib_bsd_gethostbyname" >&5
10598 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10599 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10600 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10606 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10607 # socket/setsockopt and other routines are undefined under SCO ODT
10608 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10609 # on later versions), says Simon Leinen: it contains gethostby*
10610 # variants that don't use the nameserver (or something). -lsocket
10611 # must be given before -lnsl if both are needed. We assume that
10612 # if connect needs -lnsl, so does gethostbyname.
10613 echo "$as_me:10613: checking for connect" >&5
10614 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10615 if test "${ac_cv_func_connect+set}" = set; then
10616 echo $ECHO_N "(cached) $ECHO_C" >&6
10618 cat >conftest.$ac_ext <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10621 /* System header to define __stub macros and hopefully few prototypes,
10622 which can conflict with char connect (); below. */
10623 #include <assert.h>
10624 /* Override any gcc2 internal prototype to avoid an error. */
10628 /* We use char because int might match the return type of a gcc2
10629 builtin and then its argument prototype would still apply. */
10636 /* The GNU C library defines this for functions which it implements
10637 to always fail with ENOSYS. Some functions are actually named
10638 something starting with __ and the normal name is an alias. */
10639 #if defined (__stub_connect) || defined (__stub___connect)
10642 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10649 rm -f conftest.$ac_objext conftest$ac_exeext
10650 if { (eval echo "$as_me:10650: \"$ac_link\"") >&5
10651 (eval $ac_link) 2>&5
10653 echo "$as_me:10653: \$? = $ac_status" >&5
10654 (exit $ac_status); } &&
10655 { ac_try='test -s conftest$ac_exeext'
10656 { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657 (eval $ac_try) 2>&5
10659 echo "$as_me:10659: \$? = $ac_status" >&5
10660 (exit $ac_status); }; }; then
10661 ac_cv_func_connect=yes
10663 echo "$as_me: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10665 ac_cv_func_connect=no
10667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10669 echo "$as_me:10669: result: $ac_cv_func_connect" >&5
10670 echo "${ECHO_T}$ac_cv_func_connect" >&6
10672 if test $ac_cv_func_connect = no; then
10673 echo "$as_me:10673: checking for connect in -lsocket" >&5
10674 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10675 if test "${ac_cv_lib_socket_connect+set}" = set; then
10676 echo $ECHO_N "(cached) $ECHO_C" >&6
10678 ac_check_lib_save_LIBS=$LIBS
10679 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10680 cat >conftest.$ac_ext <<_ACEOF
10681 #line 10681 "configure"
10682 #include "confdefs.h"
10684 /* Override any gcc2 internal prototype to avoid an error. */
10688 /* We use char because int might match the return type of a gcc2
10689 builtin and then its argument prototype would still apply. */
10699 rm -f conftest.$ac_objext conftest$ac_exeext
10700 if { (eval echo "$as_me:10700: \"$ac_link\"") >&5
10701 (eval $ac_link) 2>&5
10703 echo "$as_me:10703: \$? = $ac_status" >&5
10704 (exit $ac_status); } &&
10705 { ac_try='test -s conftest$ac_exeext'
10706 { (eval echo "$as_me:10706: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10709 echo "$as_me:10709: \$? = $ac_status" >&5
10710 (exit $ac_status); }; }; then
10711 ac_cv_lib_socket_connect=yes
10713 echo "$as_me: failed program was:" >&5
10714 cat conftest.$ac_ext >&5
10715 ac_cv_lib_socket_connect=no
10717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10718 LIBS=$ac_check_lib_save_LIBS
10720 echo "$as_me:10720: result: $ac_cv_lib_socket_connect" >&5
10721 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10722 if test $ac_cv_lib_socket_connect = yes; then
10723 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10728 # Guillermo Gomez says -lposix is necessary on A/UX.
10729 echo "$as_me:10729: checking for remove" >&5
10730 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10731 if test "${ac_cv_func_remove+set}" = set; then
10732 echo $ECHO_N "(cached) $ECHO_C" >&6
10734 cat >conftest.$ac_ext <<_ACEOF
10735 #line 10735 "configure"
10736 #include "confdefs.h"
10737 /* System header to define __stub macros and hopefully few prototypes,
10738 which can conflict with char remove (); below. */
10739 #include <assert.h>
10740 /* Override any gcc2 internal prototype to avoid an error. */
10744 /* We use char because int might match the return type of a gcc2
10745 builtin and then its argument prototype would still apply. */
10752 /* The GNU C library defines this for functions which it implements
10753 to always fail with ENOSYS. Some functions are actually named
10754 something starting with __ and the normal name is an alias. */
10755 #if defined (__stub_remove) || defined (__stub___remove)
10758 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10765 rm -f conftest.$ac_objext conftest$ac_exeext
10766 if { (eval echo "$as_me:10766: \"$ac_link\"") >&5
10767 (eval $ac_link) 2>&5
10769 echo "$as_me:10769: \$? = $ac_status" >&5
10770 (exit $ac_status); } &&
10771 { ac_try='test -s conftest$ac_exeext'
10772 { (eval echo "$as_me:10772: \"$ac_try\"") >&5
10773 (eval $ac_try) 2>&5
10775 echo "$as_me:10775: \$? = $ac_status" >&5
10776 (exit $ac_status); }; }; then
10777 ac_cv_func_remove=yes
10779 echo "$as_me: failed program was:" >&5
10780 cat conftest.$ac_ext >&5
10781 ac_cv_func_remove=no
10783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10785 echo "$as_me:10785: result: $ac_cv_func_remove" >&5
10786 echo "${ECHO_T}$ac_cv_func_remove" >&6
10788 if test $ac_cv_func_remove = no; then
10789 echo "$as_me:10789: checking for remove in -lposix" >&5
10790 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10791 if test "${ac_cv_lib_posix_remove+set}" = set; then
10792 echo $ECHO_N "(cached) $ECHO_C" >&6
10794 ac_check_lib_save_LIBS=$LIBS
10795 LIBS="-lposix $LIBS"
10796 cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10800 /* Override any gcc2 internal prototype to avoid an error. */
10804 /* We use char because int might match the return type of a gcc2
10805 builtin and then its argument prototype would still apply. */
10815 rm -f conftest.$ac_objext conftest$ac_exeext
10816 if { (eval echo "$as_me:10816: \"$ac_link\"") >&5
10817 (eval $ac_link) 2>&5
10819 echo "$as_me:10819: \$? = $ac_status" >&5
10820 (exit $ac_status); } &&
10821 { ac_try='test -s conftest$ac_exeext'
10822 { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823 (eval $ac_try) 2>&5
10825 echo "$as_me:10825: \$? = $ac_status" >&5
10826 (exit $ac_status); }; }; then
10827 ac_cv_lib_posix_remove=yes
10829 echo "$as_me: failed program was:" >&5
10830 cat conftest.$ac_ext >&5
10831 ac_cv_lib_posix_remove=no
10833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10834 LIBS=$ac_check_lib_save_LIBS
10836 echo "$as_me:10836: result: $ac_cv_lib_posix_remove" >&5
10837 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10838 if test $ac_cv_lib_posix_remove = yes; then
10839 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10844 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10845 echo "$as_me:10845: checking for shmat" >&5
10846 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10847 if test "${ac_cv_func_shmat+set}" = set; then
10848 echo $ECHO_N "(cached) $ECHO_C" >&6
10850 cat >conftest.$ac_ext <<_ACEOF
10851 #line 10851 "configure"
10852 #include "confdefs.h"
10853 /* System header to define __stub macros and hopefully few prototypes,
10854 which can conflict with char shmat (); below. */
10855 #include <assert.h>
10856 /* Override any gcc2 internal prototype to avoid an error. */
10860 /* We use char because int might match the return type of a gcc2
10861 builtin and then its argument prototype would still apply. */
10868 /* The GNU C library defines this for functions which it implements
10869 to always fail with ENOSYS. Some functions are actually named
10870 something starting with __ and the normal name is an alias. */
10871 #if defined (__stub_shmat) || defined (__stub___shmat)
10874 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10881 rm -f conftest.$ac_objext conftest$ac_exeext
10882 if { (eval echo "$as_me:10882: \"$ac_link\"") >&5
10883 (eval $ac_link) 2>&5
10885 echo "$as_me:10885: \$? = $ac_status" >&5
10886 (exit $ac_status); } &&
10887 { ac_try='test -s conftest$ac_exeext'
10888 { (eval echo "$as_me:10888: \"$ac_try\"") >&5
10889 (eval $ac_try) 2>&5
10891 echo "$as_me:10891: \$? = $ac_status" >&5
10892 (exit $ac_status); }; }; then
10893 ac_cv_func_shmat=yes
10895 echo "$as_me: failed program was:" >&5
10896 cat conftest.$ac_ext >&5
10897 ac_cv_func_shmat=no
10899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10901 echo "$as_me:10901: result: $ac_cv_func_shmat" >&5
10902 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10904 if test $ac_cv_func_shmat = no; then
10905 echo "$as_me:10905: checking for shmat in -lipc" >&5
10906 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10907 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
10910 ac_check_lib_save_LIBS=$LIBS
10912 cat >conftest.$ac_ext <<_ACEOF
10913 #line 10913 "configure"
10914 #include "confdefs.h"
10916 /* Override any gcc2 internal prototype to avoid an error. */
10920 /* We use char because int might match the return type of a gcc2
10921 builtin and then its argument prototype would still apply. */
10931 rm -f conftest.$ac_objext conftest$ac_exeext
10932 if { (eval echo "$as_me:10932: \"$ac_link\"") >&5
10933 (eval $ac_link) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit $ac_status); } &&
10937 { ac_try='test -s conftest$ac_exeext'
10938 { (eval echo "$as_me:10938: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10941 echo "$as_me:10941: \$? = $ac_status" >&5
10942 (exit $ac_status); }; }; then
10943 ac_cv_lib_ipc_shmat=yes
10945 echo "$as_me: failed program was:" >&5
10946 cat conftest.$ac_ext >&5
10947 ac_cv_lib_ipc_shmat=no
10949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10950 LIBS=$ac_check_lib_save_LIBS
10952 echo "$as_me:10952: result: $ac_cv_lib_ipc_shmat" >&5
10953 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10954 if test $ac_cv_lib_ipc_shmat = yes; then
10955 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10961 # Check for libraries that X11R6 Xt/Xaw programs need.
10962 ac_save_LDFLAGS=$LDFLAGS
10963 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10964 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10965 # check for ICE first), but we must link in the order -lSM -lICE or
10966 # we get undefined symbols. So assume we have SM if we have ICE.
10967 # These have to be linked with before -lX11, unlike the other
10968 # libraries we check for below, so use a different variable.
10969 # John Interrante, Karl Berry
10970 echo "$as_me:10970: checking for IceConnectionNumber in -lICE" >&5
10971 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10972 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10973 echo $ECHO_N "(cached) $ECHO_C" >&6
10975 ac_check_lib_save_LIBS=$LIBS
10976 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10977 cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10981 /* Override any gcc2 internal prototype to avoid an error. */
10985 /* We use char because int might match the return type of a gcc2
10986 builtin and then its argument prototype would still apply. */
10987 char IceConnectionNumber ();
10991 IceConnectionNumber ();
10996 rm -f conftest.$ac_objext conftest$ac_exeext
10997 if { (eval echo "$as_me:10997: \"$ac_link\"") >&5
10998 (eval $ac_link) 2>&5
11000 echo "$as_me:11000: \$? = $ac_status" >&5
11001 (exit $ac_status); } &&
11002 { ac_try='test -s conftest$ac_exeext'
11003 { (eval echo "$as_me:11003: \"$ac_try\"") >&5
11004 (eval $ac_try) 2>&5
11006 echo "$as_me:11006: \$? = $ac_status" >&5
11007 (exit $ac_status); }; }; then
11008 ac_cv_lib_ICE_IceConnectionNumber=yes
11010 echo "$as_me: failed program was:" >&5
11011 cat conftest.$ac_ext >&5
11012 ac_cv_lib_ICE_IceConnectionNumber=no
11014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11015 LIBS=$ac_check_lib_save_LIBS
11017 echo "$as_me:11017: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11018 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11019 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11020 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11023 LDFLAGS=$ac_save_LDFLAGS
11027 cf_x_athena=${cf_x_athena:-Xaw}
11029 echo "$as_me:11029: checking if you want to link with Xaw 3d library" >&5
11030 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11033 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11034 if test "${with_Xaw3d+set}" = set; then
11035 withval="$with_Xaw3d"
11038 if test "$withval" = yes ; then
11040 echo "$as_me:11040: result: yes" >&5
11041 echo "${ECHO_T}yes" >&6
11043 echo "$as_me:11043: result: no" >&5
11044 echo "${ECHO_T}no" >&6
11047 echo "$as_me:11047: checking if you want to link with neXT Athena library" >&5
11048 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11051 # Check whether --with-neXtaw or --without-neXtaw was given.
11052 if test "${with_neXtaw+set}" = set; then
11053 withval="$with_neXtaw"
11056 if test "$withval" = yes ; then
11058 echo "$as_me:11058: result: yes" >&5
11059 echo "${ECHO_T}yes" >&6
11061 echo "$as_me:11061: result: no" >&5
11062 echo "${ECHO_T}no" >&6
11065 echo "$as_me:11065: checking if you want to link with Athena-Plus library" >&5
11066 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11069 # Check whether --with-XawPlus or --without-XawPlus was given.
11070 if test "${with_XawPlus+set}" = set; then
11071 withval="$with_XawPlus"
11074 if test "$withval" = yes ; then
11075 cf_x_athena=XawPlus
11076 echo "$as_me:11076: result: yes" >&5
11077 echo "${ECHO_T}yes" >&6
11079 echo "$as_me:11079: result: no" >&5
11080 echo "${ECHO_T}no" >&6
11085 if test "$PKG_CONFIG" != none ; then
11087 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11088 for cf_athena_pkg in \
11091 ${cf_x_athena}-devel \
11092 lib${cf_x_athena} \
11093 lib${cf_x_athena}-devel
11096 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11097 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11099 echo "${as_me:-configure}:11099: testing found package $cf_athena_pkg ..." 1>&5
11101 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11102 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11103 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11105 echo "${as_me:-configure}:11105: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11107 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11109 echo "${as_me:-configure}:11109: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11114 cf_new_extra_cppflags=
11116 for cf_add_cflags in $cf_pkgconfig_incs
11118 case $cf_fix_cppflags in
11120 case $cf_add_cflags in #(vi
11121 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11122 case $cf_add_cflags in
11124 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11126 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11127 && test -z "${cf_tst_cflags}" \
11128 && cf_fix_cppflags=yes
11130 if test $cf_fix_cppflags = yes ; then
11131 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11133 elif test "${cf_tst_cflags}" = "\"'" ; then
11134 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11139 case "$CPPFLAGS" in
11140 *$cf_add_cflags) #(vi
11143 case $cf_add_cflags in #(vi
11145 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11147 CPPFLAGS=`echo "$CPPFLAGS" | \
11148 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11149 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11153 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11158 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11163 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11165 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11167 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11168 && test -z "${cf_tst_cflags}" \
11169 && cf_fix_cppflags=no
11174 if test -n "$cf_new_cflags" ; then
11176 CFLAGS="$CFLAGS $cf_new_cflags"
11179 if test -n "$cf_new_cppflags" ; then
11181 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11184 if test -n "$cf_new_extra_cppflags" ; then
11186 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11189 LIBS="$cf_pkgconfig_libs $LIBS"
11191 cf_x_athena_lib="$cf_pkgconfig_libs"
11193 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11195 cat >>confdefs.h <<EOF
11196 #define $cf_x_athena_LIBS 1
11199 echo "$as_me:11199: checking for usable $cf_x_athena/Xmu package" >&5
11200 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11201 if test "${cf_cv_xaw_compat+set}" = set; then
11202 echo $ECHO_N "(cached) $ECHO_C" >&6
11205 cat >conftest.$ac_ext <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11209 #include <X11/Xmu/CharSet.h>
11215 int check = XmuCompareISOLatin1("big", "small")
11221 rm -f conftest.$ac_objext conftest$ac_exeext
11222 if { (eval echo "$as_me:11222: \"$ac_link\"") >&5
11223 (eval $ac_link) 2>&5
11225 echo "$as_me:11225: \$? = $ac_status" >&5
11226 (exit $ac_status); } &&
11227 { ac_try='test -s conftest$ac_exeext'
11228 { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229 (eval $ac_try) 2>&5
11231 echo "$as_me:11231: \$? = $ac_status" >&5
11232 (exit $ac_status); }; }; then
11233 cf_cv_xaw_compat=yes
11235 echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 cf_cv_xaw_compat=no
11239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11241 echo "$as_me:11241: result: $cf_cv_xaw_compat" >&5
11242 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11244 if test "$cf_cv_xaw_compat" = no
11246 # workaround for broken ".pc" files...
11247 case "$cf_x_athena_lib" in #(vi
11251 test -n "$verbose" && echo " work around broken package" 1>&6
11253 echo "${as_me:-configure}:11253: testing work around broken package ..." 1>&5
11255 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11256 test -n "$verbose" && echo " found package xmu" 1>&6
11258 echo "${as_me:-configure}:11258: testing found package xmu ..." 1>&5
11260 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11261 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11262 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11264 echo "${as_me:-configure}:11264: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11266 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11268 echo "${as_me:-configure}:11268: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11273 cf_new_extra_cppflags=
11275 for cf_add_cflags in $cf_pkgconfig_incs
11277 case $cf_fix_cppflags in
11279 case $cf_add_cflags in #(vi
11280 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11281 case $cf_add_cflags in
11283 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11285 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11286 && test -z "${cf_tst_cflags}" \
11287 && cf_fix_cppflags=yes
11289 if test $cf_fix_cppflags = yes ; then
11290 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11292 elif test "${cf_tst_cflags}" = "\"'" ; then
11293 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11298 case "$CPPFLAGS" in
11299 *$cf_add_cflags) #(vi
11302 case $cf_add_cflags in #(vi
11304 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11308 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11312 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11317 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11322 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11324 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11326 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11327 && test -z "${cf_tst_cflags}" \
11328 && cf_fix_cppflags=no
11333 if test -n "$cf_new_cflags" ; then
11335 CFLAGS="$CFLAGS $cf_new_cflags"
11338 if test -n "$cf_new_cppflags" ; then
11340 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11343 if test -n "$cf_new_extra_cppflags" ; then
11345 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11348 LIBS="$cf_pkgconfig_libs $LIBS"
11352 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11354 echo "${as_me:-configure}:11354: testing ...before $LIBS ..." 1>&5
11356 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/ / /g'`
11357 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11359 echo "${as_me:-configure}:11359: testing ...after $LIBS ..." 1>&5
11375 if test -z "$cf_x_athena_lib" ; then
11377 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11378 test -n "$verbose" && echo " found package Xext" 1>&6
11380 echo "${as_me:-configure}:11380: testing found package Xext ..." 1>&5
11382 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11383 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11384 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11386 echo "${as_me:-configure}:11386: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11388 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11390 echo "${as_me:-configure}:11390: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11395 cf_new_extra_cppflags=
11397 for cf_add_cflags in $cf_pkgconfig_incs
11399 case $cf_fix_cppflags in
11401 case $cf_add_cflags in #(vi
11402 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11403 case $cf_add_cflags in
11405 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11407 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11408 && test -z "${cf_tst_cflags}" \
11409 && cf_fix_cppflags=yes
11411 if test $cf_fix_cppflags = yes ; then
11412 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11414 elif test "${cf_tst_cflags}" = "\"'" ; then
11415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11420 case "$CPPFLAGS" in
11421 *$cf_add_cflags) #(vi
11424 case $cf_add_cflags in #(vi
11426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11428 CPPFLAGS=`echo "$CPPFLAGS" | \
11429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11434 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11439 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11444 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11446 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11448 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11449 && test -z "${cf_tst_cflags}" \
11450 && cf_fix_cppflags=no
11455 if test -n "$cf_new_cflags" ; then
11457 CFLAGS="$CFLAGS $cf_new_cflags"
11460 if test -n "$cf_new_cppflags" ; then
11462 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11465 if test -n "$cf_new_extra_cppflags" ; then
11467 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11470 LIBS="$cf_pkgconfig_libs $LIBS"
11474 echo "$as_me:11474: checking for XextCreateExtension in -lXext" >&5
11475 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11476 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11477 echo $ECHO_N "(cached) $ECHO_C" >&6
11479 ac_check_lib_save_LIBS=$LIBS
11480 LIBS="-lXext $LIBS"
11481 cat >conftest.$ac_ext <<_ACEOF
11482 #line 11482 "configure"
11483 #include "confdefs.h"
11485 /* Override any gcc2 internal prototype to avoid an error. */
11489 /* We use char because int might match the return type of a gcc2
11490 builtin and then its argument prototype would still apply. */
11491 char XextCreateExtension ();
11495 XextCreateExtension ();
11500 rm -f conftest.$ac_objext conftest$ac_exeext
11501 if { (eval echo "$as_me:11501: \"$ac_link\"") >&5
11502 (eval $ac_link) 2>&5
11504 echo "$as_me:11504: \$? = $ac_status" >&5
11505 (exit $ac_status); } &&
11506 { ac_try='test -s conftest$ac_exeext'
11507 { (eval echo "$as_me:11507: \"$ac_try\"") >&5
11508 (eval $ac_try) 2>&5
11510 echo "$as_me:11510: \$? = $ac_status" >&5
11511 (exit $ac_status); }; }; then
11512 ac_cv_lib_Xext_XextCreateExtension=yes
11514 echo "$as_me: failed program was:" >&5
11515 cat conftest.$ac_ext >&5
11516 ac_cv_lib_Xext_XextCreateExtension=no
11518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11519 LIBS=$ac_check_lib_save_LIBS
11521 echo "$as_me:11521: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11522 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11523 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11524 LIBS="-lXext $LIBS"
11531 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11532 test -n "$verbose" && echo " found package xt" 1>&6
11534 echo "${as_me:-configure}:11534: testing found package xt ..." 1>&5
11536 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11537 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11538 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11540 echo "${as_me:-configure}:11540: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11542 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11544 echo "${as_me:-configure}:11544: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11549 cf_new_extra_cppflags=
11551 for cf_add_cflags in $cf_pkgconfig_incs
11553 case $cf_fix_cppflags in
11555 case $cf_add_cflags in #(vi
11556 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11557 case $cf_add_cflags in
11559 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11561 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11562 && test -z "${cf_tst_cflags}" \
11563 && cf_fix_cppflags=yes
11565 if test $cf_fix_cppflags = yes ; then
11566 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11568 elif test "${cf_tst_cflags}" = "\"'" ; then
11569 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11574 case "$CPPFLAGS" in
11575 *$cf_add_cflags) #(vi
11578 case $cf_add_cflags in #(vi
11580 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11582 CPPFLAGS=`echo "$CPPFLAGS" | \
11583 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11584 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11588 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11593 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11598 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11600 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11602 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11603 && test -z "${cf_tst_cflags}" \
11604 && cf_fix_cppflags=no
11609 if test -n "$cf_new_cflags" ; then
11611 CFLAGS="$CFLAGS $cf_new_cflags"
11614 if test -n "$cf_new_cppflags" ; then
11616 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11619 if test -n "$cf_new_extra_cppflags" ; then
11621 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11624 LIBS="$cf_pkgconfig_libs $LIBS"
11626 case "x$LIBS" in #(vi
11630 # we have an "xt" package, but it may omit Xt's dependency on X11
11631 echo "$as_me:11631: checking for usable X dependency" >&5
11632 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11633 if test "${cf_cv_xt_x11_compat+set}" = set; then
11634 echo $ECHO_N "(cached) $ECHO_C" >&6
11637 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11641 #include <X11/Xlib.h>
11647 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11648 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11649 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11650 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11656 rm -f conftest.$ac_objext conftest$ac_exeext
11657 if { (eval echo "$as_me:11657: \"$ac_link\"") >&5
11658 (eval $ac_link) 2>&5
11660 echo "$as_me:11660: \$? = $ac_status" >&5
11661 (exit $ac_status); } &&
11662 { ac_try='test -s conftest$ac_exeext'
11663 { (eval echo "$as_me:11663: \"$ac_try\"") >&5
11664 (eval $ac_try) 2>&5
11666 echo "$as_me:11666: \$? = $ac_status" >&5
11667 (exit $ac_status); }; }; then
11668 cf_cv_xt_x11_compat=yes
11670 echo "$as_me: failed program was:" >&5
11671 cat conftest.$ac_ext >&5
11672 cf_cv_xt_x11_compat=no
11674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11676 echo "$as_me:11676: result: $cf_cv_xt_x11_compat" >&5
11677 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11678 if test "$cf_cv_xt_x11_compat" = no
11680 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11682 echo "${as_me:-configure}:11682: testing work around broken X11 dependency ..." 1>&5
11684 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11686 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11687 test -n "$verbose" && echo " found package x11" 1>&6
11689 echo "${as_me:-configure}:11689: testing found package x11 ..." 1>&5
11691 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11692 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11693 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11695 echo "${as_me:-configure}:11695: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11697 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11699 echo "${as_me:-configure}:11699: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11704 cf_new_extra_cppflags=
11706 for cf_add_cflags in $cf_pkgconfig_incs
11708 case $cf_fix_cppflags in
11710 case $cf_add_cflags in #(vi
11711 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11712 case $cf_add_cflags in
11714 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11716 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11717 && test -z "${cf_tst_cflags}" \
11718 && cf_fix_cppflags=yes
11720 if test $cf_fix_cppflags = yes ; then
11721 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11723 elif test "${cf_tst_cflags}" = "\"'" ; then
11724 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11729 case "$CPPFLAGS" in
11730 *$cf_add_cflags) #(vi
11733 case $cf_add_cflags in #(vi
11735 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11737 CPPFLAGS=`echo "$CPPFLAGS" | \
11738 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11739 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11743 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11748 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11753 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11755 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11757 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11758 && test -z "${cf_tst_cflags}" \
11759 && cf_fix_cppflags=no
11764 if test -n "$cf_new_cflags" ; then
11766 CFLAGS="$CFLAGS $cf_new_cflags"
11769 if test -n "$cf_new_cppflags" ; then
11771 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11774 if test -n "$cf_new_extra_cppflags" ; then
11776 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11779 LIBS="$cf_pkgconfig_libs $LIBS"
11783 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11785 echo "${as_me:-configure}:11785: testing ...before $LIBS ..." 1>&5
11787 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/ / /g'`
11788 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11790 echo "${as_me:-configure}:11790: testing ...after $LIBS ..." 1>&5
11798 echo "$as_me:11798: checking for usable X Toolkit package" >&5
11799 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11800 if test "${cf_cv_xt_ice_compat+set}" = set; then
11801 echo $ECHO_N "(cached) $ECHO_C" >&6
11804 cat >conftest.$ac_ext <<_ACEOF
11805 #line 11805 "configure"
11806 #include "confdefs.h"
11808 #include <X11/Shell.h>
11813 int num = IceConnectionNumber(0)
11819 rm -f conftest.$ac_objext conftest$ac_exeext
11820 if { (eval echo "$as_me:11820: \"$ac_link\"") >&5
11821 (eval $ac_link) 2>&5
11823 echo "$as_me:11823: \$? = $ac_status" >&5
11824 (exit $ac_status); } &&
11825 { ac_try='test -s conftest$ac_exeext'
11826 { (eval echo "$as_me:11826: \"$ac_try\"") >&5
11827 (eval $ac_try) 2>&5
11829 echo "$as_me:11829: \$? = $ac_status" >&5
11830 (exit $ac_status); }; }; then
11831 cf_cv_xt_ice_compat=yes
11833 echo "$as_me: failed program was:" >&5
11834 cat conftest.$ac_ext >&5
11835 cf_cv_xt_ice_compat=no
11837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11839 echo "$as_me:11839: result: $cf_cv_xt_ice_compat" >&5
11840 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11842 if test "$cf_cv_xt_ice_compat" = no
11844 # workaround for broken ".pc" files used for X Toolkit.
11845 case "x$X_PRE_LIBS" in #(vi
11847 case "x$LIBS" in #(vi
11851 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11853 echo "${as_me:-configure}:11853: testing work around broken ICE dependency ..." 1>&5
11855 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11856 test -n "$verbose" && echo " found package ice" 1>&6
11858 echo "${as_me:-configure}:11858: testing found package ice ..." 1>&5
11860 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11861 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11862 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11864 echo "${as_me:-configure}:11864: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11866 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11868 echo "${as_me:-configure}:11868: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11873 cf_new_extra_cppflags=
11875 for cf_add_cflags in $cf_pkgconfig_incs
11877 case $cf_fix_cppflags in
11879 case $cf_add_cflags in #(vi
11880 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11881 case $cf_add_cflags in
11883 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11885 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11886 && test -z "${cf_tst_cflags}" \
11887 && cf_fix_cppflags=yes
11889 if test $cf_fix_cppflags = yes ; then
11890 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11892 elif test "${cf_tst_cflags}" = "\"'" ; then
11893 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11898 case "$CPPFLAGS" in
11899 *$cf_add_cflags) #(vi
11902 case $cf_add_cflags in #(vi
11904 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11906 CPPFLAGS=`echo "$CPPFLAGS" | \
11907 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11908 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11912 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11917 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11922 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11924 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11926 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11927 && test -z "${cf_tst_cflags}" \
11928 && cf_fix_cppflags=no
11933 if test -n "$cf_new_cflags" ; then
11935 CFLAGS="$CFLAGS $cf_new_cflags"
11938 if test -n "$cf_new_cppflags" ; then
11940 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11943 if test -n "$cf_new_extra_cppflags" ; then
11945 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11948 LIBS="$cf_pkgconfig_libs $LIBS"
11950 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11951 test -n "$verbose" && echo " found package sm" 1>&6
11953 echo "${as_me:-configure}:11953: testing found package sm ..." 1>&5
11955 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11956 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11957 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11959 echo "${as_me:-configure}:11959: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11961 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11963 echo "${as_me:-configure}:11963: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11968 cf_new_extra_cppflags=
11970 for cf_add_cflags in $cf_pkgconfig_incs
11972 case $cf_fix_cppflags in
11974 case $cf_add_cflags in #(vi
11975 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11976 case $cf_add_cflags in
11978 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11980 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11981 && test -z "${cf_tst_cflags}" \
11982 && cf_fix_cppflags=yes
11984 if test $cf_fix_cppflags = yes ; then
11985 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11987 elif test "${cf_tst_cflags}" = "\"'" ; then
11988 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11993 case "$CPPFLAGS" in
11994 *$cf_add_cflags) #(vi
11997 case $cf_add_cflags in #(vi
11999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12001 CPPFLAGS=`echo "$CPPFLAGS" | \
12002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12007 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12012 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12017 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12019 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12021 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12022 && test -z "${cf_tst_cflags}" \
12023 && cf_fix_cppflags=no
12028 if test -n "$cf_new_cflags" ; then
12030 CFLAGS="$CFLAGS $cf_new_cflags"
12033 if test -n "$cf_new_cppflags" ; then
12035 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12038 if test -n "$cf_new_extra_cppflags" ; then
12040 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12043 LIBS="$cf_pkgconfig_libs $LIBS"
12051 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12053 echo "${as_me:-configure}:12053: testing ...before $LIBS ..." 1>&5
12055 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'`
12056 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12058 echo "${as_me:-configure}:12058: testing ...after $LIBS ..." 1>&5
12072 LDFLAGS="$X_LIBS $LDFLAGS"
12074 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12076 echo "${as_me:-configure}:12076: testing checking additions to CFLAGS ..." 1>&5
12078 cf_check_cflags="$CFLAGS"
12079 cf_check_cppflags="$CPPFLAGS"
12084 cf_new_extra_cppflags=
12086 for cf_add_cflags in $X_CFLAGS
12088 case $cf_fix_cppflags in
12090 case $cf_add_cflags in #(vi
12091 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12092 case $cf_add_cflags in
12094 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12096 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12097 && test -z "${cf_tst_cflags}" \
12098 && cf_fix_cppflags=yes
12100 if test $cf_fix_cppflags = yes ; then
12101 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12103 elif test "${cf_tst_cflags}" = "\"'" ; then
12104 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12109 case "$CPPFLAGS" in
12110 *$cf_add_cflags) #(vi
12113 case $cf_add_cflags in #(vi
12115 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12117 CPPFLAGS=`echo "$CPPFLAGS" | \
12118 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12119 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12123 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12128 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12133 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12135 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12137 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12138 && test -z "${cf_tst_cflags}" \
12139 && cf_fix_cppflags=no
12144 if test -n "$cf_new_cflags" ; then
12145 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12147 echo "${as_me:-configure}:12147: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12149 CFLAGS="$CFLAGS $cf_new_cflags"
12152 if test -n "$cf_new_cppflags" ; then
12153 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12155 echo "${as_me:-configure}:12155: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12157 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12160 if test -n "$cf_new_extra_cppflags" ; then
12161 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12163 echo "${as_me:-configure}:12163: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12165 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12168 if test "$cf_check_cflags" != "$CFLAGS" ; then
12169 cat >conftest.$ac_ext <<_ACEOF
12170 #line 12170 "configure"
12171 #include "confdefs.h"
12176 printf("Hello world");
12181 rm -f conftest.$ac_objext conftest$ac_exeext
12182 if { (eval echo "$as_me:12182: \"$ac_link\"") >&5
12183 (eval $ac_link) 2>&5
12185 echo "$as_me:12185: \$? = $ac_status" >&5
12186 (exit $ac_status); } &&
12187 { ac_try='test -s conftest$ac_exeext'
12188 { (eval echo "$as_me:12188: \"$ac_try\"") >&5
12189 (eval $ac_try) 2>&5
12191 echo "$as_me:12191: \$? = $ac_status" >&5
12192 (exit $ac_status); }; }; then
12195 echo "$as_me: failed program was:" >&5
12196 cat conftest.$ac_ext >&5
12197 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12199 echo "${as_me:-configure}:12199: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12201 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12202 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12204 echo "${as_me:-configure}:12204: testing but keeping change to \$CPPFLAGS ..." 1>&5
12207 CFLAGS="$cf_check_flags"
12209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12212 echo "$as_me:12212: checking for XOpenDisplay" >&5
12213 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12214 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12215 echo $ECHO_N "(cached) $ECHO_C" >&6
12217 cat >conftest.$ac_ext <<_ACEOF
12218 #line 12218 "configure"
12219 #include "confdefs.h"
12220 /* System header to define __stub macros and hopefully few prototypes,
12221 which can conflict with char XOpenDisplay (); below. */
12222 #include <assert.h>
12223 /* Override any gcc2 internal prototype to avoid an error. */
12227 /* We use char because int might match the return type of a gcc2
12228 builtin and then its argument prototype would still apply. */
12229 char XOpenDisplay ();
12235 /* The GNU C library defines this for functions which it implements
12236 to always fail with ENOSYS. Some functions are actually named
12237 something starting with __ and the normal name is an alias. */
12238 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12241 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12248 rm -f conftest.$ac_objext conftest$ac_exeext
12249 if { (eval echo "$as_me:12249: \"$ac_link\"") >&5
12250 (eval $ac_link) 2>&5
12252 echo "$as_me:12252: \$? = $ac_status" >&5
12253 (exit $ac_status); } &&
12254 { ac_try='test -s conftest$ac_exeext'
12255 { (eval echo "$as_me:12255: \"$ac_try\"") >&5
12256 (eval $ac_try) 2>&5
12258 echo "$as_me:12258: \$? = $ac_status" >&5
12259 (exit $ac_status); }; }; then
12260 ac_cv_func_XOpenDisplay=yes
12262 echo "$as_me: failed program was:" >&5
12263 cat conftest.$ac_ext >&5
12264 ac_cv_func_XOpenDisplay=no
12266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12268 echo "$as_me:12268: result: $ac_cv_func_XOpenDisplay" >&5
12269 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12270 if test $ac_cv_func_XOpenDisplay = yes; then
12274 echo "$as_me:12274: checking for XOpenDisplay in -lX11" >&5
12275 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12276 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12277 echo $ECHO_N "(cached) $ECHO_C" >&6
12279 ac_check_lib_save_LIBS=$LIBS
12280 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12281 cat >conftest.$ac_ext <<_ACEOF
12282 #line 12282 "configure"
12283 #include "confdefs.h"
12285 /* Override any gcc2 internal prototype to avoid an error. */
12289 /* We use char because int might match the return type of a gcc2
12290 builtin and then its argument prototype would still apply. */
12291 char XOpenDisplay ();
12300 rm -f conftest.$ac_objext conftest$ac_exeext
12301 if { (eval echo "$as_me:12301: \"$ac_link\"") >&5
12302 (eval $ac_link) 2>&5
12304 echo "$as_me:12304: \$? = $ac_status" >&5
12305 (exit $ac_status); } &&
12306 { ac_try='test -s conftest$ac_exeext'
12307 { (eval echo "$as_me:12307: \"$ac_try\"") >&5
12308 (eval $ac_try) 2>&5
12310 echo "$as_me:12310: \$? = $ac_status" >&5
12311 (exit $ac_status); }; }; then
12312 ac_cv_lib_X11_XOpenDisplay=yes
12314 echo "$as_me: failed program was:" >&5
12315 cat conftest.$ac_ext >&5
12316 ac_cv_lib_X11_XOpenDisplay=no
12318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12319 LIBS=$ac_check_lib_save_LIBS
12321 echo "$as_me:12321: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12322 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12323 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12329 echo "$as_me:12329: checking for XtAppInitialize" >&5
12330 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12331 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12332 echo $ECHO_N "(cached) $ECHO_C" >&6
12334 cat >conftest.$ac_ext <<_ACEOF
12335 #line 12335 "configure"
12336 #include "confdefs.h"
12337 /* System header to define __stub macros and hopefully few prototypes,
12338 which can conflict with char XtAppInitialize (); below. */
12339 #include <assert.h>
12340 /* Override any gcc2 internal prototype to avoid an error. */
12344 /* We use char because int might match the return type of a gcc2
12345 builtin and then its argument prototype would still apply. */
12346 char XtAppInitialize ();
12352 /* The GNU C library defines this for functions which it implements
12353 to always fail with ENOSYS. Some functions are actually named
12354 something starting with __ and the normal name is an alias. */
12355 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12358 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12365 rm -f conftest.$ac_objext conftest$ac_exeext
12366 if { (eval echo "$as_me:12366: \"$ac_link\"") >&5
12367 (eval $ac_link) 2>&5
12369 echo "$as_me:12369: \$? = $ac_status" >&5
12370 (exit $ac_status); } &&
12371 { ac_try='test -s conftest$ac_exeext'
12372 { (eval echo "$as_me:12372: \"$ac_try\"") >&5
12373 (eval $ac_try) 2>&5
12375 echo "$as_me:12375: \$? = $ac_status" >&5
12376 (exit $ac_status); }; }; then
12377 ac_cv_func_XtAppInitialize=yes
12379 echo "$as_me: failed program was:" >&5
12380 cat conftest.$ac_ext >&5
12381 ac_cv_func_XtAppInitialize=no
12383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12385 echo "$as_me:12385: result: $ac_cv_func_XtAppInitialize" >&5
12386 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12387 if test $ac_cv_func_XtAppInitialize = yes; then
12391 echo "$as_me:12391: checking for XtAppInitialize in -lXt" >&5
12392 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12393 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12394 echo $ECHO_N "(cached) $ECHO_C" >&6
12396 ac_check_lib_save_LIBS=$LIBS
12397 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12398 cat >conftest.$ac_ext <<_ACEOF
12399 #line 12399 "configure"
12400 #include "confdefs.h"
12402 /* Override any gcc2 internal prototype to avoid an error. */
12406 /* We use char because int might match the return type of a gcc2
12407 builtin and then its argument prototype would still apply. */
12408 char XtAppInitialize ();
12412 XtAppInitialize ();
12417 rm -f conftest.$ac_objext conftest$ac_exeext
12418 if { (eval echo "$as_me:12418: \"$ac_link\"") >&5
12419 (eval $ac_link) 2>&5
12421 echo "$as_me:12421: \$? = $ac_status" >&5
12422 (exit $ac_status); } &&
12423 { ac_try='test -s conftest$ac_exeext'
12424 { (eval echo "$as_me:12424: \"$ac_try\"") >&5
12425 (eval $ac_try) 2>&5
12427 echo "$as_me:12427: \$? = $ac_status" >&5
12428 (exit $ac_status); }; }; then
12429 ac_cv_lib_Xt_XtAppInitialize=yes
12431 echo "$as_me: failed program was:" >&5
12432 cat conftest.$ac_ext >&5
12433 ac_cv_lib_Xt_XtAppInitialize=no
12435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12436 LIBS=$ac_check_lib_save_LIBS
12438 echo "$as_me:12438: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12439 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12440 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12441 cat >>confdefs.h <<\EOF
12442 #define HAVE_LIBXT 1
12446 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12453 if test $cf_have_X_LIBS = no ; then
12454 { echo "$as_me:12454: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12455 test program. You will have to check and add the proper libraries by hand
12457 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12458 test program. You will have to check and add the proper libraries by hand
12459 to makefile." >&2;}
12462 cf_x_athena_root=$cf_x_athena
12465 for cf_path in default \
12466 /usr/contrib/X11R6 \
12467 /usr/contrib/X11R5 \
12471 if test -z "$cf_x_athena_inc" ; then
12472 cf_save="$CPPFLAGS"
12473 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12474 if test $cf_path != default ; then
12475 CPPFLAGS="$cf_save -I$cf_path/include"
12476 echo "$as_me:12476: checking for $cf_test in $cf_path" >&5
12477 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12479 echo "$as_me:12479: checking for $cf_test" >&5
12480 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12482 cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12486 #include <X11/Intrinsic.h>
12487 #include <$cf_test>
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:12497: \"$ac_compile\"") >&5
12498 (eval $ac_compile) 2>&5
12500 echo "$as_me:12500: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest.$ac_objext'
12503 { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12506 echo "$as_me:12506: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12510 echo "$as_me: failed program was:" >&5
12511 cat conftest.$ac_ext >&5
12514 rm -f conftest.$ac_objext conftest.$ac_ext
12515 echo "$as_me:12515: result: $cf_result" >&5
12516 echo "${ECHO_T}$cf_result" >&6
12517 if test "$cf_result" = yes ; then
12518 cf_x_athena_inc=$cf_path
12521 CPPFLAGS="$cf_save"
12526 if test -z "$cf_x_athena_inc" ; then
12527 { echo "$as_me:12527: WARNING: Unable to successfully find Athena header files with test program" >&5
12528 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12529 elif test "$cf_x_athena_inc" != default ; then
12530 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12533 cf_x_athena_root=$cf_x_athena
12536 for cf_path in default \
12537 /usr/contrib/X11R6 \
12538 /usr/contrib/X11R5 \
12543 ${cf_x_athena_root} \
12544 ${cf_x_athena_root}7 \
12545 ${cf_x_athena_root}6
12548 "-l$cf_lib -lXmu" \
12549 "-l$cf_lib -lXpm -lXmu" \
12550 "-l${cf_lib}_s -lXmu_s"
12552 if test -z "$cf_x_athena_lib" ; then
12554 cf_test=XawSimpleMenuAddGlobalActions
12555 if test $cf_path != default ; then
12556 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12557 echo "$as_me:12557: checking for $cf_libs in $cf_path" >&5
12558 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12560 LIBS="$cf_libs $LIBS"
12561 echo "$as_me:12561: checking for $cf_test in $cf_libs" >&5
12562 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12564 cat >conftest.$ac_ext <<_ACEOF
12565 #line 12565 "configure"
12566 #include "confdefs.h"
12568 #include <X11/Intrinsic.h>
12569 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12575 $cf_test((XtAppContext) 0)
12580 rm -f conftest.$ac_objext conftest$ac_exeext
12581 if { (eval echo "$as_me:12581: \"$ac_link\"") >&5
12582 (eval $ac_link) 2>&5
12584 echo "$as_me:12584: \$? = $ac_status" >&5
12585 (exit $ac_status); } &&
12586 { ac_try='test -s conftest$ac_exeext'
12587 { (eval echo "$as_me:12587: \"$ac_try\"") >&5
12588 (eval $ac_try) 2>&5
12590 echo "$as_me:12590: \$? = $ac_status" >&5
12591 (exit $ac_status); }; }; then
12594 echo "$as_me: failed program was:" >&5
12595 cat conftest.$ac_ext >&5
12598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12599 echo "$as_me:12599: result: $cf_result" >&5
12600 echo "${ECHO_T}$cf_result" >&6
12601 if test "$cf_result" = yes ; then
12602 cf_x_athena_lib="$cf_libs"
12608 test -n "$cf_x_athena_lib" && break
12612 if test -z "$cf_x_athena_lib" ; then
12613 { { echo "$as_me:12613: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12614 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12615 { (exit 1); exit 1; }; }
12618 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12620 cat >>confdefs.h <<EOF
12621 #define $cf_x_athena_LIBS 1
12626 if test -n "$ac_tool_prefix"; then
12627 for ac_prog in xcurses-config
12629 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12630 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12631 echo "$as_me:12631: checking for $ac_word" >&5
12632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12633 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12634 echo $ECHO_N "(cached) $ECHO_C" >&6
12636 if test -n "$XCURSES_CONFIG"; then
12637 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12639 ac_save_IFS=$IFS; IFS=$ac_path_separator
12641 for ac_dir in $ac_dummy; do
12643 test -z "$ac_dir" && ac_dir=.
12644 $as_executable_p "$ac_dir/$ac_word" || continue
12645 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12646 echo "$as_me:12646: found $ac_dir/$ac_word" >&5
12652 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12653 if test -n "$XCURSES_CONFIG"; then
12654 echo "$as_me:12654: result: $XCURSES_CONFIG" >&5
12655 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12657 echo "$as_me:12657: result: no" >&5
12658 echo "${ECHO_T}no" >&6
12661 test -n "$XCURSES_CONFIG" && break
12664 if test -z "$XCURSES_CONFIG"; then
12665 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12666 for ac_prog in xcurses-config
12668 # Extract the first word of "$ac_prog", so it can be a program name with args.
12669 set dummy $ac_prog; ac_word=$2
12670 echo "$as_me:12670: checking for $ac_word" >&5
12671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12672 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12673 echo $ECHO_N "(cached) $ECHO_C" >&6
12675 if test -n "$ac_ct_XCURSES_CONFIG"; then
12676 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12678 ac_save_IFS=$IFS; IFS=$ac_path_separator
12680 for ac_dir in $ac_dummy; do
12682 test -z "$ac_dir" && ac_dir=.
12683 $as_executable_p "$ac_dir/$ac_word" || continue
12684 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12685 echo "$as_me:12685: found $ac_dir/$ac_word" >&5
12691 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12692 if test -n "$ac_ct_XCURSES_CONFIG"; then
12693 echo "$as_me:12693: result: $ac_ct_XCURSES_CONFIG" >&5
12694 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12696 echo "$as_me:12696: result: no" >&5
12697 echo "${ECHO_T}no" >&6
12700 test -n "$ac_ct_XCURSES_CONFIG" && break
12702 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12704 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12707 if test "$XCURSES_CONFIG" != none ; then
12709 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12710 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12712 cf_cv_lib_XCurses=yes
12716 LDFLAGS="$LDFLAGS $X_LIBS"
12718 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12720 echo "${as_me:-configure}:12720: testing checking additions to CFLAGS ..." 1>&5
12722 cf_check_cflags="$CFLAGS"
12723 cf_check_cppflags="$CPPFLAGS"
12728 cf_new_extra_cppflags=
12730 for cf_add_cflags in $X_CFLAGS
12732 case $cf_fix_cppflags in
12734 case $cf_add_cflags in #(vi
12735 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12736 case $cf_add_cflags in
12738 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12740 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12741 && test -z "${cf_tst_cflags}" \
12742 && cf_fix_cppflags=yes
12744 if test $cf_fix_cppflags = yes ; then
12745 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12747 elif test "${cf_tst_cflags}" = "\"'" ; then
12748 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12753 case "$CPPFLAGS" in
12754 *$cf_add_cflags) #(vi
12757 case $cf_add_cflags in #(vi
12759 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12761 CPPFLAGS=`echo "$CPPFLAGS" | \
12762 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12763 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12767 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12772 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12777 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12779 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12781 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12782 && test -z "${cf_tst_cflags}" \
12783 && cf_fix_cppflags=no
12788 if test -n "$cf_new_cflags" ; then
12789 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12791 echo "${as_me:-configure}:12791: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12793 CFLAGS="$CFLAGS $cf_new_cflags"
12796 if test -n "$cf_new_cppflags" ; then
12797 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12799 echo "${as_me:-configure}:12799: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12801 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12804 if test -n "$cf_new_extra_cppflags" ; then
12805 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12807 echo "${as_me:-configure}:12807: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12809 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12812 if test "$cf_check_cflags" != "$CFLAGS" ; then
12813 cat >conftest.$ac_ext <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12820 printf("Hello world");
12825 rm -f conftest.$ac_objext conftest$ac_exeext
12826 if { (eval echo "$as_me:12826: \"$ac_link\"") >&5
12827 (eval $ac_link) 2>&5
12829 echo "$as_me:12829: \$? = $ac_status" >&5
12830 (exit $ac_status); } &&
12831 { ac_try='test -s conftest$ac_exeext'
12832 { (eval echo "$as_me:12832: \"$ac_try\"") >&5
12833 (eval $ac_try) 2>&5
12835 echo "$as_me:12835: \$? = $ac_status" >&5
12836 (exit $ac_status); }; }; then
12839 echo "$as_me: failed program was:" >&5
12840 cat conftest.$ac_ext >&5
12841 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12843 echo "${as_me:-configure}:12843: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12845 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12846 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12848 echo "${as_me:-configure}:12848: testing but keeping change to \$CPPFLAGS ..." 1>&5
12851 CFLAGS="$cf_check_flags"
12853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12856 echo "$as_me:12856: checking for XOpenDisplay in -lX11" >&5
12857 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12858 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12859 echo $ECHO_N "(cached) $ECHO_C" >&6
12861 ac_check_lib_save_LIBS=$LIBS
12862 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12863 cat >conftest.$ac_ext <<_ACEOF
12864 #line 12864 "configure"
12865 #include "confdefs.h"
12867 /* Override any gcc2 internal prototype to avoid an error. */
12871 /* We use char because int might match the return type of a gcc2
12872 builtin and then its argument prototype would still apply. */
12873 char XOpenDisplay ();
12882 rm -f conftest.$ac_objext conftest$ac_exeext
12883 if { (eval echo "$as_me:12883: \"$ac_link\"") >&5
12884 (eval $ac_link) 2>&5
12886 echo "$as_me:12886: \$? = $ac_status" >&5
12887 (exit $ac_status); } &&
12888 { ac_try='test -s conftest$ac_exeext'
12889 { (eval echo "$as_me:12889: \"$ac_try\"") >&5
12890 (eval $ac_try) 2>&5
12892 echo "$as_me:12892: \$? = $ac_status" >&5
12893 (exit $ac_status); }; }; then
12894 ac_cv_lib_X11_XOpenDisplay=yes
12896 echo "$as_me: failed program was:" >&5
12897 cat conftest.$ac_ext >&5
12898 ac_cv_lib_X11_XOpenDisplay=no
12900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12901 LIBS=$ac_check_lib_save_LIBS
12903 echo "$as_me:12903: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12904 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12905 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12909 echo "$as_me:12909: checking for XCurses library" >&5
12910 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12911 if test "${cf_cv_lib_XCurses+set}" = set; then
12912 echo $ECHO_N "(cached) $ECHO_C" >&6
12915 LIBS="-lXCurses $LIBS"
12916 cat >conftest.$ac_ext <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12920 #include <xcurses.h>
12921 char *XCursesProgramName = "test";
12931 rm -f conftest.$ac_objext conftest$ac_exeext
12932 if { (eval echo "$as_me:12932: \"$ac_link\"") >&5
12933 (eval $ac_link) 2>&5
12935 echo "$as_me:12935: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
12937 { ac_try='test -s conftest$ac_exeext'
12938 { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12941 echo "$as_me:12941: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12943 cf_cv_lib_XCurses=yes
12945 echo "$as_me: failed program was:" >&5
12946 cat conftest.$ac_ext >&5
12947 cf_cv_lib_XCurses=no
12949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12952 echo "$as_me:12952: result: $cf_cv_lib_XCurses" >&5
12953 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12957 if test $cf_cv_lib_XCurses = yes ; then
12958 cat >>confdefs.h <<\EOF
12962 cat >>confdefs.h <<\EOF
12966 echo "$as_me:12966: checking for xcurses.h" >&5
12967 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12968 if test "${ac_cv_header_xcurses_h+set}" = set; then
12969 echo $ECHO_N "(cached) $ECHO_C" >&6
12971 cat >conftest.$ac_ext <<_ACEOF
12972 #line 12972 "configure"
12973 #include "confdefs.h"
12974 #include <xcurses.h>
12976 if { (eval echo "$as_me:12976: \"$ac_cpp conftest.$ac_ext\"") >&5
12977 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12979 egrep -v '^ *\+' conftest.er1 >conftest.err
12981 cat conftest.err >&5
12982 echo "$as_me:12982: \$? = $ac_status" >&5
12983 (exit $ac_status); } >/dev/null; then
12984 if test -s conftest.err; then
12985 ac_cpp_err=$ac_c_preproc_warn_flag
12992 if test -z "$ac_cpp_err"; then
12993 ac_cv_header_xcurses_h=yes
12995 echo "$as_me: failed program was:" >&5
12996 cat conftest.$ac_ext >&5
12997 ac_cv_header_xcurses_h=no
12999 rm -f conftest.err conftest.$ac_ext
13001 echo "$as_me:13001: result: $ac_cv_header_xcurses_h" >&5
13002 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13003 if test $ac_cv_header_xcurses_h = yes; then
13004 cat >>confdefs.h <<\EOF
13005 #define HAVE_XCURSES 1
13011 { { echo "$as_me:13011: error: Cannot link with XCurses" >&5
13012 echo "$as_me: error: Cannot link with XCurses" >&2;}
13013 { (exit 1); exit 1; }; }
13019 case $cf_cv_screen in
13022 echo "$as_me:13022: checking for NetBSD form.h" >&5
13023 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13024 if test "${cf_cv_netbsd_form_h+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
13028 cat >conftest.$ac_ext <<_ACEOF
13029 #line 13029 "configure"
13030 #include "confdefs.h"
13032 #include <${cf_cv_ncurses_header:-curses.h}>
13040 int y = current_field(form)->cursor_ypos;
13041 int x = current_field(form)->cursor_xpos;
13047 rm -f conftest.$ac_objext
13048 if { (eval echo "$as_me:13048: \"$ac_compile\"") >&5
13049 (eval $ac_compile) 2>&5
13051 echo "$as_me:13051: \$? = $ac_status" >&5
13052 (exit $ac_status); } &&
13053 { ac_try='test -s conftest.$ac_objext'
13054 { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13057 echo "$as_me:13057: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
13059 cf_cv_netbsd_form_h=yes
13062 echo "$as_me: failed program was:" >&5
13063 cat conftest.$ac_ext >&5
13064 cf_cv_netbsd_form_h=no
13066 rm -f conftest.$ac_objext conftest.$ac_ext
13069 echo "$as_me:13069: result: $cf_cv_netbsd_form_h" >&5
13070 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13072 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
13073 #define HAVE_NETBSD_FORM_H 1
13076 echo "$as_me:13076: checking for NetBSD menu.h" >&5
13077 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13078 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
13082 cat >conftest.$ac_ext <<_ACEOF
13083 #line 13083 "configure"
13084 #include "confdefs.h"
13086 #include <${cf_cv_ncurses_header:-curses.h}>
13094 int y = menu->max_item_width;
13100 rm -f conftest.$ac_objext
13101 if { (eval echo "$as_me:13101: \"$ac_compile\"") >&5
13102 (eval $ac_compile) 2>&5
13104 echo "$as_me:13104: \$? = $ac_status" >&5
13105 (exit $ac_status); } &&
13106 { ac_try='test -s conftest.$ac_objext'
13107 { (eval echo "$as_me:13107: \"$ac_try\"") >&5
13108 (eval $ac_try) 2>&5
13110 echo "$as_me:13110: \$? = $ac_status" >&5
13111 (exit $ac_status); }; }; then
13112 cf_cv_netbsd_menu_h=yes
13115 echo "$as_me: failed program was:" >&5
13116 cat conftest.$ac_ext >&5
13117 cf_cv_netbsd_menu_h=no
13119 rm -f conftest.$ac_objext conftest.$ac_ext
13122 echo "$as_me:13122: result: $cf_cv_netbsd_menu_h" >&5
13123 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13125 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
13126 #define HAVE_NETBSD_MENU_H 1
13135 case $cf_cv_screen in #(vi
13139 # look for curses-related libraries
13141 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13142 echo "$as_me:13142: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13143 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13144 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13145 echo $ECHO_N "(cached) $ECHO_C" >&6
13147 ac_check_lib_save_LIBS=$LIBS
13148 LIBS="-lpanel$cf_cv_libtype $LIBS"
13149 cat >conftest.$ac_ext <<_ACEOF
13150 #line 13150 "configure"
13151 #include "confdefs.h"
13153 /* Override any gcc2 internal prototype to avoid an error. */
13157 /* We use char because int might match the return type of a gcc2
13158 builtin and then its argument prototype would still apply. */
13168 rm -f conftest.$ac_objext conftest$ac_exeext
13169 if { (eval echo "$as_me:13169: \"$ac_link\"") >&5
13170 (eval $ac_link) 2>&5
13172 echo "$as_me:13172: \$? = $ac_status" >&5
13173 (exit $ac_status); } &&
13174 { ac_try='test -s conftest$ac_exeext'
13175 { (eval echo "$as_me:13175: \"$ac_try\"") >&5
13176 (eval $ac_try) 2>&5
13178 echo "$as_me:13178: \$? = $ac_status" >&5
13179 (exit $ac_status); }; }; then
13180 eval "$as_ac_Lib=yes"
13182 echo "$as_me: failed program was:" >&5
13183 cat conftest.$ac_ext >&5
13184 eval "$as_ac_Lib=no"
13186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13187 LIBS=$ac_check_lib_save_LIBS
13189 echo "$as_me:13189: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13190 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13191 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13192 cat >>confdefs.h <<EOF
13193 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
13196 LIBS="-lpanel$cf_cv_libtype $LIBS"
13200 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13201 echo "$as_me:13201: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13202 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13203 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13204 echo $ECHO_N "(cached) $ECHO_C" >&6
13206 ac_check_lib_save_LIBS=$LIBS
13207 LIBS="-lmenu$cf_cv_libtype $LIBS"
13208 cat >conftest.$ac_ext <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13212 /* Override any gcc2 internal prototype to avoid an error. */
13216 /* We use char because int might match the return type of a gcc2
13217 builtin and then its argument prototype would still apply. */
13218 char menu_driver ();
13227 rm -f conftest.$ac_objext conftest$ac_exeext
13228 if { (eval echo "$as_me:13228: \"$ac_link\"") >&5
13229 (eval $ac_link) 2>&5
13231 echo "$as_me:13231: \$? = $ac_status" >&5
13232 (exit $ac_status); } &&
13233 { ac_try='test -s conftest$ac_exeext'
13234 { (eval echo "$as_me:13234: \"$ac_try\"") >&5
13235 (eval $ac_try) 2>&5
13237 echo "$as_me:13237: \$? = $ac_status" >&5
13238 (exit $ac_status); }; }; then
13239 eval "$as_ac_Lib=yes"
13241 echo "$as_me: failed program was:" >&5
13242 cat conftest.$ac_ext >&5
13243 eval "$as_ac_Lib=no"
13245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13246 LIBS=$ac_check_lib_save_LIBS
13248 echo "$as_me:13248: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13249 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13250 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13251 cat >>confdefs.h <<EOF
13252 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
13255 LIBS="-lmenu$cf_cv_libtype $LIBS"
13259 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13260 echo "$as_me:13260: checking for form_driver in -lform$cf_cv_libtype" >&5
13261 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13262 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13263 echo $ECHO_N "(cached) $ECHO_C" >&6
13265 ac_check_lib_save_LIBS=$LIBS
13266 LIBS="-lform$cf_cv_libtype $LIBS"
13267 cat >conftest.$ac_ext <<_ACEOF
13268 #line 13268 "configure"
13269 #include "confdefs.h"
13271 /* Override any gcc2 internal prototype to avoid an error. */
13275 /* We use char because int might match the return type of a gcc2
13276 builtin and then its argument prototype would still apply. */
13277 char form_driver ();
13286 rm -f conftest.$ac_objext conftest$ac_exeext
13287 if { (eval echo "$as_me:13287: \"$ac_link\"") >&5
13288 (eval $ac_link) 2>&5
13290 echo "$as_me:13290: \$? = $ac_status" >&5
13291 (exit $ac_status); } &&
13292 { ac_try='test -s conftest$ac_exeext'
13293 { (eval echo "$as_me:13293: \"$ac_try\"") >&5
13294 (eval $ac_try) 2>&5
13296 echo "$as_me:13296: \$? = $ac_status" >&5
13297 (exit $ac_status); }; }; then
13298 eval "$as_ac_Lib=yes"
13300 echo "$as_me: failed program was:" >&5
13301 cat conftest.$ac_ext >&5
13302 eval "$as_ac_Lib=no"
13304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13305 LIBS=$ac_check_lib_save_LIBS
13307 echo "$as_me:13307: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13308 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13309 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13310 cat >>confdefs.h <<EOF
13311 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
13314 LIBS="-lform$cf_cv_libtype $LIBS"
13318 # look for curses-related headers
13329 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13330 echo "$as_me:13330: checking for $ac_header" >&5
13331 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13332 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13333 echo $ECHO_N "(cached) $ECHO_C" >&6
13335 cat >conftest.$ac_ext <<_ACEOF
13336 #line 13336 "configure"
13337 #include "confdefs.h"
13338 #include <$ac_header>
13340 if { (eval echo "$as_me:13340: \"$ac_cpp conftest.$ac_ext\"") >&5
13341 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13343 egrep -v '^ *\+' conftest.er1 >conftest.err
13345 cat conftest.err >&5
13346 echo "$as_me:13346: \$? = $ac_status" >&5
13347 (exit $ac_status); } >/dev/null; then
13348 if test -s conftest.err; then
13349 ac_cpp_err=$ac_c_preproc_warn_flag
13356 if test -z "$ac_cpp_err"; then
13357 eval "$as_ac_Header=yes"
13359 echo "$as_me: failed program was:" >&5
13360 cat conftest.$ac_ext >&5
13361 eval "$as_ac_Header=no"
13363 rm -f conftest.err conftest.$ac_ext
13365 echo "$as_me:13365: result: `eval echo '${'$as_ac_Header'}'`" >&5
13366 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13367 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13368 cat >>confdefs.h <<EOF
13369 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13378 echo "$as_me:13378: checking return type of signal handlers" >&5
13379 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13380 if test "${ac_cv_type_signal+set}" = set; then
13381 echo $ECHO_N "(cached) $ECHO_C" >&6
13383 cat >conftest.$ac_ext <<_ACEOF
13384 #line 13384 "configure"
13385 #include "confdefs.h"
13386 #include <sys/types.h>
13387 #include <signal.h>
13392 extern "C" void (*signal (int, void (*)(int)))(int);
13394 void (*signal ()) ();
13405 rm -f conftest.$ac_objext
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407 (eval $ac_compile) 2>&5
13409 echo "$as_me:13409: \$? = $ac_status" >&5
13410 (exit $ac_status); } &&
13411 { ac_try='test -s conftest.$ac_objext'
13412 { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413 (eval $ac_try) 2>&5
13415 echo "$as_me:13415: \$? = $ac_status" >&5
13416 (exit $ac_status); }; }; then
13417 ac_cv_type_signal=void
13419 echo "$as_me: failed program was:" >&5
13420 cat conftest.$ac_ext >&5
13421 ac_cv_type_signal=int
13423 rm -f conftest.$ac_objext conftest.$ac_ext
13425 echo "$as_me:13425: result: $ac_cv_type_signal" >&5
13426 echo "${ECHO_T}$ac_cv_type_signal" >&6
13428 cat >>confdefs.h <<EOF
13429 #define RETSIGTYPE $ac_cv_type_signal
13432 echo "$as_me:13432: checking for ANSI C header files" >&5
13433 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13434 if test "${ac_cv_header_stdc+set}" = set; then
13435 echo $ECHO_N "(cached) $ECHO_C" >&6
13437 cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440 #include <stdlib.h>
13441 #include <stdarg.h>
13442 #include <string.h>
13446 if { (eval echo "$as_me:13446: \"$ac_cpp conftest.$ac_ext\"") >&5
13447 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13449 egrep -v '^ *\+' conftest.er1 >conftest.err
13451 cat conftest.err >&5
13452 echo "$as_me:13452: \$? = $ac_status" >&5
13453 (exit $ac_status); } >/dev/null; then
13454 if test -s conftest.err; then
13455 ac_cpp_err=$ac_c_preproc_warn_flag
13462 if test -z "$ac_cpp_err"; then
13463 ac_cv_header_stdc=yes
13465 echo "$as_me: failed program was:" >&5
13466 cat conftest.$ac_ext >&5
13467 ac_cv_header_stdc=no
13469 rm -f conftest.err conftest.$ac_ext
13471 if test $ac_cv_header_stdc = yes; then
13472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13473 cat >conftest.$ac_ext <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476 #include <string.h>
13479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13480 egrep "memchr" >/dev/null 2>&1; then
13483 ac_cv_header_stdc=no
13489 if test $ac_cv_header_stdc = yes; then
13490 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13491 cat >conftest.$ac_ext <<_ACEOF
13492 #line 13492 "configure"
13493 #include "confdefs.h"
13494 #include <stdlib.h>
13497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13498 egrep "free" >/dev/null 2>&1; then
13501 ac_cv_header_stdc=no
13507 if test $ac_cv_header_stdc = yes; then
13508 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13509 if test "$cross_compiling" = yes; then
13512 cat >conftest.$ac_ext <<_ACEOF
13513 #line 13513 "configure"
13514 #include "confdefs.h"
13516 #if ((' ' & 0x0FF) == 0x020)
13517 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13518 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13520 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13521 || ('j' <= (c) && (c) <= 'r') \
13522 || ('s' <= (c) && (c) <= 'z'))
13523 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13526 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13531 for (i = 0; i < 256; i++)
13532 if (XOR (islower (i), ISLOWER (i))
13533 || toupper (i) != TOUPPER (i))
13534 $ac_main_return(2);
13535 $ac_main_return (0);
13538 rm -f conftest$ac_exeext
13539 if { (eval echo "$as_me:13539: \"$ac_link\"") >&5
13540 (eval $ac_link) 2>&5
13542 echo "$as_me:13542: \$? = $ac_status" >&5
13543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13544 { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545 (eval $ac_try) 2>&5
13547 echo "$as_me:13547: \$? = $ac_status" >&5
13548 (exit $ac_status); }; }; then
13551 echo "$as_me: program exited with status $ac_status" >&5
13552 echo "$as_me: failed program was:" >&5
13553 cat conftest.$ac_ext >&5
13554 ac_cv_header_stdc=no
13556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13560 echo "$as_me:13560: result: $ac_cv_header_stdc" >&5
13561 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13562 if test $ac_cv_header_stdc = yes; then
13564 cat >>confdefs.h <<\EOF
13565 #define STDC_HEADERS 1
13570 echo "$as_me:13570: checking whether time.h and sys/time.h may both be included" >&5
13571 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13572 if test "${ac_cv_header_time+set}" = set; then
13573 echo $ECHO_N "(cached) $ECHO_C" >&6
13575 cat >conftest.$ac_ext <<_ACEOF
13576 #line 13576 "configure"
13577 #include "confdefs.h"
13578 #include <sys/types.h>
13579 #include <sys/time.h>
13585 if ((struct tm *) 0)
13591 rm -f conftest.$ac_objext
13592 if { (eval echo "$as_me:13592: \"$ac_compile\"") >&5
13593 (eval $ac_compile) 2>&5
13595 echo "$as_me:13595: \$? = $ac_status" >&5
13596 (exit $ac_status); } &&
13597 { ac_try='test -s conftest.$ac_objext'
13598 { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599 (eval $ac_try) 2>&5
13601 echo "$as_me:13601: \$? = $ac_status" >&5
13602 (exit $ac_status); }; }; then
13603 ac_cv_header_time=yes
13605 echo "$as_me: failed program was:" >&5
13606 cat conftest.$ac_ext >&5
13607 ac_cv_header_time=no
13609 rm -f conftest.$ac_objext conftest.$ac_ext
13611 echo "$as_me:13611: result: $ac_cv_header_time" >&5
13612 echo "${ECHO_T}$ac_cv_header_time" >&6
13613 if test $ac_cv_header_time = yes; then
13615 cat >>confdefs.h <<\EOF
13616 #define TIME_WITH_SYS_TIME 1
13633 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13634 echo "$as_me:13634: checking for $ac_header" >&5
13635 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13636 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
13639 cat >conftest.$ac_ext <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642 #include <$ac_header>
13644 if { (eval echo "$as_me:13644: \"$ac_cpp conftest.$ac_ext\"") >&5
13645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13647 egrep -v '^ *\+' conftest.er1 >conftest.err
13649 cat conftest.err >&5
13650 echo "$as_me:13650: \$? = $ac_status" >&5
13651 (exit $ac_status); } >/dev/null; then
13652 if test -s conftest.err; then
13653 ac_cpp_err=$ac_c_preproc_warn_flag
13660 if test -z "$ac_cpp_err"; then
13661 eval "$as_ac_Header=yes"
13663 echo "$as_me: failed program was:" >&5
13664 cat conftest.$ac_ext >&5
13665 eval "$as_ac_Header=no"
13667 rm -f conftest.err conftest.$ac_ext
13669 echo "$as_me:13669: result: `eval echo '${'$as_ac_Header'}'`" >&5
13670 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13671 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13672 cat >>confdefs.h <<EOF
13673 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13679 for ac_header in unistd.h getopt.h
13681 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13682 echo "$as_me:13682: checking for $ac_header" >&5
13683 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13684 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13685 echo $ECHO_N "(cached) $ECHO_C" >&6
13687 cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690 #include <$ac_header>
13692 if { (eval echo "$as_me:13692: \"$ac_cpp conftest.$ac_ext\"") >&5
13693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13695 egrep -v '^ *\+' conftest.er1 >conftest.err
13697 cat conftest.err >&5
13698 echo "$as_me:13698: \$? = $ac_status" >&5
13699 (exit $ac_status); } >/dev/null; then
13700 if test -s conftest.err; then
13701 ac_cpp_err=$ac_c_preproc_warn_flag
13708 if test -z "$ac_cpp_err"; then
13709 eval "$as_ac_Header=yes"
13711 echo "$as_me: failed program was:" >&5
13712 cat conftest.$ac_ext >&5
13713 eval "$as_ac_Header=no"
13715 rm -f conftest.err conftest.$ac_ext
13717 echo "$as_me:13717: result: `eval echo '${'$as_ac_Header'}'`" >&5
13718 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13719 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13720 cat >>confdefs.h <<EOF
13721 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13727 echo "$as_me:13727: checking for header declaring getopt variables" >&5
13728 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13729 if test "${cf_cv_getopt_header+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13733 cf_cv_getopt_header=none
13734 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13736 cat >conftest.$ac_ext <<_ACEOF
13737 #line 13737 "configure"
13738 #include "confdefs.h"
13740 #include <$cf_header>
13744 int x = optind; char *y = optarg
13749 rm -f conftest.$ac_objext
13750 if { (eval echo "$as_me:13750: \"$ac_compile\"") >&5
13751 (eval $ac_compile) 2>&5
13753 echo "$as_me:13753: \$? = $ac_status" >&5
13754 (exit $ac_status); } &&
13755 { ac_try='test -s conftest.$ac_objext'
13756 { (eval echo "$as_me:13756: \"$ac_try\"") >&5
13757 (eval $ac_try) 2>&5
13759 echo "$as_me:13759: \$? = $ac_status" >&5
13760 (exit $ac_status); }; }; then
13761 cf_cv_getopt_header=$cf_header
13764 echo "$as_me: failed program was:" >&5
13765 cat conftest.$ac_ext >&5
13767 rm -f conftest.$ac_objext conftest.$ac_ext
13771 echo "$as_me:13771: result: $cf_cv_getopt_header" >&5
13772 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13773 if test $cf_cv_getopt_header != none ; then
13774 cat >>confdefs.h <<\EOF
13775 #define HAVE_GETOPT_HEADER 1
13785 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13786 echo "$as_me:13786: checking for $ac_func" >&5
13787 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13788 if eval "test \"\${$as_ac_var+set}\" = set"; then
13789 echo $ECHO_N "(cached) $ECHO_C" >&6
13791 cat >conftest.$ac_ext <<_ACEOF
13792 #line 13792 "configure"
13793 #include "confdefs.h"
13794 /* System header to define __stub macros and hopefully few prototypes,
13795 which can conflict with char $ac_func (); below. */
13796 #include <assert.h>
13797 /* Override any gcc2 internal prototype to avoid an error. */
13801 /* We use char because int might match the return type of a gcc2
13802 builtin and then its argument prototype would still apply. */
13809 /* The GNU C library defines this for functions which it implements
13810 to always fail with ENOSYS. Some functions are actually named
13811 something starting with __ and the normal name is an alias. */
13812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13815 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13822 rm -f conftest.$ac_objext conftest$ac_exeext
13823 if { (eval echo "$as_me:13823: \"$ac_link\"") >&5
13824 (eval $ac_link) 2>&5
13826 echo "$as_me:13826: \$? = $ac_status" >&5
13827 (exit $ac_status); } &&
13828 { ac_try='test -s conftest$ac_exeext'
13829 { (eval echo "$as_me:13829: \"$ac_try\"") >&5
13830 (eval $ac_try) 2>&5
13832 echo "$as_me:13832: \$? = $ac_status" >&5
13833 (exit $ac_status); }; }; then
13834 eval "$as_ac_var=yes"
13836 echo "$as_me: failed program was:" >&5
13837 cat conftest.$ac_ext >&5
13838 eval "$as_ac_var=no"
13840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13842 echo "$as_me:13842: result: `eval echo '${'$as_ac_var'}'`" >&5
13843 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13844 if test `eval echo '${'$as_ac_var'}'` = yes; then
13845 cat >>confdefs.h <<EOF
13846 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13852 if test "$cf_enable_widec" = yes; then
13865 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13866 echo "$as_me:13866: checking for $ac_func" >&5
13867 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13868 if eval "test \"\${$as_ac_var+set}\" = set"; then
13869 echo $ECHO_N "(cached) $ECHO_C" >&6
13871 cat >conftest.$ac_ext <<_ACEOF
13872 #line 13872 "configure"
13873 #include "confdefs.h"
13874 /* System header to define __stub macros and hopefully few prototypes,
13875 which can conflict with char $ac_func (); below. */
13876 #include <assert.h>
13877 /* Override any gcc2 internal prototype to avoid an error. */
13881 /* We use char because int might match the return type of a gcc2
13882 builtin and then its argument prototype would still apply. */
13889 /* The GNU C library defines this for functions which it implements
13890 to always fail with ENOSYS. Some functions are actually named
13891 something starting with __ and the normal name is an alias. */
13892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13895 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13902 rm -f conftest.$ac_objext conftest$ac_exeext
13903 if { (eval echo "$as_me:13903: \"$ac_link\"") >&5
13904 (eval $ac_link) 2>&5
13906 echo "$as_me:13906: \$? = $ac_status" >&5
13907 (exit $ac_status); } &&
13908 { ac_try='test -s conftest$ac_exeext'
13909 { (eval echo "$as_me:13909: \"$ac_try\"") >&5
13910 (eval $ac_try) 2>&5
13912 echo "$as_me:13912: \$? = $ac_status" >&5
13913 (exit $ac_status); }; }; then
13914 eval "$as_ac_var=yes"
13916 echo "$as_me: failed program was:" >&5
13917 cat conftest.$ac_ext >&5
13918 eval "$as_ac_var=no"
13920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13922 echo "$as_me:13922: result: `eval echo '${'$as_ac_var'}'`" >&5
13923 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13924 if test `eval echo '${'$as_ac_var'}'` = yes; then
13925 cat >>confdefs.h <<EOF
13926 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13934 echo "$as_me:13934: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13935 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13936 if test "${cf_cv_need_xopen_extension+set}" = set; then
13937 echo $ECHO_N "(cached) $ECHO_C" >&6
13940 cat >conftest.$ac_ext <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13944 #include <stdlib.h>
13945 #include <${cf_cv_ncurses_header:-curses.h}>
13950 #if defined(NCURSES_VERSION_PATCH)
13951 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13955 long x = winnstr(stdscr, "", 0);
13957 getbegyx(stdscr, y1, x1)
13962 rm -f conftest.$ac_objext conftest$ac_exeext
13963 if { (eval echo "$as_me:13963: \"$ac_link\"") >&5
13964 (eval $ac_link) 2>&5
13966 echo "$as_me:13966: \$? = $ac_status" >&5
13967 (exit $ac_status); } &&
13968 { ac_try='test -s conftest$ac_exeext'
13969 { (eval echo "$as_me:13969: \"$ac_try\"") >&5
13970 (eval $ac_try) 2>&5
13972 echo "$as_me:13972: \$? = $ac_status" >&5
13973 (exit $ac_status); }; }; then
13974 cf_cv_need_xopen_extension=no
13976 echo "$as_me: failed program was:" >&5
13977 cat conftest.$ac_ext >&5
13978 cat >conftest.$ac_ext <<_ACEOF
13979 #line 13979 "configure"
13980 #include "confdefs.h"
13982 #define _XOPEN_SOURCE_EXTENDED
13983 #include <stdlib.h>
13984 #include <${cf_cv_ncurses_header:-curses.h}>
13989 #ifdef NCURSES_VERSION
13991 int check2 = curs_set((int)sizeof(check));
13993 long x = winnstr(stdscr, "", 0);
13995 getbegyx(stdscr, y1, x1)
14000 rm -f conftest.$ac_objext conftest$ac_exeext
14001 if { (eval echo "$as_me:14001: \"$ac_link\"") >&5
14002 (eval $ac_link) 2>&5
14004 echo "$as_me:14004: \$? = $ac_status" >&5
14005 (exit $ac_status); } &&
14006 { ac_try='test -s conftest$ac_exeext'
14007 { (eval echo "$as_me:14007: \"$ac_try\"") >&5
14008 (eval $ac_try) 2>&5
14010 echo "$as_me:14010: \$? = $ac_status" >&5
14011 (exit $ac_status); }; }; then
14012 cf_cv_need_xopen_extension=yes
14014 echo "$as_me: failed program was:" >&5
14015 cat conftest.$ac_ext >&5
14016 cf_cv_need_xopen_extension=unknown
14018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022 echo "$as_me:14022: result: $cf_cv_need_xopen_extension" >&5
14023 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14024 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14026 echo "$as_me:14026: checking for term.h" >&5
14027 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14028 if test "${cf_cv_term_header+set}" = set; then
14029 echo $ECHO_N "(cached) $ECHO_C" >&6
14032 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14033 # for <term.h> if we do not find the variant.
14035 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14037 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14039 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14040 cf_header_list="$cf_header_item $cf_header_list"
14044 for cf_header in $cf_header_list
14046 cat >conftest.$ac_ext <<_ACEOF
14047 #line 14047 "configure"
14048 #include "confdefs.h"
14050 #include <${cf_cv_ncurses_header:-curses.h}>
14051 #include <${cf_header}>
14060 rm -f conftest.$ac_objext
14061 if { (eval echo "$as_me:14061: \"$ac_compile\"") >&5
14062 (eval $ac_compile) 2>&5
14064 echo "$as_me:14064: \$? = $ac_status" >&5
14065 (exit $ac_status); } &&
14066 { ac_try='test -s conftest.$ac_objext'
14067 { (eval echo "$as_me:14067: \"$ac_try\"") >&5
14068 (eval $ac_try) 2>&5
14070 echo "$as_me:14070: \$? = $ac_status" >&5
14071 (exit $ac_status); }; }; then
14072 cf_cv_term_header=$cf_header
14075 echo "$as_me: failed program was:" >&5
14076 cat conftest.$ac_ext >&5
14077 cf_cv_term_header=no
14079 rm -f conftest.$ac_objext conftest.$ac_ext
14082 case $cf_cv_term_header in #(vi
14084 # If curses is ncurses, some packagers still mess it up by trying to make
14085 # us use GNU termcap. This handles the most common case.
14086 for cf_header in ncurses/term.h ncursesw/term.h
14088 cat >conftest.$ac_ext <<_ACEOF
14089 #line 14089 "configure"
14090 #include "confdefs.h"
14092 #include <${cf_cv_ncurses_header:-curses.h}>
14093 #ifdef NCURSES_VERSION
14094 #include <${cf_header}>
14106 rm -f conftest.$ac_objext
14107 if { (eval echo "$as_me:14107: \"$ac_compile\"") >&5
14108 (eval $ac_compile) 2>&5
14110 echo "$as_me:14110: \$? = $ac_status" >&5
14111 (exit $ac_status); } &&
14112 { ac_try='test -s conftest.$ac_objext'
14113 { (eval echo "$as_me:14113: \"$ac_try\"") >&5
14114 (eval $ac_try) 2>&5
14116 echo "$as_me:14116: \$? = $ac_status" >&5
14117 (exit $ac_status); }; }; then
14118 cf_cv_term_header=$cf_header
14121 echo "$as_me: failed program was:" >&5
14122 cat conftest.$ac_ext >&5
14123 cf_cv_term_header=no
14125 rm -f conftest.$ac_objext conftest.$ac_ext
14131 echo "$as_me:14131: result: $cf_cv_term_header" >&5
14132 echo "${ECHO_T}$cf_cv_term_header" >&6
14134 case $cf_cv_term_header in #(vi
14136 cat >>confdefs.h <<\EOF
14137 #define HAVE_TERM_H 1
14141 ncurses/term.h) #(vi
14142 cat >>confdefs.h <<\EOF
14143 #define HAVE_NCURSES_TERM_H 1
14148 cat >>confdefs.h <<\EOF
14149 #define HAVE_NCURSESW_TERM_H 1
14155 echo "$as_me:14155: checking for unctrl.h" >&5
14156 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14157 if test "${cf_cv_unctrl_header+set}" = set; then
14158 echo $ECHO_N "(cached) $ECHO_C" >&6
14161 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14162 # for <unctrl.h> if we do not find the variant.
14164 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14166 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14168 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14169 cf_header_list="$cf_header_item $cf_header_list"
14173 for cf_header in $cf_header_list
14175 cat >conftest.$ac_ext <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14179 #include <${cf_cv_ncurses_header:-curses.h}>
14180 #include <${cf_header}>
14189 rm -f conftest.$ac_objext
14190 if { (eval echo "$as_me:14190: \"$ac_compile\"") >&5
14191 (eval $ac_compile) 2>&5
14193 echo "$as_me:14193: \$? = $ac_status" >&5
14194 (exit $ac_status); } &&
14195 { ac_try='test -s conftest.$ac_objext'
14196 { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197 (eval $ac_try) 2>&5
14199 echo "$as_me:14199: \$? = $ac_status" >&5
14200 (exit $ac_status); }; }; then
14201 cf_cv_unctrl_header=$cf_header
14204 echo "$as_me: failed program was:" >&5
14205 cat conftest.$ac_ext >&5
14206 cf_cv_unctrl_header=no
14208 rm -f conftest.$ac_objext conftest.$ac_ext
14211 case $cf_cv_unctrl_header in #(vi
14213 { echo "$as_me:14213: WARNING: unctrl.h header not found" >&5
14214 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14219 echo "$as_me:14219: result: $cf_cv_unctrl_header" >&5
14220 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14222 case $cf_cv_unctrl_header in #(vi
14224 cat >>confdefs.h <<\EOF
14225 #define HAVE_UNCTRL_H 1
14229 ncurses/unctrl.h) #(vi
14230 cat >>confdefs.h <<\EOF
14231 #define HAVE_NCURSES_UNCTRL_H 1
14236 cat >>confdefs.h <<\EOF
14237 #define HAVE_NCURSESW_UNCTRL_H 1
14244 assume_default_colors \
14270 use_default_colors \
14282 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14284 echo "$as_me:14284: checking for ${cf_func}" >&5
14285 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14287 echo "${as_me:-configure}:14287: testing ${cf_func} ..." 1>&5
14289 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
14293 eval cf_result='$ac_cv_func_'$cf_func
14294 if test ".$cf_result" != ".no"; then
14295 cat >conftest.$ac_ext <<_ACEOF
14296 #line 14296 "configure"
14297 #include "confdefs.h"
14299 #ifdef HAVE_XCURSES
14300 #include <xcurses.h>
14301 char * XCursesProgramName = "test";
14303 #include <${cf_cv_ncurses_header:-curses.h}>
14304 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14305 #include <ncursesw/term.h>
14306 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14307 #include <ncurses/term.h>
14308 #elif defined(HAVE_TERM_H)
14318 long foo = (long)(&${cf_func});
14319 if (foo + 1234 > 5678)
14320 ${cf_cv_main_return:-return}(foo);
14327 rm -f conftest.$ac_objext conftest$ac_exeext
14328 if { (eval echo "$as_me:14328: \"$ac_link\"") >&5
14329 (eval $ac_link) 2>&5
14331 echo "$as_me:14331: \$? = $ac_status" >&5
14332 (exit $ac_status); } &&
14333 { ac_try='test -s conftest$ac_exeext'
14334 { (eval echo "$as_me:14334: \"$ac_try\"") >&5
14335 (eval $ac_try) 2>&5
14337 echo "$as_me:14337: \$? = $ac_status" >&5
14338 (exit $ac_status); }; }; then
14341 echo "$as_me: failed program was:" >&5
14342 cat conftest.$ac_ext >&5
14345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14347 eval 'cf_cv_func_'$cf_func'=$cf_result'
14351 # use the computed/retrieved cache-value:
14352 eval 'cf_result=$cf_cv_func_'$cf_func
14353 echo "$as_me:14353: result: $cf_result" >&5
14354 echo "${ECHO_T}$cf_result" >&6
14355 if test $cf_result != no; then
14356 cat >>confdefs.h <<EOF
14357 #define HAVE_${cf_tr_func} 1
14363 for cf_func in tputs
14366 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14368 echo "$as_me:14368: checking for ${cf_func}" >&5
14369 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14371 echo "${as_me:-configure}:14371: testing ${cf_func} ..." 1>&5
14373 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14374 echo $ECHO_N "(cached) $ECHO_C" >&6
14377 eval cf_result='$ac_cv_func_'$cf_func
14378 if test ".$cf_result" != ".no"; then
14379 cat >conftest.$ac_ext <<_ACEOF
14380 #line 14380 "configure"
14381 #include "confdefs.h"
14383 #ifdef HAVE_XCURSES
14384 #include <xcurses.h>
14385 char * XCursesProgramName = "test";
14387 #include <${cf_cv_ncurses_header:-curses.h}>
14388 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14389 #include <ncursesw/term.h>
14390 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14391 #include <ncurses/term.h>
14392 #elif defined(HAVE_TERM_H)
14402 long foo = (long)(&${cf_func});
14403 if (foo + 1234 > 5678)
14404 ${cf_cv_main_return:-return}(foo);
14411 rm -f conftest.$ac_objext conftest$ac_exeext
14412 if { (eval echo "$as_me:14412: \"$ac_link\"") >&5
14413 (eval $ac_link) 2>&5
14415 echo "$as_me:14415: \$? = $ac_status" >&5
14416 (exit $ac_status); } &&
14417 { ac_try='test -s conftest$ac_exeext'
14418 { (eval echo "$as_me:14418: \"$ac_try\"") >&5
14419 (eval $ac_try) 2>&5
14421 echo "$as_me:14421: \$? = $ac_status" >&5
14422 (exit $ac_status); }; }; then
14425 echo "$as_me: failed program was:" >&5
14426 cat conftest.$ac_ext >&5
14429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14431 eval 'cf_cv_func_'$cf_func'=$cf_result'
14435 # use the computed/retrieved cache-value:
14436 eval 'cf_result=$cf_cv_func_'$cf_func
14437 echo "$as_me:14437: result: $cf_result" >&5
14438 echo "${ECHO_T}$cf_result" >&6
14439 if test $cf_result != no; then
14440 cat >>confdefs.h <<EOF
14441 #define HAVE_${cf_tr_func} 1
14447 if test x$cf_cv_func_tputs = xyes
14450 for cf_arg in int char
14452 for cf_ret in int void
14454 if test $cf_ret = void
14456 cf_return="/* nothing */"
14458 cf_return="return value"
14460 cat >conftest.$ac_ext <<_ACEOF
14461 #line 14461 "configure"
14462 #include "confdefs.h"
14464 #include <${cf_cv_ncurses_header:-curses.h}>
14465 #include <$cf_cv_term_header>
14467 static $cf_ret outc($cf_arg value) { $cf_return; }
14473 tputs("hello", 0, outc);
14474 ${cf_cv_main_return:-return}(0);
14480 rm -f conftest.$ac_objext
14481 if { (eval echo "$as_me:14481: \"$ac_compile\"") >&5
14482 (eval $ac_compile) 2>&5
14484 echo "$as_me:14484: \$? = $ac_status" >&5
14485 (exit $ac_status); } &&
14486 { ac_try='test -s conftest.$ac_objext'
14487 { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14490 echo "$as_me:14490: \$? = $ac_status" >&5
14491 (exit $ac_status); }; }; then
14493 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14495 echo "${as_me:-configure}:14495: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14497 cat >>confdefs.h <<EOF
14498 #define TPUTS_ARG $cf_arg
14499 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14500 #define TPUTS_RETURN(value) $cf_return
14506 echo "$as_me: failed program was:" >&5
14507 cat conftest.$ac_ext >&5
14509 rm -f conftest.$ac_objext conftest.$ac_ext
14511 test $cf_done = yes && break
14515 echo "$as_me:14515: checking for ncurses extended functions" >&5
14516 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14517 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14518 echo $ECHO_N "(cached) $ECHO_C" >&6
14521 cat >conftest.$ac_ext <<_ACEOF
14522 #line 14522 "configure"
14523 #include "confdefs.h"
14525 #include <${cf_cv_ncurses_header:-curses.h}>
14530 int x = NCURSES_EXT_FUNCS
14536 rm -f conftest.$ac_objext
14537 if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5
14538 (eval $ac_compile) 2>&5
14540 echo "$as_me:14540: \$? = $ac_status" >&5
14541 (exit $ac_status); } &&
14542 { ac_try='test -s conftest.$ac_objext'
14543 { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544 (eval $ac_try) 2>&5
14546 echo "$as_me:14546: \$? = $ac_status" >&5
14547 (exit $ac_status); }; }; then
14548 cf_cv_ncurses_ext_funcs=defined
14550 echo "$as_me: failed program was:" >&5
14551 cat conftest.$ac_ext >&5
14553 cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14557 #include <${cf_cv_ncurses_header:-curses.h}>
14562 (void) assume_default_colors (0, 0);
14563 (void) curses_version ();
14564 (void) define_key (0, 0);
14565 (void) is_term_resized (0, 0);
14566 (void) key_defined (0);
14567 (void) keybound (0, 0);
14568 (void) keyok (0, 0);
14569 (void) resize_term (0, 0);
14570 (void) resizeterm (0, 0);
14571 (void) use_default_colors ();
14572 (void) use_extended_names (0);
14573 (void) wresize (0, 0, 0);
14578 rm -f conftest.$ac_objext conftest$ac_exeext
14579 if { (eval echo "$as_me:14579: \"$ac_link\"") >&5
14580 (eval $ac_link) 2>&5
14582 echo "$as_me:14582: \$? = $ac_status" >&5
14583 (exit $ac_status); } &&
14584 { ac_try='test -s conftest$ac_exeext'
14585 { (eval echo "$as_me:14585: \"$ac_try\"") >&5
14586 (eval $ac_try) 2>&5
14588 echo "$as_me:14588: \$? = $ac_status" >&5
14589 (exit $ac_status); }; }; then
14590 cf_cv_ncurses_ext_funcs=yes
14592 echo "$as_me: failed program was:" >&5
14593 cat conftest.$ac_ext >&5
14594 cf_cv_ncurses_ext_funcs=no
14596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14599 rm -f conftest.$ac_objext conftest.$ac_ext
14602 echo "$as_me:14602: result: $cf_cv_ncurses_ext_funcs" >&5
14603 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14604 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
14605 #define NCURSES_EXT_FUNCS 1
14608 if test "$cf_enable_widec" = yes
14610 # workaround for systems with ncurses before 20111029, due to change of
14611 # feature test macro from _XPG5 to _XOPEN_SOURCE
14612 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14615 echo "$as_me:14615: checking if _XPG5 should be defined to enable wide-characters" >&5
14616 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14618 cat >conftest.$ac_ext <<_ACEOF
14619 #line 14619 "configure"
14620 #include "confdefs.h"
14622 #include <${cf_cv_ncurses_header:-curses.h}>
14631 rm -f conftest.$ac_objext
14632 if { (eval echo "$as_me:14632: \"$ac_compile\"") >&5
14633 (eval $ac_compile) 2>&5
14635 echo "$as_me:14635: \$? = $ac_status" >&5
14636 (exit $ac_status); } &&
14637 { ac_try='test -s conftest.$ac_objext'
14638 { (eval echo "$as_me:14638: \"$ac_try\"") >&5
14639 (eval $ac_try) 2>&5
14641 echo "$as_me:14641: \$? = $ac_status" >&5
14642 (exit $ac_status); }; }; then
14645 echo "$as_me: failed program was:" >&5
14646 cat conftest.$ac_ext >&5
14647 cf_save_cppflags="$CPPFLAGS"
14648 CPPFLAGS="$CPPFLAGS -D_XPG5"
14649 cat >conftest.$ac_ext <<_ACEOF
14650 #line 14650 "configure"
14651 #include "confdefs.h"
14653 #include <${cf_cv_ncurses_header:-curses.h}>
14662 rm -f conftest.$ac_objext
14663 if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
14664 (eval $ac_compile) 2>&5
14666 echo "$as_me:14666: \$? = $ac_status" >&5
14667 (exit $ac_status); } &&
14668 { ac_try='test -s conftest.$ac_objext'
14669 { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14670 (eval $ac_try) 2>&5
14672 echo "$as_me:14672: \$? = $ac_status" >&5
14673 (exit $ac_status); }; }; then
14676 echo "$as_me: failed program was:" >&5
14677 cat conftest.$ac_ext >&5
14679 rm -f conftest.$ac_objext conftest.$ac_ext
14680 CPPFLAGS="$cf_save_cppflags"
14682 rm -f conftest.$ac_objext conftest.$ac_ext
14683 echo "$as_me:14683: result: $cf_define_xpg5" >&5
14684 echo "${ECHO_T}$cf_define_xpg5" >&6
14686 if test "$cf_define_xpg5" = yes
14688 CPPFLAGS="$CPPFLAGS -D_XPG5"
14692 echo "$as_me:14692: checking for wide-character functions" >&5
14693 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14694 if test "${cf_cv_widechar_funcs+set}" = set; then
14695 echo $ECHO_N "(cached) $ECHO_C" >&6
14698 cat >conftest.$ac_ext <<_ACEOF
14699 #line 14699 "configure"
14700 #include "confdefs.h"
14702 #include <${cf_cv_ncurses_header:-curses.h}>
14707 static wchar_t src_wchar[2];
14708 static cchar_t dst_cchar;
14709 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14715 rm -f conftest.$ac_objext conftest$ac_exeext
14716 if { (eval echo "$as_me:14716: \"$ac_link\"") >&5
14717 (eval $ac_link) 2>&5
14719 echo "$as_me:14719: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest$ac_exeext'
14722 { (eval echo "$as_me:14722: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14725 echo "$as_me:14725: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
14727 cf_cv_widechar_funcs=yes
14729 echo "$as_me: failed program was:" >&5
14730 cat conftest.$ac_ext >&5
14731 cf_cv_widechar_funcs=no
14733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14736 echo "$as_me:14736: result: $cf_cv_widechar_funcs" >&5
14737 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14738 if test "$cf_cv_widechar_funcs" != no ; then
14739 cat >>confdefs.h <<\EOF
14740 #define USE_WIDEC_SUPPORT 1
14744 cat >>confdefs.h <<\EOF
14745 #define USE_WIDEC_SUPPORT 0
14750 cat >>confdefs.h <<\EOF
14751 #define USE_WIDEC_SUPPORT 0
14756 echo "$as_me:14756: checking if sys/time.h works with sys/select.h" >&5
14757 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14758 if test "${cf_cv_sys_time_select+set}" = set; then
14759 echo $ECHO_N "(cached) $ECHO_C" >&6
14762 cat >conftest.$ac_ext <<_ACEOF
14763 #line 14763 "configure"
14764 #include "confdefs.h"
14766 #include <sys/types.h>
14767 #ifdef HAVE_SYS_TIME_H
14768 #include <sys/time.h>
14770 #ifdef HAVE_SYS_SELECT_H
14771 #include <sys/select.h>
14782 rm -f conftest.$ac_objext
14783 if { (eval echo "$as_me:14783: \"$ac_compile\"") >&5
14784 (eval $ac_compile) 2>&5
14786 echo "$as_me:14786: \$? = $ac_status" >&5
14787 (exit $ac_status); } &&
14788 { ac_try='test -s conftest.$ac_objext'
14789 { (eval echo "$as_me:14789: \"$ac_try\"") >&5
14790 (eval $ac_try) 2>&5
14792 echo "$as_me:14792: \$? = $ac_status" >&5
14793 (exit $ac_status); }; }; then
14794 cf_cv_sys_time_select=yes
14796 echo "$as_me: failed program was:" >&5
14797 cat conftest.$ac_ext >&5
14798 cf_cv_sys_time_select=no
14800 rm -f conftest.$ac_objext conftest.$ac_ext
14804 echo "$as_me:14804: result: $cf_cv_sys_time_select" >&5
14805 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14806 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14807 #define HAVE_SYS_TIME_SELECT 1
14810 echo "$as_me:14810: checking for function curses_version" >&5
14811 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14812 if test "${cf_cv_func_curses_version+set}" = set; then
14813 echo $ECHO_N "(cached) $ECHO_C" >&6
14816 if test "$cross_compiling" = yes; then
14817 cf_cv_func_curses_version=unknown
14819 cat >conftest.$ac_ext <<_ACEOF
14820 #line 14820 "configure"
14821 #include "confdefs.h"
14823 #include <${cf_cv_ncurses_header:-curses.h}>
14827 sprintf(temp, "%s\n", curses_version());
14828 ${cf_cv_main_return:-return}(0);
14832 rm -f conftest$ac_exeext
14833 if { (eval echo "$as_me:14833: \"$ac_link\"") >&5
14834 (eval $ac_link) 2>&5
14836 echo "$as_me:14836: \$? = $ac_status" >&5
14837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14838 { (eval echo "$as_me:14838: \"$ac_try\"") >&5
14839 (eval $ac_try) 2>&5
14841 echo "$as_me:14841: \$? = $ac_status" >&5
14842 (exit $ac_status); }; }; then
14843 cf_cv_func_curses_version=yes
14846 echo "$as_me: program exited with status $ac_status" >&5
14847 echo "$as_me: failed program was:" >&5
14848 cat conftest.$ac_ext >&5
14849 cf_cv_func_curses_version=no
14852 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14856 echo "$as_me:14856: result: $cf_cv_func_curses_version" >&5
14857 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14858 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14859 #define HAVE_CURSES_VERSION 1
14862 echo "$as_me:14862: checking for ncurses wrap-prefix" >&5
14863 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14865 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14866 if test "${with_ncurses_wrap_prefix+set}" = set; then
14867 withval="$with_ncurses_wrap_prefix"
14868 NCURSES_WRAP_PREFIX=$withval
14870 NCURSES_WRAP_PREFIX=_nc_
14872 echo "$as_me:14872: result: $NCURSES_WRAP_PREFIX" >&5
14873 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14875 echo "$as_me:14875: checking for alternate character set array" >&5
14876 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14877 if test "${cf_cv_curses_acs_map+set}" = set; then
14878 echo $ECHO_N "(cached) $ECHO_C" >&6
14881 cf_cv_curses_acs_map=unknown
14882 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14884 cat >conftest.$ac_ext <<_ACEOF
14885 #line 14885 "configure"
14886 #include "confdefs.h"
14888 #include <${cf_cv_ncurses_header:-curses.h}>
14894 $name['k'] = ACS_PLUS
14900 rm -f conftest.$ac_objext conftest$ac_exeext
14901 if { (eval echo "$as_me:14901: \"$ac_link\"") >&5
14902 (eval $ac_link) 2>&5
14904 echo "$as_me:14904: \$? = $ac_status" >&5
14905 (exit $ac_status); } &&
14906 { ac_try='test -s conftest$ac_exeext'
14907 { (eval echo "$as_me:14907: \"$ac_try\"") >&5
14908 (eval $ac_try) 2>&5
14910 echo "$as_me:14910: \$? = $ac_status" >&5
14911 (exit $ac_status); }; }; then
14912 cf_cv_curses_acs_map=$name; break
14914 echo "$as_me: failed program was:" >&5
14915 cat conftest.$ac_ext >&5
14917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14921 echo "$as_me:14921: result: $cf_cv_curses_acs_map" >&5
14922 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14924 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14925 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14928 if test "$cf_enable_widec" = yes; then
14930 echo "$as_me:14930: checking for wide alternate character set array" >&5
14931 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14932 if test "${cf_cv_curses_wacs_map+set}" = set; then
14933 echo $ECHO_N "(cached) $ECHO_C" >&6
14936 cf_cv_curses_wacs_map=unknown
14937 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14939 cat >conftest.$ac_ext <<_ACEOF
14940 #line 14940 "configure"
14941 #include "confdefs.h"
14943 #ifndef _XOPEN_SOURCE_EXTENDED
14944 #define _XOPEN_SOURCE_EXTENDED
14946 #include <${cf_cv_ncurses_header:-curses.h}>
14950 void *foo = &($name['k'])
14955 rm -f conftest.$ac_objext conftest$ac_exeext
14956 if { (eval echo "$as_me:14956: \"$ac_link\"") >&5
14957 (eval $ac_link) 2>&5
14959 echo "$as_me:14959: \$? = $ac_status" >&5
14960 (exit $ac_status); } &&
14961 { ac_try='test -s conftest$ac_exeext'
14962 { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963 (eval $ac_try) 2>&5
14965 echo "$as_me:14965: \$? = $ac_status" >&5
14966 (exit $ac_status); }; }; then
14967 cf_cv_curses_wacs_map=$name
14970 echo "$as_me: failed program was:" >&5
14971 cat conftest.$ac_ext >&5
14973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14976 echo "$as_me:14976: result: $cf_cv_curses_wacs_map" >&5
14977 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14979 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14980 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14983 echo "$as_me:14983: checking for wide alternate character constants" >&5
14984 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14985 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14986 echo $ECHO_N "(cached) $ECHO_C" >&6
14989 cf_cv_curses_wacs_symbols=no
14990 if test "$cf_cv_curses_wacs_map" != unknown
14992 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14996 #ifndef _XOPEN_SOURCE_EXTENDED
14997 #define _XOPEN_SOURCE_EXTENDED
14999 #include <${cf_cv_ncurses_header:-curses.h}>
15003 cchar_t *foo = WACS_PLUS;
15004 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15009 rm -f conftest.$ac_objext conftest$ac_exeext
15010 if { (eval echo "$as_me:15010: \"$ac_link\"") >&5
15011 (eval $ac_link) 2>&5
15013 echo "$as_me:15013: \$? = $ac_status" >&5
15014 (exit $ac_status); } &&
15015 { ac_try='test -s conftest$ac_exeext'
15016 { (eval echo "$as_me:15016: \"$ac_try\"") >&5
15017 (eval $ac_try) 2>&5
15019 echo "$as_me:15019: \$? = $ac_status" >&5
15020 (exit $ac_status); }; }; then
15021 cf_cv_curses_wacs_symbols=yes
15023 echo "$as_me: failed program was:" >&5
15024 cat conftest.$ac_ext >&5
15026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15028 cat >conftest.$ac_ext <<_ACEOF
15029 #line 15029 "configure"
15030 #include "confdefs.h"
15032 #ifndef _XOPEN_SOURCE_EXTENDED
15033 #define _XOPEN_SOURCE_EXTENDED
15035 #include <${cf_cv_ncurses_header:-curses.h}>
15039 cchar_t *foo = WACS_PLUS
15044 rm -f conftest.$ac_objext conftest$ac_exeext
15045 if { (eval echo "$as_me:15045: \"$ac_link\"") >&5
15046 (eval $ac_link) 2>&5
15048 echo "$as_me:15048: \$? = $ac_status" >&5
15049 (exit $ac_status); } &&
15050 { ac_try='test -s conftest$ac_exeext'
15051 { (eval echo "$as_me:15051: \"$ac_try\"") >&5
15052 (eval $ac_try) 2>&5
15054 echo "$as_me:15054: \$? = $ac_status" >&5
15055 (exit $ac_status); }; }; then
15056 cf_cv_curses_wacs_symbols=yes
15058 echo "$as_me: failed program was:" >&5
15059 cat conftest.$ac_ext >&5
15061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15065 echo "$as_me:15065: result: $cf_cv_curses_wacs_symbols" >&5
15066 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15068 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
15069 #define CURSES_WACS_SYMBOLS 1
15074 echo "$as_me:15074: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15075 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15076 cat >conftest.$ac_ext <<_ACEOF
15077 #line 15077 "configure"
15078 #include "confdefs.h"
15080 #ifndef _XOPEN_SOURCE_EXTENDED
15081 #define _XOPEN_SOURCE_EXTENDED
15083 #include <${cf_cv_ncurses_header:-curses.h}>
15094 rm -f conftest.$ac_objext
15095 if { (eval echo "$as_me:15095: \"$ac_compile\"") >&5
15096 (eval $ac_compile) 2>&5
15098 echo "$as_me:15098: \$? = $ac_status" >&5
15099 (exit $ac_status); } &&
15100 { ac_try='test -s conftest.$ac_objext'
15101 { (eval echo "$as_me:15101: \"$ac_try\"") >&5
15102 (eval $ac_try) 2>&5
15104 echo "$as_me:15104: \$? = $ac_status" >&5
15105 (exit $ac_status); }; }; then
15108 echo "$as_me: failed program was:" >&5
15109 cat conftest.$ac_ext >&5
15112 rm -f conftest.$ac_objext conftest.$ac_ext
15113 echo "$as_me:15113: result: $cf_result" >&5
15114 echo "${ECHO_T}$cf_result" >&6
15115 if test $cf_result = yes ; then
15117 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15119 cat >>confdefs.h <<EOF
15120 #define $cf_result 1
15124 cat >>confdefs.h <<EOF
15125 #define attr_t long
15130 if test "$cf_enable_widec" = yes; then
15132 # This is needed on Tru64 5.0 to declare mbstate_t
15133 echo "$as_me:15133: checking if we must include wchar.h to declare mbstate_t" >&5
15134 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15135 if test "${cf_cv_mbstate_t+set}" = set; then
15136 echo $ECHO_N "(cached) $ECHO_C" >&6
15139 cat >conftest.$ac_ext <<_ACEOF
15140 #line 15140 "configure"
15141 #include "confdefs.h"
15143 #include <stdlib.h>
15144 #include <stdarg.h>
15146 #ifdef HAVE_LIBUTF8_H
15147 #include <libutf8.h>
15157 rm -f conftest.$ac_objext
15158 if { (eval echo "$as_me:15158: \"$ac_compile\"") >&5
15159 (eval $ac_compile) 2>&5
15161 echo "$as_me:15161: \$? = $ac_status" >&5
15162 (exit $ac_status); } &&
15163 { ac_try='test -s conftest.$ac_objext'
15164 { (eval echo "$as_me:15164: \"$ac_try\"") >&5
15165 (eval $ac_try) 2>&5
15167 echo "$as_me:15167: \$? = $ac_status" >&5
15168 (exit $ac_status); }; }; then
15171 echo "$as_me: failed program was:" >&5
15172 cat conftest.$ac_ext >&5
15173 cat >conftest.$ac_ext <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15177 #include <stdlib.h>
15178 #include <stdarg.h>
15181 #ifdef HAVE_LIBUTF8_H
15182 #include <libutf8.h>
15192 rm -f conftest.$ac_objext
15193 if { (eval echo "$as_me:15193: \"$ac_compile\"") >&5
15194 (eval $ac_compile) 2>&5
15196 echo "$as_me:15196: \$? = $ac_status" >&5
15197 (exit $ac_status); } &&
15198 { ac_try='test -s conftest.$ac_objext'
15199 { (eval echo "$as_me:15199: \"$ac_try\"") >&5
15200 (eval $ac_try) 2>&5
15202 echo "$as_me:15202: \$? = $ac_status" >&5
15203 (exit $ac_status); }; }; then
15204 cf_cv_mbstate_t=yes
15206 echo "$as_me: failed program was:" >&5
15207 cat conftest.$ac_ext >&5
15208 cf_cv_mbstate_t=unknown
15210 rm -f conftest.$ac_objext conftest.$ac_ext
15212 rm -f conftest.$ac_objext conftest.$ac_ext
15214 echo "$as_me:15214: result: $cf_cv_mbstate_t" >&5
15215 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15217 if test "$cf_cv_mbstate_t" = yes ; then
15218 cat >>confdefs.h <<\EOF
15219 #define NEED_WCHAR_H 1
15225 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15226 if test "$cf_cv_mbstate_t" = unknown ; then
15227 NCURSES_MBSTATE_T=1
15230 # if we find mbstate_t in either place, use substitution to provide a fallback.
15231 if test "$cf_cv_mbstate_t" != unknown ; then
15232 NCURSES_OK_MBSTATE_T=1
15235 # This is needed on Tru64 5.0 to declare wchar_t
15236 echo "$as_me:15236: checking if we must include wchar.h to declare wchar_t" >&5
15237 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15238 if test "${cf_cv_wchar_t+set}" = set; then
15239 echo $ECHO_N "(cached) $ECHO_C" >&6
15242 cat >conftest.$ac_ext <<_ACEOF
15243 #line 15243 "configure"
15244 #include "confdefs.h"
15246 #include <stdlib.h>
15247 #include <stdarg.h>
15249 #ifdef HAVE_LIBUTF8_H
15250 #include <libutf8.h>
15260 rm -f conftest.$ac_objext
15261 if { (eval echo "$as_me:15261: \"$ac_compile\"") >&5
15262 (eval $ac_compile) 2>&5
15264 echo "$as_me:15264: \$? = $ac_status" >&5
15265 (exit $ac_status); } &&
15266 { ac_try='test -s conftest.$ac_objext'
15267 { (eval echo "$as_me:15267: \"$ac_try\"") >&5
15268 (eval $ac_try) 2>&5
15270 echo "$as_me:15270: \$? = $ac_status" >&5
15271 (exit $ac_status); }; }; then
15274 echo "$as_me: failed program was:" >&5
15275 cat conftest.$ac_ext >&5
15276 cat >conftest.$ac_ext <<_ACEOF
15277 #line 15277 "configure"
15278 #include "confdefs.h"
15280 #include <stdlib.h>
15281 #include <stdarg.h>
15284 #ifdef HAVE_LIBUTF8_H
15285 #include <libutf8.h>
15295 rm -f conftest.$ac_objext
15296 if { (eval echo "$as_me:15296: \"$ac_compile\"") >&5
15297 (eval $ac_compile) 2>&5
15299 echo "$as_me:15299: \$? = $ac_status" >&5
15300 (exit $ac_status); } &&
15301 { ac_try='test -s conftest.$ac_objext'
15302 { (eval echo "$as_me:15302: \"$ac_try\"") >&5
15303 (eval $ac_try) 2>&5
15305 echo "$as_me:15305: \$? = $ac_status" >&5
15306 (exit $ac_status); }; }; then
15309 echo "$as_me: failed program was:" >&5
15310 cat conftest.$ac_ext >&5
15311 cf_cv_wchar_t=unknown
15313 rm -f conftest.$ac_objext conftest.$ac_ext
15315 rm -f conftest.$ac_objext conftest.$ac_ext
15317 echo "$as_me:15317: result: $cf_cv_wchar_t" >&5
15318 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15320 if test "$cf_cv_wchar_t" = yes ; then
15321 cat >>confdefs.h <<\EOF
15322 #define NEED_WCHAR_H 1
15328 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15329 if test "$cf_cv_wchar_t" = unknown ; then
15333 # if we find wchar_t in either place, use substitution to provide a fallback.
15334 if test "$cf_cv_wchar_t" != unknown ; then
15335 NCURSES_OK_WCHAR_T=1
15338 # This is needed on Tru64 5.0 to declare wint_t
15339 echo "$as_me:15339: checking if we must include wchar.h to declare wint_t" >&5
15340 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15341 if test "${cf_cv_wint_t+set}" = set; then
15342 echo $ECHO_N "(cached) $ECHO_C" >&6
15345 cat >conftest.$ac_ext <<_ACEOF
15346 #line 15346 "configure"
15347 #include "confdefs.h"
15349 #include <stdlib.h>
15350 #include <stdarg.h>
15352 #ifdef HAVE_LIBUTF8_H
15353 #include <libutf8.h>
15363 rm -f conftest.$ac_objext
15364 if { (eval echo "$as_me:15364: \"$ac_compile\"") >&5
15365 (eval $ac_compile) 2>&5
15367 echo "$as_me:15367: \$? = $ac_status" >&5
15368 (exit $ac_status); } &&
15369 { ac_try='test -s conftest.$ac_objext'
15370 { (eval echo "$as_me:15370: \"$ac_try\"") >&5
15371 (eval $ac_try) 2>&5
15373 echo "$as_me:15373: \$? = $ac_status" >&5
15374 (exit $ac_status); }; }; then
15377 echo "$as_me: failed program was:" >&5
15378 cat conftest.$ac_ext >&5
15379 cat >conftest.$ac_ext <<_ACEOF
15380 #line 15380 "configure"
15381 #include "confdefs.h"
15383 #include <stdlib.h>
15384 #include <stdarg.h>
15387 #ifdef HAVE_LIBUTF8_H
15388 #include <libutf8.h>
15398 rm -f conftest.$ac_objext
15399 if { (eval echo "$as_me:15399: \"$ac_compile\"") >&5
15400 (eval $ac_compile) 2>&5
15402 echo "$as_me:15402: \$? = $ac_status" >&5
15403 (exit $ac_status); } &&
15404 { ac_try='test -s conftest.$ac_objext'
15405 { (eval echo "$as_me:15405: \"$ac_try\"") >&5
15406 (eval $ac_try) 2>&5
15408 echo "$as_me:15408: \$? = $ac_status" >&5
15409 (exit $ac_status); }; }; then
15412 echo "$as_me: failed program was:" >&5
15413 cat conftest.$ac_ext >&5
15414 cf_cv_wint_t=unknown
15416 rm -f conftest.$ac_objext conftest.$ac_ext
15418 rm -f conftest.$ac_objext conftest.$ac_ext
15420 echo "$as_me:15420: result: $cf_cv_wint_t" >&5
15421 echo "${ECHO_T}$cf_cv_wint_t" >&6
15423 if test "$cf_cv_wint_t" = yes ; then
15424 cat >>confdefs.h <<\EOF
15425 #define NEED_WCHAR_H 1
15431 # if we do not find wint_t in either place, use substitution to provide a fallback.
15432 if test "$cf_cv_wint_t" = unknown ; then
15436 # if we find wint_t in either place, use substitution to provide a fallback.
15437 if test "$cf_cv_wint_t" != unknown ; then
15438 NCURSES_OK_WINT_T=1
15441 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15443 echo "$as_me:15443: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15444 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15445 cat >conftest.$ac_ext <<_ACEOF
15446 #line 15446 "configure"
15447 #include "confdefs.h"
15449 #ifndef _XOPEN_SOURCE_EXTENDED
15450 #define _XOPEN_SOURCE_EXTENDED
15452 #include <${cf_cv_ncurses_header:-curses.h}>
15463 rm -f conftest.$ac_objext
15464 if { (eval echo "$as_me:15464: \"$ac_compile\"") >&5
15465 (eval $ac_compile) 2>&5
15467 echo "$as_me:15467: \$? = $ac_status" >&5
15468 (exit $ac_status); } &&
15469 { ac_try='test -s conftest.$ac_objext'
15470 { (eval echo "$as_me:15470: \"$ac_try\"") >&5
15471 (eval $ac_try) 2>&5
15473 echo "$as_me:15473: \$? = $ac_status" >&5
15474 (exit $ac_status); }; }; then
15477 echo "$as_me: failed program was:" >&5
15478 cat conftest.$ac_ext >&5
15481 rm -f conftest.$ac_objext conftest.$ac_ext
15482 echo "$as_me:15482: result: $cf_result" >&5
15483 echo "${ECHO_T}$cf_result" >&6
15484 if test $cf_result = yes ; then
15486 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15488 cat >>confdefs.h <<EOF
15489 #define $cf_result 1
15493 cat >>confdefs.h <<EOF
15494 #define mbstate_t long
15501 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15503 echo "$as_me:15503: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15504 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15505 cat >conftest.$ac_ext <<_ACEOF
15506 #line 15506 "configure"
15507 #include "confdefs.h"
15509 #ifndef _XOPEN_SOURCE_EXTENDED
15510 #define _XOPEN_SOURCE_EXTENDED
15512 #include <${cf_cv_ncurses_header:-curses.h}>
15523 rm -f conftest.$ac_objext
15524 if { (eval echo "$as_me:15524: \"$ac_compile\"") >&5
15525 (eval $ac_compile) 2>&5
15527 echo "$as_me:15527: \$? = $ac_status" >&5
15528 (exit $ac_status); } &&
15529 { ac_try='test -s conftest.$ac_objext'
15530 { (eval echo "$as_me:15530: \"$ac_try\"") >&5
15531 (eval $ac_try) 2>&5
15533 echo "$as_me:15533: \$? = $ac_status" >&5
15534 (exit $ac_status); }; }; then
15537 echo "$as_me: failed program was:" >&5
15538 cat conftest.$ac_ext >&5
15541 rm -f conftest.$ac_objext conftest.$ac_ext
15542 echo "$as_me:15542: result: $cf_result" >&5
15543 echo "${ECHO_T}$cf_result" >&6
15544 if test $cf_result = yes ; then
15546 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15548 cat >>confdefs.h <<EOF
15549 #define $cf_result 1
15553 cat >>confdefs.h <<EOF
15554 #define wchar_t long
15561 if test "$NCURSES_OK_WINT_T" = 0 ; then
15563 echo "$as_me:15563: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15564 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15565 cat >conftest.$ac_ext <<_ACEOF
15566 #line 15566 "configure"
15567 #include "confdefs.h"
15569 #ifndef _XOPEN_SOURCE_EXTENDED
15570 #define _XOPEN_SOURCE_EXTENDED
15572 #include <${cf_cv_ncurses_header:-curses.h}>
15583 rm -f conftest.$ac_objext
15584 if { (eval echo "$as_me:15584: \"$ac_compile\"") >&5
15585 (eval $ac_compile) 2>&5
15587 echo "$as_me:15587: \$? = $ac_status" >&5
15588 (exit $ac_status); } &&
15589 { ac_try='test -s conftest.$ac_objext'
15590 { (eval echo "$as_me:15590: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15593 echo "$as_me:15593: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
15597 echo "$as_me: failed program was:" >&5
15598 cat conftest.$ac_ext >&5
15601 rm -f conftest.$ac_objext conftest.$ac_ext
15602 echo "$as_me:15602: result: $cf_result" >&5
15603 echo "${ECHO_T}$cf_result" >&6
15604 if test $cf_result = yes ; then
15606 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15608 cat >>confdefs.h <<EOF
15609 #define $cf_result 1
15613 cat >>confdefs.h <<EOF
15614 #define wint_t long
15622 echo "$as_me:15622: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15623 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15625 cat >conftest.$ac_ext <<_ACEOF
15626 #line 15626 "configure"
15627 #include "confdefs.h"
15629 #ifdef HAVE_XCURSES
15630 #include <xcurses.h>
15631 char * XCursesProgramName = "test";
15633 #include <${cf_cv_ncurses_header:-curses.h}>
15634 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15635 #include <ncursesw/term.h>
15636 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15637 #include <ncurses/term.h>
15638 #elif defined(HAVE_TERM_H)
15647 void *foo = &(boolnames)
15653 rm -f conftest.$ac_objext
15654 if { (eval echo "$as_me:15654: \"$ac_compile\"") >&5
15655 (eval $ac_compile) 2>&5
15657 echo "$as_me:15657: \$? = $ac_status" >&5
15658 (exit $ac_status); } &&
15659 { ac_try='test -s conftest.$ac_objext'
15660 { (eval echo "$as_me:15660: \"$ac_try\"") >&5
15661 (eval $ac_try) 2>&5
15663 echo "$as_me:15663: \$? = $ac_status" >&5
15664 (exit $ac_status); }; }; then
15667 echo "$as_me: failed program was:" >&5
15668 cat conftest.$ac_ext >&5
15671 rm -f conftest.$ac_objext conftest.$ac_ext
15672 echo "$as_me:15672: result: $cf_result" >&5
15673 echo "${ECHO_T}$cf_result" >&6
15675 if test $cf_result = yes ; then
15677 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15679 cat >>confdefs.h <<EOF
15680 #define $cf_result 1
15684 echo "$as_me:15684: checking for data boolnames in library" >&5
15685 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15686 # BSD linkers insist on making weak linkage, but resolve at runtime.
15687 if test "$cross_compiling" = yes; then
15690 cat >conftest.$ac_ext <<_ACEOF
15691 #line 15691 "configure"
15692 #include "confdefs.h"
15694 #ifdef HAVE_XCURSES
15695 #include <xcurses.h>
15696 char * XCursesProgramName = "test";
15698 #include <${cf_cv_ncurses_header:-curses.h}>
15699 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15700 #include <ncursesw/term.h>
15701 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15702 #include <ncurses/term.h>
15703 #elif defined(HAVE_TERM_H)
15708 extern char boolnames;
15714 void *foo = &(boolnames);
15715 ${cf_cv_main_return:-return}(foo == 0);
15722 rm -f conftest.$ac_objext conftest$ac_exeext
15723 if { (eval echo "$as_me:15723: \"$ac_link\"") >&5
15724 (eval $ac_link) 2>&5
15726 echo "$as_me:15726: \$? = $ac_status" >&5
15727 (exit $ac_status); } &&
15728 { ac_try='test -s conftest$ac_exeext'
15729 { (eval echo "$as_me:15729: \"$ac_try\"") >&5
15730 (eval $ac_try) 2>&5
15732 echo "$as_me:15732: \$? = $ac_status" >&5
15733 (exit $ac_status); }; }; then
15736 echo "$as_me: failed program was:" >&5
15737 cat conftest.$ac_ext >&5
15740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15743 cat >conftest.$ac_ext <<_ACEOF
15744 #line 15744 "configure"
15745 #include "confdefs.h"
15747 #ifdef HAVE_XCURSES
15748 #include <xcurses.h>
15749 char * XCursesProgramName = "test";
15751 #include <${cf_cv_ncurses_header:-curses.h}>
15752 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15753 #include <ncursesw/term.h>
15754 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15755 #include <ncurses/term.h>
15756 #elif defined(HAVE_TERM_H)
15761 extern char boolnames;
15764 void *foo = &(boolnames);
15765 ${cf_cv_main_return:-return}(foo == 0);
15768 rm -f conftest$ac_exeext
15769 if { (eval echo "$as_me:15769: \"$ac_link\"") >&5
15770 (eval $ac_link) 2>&5
15772 echo "$as_me:15772: \$? = $ac_status" >&5
15773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15774 { (eval echo "$as_me:15774: \"$ac_try\"") >&5
15775 (eval $ac_try) 2>&5
15777 echo "$as_me:15777: \$? = $ac_status" >&5
15778 (exit $ac_status); }; }; then
15781 echo "$as_me: program exited with status $ac_status" >&5
15782 echo "$as_me: failed program was:" >&5
15783 cat conftest.$ac_ext >&5
15786 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15788 echo "$as_me:15788: result: $cf_result" >&5
15789 echo "${ECHO_T}$cf_result" >&6
15790 if test $cf_result = yes ; then
15792 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15794 cat >>confdefs.h <<EOF
15795 #define $cf_result 1
15801 echo "$as_me:15801: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15802 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15804 cat >conftest.$ac_ext <<_ACEOF
15805 #line 15805 "configure"
15806 #include "confdefs.h"
15808 #ifdef HAVE_XCURSES
15809 #include <xcurses.h>
15810 char * XCursesProgramName = "test";
15812 #include <${cf_cv_ncurses_header:-curses.h}>
15813 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15814 #include <ncursesw/term.h>
15815 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15816 #include <ncurses/term.h>
15817 #elif defined(HAVE_TERM_H)
15826 void *foo = &(boolfnames)
15832 rm -f conftest.$ac_objext
15833 if { (eval echo "$as_me:15833: \"$ac_compile\"") >&5
15834 (eval $ac_compile) 2>&5
15836 echo "$as_me:15836: \$? = $ac_status" >&5
15837 (exit $ac_status); } &&
15838 { ac_try='test -s conftest.$ac_objext'
15839 { (eval echo "$as_me:15839: \"$ac_try\"") >&5
15840 (eval $ac_try) 2>&5
15842 echo "$as_me:15842: \$? = $ac_status" >&5
15843 (exit $ac_status); }; }; then
15846 echo "$as_me: failed program was:" >&5
15847 cat conftest.$ac_ext >&5
15850 rm -f conftest.$ac_objext conftest.$ac_ext
15851 echo "$as_me:15851: result: $cf_result" >&5
15852 echo "${ECHO_T}$cf_result" >&6
15854 if test $cf_result = yes ; then
15856 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15858 cat >>confdefs.h <<EOF
15859 #define $cf_result 1
15863 echo "$as_me:15863: checking for data boolfnames in library" >&5
15864 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15865 # BSD linkers insist on making weak linkage, but resolve at runtime.
15866 if test "$cross_compiling" = yes; then
15869 cat >conftest.$ac_ext <<_ACEOF
15870 #line 15870 "configure"
15871 #include "confdefs.h"
15873 #ifdef HAVE_XCURSES
15874 #include <xcurses.h>
15875 char * XCursesProgramName = "test";
15877 #include <${cf_cv_ncurses_header:-curses.h}>
15878 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15879 #include <ncursesw/term.h>
15880 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15881 #include <ncurses/term.h>
15882 #elif defined(HAVE_TERM_H)
15887 extern char boolfnames;
15893 void *foo = &(boolfnames);
15894 ${cf_cv_main_return:-return}(foo == 0);
15901 rm -f conftest.$ac_objext conftest$ac_exeext
15902 if { (eval echo "$as_me:15902: \"$ac_link\"") >&5
15903 (eval $ac_link) 2>&5
15905 echo "$as_me:15905: \$? = $ac_status" >&5
15906 (exit $ac_status); } &&
15907 { ac_try='test -s conftest$ac_exeext'
15908 { (eval echo "$as_me:15908: \"$ac_try\"") >&5
15909 (eval $ac_try) 2>&5
15911 echo "$as_me:15911: \$? = $ac_status" >&5
15912 (exit $ac_status); }; }; then
15915 echo "$as_me: failed program was:" >&5
15916 cat conftest.$ac_ext >&5
15919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15922 cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15926 #ifdef HAVE_XCURSES
15927 #include <xcurses.h>
15928 char * XCursesProgramName = "test";
15930 #include <${cf_cv_ncurses_header:-curses.h}>
15931 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15932 #include <ncursesw/term.h>
15933 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15934 #include <ncurses/term.h>
15935 #elif defined(HAVE_TERM_H)
15940 extern char boolfnames;
15943 void *foo = &(boolfnames);
15944 ${cf_cv_main_return:-return}(foo == 0);
15947 rm -f conftest$ac_exeext
15948 if { (eval echo "$as_me:15948: \"$ac_link\"") >&5
15949 (eval $ac_link) 2>&5
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15953 { (eval echo "$as_me:15953: \"$ac_try\"") >&5
15954 (eval $ac_try) 2>&5
15956 echo "$as_me:15956: \$? = $ac_status" >&5
15957 (exit $ac_status); }; }; then
15960 echo "$as_me: program exited with status $ac_status" >&5
15961 echo "$as_me: failed program was:" >&5
15962 cat conftest.$ac_ext >&5
15965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15967 echo "$as_me:15967: result: $cf_result" >&5
15968 echo "${ECHO_T}$cf_result" >&6
15969 if test $cf_result = yes ; then
15971 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15973 cat >>confdefs.h <<EOF
15974 #define $cf_result 1
15981 echo "$as_me:15981: checking for an rpath option" >&5
15982 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15983 case $cf_cv_system_name in #(vi
15985 if test "$GCC" = yes; then
15986 LD_RPATH_OPT="-Wl,-rpath,"
15988 LD_RPATH_OPT="-rpath "
15991 linux*|gnu*|k*bsd*-gnu) #(vi
15992 LD_RPATH_OPT="-Wl,-rpath,"
15994 openbsd[2-9].*|mirbsd*) #(vi
15995 LD_RPATH_OPT="-Wl,-rpath,"
15997 dragonfly*|freebsd*) #(vi
15998 LD_RPATH_OPT="-rpath "
16001 LD_RPATH_OPT="-Wl,-rpath,"
16004 LD_RPATH_OPT="-rpath "
16012 echo "$as_me:16012: result: $LD_RPATH_OPT" >&5
16013 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16015 case "x$LD_RPATH_OPT" in #(vi
16017 echo "$as_me:16017: checking if we need a space after rpath option" >&5
16018 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16019 cf_save_LIBS="$LIBS"
16020 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
16021 cat >conftest.$ac_ext <<_ACEOF
16022 #line 16022 "configure"
16023 #include "confdefs.h"
16033 rm -f conftest.$ac_objext conftest$ac_exeext
16034 if { (eval echo "$as_me:16034: \"$ac_link\"") >&5
16035 (eval $ac_link) 2>&5
16037 echo "$as_me:16037: \$? = $ac_status" >&5
16038 (exit $ac_status); } &&
16039 { ac_try='test -s conftest$ac_exeext'
16040 { (eval echo "$as_me:16040: \"$ac_try\"") >&5
16041 (eval $ac_try) 2>&5
16043 echo "$as_me:16043: \$? = $ac_status" >&5
16044 (exit $ac_status); }; }; then
16047 echo "$as_me: failed program was:" >&5
16048 cat conftest.$ac_ext >&5
16051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16052 LIBS="$cf_save_LIBS"
16053 echo "$as_me:16053: result: $cf_rpath_space" >&5
16054 echo "${ECHO_T}$cf_rpath_space" >&6
16055 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16059 echo "$as_me:16059: checking if rpath-hack should be disabled" >&5
16060 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16062 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16063 if test "${enable_rpath_hack+set}" = set; then
16064 enableval="$enable_rpath_hack"
16065 test "$enableval" != no && enableval=yes
16066 if test "$enableval" != "yes" ; then
16067 cf_disable_rpath_hack=yes
16069 cf_disable_rpath_hack=no
16073 cf_disable_rpath_hack=no
16076 echo "$as_me:16076: result: $cf_disable_rpath_hack" >&5
16077 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16078 if test "$cf_disable_rpath_hack" = no ; then
16080 echo "$as_me:16080: checking for updated LDFLAGS" >&5
16081 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16082 if test -n "$LD_RPATH_OPT" ; then
16083 echo "$as_me:16083: result: maybe" >&5
16084 echo "${ECHO_T}maybe" >&6
16088 # Extract the first word of "$ac_prog", so it can be a program name with args.
16089 set dummy $ac_prog; ac_word=$2
16090 echo "$as_me:16090: checking for $ac_word" >&5
16091 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16092 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16093 echo $ECHO_N "(cached) $ECHO_C" >&6
16095 if test -n "$cf_ldd_prog"; then
16096 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16098 ac_save_IFS=$IFS; IFS=$ac_path_separator
16100 for ac_dir in $ac_dummy; do
16102 test -z "$ac_dir" && ac_dir=.
16103 $as_executable_p "$ac_dir/$ac_word" || continue
16104 ac_cv_prog_cf_ldd_prog="$ac_prog"
16105 echo "$as_me:16105: found $ac_dir/$ac_word" >&5
16111 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16112 if test -n "$cf_ldd_prog"; then
16113 echo "$as_me:16113: result: $cf_ldd_prog" >&5
16114 echo "${ECHO_T}$cf_ldd_prog" >&6
16116 echo "$as_me:16116: result: no" >&5
16117 echo "${ECHO_T}no" >&6
16120 test -n "$cf_ldd_prog" && break
16122 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16124 cf_rpath_list="/usr/lib /lib"
16125 if test "$cf_ldd_prog" != no
16129 cat >conftest.$ac_ext <<_ACEOF
16130 #line 16130 "configure"
16131 #include "confdefs.h"
16141 rm -f conftest.$ac_objext conftest$ac_exeext
16142 if { (eval echo "$as_me:16142: \"$ac_link\"") >&5
16143 (eval $ac_link) 2>&5
16145 echo "$as_me:16145: \$? = $ac_status" >&5
16146 (exit $ac_status); } &&
16147 { ac_try='test -s conftest$ac_exeext'
16148 { (eval echo "$as_me:16148: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16151 echo "$as_me:16151: \$? = $ac_status" >&5
16152 (exit $ac_status); }; }; then
16153 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
16154 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
16156 echo "$as_me: failed program was:" >&5
16157 cat conftest.$ac_ext >&5
16159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16161 # If we passed the link-test, but get a "not found" on a given library,
16162 # this could be due to inept reconfiguration of gcc to make it only
16163 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
16164 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16165 # /usr/local libraries.
16166 if test -n "$cf_rpath_oops"
16168 for cf_rpath_src in $cf_rpath_oops
16170 for cf_rpath_dir in \
16175 if test -f $cf_rpath_dir/lib/$cf_rpath_src
16177 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16179 echo "${as_me:-configure}:16179: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16181 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16189 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16191 echo "${as_me:-configure}:16191: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16193 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
16195 echo "${as_me:-configure}:16195: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16198 for cf_rpath_src in $LDFLAGS
16200 case $cf_rpath_src in #(vi
16203 # check if this refers to a directory which we will ignore
16205 if test -n "$cf_rpath_list"
16207 for cf_rpath_item in $cf_rpath_list
16209 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16217 if test "$cf_rpath_skip" = no
16219 # transform the option
16220 if test "$LD_RPATH_OPT" = "-R " ; then
16221 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16223 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16226 # if we have not already added this, add it now
16227 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16228 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16230 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16232 echo "${as_me:-configure}:16232: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16234 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16239 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16241 LDFLAGS=$cf_rpath_dst
16243 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
16245 echo "${as_me:-configure}:16245: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16247 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
16249 echo "${as_me:-configure}:16249: testing ...checking LIBS $LIBS ..." 1>&5
16252 for cf_rpath_src in $LIBS
16254 case $cf_rpath_src in #(vi
16257 # check if this refers to a directory which we will ignore
16259 if test -n "$cf_rpath_list"
16261 for cf_rpath_item in $cf_rpath_list
16263 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16271 if test "$cf_rpath_skip" = no
16273 # transform the option
16274 if test "$LD_RPATH_OPT" = "-R " ; then
16275 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16277 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16280 # if we have not already added this, add it now
16281 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16282 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16284 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16286 echo "${as_me:-configure}:16286: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16288 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16293 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16297 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
16299 echo "${as_me:-configure}:16299: testing ...checked LIBS $LIBS ..." 1>&5
16301 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16303 echo "${as_me:-configure}:16303: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16312 ac_config_files="$ac_config_files Makefile"
16313 ac_config_commands="$ac_config_commands default"
16314 cat >confcache <<\_ACEOF
16315 # This file is a shell script that caches the results of configure
16316 # tests run on this system so they can be shared between configure
16317 # scripts and configure runs, see configure's option --config-cache.
16318 # It is not useful on other systems. If it contains results you don't
16319 # want to keep, you may remove or edit it.
16321 # config.status only pays attention to the cache file if you give it
16322 # the --recheck option to rerun configure.
16324 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16325 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16326 # following values.
16330 # The following way of writing the cache mishandles newlines in values,
16331 # but we know of no workaround that is simple, portable, and efficient.
16332 # So, don't put newlines in cache variables' values.
16333 # Ultrix sh set writes to stderr and can't be redirected directly,
16334 # and sets the high bit in the cache file unless we assign to the vars.
16337 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16339 # `set' does not quote correctly, so add quotes (double-quote
16340 # substitution turns \\\\ into \\, and sed turns \\ into \).
16343 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16346 # `set' quotes correctly as required by POSIX, so do not add quotes.
16348 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16355 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16357 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16359 if cmp -s $cache_file confcache; then :; else
16360 if test -w $cache_file; then
16361 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16362 cat confcache >$cache_file
16364 echo "not updating unwritable cache $cache_file"
16369 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16370 # Let make expand exec_prefix.
16371 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16373 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16374 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16375 # trailing colons and then remove the whole line if VPATH becomes empty
16376 # (actually we leave an empty line to preserve line numbers).
16377 if test "x$srcdir" = x.; then
16378 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16379 s/:*\$(srcdir):*/:/;
16380 s/:*\${srcdir}:*/:/;
16382 s/^\([^=]*=[ ]*\):*/\1/;
16388 DEFS=-DHAVE_CONFIG_H
16390 : ${CONFIG_STATUS=./config.status}
16391 ac_clean_files_save=$ac_clean_files
16392 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16393 { echo "$as_me:16393: creating $CONFIG_STATUS" >&5
16394 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16395 cat >$CONFIG_STATUS <<_ACEOF
16397 # Generated automatically by configure.
16398 # Run this file to recreate the current configuration.
16399 # Compiler output produced by configure, useful for debugging
16400 # configure, is in config.log if it exists.
16403 SHELL=\${CONFIG_SHELL-$SHELL}
16404 ac_cs_invocation="\$0 \$@"
16408 cat >>$CONFIG_STATUS <<\_ACEOF
16409 # Be Bourne compatible
16410 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16413 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16417 # Name of the executable.
16418 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16420 if expr a : '\(a\)' >/dev/null 2>&1; then
16426 rm -f conf$$ conf$$.exe conf$$.file
16428 if ln -s conf$$.file conf$$ 2>/dev/null; then
16429 # We could just check for DJGPP; but this test a) works b) is more generic
16430 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16431 if test -f conf$$.exe; then
16432 # Don't use ln at all; we don't have any links
16437 elif ln conf$$.file conf$$ 2>/dev/null; then
16442 rm -f conf$$ conf$$.exe conf$$.file
16444 as_executable_p="test -f"
16446 # Support unset when possible.
16447 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16454 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16455 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16456 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16457 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16458 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16459 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16460 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16461 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16464 # We need space, tab and new line, in precisely that order.
16470 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16476 # Files that config.status was made for.
16477 if test -n "$ac_config_files"; then
16478 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16481 if test -n "$ac_config_headers"; then
16482 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16485 if test -n "$ac_config_links"; then
16486 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16489 if test -n "$ac_config_commands"; then
16490 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16493 cat >>$CONFIG_STATUS <<\EOF
16496 \`$as_me' instantiates files from templates according to the
16497 current configuration.
16499 Usage: $0 [OPTIONS] [FILE]...
16501 -h, --help print this help, then exit
16502 -V, --version print version number, then exit
16503 -d, --debug don't remove temporary files
16504 --recheck update $as_me by reconfiguring in the same conditions
16505 --file=FILE[:TEMPLATE]
16506 instantiate the configuration file FILE
16507 --header=FILE[:TEMPLATE]
16508 instantiate the configuration header FILE
16510 Configuration files:
16513 Configuration headers:
16516 Configuration commands:
16519 Report bugs to <dickey@invisible-island.net>."
16522 cat >>$CONFIG_STATUS <<EOF
16525 configured by $0, generated by GNU Autoconf 2.52.20120310,
16526 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16528 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16529 Free Software Foundation, Inc.
16530 This config.status script is free software; the Free Software Foundation
16531 gives unlimited permission to copy, distribute and modify it."
16536 cat >>$CONFIG_STATUS <<\EOF
16537 # If no file are specified by the user, then we need to provide default
16538 # value. By we need to know if files were specified by the user.
16544 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16545 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16547 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16551 *) # This is not an option, so the user has probably given explicit
16553 ac_need_defaults=false;;
16557 # Handling of the options.
16559 cat >>$CONFIG_STATUS <<EOF
16560 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16561 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16562 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16564 cat >>$CONFIG_STATUS <<\EOF
16565 --version | --vers* | -V )
16566 echo "$ac_cs_version"; exit 0 ;;
16568 # Conflict between --help and --header
16569 { { echo "$as_me:16569: error: ambiguous option: $1
16570 Try \`$0 --help' for more information." >&5
16571 echo "$as_me: error: ambiguous option: $1
16572 Try \`$0 --help' for more information." >&2;}
16573 { (exit 1); exit 1; }; };;
16574 --help | --hel | -h )
16575 echo "$ac_cs_usage"; exit 0 ;;
16576 --debug | --d* | -d )
16578 --file | --fil | --fi | --f )
16580 CONFIG_FILES="$CONFIG_FILES $1"
16581 ac_need_defaults=false;;
16582 --header | --heade | --head | --hea )
16584 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16585 ac_need_defaults=false;;
16587 # This is an error.
16588 -*) { { echo "$as_me:16588: error: unrecognized option: $1
16589 Try \`$0 --help' for more information." >&5
16590 echo "$as_me: error: unrecognized option: $1
16591 Try \`$0 --help' for more information." >&2;}
16592 { (exit 1); exit 1; }; } ;;
16594 *) ac_config_targets="$ac_config_targets $1" ;;
16603 ## ----------------------- ##
16604 ## Running config.status. ##
16605 ## ----------------------- ##
16607 This file was extended by $as_me 2.52.20120310, executed with
16608 CONFIG_FILES = $CONFIG_FILES
16609 CONFIG_HEADERS = $CONFIG_HEADERS
16610 CONFIG_LINKS = $CONFIG_LINKS
16611 CONFIG_COMMANDS = $CONFIG_COMMANDS
16612 > $ac_cs_invocation
16613 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16618 cat >>$CONFIG_STATUS <<EOF
16620 # INIT-COMMANDS section.
16630 cat >>$CONFIG_STATUS <<\EOF
16631 for ac_config_target in $ac_config_targets
16633 case "$ac_config_target" in
16634 # Handling of arguments.
16635 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16636 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16637 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
16638 *) { { echo "$as_me:16638: error: invalid argument: $ac_config_target" >&5
16639 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16640 { (exit 1); exit 1; }; };;
16644 # If the user did not use the arguments to specify the items to instantiate,
16645 # then the envvar interface is used. Set only those that are not.
16646 # We use the long form for the default assignment because of an extremely
16647 # bizarre bug on SunOS 4.1.3.
16648 if $ac_need_defaults; then
16649 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16650 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16651 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16654 # Create a temporary directory, and hook for its removal unless debugging.
16657 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16658 trap '{ (exit 1); exit 1; }' 1 2 13 15
16661 # Create a (secure) tmp directory for tmp files.
16664 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16665 test -n "$tmp" && test -d "$tmp"
16668 tmp=$TMPDIR/cs$$-$RANDOM
16669 (umask 077 && mkdir $tmp)
16672 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16673 { (exit 1); exit 1; }
16678 cat >>$CONFIG_STATUS <<EOF
16681 # CONFIG_FILES section.
16684 # No need to generate the scripts if there are no CONFIG_FILES.
16685 # This happens for instance when ./config.status config.h
16686 if test -n "\$CONFIG_FILES"; then
16687 # Protect against being on the right side of a sed subst in config.status.
16688 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16689 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16690 s,@SHELL@,$SHELL,;t t
16691 s,@exec_prefix@,$exec_prefix,;t t
16692 s,@prefix@,$prefix,;t t
16693 s,@program_transform_name@,$program_transform_name,;t t
16694 s,@bindir@,$bindir,;t t
16695 s,@sbindir@,$sbindir,;t t
16696 s,@libexecdir@,$libexecdir,;t t
16697 s,@datadir@,$datadir,;t t
16698 s,@sysconfdir@,$sysconfdir,;t t
16699 s,@sharedstatedir@,$sharedstatedir,;t t
16700 s,@localstatedir@,$localstatedir,;t t
16701 s,@libdir@,$libdir,;t t
16702 s,@includedir@,$includedir,;t t
16703 s,@oldincludedir@,$oldincludedir,;t t
16704 s,@infodir@,$infodir,;t t
16705 s,@mandir@,$mandir,;t t
16706 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16707 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16708 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16709 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16710 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16711 s,@build_alias@,$build_alias,;t t
16712 s,@host_alias@,$host_alias,;t t
16713 s,@target_alias@,$target_alias,;t t
16714 s,@ECHO_C@,$ECHO_C,;t t
16715 s,@ECHO_N@,$ECHO_N,;t t
16716 s,@ECHO_T@,$ECHO_T,;t t
16717 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16718 s,@DEFS@,$DEFS,;t t
16719 s,@LIBS@,$LIBS,;t t
16720 s,@build@,$build,;t t
16721 s,@build_cpu@,$build_cpu,;t t
16722 s,@build_vendor@,$build_vendor,;t t
16723 s,@build_os@,$build_os,;t t
16724 s,@host@,$host,;t t
16725 s,@host_cpu@,$host_cpu,;t t
16726 s,@host_vendor@,$host_vendor,;t t
16727 s,@host_os@,$host_os,;t t
16728 s,@SET_MAKE@,$SET_MAKE,;t t
16730 s,@CFLAGS@,$CFLAGS,;t t
16731 s,@LDFLAGS@,$LDFLAGS,;t t
16732 s,@CPPFLAGS@,$CPPFLAGS,;t t
16733 s,@ac_ct_CC@,$ac_ct_CC,;t t
16734 s,@EXEEXT@,$EXEEXT,;t t
16735 s,@OBJEXT@,$OBJEXT,;t t
16738 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16739 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16740 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16741 s,@LINT@,$LINT,;t t
16742 s,@LINT_OPTS@,$LINT_OPTS,;t t
16743 s,@CTAGS@,$CTAGS,;t t
16744 s,@ETAGS@,$ETAGS,;t t
16745 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16746 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16747 s,@MATH_LIB@,$MATH_LIB,;t t
16748 s,@top_builddir@,$top_builddir,;t t
16749 s,@CC_G_OPT@,$CC_G_OPT,;t t
16750 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16751 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16752 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16753 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16755 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16756 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16757 s,@LD_MODEL@,$LD_MODEL,;t t
16758 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16759 s,@LIBTOOL@,$LIBTOOL,;t t
16760 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16761 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16762 s,@LIB_LINK@,$LIB_LINK,;t t
16763 s,@LINK_TESTS@,$LINK_TESTS,;t t
16764 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16765 s,@PTHREAD@,$PTHREAD,;t t
16766 s,@TEST_ARGS@,$TEST_ARGS,;t t
16767 s,@TEST_DEPS@,$TEST_DEPS,;t t
16768 s,@TEST_LIBS@,$TEST_LIBS,;t t
16769 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
16770 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16771 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16772 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16773 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16774 s,@ECHO_LT@,$ECHO_LT,;t t
16775 s,@ECHO_LD@,$ECHO_LD,;t t
16776 s,@RULE_CC@,$RULE_CC,;t t
16777 s,@SHOW_CC@,$SHOW_CC,;t t
16778 s,@ECHO_CC@,$ECHO_CC,;t t
16779 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16780 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16781 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16782 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16783 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16784 s,@X_CFLAGS@,$X_CFLAGS,;t t
16785 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16786 s,@X_LIBS@,$X_LIBS,;t t
16787 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16788 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
16789 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
16790 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16791 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16792 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16797 cat >>$CONFIG_STATUS <<\EOF
16798 # Split the substitutions into bite-sized pieces for seds with
16799 # small command number limits, like on Digital OSF/1 and HP-UX.
16800 ac_max_sed_lines=48
16801 ac_sed_frag=1 # Number of current file.
16802 ac_beg=1 # First line for current file.
16803 ac_end=$ac_max_sed_lines # Line after last line for current file.
16806 while $ac_more_lines; do
16807 if test $ac_beg -gt 1; then
16808 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16810 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16812 if test ! -s $tmp/subs.frag; then
16813 ac_more_lines=false
16815 # The purpose of the label and of the branching condition is to
16816 # speed up the sed processing (if there are no `@' at all, there
16817 # is no need to browse any of the substitutions).
16818 # These are the two extra sed commands mentioned above.
16820 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16821 if test -z "$ac_sed_cmds"; then
16822 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16824 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16826 ac_sed_frag=`expr $ac_sed_frag + 1`
16828 ac_end=`expr $ac_end + $ac_max_sed_lines`
16831 if test -z "$ac_sed_cmds"; then
16834 fi # test -n "$CONFIG_FILES"
16837 cat >>$CONFIG_STATUS <<\EOF
16838 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16839 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16841 - | *:- | *:-:* ) # input from stdin
16843 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16844 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16845 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16846 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16847 * ) ac_file_in=$ac_file.in ;;
16850 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16851 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16852 X"$ac_file" : 'X\(//\)[^/]' \| \
16853 X"$ac_file" : 'X\(//\)$' \| \
16854 X"$ac_file" : 'X\(/\)' \| \
16855 . : '\(.\)' 2>/dev/null ||
16857 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16858 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16859 /^X\(\/\/\)$/{ s//\1/; q; }
16860 /^X\(\/\).*/{ s//\1/; q; }
16862 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16863 { case "$ac_dir" in
16864 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16868 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16869 case $as_mkdir_dir in
16870 # Skip DOS drivespec
16871 ?:) as_incr_dir=$as_mkdir_dir ;;
16873 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16874 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16879 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16880 # A "../" for each directory in $ac_dir_suffix.
16881 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16883 ac_dir_suffix= ac_dots=
16888 if test -z "$ac_dots"; then
16891 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16893 [\\/]* | ?:[\\/]* )
16894 ac_srcdir=$srcdir$ac_dir_suffix;
16895 ac_top_srcdir=$srcdir ;;
16896 *) # Relative path.
16897 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16898 ac_top_srcdir=$ac_dots$srcdir ;;
16902 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16903 *) ac_INSTALL=$ac_dots$INSTALL ;;
16906 if test x"$ac_file" != x-; then
16907 { echo "$as_me:16907: creating $ac_file" >&5
16908 echo "$as_me: creating $ac_file" >&6;}
16911 # Let's still pretend it is `configure' which instantiates (i.e., don't
16912 # use $as_me), people would be surprised to read:
16913 # /* config.h. Generated automatically by config.status. */
16914 configure_input="Generated automatically from `echo $ac_file_in |
16915 sed 's,.*/,,'` by configure."
16917 # First look for the input files in the build tree, otherwise in the
16919 ac_file_inputs=`IFS=:
16920 for f in $ac_file_in; do
16922 -) echo $tmp/stdin ;;
16924 # Absolute (can't be DOS-style, as IFS=:)
16925 test -f "$f" || { { echo "$as_me:16925: error: cannot find input file: $f" >&5
16926 echo "$as_me: error: cannot find input file: $f" >&2;}
16927 { (exit 1); exit 1; }; }
16930 if test -f "$f"; then
16933 elif test -f "$srcdir/$f"; then
16938 { { echo "$as_me:16938: error: cannot find input file: $f" >&5
16939 echo "$as_me: error: cannot find input file: $f" >&2;}
16940 { (exit 1); exit 1; }; }
16943 done` || { (exit 1); exit 1; }
16945 cat >>$CONFIG_STATUS <<EOF
16949 cat >>$CONFIG_STATUS <<\EOF
16951 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16952 s,@configure_input@,$configure_input,;t t
16953 s,@srcdir@,$ac_srcdir,;t t
16954 s,@top_srcdir@,$ac_top_srcdir,;t t
16955 s,@INSTALL@,$ac_INSTALL,;t t
16956 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16958 if test x"$ac_file" != x-; then
16959 mv $tmp/out $ac_file
16967 cat >>$CONFIG_STATUS <<\EOF
16970 # CONFIG_HEADER section.
16973 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16974 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16976 # ac_d sets the value in "#define NAME VALUE" lines.
16977 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16978 ac_dB='[ ].*$,\1#\2'
16981 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16982 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16983 ac_iB='\([ ]\),\1#\2define\3'
16986 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16987 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16988 ac_uB='$,\1#\2define\3'
16992 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16993 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16995 - | *:- | *:-:* ) # input from stdin
16997 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16998 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16999 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17000 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17001 * ) ac_file_in=$ac_file.in ;;
17004 test x"$ac_file" != x- && { echo "$as_me:17004: creating $ac_file" >&5
17005 echo "$as_me: creating $ac_file" >&6;}
17007 # First look for the input files in the build tree, otherwise in the
17009 ac_file_inputs=`IFS=:
17010 for f in $ac_file_in; do
17012 -) echo $tmp/stdin ;;
17014 # Absolute (can't be DOS-style, as IFS=:)
17015 test -f "$f" || { { echo "$as_me:17015: error: cannot find input file: $f" >&5
17016 echo "$as_me: error: cannot find input file: $f" >&2;}
17017 { (exit 1); exit 1; }; }
17020 if test -f "$f"; then
17023 elif test -f "$srcdir/$f"; then
17028 { { echo "$as_me:17028: error: cannot find input file: $f" >&5
17029 echo "$as_me: error: cannot find input file: $f" >&2;}
17030 { (exit 1); exit 1; }; }
17033 done` || { (exit 1); exit 1; }
17034 # Remove the trailing spaces.
17035 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17039 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17040 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17041 # be either 'cat' or 'sort'.
17042 cat confdefs.h | uniq >conftest.vals
17044 # Break up conftest.vals because some shells have a limit on
17045 # the size of here documents, and old seds have small limits too.
17047 rm -f conftest.tail
17048 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17049 while grep . conftest.vals >/dev/null
17051 # Write chunks of a limited-size here document to conftest.frag.
17052 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17053 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17054 echo 'CEOF' >> $CONFIG_STATUS
17055 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17056 rm -f conftest.vals
17057 mv conftest.tail conftest.vals
17059 rm -f conftest.vals
17061 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17063 echo ' cat >> conftest.edit <<CEOF
17064 /@DEFS@/r conftest.frag
17067 sed -f conftest.edit $tmp/in > $tmp/out
17069 mv $tmp/out $tmp/in
17070 rm -f conftest.edit conftest.frag
17071 ' >> $CONFIG_STATUS
17073 cat >>$CONFIG_STATUS <<\EOF
17074 # Let's still pretend it is `configure' which instantiates (i.e., don't
17075 # use $as_me), people would be surprised to read:
17076 # /* config.h. Generated automatically by config.status. */
17077 if test x"$ac_file" = x-; then
17078 echo "/* Generated automatically by configure. */" >$tmp/config.h
17080 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17082 cat $tmp/in >>$tmp/config.h
17084 if test x"$ac_file" != x-; then
17085 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17086 { echo "$as_me:17086: $ac_file is unchanged" >&5
17087 echo "$as_me: $ac_file is unchanged" >&6;}
17089 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17090 X"$ac_file" : 'X\(//\)[^/]' \| \
17091 X"$ac_file" : 'X\(//\)$' \| \
17092 X"$ac_file" : 'X\(/\)' \| \
17093 . : '\(.\)' 2>/dev/null ||
17095 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17096 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17097 /^X\(\/\/\)$/{ s//\1/; q; }
17098 /^X\(\/\).*/{ s//\1/; q; }
17100 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17101 { case "$ac_dir" in
17102 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17106 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17107 case $as_mkdir_dir in
17108 # Skip DOS drivespec
17109 ?:) as_incr_dir=$as_mkdir_dir ;;
17111 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17112 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17119 mv $tmp/config.h $ac_file
17123 rm -f $tmp/config.h
17127 cat >>$CONFIG_STATUS <<\EOF
17129 # CONFIG_COMMANDS section.
17131 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17132 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17133 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17140 if test ! -d $srcdir/$cf_dir; then
17142 elif test -f $srcdir/$cf_dir/programs; then
17143 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17147 cat >>Makefile <<TEST_EOF
17149 # These rules are generated so we do not rely on suffix rules, which do not
17150 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17151 # some, and the '\$x' confuses others).
17154 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
17157 cat >>Makefile <<TEST_EOF
17159 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17160 \$(srcdir)/test.priv.h \\
17163 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17167 if test -f ../config.guess && test -f ../config.sub
17169 cat >>Makefile <<TEST_EOF
17171 # if we used CF_INHERIT for getting these files, we can remove them
17173 rm -f config.guess config.sub
17181 cat >>$CONFIG_STATUS <<\EOF
17183 { (exit 0); exit 0; }
17185 chmod +x $CONFIG_STATUS
17186 ac_clean_files=$ac_clean_files_save
17188 # configure is writing to config.log, and then calls config.status.
17189 # config.status does its own redirection, appending to config.log.
17190 # Unfortunately, on DOS this fails, as config.log is still kept open
17191 # by configure, so config.status won't be able to write to it; its
17192 # output is simply discarded. So we exec the FD to /dev/null,
17193 # effectively closing config.log, so it can be properly (re)opened and
17194 # appended to by config.status. When coming back to configure, we
17195 # need to make the FD available again.
17196 if test "$no_create" != yes; then
17199 $SHELL $CONFIG_STATUS || ac_cs_success=false
17201 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17202 # would make configure fail if this is the last instruction.
17203 $ac_cs_success || { (exit 1); exit 1; }