2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20200111.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 runstatedir='${localstatedir}/run'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
149 # Identity of this package.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
168 # Accept the important Cygnus configure options, so we can diagnose typos.
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
190 cache_file=config.cache ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir=$ac_optarg ;;
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
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'`
212 eval "enable_$ac_feature=no" ;;
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225 eval "enable_$ac_feature='$ac_optarg'" ;;
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
240 -help | --help | --hel | --he | -h)
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
264 -libdir | --libdir | --libdi | --libd)
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
285 -runstatedir | --runstatedir | --runstatedi | --runstated \
286 | --runstate | --runstat | --runsta | --runst \
287 | --runs | --run | --ru)
288 ac_prev=runstatedir ;;
289 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
290 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
291 | --runs=* | --run=* | --ru=*)
292 runstatedir=$ac_optarg ;;
294 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
296 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
300 # Obsolete; use --without-fp.
303 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
307 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
311 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313 | --oldin | --oldi | --old | --ol | --o)
314 ac_prev=oldincludedir ;;
315 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318 oldincludedir=$ac_optarg ;;
320 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
322 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
325 -program-prefix | --program-prefix | --program-prefi | --program-pref \
326 | --program-pre | --program-pr | --program-p)
327 ac_prev=program_prefix ;;
328 -program-prefix=* | --program-prefix=* | --program-prefi=* \
329 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330 program_prefix=$ac_optarg ;;
332 -program-suffix | --program-suffix | --program-suffi | --program-suff \
333 | --program-suf | --program-su | --program-s)
334 ac_prev=program_suffix ;;
335 -program-suffix=* | --program-suffix=* | --program-suffi=* \
336 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337 program_suffix=$ac_optarg ;;
339 -program-transform-name | --program-transform-name \
340 | --program-transform-nam | --program-transform-na \
341 | --program-transform-n | --program-transform- \
342 | --program-transform | --program-transfor \
343 | --program-transfo | --program-transf \
344 | --program-trans | --program-tran \
345 | --progr-tra | --program-tr | --program-t)
346 ac_prev=program_transform_name ;;
347 -program-transform-name=* | --program-transform-name=* \
348 | --program-transform-nam=* | --program-transform-na=* \
349 | --program-transform-n=* | --program-transform-=* \
350 | --program-transform=* | --program-transfor=* \
351 | --program-transfo=* | --program-transf=* \
352 | --program-trans=* | --program-tran=* \
353 | --progr-tra=* | --program-tr=* | --program-t=*)
354 program_transform_name=$ac_optarg ;;
356 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357 | -silent | --silent | --silen | --sile | --sil)
360 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
362 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
364 sbindir=$ac_optarg ;;
366 -sharedstatedir | --sharedstatedir | --sharedstatedi \
367 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368 | --sharedst | --shareds | --shared | --share | --shar \
370 ac_prev=sharedstatedir ;;
371 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
375 sharedstatedir=$ac_optarg ;;
377 -site | --site | --sit)
379 -site=* | --site=* | --sit=*)
382 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
384 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
387 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388 | --syscon | --sysco | --sysc | --sys | --sy)
389 ac_prev=sysconfdir ;;
390 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392 sysconfdir=$ac_optarg ;;
394 -target | --target | --targe | --targ | --tar | --ta | --t)
395 ac_prev=target_alias ;;
396 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397 target_alias=$ac_optarg ;;
399 -v | -verbose | --verbose | --verbos | --verbo | --verb)
402 -version | --version | --versio | --versi | --vers | -V)
406 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
407 # Reject names that are not valid shell variable names.
408 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid package name: $ac_package" >&2
410 { (exit 1); exit 1; }; }
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416 eval "with_$ac_package='$ac_optarg'" ;;
418 -without-* | --without-*)
419 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
420 # Reject names that are not valid shell variable names.
421 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
422 { echo "$as_me: error: invalid package name: $ac_package" >&2
423 { (exit 1); exit 1; }; }
424 ac_package=`echo $ac_package | sed 's/-/_/g'`
425 eval "with_$ac_package=no" ;;
428 # Obsolete; use --with-x.
431 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432 | --x-incl | --x-inc | --x-in | --x-i)
433 ac_prev=x_includes ;;
434 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436 x_includes=$ac_optarg ;;
438 -x-libraries | --x-libraries | --x-librarie | --x-librari \
439 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440 ac_prev=x_libraries ;;
441 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443 x_libraries=$ac_optarg ;;
445 -*) { echo "$as_me: error: unrecognized option: $ac_option
446 Try \`$0 --help' for more information." >&2
447 { (exit 1); exit 1; }; }
451 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
452 # Reject names that are not valid shell variable names.
453 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
454 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
455 { (exit 1); exit 1; }; }
456 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
457 eval "$ac_envvar='$ac_optarg'"
461 # FIXME: should be removed in autoconf 3.0.
462 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
463 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
464 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
465 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
471 if test -n "$ac_prev"; then
472 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
473 { echo "$as_me: error: missing argument to $ac_option" >&2
474 { (exit 1); exit 1; }; }
477 # Be sure to have absolute paths.
478 for ac_var in exec_prefix prefix
480 eval ac_val=$`echo $ac_var`
482 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
483 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
484 { (exit 1); exit 1; }; };;
488 # Be sure to have absolute paths.
489 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
490 localstatedir libdir includedir oldincludedir infodir mandir
492 eval ac_val=$`echo $ac_var`
494 [\\/$]* | ?:[\\/]* ) ;;
495 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
496 { (exit 1); exit 1; }; };;
500 # There might be people who depend on the old broken behavior: `$host'
501 # used to hold the argument of --host etc.
506 # FIXME: should be removed in autoconf 3.0.
507 if test "x$host_alias" != x; then
508 if test "x$build_alias" = x; then
509 cross_compiling=maybe
510 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
511 If a cross compiler is detected then cross compile mode will be used." >&2
512 elif test "x$build_alias" != "x$host_alias"; then
518 test -n "$host_alias" && ac_tool_prefix=$host_alias-
520 test "$silent" = yes && exec 6>/dev/null
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524 ac_srcdir_defaulted=yes
525 # Try the directory containing this script, then its parent.
527 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
528 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530 if test ! -r $srcdir/$ac_unique_file; then
534 ac_srcdir_defaulted=no
536 if test ! -r $srcdir/$ac_unique_file; then
537 if test "$ac_srcdir_defaulted" = yes; then
538 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
539 { (exit 1); exit 1; }; }
541 { echo "$as_me: error: cannot find sources in $srcdir" >&2
542 { (exit 1); exit 1; }; }
545 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
546 ac_env_build_alias_set=${build_alias+set}
547 ac_env_build_alias_value=$build_alias
548 ac_cv_env_build_alias_set=${build_alias+set}
549 ac_cv_env_build_alias_value=$build_alias
550 ac_env_host_alias_set=${host_alias+set}
551 ac_env_host_alias_value=$host_alias
552 ac_cv_env_host_alias_set=${host_alias+set}
553 ac_cv_env_host_alias_value=$host_alias
554 ac_env_target_alias_set=${target_alias+set}
555 ac_env_target_alias_value=$target_alias
556 ac_cv_env_target_alias_set=${target_alias+set}
557 ac_cv_env_target_alias_value=$target_alias
558 ac_env_CC_set=${CC+set}
560 ac_cv_env_CC_set=${CC+set}
561 ac_cv_env_CC_value=$CC
562 ac_env_CFLAGS_set=${CFLAGS+set}
563 ac_env_CFLAGS_value=$CFLAGS
564 ac_cv_env_CFLAGS_set=${CFLAGS+set}
565 ac_cv_env_CFLAGS_value=$CFLAGS
566 ac_env_LDFLAGS_set=${LDFLAGS+set}
567 ac_env_LDFLAGS_value=$LDFLAGS
568 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_cv_env_LDFLAGS_value=$LDFLAGS
570 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
571 ac_env_CPPFLAGS_value=$CPPFLAGS
572 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
574 ac_env_CPP_set=${CPP+set}
575 ac_env_CPP_value=$CPP
576 ac_cv_env_CPP_set=${CPP+set}
577 ac_cv_env_CPP_value=$CPP
580 # Report the --help message.
582 if test "$ac_init_help" = "long"; then
583 # Omit some internal or obsolete options to make the list less imposing.
584 # This message is too long to be a string in the A/UX 3.1 sh.
586 \`configure' configures this package to adapt to many kinds of systems.
588 Usage: $0 [OPTION]... [VAR=VALUE]...
590 To assign environment variables (e.g., CC, CFLAGS...), specify them as
591 VAR=VALUE. See below for descriptions of some of the useful variables.
593 Defaults for the options are specified in brackets.
596 -h, --help display this help and exit
597 --help=short display options specific to this package
598 --help=recursive display the short help of all the included packages
599 -V, --version display version information and exit
600 -q, --quiet, --silent do not print \`checking...' messages
601 --cache-file=FILE cache test results in FILE [disabled]
602 -C, --config-cache alias for \`--cache-file=config.cache'
603 -n, --no-create do not create output files
604 --srcdir=DIR find the sources in DIR [configure dir or \`..']
609 Installation directories:
610 --prefix=PREFIX install architecture-independent files in PREFIX
612 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
615 By default, \`make install' will install all the files in
616 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
617 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
618 for instance \`--prefix=\$HOME'.
620 For better control, use the options below.
622 Fine tuning of the installation directories:
623 --bindir=DIR user executables [EPREFIX/bin]
624 --sbindir=DIR system admin executables [EPREFIX/sbin]
625 --libexecdir=DIR program executables [EPREFIX/libexec]
626 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
627 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
628 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
629 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
630 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
631 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
632 --libdir=DIR object code libraries [EPREFIX/lib]
633 --includedir=DIR C header files [PREFIX/include]
634 --oldincludedir=DIR C header files for non-gcc [/usr/include]
635 --infodir=DIR info documentation [DATAROOTDIR/info]
636 --mandir=DIR man documentation [DATAROOTDIR/man]
642 --program-prefix=PREFIX prepend PREFIX to installed program names
643 --program-suffix=SUFFIX append SUFFIX to installed program names
644 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
647 --x-includes=DIR X include files are in DIR
648 --x-libraries=DIR X library files are in DIR
651 --build=BUILD configure for building on BUILD [guessed]
652 --host=HOST build programs to run on HOST [BUILD]
656 if test -n "$ac_init_help"; then
661 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
662 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
665 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
666 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
669 --disable-stripping do not strip (debug info) installed executables
670 --enable-string-hacks work around bogus compiler/loader warnings
671 --with-pkg-config{=path} enable/disable use of pkg-config
672 --disable-echo do not display "compiling" commands
673 Curses Version-dependent Options:
674 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
675 --disable-widec disable checks for wide-character functions
676 --with-curses-dir=DIR directory in which (n)curses is installed
677 --with-screen=XXX use specified curses-libraries
678 --with-ncursesw use wide ncurses-libraries
679 --with-ncurses use ncurses-libraries
680 --with-pdcurses compile/link with pdcurses X11 library
681 --with-curses-colr compile/link with HPUX 10.x color-curses
682 --with-curses-5lib compile/link with SunOS 5lib curses
683 --with-Xaw3d link with Xaw 3d library
684 --with-Xaw3dxft link with Xaw 3d xft library
685 --with-neXtaw link with neXT Athena library
686 --with-XawPlus link with Athena-Plus library
687 --with-x use the X Window System
688 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
689 --disable-panel disable checks for panel functions
690 --disable-menu disable checks for menu functions
691 --disable-form disable checks for form functions
692 Testing/development Options:
693 --enable-warnings test: turn on gcc compiler warnings
694 --with-dmalloc test: use Gray Watson's dmalloc library
695 --with-dbmalloc test: use Conor Cahill's dbmalloc library
696 --with-valgrind test: use valgrind
697 --disable-leaks test: free permanent memory, analyze leaks
698 --disable-rpath-hack don't add rpath options for additional libraries
700 Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
709 Use these variables to override the choices made by `configure' or to help
710 it to find libraries and programs with nonstandard names/locations.
715 if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
751 test -n "$ac_init_help" && exit 0
752 if $ac_init_version; then
755 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756 Free Software Foundation, Inc.
757 This configure script is free software; the Free Software Foundation
758 gives unlimited permission to copy, distribute and modify it.
764 This file contains any messages produced by compilers while
765 running configure, to aid debugging if configure makes a mistake.
767 It was created by $as_me, which was
768 generated by GNU Autoconf 2.52.20200111. Invocation command line was
779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
808 # Keep a trace of the command line.
809 # Strip out --no-create and --no-recursion so they do not pile up.
810 # Also quote any args containing shell meta-characters.
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
827 # Get rid of the leading space.
830 # When interrupted or exit'd, cleanup temporary files, and complete
831 # config.log. We remove comments because anyway the quotes in there
832 # would cause problems or look ugly.
834 # Save into config.log some information that might help in debugging.
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
840 # The following way of writing the cache mishandles newlines in values,
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
871 for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 # confdefs.h avoids OS command line length limits that DEFS can exceed.
877 rm -rf conftest* confdefs.h
878 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
881 # Let the site file select an alternate cache file if it wants to.
882 # Prefer explicitly selected file to automatically selected ones.
883 if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
890 for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
892 { echo "$as_me:892: loading site script $ac_site_file" >&5
893 echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
899 if test -r "$cache_file"; then
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
903 { echo "$as_me:903: loading cache $cache_file" >&5
904 echo "$as_me: loading cache $cache_file" >&6;}
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 { echo "$as_me:911: creating cache $cache_file" >&5
912 echo "$as_me: creating cache $cache_file" >&6;}
916 # Check that the precious variables saved in the cache have kept the same
918 ac_cache_corrupted=false
919 for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
928 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
936 if test "x$ac_old_val" != "x$ac_new_val"; then
937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
938 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
939 { echo "$as_me:939: former value: $ac_old_val" >&5
940 echo "$as_me: former value: $ac_old_val" >&2;}
941 { echo "$as_me:941: current value: $ac_new_val" >&5
942 echo "$as_me: current value: $ac_new_val" >&2;}
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 if $ac_cache_corrupted; then
960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
961 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
963 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
972 ac_main_return=return
974 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
975 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
977 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
978 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
980 echo "#! $SHELL" >conftest.sh
981 echo "exit 0" >>conftest.sh
983 if { (echo "$as_me:983: PATH=\".;.\"; conftest.sh") >&5
984 (PATH=".;."; conftest.sh) 2>&5
986 echo "$as_me:986: \$? = $ac_status" >&5
987 (exit $ac_status); }; then
988 ac_path_separator=';'
992 PATH_SEPARATOR="$ac_path_separator"
995 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
997 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
999 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1002 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1003 if test -f $ac_dir/install-sh; then
1005 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 elif test -f $ac_dir/install.sh; then
1009 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 elif test -f $ac_dir/shtool; then
1013 ac_install_sh="$ac_aux_dir/shtool install -c"
1017 if test -z "$ac_aux_dir"; then
1018 { { echo "$as_me:1018: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1019 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1020 { (exit 1); exit 1; }; }
1022 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1023 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1024 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026 # Make sure we can run config.sub.
1027 $ac_config_sub sun4 >/dev/null 2>&1 ||
1028 { { echo "$as_me:1028: error: cannot run $ac_config_sub" >&5
1029 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1030 { (exit 1); exit 1; }; }
1032 echo "$as_me:1032: checking build system type" >&5
1033 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1034 if test "${ac_cv_build+set}" = set; then
1035 echo $ECHO_N "(cached) $ECHO_C" >&6
1037 ac_cv_build_alias=$build_alias
1038 test -z "$ac_cv_build_alias" &&
1039 ac_cv_build_alias=`$ac_config_guess`
1040 test -z "$ac_cv_build_alias" &&
1041 { { echo "$as_me:1041: error: cannot guess build type; you must specify one" >&5
1042 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1043 { (exit 1); exit 1; }; }
1044 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1045 { { echo "$as_me:1045: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1046 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1047 { (exit 1); exit 1; }; }
1050 echo "$as_me:1050: result: $ac_cv_build" >&5
1051 echo "${ECHO_T}$ac_cv_build" >&6
1053 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1054 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1055 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 system_name="$host_os"
1081 system_name="`(uname -s -r) 2>/dev/null`"
1082 if test -z "$system_name" ; then
1083 system_name="`(hostname) 2>/dev/null`"
1086 test -n "$system_name" &&
1087 cat >>confdefs.h <<EOF
1088 #define SYSTEM_NAME "$system_name"
1091 if test "${cf_cv_system_name+set}" = set; then
1092 echo $ECHO_N "(cached) $ECHO_C" >&6
1094 cf_cv_system_name="$system_name"
1097 test -z "$system_name" && system_name="$cf_cv_system_name"
1098 test -n "$cf_cv_system_name" && echo "$as_me:1098: result: Configuring for $cf_cv_system_name" >&5
1099 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1101 if test ".$system_name" != ".$cf_cv_system_name" ; then
1102 echo "$as_me:1102: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1103 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1104 { { echo "$as_me:1104: error: \"Please remove config.cache and try again.\"" >&5
1105 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1106 { (exit 1); exit 1; }; }
1109 test "$program_prefix" != NONE &&
1110 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1111 # Use a double $ so make ignores it.
1112 test "$program_suffix" != NONE &&
1113 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1114 # Double any \ or $. echo might interpret backslashes.
1115 # By default was `s,x,x', remove it if useless.
1116 cat <<\_ACEOF >conftest.sed
1117 s/[\\$]/&&/g;s/;s,x,x,$//
1119 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1122 echo "$as_me:1122: checking whether ${MAKE-make} sets \${MAKE}" >&5
1123 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1124 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1125 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1126 echo $ECHO_N "(cached) $ECHO_C" >&6
1128 cat >conftest.make <<\EOF
1130 @echo 'ac_maketemp="${MAKE}"'
1132 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1133 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1134 if test -n "$ac_maketemp"; then
1135 eval ac_cv_prog_make_${ac_make}_set=yes
1137 eval ac_cv_prog_make_${ac_make}_set=no
1141 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1142 echo "$as_me:1142: result: yes" >&5
1143 echo "${ECHO_T}yes" >&6
1146 echo "$as_me:1146: result: no" >&5
1147 echo "${ECHO_T}no" >&6
1148 SET_MAKE="MAKE=${MAKE-make}"
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return=return
1157 if test -n "$ac_tool_prefix"; then
1158 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1159 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1160 echo "$as_me:1160: checking for $ac_word" >&5
1161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1162 if test "${ac_cv_prog_CC+set}" = set; then
1163 echo $ECHO_N "(cached) $ECHO_C" >&6
1165 if test -n "$CC"; then
1166 ac_cv_prog_CC="$CC" # Let the user override the test.
1168 ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 $as_executable_p "$ac_dir/$ac_word" || continue
1174 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1175 echo "$as_me:1175: found $ac_dir/$ac_word" >&5
1182 if test -n "$CC"; then
1183 echo "$as_me:1183: result: $CC" >&5
1184 echo "${ECHO_T}$CC" >&6
1186 echo "$as_me:1186: result: no" >&5
1187 echo "${ECHO_T}no" >&6
1191 if test -z "$ac_cv_prog_CC"; then
1193 # Extract the first word of "gcc", so it can be a program name with args.
1194 set dummy gcc; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1198 echo $ECHO_N "(cached) $ECHO_C" >&6
1200 if test -n "$ac_ct_CC"; then
1201 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1203 ac_save_IFS=$IFS; IFS=$ac_path_separator
1205 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_ac_ct_CC="gcc"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1216 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1217 if test -n "$ac_ct_CC"; then
1218 echo "$as_me:1218: result: $ac_ct_CC" >&5
1219 echo "${ECHO_T}$ac_ct_CC" >&6
1221 echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1230 if test -z "$CC"; then
1231 if test -n "$ac_tool_prefix"; then
1232 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1233 set dummy ${ac_tool_prefix}cc; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_prog_CC+set}" = set; then
1237 echo $ECHO_N "(cached) $ECHO_C" >&6
1239 if test -n "$CC"; then
1240 ac_cv_prog_CC="$CC" # Let the user override the test.
1242 ac_save_IFS=$IFS; IFS=$ac_path_separator
1244 for ac_dir in $ac_dummy; do
1246 test -z "$ac_dir" && ac_dir=.
1247 $as_executable_p "$ac_dir/$ac_word" || continue
1248 ac_cv_prog_CC="${ac_tool_prefix}cc"
1249 echo "$as_me:1249: found $ac_dir/$ac_word" >&5
1256 if test -n "$CC"; then
1257 echo "$as_me:1257: result: $CC" >&5
1258 echo "${ECHO_T}$CC" >&6
1260 echo "$as_me:1260: result: no" >&5
1261 echo "${ECHO_T}no" >&6
1265 if test -z "$ac_cv_prog_CC"; then
1267 # Extract the first word of "cc", so it can be a program name with args.
1268 set dummy cc; ac_word=$2
1269 echo "$as_me:1269: checking for $ac_word" >&5
1270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1272 echo $ECHO_N "(cached) $ECHO_C" >&6
1274 if test -n "$ac_ct_CC"; then
1275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1277 ac_save_IFS=$IFS; IFS=$ac_path_separator
1279 for ac_dir in $ac_dummy; do
1281 test -z "$ac_dir" && ac_dir=.
1282 $as_executable_p "$ac_dir/$ac_word" || continue
1283 ac_cv_prog_ac_ct_CC="cc"
1284 echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1290 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1291 if test -n "$ac_ct_CC"; then
1292 echo "$as_me:1292: result: $ac_ct_CC" >&5
1293 echo "${ECHO_T}$ac_ct_CC" >&6
1295 echo "$as_me:1295: result: no" >&5
1296 echo "${ECHO_T}no" >&6
1305 if test -z "$CC"; then
1306 # Extract the first word of "cc", so it can be a program name with args.
1307 set dummy cc; ac_word=$2
1308 echo "$as_me:1308: checking for $ac_word" >&5
1309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1310 if test "${ac_cv_prog_CC+set}" = set; then
1311 echo $ECHO_N "(cached) $ECHO_C" >&6
1313 if test -n "$CC"; then
1314 ac_cv_prog_CC="$CC" # Let the user override the test.
1317 ac_save_IFS=$IFS; IFS=$ac_path_separator
1319 for ac_dir in $ac_dummy; do
1321 test -z "$ac_dir" && ac_dir=.
1322 $as_executable_p "$ac_dir/$ac_word" || continue
1323 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1324 ac_prog_rejected=yes
1328 echo "$as_me:1328: found $ac_dir/$ac_word" >&5
1332 if test $ac_prog_rejected = yes; then
1333 # We found a bogon in the path, so make sure we never use it.
1334 set dummy $ac_cv_prog_CC
1336 if test $# != 0; then
1337 # We chose a different compiler from the bogus one.
1338 # However, it has the same basename, so the bogon will be chosen
1339 # first if we set CC to just the basename; use the full file name.
1341 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1349 if test -n "$CC"; then
1350 echo "$as_me:1350: result: $CC" >&5
1351 echo "${ECHO_T}$CC" >&6
1353 echo "$as_me:1353: result: no" >&5
1354 echo "${ECHO_T}no" >&6
1358 if test -z "$CC"; then
1359 if test -n "$ac_tool_prefix"; then
1362 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1363 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1364 echo "$as_me:1364: checking for $ac_word" >&5
1365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1366 if test "${ac_cv_prog_CC+set}" = set; then
1367 echo $ECHO_N "(cached) $ECHO_C" >&6
1369 if test -n "$CC"; then
1370 ac_cv_prog_CC="$CC" # Let the user override the test.
1372 ac_save_IFS=$IFS; IFS=$ac_path_separator
1374 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 $as_executable_p "$ac_dir/$ac_word" || continue
1378 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1379 echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1386 if test -n "$CC"; then
1387 echo "$as_me:1387: result: $CC" >&5
1388 echo "${ECHO_T}$CC" >&6
1390 echo "$as_me:1390: result: no" >&5
1391 echo "${ECHO_T}no" >&6
1394 test -n "$CC" && break
1397 if test -z "$CC"; then
1401 # Extract the first word of "$ac_prog", so it can be a program name with args.
1402 set dummy $ac_prog; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1406 echo $ECHO_N "(cached) $ECHO_C" >&6
1408 if test -n "$ac_ct_CC"; then
1409 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1411 ac_save_IFS=$IFS; IFS=$ac_path_separator
1413 for ac_dir in $ac_dummy; do
1415 test -z "$ac_dir" && ac_dir=.
1416 $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_ac_ct_CC="$ac_prog"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1424 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1425 if test -n "$ac_ct_CC"; then
1426 echo "$as_me:1426: result: $ac_ct_CC" >&5
1427 echo "${ECHO_T}$ac_ct_CC" >&6
1429 echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1433 test -n "$ac_ct_CC" && break
1441 test -z "$CC" && { { echo "$as_me:1441: error: no acceptable cc found in \$PATH" >&5
1442 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1443 { (exit 1); exit 1; }; }
1445 # Provide some information about the compiler.
1446 echo "$as_me:1446:" \
1447 "checking for C compiler version" >&5
1448 ac_compiler=`set X $ac_compile; echo $2`
1449 { (eval echo "$as_me:1449: \"$ac_compiler --version </dev/null >&5\"") >&5
1450 (eval $ac_compiler --version </dev/null >&5) 2>&5
1452 echo "$as_me:1452: \$? = $ac_status" >&5
1453 (exit $ac_status); }
1454 { (eval echo "$as_me:1454: \"$ac_compiler -v </dev/null >&5\"") >&5
1455 (eval $ac_compiler -v </dev/null >&5) 2>&5
1457 echo "$as_me:1457: \$? = $ac_status" >&5
1458 (exit $ac_status); }
1459 { (eval echo "$as_me:1459: \"$ac_compiler -V </dev/null >&5\"") >&5
1460 (eval $ac_compiler -V </dev/null >&5) 2>&5
1462 echo "$as_me:1462: \$? = $ac_status" >&5
1463 (exit $ac_status); }
1465 cat >conftest.$ac_ext <<_ACEOF
1466 #line 1466 "configure"
1467 #include "confdefs.h"
1477 ac_clean_files_save=$ac_clean_files
1478 ac_clean_files="$ac_clean_files a.out a.exe"
1479 # Try to create an executable without -o first, disregard a.out.
1480 # It will help us diagnose broken compilers, and finding out an intuition
1482 echo "$as_me:1482: checking for C compiler default output" >&5
1483 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1484 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1485 if { (eval echo "$as_me:1485: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1488 echo "$as_me:1488: \$? = $ac_status" >&5
1489 (exit $ac_status); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1494 ls a.out conftest 2>/dev/null;
1495 ls a.* conftest.* 2>/dev/null`; do
1497 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1498 a.out ) # We found the default executable, but exeext='' is most
1501 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1502 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 echo "$as_me: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 { { echo "$as_me:1511: error: C compiler cannot create executables" >&5
1512 echo "$as_me: error: C compiler cannot create executables" >&2;}
1513 { (exit 77); exit 77; }; }
1516 ac_exeext=$ac_cv_exeext
1517 echo "$as_me:1517: result: $ac_file" >&5
1518 echo "${ECHO_T}$ac_file" >&6
1520 # Check the compiler produces executables we can run. If not, either
1521 # the compiler is broken, or we cross compile.
1522 echo "$as_me:1522: checking whether the C compiler works" >&5
1523 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1524 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1525 # If not cross compiling, check that we can run a simple program.
1526 if test "$cross_compiling" != yes; then
1527 if { ac_try='./$ac_file'
1528 { (eval echo "$as_me:1528: \"$ac_try\"") >&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; }; then
1535 if test "$cross_compiling" = maybe; then
1538 { { echo "$as_me:1538: error: cannot run C compiled programs.
1539 If you meant to cross compile, use \`--host'." >&5
1540 echo "$as_me: error: cannot run C compiled programs.
1541 If you meant to cross compile, use \`--host'." >&2;}
1542 { (exit 1); exit 1; }; }
1546 echo "$as_me:1546: result: yes" >&5
1547 echo "${ECHO_T}yes" >&6
1549 rm -f a.out a.exe conftest$ac_cv_exeext
1550 ac_clean_files=$ac_clean_files_save
1551 # Check the compiler produces executables we can run. If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether we are cross compiling" >&5
1554 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1555 echo "$as_me:1555: result: $cross_compiling" >&5
1556 echo "${ECHO_T}$cross_compiling" >&6
1558 echo "$as_me:1558: checking for executable suffix" >&5
1559 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1560 if { (eval echo "$as_me:1560: \"$ac_link\"") >&5
1561 (eval $ac_link) 2>&5
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit $ac_status); }; then
1565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1566 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1567 # work properly (i.e., refer to `conftest.exe'), while it won't with
1569 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1571 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1572 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 { { echo "$as_me:1579: error: cannot compute EXEEXT: cannot compile and link" >&5
1580 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1581 { (exit 1); exit 1; }; }
1584 rm -f conftest$ac_cv_exeext
1585 echo "$as_me:1585: result: $ac_cv_exeext" >&5
1586 echo "${ECHO_T}$ac_cv_exeext" >&6
1588 rm -f conftest.$ac_ext
1589 EXEEXT=$ac_cv_exeext
1591 echo "$as_me:1591: checking for object suffix" >&5
1592 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1593 if test "${ac_cv_objext+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
1596 cat >conftest.$ac_ext <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1608 rm -f conftest.o conftest.obj
1609 if { (eval echo "$as_me:1609: \"$ac_compile\"") >&5
1610 (eval $ac_compile) 2>&5
1612 echo "$as_me:1612: \$? = $ac_status" >&5
1613 (exit $ac_status); }; then
1614 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1616 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1617 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1622 echo "$as_me: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 { { echo "$as_me:1624: error: cannot compute OBJEXT: cannot compile" >&5
1625 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1626 { (exit 1); exit 1; }; }
1629 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1631 echo "$as_me:1631: result: $ac_cv_objext" >&5
1632 echo "${ECHO_T}$ac_cv_objext" >&6
1633 OBJEXT=$ac_cv_objext
1635 echo "$as_me:1635: checking whether we are using the GNU C compiler" >&5
1636 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1637 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657 (eval $ac_compile) 2>&5
1659 echo "$as_me:1659: \$? = $ac_status" >&5
1660 (exit $ac_status); } &&
1661 { ac_try='test -s conftest.$ac_objext'
1662 { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1665 echo "$as_me:1665: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1669 echo "$as_me: failed program was:" >&5
1670 cat conftest.$ac_ext >&5
1673 rm -f conftest.$ac_objext conftest.$ac_ext
1674 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1677 echo "$as_me:1677: result: $ac_cv_c_compiler_gnu" >&5
1678 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1679 GCC=`test $ac_compiler_gnu = yes && echo yes`
1680 ac_test_CFLAGS=${CFLAGS+set}
1681 ac_save_CFLAGS=$CFLAGS
1683 echo "$as_me:1683: checking whether $CC accepts -g" >&5
1684 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1685 if test "${ac_cv_prog_cc_g+set}" = set; then
1686 echo $ECHO_N "(cached) $ECHO_C" >&6
1688 cat >conftest.$ac_ext <<_ACEOF
1689 #line 1689 "configure"
1690 #include "confdefs.h"
1700 rm -f conftest.$ac_objext
1701 if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5
1702 (eval $ac_compile) 2>&5
1704 echo "$as_me:1704: \$? = $ac_status" >&5
1705 (exit $ac_status); } &&
1706 { ac_try='test -s conftest.$ac_objext'
1707 { (eval echo "$as_me:1707: \"$ac_try\"") >&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit $ac_status); }; }; then
1714 echo "$as_me: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1718 rm -f conftest.$ac_objext conftest.$ac_ext
1720 echo "$as_me:1720: result: $ac_cv_prog_cc_g" >&5
1721 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1722 if test "$ac_test_CFLAGS" = set; then
1723 CFLAGS=$ac_save_CFLAGS
1724 elif test $ac_cv_prog_cc_g = yes; then
1725 if test "$GCC" = yes; then
1731 if test "$GCC" = yes; then
1737 # Some people use a C++ compiler to compile C. Since we use `exit',
1738 # in C++ we need to declare it. In case someone uses the same compiler
1739 # for both compiling C and C++ we need to have the C++ compiler decide
1740 # the declaration of exit, since it's the most demanding environment.
1741 cat >conftest.$ac_ext <<_ACEOF
1746 rm -f conftest.$ac_objext
1747 if { (eval echo "$as_me:1747: \"$ac_compile\"") >&5
1748 (eval $ac_compile) 2>&5
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit $ac_status); } &&
1752 { ac_try='test -s conftest.$ac_objext'
1753 { (eval echo "$as_me:1753: \"$ac_try\"") >&5
1756 echo "$as_me:1756: \$? = $ac_status" >&5
1757 (exit $ac_status); }; }; then
1758 for ac_declaration in \
1760 '#include <stdlib.h>' \
1761 'extern "C" void std::exit (int) throw (); using std::exit;' \
1762 'extern "C" void std::exit (int); using std::exit;' \
1763 'extern "C" void exit (int) throw ();' \
1764 'extern "C" void exit (int);' \
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1780 rm -f conftest.$ac_objext
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782 (eval $ac_compile) 2>&5
1784 echo "$as_me:1784: \$? = $ac_status" >&5
1785 (exit $ac_status); } &&
1786 { ac_try='test -s conftest.$ac_objext'
1787 { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1790 echo "$as_me:1790: \$? = $ac_status" >&5
1791 (exit $ac_status); }; }; then
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1798 rm -f conftest.$ac_objext conftest.$ac_ext
1799 cat >conftest.$ac_ext <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813 (eval $ac_compile) 2>&5
1815 echo "$as_me:1815: \$? = $ac_status" >&5
1816 (exit $ac_status); } &&
1817 { ac_try='test -s conftest.$ac_objext'
1818 { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1821 echo "$as_me:1821: \$? = $ac_status" >&5
1822 (exit $ac_status); }; }; then
1825 echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1828 rm -f conftest.$ac_objext conftest.$ac_ext
1831 if test -n "$ac_declaration"; then
1832 echo '#ifdef __cplusplus' >>confdefs.h
1833 echo $ac_declaration >>confdefs.h
1834 echo '#endif' >>confdefs.h
1838 echo "$as_me: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1841 rm -f conftest.$ac_objext conftest.$ac_ext
1843 ac_cpp='$CPP $CPPFLAGS'
1844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847 ac_main_return=return
1850 if test "$GCC" = yes ; then
1851 echo "$as_me:1851: checking version of $CC" >&5
1852 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1853 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1854 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1855 echo "$as_me:1855: result: $GCC_VERSION" >&5
1856 echo "${ECHO_T}$GCC_VERSION" >&6
1861 if test "$GCC" = yes ; then
1864 echo "$as_me:1864: checking if this is really Intel C compiler" >&5
1865 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1866 cf_save_CFLAGS="$CFLAGS"
1867 CFLAGS="$CFLAGS -no-gcc"
1868 cat >conftest.$ac_ext <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1876 #ifdef __INTEL_COMPILER
1885 rm -f conftest.$ac_objext
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887 (eval $ac_compile) 2>&5
1889 echo "$as_me:1889: \$? = $ac_status" >&5
1890 (exit $ac_status); } &&
1891 { ac_try='test -s conftest.$ac_objext'
1892 { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1895 echo "$as_me:1895: \$? = $ac_status" >&5
1896 (exit $ac_status); }; }; then
1898 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1901 echo "$as_me: failed program was:" >&5
1902 cat conftest.$ac_ext >&5
1904 rm -f conftest.$ac_objext conftest.$ac_ext
1905 CFLAGS="$cf_save_CFLAGS"
1906 echo "$as_me:1906: result: $INTEL_COMPILER" >&5
1907 echo "${ECHO_T}$INTEL_COMPILER" >&6
1914 if test "$GCC" = yes ; then
1915 echo "$as_me:1915: checking if this is really Clang C compiler" >&5
1916 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1917 cf_save_CFLAGS="$CFLAGS"
1918 CFLAGS="$CFLAGS -Qunused-arguments"
1919 cat >conftest.$ac_ext <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f conftest.$ac_objext
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit $ac_status); } &&
1942 { ac_try='test -s conftest.$ac_objext'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit $ac_status); }; }; then
1949 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
1952 echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 CFLAGS="$cf_save_CFLAGS"
1957 echo "$as_me:1957: result: $CLANG_COMPILER" >&5
1958 echo "${ECHO_T}$CLANG_COMPILER" >&6
1961 echo "$as_me:1961: checking for $CC option to accept ANSI C" >&5
1962 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1963 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1966 ac_cv_prog_cc_stdc=no
1968 cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1973 #include <sys/types.h>
1974 #include <sys/stat.h>
1975 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1976 struct buf { int x; };
1977 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1978 static char *e (p, i)
1984 static char *f (char * (*g) (char **, int), char **p, ...)
1989 s = g (p, va_arg (v,int));
1993 int test (int i, double x);
1994 struct s1 {int (*f) (int a);};
1995 struct s2 {int (*f) (double a);};
1996 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2002 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2007 # Don't try gcc -ansi; that turns off useful extensions and
2008 # breaks some systems' header files.
2009 # AIX -qlanglvl=ansi
2010 # Ultrix and OSF/1 -std1
2011 # HP-UX 10.20 and later -Ae
2012 # HP-UX older versions -Aa -D_HPUX_SOURCE
2013 # SVR4 -Xc -D__EXTENSIONS__
2014 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2016 CC="$ac_save_CC $ac_arg"
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019 (eval $ac_compile) 2>&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } &&
2023 { ac_try='test -s conftest.$ac_objext'
2024 { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2027 echo "$as_me:2027: \$? = $ac_status" >&5
2028 (exit $ac_status); }; }; then
2029 ac_cv_prog_cc_stdc=$ac_arg
2032 echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 rm -f conftest.$ac_objext
2037 rm -f conftest.$ac_ext conftest.$ac_objext
2042 case "x$ac_cv_prog_cc_stdc" in
2044 echo "$as_me:2044: result: none needed" >&5
2045 echo "${ECHO_T}none needed" >&6 ;;
2047 echo "$as_me:2047: result: $ac_cv_prog_cc_stdc" >&5
2048 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2049 CC="$CC $ac_cv_prog_cc_stdc" ;;
2052 # This should have been defined by AC_PROG_CC
2055 echo "$as_me:2055: checking \$CFLAGS variable" >&5
2056 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2059 echo "$as_me:2059: result: broken" >&5
2060 echo "${ECHO_T}broken" >&6
2061 { echo "$as_me:2061: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2062 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2065 for cf_arg in $cf_flags
2071 cf_new_extra_cppflags=
2073 for cf_add_cflags in $cf_arg
2075 case $cf_fix_cppflags in
2077 case $cf_add_cflags in
2078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2079 case $cf_add_cflags in
2081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2084 && test -z "${cf_tst_cflags}" \
2085 && cf_fix_cppflags=yes
2087 if test $cf_fix_cppflags = yes ; then
2089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2093 elif test "${cf_tst_cflags}" = "\"'" ; then
2095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2106 case $cf_add_cflags in
2108 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2110 CPPFLAGS=`echo "$CPPFLAGS" | \
2111 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2112 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2117 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2118 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2125 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2126 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2139 && test -z "${cf_tst_cflags}" \
2140 && cf_fix_cppflags=no
2145 if test -n "$cf_new_cflags" ; then
2147 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2148 CFLAGS="${CFLAGS}$cf_new_cflags"
2152 if test -n "$cf_new_cppflags" ; then
2154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2155 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2159 if test -n "$cf_new_extra_cppflags" ; then
2161 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2162 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2169 echo "$as_me:2169: result: ok" >&5
2170 echo "${ECHO_T}ok" >&6
2174 echo "$as_me:2174: checking \$CC variable" >&5
2175 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2178 echo "$as_me:2178: result: broken" >&5
2179 echo "${ECHO_T}broken" >&6
2180 { echo "$as_me:2180: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2181 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2183 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2184 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2186 for cf_arg in $cf_flags
2194 cf_new_extra_cppflags=
2196 for cf_add_cflags in $cf_arg
2198 case $cf_fix_cppflags in
2200 case $cf_add_cflags in
2201 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2202 case $cf_add_cflags in
2204 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2207 && test -z "${cf_tst_cflags}" \
2208 && cf_fix_cppflags=yes
2210 if test $cf_fix_cppflags = yes ; then
2212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2216 elif test "${cf_tst_cflags}" = "\"'" ; then
2218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2229 case $cf_add_cflags in
2231 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2233 CPPFLAGS=`echo "$CPPFLAGS" | \
2234 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2235 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2240 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2241 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2248 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2249 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2262 && test -z "${cf_tst_cflags}" \
2263 && cf_fix_cppflags=no
2268 if test -n "$cf_new_cflags" ; then
2270 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2271 CFLAGS="${CFLAGS}$cf_new_cflags"
2275 if test -n "$cf_new_cppflags" ; then
2277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2278 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2282 if test -n "$cf_new_extra_cppflags" ; then
2284 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2285 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2295 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2297 echo "${as_me:-configure}:2297: testing resulting CC: '$CC' ..." 1>&5
2299 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2301 echo "${as_me:-configure}:2301: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2303 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2305 echo "${as_me:-configure}:2305: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2309 echo "$as_me:2309: result: ok" >&5
2310 echo "${ECHO_T}ok" >&6
2314 echo "$as_me:2314: checking for inline" >&5
2315 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2316 if test "${ac_cv_c_inline+set}" = set; then
2317 echo $ECHO_N "(cached) $ECHO_C" >&6
2320 for ac_kw in inline __inline__ __inline; do
2321 cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2325 static $ac_kw int static_foo () {return 0; }
2326 $ac_kw int foo () {return 0; }
2330 rm -f conftest.$ac_objext
2331 if { (eval echo "$as_me:2331: \"$ac_compile\"") >&5
2332 (eval $ac_compile) 2>&5
2334 echo "$as_me:2334: \$? = $ac_status" >&5
2335 (exit $ac_status); } &&
2336 { ac_try='test -s conftest.$ac_objext'
2337 { (eval echo "$as_me:2337: \"$ac_try\"") >&5
2340 echo "$as_me:2340: \$? = $ac_status" >&5
2341 (exit $ac_status); }; }; then
2342 ac_cv_c_inline=$ac_kw; break
2344 echo "$as_me: failed program was:" >&5
2345 cat conftest.$ac_ext >&5
2347 rm -f conftest.$ac_objext conftest.$ac_ext
2351 echo "$as_me:2351: result: $ac_cv_c_inline" >&5
2352 echo "${ECHO_T}$ac_cv_c_inline" >&6
2353 case $ac_cv_c_inline in
2356 cat >>confdefs.h <<\EOF
2360 *) cat >>confdefs.h <<EOF
2361 #define inline $ac_cv_c_inline
2367 ac_cpp='$CPP $CPPFLAGS'
2368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2371 ac_main_return=return
2372 echo "$as_me:2372: checking how to run the C preprocessor" >&5
2373 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2374 # On Suns, sometimes $CPP names a directory.
2375 if test -n "$CPP" && test -d "$CPP"; then
2378 if test -z "$CPP"; then
2379 if test "${ac_cv_prog_CPP+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2382 # Double quotes because CPP needs to be expanded
2383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2386 for ac_c_preproc_warn_flag in '' yes
2388 # Use a header file that comes with gcc, so configuring glibc
2389 # with a fresh cross-compiler works.
2390 # On the NeXT, cc -E runs the code through the compiler's parser,
2391 # not just through cpp. "Syntax error" is here to catch this case.
2392 cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2398 if { (eval echo "$as_me:2398: \"$ac_cpp conftest.$ac_ext\"") >&5
2399 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2401 egrep -v '^ *\+' conftest.er1 >conftest.err
2403 cat conftest.err >&5
2404 echo "$as_me:2404: \$? = $ac_status" >&5
2405 (exit $ac_status); } >/dev/null; then
2406 if test -s conftest.err; then
2407 ac_cpp_err=$ac_c_preproc_warn_flag
2414 if test -z "$ac_cpp_err"; then
2417 echo "$as_me: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 # Broken: fails on valid input.
2422 rm -f conftest.err conftest.$ac_ext
2424 # OK, works on sane cases. Now check whether non-existent headers
2425 # can be detected and how.
2426 cat >conftest.$ac_ext <<_ACEOF
2427 #line 2427 "configure"
2428 #include "confdefs.h"
2429 #include <ac_nonexistent.h>
2431 if { (eval echo "$as_me:2431: \"$ac_cpp conftest.$ac_ext\"") >&5
2432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2434 egrep -v '^ *\+' conftest.er1 >conftest.err
2436 cat conftest.err >&5
2437 echo "$as_me:2437: \$? = $ac_status" >&5
2438 (exit $ac_status); } >/dev/null; then
2439 if test -s conftest.err; then
2440 ac_cpp_err=$ac_c_preproc_warn_flag
2447 if test -z "$ac_cpp_err"; then
2448 # Broken: success on invalid input.
2451 echo "$as_me: failed program was:" >&5
2452 cat conftest.$ac_ext >&5
2453 # Passes both tests.
2457 rm -f conftest.err conftest.$ac_ext
2460 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2461 rm -f conftest.err conftest.$ac_ext
2462 if $ac_preproc_ok; then
2474 echo "$as_me:2474: result: $CPP" >&5
2475 echo "${ECHO_T}$CPP" >&6
2477 for ac_c_preproc_warn_flag in '' yes
2479 # Use a header file that comes with gcc, so configuring glibc
2480 # with a fresh cross-compiler works.
2481 # On the NeXT, cc -E runs the code through the compiler's parser,
2482 # not just through cpp. "Syntax error" is here to catch this case.
2483 cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2489 if { (eval echo "$as_me:2489: \"$ac_cpp conftest.$ac_ext\"") >&5
2490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2492 egrep -v '^ *\+' conftest.er1 >conftest.err
2494 cat conftest.err >&5
2495 echo "$as_me:2495: \$? = $ac_status" >&5
2496 (exit $ac_status); } >/dev/null; then
2497 if test -s conftest.err; then
2498 ac_cpp_err=$ac_c_preproc_warn_flag
2505 if test -z "$ac_cpp_err"; then
2508 echo "$as_me: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 # Broken: fails on valid input.
2513 rm -f conftest.err conftest.$ac_ext
2515 # OK, works on sane cases. Now check whether non-existent headers
2516 # can be detected and how.
2517 cat >conftest.$ac_ext <<_ACEOF
2518 #line 2518 "configure"
2519 #include "confdefs.h"
2520 #include <ac_nonexistent.h>
2522 if { (eval echo "$as_me:2522: \"$ac_cpp conftest.$ac_ext\"") >&5
2523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2525 egrep -v '^ *\+' conftest.er1 >conftest.err
2527 cat conftest.err >&5
2528 echo "$as_me:2528: \$? = $ac_status" >&5
2529 (exit $ac_status); } >/dev/null; then
2530 if test -s conftest.err; then
2531 ac_cpp_err=$ac_c_preproc_warn_flag
2538 if test -z "$ac_cpp_err"; then
2539 # Broken: success on invalid input.
2542 echo "$as_me: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 # Passes both tests.
2548 rm -f conftest.err conftest.$ac_ext
2551 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2552 rm -f conftest.err conftest.$ac_ext
2553 if $ac_preproc_ok; then
2556 { { echo "$as_me:2556: error: C preprocessor \"$CPP\" fails sanity check" >&5
2557 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2558 { (exit 1); exit 1; }; }
2562 ac_cpp='$CPP $CPPFLAGS'
2563 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2564 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2565 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2566 ac_main_return=return
2568 for ac_prog in mawk gawk nawk awk
2570 # Extract the first word of "$ac_prog", so it can be a program name with args.
2571 set dummy $ac_prog; ac_word=$2
2572 echo "$as_me:2572: checking for $ac_word" >&5
2573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2574 if test "${ac_cv_prog_AWK+set}" = set; then
2575 echo $ECHO_N "(cached) $ECHO_C" >&6
2577 if test -n "$AWK"; then
2578 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2580 ac_save_IFS=$IFS; IFS=$ac_path_separator
2582 for ac_dir in $ac_dummy; do
2584 test -z "$ac_dir" && ac_dir=.
2585 $as_executable_p "$ac_dir/$ac_word" || continue
2586 ac_cv_prog_AWK="$ac_prog"
2587 echo "$as_me:2587: found $ac_dir/$ac_word" >&5
2594 if test -n "$AWK"; then
2595 echo "$as_me:2595: result: $AWK" >&5
2596 echo "${ECHO_T}$AWK" >&6
2598 echo "$as_me:2598: result: no" >&5
2599 echo "${ECHO_T}no" >&6
2602 test -n "$AWK" && break
2605 # Find a good install program. We prefer a C program (faster),
2606 # so one script is as good as another. But avoid the broken or
2607 # incompatible versions:
2608 # SysV /etc/install, /usr/sbin/install
2609 # SunOS /usr/etc/install
2610 # IRIX /sbin/install
2612 # AmigaOS /C/install, which installs bootblocks on floppy discs
2613 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2614 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2615 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2616 # ./install, which can be erroneously created by make from ./install.sh.
2617 echo "$as_me:2617: checking for a BSD compatible install" >&5
2618 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2619 if test -z "$INSTALL"; then
2620 if test "${ac_cv_path_install+set}" = set; then
2621 echo $ECHO_N "(cached) $ECHO_C" >&6
2623 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $PATH; do
2626 # Account for people who put trailing slashes in PATH elements.
2628 / | ./ | .// | /cC/* \
2629 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2632 # OSF1 and SCO ODT 3.0 have their own names for install.
2633 # Don't use installbsd from OSF since it installs stuff as root
2635 for ac_prog in ginstall scoinst install; do
2636 if $as_executable_p "$ac_dir/$ac_prog"; then
2637 if test $ac_prog = install &&
2638 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2639 # AIX install. It has an incompatible calling convention.
2641 elif test $ac_prog = install &&
2642 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2643 # program-specific install script used by HP pwplus--don't use.
2646 ac_cv_path_install="$ac_dir/$ac_prog -c"
2656 if test "${ac_cv_path_install+set}" = set; then
2657 INSTALL=$ac_cv_path_install
2659 # As a last resort, use the slow shell script. We don't cache a
2660 # path for INSTALL within a source directory, because that will
2661 # break other packages using the cache if that directory is
2662 # removed, or if the path is relative.
2663 INSTALL=$ac_install_sh
2666 echo "$as_me:2666: result: $INSTALL" >&5
2667 echo "${ECHO_T}$INSTALL" >&6
2669 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2670 # It thinks the first close brace ends the variable substitution.
2671 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2673 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2675 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2681 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2682 test -z "$cf_dir" && cf_dir=.
2683 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2687 echo "$as_me:2687: checking if you want to install stripped executables" >&5
2688 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2690 # Check whether --enable-stripping or --disable-stripping was given.
2691 if test "${enable_stripping+set}" = set; then
2692 enableval="$enable_stripping"
2693 test "$enableval" != no && enableval=yes
2694 if test "$enableval" != "yes" ; then
2704 echo "$as_me:2704: result: $with_stripping" >&5
2705 echo "${ECHO_T}$with_stripping" >&6
2707 if test "$with_stripping" = yes
2714 : ${INSTALL:=install}
2715 echo "$as_me:2715: checking if install accepts -p option" >&5
2716 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2717 if test "${cf_cv_install_p+set}" = set; then
2718 echo $ECHO_N "(cached) $ECHO_C" >&6
2725 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2727 if test -f conftest.out/conftest.in
2729 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2730 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2731 if test -s conftest.err
2746 echo "$as_me:2746: result: $cf_cv_install_p" >&5
2747 echo "${ECHO_T}$cf_cv_install_p" >&6
2749 echo "$as_me:2749: checking if install needs to be told about ownership" >&5
2750 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2751 case `$ac_config_guess` in
2760 echo "$as_me:2760: result: $with_install_o" >&5
2761 echo "${ECHO_T}$with_install_o" >&6
2762 if test "x$with_install_o" = xyes
2764 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2769 for ac_prog in lint cppcheck splint
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_LINT+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2778 if test -n "$LINT"; then
2779 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_LINT="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2794 LINT=$ac_cv_prog_LINT
2795 if test -n "$LINT"; then
2796 echo "$as_me:2796: result: $LINT" >&5
2797 echo "${ECHO_T}$LINT" >&6
2799 echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2803 test -n "$LINT" && break
2807 (xcppcheck|x*/cppcheck)
2808 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2812 echo "$as_me:2812: checking if filesystem supports mixed-case filenames" >&5
2813 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2814 if test "${cf_cv_mixedcase+set}" = set; then
2815 echo $ECHO_N "(cached) $ECHO_C" >&6
2818 if test "$cross_compiling" = yes ; then
2819 case $target_alias in
2820 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2828 rm -f conftest CONFTEST
2830 if test -f CONFTEST ; then
2835 rm -f conftest CONFTEST
2839 echo "$as_me:2839: result: $cf_cv_mixedcase" >&5
2840 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2841 test "$cf_cv_mixedcase" = yes &&
2842 cat >>confdefs.h <<\EOF
2843 #define MIXEDCASE_FILENAMES 1
2846 for ac_prog in exctags ctags
2848 # Extract the first word of "$ac_prog", so it can be a program name with args.
2849 set dummy $ac_prog; ac_word=$2
2850 echo "$as_me:2850: checking for $ac_word" >&5
2851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2852 if test "${ac_cv_prog_CTAGS+set}" = set; then
2853 echo $ECHO_N "(cached) $ECHO_C" >&6
2855 if test -n "$CTAGS"; then
2856 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2858 ac_save_IFS=$IFS; IFS=$ac_path_separator
2860 for ac_dir in $ac_dummy; do
2862 test -z "$ac_dir" && ac_dir=.
2863 $as_executable_p "$ac_dir/$ac_word" || continue
2864 ac_cv_prog_CTAGS="$ac_prog"
2865 echo "$as_me:2865: found $ac_dir/$ac_word" >&5
2871 CTAGS=$ac_cv_prog_CTAGS
2872 if test -n "$CTAGS"; then
2873 echo "$as_me:2873: result: $CTAGS" >&5
2874 echo "${ECHO_T}$CTAGS" >&6
2876 echo "$as_me:2876: result: no" >&5
2877 echo "${ECHO_T}no" >&6
2880 test -n "$CTAGS" && break
2883 for ac_prog in exetags etags
2885 # Extract the first word of "$ac_prog", so it can be a program name with args.
2886 set dummy $ac_prog; ac_word=$2
2887 echo "$as_me:2887: checking for $ac_word" >&5
2888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2889 if test "${ac_cv_prog_ETAGS+set}" = set; then
2890 echo $ECHO_N "(cached) $ECHO_C" >&6
2892 if test -n "$ETAGS"; then
2893 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2895 ac_save_IFS=$IFS; IFS=$ac_path_separator
2897 for ac_dir in $ac_dummy; do
2899 test -z "$ac_dir" && ac_dir=.
2900 $as_executable_p "$ac_dir/$ac_word" || continue
2901 ac_cv_prog_ETAGS="$ac_prog"
2902 echo "$as_me:2902: found $ac_dir/$ac_word" >&5
2908 ETAGS=$ac_cv_prog_ETAGS
2909 if test -n "$ETAGS"; then
2910 echo "$as_me:2910: result: $ETAGS" >&5
2911 echo "${ECHO_T}$ETAGS" >&6
2913 echo "$as_me:2913: result: no" >&5
2914 echo "${ECHO_T}no" >&6
2917 test -n "$ETAGS" && break
2920 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2921 set dummy ${CTAGS:-ctags}; ac_word=$2
2922 echo "$as_me:2922: checking for $ac_word" >&5
2923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2924 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2925 echo $ECHO_N "(cached) $ECHO_C" >&6
2927 if test -n "$MAKE_LOWER_TAGS"; then
2928 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2930 ac_save_IFS=$IFS; IFS=$ac_path_separator
2932 for ac_dir in $ac_dummy; do
2934 test -z "$ac_dir" && ac_dir=.
2935 $as_executable_p "$ac_dir/$ac_word" || continue
2936 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2937 echo "$as_me:2937: found $ac_dir/$ac_word" >&5
2941 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2944 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2945 if test -n "$MAKE_LOWER_TAGS"; then
2946 echo "$as_me:2946: result: $MAKE_LOWER_TAGS" >&5
2947 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2949 echo "$as_me:2949: result: no" >&5
2950 echo "${ECHO_T}no" >&6
2953 if test "$cf_cv_mixedcase" = yes ; then
2954 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2955 set dummy ${ETAGS:-etags}; ac_word=$2
2956 echo "$as_me:2956: checking for $ac_word" >&5
2957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2958 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2961 if test -n "$MAKE_UPPER_TAGS"; then
2962 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2964 ac_save_IFS=$IFS; IFS=$ac_path_separator
2966 for ac_dir in $ac_dummy; do
2968 test -z "$ac_dir" && ac_dir=.
2969 $as_executable_p "$ac_dir/$ac_word" || continue
2970 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2971 echo "$as_me:2971: found $ac_dir/$ac_word" >&5
2975 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2978 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2979 if test -n "$MAKE_UPPER_TAGS"; then
2980 echo "$as_me:2980: result: $MAKE_UPPER_TAGS" >&5
2981 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2983 echo "$as_me:2983: result: no" >&5
2984 echo "${ECHO_T}no" >&6
2991 if test "$MAKE_UPPER_TAGS" = yes ; then
2997 if test "$MAKE_LOWER_TAGS" = yes ; then
3003 echo "$as_me:3003: checking if -lm needed for math functions" >&5
3004 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3005 if test "${cf_cv_need_libm+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3009 cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3020 double x = rand(); printf("result = %g\n", pow(sin(x),x))
3025 rm -f conftest.$ac_objext conftest$ac_exeext
3026 if { (eval echo "$as_me:3026: \"$ac_link\"") >&5
3027 (eval $ac_link) 2>&5
3029 echo "$as_me:3029: \$? = $ac_status" >&5
3030 (exit $ac_status); } &&
3031 { ac_try='test -s conftest$ac_exeext'
3032 { (eval echo "$as_me:3032: \"$ac_try\"") >&5
3035 echo "$as_me:3035: \$? = $ac_status" >&5
3036 (exit $ac_status); }; }; then
3039 echo "$as_me: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3045 echo "$as_me:3045: result: $cf_cv_need_libm" >&5
3046 echo "${ECHO_T}$cf_cv_need_libm" >&6
3047 if test "$cf_cv_need_libm" = yes
3055 CC_SHARED_OPTS=unknown
3056 CPPFLAGS="$CPPFLAGS"
3058 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3059 DFT_UPR_MODEL="NORMAL"
3072 PACKAGE="ncurses-examples"
3078 TINFO_LIBS='$(LIBS_CURSES)'
3079 cf_cv_abi_version=""
3080 cf_cv_rel_version=""
3086 if test "$GCC" = yes
3088 cat > conftest.i <<EOF
3090 #define GCC_PRINTF 0
3095 #ifndef GCC_NORETURN
3096 #define GCC_NORETURN /* nothing */
3099 #define GCC_UNUSED /* nothing */
3102 if test "$GCC" = yes
3104 { echo "$as_me:3104: checking for $CC __attribute__ directives..." >&5
3105 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3107 "${as_me:-configure}"
3108 #include "confdefs.h"
3109 #include "conftest.h"
3110 #include "conftest.i"
3112 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3114 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3117 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3119 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3121 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3122 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3123 extern void foo(void) GCC_NORETURN;
3124 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3126 cf_printf_attribute=no
3127 cf_scanf_attribute=no
3128 for cf_attribute in scanf printf unused noreturn
3131 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3133 cf_directive="__attribute__(($cf_attribute))"
3134 echo "checking for $CC $cf_directive" 1>&5
3136 case $cf_attribute in
3138 cf_printf_attribute=yes
3139 cat >conftest.h <<EOF
3140 #define GCC_$cf_ATTRIBUTE 1
3144 cf_scanf_attribute=yes
3145 cat >conftest.h <<EOF
3146 #define GCC_$cf_ATTRIBUTE 1
3150 cat >conftest.h <<EOF
3151 #define GCC_$cf_ATTRIBUTE $cf_directive
3156 if { (eval echo "$as_me:3156: \"$ac_compile\"") >&5
3157 (eval $ac_compile) 2>&5
3159 echo "$as_me:3159: \$? = $ac_status" >&5
3160 (exit $ac_status); }; then
3161 test -n "$verbose" && echo "$as_me:3161: result: ... $cf_attribute" >&5
3162 echo "${ECHO_T}... $cf_attribute" >&6
3163 cat conftest.h >>confdefs.h
3164 case $cf_attribute in
3167 cat >>confdefs.h <<EOF
3168 #define GCC_NORETURN $cf_directive
3173 cf_value='/* nothing */'
3174 if test "$cf_printf_attribute" != no ; then
3175 cf_value='__attribute__((format(printf,fmt,var)))'
3177 cat >>confdefs.h <<\EOF
3178 #define GCC_PRINTF 1
3183 cat >>confdefs.h <<EOF
3184 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3189 cf_value='/* nothing */'
3190 if test "$cf_scanf_attribute" != no ; then
3191 cf_value='__attribute__((format(scanf,fmt,var)))'
3193 cat >>confdefs.h <<\EOF
3199 cat >>confdefs.h <<EOF
3200 #define GCC_SCANFLIKE(fmt,var) $cf_value
3206 cat >>confdefs.h <<EOF
3207 #define GCC_UNUSED $cf_directive
3215 fgrep define conftest.i >>confdefs.h
3220 echo "$as_me:3220: checking if you want to work around bogus compiler/loader warnings" >&5
3221 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3223 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3224 if test "${enable_string_hacks+set}" = set; then
3225 enableval="$enable_string_hacks"
3226 with_string_hacks=$enableval
3228 with_string_hacks=no
3230 echo "$as_me:3230: result: $with_string_hacks" >&5
3231 echo "${ECHO_T}$with_string_hacks" >&6
3233 if test "x$with_string_hacks" = "xyes"; then
3235 cat >>confdefs.h <<\EOF
3236 #define USE_STRING_HACKS 1
3239 { echo "$as_me:3239: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3240 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3241 echo "$as_me:3241: checking for strlcat" >&5
3242 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3243 if test "${ac_cv_func_strlcat+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3246 cat >conftest.$ac_ext <<_ACEOF
3247 #line 3247 "configure"
3248 #include "confdefs.h"
3249 #define strlcat autoconf_temporary
3250 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3257 /* We use char because int might match the return type of a gcc2
3258 builtin and then its argument prototype would still apply. */
3259 char strlcat (void);
3265 /* The GNU C library defines stubs for functions which it implements
3266 to always fail with ENOSYS. Some functions are actually named
3267 something starting with __ and the normal name is an alias. */
3268 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3269 #error found stub for strlcat
3277 rm -f conftest.$ac_objext conftest$ac_exeext
3278 if { (eval echo "$as_me:3278: \"$ac_link\"") >&5
3279 (eval $ac_link) 2>&5
3281 echo "$as_me:3281: \$? = $ac_status" >&5
3282 (exit $ac_status); } &&
3283 { ac_try='test -s conftest$ac_exeext'
3284 { (eval echo "$as_me:3284: \"$ac_try\"") >&5
3287 echo "$as_me:3287: \$? = $ac_status" >&5
3288 (exit $ac_status); }; }; then
3289 ac_cv_func_strlcat=yes
3291 echo "$as_me: failed program was:" >&5
3292 cat conftest.$ac_ext >&5
3293 ac_cv_func_strlcat=no
3295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3297 echo "$as_me:3297: result: $ac_cv_func_strlcat" >&5
3298 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3299 if test $ac_cv_func_strlcat = yes; then
3301 cat >>confdefs.h <<\EOF
3302 #define HAVE_STRLCAT 1
3307 echo "$as_me:3307: checking for strlcat in -lbsd" >&5
3308 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3309 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
3312 ac_check_lib_save_LIBS=$LIBS
3314 cat >conftest.$ac_ext <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3318 /* Override any gcc2 internal prototype to avoid an error. */
3322 /* We use char because int might match the return type of a gcc2
3323 builtin and then its argument prototype would still apply. */
3333 rm -f conftest.$ac_objext conftest$ac_exeext
3334 if { (eval echo "$as_me:3334: \"$ac_link\"") >&5
3335 (eval $ac_link) 2>&5
3337 echo "$as_me:3337: \$? = $ac_status" >&5
3338 (exit $ac_status); } &&
3339 { ac_try='test -s conftest$ac_exeext'
3340 { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3343 echo "$as_me:3343: \$? = $ac_status" >&5
3344 (exit $ac_status); }; }; then
3345 ac_cv_lib_bsd_strlcat=yes
3347 echo "$as_me: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 ac_cv_lib_bsd_strlcat=no
3351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3352 LIBS=$ac_check_lib_save_LIBS
3354 echo "$as_me:3354: result: $ac_cv_lib_bsd_strlcat" >&5
3355 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3356 if test $ac_cv_lib_bsd_strlcat = yes; then
3361 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3363 for cf_add_1lib in $cf_add_0lib; do
3364 for cf_add_2lib in $cf_add_libs; do
3365 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3370 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3374 for ac_header in bsd/string.h
3376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3377 echo "$as_me:3377: checking for $ac_header" >&5
3378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3380 echo $ECHO_N "(cached) $ECHO_C" >&6
3382 cat >conftest.$ac_ext <<_ACEOF
3383 #line 3383 "configure"
3384 #include "confdefs.h"
3385 #include <$ac_header>
3387 if { (eval echo "$as_me:3387: \"$ac_cpp conftest.$ac_ext\"") >&5
3388 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3390 egrep -v '^ *\+' conftest.er1 >conftest.err
3392 cat conftest.err >&5
3393 echo "$as_me:3393: \$? = $ac_status" >&5
3394 (exit $ac_status); } >/dev/null; then
3395 if test -s conftest.err; then
3396 ac_cpp_err=$ac_c_preproc_warn_flag
3403 if test -z "$ac_cpp_err"; then
3404 eval "$as_ac_Header=yes"
3406 echo "$as_me: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 eval "$as_ac_Header=no"
3410 rm -f conftest.err conftest.$ac_ext
3412 echo "$as_me:3412: result: `eval echo '${'$as_ac_Header'}'`" >&5
3413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3415 cat >>confdefs.h <<EOF
3416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3422 cat >>confdefs.h <<\EOF
3423 #define HAVE_STRLCAT 1
3430 for ac_func in strlcpy snprintf
3432 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3433 echo "$as_me:3433: checking for $ac_func" >&5
3434 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3435 if eval "test \"\${$as_ac_var+set}\" = set"; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3438 cat >conftest.$ac_ext <<_ACEOF
3439 #line 3439 "configure"
3440 #include "confdefs.h"
3441 #define $ac_func autoconf_temporary
3442 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3449 /* We use char because int might match the return type of a gcc2
3450 builtin and then its argument prototype would still apply. */
3451 char $ac_func (void);
3457 /* The GNU C library defines stubs for functions which it implements
3458 to always fail with ENOSYS. Some functions are actually named
3459 something starting with __ and the normal name is an alias. */
3460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3461 #error found stub for $ac_func
3469 rm -f conftest.$ac_objext conftest$ac_exeext
3470 if { (eval echo "$as_me:3470: \"$ac_link\"") >&5
3471 (eval $ac_link) 2>&5
3473 echo "$as_me:3473: \$? = $ac_status" >&5
3474 (exit $ac_status); } &&
3475 { ac_try='test -s conftest$ac_exeext'
3476 { (eval echo "$as_me:3476: \"$ac_try\"") >&5
3479 echo "$as_me:3479: \$? = $ac_status" >&5
3480 (exit $ac_status); }; }; then
3481 eval "$as_ac_var=yes"
3483 echo "$as_me: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3485 eval "$as_ac_var=no"
3487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3489 echo "$as_me:3489: result: `eval echo '${'$as_ac_var'}'`" >&5
3490 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3491 if test `eval echo '${'$as_ac_var'}'` = yes; then
3492 cat >>confdefs.h <<EOF
3493 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3501 echo "$as_me:3501: checking if the POSIX test-macros are already defined" >&5
3502 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3503 if test "${cf_cv_posix_visible+set}" = set; then
3504 echo $ECHO_N "(cached) $ECHO_C" >&6
3507 cat >conftest.$ac_ext <<_ACEOF
3508 #line 3508 "configure"
3509 #include "confdefs.h"
3515 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3516 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3517 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3518 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3519 #error conflicting symbols found
3526 rm -f conftest.$ac_objext
3527 if { (eval echo "$as_me:3527: \"$ac_compile\"") >&5
3528 (eval $ac_compile) 2>&5
3530 echo "$as_me:3530: \$? = $ac_status" >&5
3531 (exit $ac_status); } &&
3532 { ac_try='test -s conftest.$ac_objext'
3533 { (eval echo "$as_me:3533: \"$ac_try\"") >&5
3536 echo "$as_me:3536: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
3538 cf_cv_posix_visible=no
3540 echo "$as_me: failed program was:" >&5
3541 cat conftest.$ac_ext >&5
3542 cf_cv_posix_visible=yes
3544 rm -f conftest.$ac_objext conftest.$ac_ext
3547 echo "$as_me:3547: result: $cf_cv_posix_visible" >&5
3548 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3550 if test "$cf_cv_posix_visible" = no; then
3553 cf_POSIX_C_SOURCE=199506L
3558 cf_xopen_source="-D_ALL_SOURCE"
3564 cf_xopen_source="-D_APPLE_C_SOURCE"
3567 cf_xopen_source="-D_DARWIN_C_SOURCE"
3570 (freebsd*|dragonfly*|midnightbsd*)
3571 # 5.x headers associate
3572 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3573 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3574 cf_POSIX_C_SOURCE=200112L
3576 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3579 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3582 cf_xopen_source="-D_HPUX_SOURCE"
3585 cf_xopen_source="-D_SGI_SOURCE"
3588 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3590 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3592 echo "$as_me:3592: checking if this is the GNU C library" >&5
3593 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3594 if test "${cf_cv_gnu_library+set}" = set; then
3595 echo $ECHO_N "(cached) $ECHO_C" >&6
3598 cat >conftest.$ac_ext <<_ACEOF
3599 #line 3599 "configure"
3600 #include "confdefs.h"
3601 #include <sys/types.h>
3606 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3608 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3611 # error not GNU C library
3617 rm -f conftest.$ac_objext
3618 if { (eval echo "$as_me:3618: \"$ac_compile\"") >&5
3619 (eval $ac_compile) 2>&5
3621 echo "$as_me:3621: \$? = $ac_status" >&5
3622 (exit $ac_status); } &&
3623 { ac_try='test -s conftest.$ac_objext'
3624 { (eval echo "$as_me:3624: \"$ac_try\"") >&5
3627 echo "$as_me:3627: \$? = $ac_status" >&5
3628 (exit $ac_status); }; }; then
3629 cf_cv_gnu_library=yes
3631 echo "$as_me: failed program was:" >&5
3632 cat conftest.$ac_ext >&5
3633 cf_cv_gnu_library=no
3635 rm -f conftest.$ac_objext conftest.$ac_ext
3638 echo "$as_me:3638: result: $cf_cv_gnu_library" >&5
3639 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3641 if test x$cf_cv_gnu_library = xyes; then
3643 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3644 # was changed to help a little. newlib incorporated the change about 4
3646 echo "$as_me:3646: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3647 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3648 if test "${cf_cv_gnu_library_219+set}" = set; then
3649 echo $ECHO_N "(cached) $ECHO_C" >&6
3654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3655 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3657 cat >conftest.$ac_ext <<_ACEOF
3658 #line 3658 "configure"
3659 #include "confdefs.h"
3660 #include <sys/types.h>
3665 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3667 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3670 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3676 rm -f conftest.$ac_objext
3677 if { (eval echo "$as_me:3677: \"$ac_compile\"") >&5
3678 (eval $ac_compile) 2>&5
3680 echo "$as_me:3680: \$? = $ac_status" >&5
3681 (exit $ac_status); } &&
3682 { ac_try='test -s conftest.$ac_objext'
3683 { (eval echo "$as_me:3683: \"$ac_try\"") >&5
3686 echo "$as_me:3686: \$? = $ac_status" >&5
3687 (exit $ac_status); }; }; then
3688 cf_cv_gnu_library_219=yes
3690 echo "$as_me: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 cf_cv_gnu_library_219=no
3694 rm -f conftest.$ac_objext conftest.$ac_ext
3698 echo "$as_me:3698: result: $cf_cv_gnu_library_219" >&5
3699 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3701 if test "x$cf_cv_gnu_library_219" = xyes; then
3703 echo "$as_me:3703: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3704 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3705 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3712 cf_new_extra_cppflags=
3714 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3716 case $cf_fix_cppflags in
3718 case $cf_add_cflags in
3719 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3720 case $cf_add_cflags in
3722 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3724 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3725 && test -z "${cf_tst_cflags}" \
3726 && cf_fix_cppflags=yes
3728 if test $cf_fix_cppflags = yes ; then
3730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3734 elif test "${cf_tst_cflags}" = "\"'" ; then
3736 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3737 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3747 case $cf_add_cflags in
3749 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3751 CPPFLAGS=`echo "$CPPFLAGS" | \
3752 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3753 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3758 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3759 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3766 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3767 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3780 && test -z "${cf_tst_cflags}" \
3781 && cf_fix_cppflags=no
3786 if test -n "$cf_new_cflags" ; then
3788 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3789 CFLAGS="${CFLAGS}$cf_new_cflags"
3793 if test -n "$cf_new_cppflags" ; then
3795 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3796 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3800 if test -n "$cf_new_extra_cppflags" ; then
3802 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3803 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3807 cat >conftest.$ac_ext <<_ACEOF
3808 #line 3808 "configure"
3809 #include "confdefs.h"
3812 #include <sys/types.h>
3818 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3821 # error GNU C library is too old
3827 rm -f conftest.$ac_objext
3828 if { (eval echo "$as_me:3828: \"$ac_compile\"") >&5
3829 (eval $ac_compile) 2>&5
3831 echo "$as_me:3831: \$? = $ac_status" >&5
3832 (exit $ac_status); } &&
3833 { ac_try='test -s conftest.$ac_objext'
3834 { (eval echo "$as_me:3834: \"$ac_try\"") >&5
3837 echo "$as_me:3837: \$? = $ac_status" >&5
3838 (exit $ac_status); }; }; then
3839 cf_cv_gnu_dftsrc_219=yes
3841 echo "$as_me: failed program was:" >&5
3842 cat conftest.$ac_ext >&5
3843 cf_cv_gnu_dftsrc_219=no
3845 rm -f conftest.$ac_objext conftest.$ac_ext
3848 echo "$as_me:3848: result: $cf_cv_gnu_dftsrc_219" >&5
3849 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3850 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3852 cf_cv_gnu_dftsrc_219=maybe
3855 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3857 echo "$as_me:3857: checking if we must define _GNU_SOURCE" >&5
3858 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3859 if test "${cf_cv_gnu_source+set}" = set; then
3860 echo $ECHO_N "(cached) $ECHO_C" >&6
3863 cat >conftest.$ac_ext <<_ACEOF
3864 #line 3864 "configure"
3865 #include "confdefs.h"
3866 #include <sys/types.h>
3871 #ifndef _XOPEN_SOURCE
3872 #error expected _XOPEN_SOURCE to be defined
3878 rm -f conftest.$ac_objext
3879 if { (eval echo "$as_me:3879: \"$ac_compile\"") >&5
3880 (eval $ac_compile) 2>&5
3882 echo "$as_me:3882: \$? = $ac_status" >&5
3883 (exit $ac_status); } &&
3884 { ac_try='test -s conftest.$ac_objext'
3885 { (eval echo "$as_me:3885: \"$ac_try\"") >&5
3888 echo "$as_me:3888: \$? = $ac_status" >&5
3889 (exit $ac_status); }; }; then
3892 echo "$as_me: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3899 cf_new_extra_cppflags=
3901 for cf_add_cflags in -D_GNU_SOURCE
3903 case $cf_fix_cppflags in
3905 case $cf_add_cflags in
3906 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3907 case $cf_add_cflags in
3909 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3912 && test -z "${cf_tst_cflags}" \
3913 && cf_fix_cppflags=yes
3915 if test $cf_fix_cppflags = yes ; then
3917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3921 elif test "${cf_tst_cflags}" = "\"'" ; then
3923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3934 case $cf_add_cflags in
3936 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3938 CPPFLAGS=`echo "$CPPFLAGS" | \
3939 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3940 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3945 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3946 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3953 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3954 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3964 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3967 && test -z "${cf_tst_cflags}" \
3968 && cf_fix_cppflags=no
3973 if test -n "$cf_new_cflags" ; then
3975 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3976 CFLAGS="${CFLAGS}$cf_new_cflags"
3980 if test -n "$cf_new_cppflags" ; then
3982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3983 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3987 if test -n "$cf_new_extra_cppflags" ; then
3989 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3990 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3994 cat >conftest.$ac_ext <<_ACEOF
3995 #line 3995 "configure"
3996 #include "confdefs.h"
3997 #include <sys/types.h>
4002 #ifdef _XOPEN_SOURCE
4003 #error expected _XOPEN_SOURCE to be undefined
4009 rm -f conftest.$ac_objext
4010 if { (eval echo "$as_me:4010: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit $ac_status); } &&
4015 { ac_try='test -s conftest.$ac_objext'
4016 { (eval echo "$as_me:4016: \"$ac_try\"") >&5
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit $ac_status); }; }; then
4023 echo "$as_me: failed program was:" >&5
4024 cat conftest.$ac_ext >&5
4025 cf_cv_gnu_source=yes
4027 rm -f conftest.$ac_objext conftest.$ac_ext
4031 rm -f conftest.$ac_objext conftest.$ac_ext
4034 echo "$as_me:4034: result: $cf_cv_gnu_source" >&5
4035 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4037 if test "$cf_cv_gnu_source" = yes
4039 echo "$as_me:4039: checking if we should also define _DEFAULT_SOURCE" >&5
4040 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4041 if test "${cf_cv_default_source+set}" = set; then
4042 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4046 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4048 cat >conftest.$ac_ext <<_ACEOF
4049 #line 4049 "configure"
4050 #include "confdefs.h"
4051 #include <sys/types.h>
4056 #ifdef _DEFAULT_SOURCE
4057 #error expected _DEFAULT_SOURCE to be undefined
4063 rm -f conftest.$ac_objext
4064 if { (eval echo "$as_me:4064: \"$ac_compile\"") >&5
4065 (eval $ac_compile) 2>&5
4067 echo "$as_me:4067: \$? = $ac_status" >&5
4068 (exit $ac_status); } &&
4069 { ac_try='test -s conftest.$ac_objext'
4070 { (eval echo "$as_me:4070: \"$ac_try\"") >&5
4073 echo "$as_me:4073: \$? = $ac_status" >&5
4074 (exit $ac_status); }; }; then
4075 cf_cv_default_source=no
4077 echo "$as_me: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4079 cf_cv_default_source=yes
4081 rm -f conftest.$ac_objext conftest.$ac_ext
4084 echo "$as_me:4084: result: $cf_cv_default_source" >&5
4085 echo "${ECHO_T}$cf_cv_default_source" >&6
4086 if test "$cf_cv_default_source" = yes
4089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4090 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4100 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4103 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4106 if test "$cf_cv_posix_visible" = no; then
4108 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4110 cf_save_CFLAGS="$CFLAGS"
4111 cf_save_CPPFLAGS="$CPPFLAGS"
4113 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4114 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4115 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4117 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4118 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4119 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4121 echo "$as_me:4121: checking if we should define _POSIX_C_SOURCE" >&5
4122 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4123 if test "${cf_cv_posix_c_source+set}" = set; then
4124 echo $ECHO_N "(cached) $ECHO_C" >&6
4127 echo "${as_me:-configure}:4127: testing if the symbol is already defined go no further ..." 1>&5
4129 cat >conftest.$ac_ext <<_ACEOF
4130 #line 4130 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4137 #ifndef _POSIX_C_SOURCE
4144 rm -f conftest.$ac_objext
4145 if { (eval echo "$as_me:4145: \"$ac_compile\"") >&5
4146 (eval $ac_compile) 2>&5
4148 echo "$as_me:4148: \$? = $ac_status" >&5
4149 (exit $ac_status); } &&
4150 { ac_try='test -s conftest.$ac_objext'
4151 { (eval echo "$as_me:4151: \"$ac_try\"") >&5
4154 echo "$as_me:4154: \$? = $ac_status" >&5
4155 (exit $ac_status); }; }; then
4156 cf_cv_posix_c_source=no
4158 echo "$as_me: failed program was:" >&5
4159 cat conftest.$ac_ext >&5
4160 cf_want_posix_source=no
4161 case .$cf_POSIX_C_SOURCE in
4163 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4166 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4167 cf_want_posix_source=yes
4170 cf_want_posix_source=yes
4173 if test "$cf_want_posix_source" = yes ; then
4174 cat >conftest.$ac_ext <<_ACEOF
4175 #line 4175 "configure"
4176 #include "confdefs.h"
4177 #include <sys/types.h>
4182 #ifdef _POSIX_SOURCE
4189 rm -f conftest.$ac_objext
4190 if { (eval echo "$as_me:4190: \"$ac_compile\"") >&5
4191 (eval $ac_compile) 2>&5
4193 echo "$as_me:4193: \$? = $ac_status" >&5
4194 (exit $ac_status); } &&
4195 { ac_try='test -s conftest.$ac_objext'
4196 { (eval echo "$as_me:4196: \"$ac_try\"") >&5
4199 echo "$as_me:4199: \$? = $ac_status" >&5
4200 (exit $ac_status); }; }; then
4203 echo "$as_me: failed program was:" >&5
4204 cat conftest.$ac_ext >&5
4205 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4207 rm -f conftest.$ac_objext conftest.$ac_ext
4210 echo "${as_me:-configure}:4210: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4212 CFLAGS="$cf_trim_CFLAGS"
4213 CPPFLAGS="$cf_trim_CPPFLAGS"
4215 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4216 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4218 echo "${as_me:-configure}:4218: testing if the second compile does not leave our definition intact error ..." 1>&5
4220 cat >conftest.$ac_ext <<_ACEOF
4221 #line 4221 "configure"
4222 #include "confdefs.h"
4223 #include <sys/types.h>
4228 #ifndef _POSIX_C_SOURCE
4235 rm -f conftest.$ac_objext
4236 if { (eval echo "$as_me:4236: \"$ac_compile\"") >&5
4237 (eval $ac_compile) 2>&5
4239 echo "$as_me:4239: \$? = $ac_status" >&5
4240 (exit $ac_status); } &&
4241 { ac_try='test -s conftest.$ac_objext'
4242 { (eval echo "$as_me:4242: \"$ac_try\"") >&5
4245 echo "$as_me:4245: \$? = $ac_status" >&5
4246 (exit $ac_status); }; }; then
4249 echo "$as_me: failed program was:" >&5
4250 cat conftest.$ac_ext >&5
4251 cf_cv_posix_c_source=no
4253 rm -f conftest.$ac_objext conftest.$ac_ext
4254 CFLAGS="$cf_save_CFLAGS"
4255 CPPFLAGS="$cf_save_CPPFLAGS"
4258 rm -f conftest.$ac_objext conftest.$ac_ext
4261 echo "$as_me:4261: result: $cf_cv_posix_c_source" >&5
4262 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4264 if test "$cf_cv_posix_c_source" != no ; then
4265 CFLAGS="$cf_trim_CFLAGS"
4266 CPPFLAGS="$cf_trim_CPPFLAGS"
4271 cf_new_extra_cppflags=
4273 for cf_add_cflags in $cf_cv_posix_c_source
4275 case $cf_fix_cppflags in
4277 case $cf_add_cflags in
4278 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4279 case $cf_add_cflags in
4281 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4283 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4284 && test -z "${cf_tst_cflags}" \
4285 && cf_fix_cppflags=yes
4287 if test $cf_fix_cppflags = yes ; then
4289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4293 elif test "${cf_tst_cflags}" = "\"'" ; then
4295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4306 case $cf_add_cflags in
4308 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4310 CPPFLAGS=`echo "$CPPFLAGS" | \
4311 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4312 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4317 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4318 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4325 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4326 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4333 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4334 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4336 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4339 && test -z "${cf_tst_cflags}" \
4340 && cf_fix_cppflags=no
4345 if test -n "$cf_new_cflags" ; then
4347 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4348 CFLAGS="${CFLAGS}$cf_new_cflags"
4352 if test -n "$cf_new_cppflags" ; then
4354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4359 if test -n "$cf_new_extra_cppflags" ; then
4361 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4362 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4368 fi # cf_cv_posix_visible
4372 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4375 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4376 cf_xopen_source="-D_BSD_SOURCE"
4380 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4383 cf_xopen_source="-D_OSF_SOURCE"
4386 cf_xopen_source="-D_QNX_SOURCE"
4389 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4392 cf_xopen_source="-D__EXTENSIONS__"
4393 cf_cv_xopen_source=broken
4395 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4401 echo "$as_me:4401: checking if we should define _XOPEN_SOURCE" >&5
4402 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4403 if test "${cf_cv_xopen_source+set}" = set; then
4404 echo $ECHO_N "(cached) $ECHO_C" >&6
4407 cat >conftest.$ac_ext <<_ACEOF
4408 #line 4408 "configure"
4409 #include "confdefs.h"
4413 #include <sys/types.h>
4419 #ifndef _XOPEN_SOURCE
4426 rm -f conftest.$ac_objext
4427 if { (eval echo "$as_me:4427: \"$ac_compile\"") >&5
4428 (eval $ac_compile) 2>&5
4430 echo "$as_me:4430: \$? = $ac_status" >&5
4431 (exit $ac_status); } &&
4432 { ac_try='test -s conftest.$ac_objext'
4433 { (eval echo "$as_me:4433: \"$ac_try\"") >&5
4436 echo "$as_me:4436: \$? = $ac_status" >&5
4437 (exit $ac_status); }; }; then
4438 cf_cv_xopen_source=no
4440 echo "$as_me: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4444 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4445 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4447 cat >conftest.$ac_ext <<_ACEOF
4448 #line 4448 "configure"
4449 #include "confdefs.h"
4453 #include <sys/types.h>
4459 #ifdef _XOPEN_SOURCE
4466 rm -f conftest.$ac_objext
4467 if { (eval echo "$as_me:4467: \"$ac_compile\"") >&5
4468 (eval $ac_compile) 2>&5
4470 echo "$as_me:4470: \$? = $ac_status" >&5
4471 (exit $ac_status); } &&
4472 { ac_try='test -s conftest.$ac_objext'
4473 { (eval echo "$as_me:4473: \"$ac_try\"") >&5
4476 echo "$as_me:4476: \$? = $ac_status" >&5
4477 (exit $ac_status); }; }; then
4478 cf_cv_xopen_source=no
4480 echo "$as_me: failed program was:" >&5
4481 cat conftest.$ac_ext >&5
4482 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4484 rm -f conftest.$ac_objext conftest.$ac_ext
4488 rm -f conftest.$ac_objext conftest.$ac_ext
4491 echo "$as_me:4491: result: $cf_cv_xopen_source" >&5
4492 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4494 if test "$cf_cv_xopen_source" != no ; then
4496 CFLAGS=`echo "$CFLAGS" | \
4497 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4498 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4500 CPPFLAGS=`echo "$CPPFLAGS" | \
4501 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4502 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4504 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4509 cf_new_extra_cppflags=
4511 for cf_add_cflags in $cf_temp_xopen_source
4513 case $cf_fix_cppflags in
4515 case $cf_add_cflags in
4516 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4517 case $cf_add_cflags in
4519 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4522 && test -z "${cf_tst_cflags}" \
4523 && cf_fix_cppflags=yes
4525 if test $cf_fix_cppflags = yes ; then
4527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4531 elif test "${cf_tst_cflags}" = "\"'" ; then
4533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4544 case $cf_add_cflags in
4546 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4548 CPPFLAGS=`echo "$CPPFLAGS" | \
4549 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4550 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4555 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4556 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4563 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4564 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4571 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4572 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4574 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4577 && test -z "${cf_tst_cflags}" \
4578 && cf_fix_cppflags=no
4583 if test -n "$cf_new_cflags" ; then
4585 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4586 CFLAGS="${CFLAGS}$cf_new_cflags"
4590 if test -n "$cf_new_cppflags" ; then
4592 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4593 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4597 if test -n "$cf_new_extra_cppflags" ; then
4599 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4600 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4606 if test "$cf_cv_posix_visible" = no; then
4608 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4610 cf_save_CFLAGS="$CFLAGS"
4611 cf_save_CPPFLAGS="$CPPFLAGS"
4613 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4614 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4615 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4617 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4618 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4619 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4621 echo "$as_me:4621: checking if we should define _POSIX_C_SOURCE" >&5
4622 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4623 if test "${cf_cv_posix_c_source+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4627 echo "${as_me:-configure}:4627: testing if the symbol is already defined go no further ..." 1>&5
4629 cat >conftest.$ac_ext <<_ACEOF
4630 #line 4630 "configure"
4631 #include "confdefs.h"
4632 #include <sys/types.h>
4637 #ifndef _POSIX_C_SOURCE
4644 rm -f conftest.$ac_objext
4645 if { (eval echo "$as_me:4645: \"$ac_compile\"") >&5
4646 (eval $ac_compile) 2>&5
4648 echo "$as_me:4648: \$? = $ac_status" >&5
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest.$ac_objext'
4651 { (eval echo "$as_me:4651: \"$ac_try\"") >&5
4654 echo "$as_me:4654: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 cf_cv_posix_c_source=no
4658 echo "$as_me: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4660 cf_want_posix_source=no
4661 case .$cf_POSIX_C_SOURCE in
4663 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4666 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4667 cf_want_posix_source=yes
4670 cf_want_posix_source=yes
4673 if test "$cf_want_posix_source" = yes ; then
4674 cat >conftest.$ac_ext <<_ACEOF
4675 #line 4675 "configure"
4676 #include "confdefs.h"
4677 #include <sys/types.h>
4682 #ifdef _POSIX_SOURCE
4689 rm -f conftest.$ac_objext
4690 if { (eval echo "$as_me:4690: \"$ac_compile\"") >&5
4691 (eval $ac_compile) 2>&5
4693 echo "$as_me:4693: \$? = $ac_status" >&5
4694 (exit $ac_status); } &&
4695 { ac_try='test -s conftest.$ac_objext'
4696 { (eval echo "$as_me:4696: \"$ac_try\"") >&5
4699 echo "$as_me:4699: \$? = $ac_status" >&5
4700 (exit $ac_status); }; }; then
4703 echo "$as_me: failed program was:" >&5
4704 cat conftest.$ac_ext >&5
4705 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4707 rm -f conftest.$ac_objext conftest.$ac_ext
4710 echo "${as_me:-configure}:4710: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4712 CFLAGS="$cf_trim_CFLAGS"
4713 CPPFLAGS="$cf_trim_CPPFLAGS"
4715 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4716 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4718 echo "${as_me:-configure}:4718: testing if the second compile does not leave our definition intact error ..." 1>&5
4720 cat >conftest.$ac_ext <<_ACEOF
4721 #line 4721 "configure"
4722 #include "confdefs.h"
4723 #include <sys/types.h>
4728 #ifndef _POSIX_C_SOURCE
4735 rm -f conftest.$ac_objext
4736 if { (eval echo "$as_me:4736: \"$ac_compile\"") >&5
4737 (eval $ac_compile) 2>&5
4739 echo "$as_me:4739: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest.$ac_objext'
4742 { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4745 echo "$as_me:4745: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4749 echo "$as_me: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4751 cf_cv_posix_c_source=no
4753 rm -f conftest.$ac_objext conftest.$ac_ext
4754 CFLAGS="$cf_save_CFLAGS"
4755 CPPFLAGS="$cf_save_CPPFLAGS"
4758 rm -f conftest.$ac_objext conftest.$ac_ext
4761 echo "$as_me:4761: result: $cf_cv_posix_c_source" >&5
4762 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4764 if test "$cf_cv_posix_c_source" != no ; then
4765 CFLAGS="$cf_trim_CFLAGS"
4766 CPPFLAGS="$cf_trim_CPPFLAGS"
4771 cf_new_extra_cppflags=
4773 for cf_add_cflags in $cf_cv_posix_c_source
4775 case $cf_fix_cppflags in
4777 case $cf_add_cflags in
4778 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4779 case $cf_add_cflags in
4781 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4783 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4784 && test -z "${cf_tst_cflags}" \
4785 && cf_fix_cppflags=yes
4787 if test $cf_fix_cppflags = yes ; then
4789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4793 elif test "${cf_tst_cflags}" = "\"'" ; then
4795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4806 case $cf_add_cflags in
4808 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4810 CPPFLAGS=`echo "$CPPFLAGS" | \
4811 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4812 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4817 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4818 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4825 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4826 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4833 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4834 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4836 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4838 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4839 && test -z "${cf_tst_cflags}" \
4840 && cf_fix_cppflags=no
4845 if test -n "$cf_new_cflags" ; then
4847 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4848 CFLAGS="${CFLAGS}$cf_new_cflags"
4852 if test -n "$cf_new_cppflags" ; then
4854 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4855 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4859 if test -n "$cf_new_extra_cppflags" ; then
4861 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4862 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4868 fi # cf_cv_posix_visible
4873 if test -n "$cf_xopen_source" ; then
4878 cf_new_extra_cppflags=
4880 for cf_add_cflags in $cf_xopen_source
4882 case $cf_fix_cppflags in
4884 case $cf_add_cflags in
4885 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4886 case $cf_add_cflags in
4888 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4891 && test -z "${cf_tst_cflags}" \
4892 && cf_fix_cppflags=yes
4894 if test $cf_fix_cppflags = yes ; then
4896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4900 elif test "${cf_tst_cflags}" = "\"'" ; then
4902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4913 case $cf_add_cflags in
4915 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4917 CPPFLAGS=`echo "$CPPFLAGS" | \
4918 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4919 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4924 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4925 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4932 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4933 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4946 && test -z "${cf_tst_cflags}" \
4947 && cf_fix_cppflags=no
4952 if test -n "$cf_new_cflags" ; then
4953 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4955 echo "${as_me:-configure}:4955: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4957 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4958 CFLAGS="${CFLAGS}$cf_new_cflags"
4962 if test -n "$cf_new_cppflags" ; then
4963 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4965 echo "${as_me:-configure}:4965: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4967 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4968 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4972 if test -n "$cf_new_extra_cppflags" ; then
4973 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4975 echo "${as_me:-configure}:4975: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4977 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4978 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4984 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4985 echo "$as_me:4985: checking if _XOPEN_SOURCE really is set" >&5
4986 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4987 cat >conftest.$ac_ext <<_ACEOF
4988 #line 4988 "configure"
4989 #include "confdefs.h"
4995 #ifndef _XOPEN_SOURCE
5002 rm -f conftest.$ac_objext
5003 if { (eval echo "$as_me:5003: \"$ac_compile\"") >&5
5004 (eval $ac_compile) 2>&5
5006 echo "$as_me:5006: \$? = $ac_status" >&5
5007 (exit $ac_status); } &&
5008 { ac_try='test -s conftest.$ac_objext'
5009 { (eval echo "$as_me:5009: \"$ac_try\"") >&5
5012 echo "$as_me:5012: \$? = $ac_status" >&5
5013 (exit $ac_status); }; }; then
5014 cf_XOPEN_SOURCE_set=yes
5016 echo "$as_me: failed program was:" >&5
5017 cat conftest.$ac_ext >&5
5018 cf_XOPEN_SOURCE_set=no
5020 rm -f conftest.$ac_objext conftest.$ac_ext
5021 echo "$as_me:5021: result: $cf_XOPEN_SOURCE_set" >&5
5022 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5023 if test $cf_XOPEN_SOURCE_set = yes
5025 cat >conftest.$ac_ext <<_ACEOF
5026 #line 5026 "configure"
5027 #include "confdefs.h"
5033 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5040 rm -f conftest.$ac_objext
5041 if { (eval echo "$as_me:5041: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5044 echo "$as_me:5044: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:5047: \"$ac_try\"") >&5
5050 echo "$as_me:5050: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 cf_XOPEN_SOURCE_set_ok=yes
5054 echo "$as_me: failed program was:" >&5
5055 cat conftest.$ac_ext >&5
5056 cf_XOPEN_SOURCE_set_ok=no
5058 rm -f conftest.$ac_objext conftest.$ac_ext
5059 if test $cf_XOPEN_SOURCE_set_ok = no
5061 { echo "$as_me:5061: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5062 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5066 echo "$as_me:5066: checking if we should define _XOPEN_SOURCE" >&5
5067 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5068 if test "${cf_cv_xopen_source+set}" = set; then
5069 echo $ECHO_N "(cached) $ECHO_C" >&6
5072 cat >conftest.$ac_ext <<_ACEOF
5073 #line 5073 "configure"
5074 #include "confdefs.h"
5078 #include <sys/types.h>
5084 #ifndef _XOPEN_SOURCE
5091 rm -f conftest.$ac_objext
5092 if { (eval echo "$as_me:5092: \"$ac_compile\"") >&5
5093 (eval $ac_compile) 2>&5
5095 echo "$as_me:5095: \$? = $ac_status" >&5
5096 (exit $ac_status); } &&
5097 { ac_try='test -s conftest.$ac_objext'
5098 { (eval echo "$as_me:5098: \"$ac_try\"") >&5
5101 echo "$as_me:5101: \$? = $ac_status" >&5
5102 (exit $ac_status); }; }; then
5103 cf_cv_xopen_source=no
5105 echo "$as_me: failed program was:" >&5
5106 cat conftest.$ac_ext >&5
5109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5110 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5112 cat >conftest.$ac_ext <<_ACEOF
5113 #line 5113 "configure"
5114 #include "confdefs.h"
5118 #include <sys/types.h>
5124 #ifdef _XOPEN_SOURCE
5131 rm -f conftest.$ac_objext
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133 (eval $ac_compile) 2>&5
5135 echo "$as_me:5135: \$? = $ac_status" >&5
5136 (exit $ac_status); } &&
5137 { ac_try='test -s conftest.$ac_objext'
5138 { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5141 echo "$as_me:5141: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 cf_cv_xopen_source=no
5145 echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5149 rm -f conftest.$ac_objext conftest.$ac_ext
5153 rm -f conftest.$ac_objext conftest.$ac_ext
5156 echo "$as_me:5156: result: $cf_cv_xopen_source" >&5
5157 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5159 if test "$cf_cv_xopen_source" != no ; then
5161 CFLAGS=`echo "$CFLAGS" | \
5162 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5163 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5165 CPPFLAGS=`echo "$CPPFLAGS" | \
5166 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5167 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5169 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5174 cf_new_extra_cppflags=
5176 for cf_add_cflags in $cf_temp_xopen_source
5178 case $cf_fix_cppflags in
5180 case $cf_add_cflags in
5181 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5182 case $cf_add_cflags in
5184 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5186 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5187 && test -z "${cf_tst_cflags}" \
5188 && cf_fix_cppflags=yes
5190 if test $cf_fix_cppflags = yes ; then
5192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5196 elif test "${cf_tst_cflags}" = "\"'" ; then
5198 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5199 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5209 case $cf_add_cflags in
5211 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5213 CPPFLAGS=`echo "$CPPFLAGS" | \
5214 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5215 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5220 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5221 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5228 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5229 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5239 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5241 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5242 && test -z "${cf_tst_cflags}" \
5243 && cf_fix_cppflags=no
5248 if test -n "$cf_new_cflags" ; then
5250 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5251 CFLAGS="${CFLAGS}$cf_new_cflags"
5255 if test -n "$cf_new_cppflags" ; then
5257 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5258 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5262 if test -n "$cf_new_extra_cppflags" ; then
5264 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5265 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5273 fi # cf_cv_posix_visible
5275 echo "$as_me:5275: checking for signal global datatype" >&5
5276 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5277 if test "${cf_cv_sig_atomic_t+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5282 "volatile sig_atomic_t" \
5286 cat >conftest.$ac_ext <<_ACEOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5290 #include <sys/types.h>
5296 static void handler(int sig)
5303 signal(SIGINT, handler);
5309 rm -f conftest.$ac_objext
5310 if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311 (eval $ac_compile) 2>&5
5313 echo "$as_me:5313: \$? = $ac_status" >&5
5314 (exit $ac_status); } &&
5315 { ac_try='test -s conftest.$ac_objext'
5316 { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5319 echo "$as_me:5319: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
5321 cf_cv_sig_atomic_t=$cf_type
5323 echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 cf_cv_sig_atomic_t=no
5327 rm -f conftest.$ac_objext conftest.$ac_ext
5328 test "$cf_cv_sig_atomic_t" != no && break
5333 echo "$as_me:5333: result: $cf_cv_sig_atomic_t" >&5
5334 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5335 test "$cf_cv_sig_atomic_t" != no &&
5336 cat >>confdefs.h <<EOF
5337 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5340 # Work around breakage on OS X
5342 echo "$as_me:5342: checking if SIGWINCH is defined" >&5
5343 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5344 if test "${cf_cv_define_sigwinch+set}" = set; then
5345 echo $ECHO_N "(cached) $ECHO_C" >&6
5348 cat >conftest.$ac_ext <<_ACEOF
5349 #line 5349 "configure"
5350 #include "confdefs.h"
5352 #include <sys/types.h>
5353 #include <sys/signal.h>
5363 rm -f conftest.$ac_objext
5364 if { (eval echo "$as_me:5364: \"$ac_compile\"") >&5
5365 (eval $ac_compile) 2>&5
5367 echo "$as_me:5367: \$? = $ac_status" >&5
5368 (exit $ac_status); } &&
5369 { ac_try='test -s conftest.$ac_objext'
5370 { (eval echo "$as_me:5370: \"$ac_try\"") >&5
5373 echo "$as_me:5373: \$? = $ac_status" >&5
5374 (exit $ac_status); }; }; then
5375 cf_cv_define_sigwinch=yes
5377 echo "$as_me: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
5379 cat >conftest.$ac_ext <<_ACEOF
5380 #line 5380 "configure"
5381 #include "confdefs.h"
5383 #undef _XOPEN_SOURCE
5384 #undef _POSIX_SOURCE
5385 #undef _POSIX_C_SOURCE
5386 #include <sys/types.h>
5387 #include <sys/signal.h>
5397 rm -f conftest.$ac_objext
5398 if { (eval echo "$as_me:5398: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>&5
5401 echo "$as_me:5401: \$? = $ac_status" >&5
5402 (exit $ac_status); } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5407 echo "$as_me:5407: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
5409 cf_cv_define_sigwinch=maybe
5411 echo "$as_me: failed program was:" >&5
5412 cat conftest.$ac_ext >&5
5413 cf_cv_define_sigwinch=no
5415 rm -f conftest.$ac_objext conftest.$ac_ext
5418 rm -f conftest.$ac_objext conftest.$ac_ext
5421 echo "$as_me:5421: result: $cf_cv_define_sigwinch" >&5
5422 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5424 if test "$cf_cv_define_sigwinch" = maybe ; then
5425 echo "$as_me:5425: checking for actual SIGWINCH definition" >&5
5426 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5427 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5431 cf_cv_fixup_sigwinch=unknown
5433 while test $cf_sigwinch != 1
5435 cat >conftest.$ac_ext <<_ACEOF
5436 #line 5436 "configure"
5437 #include "confdefs.h"
5439 #undef _XOPEN_SOURCE
5440 #undef _POSIX_SOURCE
5441 #undef _POSIX_C_SOURCE
5442 #include <sys/types.h>
5443 #include <sys/signal.h>
5449 #if SIGWINCH != $cf_sigwinch
5457 rm -f conftest.$ac_objext
5458 if { (eval echo "$as_me:5458: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5461 echo "$as_me:5461: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:5464: \"$ac_try\"") >&5
5467 echo "$as_me:5467: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 cf_cv_fixup_sigwinch=$cf_sigwinch
5472 echo "$as_me: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
5475 rm -f conftest.$ac_objext conftest.$ac_ext
5477 cf_sigwinch=`expr $cf_sigwinch - 1`
5481 echo "$as_me:5481: result: $cf_cv_fixup_sigwinch" >&5
5482 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5484 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5485 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5489 # Checks for CODESET support.
5491 echo "$as_me:5491: checking for nl_langinfo and CODESET" >&5
5492 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5493 if test "${am_cv_langinfo_codeset+set}" = set; then
5494 echo $ECHO_N "(cached) $ECHO_C" >&6
5496 cat >conftest.$ac_ext <<_ACEOF
5497 #line 5497 "configure"
5498 #include "confdefs.h"
5499 #include <langinfo.h>
5503 char* cs = nl_langinfo(CODESET);
5508 rm -f conftest.$ac_objext conftest$ac_exeext
5509 if { (eval echo "$as_me:5509: \"$ac_link\"") >&5
5510 (eval $ac_link) 2>&5
5512 echo "$as_me:5512: \$? = $ac_status" >&5
5513 (exit $ac_status); } &&
5514 { ac_try='test -s conftest$ac_exeext'
5515 { (eval echo "$as_me:5515: \"$ac_try\"") >&5
5518 echo "$as_me:5518: \$? = $ac_status" >&5
5519 (exit $ac_status); }; }; then
5520 am_cv_langinfo_codeset=yes
5522 echo "$as_me: failed program was:" >&5
5523 cat conftest.$ac_ext >&5
5524 am_cv_langinfo_codeset=no
5526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5529 echo "$as_me:5529: result: $am_cv_langinfo_codeset" >&5
5530 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5531 if test $am_cv_langinfo_codeset = yes; then
5533 cat >>confdefs.h <<\EOF
5534 #define HAVE_LANGINFO_CODESET 1
5539 echo "$as_me:5539: checking if you want to use pkg-config" >&5
5540 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5542 # Check whether --with-pkg-config or --without-pkg-config was given.
5543 if test "${with_pkg_config+set}" = set; then
5544 withval="$with_pkg_config"
5545 cf_pkg_config=$withval
5549 echo "$as_me:5549: result: $cf_pkg_config" >&5
5550 echo "${ECHO_T}$cf_pkg_config" >&6
5552 case $cf_pkg_config in
5558 if test -n "$ac_tool_prefix"; then
5559 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5560 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5561 echo "$as_me:5561: checking for $ac_word" >&5
5562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5563 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5564 echo $ECHO_N "(cached) $ECHO_C" >&6
5568 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5571 ac_save_IFS=$IFS; IFS=$ac_path_separator
5573 for ac_dir in $ac_dummy; do
5575 test -z "$ac_dir" && ac_dir=.
5576 if $as_executable_p "$ac_dir/$ac_word"; then
5577 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5578 echo "$as_me:5578: found $ac_dir/$ac_word" >&5
5586 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5588 if test -n "$PKG_CONFIG"; then
5589 echo "$as_me:5589: result: $PKG_CONFIG" >&5
5590 echo "${ECHO_T}$PKG_CONFIG" >&6
5592 echo "$as_me:5592: result: no" >&5
5593 echo "${ECHO_T}no" >&6
5597 if test -z "$ac_cv_path_PKG_CONFIG"; then
5598 ac_pt_PKG_CONFIG=$PKG_CONFIG
5599 # Extract the first word of "pkg-config", so it can be a program name with args.
5600 set dummy pkg-config; ac_word=$2
5601 echo "$as_me:5601: checking for $ac_word" >&5
5602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5603 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5606 case $ac_pt_PKG_CONFIG in
5608 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5611 ac_save_IFS=$IFS; IFS=$ac_path_separator
5613 for ac_dir in $ac_dummy; do
5615 test -z "$ac_dir" && ac_dir=.
5616 if $as_executable_p "$ac_dir/$ac_word"; then
5617 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5618 echo "$as_me:5618: found $ac_dir/$ac_word" >&5
5623 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5627 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5629 if test -n "$ac_pt_PKG_CONFIG"; then
5630 echo "$as_me:5630: result: $ac_pt_PKG_CONFIG" >&5
5631 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5633 echo "$as_me:5633: result: no" >&5
5634 echo "${ECHO_T}no" >&6
5637 PKG_CONFIG=$ac_pt_PKG_CONFIG
5639 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5648 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5649 if test "$PKG_CONFIG" != none ; then
5651 if test "x$prefix" != xNONE; then
5652 cf_path_syntax="$prefix"
5654 cf_path_syntax="$ac_default_prefix"
5657 case ".$PKG_CONFIG" in
5662 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5664 (.\${*prefix}*|.\${*dir}*)
5665 eval PKG_CONFIG="$PKG_CONFIG"
5666 case ".$PKG_CONFIG" in
5668 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5673 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5676 { { echo "$as_me:5676: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5677 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5678 { (exit 1); exit 1; }; }
5682 elif test "x$cf_pkg_config" != xno ; then
5683 { echo "$as_me:5683: WARNING: pkg-config is not installed" >&5
5684 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5687 echo "$as_me:5687: checking if you want to see long compiling messages" >&5
5688 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5690 # Check whether --enable-echo or --disable-echo was given.
5691 if test "${enable_echo+set}" = set; then
5692 enableval="$enable_echo"
5693 test "$enableval" != no && enableval=yes
5694 if test "$enableval" != "yes" ; then
5697 ECHO_LD='@echo linking $@;'
5698 RULE_CC='@echo compiling $<'
5699 SHOW_CC='@echo compiling $@'
5721 echo "$as_me:5721: result: $enableval" >&5
5722 echo "${ECHO_T}$enableval" >&6
5724 echo "$as_me:5724: checking for ncurses wrap-prefix" >&5
5725 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5727 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5728 if test "${with_ncurses_wrap_prefix+set}" = set; then
5729 withval="$with_ncurses_wrap_prefix"
5730 NCURSES_WRAP_PREFIX=$withval
5732 NCURSES_WRAP_PREFIX=_nc_
5734 echo "$as_me:5734: result: $NCURSES_WRAP_PREFIX" >&5
5735 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5737 echo "$as_me:5737: checking if you want to check for wide-character functions" >&5
5738 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5740 # Check whether --enable-widec or --disable-widec was given.
5741 if test "${enable_widec+set}" = set; then
5742 enableval="$enable_widec"
5743 test "$enableval" != no && enableval=yes
5744 if test "$enableval" != "yes" ; then
5754 echo "$as_me:5754: result: $cf_enable_widec" >&5
5755 echo "${ECHO_T}$cf_enable_widec" >&6
5757 echo "$as_me:5757: checking for specific curses-directory" >&5
5758 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5760 # Check whether --with-curses-dir or --without-curses-dir was given.
5761 if test "${with_curses_dir+set}" = set; then
5762 withval="$with_curses_dir"
5763 cf_cv_curses_dir=$withval
5767 echo "$as_me:5767: result: $cf_cv_curses_dir" >&5
5768 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5770 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5773 if test "x$prefix" != xNONE; then
5774 cf_path_syntax="$prefix"
5776 cf_path_syntax="$ac_default_prefix"
5784 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5786 (.\${*prefix}*|.\${*dir}*)
5787 eval withval="$withval"
5790 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5795 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5798 { { echo "$as_me:5798: error: expected a pathname, not \"$withval\"" >&5
5799 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5800 { (exit 1); exit 1; }; }
5804 if test -d "$cf_cv_curses_dir"
5807 if test -n "$cf_cv_curses_dir/include" ; then
5808 for cf_add_incdir in $cf_cv_curses_dir/include
5810 while test $cf_add_incdir != /usr/include
5812 if test -d $cf_add_incdir
5815 if test -n "$CFLAGS$CPPFLAGS" ; then
5816 # a loop is needed to ensure we can add subdirs of existing dirs
5817 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5818 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5819 cf_have_incdir=yes; break
5824 if test "$cf_have_incdir" = no ; then
5825 if test "$cf_add_incdir" = /usr/local/include ; then
5826 if test "$GCC" = yes
5828 cf_save_CPPFLAGS=$CPPFLAGS
5830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5831 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5833 cat >conftest.$ac_ext <<_ACEOF
5834 #line 5834 "configure"
5835 #include "confdefs.h"
5845 rm -f conftest.$ac_objext
5846 if { (eval echo "$as_me:5846: \"$ac_compile\"") >&5
5847 (eval $ac_compile) 2>&5
5849 echo "$as_me:5849: \$? = $ac_status" >&5
5850 (exit $ac_status); } &&
5851 { ac_try='test -s conftest.$ac_objext'
5852 { (eval echo "$as_me:5852: \"$ac_try\"") >&5
5855 echo "$as_me:5855: \$? = $ac_status" >&5
5856 (exit $ac_status); }; }; then
5859 echo "$as_me: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5863 rm -f conftest.$ac_objext conftest.$ac_ext
5864 CPPFLAGS=$cf_save_CPPFLAGS
5869 if test "$cf_have_incdir" = no ; then
5870 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5872 echo "${as_me:-configure}:5872: testing adding $cf_add_incdir to include-path ..." 1>&5
5874 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5876 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5877 test "$cf_top_incdir" = "$cf_add_incdir" && break
5878 cf_add_incdir="$cf_top_incdir"
5889 if test -n "$cf_cv_curses_dir/lib" ; then
5890 for cf_add_libdir in $cf_cv_curses_dir/lib
5892 if test $cf_add_libdir = /usr/lib ; then
5894 elif test -d $cf_add_libdir
5897 if test -n "$LDFLAGS$LIBS" ; then
5898 # a loop is needed to ensure we can add subdirs of existing dirs
5899 for cf_test_libdir in $LDFLAGS $LIBS ; do
5900 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5901 cf_have_libdir=yes; break
5905 if test "$cf_have_libdir" = no ; then
5906 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5908 echo "${as_me:-configure}:5908: testing adding $cf_add_libdir to library-path ..." 1>&5
5910 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5921 echo "$as_me:5921: checking for specified curses library type" >&5
5922 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5924 # Check whether --with-screen or --without-screen was given.
5925 if test "${with_screen+set}" = set; then
5926 withval="$with_screen"
5927 cf_cv_screen=$withval
5930 # Check whether --with-ncursesw or --without-ncursesw was given.
5931 if test "${with_ncursesw+set}" = set; then
5932 withval="$with_ncursesw"
5933 cf_cv_screen=ncursesw
5936 # Check whether --with-ncurses or --without-ncurses was given.
5937 if test "${with_ncurses+set}" = set; then
5938 withval="$with_ncurses"
5939 cf_cv_screen=ncurses
5942 # Check whether --with-pdcurses or --without-pdcurses was given.
5943 if test "${with_pdcurses+set}" = set; then
5944 withval="$with_pdcurses"
5945 cf_cv_screen=pdcurses
5948 # Check whether --with-curses-colr or --without-curses-colr was given.
5949 if test "${with_curses_colr+set}" = set; then
5950 withval="$with_curses_colr"
5951 cf_cv_screen=curses_colr
5954 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5955 if test "${with_curses_5lib+set}" = set; then
5956 withval="$with_curses_5lib"
5957 cf_cv_screen=curses_5lib
5965 echo "$as_me:5965: result: $cf_cv_screen" >&5
5966 echo "${ECHO_T}$cf_cv_screen" >&6
5968 case $cf_cv_screen in
5971 echo "$as_me:5971: checking for extra include directories" >&5
5972 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5973 if test "${cf_cv_curses_incdir+set}" = set; then
5974 echo $ECHO_N "(cached) $ECHO_C" >&6
5977 cf_cv_curses_incdir=no
5980 if test "x$cf_cv_screen" = "xcurses_colr"
5982 test -d /usr/include/curses_colr && \
5983 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5987 if test "x$cf_cv_screen" = "xcurses_5lib"
5989 test -d /usr/5lib && \
5990 test -d /usr/5include && \
5991 cf_cv_curses_incdir="-I/usr/5include"
5997 echo "$as_me:5997: result: $cf_cv_curses_incdir" >&5
5998 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5999 if test "$cf_cv_curses_incdir" != no
6002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6003 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6007 echo "$as_me:6007: checking if we have identified curses headers" >&5
6008 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6009 if test "${cf_cv_ncurses_header+set}" = set; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 cf_cv_ncurses_header=none
6016 curses.h ncurses/ncurses.h ncurses/curses.h
6018 cat >conftest.$ac_ext <<_ACEOF
6019 #line 6019 "configure"
6020 #include "confdefs.h"
6021 #include <${cf_header}>
6025 initscr(); tgoto("?", 0,0)
6030 rm -f conftest.$ac_objext
6031 if { (eval echo "$as_me:6031: \"$ac_compile\"") >&5
6032 (eval $ac_compile) 2>&5
6034 echo "$as_me:6034: \$? = $ac_status" >&5
6035 (exit $ac_status); } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:6037: \"$ac_try\"") >&5
6040 echo "$as_me:6040: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
6042 cf_cv_ncurses_header=$cf_header; break
6044 echo "$as_me: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6047 rm -f conftest.$ac_objext conftest.$ac_ext
6051 echo "$as_me:6051: result: $cf_cv_ncurses_header" >&5
6052 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6054 if test "$cf_cv_ncurses_header" = none ; then
6055 { { echo "$as_me:6055: error: No curses header-files found" >&5
6056 echo "$as_me: error: No curses header-files found" >&2;}
6057 { (exit 1); exit 1; }; }
6060 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6062 for ac_header in $cf_cv_ncurses_header
6064 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6065 echo "$as_me:6065: checking for $ac_header" >&5
6066 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6067 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6068 echo $ECHO_N "(cached) $ECHO_C" >&6
6070 cat >conftest.$ac_ext <<_ACEOF
6071 #line 6071 "configure"
6072 #include "confdefs.h"
6073 #include <$ac_header>
6075 if { (eval echo "$as_me:6075: \"$ac_cpp conftest.$ac_ext\"") >&5
6076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6078 egrep -v '^ *\+' conftest.er1 >conftest.err
6080 cat conftest.err >&5
6081 echo "$as_me:6081: \$? = $ac_status" >&5
6082 (exit $ac_status); } >/dev/null; then
6083 if test -s conftest.err; then
6084 ac_cpp_err=$ac_c_preproc_warn_flag
6091 if test -z "$ac_cpp_err"; then
6092 eval "$as_ac_Header=yes"
6094 echo "$as_me: failed program was:" >&5
6095 cat conftest.$ac_ext >&5
6096 eval "$as_ac_Header=no"
6098 rm -f conftest.err conftest.$ac_ext
6100 echo "$as_me:6100: result: `eval echo '${'$as_ac_Header'}'`" >&5
6101 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6103 cat >>confdefs.h <<EOF
6104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6110 echo "$as_me:6110: checking for terminfo header" >&5
6111 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6112 if test "${cf_cv_term_header+set}" = set; then
6113 echo $ECHO_N "(cached) $ECHO_C" >&6
6116 case ${cf_cv_ncurses_header} in
6117 (*/ncurses.h|*/ncursesw.h)
6118 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6121 cf_term_header=term.h
6125 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6127 cat >conftest.$ac_ext <<_ACEOF
6128 #line 6128 "configure"
6129 #include "confdefs.h"
6131 #include <${cf_cv_ncurses_header:-curses.h}>
6137 int x = auto_left_margin
6142 rm -f conftest.$ac_objext
6143 if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5
6144 (eval $ac_compile) 2>&5
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
6148 { ac_try='test -s conftest.$ac_objext'
6149 { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6152 echo "$as_me:6152: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6155 cf_cv_term_header="$cf_test"
6157 echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6160 cf_cv_term_header=unknown
6163 rm -f conftest.$ac_objext conftest.$ac_ext
6164 test "$cf_cv_term_header" != unknown && break
6168 echo "$as_me:6168: result: $cf_cv_term_header" >&5
6169 echo "${ECHO_T}$cf_cv_term_header" >&6
6171 # Set definitions to allow ifdef'ing to accommodate subdirectories
6173 case $cf_cv_term_header in
6176 cat >>confdefs.h <<\EOF
6177 #define HAVE_TERM_H 1
6183 case $cf_cv_term_header in
6186 cat >>confdefs.h <<\EOF
6187 #define HAVE_NCURSES_TERM_H 1
6193 cat >>confdefs.h <<\EOF
6194 #define HAVE_NCURSESW_TERM_H 1
6200 echo "$as_me:6200: checking for ncurses version" >&5
6201 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6202 if test "${cf_cv_ncurses_version+set}" = set; then
6203 echo $ECHO_N "(cached) $ECHO_C" >&6
6206 cf_cv_ncurses_version=no
6209 if test "$cross_compiling" = yes; then
6211 # This will not work if the preprocessor splits the line after the
6212 # Autoconf token. The 'unproto' program does that.
6213 cat > conftest.$ac_ext <<EOF
6214 #include <${cf_cv_ncurses_header:-curses.h}>
6216 #ifdef NCURSES_VERSION
6217 Autoconf NCURSES_VERSION
6225 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6226 { (eval echo "$as_me:6226: \"$cf_try\"") >&5
6229 echo "$as_me:6229: \$? = $ac_status" >&5
6230 (exit $ac_status); }
6231 if test -f conftest.out ; then
6232 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6233 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6238 cat >conftest.$ac_ext <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6242 #include <${cf_cv_ncurses_header:-curses.h}>
6246 FILE *fp = fopen("$cf_tempfile", "w");
6247 #ifdef NCURSES_VERSION
6248 # ifdef NCURSES_VERSION_PATCH
6249 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6251 fprintf(fp, "%s\n", NCURSES_VERSION);
6255 fprintf(fp, "old\n");
6260 ${cf_cv_main_return:-return}(0);
6263 rm -f conftest$ac_exeext
6264 if { (eval echo "$as_me:6264: \"$ac_link\"") >&5
6265 (eval $ac_link) 2>&5
6267 echo "$as_me:6267: \$? = $ac_status" >&5
6268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6269 { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6272 echo "$as_me:6272: \$? = $ac_status" >&5
6273 (exit $ac_status); }; }; then
6275 cf_cv_ncurses_version=`cat $cf_tempfile`
6277 echo "$as_me: program exited with status $ac_status" >&5
6278 echo "$as_me: failed program was:" >&5
6279 cat conftest.$ac_ext >&5
6281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6286 echo "$as_me:6286: result: $cf_cv_ncurses_version" >&5
6287 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6288 test "$cf_cv_ncurses_version" = no ||
6289 cat >>confdefs.h <<\EOF
6293 echo "$as_me:6293: checking if we have identified curses libraries" >&5
6294 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6295 cat >conftest.$ac_ext <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298 #include <${cf_cv_ncurses_header:-curses.h}>
6302 initscr(); tgoto("?", 0,0)
6307 rm -f conftest.$ac_objext conftest$ac_exeext
6308 if { (eval echo "$as_me:6308: \"$ac_link\"") >&5
6309 (eval $ac_link) 2>&5
6311 echo "$as_me:6311: \$? = $ac_status" >&5
6312 (exit $ac_status); } &&
6313 { ac_try='test -s conftest$ac_exeext'
6314 { (eval echo "$as_me:6314: \"$ac_try\"") >&5
6317 echo "$as_me:6317: \$? = $ac_status" >&5
6318 (exit $ac_status); }; }; then
6321 echo "$as_me: failed program was:" >&5
6322 cat conftest.$ac_ext >&5
6325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6326 echo "$as_me:6326: result: $cf_result" >&5
6327 echo "${ECHO_T}$cf_result" >&6
6329 if test "$cf_result" = no ; then
6332 echo "$as_me:6332: checking for tgoto in -lmytinfo" >&5
6333 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6334 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6335 echo $ECHO_N "(cached) $ECHO_C" >&6
6337 ac_check_lib_save_LIBS=$LIBS
6338 LIBS="-lmytinfo $LIBS"
6339 cat >conftest.$ac_ext <<_ACEOF
6340 #line 6340 "configure"
6341 #include "confdefs.h"
6343 /* Override any gcc2 internal prototype to avoid an error. */
6347 /* We use char because int might match the return type of a gcc2
6348 builtin and then its argument prototype would still apply. */
6358 rm -f conftest.$ac_objext conftest$ac_exeext
6359 if { (eval echo "$as_me:6359: \"$ac_link\"") >&5
6360 (eval $ac_link) 2>&5
6362 echo "$as_me:6362: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest$ac_exeext'
6365 { (eval echo "$as_me:6365: \"$ac_try\"") >&5
6368 echo "$as_me:6368: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_cv_lib_mytinfo_tgoto=yes
6372 echo "$as_me: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 ac_cv_lib_mytinfo_tgoto=no
6376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6377 LIBS=$ac_check_lib_save_LIBS
6379 echo "$as_me:6379: result: $ac_cv_lib_mytinfo_tgoto" >&5
6380 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6381 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6386 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6388 for cf_add_1lib in $cf_add_0lib; do
6389 for cf_add_2lib in $cf_add_libs; do
6390 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6395 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6403 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6404 # next (1998), and xcurses "newer" (2000). There is no header file for
6405 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6406 # term.h) for cur_colr
6407 if test "x$cf_cv_screen" = "xcurses_colr"
6409 echo "$as_me:6409: checking for initscr in -lcur_colr" >&5
6410 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6411 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6412 echo $ECHO_N "(cached) $ECHO_C" >&6
6414 ac_check_lib_save_LIBS=$LIBS
6415 LIBS="-lcur_colr $LIBS"
6416 cat >conftest.$ac_ext <<_ACEOF
6417 #line 6417 "configure"
6418 #include "confdefs.h"
6420 /* Override any gcc2 internal prototype to avoid an error. */
6424 /* We use char because int might match the return type of a gcc2
6425 builtin and then its argument prototype would still apply. */
6435 rm -f conftest.$ac_objext conftest$ac_exeext
6436 if { (eval echo "$as_me:6436: \"$ac_link\"") >&5
6437 (eval $ac_link) 2>&5
6439 echo "$as_me:6439: \$? = $ac_status" >&5
6440 (exit $ac_status); } &&
6441 { ac_try='test -s conftest$ac_exeext'
6442 { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6445 echo "$as_me:6445: \$? = $ac_status" >&5
6446 (exit $ac_status); }; }; then
6447 ac_cv_lib_cur_colr_initscr=yes
6449 echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 ac_cv_lib_cur_colr_initscr=no
6453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6454 LIBS=$ac_check_lib_save_LIBS
6456 echo "$as_me:6456: result: $ac_cv_lib_cur_colr_initscr" >&5
6457 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6458 if test $ac_cv_lib_cur_colr_initscr = yes; then
6463 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6465 for cf_add_1lib in $cf_add_0lib; do
6466 for cf_add_2lib in $cf_add_libs; do
6467 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6472 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6476 ac_cv_func_initscr=yes
6480 echo "$as_me:6480: checking for initscr in -lHcurses" >&5
6481 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6482 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6485 ac_check_lib_save_LIBS=$LIBS
6486 LIBS="-lHcurses $LIBS"
6487 cat >conftest.$ac_ext <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6491 /* Override any gcc2 internal prototype to avoid an error. */
6495 /* We use char because int might match the return type of a gcc2
6496 builtin and then its argument prototype would still apply. */
6506 rm -f conftest.$ac_objext conftest$ac_exeext
6507 if { (eval echo "$as_me:6507: \"$ac_link\"") >&5
6508 (eval $ac_link) 2>&5
6510 echo "$as_me:6510: \$? = $ac_status" >&5
6511 (exit $ac_status); } &&
6512 { ac_try='test -s conftest$ac_exeext'
6513 { (eval echo "$as_me:6513: \"$ac_try\"") >&5
6516 echo "$as_me:6516: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_lib_Hcurses_initscr=yes
6520 echo "$as_me: failed program was:" >&5
6521 cat conftest.$ac_ext >&5
6522 ac_cv_lib_Hcurses_initscr=no
6524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6525 LIBS=$ac_check_lib_save_LIBS
6527 echo "$as_me:6527: result: $ac_cv_lib_Hcurses_initscr" >&5
6528 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6529 if test $ac_cv_lib_Hcurses_initscr = yes; then
6531 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6536 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6538 for cf_add_1lib in $cf_add_0lib; do
6539 for cf_add_2lib in $cf_add_libs; do
6540 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6545 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6549 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6550 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6552 ac_cv_func_initscr=yes
6561 case `arch 2>/dev/null` in
6566 if test -n "/lib64" ; then
6567 for cf_add_libdir in /lib64
6569 if test $cf_add_libdir = /usr/lib ; then
6571 elif test -d $cf_add_libdir
6574 if test -n "$LDFLAGS$LIBS" ; then
6575 # a loop is needed to ensure we can add subdirs of existing dirs
6576 for cf_test_libdir in $LDFLAGS $LIBS ; do
6577 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6578 cf_have_libdir=yes; break
6582 if test "$cf_have_libdir" = no ; then
6583 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6585 echo "${as_me:-configure}:6585: testing adding $cf_add_libdir to library-path ..." 1>&5
6587 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6595 if test -n "/lib" ; then
6596 for cf_add_libdir in /lib
6598 if test $cf_add_libdir = /usr/lib ; then
6600 elif test -d $cf_add_libdir
6603 if test -n "$LDFLAGS$LIBS" ; then
6604 # a loop is needed to ensure we can add subdirs of existing dirs
6605 for cf_test_libdir in $LDFLAGS $LIBS ; do
6606 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6607 cf_have_libdir=yes; break
6611 if test "$cf_have_libdir" = no ; then
6612 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6614 echo "${as_me:-configure}:6614: testing adding $cf_add_libdir to library-path ..." 1>&5
6616 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6626 if test -n "/lib" ; then
6627 for cf_add_libdir in /lib
6629 if test $cf_add_libdir = /usr/lib ; then
6631 elif test -d $cf_add_libdir
6634 if test -n "$LDFLAGS$LIBS" ; then
6635 # a loop is needed to ensure we can add subdirs of existing dirs
6636 for cf_test_libdir in $LDFLAGS $LIBS ; do
6637 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6638 cf_have_libdir=yes; break
6642 if test "$cf_have_libdir" = no ; then
6643 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6645 echo "${as_me:-configure}:6645: testing adding $cf_add_libdir to library-path ..." 1>&5
6647 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6657 if test "x$cf_cv_screen" = "xcurses_5lib"
6659 if test -d /usr/5lib ; then
6661 if test -n "/usr/5lib" ; then
6662 for cf_add_libdir in /usr/5lib
6664 if test $cf_add_libdir = /usr/lib ; then
6666 elif test -d $cf_add_libdir
6669 if test -n "$LDFLAGS$LIBS" ; then
6670 # a loop is needed to ensure we can add subdirs of existing dirs
6671 for cf_test_libdir in $LDFLAGS $LIBS ; do
6672 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6673 cf_have_libdir=yes; break
6677 if test "$cf_have_libdir" = no ; then
6678 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6680 echo "${as_me:-configure}:6680: testing adding $cf_add_libdir to library-path ..." 1>&5
6682 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6691 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6693 for cf_add_1lib in $cf_add_0lib; do
6694 for cf_add_2lib in $cf_add_libs; do
6695 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6700 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6706 ac_cv_func_initscr=yes
6710 if test ".$ac_cv_func_initscr" != .yes ; then
6711 cf_save_LIBS="$LIBS"
6713 if test ".${cf_cv_ncurses_version:-no}" != .no
6715 cf_check_list="ncurses curses cursesX"
6717 cf_check_list="cursesX curses ncurses"
6720 # Check for library containing tgoto. Do this before curses library
6721 # because it may be needed to link the test-case for initscr.
6722 if test "x$cf_term_lib" = x
6724 echo "$as_me:6724: checking for tgoto" >&5
6725 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6726 if test "${ac_cv_func_tgoto+set}" = set; then
6727 echo $ECHO_N "(cached) $ECHO_C" >&6
6729 cat >conftest.$ac_ext <<_ACEOF
6730 #line 6730 "configure"
6731 #include "confdefs.h"
6732 #define tgoto autoconf_temporary
6733 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6740 /* We use char because int might match the return type of a gcc2
6741 builtin and then its argument prototype would still apply. */
6748 /* The GNU C library defines stubs for functions which it implements
6749 to always fail with ENOSYS. Some functions are actually named
6750 something starting with __ and the normal name is an alias. */
6751 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6752 #error found stub for tgoto
6760 rm -f conftest.$ac_objext conftest$ac_exeext
6761 if { (eval echo "$as_me:6761: \"$ac_link\"") >&5
6762 (eval $ac_link) 2>&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit $ac_status); } &&
6766 { ac_try='test -s conftest$ac_exeext'
6767 { (eval echo "$as_me:6767: \"$ac_try\"") >&5
6770 echo "$as_me:6770: \$? = $ac_status" >&5
6771 (exit $ac_status); }; }; then
6772 ac_cv_func_tgoto=yes
6774 echo "$as_me: failed program was:" >&5
6775 cat conftest.$ac_ext >&5
6778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6780 echo "$as_me:6780: result: $ac_cv_func_tgoto" >&5
6781 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6782 if test $ac_cv_func_tgoto = yes; then
6783 cf_term_lib=predefined
6786 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6788 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6789 echo "$as_me:6789: checking for tgoto in -l$cf_term_lib" >&5
6790 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6791 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6792 echo $ECHO_N "(cached) $ECHO_C" >&6
6794 ac_check_lib_save_LIBS=$LIBS
6795 LIBS="-l$cf_term_lib $LIBS"
6796 cat >conftest.$ac_ext <<_ACEOF
6797 #line 6797 "configure"
6798 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error. */
6804 /* We use char because int might match the return type of a gcc2
6805 builtin and then its argument prototype would still apply. */
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817 (eval $ac_link) 2>&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit $ac_status); } &&
6821 { ac_try='test -s conftest$ac_exeext'
6822 { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit $ac_status); }; }; then
6827 eval "$as_ac_Lib=yes"
6829 echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 eval "$as_ac_Lib=no"
6833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834 LIBS=$ac_check_lib_save_LIBS
6836 echo "$as_me:6836: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6837 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6838 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6840 : ${cf_nculib_root:=$cf_term_lib}
6851 # Check for library containing initscr
6852 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6853 if test "x$cf_curs_lib" = x
6855 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6857 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6858 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6859 echo "$as_me:6859: checking if we can link with $cf_curs_lib library" >&5
6860 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6861 cat >conftest.$ac_ext <<_ACEOF
6862 #line 6862 "configure"
6863 #include "confdefs.h"
6864 #include <${cf_cv_ncurses_header:-curses.h}>
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:6874: \"$ac_link\"") >&5
6875 (eval $ac_link) 2>&5
6877 echo "$as_me:6877: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest$ac_exeext'
6880 { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6883 echo "$as_me:6883: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6887 echo "$as_me: failed program was:" >&5
6888 cat conftest.$ac_ext >&5
6891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6892 echo "$as_me:6892: result: $cf_result" >&5
6893 echo "${ECHO_T}$cf_result" >&6
6894 test $cf_result = yes && break
6895 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6897 elif test "$cf_term_lib" != predefined ; then
6898 echo "$as_me:6898: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6899 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6900 cat >conftest.$ac_ext <<_ACEOF
6901 #line 6901 "configure"
6902 #include "confdefs.h"
6903 #include <${cf_cv_ncurses_header:-curses.h}>
6907 initscr(); tgoto((char *)0, 0, 0);
6912 rm -f conftest.$ac_objext conftest$ac_exeext
6913 if { (eval echo "$as_me:6913: \"$ac_link\"") >&5
6914 (eval $ac_link) 2>&5
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit $ac_status); } &&
6918 { ac_try='test -s conftest$ac_exeext'
6919 { (eval echo "$as_me:6919: \"$ac_try\"") >&5
6922 echo "$as_me:6922: \$? = $ac_status" >&5
6923 (exit $ac_status); }; }; then
6926 echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6929 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6930 cat >conftest.$ac_ext <<_ACEOF
6931 #line 6931 "configure"
6932 #include "confdefs.h"
6933 #include <${cf_cv_ncurses_header:-curses.h}>
6942 rm -f conftest.$ac_objext conftest$ac_exeext
6943 if { (eval echo "$as_me:6943: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); } &&
6948 { ac_try='test -s conftest$ac_exeext'
6949 { (eval echo "$as_me:6949: \"$ac_try\"") >&5
6952 echo "$as_me:6952: \$? = $ac_status" >&5
6953 (exit $ac_status); }; }; then
6956 echo "$as_me: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964 echo "$as_me:6964: result: $cf_result" >&5
6965 echo "${ECHO_T}$cf_result" >&6
6966 test $cf_result != error && break
6970 test $cf_curs_lib = unknown && { { echo "$as_me:6970: error: no curses library found" >&5
6971 echo "$as_me: error: no curses library found" >&2;}
6972 { (exit 1); exit 1; }; }
6979 echo "$as_me:6979: checking for multibyte character support" >&5
6980 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6981 if test "${cf_cv_utf8_lib+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6985 cf_save_LIBS="$LIBS"
6986 cat >conftest.$ac_ext <<_ACEOF
6987 #line 6987 "configure"
6988 #include "confdefs.h"
6999 rm -f conftest.$ac_objext conftest$ac_exeext
7000 if { (eval echo "$as_me:7000: \"$ac_link\"") >&5
7001 (eval $ac_link) 2>&5
7003 echo "$as_me:7003: \$? = $ac_status" >&5
7004 (exit $ac_status); } &&
7005 { ac_try='test -s conftest$ac_exeext'
7006 { (eval echo "$as_me:7006: \"$ac_try\"") >&5
7009 echo "$as_me:7009: \$? = $ac_status" >&5
7010 (exit $ac_status); }; }; then
7013 echo "$as_me: failed program was:" >&5
7014 cat conftest.$ac_ext >&5
7016 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7017 # will be set on completion of the AC_TRY_LINK below.
7018 cf_cv_header_path_utf8=
7019 cf_cv_library_path_utf8=
7021 echo "${as_me:-configure}:7021: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7023 cf_save_LIBS="$LIBS"
7025 cat >conftest.$ac_ext <<_ACEOF
7026 #line 7026 "configure"
7027 #include "confdefs.h"
7029 #include <libutf8.h>
7038 rm -f conftest.$ac_objext conftest$ac_exeext
7039 if { (eval echo "$as_me:7039: \"$ac_link\"") >&5
7040 (eval $ac_link) 2>&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); } &&
7044 { ac_try='test -s conftest$ac_exeext'
7045 { (eval echo "$as_me:7045: \"$ac_try\"") >&5
7048 echo "$as_me:7048: \$? = $ac_status" >&5
7049 (exit $ac_status); }; }; then
7051 cf_cv_find_linkage_utf8=yes
7052 cf_cv_header_path_utf8=/usr/include
7053 cf_cv_library_path_utf8=/usr/lib
7056 echo "$as_me: failed program was:" >&5
7057 cat conftest.$ac_ext >&5
7059 LIBS="-lutf8 $cf_save_LIBS"
7061 cat >conftest.$ac_ext <<_ACEOF
7062 #line 7062 "configure"
7063 #include "confdefs.h"
7065 #include <libutf8.h>
7074 rm -f conftest.$ac_objext conftest$ac_exeext
7075 if { (eval echo "$as_me:7075: \"$ac_link\"") >&5
7076 (eval $ac_link) 2>&5
7078 echo "$as_me:7078: \$? = $ac_status" >&5
7079 (exit $ac_status); } &&
7080 { ac_try='test -s conftest$ac_exeext'
7081 { (eval echo "$as_me:7081: \"$ac_try\"") >&5
7084 echo "$as_me:7084: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7087 cf_cv_find_linkage_utf8=yes
7088 cf_cv_header_path_utf8=/usr/include
7089 cf_cv_library_path_utf8=/usr/lib
7090 cf_cv_library_file_utf8="-lutf8"
7093 echo "$as_me: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7096 cf_cv_find_linkage_utf8=no
7097 LIBS="$cf_save_LIBS"
7099 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7101 echo "${as_me:-configure}:7101: testing find linkage for utf8 library ..." 1>&5
7103 echo "${as_me:-configure}:7103: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7105 cf_save_CPPFLAGS="$CPPFLAGS"
7106 cf_test_CPPFLAGS="$CPPFLAGS"
7110 # collect the current set of include-directories from compiler flags
7111 cf_header_path_list=""
7112 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7113 for cf_header_path in $CPPFLAGS $CFLAGS
7115 case $cf_header_path in
7117 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7119 test "x$cf_header_path" != "xNONE" && \
7120 test -d "$cf_header_path" && \
7122 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7123 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7124 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7125 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7126 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7127 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7130 cf_header_path_list="$cf_header_path_list $cf_search"
7136 # add the variations for the package we are looking for
7140 test "x$prefix" != "xNONE" && \
7141 test -d "$prefix" && \
7143 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7144 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7145 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7146 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7147 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7148 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7151 for cf_subdir_prefix in \
7160 test "x$cf_subdir_prefix" != "x$prefix" && \
7161 test -d "$cf_subdir_prefix" && \
7162 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7163 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7164 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7165 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7166 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7167 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7168 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7173 test "$includedir" != NONE && \
7174 test "$includedir" != "/usr/include" && \
7175 test -d "$includedir" && {
7176 test -d $includedir && cf_search="$cf_search $includedir"
7177 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7180 test "$oldincludedir" != NONE && \
7181 test "$oldincludedir" != "/usr/include" && \
7182 test -d "$oldincludedir" && {
7183 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7184 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7187 cf_search="$cf_search $cf_header_path_list"
7189 for cf_cv_header_path_utf8 in $cf_search
7191 if test -d $cf_cv_header_path_utf8 ; then
7192 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7194 echo "${as_me:-configure}:7194: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7196 CPPFLAGS="$cf_save_CPPFLAGS"
7198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7199 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7201 cat >conftest.$ac_ext <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7205 #include <libutf8.h>
7214 rm -f conftest.$ac_objext
7215 if { (eval echo "$as_me:7215: \"$ac_compile\"") >&5
7216 (eval $ac_compile) 2>&5
7218 echo "$as_me:7218: \$? = $ac_status" >&5
7219 (exit $ac_status); } &&
7220 { ac_try='test -s conftest.$ac_objext'
7221 { (eval echo "$as_me:7221: \"$ac_try\"") >&5
7224 echo "$as_me:7224: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7227 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7229 echo "${as_me:-configure}:7229: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7231 cf_cv_find_linkage_utf8=maybe
7232 cf_test_CPPFLAGS="$CPPFLAGS"
7235 echo "$as_me: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7238 CPPFLAGS="$cf_save_CPPFLAGS"
7241 rm -f conftest.$ac_objext conftest.$ac_ext
7245 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7247 echo "${as_me:-configure}:7247: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7249 cf_save_LIBS="$LIBS"
7250 cf_save_LDFLAGS="$LDFLAGS"
7252 if test "$cf_cv_find_linkage_utf8" != yes ; then
7255 cf_library_path_list=""
7256 if test -n "${LDFLAGS}${LIBS}" ; then
7257 for cf_library_path in $LDFLAGS $LIBS
7259 case $cf_library_path in
7261 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7263 test "x$cf_library_path" != "xNONE" && \
7264 test -d "$cf_library_path" && \
7266 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7267 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7268 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7269 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7270 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7271 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7274 cf_library_path_list="$cf_library_path_list $cf_search"
7282 test "x$prefix" != "xNONE" && \
7283 test -d "$prefix" && \
7285 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7286 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7287 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7288 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7289 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7290 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7293 for cf_subdir_prefix in \
7302 test "x$cf_subdir_prefix" != "x$prefix" && \
7303 test -d "$cf_subdir_prefix" && \
7304 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7305 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7306 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7307 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7308 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7309 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7310 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7315 cf_search="$cf_library_path_list $cf_search"
7317 for cf_cv_library_path_utf8 in $cf_search
7319 if test -d $cf_cv_library_path_utf8 ; then
7320 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7322 echo "${as_me:-configure}:7322: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7324 CPPFLAGS="$cf_test_CPPFLAGS"
7325 LIBS="-lutf8 $cf_save_LIBS"
7326 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7327 cat >conftest.$ac_ext <<_ACEOF
7328 #line 7328 "configure"
7329 #include "confdefs.h"
7331 #include <libutf8.h>
7340 rm -f conftest.$ac_objext conftest$ac_exeext
7341 if { (eval echo "$as_me:7341: \"$ac_link\"") >&5
7342 (eval $ac_link) 2>&5
7344 echo "$as_me:7344: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest$ac_exeext'
7347 { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7353 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7355 echo "${as_me:-configure}:7355: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7357 cf_cv_find_linkage_utf8=yes
7358 cf_cv_library_file_utf8="-lutf8"
7361 echo "$as_me: failed program was:" >&5
7362 cat conftest.$ac_ext >&5
7364 CPPFLAGS="$cf_save_CPPFLAGS"
7365 LIBS="$cf_save_LIBS"
7366 LDFLAGS="$cf_save_LDFLAGS"
7369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7372 CPPFLAGS="$cf_save_CPPFLAGS"
7373 LDFLAGS="$cf_save_LDFLAGS"
7377 cf_cv_find_linkage_utf8=no
7381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7386 LIBS="$cf_save_LIBS"
7388 if test "$cf_cv_find_linkage_utf8" = yes ; then
7389 cf_cv_utf8_lib=add-on
7395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7397 echo "$as_me:7397: result: $cf_cv_utf8_lib" >&5
7398 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7400 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7402 if test "$cf_cv_utf8_lib" = "add-on" ; then
7404 cat >>confdefs.h <<\EOF
7405 #define HAVE_LIBUTF8_H 1
7408 if test -n "$cf_cv_header_path_utf8" ; then
7409 for cf_add_incdir in $cf_cv_header_path_utf8
7411 while test $cf_add_incdir != /usr/include
7413 if test -d $cf_add_incdir
7416 if test -n "$CFLAGS$CPPFLAGS" ; then
7417 # a loop is needed to ensure we can add subdirs of existing dirs
7418 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7419 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7420 cf_have_incdir=yes; break
7425 if test "$cf_have_incdir" = no ; then
7426 if test "$cf_add_incdir" = /usr/local/include ; then
7427 if test "$GCC" = yes
7429 cf_save_CPPFLAGS=$CPPFLAGS
7431 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7432 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7434 cat >conftest.$ac_ext <<_ACEOF
7435 #line 7435 "configure"
7436 #include "confdefs.h"
7446 rm -f conftest.$ac_objext
7447 if { (eval echo "$as_me:7447: \"$ac_compile\"") >&5
7448 (eval $ac_compile) 2>&5
7450 echo "$as_me:7450: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:7453: \"$ac_try\"") >&5
7456 echo "$as_me:7456: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7460 echo "$as_me: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7464 rm -f conftest.$ac_objext conftest.$ac_ext
7465 CPPFLAGS=$cf_save_CPPFLAGS
7470 if test "$cf_have_incdir" = no ; then
7471 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7473 echo "${as_me:-configure}:7473: testing adding $cf_add_incdir to include-path ..." 1>&5
7475 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7477 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7478 test "$cf_top_incdir" = "$cf_add_incdir" && break
7479 cf_add_incdir="$cf_top_incdir"
7490 if test -n "$cf_cv_library_path_utf8" ; then
7491 for cf_add_libdir in $cf_cv_library_path_utf8
7493 if test $cf_add_libdir = /usr/lib ; then
7495 elif test -d $cf_add_libdir
7498 if test -n "$LDFLAGS$LIBS" ; then
7499 # a loop is needed to ensure we can add subdirs of existing dirs
7500 for cf_test_libdir in $LDFLAGS $LIBS ; do
7501 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7502 cf_have_libdir=yes; break
7506 if test "$cf_have_libdir" = no ; then
7507 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7509 echo "${as_me:-configure}:7509: testing adding $cf_add_libdir to library-path ..." 1>&5
7511 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7520 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7522 for cf_add_1lib in $cf_add_0lib; do
7523 for cf_add_2lib in $cf_add_libs; do
7524 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7529 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7535 cf_ncuconfig_root=$cf_cv_screen
7536 cf_have_ncuconfig=no
7538 if test "x${PKG_CONFIG:=none}" != xnone; then
7539 echo "$as_me:7539: checking pkg-config for $cf_ncuconfig_root" >&5
7540 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7541 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7542 echo "$as_me:7542: result: yes" >&5
7543 echo "${ECHO_T}yes" >&6
7545 echo "$as_me:7545: checking if the $cf_ncuconfig_root package files work" >&5
7546 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7547 cf_have_ncuconfig=unknown
7549 cf_save_CFLAGS="$CFLAGS"
7550 cf_save_CPPFLAGS="$CPPFLAGS"
7551 cf_save_LIBS="$LIBS"
7553 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
7554 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
7556 # while -W for passing linker flags is prevalent, it is not "standard".
7557 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7558 # incompatible _and_ non-standard -W option which gives an error. Work
7559 # around that pitfall.
7560 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7566 cf_new_extra_cppflags=
7568 for cf_add_cflags in $cf_pkg_cflags
7570 case $cf_fix_cppflags in
7572 case $cf_add_cflags in
7573 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7574 case $cf_add_cflags in
7576 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7579 && test -z "${cf_tst_cflags}" \
7580 && cf_fix_cppflags=yes
7582 if test $cf_fix_cppflags = yes ; then
7584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7588 elif test "${cf_tst_cflags}" = "\"'" ; then
7590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7601 case $cf_add_cflags in
7603 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7605 CPPFLAGS=`echo "$CPPFLAGS" | \
7606 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7607 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7612 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7613 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7620 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7621 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7631 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7633 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7634 && test -z "${cf_tst_cflags}" \
7635 && cf_fix_cppflags=no
7640 if test -n "$cf_new_cflags" ; then
7642 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7643 CFLAGS="${CFLAGS}$cf_new_cflags"
7647 if test -n "$cf_new_cppflags" ; then
7649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7650 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7654 if test -n "$cf_new_extra_cppflags" ; then
7656 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7657 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7664 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7666 for cf_add_1lib in $cf_add_0lib; do
7667 for cf_add_2lib in $cf_add_libs; do
7668 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7673 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7677 cat >conftest.$ac_ext <<_ACEOF
7678 #line 7678 "configure"
7679 #include "confdefs.h"
7680 #include <${cf_cv_ncurses_header:-curses.h}>
7684 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7689 rm -f conftest.$ac_objext conftest$ac_exeext
7690 if { (eval echo "$as_me:7690: \"$ac_link\"") >&5
7691 (eval $ac_link) 2>&5
7693 echo "$as_me:7693: \$? = $ac_status" >&5
7694 (exit $ac_status); } &&
7695 { ac_try='test -s conftest$ac_exeext'
7696 { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7699 echo "$as_me:7699: \$? = $ac_status" >&5
7700 (exit $ac_status); }; }; then
7701 if test "$cross_compiling" = yes; then
7702 cf_test_ncuconfig=maybe
7704 cat >conftest.$ac_ext <<_ACEOF
7705 #line 7705 "configure"
7706 #include "confdefs.h"
7707 #include <${cf_cv_ncurses_header:-curses.h}>
7709 { char *xx = curses_version(); return (xx == 0); }
7711 rm -f conftest$ac_exeext
7712 if { (eval echo "$as_me:7712: \"$ac_link\"") >&5
7713 (eval $ac_link) 2>&5
7715 echo "$as_me:7715: \$? = $ac_status" >&5
7716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7717 { (eval echo "$as_me:7717: \"$ac_try\"") >&5
7720 echo "$as_me:7720: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 cf_test_ncuconfig=yes
7724 echo "$as_me: program exited with status $ac_status" >&5
7725 echo "$as_me: failed program was:" >&5
7726 cat conftest.$ac_ext >&5
7727 cf_test_ncuconfig=no
7729 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7732 echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 cf_test_ncuconfig=no
7736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7738 CFLAGS="$cf_save_CFLAGS"
7739 CPPFLAGS="$cf_save_CPPFLAGS"
7740 LIBS="$cf_save_LIBS"
7742 if test "x$cf_test_ncuconfig" != xyes; then
7743 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7744 cf_pkg_cflags="$cf_temp"
7745 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7746 cf_pkg_libs="$cf_temp"
7754 cf_new_extra_cppflags=
7756 for cf_add_cflags in $cf_pkg_cflags
7758 case $cf_fix_cppflags in
7760 case $cf_add_cflags in
7761 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7762 case $cf_add_cflags in
7764 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7767 && test -z "${cf_tst_cflags}" \
7768 && cf_fix_cppflags=yes
7770 if test $cf_fix_cppflags = yes ; then
7772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7776 elif test "${cf_tst_cflags}" = "\"'" ; then
7778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7789 case $cf_add_cflags in
7791 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7793 CPPFLAGS=`echo "$CPPFLAGS" | \
7794 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7795 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7800 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7801 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7808 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7809 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7819 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7822 && test -z "${cf_tst_cflags}" \
7823 && cf_fix_cppflags=no
7828 if test -n "$cf_new_cflags" ; then
7830 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7831 CFLAGS="${CFLAGS}$cf_new_cflags"
7835 if test -n "$cf_new_cppflags" ; then
7837 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7838 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7842 if test -n "$cf_new_extra_cppflags" ; then
7844 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7845 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7852 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7854 for cf_add_1lib in $cf_add_0lib; do
7855 for cf_add_2lib in $cf_add_libs; do
7856 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7865 cat >conftest.$ac_ext <<_ACEOF
7866 #line 7866 "configure"
7867 #include "confdefs.h"
7868 #include <${cf_cv_ncurses_header:-curses.h}>
7872 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7877 rm -f conftest.$ac_objext conftest$ac_exeext
7878 if { (eval echo "$as_me:7878: \"$ac_link\"") >&5
7879 (eval $ac_link) 2>&5
7881 echo "$as_me:7881: \$? = $ac_status" >&5
7882 (exit $ac_status); } &&
7883 { ac_try='test -s conftest$ac_exeext'
7884 { (eval echo "$as_me:7884: \"$ac_try\"") >&5
7887 echo "$as_me:7887: \$? = $ac_status" >&5
7888 (exit $ac_status); }; }; then
7889 if test "$cross_compiling" = yes; then
7890 cf_have_ncuconfig=maybe
7892 cat >conftest.$ac_ext <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7895 #include <${cf_cv_ncurses_header:-curses.h}>
7897 { char *xx = curses_version(); return (xx == 0); }
7899 rm -f conftest$ac_exeext
7900 if { (eval echo "$as_me:7900: \"$ac_link\"") >&5
7901 (eval $ac_link) 2>&5
7903 echo "$as_me:7903: \$? = $ac_status" >&5
7904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7905 { (eval echo "$as_me:7905: \"$ac_try\"") >&5
7908 echo "$as_me:7908: \$? = $ac_status" >&5
7909 (exit $ac_status); }; }; then
7910 cf_have_ncuconfig=yes
7912 echo "$as_me: program exited with status $ac_status" >&5
7913 echo "$as_me: failed program was:" >&5
7914 cat conftest.$ac_ext >&5
7915 cf_have_ncuconfig=no
7917 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7920 echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 cf_have_ncuconfig=no
7924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7925 echo "$as_me:7925: result: $cf_have_ncuconfig" >&5
7926 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7927 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7928 if test "$cf_have_ncuconfig" != "yes"
7930 CPPFLAGS="$cf_save_CPPFLAGS"
7931 LIBS="$cf_save_LIBS"
7932 NCURSES_CONFIG_PKG=none
7935 cat >>confdefs.h <<\EOF
7939 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7941 echo "$as_me:7941: checking for terminfo header" >&5
7942 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7943 if test "${cf_cv_term_header+set}" = set; then
7944 echo $ECHO_N "(cached) $ECHO_C" >&6
7947 case ${cf_cv_ncurses_header} in
7948 (*/ncurses.h|*/ncursesw.h)
7949 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7952 cf_term_header=term.h
7956 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7958 cat >conftest.$ac_ext <<_ACEOF
7959 #line 7959 "configure"
7960 #include "confdefs.h"
7962 #include <${cf_cv_ncurses_header:-curses.h}>
7968 int x = auto_left_margin
7973 rm -f conftest.$ac_objext
7974 if { (eval echo "$as_me:7974: \"$ac_compile\"") >&5
7975 (eval $ac_compile) 2>&5
7977 echo "$as_me:7977: \$? = $ac_status" >&5
7978 (exit $ac_status); } &&
7979 { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:7980: \"$ac_try\"") >&5
7983 echo "$as_me:7983: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7986 cf_cv_term_header="$cf_test"
7988 echo "$as_me: failed program was:" >&5
7989 cat conftest.$ac_ext >&5
7991 cf_cv_term_header=unknown
7994 rm -f conftest.$ac_objext conftest.$ac_ext
7995 test "$cf_cv_term_header" != unknown && break
7999 echo "$as_me:7999: result: $cf_cv_term_header" >&5
8000 echo "${ECHO_T}$cf_cv_term_header" >&6
8002 # Set definitions to allow ifdef'ing to accommodate subdirectories
8004 case $cf_cv_term_header in
8007 cat >>confdefs.h <<\EOF
8008 #define HAVE_TERM_H 1
8014 case $cf_cv_term_header in
8017 cat >>confdefs.h <<\EOF
8018 #define HAVE_NCURSES_TERM_H 1
8024 cat >>confdefs.h <<\EOF
8025 #define HAVE_NCURSESW_TERM_H 1
8034 echo "$as_me:8034: result: no" >&5
8035 echo "${ECHO_T}no" >&6
8036 NCURSES_CONFIG_PKG=none
8039 NCURSES_CONFIG_PKG=none
8042 if test "x$cf_have_ncuconfig" = "xno"; then
8043 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8045 if test -n "$ac_tool_prefix"; then
8046 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8048 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8049 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8050 echo "$as_me:8050: checking for $ac_word" >&5
8051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8052 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8053 echo $ECHO_N "(cached) $ECHO_C" >&6
8055 if test -n "$NCURSES_CONFIG"; then
8056 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8058 ac_save_IFS=$IFS; IFS=$ac_path_separator
8060 for ac_dir in $ac_dummy; do
8062 test -z "$ac_dir" && ac_dir=.
8063 $as_executable_p "$ac_dir/$ac_word" || continue
8064 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8065 echo "$as_me:8065: found $ac_dir/$ac_word" >&5
8071 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8072 if test -n "$NCURSES_CONFIG"; then
8073 echo "$as_me:8073: result: $NCURSES_CONFIG" >&5
8074 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8076 echo "$as_me:8076: result: no" >&5
8077 echo "${ECHO_T}no" >&6
8080 test -n "$NCURSES_CONFIG" && break
8083 if test -z "$NCURSES_CONFIG"; then
8084 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8085 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8087 # Extract the first word of "$ac_prog", so it can be a program name with args.
8088 set dummy $ac_prog; ac_word=$2
8089 echo "$as_me:8089: checking for $ac_word" >&5
8090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8091 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8092 echo $ECHO_N "(cached) $ECHO_C" >&6
8094 if test -n "$ac_ct_NCURSES_CONFIG"; then
8095 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8097 ac_save_IFS=$IFS; IFS=$ac_path_separator
8099 for ac_dir in $ac_dummy; do
8101 test -z "$ac_dir" && ac_dir=.
8102 $as_executable_p "$ac_dir/$ac_word" || continue
8103 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8104 echo "$as_me:8104: found $ac_dir/$ac_word" >&5
8110 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8111 if test -n "$ac_ct_NCURSES_CONFIG"; then
8112 echo "$as_me:8112: result: $ac_ct_NCURSES_CONFIG" >&5
8113 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8115 echo "$as_me:8115: result: no" >&5
8116 echo "${ECHO_T}no" >&6
8119 test -n "$ac_ct_NCURSES_CONFIG" && break
8121 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8123 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8126 if test "$NCURSES_CONFIG" != none ; then
8131 cf_new_extra_cppflags=
8133 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8135 case $cf_fix_cppflags in
8137 case $cf_add_cflags in
8138 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8139 case $cf_add_cflags in
8141 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8143 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8144 && test -z "${cf_tst_cflags}" \
8145 && cf_fix_cppflags=yes
8147 if test $cf_fix_cppflags = yes ; then
8149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8153 elif test "${cf_tst_cflags}" = "\"'" ; then
8155 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8156 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8166 case $cf_add_cflags in
8168 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8170 CPPFLAGS=`echo "$CPPFLAGS" | \
8171 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8172 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8177 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8178 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8185 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8186 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8196 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8198 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8199 && test -z "${cf_tst_cflags}" \
8200 && cf_fix_cppflags=no
8205 if test -n "$cf_new_cflags" ; then
8207 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8208 CFLAGS="${CFLAGS}$cf_new_cflags"
8212 if test -n "$cf_new_cppflags" ; then
8214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8215 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8219 if test -n "$cf_new_extra_cppflags" ; then
8221 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8222 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8229 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8231 for cf_add_1lib in $cf_add_0lib; do
8232 for cf_add_2lib in $cf_add_libs; do
8233 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8238 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8242 # even with config script, some packages use no-override for curses.h
8244 echo "$as_me:8244: checking if we have identified curses headers" >&5
8245 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8246 if test "${cf_cv_ncurses_header+set}" = set; then
8247 echo $ECHO_N "(cached) $ECHO_C" >&6
8250 cf_cv_ncurses_header=none
8252 ncurses.h $cf_cv_screen/ncurses.h \
8253 curses.h $cf_cv_screen/curses.h
8255 cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <${cf_header}>
8262 initscr(); tgoto("?", 0,0)
8267 rm -f conftest.$ac_objext
8268 if { (eval echo "$as_me:8268: \"$ac_compile\"") >&5
8269 (eval $ac_compile) 2>&5
8271 echo "$as_me:8271: \$? = $ac_status" >&5
8272 (exit $ac_status); } &&
8273 { ac_try='test -s conftest.$ac_objext'
8274 { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit $ac_status); }; }; then
8279 cf_cv_ncurses_header=$cf_header; break
8281 echo "$as_me: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8284 rm -f conftest.$ac_objext conftest.$ac_ext
8288 echo "$as_me:8288: result: $cf_cv_ncurses_header" >&5
8289 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8291 if test "$cf_cv_ncurses_header" = none ; then
8292 { { echo "$as_me:8292: error: No curses header-files found" >&5
8293 echo "$as_me: error: No curses header-files found" >&2;}
8294 { (exit 1); exit 1; }; }
8297 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8299 for ac_header in $cf_cv_ncurses_header
8301 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8302 echo "$as_me:8302: checking for $ac_header" >&5
8303 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8305 echo $ECHO_N "(cached) $ECHO_C" >&6
8307 cat >conftest.$ac_ext <<_ACEOF
8308 #line 8308 "configure"
8309 #include "confdefs.h"
8310 #include <$ac_header>
8312 if { (eval echo "$as_me:8312: \"$ac_cpp conftest.$ac_ext\"") >&5
8313 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8315 egrep -v '^ *\+' conftest.er1 >conftest.err
8317 cat conftest.err >&5
8318 echo "$as_me:8318: \$? = $ac_status" >&5
8319 (exit $ac_status); } >/dev/null; then
8320 if test -s conftest.err; then
8321 ac_cpp_err=$ac_c_preproc_warn_flag
8328 if test -z "$ac_cpp_err"; then
8329 eval "$as_ac_Header=yes"
8331 echo "$as_me: failed program was:" >&5
8332 cat conftest.$ac_ext >&5
8333 eval "$as_ac_Header=no"
8335 rm -f conftest.err conftest.$ac_ext
8337 echo "$as_me:8337: result: `eval echo '${'$as_ac_Header'}'`" >&5
8338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8340 cat >>confdefs.h <<EOF
8341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8347 cat >>confdefs.h <<\EOF
8351 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8353 cat >>confdefs.h <<EOF
8354 #define $cf_nculib_ROOT 1
8357 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8361 cf_ncuhdr_root=$cf_cv_screen
8363 test -n "$cf_cv_curses_dir" && \
8364 test "$cf_cv_curses_dir" != "no" && { \
8366 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8367 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8369 while test $cf_add_incdir != /usr/include
8371 if test -d $cf_add_incdir
8374 if test -n "$CFLAGS$CPPFLAGS" ; then
8375 # a loop is needed to ensure we can add subdirs of existing dirs
8376 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8377 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8378 cf_have_incdir=yes; break
8383 if test "$cf_have_incdir" = no ; then
8384 if test "$cf_add_incdir" = /usr/local/include ; then
8385 if test "$GCC" = yes
8387 cf_save_CPPFLAGS=$CPPFLAGS
8389 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8390 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8392 cat >conftest.$ac_ext <<_ACEOF
8393 #line 8393 "configure"
8394 #include "confdefs.h"
8404 rm -f conftest.$ac_objext
8405 if { (eval echo "$as_me:8405: \"$ac_compile\"") >&5
8406 (eval $ac_compile) 2>&5
8408 echo "$as_me:8408: \$? = $ac_status" >&5
8409 (exit $ac_status); } &&
8410 { ac_try='test -s conftest.$ac_objext'
8411 { (eval echo "$as_me:8411: \"$ac_try\"") >&5
8414 echo "$as_me:8414: \$? = $ac_status" >&5
8415 (exit $ac_status); }; }; then
8418 echo "$as_me: failed program was:" >&5
8419 cat conftest.$ac_ext >&5
8422 rm -f conftest.$ac_objext conftest.$ac_ext
8423 CPPFLAGS=$cf_save_CPPFLAGS
8428 if test "$cf_have_incdir" = no ; then
8429 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8431 echo "${as_me:-configure}:8431: testing adding $cf_add_incdir to include-path ..." 1>&5
8433 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8435 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8436 test "$cf_top_incdir" = "$cf_add_incdir" && break
8437 cf_add_incdir="$cf_top_incdir"
8450 echo "$as_me:8450: checking for $cf_ncuhdr_root header in include-path" >&5
8451 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8452 if test "${cf_cv_ncurses_h+set}" = set; then
8453 echo $ECHO_N "(cached) $ECHO_C" >&6
8456 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8457 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8458 for cf_header in $cf_header_list
8461 cat >conftest.$ac_ext <<_ACEOF
8462 #line 8462 "configure"
8463 #include "confdefs.h"
8465 #include <$cf_header>
8470 #ifdef NCURSES_VERSION
8472 printf("%s\n", NCURSES_VERSION);
8485 rm -f conftest.$ac_objext
8486 if { (eval echo "$as_me:8486: \"$ac_compile\"") >&5
8487 (eval $ac_compile) 2>&5
8489 echo "$as_me:8489: \$? = $ac_status" >&5
8490 (exit $ac_status); } &&
8491 { ac_try='test -s conftest.$ac_objext'
8492 { (eval echo "$as_me:8492: \"$ac_try\"") >&5
8495 echo "$as_me:8495: \$? = $ac_status" >&5
8496 (exit $ac_status); }; }; then
8497 cf_cv_ncurses_h=$cf_header
8500 echo "$as_me: failed program was:" >&5
8501 cat conftest.$ac_ext >&5
8504 rm -f conftest.$ac_objext conftest.$ac_ext
8506 test "$cf_cv_ncurses_h" != no && break
8510 echo "$as_me:8510: result: $cf_cv_ncurses_h" >&5
8511 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8513 if test "$cf_cv_ncurses_h" != no ; then
8514 cf_cv_ncurses_header=$cf_cv_ncurses_h
8517 echo "$as_me:8517: checking for $cf_ncuhdr_root include-path" >&5
8518 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8519 if test "${cf_cv_ncurses_h2+set}" = set; then
8520 echo $ECHO_N "(cached) $ECHO_C" >&6
8523 test -n "$verbose" && echo
8527 # collect the current set of include-directories from compiler flags
8528 cf_header_path_list=""
8529 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8530 for cf_header_path in $CPPFLAGS $CFLAGS
8532 case $cf_header_path in
8534 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8536 test "x$cf_header_path" != "xNONE" && \
8537 test -d "$cf_header_path" && \
8539 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8540 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8541 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8542 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8543 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8544 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"
8547 cf_header_path_list="$cf_header_path_list $cf_search"
8553 # add the variations for the package we are looking for
8557 test "x$prefix" != "xNONE" && \
8558 test -d "$prefix" && \
8560 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8561 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8562 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8563 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8564 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8565 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8568 for cf_subdir_prefix in \
8577 test "x$cf_subdir_prefix" != "x$prefix" && \
8578 test -d "$cf_subdir_prefix" && \
8579 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8580 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8581 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8582 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8583 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8584 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8585 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8590 test "$includedir" != NONE && \
8591 test "$includedir" != "/usr/include" && \
8592 test -d "$includedir" && {
8593 test -d $includedir && cf_search="$cf_search $includedir"
8594 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8597 test "$oldincludedir" != NONE && \
8598 test "$oldincludedir" != "/usr/include" && \
8599 test -d "$oldincludedir" && {
8600 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8601 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8604 cf_search="$cf_search $cf_header_path_list"
8606 test -n "$verbose" && echo search path $cf_search
8607 cf_save2_CPPFLAGS="$CPPFLAGS"
8608 for cf_incdir in $cf_search
8611 if test -n "$cf_incdir" ; then
8612 for cf_add_incdir in $cf_incdir
8614 while test $cf_add_incdir != /usr/include
8616 if test -d $cf_add_incdir
8619 if test -n "$CFLAGS$CPPFLAGS" ; then
8620 # a loop is needed to ensure we can add subdirs of existing dirs
8621 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8622 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8623 cf_have_incdir=yes; break
8628 if test "$cf_have_incdir" = no ; then
8629 if test "$cf_add_incdir" = /usr/local/include ; then
8630 if test "$GCC" = yes
8632 cf_save_CPPFLAGS=$CPPFLAGS
8634 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8635 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"
8698 cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8702 #include <$cf_header>
8707 #ifdef NCURSES_VERSION
8709 printf("%s\n", NCURSES_VERSION);
8722 rm -f conftest.$ac_objext
8723 if { (eval echo "$as_me:8723: \"$ac_compile\"") >&5
8724 (eval $ac_compile) 2>&5
8726 echo "$as_me:8726: \$? = $ac_status" >&5
8727 (exit $ac_status); } &&
8728 { ac_try='test -s conftest.$ac_objext'
8729 { (eval echo "$as_me:8729: \"$ac_try\"") >&5
8732 echo "$as_me:8732: \$? = $ac_status" >&5
8733 (exit $ac_status); }; }; then
8734 cf_cv_ncurses_h2=$cf_header
8737 echo "$as_me: failed program was:" >&5
8738 cat conftest.$ac_ext >&5
8741 rm -f conftest.$ac_objext conftest.$ac_ext
8743 if test "$cf_cv_ncurses_h2" != no ; then
8744 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8745 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8748 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8750 CPPFLAGS="$cf_save2_CPPFLAGS"
8751 test "$cf_cv_ncurses_h2" != no && break
8753 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8753: error: not found" >&5
8754 echo "$as_me: error: not found" >&2;}
8755 { (exit 1); exit 1; }; }
8758 echo "$as_me:8758: result: $cf_cv_ncurses_h2" >&5
8759 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8761 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8762 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8763 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8764 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8767 if test -n "$cf_1st_incdir" ; then
8768 for cf_add_incdir in $cf_1st_incdir
8770 while test $cf_add_incdir != /usr/include
8772 if test -d $cf_add_incdir
8775 if test -n "$CFLAGS$CPPFLAGS" ; then
8776 # a loop is needed to ensure we can add subdirs of existing dirs
8777 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8778 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8779 cf_have_incdir=yes; break
8784 if test "$cf_have_incdir" = no ; then
8785 if test "$cf_add_incdir" = /usr/local/include ; then
8786 if test "$GCC" = yes
8788 cf_save_CPPFLAGS=$CPPFLAGS
8790 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8791 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8793 cat >conftest.$ac_ext <<_ACEOF
8794 #line 8794 "configure"
8795 #include "confdefs.h"
8805 rm -f conftest.$ac_objext
8806 if { (eval echo "$as_me:8806: \"$ac_compile\"") >&5
8807 (eval $ac_compile) 2>&5
8809 echo "$as_me:8809: \$? = $ac_status" >&5
8810 (exit $ac_status); } &&
8811 { ac_try='test -s conftest.$ac_objext'
8812 { (eval echo "$as_me:8812: \"$ac_try\"") >&5
8815 echo "$as_me:8815: \$? = $ac_status" >&5
8816 (exit $ac_status); }; }; then
8819 echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8823 rm -f conftest.$ac_objext conftest.$ac_ext
8824 CPPFLAGS=$cf_save_CPPFLAGS
8829 if test "$cf_have_incdir" = no ; then
8830 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8832 echo "${as_me:-configure}:8832: testing adding $cf_add_incdir to include-path ..." 1>&5
8834 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8836 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8837 test "$cf_top_incdir" = "$cf_add_incdir" && break
8838 cf_add_incdir="$cf_top_incdir"
8851 # Set definitions to allow ifdef'ing for ncurses.h
8853 case $cf_cv_ncurses_header in
8856 cat >>confdefs.h <<\EOF
8857 #define HAVE_NCURSES_H 1
8863 case $cf_cv_ncurses_header in
8864 (ncurses/curses.h|ncurses/ncurses.h)
8866 cat >>confdefs.h <<\EOF
8867 #define HAVE_NCURSES_NCURSES_H 1
8871 (ncursesw/curses.h|ncursesw/ncurses.h)
8873 cat >>confdefs.h <<\EOF
8874 #define HAVE_NCURSESW_NCURSES_H 1
8880 echo "$as_me:8880: checking for terminfo header" >&5
8881 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8882 if test "${cf_cv_term_header+set}" = set; then
8883 echo $ECHO_N "(cached) $ECHO_C" >&6
8886 case ${cf_cv_ncurses_header} in
8887 (*/ncurses.h|*/ncursesw.h)
8888 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8891 cf_term_header=term.h
8895 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8897 cat >conftest.$ac_ext <<_ACEOF
8898 #line 8898 "configure"
8899 #include "confdefs.h"
8901 #include <${cf_cv_ncurses_header:-curses.h}>
8907 int x = auto_left_margin
8912 rm -f conftest.$ac_objext
8913 if { (eval echo "$as_me:8913: \"$ac_compile\"") >&5
8914 (eval $ac_compile) 2>&5
8916 echo "$as_me:8916: \$? = $ac_status" >&5
8917 (exit $ac_status); } &&
8918 { ac_try='test -s conftest.$ac_objext'
8919 { (eval echo "$as_me:8919: \"$ac_try\"") >&5
8922 echo "$as_me:8922: \$? = $ac_status" >&5
8923 (exit $ac_status); }; }; then
8925 cf_cv_term_header="$cf_test"
8927 echo "$as_me: failed program was:" >&5
8928 cat conftest.$ac_ext >&5
8930 cf_cv_term_header=unknown
8933 rm -f conftest.$ac_objext conftest.$ac_ext
8934 test "$cf_cv_term_header" != unknown && break
8938 echo "$as_me:8938: result: $cf_cv_term_header" >&5
8939 echo "${ECHO_T}$cf_cv_term_header" >&6
8941 # Set definitions to allow ifdef'ing to accommodate subdirectories
8943 case $cf_cv_term_header in
8946 cat >>confdefs.h <<\EOF
8947 #define HAVE_TERM_H 1
8953 case $cf_cv_term_header in
8956 cat >>confdefs.h <<\EOF
8957 #define HAVE_NCURSES_TERM_H 1
8963 cat >>confdefs.h <<\EOF
8964 #define HAVE_NCURSESW_TERM_H 1
8970 # some applications need this, but should check for NCURSES_VERSION
8972 cat >>confdefs.h <<\EOF
8976 echo "$as_me:8976: checking for ncurses version" >&5
8977 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8978 if test "${cf_cv_ncurses_version+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
8982 cf_cv_ncurses_version=no
8985 if test "$cross_compiling" = yes; then
8987 # This will not work if the preprocessor splits the line after the
8988 # Autoconf token. The 'unproto' program does that.
8989 cat > conftest.$ac_ext <<EOF
8990 #include <${cf_cv_ncurses_header:-curses.h}>
8992 #ifdef NCURSES_VERSION
8993 Autoconf NCURSES_VERSION
9001 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9002 { (eval echo "$as_me:9002: \"$cf_try\"") >&5
9005 echo "$as_me:9005: \$? = $ac_status" >&5
9006 (exit $ac_status); }
9007 if test -f conftest.out ; then
9008 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9009 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9014 cat >conftest.$ac_ext <<_ACEOF
9015 #line 9015 "configure"
9016 #include "confdefs.h"
9018 #include <${cf_cv_ncurses_header:-curses.h}>
9022 FILE *fp = fopen("$cf_tempfile", "w");
9023 #ifdef NCURSES_VERSION
9024 # ifdef NCURSES_VERSION_PATCH
9025 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9027 fprintf(fp, "%s\n", NCURSES_VERSION);
9031 fprintf(fp, "old\n");
9036 ${cf_cv_main_return:-return}(0);
9039 rm -f conftest$ac_exeext
9040 if { (eval echo "$as_me:9040: \"$ac_link\"") >&5
9041 (eval $ac_link) 2>&5
9043 echo "$as_me:9043: \$? = $ac_status" >&5
9044 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9045 { (eval echo "$as_me:9045: \"$ac_try\"") >&5
9048 echo "$as_me:9048: \$? = $ac_status" >&5
9049 (exit $ac_status); }; }; then
9051 cf_cv_ncurses_version=`cat $cf_tempfile`
9053 echo "$as_me: program exited with status $ac_status" >&5
9054 echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9057 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9062 echo "$as_me:9062: result: $cf_cv_ncurses_version" >&5
9063 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9064 test "$cf_cv_ncurses_version" = no ||
9065 cat >>confdefs.h <<\EOF
9069 cf_nculib_root=$cf_cv_screen
9070 # This works, except for the special case where we find gpm, but
9071 # ncurses is in a nonstandard location via $LIBS, and we really want
9074 cf_ncurses_SAVE="$LIBS"
9075 echo "$as_me:9075: checking for Gpm_Open in -lgpm" >&5
9076 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9077 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
9080 ac_check_lib_save_LIBS=$LIBS
9082 cat >conftest.$ac_ext <<_ACEOF
9083 #line 9083 "configure"
9084 #include "confdefs.h"
9086 /* Override any gcc2 internal prototype to avoid an error. */
9090 /* We use char because int might match the return type of a gcc2
9091 builtin and then its argument prototype would still apply. */
9101 rm -f conftest.$ac_objext conftest$ac_exeext
9102 if { (eval echo "$as_me:9102: \"$ac_link\"") >&5
9103 (eval $ac_link) 2>&5
9105 echo "$as_me:9105: \$? = $ac_status" >&5
9106 (exit $ac_status); } &&
9107 { ac_try='test -s conftest$ac_exeext'
9108 { (eval echo "$as_me:9108: \"$ac_try\"") >&5
9111 echo "$as_me:9111: \$? = $ac_status" >&5
9112 (exit $ac_status); }; }; then
9113 ac_cv_lib_gpm_Gpm_Open=yes
9115 echo "$as_me: failed program was:" >&5
9116 cat conftest.$ac_ext >&5
9117 ac_cv_lib_gpm_Gpm_Open=no
9119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9120 LIBS=$ac_check_lib_save_LIBS
9122 echo "$as_me:9122: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9123 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9124 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9125 echo "$as_me:9125: checking for initscr in -lgpm" >&5
9126 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9127 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9128 echo $ECHO_N "(cached) $ECHO_C" >&6
9130 ac_check_lib_save_LIBS=$LIBS
9132 cat >conftest.$ac_ext <<_ACEOF
9133 #line 9133 "configure"
9134 #include "confdefs.h"
9136 /* Override any gcc2 internal prototype to avoid an error. */
9140 /* We use char because int might match the return type of a gcc2
9141 builtin and then its argument prototype would still apply. */
9151 rm -f conftest.$ac_objext conftest$ac_exeext
9152 if { (eval echo "$as_me:9152: \"$ac_link\"") >&5
9153 (eval $ac_link) 2>&5
9155 echo "$as_me:9155: \$? = $ac_status" >&5
9156 (exit $ac_status); } &&
9157 { ac_try='test -s conftest$ac_exeext'
9158 { (eval echo "$as_me:9158: \"$ac_try\"") >&5
9161 echo "$as_me:9161: \$? = $ac_status" >&5
9162 (exit $ac_status); }; }; then
9163 ac_cv_lib_gpm_initscr=yes
9165 echo "$as_me: failed program was:" >&5
9166 cat conftest.$ac_ext >&5
9167 ac_cv_lib_gpm_initscr=no
9169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9170 LIBS=$ac_check_lib_save_LIBS
9172 echo "$as_me:9172: result: $ac_cv_lib_gpm_initscr" >&5
9173 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9174 if test $ac_cv_lib_gpm_initscr = yes; then
9175 LIBS="$cf_ncurses_SAVE"
9177 cf_ncurses_LIBS="-lgpm"
9184 # This is only necessary if you are linking against an obsolete
9185 # version of ncurses (but it should do no harm, since it's static).
9186 if test "$cf_nculib_root" = ncurses ; then
9187 echo "$as_me:9187: checking for tgoto in -lmytinfo" >&5
9188 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9189 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9190 echo $ECHO_N "(cached) $ECHO_C" >&6
9192 ac_check_lib_save_LIBS=$LIBS
9193 LIBS="-lmytinfo $LIBS"
9194 cat >conftest.$ac_ext <<_ACEOF
9195 #line 9195 "configure"
9196 #include "confdefs.h"
9198 /* Override any gcc2 internal prototype to avoid an error. */
9202 /* We use char because int might match the return type of a gcc2
9203 builtin and then its argument prototype would still apply. */
9213 rm -f conftest.$ac_objext conftest$ac_exeext
9214 if { (eval echo "$as_me:9214: \"$ac_link\"") >&5
9215 (eval $ac_link) 2>&5
9217 echo "$as_me:9217: \$? = $ac_status" >&5
9218 (exit $ac_status); } &&
9219 { ac_try='test -s conftest$ac_exeext'
9220 { (eval echo "$as_me:9220: \"$ac_try\"") >&5
9223 echo "$as_me:9223: \$? = $ac_status" >&5
9224 (exit $ac_status); }; }; then
9225 ac_cv_lib_mytinfo_tgoto=yes
9227 echo "$as_me: failed program was:" >&5
9228 cat conftest.$ac_ext >&5
9229 ac_cv_lib_mytinfo_tgoto=no
9231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9232 LIBS=$ac_check_lib_save_LIBS
9234 echo "$as_me:9234: result: $ac_cv_lib_mytinfo_tgoto" >&5
9235 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9236 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9237 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9247 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9249 for cf_add_1lib in $cf_add_0lib; do
9250 for cf_add_2lib in $cf_add_libs; do
9251 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9256 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9260 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9266 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9268 for cf_add_1lib in $cf_add_0lib; do
9269 for cf_add_2lib in $cf_add_libs; do
9270 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9275 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9281 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9283 echo "$as_me:9283: checking for initscr" >&5
9284 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9285 if test "${ac_cv_func_initscr+set}" = set; then
9286 echo $ECHO_N "(cached) $ECHO_C" >&6
9288 cat >conftest.$ac_ext <<_ACEOF
9289 #line 9289 "configure"
9290 #include "confdefs.h"
9291 #define initscr autoconf_temporary
9292 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9299 /* We use char because int might match the return type of a gcc2
9300 builtin and then its argument prototype would still apply. */
9301 char initscr (void);
9307 /* The GNU C library defines stubs for functions which it implements
9308 to always fail with ENOSYS. Some functions are actually named
9309 something starting with __ and the normal name is an alias. */
9310 #if defined (__stub_initscr) || defined (__stub___initscr)
9311 #error found stub for initscr
9319 rm -f conftest.$ac_objext conftest$ac_exeext
9320 if { (eval echo "$as_me:9320: \"$ac_link\"") >&5
9321 (eval $ac_link) 2>&5
9323 echo "$as_me:9323: \$? = $ac_status" >&5
9324 (exit $ac_status); } &&
9325 { ac_try='test -s conftest$ac_exeext'
9326 { (eval echo "$as_me:9326: \"$ac_try\"") >&5
9329 echo "$as_me:9329: \$? = $ac_status" >&5
9330 (exit $ac_status); }; }; then
9331 ac_cv_func_initscr=yes
9333 echo "$as_me: failed program was:" >&5
9334 cat conftest.$ac_ext >&5
9335 ac_cv_func_initscr=no
9337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9339 echo "$as_me:9339: result: $ac_cv_func_initscr" >&5
9340 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9341 if test $ac_cv_func_initscr = yes; then
9342 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9345 cf_save_LIBS="$LIBS"
9346 echo "$as_me:9346: checking for initscr in -l$cf_nculib_root" >&5
9347 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9348 LIBS="-l$cf_nculib_root $LIBS"
9349 cat >conftest.$ac_ext <<_ACEOF
9350 #line 9350 "configure"
9351 #include "confdefs.h"
9352 #include <${cf_cv_ncurses_header:-curses.h}>
9361 rm -f conftest.$ac_objext conftest$ac_exeext
9362 if { (eval echo "$as_me:9362: \"$ac_link\"") >&5
9363 (eval $ac_link) 2>&5
9365 echo "$as_me:9365: \$? = $ac_status" >&5
9366 (exit $ac_status); } &&
9367 { ac_try='test -s conftest$ac_exeext'
9368 { (eval echo "$as_me:9368: \"$ac_try\"") >&5
9371 echo "$as_me:9371: \$? = $ac_status" >&5
9372 (exit $ac_status); }; }; then
9373 echo "$as_me:9373: result: yes" >&5
9374 echo "${ECHO_T}yes" >&6
9375 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9378 echo "$as_me: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 echo "$as_me:9380: result: no" >&5
9381 echo "${ECHO_T}no" >&6
9384 cf_library_path_list=""
9385 if test -n "${LDFLAGS}${LIBS}" ; then
9386 for cf_library_path in $LDFLAGS $LIBS
9388 case $cf_library_path in
9390 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9392 test "x$cf_library_path" != "xNONE" && \
9393 test -d "$cf_library_path" && \
9395 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9396 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9397 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9398 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9399 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9400 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"
9403 cf_library_path_list="$cf_library_path_list $cf_search"
9411 test "x$prefix" != "xNONE" && \
9412 test -d "$prefix" && \
9414 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9415 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9416 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9417 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9418 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9419 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9422 for cf_subdir_prefix in \
9431 test "x$cf_subdir_prefix" != "x$prefix" && \
9432 test -d "$cf_subdir_prefix" && \
9433 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9434 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9435 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9436 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9437 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9438 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9439 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
9444 cf_search="$cf_library_path_list $cf_search"
9446 for cf_libdir in $cf_search
9448 echo "$as_me:9448: checking for -l$cf_nculib_root in $cf_libdir" >&5
9449 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9450 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9451 cat >conftest.$ac_ext <<_ACEOF
9452 #line 9452 "configure"
9453 #include "confdefs.h"
9454 #include <${cf_cv_ncurses_header:-curses.h}>
9463 rm -f conftest.$ac_objext conftest$ac_exeext
9464 if { (eval echo "$as_me:9464: \"$ac_link\"") >&5
9465 (eval $ac_link) 2>&5
9467 echo "$as_me:9467: \$? = $ac_status" >&5
9468 (exit $ac_status); } &&
9469 { ac_try='test -s conftest$ac_exeext'
9470 { (eval echo "$as_me:9470: \"$ac_try\"") >&5
9473 echo "$as_me:9473: \$? = $ac_status" >&5
9474 (exit $ac_status); }; }; then
9475 echo "$as_me:9475: result: yes" >&5
9476 echo "${ECHO_T}yes" >&6
9477 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9480 echo "$as_me: failed program was:" >&5
9481 cat conftest.$ac_ext >&5
9482 echo "$as_me:9482: result: no" >&5
9483 echo "${ECHO_T}no" >&6
9484 LIBS="$cf_save_LIBS"
9486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9494 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9496 if test $cf_found_library = no ; then
9497 { { echo "$as_me:9497: error: Cannot link $cf_nculib_root library" >&5
9498 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9499 { (exit 1); exit 1; }; }
9504 if test -n "$cf_ncurses_LIBS" ; then
9505 echo "$as_me:9505: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9506 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9507 cf_ncurses_SAVE="$LIBS"
9508 for p in $cf_ncurses_LIBS ; do
9509 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9510 if test "$q" != "$LIBS" ; then
9514 cat >conftest.$ac_ext <<_ACEOF
9515 #line 9515 "configure"
9516 #include "confdefs.h"
9517 #include <${cf_cv_ncurses_header:-curses.h}>
9521 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9526 rm -f conftest.$ac_objext conftest$ac_exeext
9527 if { (eval echo "$as_me:9527: \"$ac_link\"") >&5
9528 (eval $ac_link) 2>&5
9530 echo "$as_me:9530: \$? = $ac_status" >&5
9531 (exit $ac_status); } &&
9532 { ac_try='test -s conftest$ac_exeext'
9533 { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9536 echo "$as_me:9536: \$? = $ac_status" >&5
9537 (exit $ac_status); }; }; then
9538 echo "$as_me:9538: result: yes" >&5
9539 echo "${ECHO_T}yes" >&6
9541 echo "$as_me: failed program was:" >&5
9542 cat conftest.$ac_ext >&5
9543 echo "$as_me:9543: result: no" >&5
9544 echo "${ECHO_T}no" >&6
9545 LIBS="$cf_ncurses_SAVE"
9547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9550 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9552 cat >>confdefs.h <<EOF
9553 #define $cf_nculib_ROOT 1
9564 cf_ncuconfig_root=$cf_cv_screen
9565 cf_have_ncuconfig=no
9567 if test "x${PKG_CONFIG:=none}" != xnone; then
9568 echo "$as_me:9568: checking pkg-config for $cf_ncuconfig_root" >&5
9569 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9570 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9571 echo "$as_me:9571: result: yes" >&5
9572 echo "${ECHO_T}yes" >&6
9574 echo "$as_me:9574: checking if the $cf_ncuconfig_root package files work" >&5
9575 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9576 cf_have_ncuconfig=unknown
9578 cf_save_CFLAGS="$CFLAGS"
9579 cf_save_CPPFLAGS="$CPPFLAGS"
9580 cf_save_LIBS="$LIBS"
9582 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
9583 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
9585 # while -W for passing linker flags is prevalent, it is not "standard".
9586 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9587 # incompatible _and_ non-standard -W option which gives an error. Work
9588 # around that pitfall.
9589 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9595 cf_new_extra_cppflags=
9597 for cf_add_cflags in $cf_pkg_cflags
9599 case $cf_fix_cppflags in
9601 case $cf_add_cflags in
9602 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9603 case $cf_add_cflags in
9605 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9607 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9608 && test -z "${cf_tst_cflags}" \
9609 && cf_fix_cppflags=yes
9611 if test $cf_fix_cppflags = yes ; then
9613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9617 elif test "${cf_tst_cflags}" = "\"'" ; then
9619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9630 case $cf_add_cflags in
9632 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9634 CPPFLAGS=`echo "$CPPFLAGS" | \
9635 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9636 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9641 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9642 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9649 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9650 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9657 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9658 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9660 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9662 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9663 && test -z "${cf_tst_cflags}" \
9664 && cf_fix_cppflags=no
9669 if test -n "$cf_new_cflags" ; then
9671 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9672 CFLAGS="${CFLAGS}$cf_new_cflags"
9676 if test -n "$cf_new_cppflags" ; then
9678 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9679 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9683 if test -n "$cf_new_extra_cppflags" ; then
9685 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9686 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9693 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9695 for cf_add_1lib in $cf_add_0lib; do
9696 for cf_add_2lib in $cf_add_libs; do
9697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9706 cat >conftest.$ac_ext <<_ACEOF
9707 #line 9707 "configure"
9708 #include "confdefs.h"
9709 #include <${cf_cv_ncurses_header:-curses.h}>
9713 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9718 rm -f conftest.$ac_objext conftest$ac_exeext
9719 if { (eval echo "$as_me:9719: \"$ac_link\"") >&5
9720 (eval $ac_link) 2>&5
9722 echo "$as_me:9722: \$? = $ac_status" >&5
9723 (exit $ac_status); } &&
9724 { ac_try='test -s conftest$ac_exeext'
9725 { (eval echo "$as_me:9725: \"$ac_try\"") >&5
9728 echo "$as_me:9728: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }; then
9730 if test "$cross_compiling" = yes; then
9731 cf_test_ncuconfig=maybe
9733 cat >conftest.$ac_ext <<_ACEOF
9734 #line 9734 "configure"
9735 #include "confdefs.h"
9736 #include <${cf_cv_ncurses_header:-curses.h}>
9738 { char *xx = curses_version(); return (xx == 0); }
9740 rm -f conftest$ac_exeext
9741 if { (eval echo "$as_me:9741: \"$ac_link\"") >&5
9742 (eval $ac_link) 2>&5
9744 echo "$as_me:9744: \$? = $ac_status" >&5
9745 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9746 { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9749 echo "$as_me:9749: \$? = $ac_status" >&5
9750 (exit $ac_status); }; }; then
9751 cf_test_ncuconfig=yes
9753 echo "$as_me: program exited with status $ac_status" >&5
9754 echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756 cf_test_ncuconfig=no
9758 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9761 echo "$as_me: failed program was:" >&5
9762 cat conftest.$ac_ext >&5
9763 cf_test_ncuconfig=no
9765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9767 CFLAGS="$cf_save_CFLAGS"
9768 CPPFLAGS="$cf_save_CPPFLAGS"
9769 LIBS="$cf_save_LIBS"
9771 if test "x$cf_test_ncuconfig" != xyes; then
9772 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9773 cf_pkg_cflags="$cf_temp"
9774 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9775 cf_pkg_libs="$cf_temp"
9783 cf_new_extra_cppflags=
9785 for cf_add_cflags in $cf_pkg_cflags
9787 case $cf_fix_cppflags in
9789 case $cf_add_cflags in
9790 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9791 case $cf_add_cflags in
9793 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9795 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9796 && test -z "${cf_tst_cflags}" \
9797 && cf_fix_cppflags=yes
9799 if test $cf_fix_cppflags = yes ; then
9801 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9802 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9805 elif test "${cf_tst_cflags}" = "\"'" ; then
9807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9818 case $cf_add_cflags in
9820 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9822 CPPFLAGS=`echo "$CPPFLAGS" | \
9823 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9824 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9829 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9830 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9837 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9838 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9848 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9850 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9851 && test -z "${cf_tst_cflags}" \
9852 && cf_fix_cppflags=no
9857 if test -n "$cf_new_cflags" ; then
9859 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9860 CFLAGS="${CFLAGS}$cf_new_cflags"
9864 if test -n "$cf_new_cppflags" ; then
9866 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9867 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9871 if test -n "$cf_new_extra_cppflags" ; then
9873 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9874 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9881 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9883 for cf_add_1lib in $cf_add_0lib; do
9884 for cf_add_2lib in $cf_add_libs; do
9885 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9890 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9894 cat >conftest.$ac_ext <<_ACEOF
9895 #line 9895 "configure"
9896 #include "confdefs.h"
9897 #include <${cf_cv_ncurses_header:-curses.h}>
9901 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9906 rm -f conftest.$ac_objext conftest$ac_exeext
9907 if { (eval echo "$as_me:9907: \"$ac_link\"") >&5
9908 (eval $ac_link) 2>&5
9910 echo "$as_me:9910: \$? = $ac_status" >&5
9911 (exit $ac_status); } &&
9912 { ac_try='test -s conftest$ac_exeext'
9913 { (eval echo "$as_me:9913: \"$ac_try\"") >&5
9916 echo "$as_me:9916: \$? = $ac_status" >&5
9917 (exit $ac_status); }; }; then
9918 if test "$cross_compiling" = yes; then
9919 cf_have_ncuconfig=maybe
9921 cat >conftest.$ac_ext <<_ACEOF
9922 #line 9922 "configure"
9923 #include "confdefs.h"
9924 #include <${cf_cv_ncurses_header:-curses.h}>
9926 { char *xx = curses_version(); return (xx == 0); }
9928 rm -f conftest$ac_exeext
9929 if { (eval echo "$as_me:9929: \"$ac_link\"") >&5
9930 (eval $ac_link) 2>&5
9932 echo "$as_me:9932: \$? = $ac_status" >&5
9933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9934 { (eval echo "$as_me:9934: \"$ac_try\"") >&5
9937 echo "$as_me:9937: \$? = $ac_status" >&5
9938 (exit $ac_status); }; }; then
9939 cf_have_ncuconfig=yes
9941 echo "$as_me: program exited with status $ac_status" >&5
9942 echo "$as_me: failed program was:" >&5
9943 cat conftest.$ac_ext >&5
9944 cf_have_ncuconfig=no
9946 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9949 echo "$as_me: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9951 cf_have_ncuconfig=no
9953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9954 echo "$as_me:9954: result: $cf_have_ncuconfig" >&5
9955 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9956 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9957 if test "$cf_have_ncuconfig" != "yes"
9959 CPPFLAGS="$cf_save_CPPFLAGS"
9960 LIBS="$cf_save_LIBS"
9961 NCURSES_CONFIG_PKG=none
9964 cat >>confdefs.h <<\EOF
9968 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9970 echo "$as_me:9970: checking for terminfo header" >&5
9971 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9972 if test "${cf_cv_term_header+set}" = set; then
9973 echo $ECHO_N "(cached) $ECHO_C" >&6
9976 case ${cf_cv_ncurses_header} in
9977 (*/ncurses.h|*/ncursesw.h)
9978 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9981 cf_term_header=term.h
9985 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9987 cat >conftest.$ac_ext <<_ACEOF
9988 #line 9988 "configure"
9989 #include "confdefs.h"
9991 #include <${cf_cv_ncurses_header:-curses.h}>
9997 int x = auto_left_margin
10002 rm -f conftest.$ac_objext
10003 if { (eval echo "$as_me:10003: \"$ac_compile\"") >&5
10004 (eval $ac_compile) 2>&5
10006 echo "$as_me:10006: \$? = $ac_status" >&5
10007 (exit $ac_status); } &&
10008 { ac_try='test -s conftest.$ac_objext'
10009 { (eval echo "$as_me:10009: \"$ac_try\"") >&5
10010 (eval $ac_try) 2>&5
10012 echo "$as_me:10012: \$? = $ac_status" >&5
10013 (exit $ac_status); }; }; then
10015 cf_cv_term_header="$cf_test"
10017 echo "$as_me: failed program was:" >&5
10018 cat conftest.$ac_ext >&5
10020 cf_cv_term_header=unknown
10023 rm -f conftest.$ac_objext conftest.$ac_ext
10024 test "$cf_cv_term_header" != unknown && break
10028 echo "$as_me:10028: result: $cf_cv_term_header" >&5
10029 echo "${ECHO_T}$cf_cv_term_header" >&6
10031 # Set definitions to allow ifdef'ing to accommodate subdirectories
10033 case $cf_cv_term_header in
10036 cat >>confdefs.h <<\EOF
10037 #define HAVE_TERM_H 1
10043 case $cf_cv_term_header in
10046 cat >>confdefs.h <<\EOF
10047 #define HAVE_NCURSES_TERM_H 1
10053 cat >>confdefs.h <<\EOF
10054 #define HAVE_NCURSESW_TERM_H 1
10063 echo "$as_me:10063: result: no" >&5
10064 echo "${ECHO_T}no" >&6
10065 NCURSES_CONFIG_PKG=none
10068 NCURSES_CONFIG_PKG=none
10071 if test "x$cf_have_ncuconfig" = "xno"; then
10072 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10074 if test -n "$ac_tool_prefix"; then
10075 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10077 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10079 echo "$as_me:10079: checking for $ac_word" >&5
10080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10081 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10082 echo $ECHO_N "(cached) $ECHO_C" >&6
10084 if test -n "$NCURSES_CONFIG"; then
10085 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10087 ac_save_IFS=$IFS; IFS=$ac_path_separator
10089 for ac_dir in $ac_dummy; do
10091 test -z "$ac_dir" && ac_dir=.
10092 $as_executable_p "$ac_dir/$ac_word" || continue
10093 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10094 echo "$as_me:10094: found $ac_dir/$ac_word" >&5
10100 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10101 if test -n "$NCURSES_CONFIG"; then
10102 echo "$as_me:10102: result: $NCURSES_CONFIG" >&5
10103 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10105 echo "$as_me:10105: result: no" >&5
10106 echo "${ECHO_T}no" >&6
10109 test -n "$NCURSES_CONFIG" && break
10112 if test -z "$NCURSES_CONFIG"; then
10113 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10114 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10116 # Extract the first word of "$ac_prog", so it can be a program name with args.
10117 set dummy $ac_prog; ac_word=$2
10118 echo "$as_me:10118: checking for $ac_word" >&5
10119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10120 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10121 echo $ECHO_N "(cached) $ECHO_C" >&6
10123 if test -n "$ac_ct_NCURSES_CONFIG"; then
10124 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10126 ac_save_IFS=$IFS; IFS=$ac_path_separator
10128 for ac_dir in $ac_dummy; do
10130 test -z "$ac_dir" && ac_dir=.
10131 $as_executable_p "$ac_dir/$ac_word" || continue
10132 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10133 echo "$as_me:10133: found $ac_dir/$ac_word" >&5
10139 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10140 if test -n "$ac_ct_NCURSES_CONFIG"; then
10141 echo "$as_me:10141: result: $ac_ct_NCURSES_CONFIG" >&5
10142 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10144 echo "$as_me:10144: result: no" >&5
10145 echo "${ECHO_T}no" >&6
10148 test -n "$ac_ct_NCURSES_CONFIG" && break
10150 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10152 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10155 if test "$NCURSES_CONFIG" != none ; then
10160 cf_new_extra_cppflags=
10162 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10164 case $cf_fix_cppflags in
10166 case $cf_add_cflags in
10167 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10168 case $cf_add_cflags in
10170 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10173 && test -z "${cf_tst_cflags}" \
10174 && cf_fix_cppflags=yes
10176 if test $cf_fix_cppflags = yes ; then
10178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10182 elif test "${cf_tst_cflags}" = "\"'" ; then
10184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10191 case "$CPPFLAGS" in
10195 case $cf_add_cflags in
10197 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10199 CPPFLAGS=`echo "$CPPFLAGS" | \
10200 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10201 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10206 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10207 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10214 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10215 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10225 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10228 && test -z "${cf_tst_cflags}" \
10229 && cf_fix_cppflags=no
10234 if test -n "$cf_new_cflags" ; then
10236 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10237 CFLAGS="${CFLAGS}$cf_new_cflags"
10241 if test -n "$cf_new_cppflags" ; then
10243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10244 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10248 if test -n "$cf_new_extra_cppflags" ; then
10250 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10251 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10255 cf_add_libs="$LIBS"
10258 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10259 # filter duplicates
10260 for cf_add_1lib in $cf_add_0lib; do
10261 for cf_add_2lib in $cf_add_libs; do
10262 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10267 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10269 LIBS="$cf_add_libs"
10271 # even with config script, some packages use no-override for curses.h
10273 echo "$as_me:10273: checking if we have identified curses headers" >&5
10274 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10275 if test "${cf_cv_ncurses_header+set}" = set; then
10276 echo $ECHO_N "(cached) $ECHO_C" >&6
10279 cf_cv_ncurses_header=none
10281 ncurses.h $cf_cv_screen/ncurses.h \
10282 curses.h $cf_cv_screen/curses.h
10284 cat >conftest.$ac_ext <<_ACEOF
10285 #line 10285 "configure"
10286 #include "confdefs.h"
10287 #include <${cf_header}>
10291 initscr(); tgoto("?", 0,0)
10296 rm -f conftest.$ac_objext
10297 if { (eval echo "$as_me:10297: \"$ac_compile\"") >&5
10298 (eval $ac_compile) 2>&5
10300 echo "$as_me:10300: \$? = $ac_status" >&5
10301 (exit $ac_status); } &&
10302 { ac_try='test -s conftest.$ac_objext'
10303 { (eval echo "$as_me:10303: \"$ac_try\"") >&5
10304 (eval $ac_try) 2>&5
10306 echo "$as_me:10306: \$? = $ac_status" >&5
10307 (exit $ac_status); }; }; then
10308 cf_cv_ncurses_header=$cf_header; break
10310 echo "$as_me: failed program was:" >&5
10311 cat conftest.$ac_ext >&5
10313 rm -f conftest.$ac_objext conftest.$ac_ext
10317 echo "$as_me:10317: result: $cf_cv_ncurses_header" >&5
10318 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10320 if test "$cf_cv_ncurses_header" = none ; then
10321 { { echo "$as_me:10321: error: No curses header-files found" >&5
10322 echo "$as_me: error: No curses header-files found" >&2;}
10323 { (exit 1); exit 1; }; }
10326 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10328 for ac_header in $cf_cv_ncurses_header
10330 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10331 echo "$as_me:10331: checking for $ac_header" >&5
10332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10333 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10334 echo $ECHO_N "(cached) $ECHO_C" >&6
10336 cat >conftest.$ac_ext <<_ACEOF
10337 #line 10337 "configure"
10338 #include "confdefs.h"
10339 #include <$ac_header>
10341 if { (eval echo "$as_me:10341: \"$ac_cpp conftest.$ac_ext\"") >&5
10342 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10344 egrep -v '^ *\+' conftest.er1 >conftest.err
10346 cat conftest.err >&5
10347 echo "$as_me:10347: \$? = $ac_status" >&5
10348 (exit $ac_status); } >/dev/null; then
10349 if test -s conftest.err; then
10350 ac_cpp_err=$ac_c_preproc_warn_flag
10357 if test -z "$ac_cpp_err"; then
10358 eval "$as_ac_Header=yes"
10360 echo "$as_me: failed program was:" >&5
10361 cat conftest.$ac_ext >&5
10362 eval "$as_ac_Header=no"
10364 rm -f conftest.err conftest.$ac_ext
10366 echo "$as_me:10366: result: `eval echo '${'$as_ac_Header'}'`" >&5
10367 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10369 cat >>confdefs.h <<EOF
10370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10376 cat >>confdefs.h <<\EOF
10380 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10382 cat >>confdefs.h <<EOF
10383 #define $cf_nculib_ROOT 1
10386 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
10390 cf_ncuhdr_root=$cf_cv_screen
10392 test -n "$cf_cv_curses_dir" && \
10393 test "$cf_cv_curses_dir" != "no" && { \
10395 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10396 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10398 while test $cf_add_incdir != /usr/include
10400 if test -d $cf_add_incdir
10403 if test -n "$CFLAGS$CPPFLAGS" ; then
10404 # a loop is needed to ensure we can add subdirs of existing dirs
10405 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10406 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10407 cf_have_incdir=yes; break
10412 if test "$cf_have_incdir" = no ; then
10413 if test "$cf_add_incdir" = /usr/local/include ; then
10414 if test "$GCC" = yes
10416 cf_save_CPPFLAGS=$CPPFLAGS
10418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10419 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10421 cat >conftest.$ac_ext <<_ACEOF
10422 #line 10422 "configure"
10423 #include "confdefs.h"
10433 rm -f conftest.$ac_objext
10434 if { (eval echo "$as_me:10434: \"$ac_compile\"") >&5
10435 (eval $ac_compile) 2>&5
10437 echo "$as_me:10437: \$? = $ac_status" >&5
10438 (exit $ac_status); } &&
10439 { ac_try='test -s conftest.$ac_objext'
10440 { (eval echo "$as_me:10440: \"$ac_try\"") >&5
10441 (eval $ac_try) 2>&5
10443 echo "$as_me:10443: \$? = $ac_status" >&5
10444 (exit $ac_status); }; }; then
10447 echo "$as_me: failed program was:" >&5
10448 cat conftest.$ac_ext >&5
10451 rm -f conftest.$ac_objext conftest.$ac_ext
10452 CPPFLAGS=$cf_save_CPPFLAGS
10457 if test "$cf_have_incdir" = no ; then
10458 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10460 echo "${as_me:-configure}:10460: testing adding $cf_add_incdir to include-path ..." 1>&5
10462 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10464 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10465 test "$cf_top_incdir" = "$cf_add_incdir" && break
10466 cf_add_incdir="$cf_top_incdir"
10479 echo "$as_me:10479: checking for $cf_ncuhdr_root header in include-path" >&5
10480 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10481 if test "${cf_cv_ncurses_h+set}" = set; then
10482 echo $ECHO_N "(cached) $ECHO_C" >&6
10485 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10486 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10487 for cf_header in $cf_header_list
10490 cat >conftest.$ac_ext <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10494 #include <$cf_header>
10499 #ifdef NCURSES_VERSION
10501 printf("%s\n", NCURSES_VERSION);
10514 rm -f conftest.$ac_objext
10515 if { (eval echo "$as_me:10515: \"$ac_compile\"") >&5
10516 (eval $ac_compile) 2>&5
10518 echo "$as_me:10518: \$? = $ac_status" >&5
10519 (exit $ac_status); } &&
10520 { ac_try='test -s conftest.$ac_objext'
10521 { (eval echo "$as_me:10521: \"$ac_try\"") >&5
10522 (eval $ac_try) 2>&5
10524 echo "$as_me:10524: \$? = $ac_status" >&5
10525 (exit $ac_status); }; }; then
10526 cf_cv_ncurses_h=$cf_header
10529 echo "$as_me: failed program was:" >&5
10530 cat conftest.$ac_ext >&5
10533 rm -f conftest.$ac_objext conftest.$ac_ext
10535 test "$cf_cv_ncurses_h" != no && break
10539 echo "$as_me:10539: result: $cf_cv_ncurses_h" >&5
10540 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10542 if test "$cf_cv_ncurses_h" != no ; then
10543 cf_cv_ncurses_header=$cf_cv_ncurses_h
10546 echo "$as_me:10546: checking for $cf_ncuhdr_root include-path" >&5
10547 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10548 if test "${cf_cv_ncurses_h2+set}" = set; then
10549 echo $ECHO_N "(cached) $ECHO_C" >&6
10552 test -n "$verbose" && echo
10556 # collect the current set of include-directories from compiler flags
10557 cf_header_path_list=""
10558 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10559 for cf_header_path in $CPPFLAGS $CFLAGS
10561 case $cf_header_path in
10563 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10565 test "x$cf_header_path" != "xNONE" && \
10566 test -d "$cf_header_path" && \
10568 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10569 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10570 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10571 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10572 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10573 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"
10576 cf_header_path_list="$cf_header_path_list $cf_search"
10582 # add the variations for the package we are looking for
10586 test "x$prefix" != "xNONE" && \
10587 test -d "$prefix" && \
10589 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10590 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10591 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10592 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10593 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10594 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10597 for cf_subdir_prefix in \
10606 test "x$cf_subdir_prefix" != "x$prefix" && \
10607 test -d "$cf_subdir_prefix" && \
10608 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10609 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10610 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10611 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10612 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10613 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10614 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10619 test "$includedir" != NONE && \
10620 test "$includedir" != "/usr/include" && \
10621 test -d "$includedir" && {
10622 test -d $includedir && cf_search="$cf_search $includedir"
10623 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10626 test "$oldincludedir" != NONE && \
10627 test "$oldincludedir" != "/usr/include" && \
10628 test -d "$oldincludedir" && {
10629 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10630 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10633 cf_search="$cf_search $cf_header_path_list"
10635 test -n "$verbose" && echo search path $cf_search
10636 cf_save2_CPPFLAGS="$CPPFLAGS"
10637 for cf_incdir in $cf_search
10640 if test -n "$cf_incdir" ; then
10641 for cf_add_incdir in $cf_incdir
10643 while test $cf_add_incdir != /usr/include
10645 if test -d $cf_add_incdir
10648 if test -n "$CFLAGS$CPPFLAGS" ; then
10649 # a loop is needed to ensure we can add subdirs of existing dirs
10650 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10651 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10652 cf_have_incdir=yes; break
10657 if test "$cf_have_incdir" = no ; then
10658 if test "$cf_add_incdir" = /usr/local/include ; then
10659 if test "$GCC" = yes
10661 cf_save_CPPFLAGS=$CPPFLAGS
10663 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10664 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10666 cat >conftest.$ac_ext <<_ACEOF
10667 #line 10667 "configure"
10668 #include "confdefs.h"
10678 rm -f conftest.$ac_objext
10679 if { (eval echo "$as_me:10679: \"$ac_compile\"") >&5
10680 (eval $ac_compile) 2>&5
10682 echo "$as_me:10682: \$? = $ac_status" >&5
10683 (exit $ac_status); } &&
10684 { ac_try='test -s conftest.$ac_objext'
10685 { (eval echo "$as_me:10685: \"$ac_try\"") >&5
10686 (eval $ac_try) 2>&5
10688 echo "$as_me:10688: \$? = $ac_status" >&5
10689 (exit $ac_status); }; }; then
10692 echo "$as_me: failed program was:" >&5
10693 cat conftest.$ac_ext >&5
10696 rm -f conftest.$ac_objext conftest.$ac_ext
10697 CPPFLAGS=$cf_save_CPPFLAGS
10702 if test "$cf_have_incdir" = no ; then
10703 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10705 echo "${as_me:-configure}:10705: testing adding $cf_add_incdir to include-path ..." 1>&5
10707 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10709 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10710 test "$cf_top_incdir" = "$cf_add_incdir" && break
10711 cf_add_incdir="$cf_top_incdir"
10727 cat >conftest.$ac_ext <<_ACEOF
10728 #line 10728 "configure"
10729 #include "confdefs.h"
10731 #include <$cf_header>
10736 #ifdef NCURSES_VERSION
10738 printf("%s\n", NCURSES_VERSION);
10751 rm -f conftest.$ac_objext
10752 if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
10753 (eval $ac_compile) 2>&5
10755 echo "$as_me:10755: \$? = $ac_status" >&5
10756 (exit $ac_status); } &&
10757 { ac_try='test -s conftest.$ac_objext'
10758 { (eval echo "$as_me:10758: \"$ac_try\"") >&5
10759 (eval $ac_try) 2>&5
10761 echo "$as_me:10761: \$? = $ac_status" >&5
10762 (exit $ac_status); }; }; then
10763 cf_cv_ncurses_h2=$cf_header
10766 echo "$as_me: failed program was:" >&5
10767 cat conftest.$ac_ext >&5
10768 cf_cv_ncurses_h2=no
10770 rm -f conftest.$ac_objext conftest.$ac_ext
10772 if test "$cf_cv_ncurses_h2" != no ; then
10773 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10774 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10777 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10779 CPPFLAGS="$cf_save2_CPPFLAGS"
10780 test "$cf_cv_ncurses_h2" != no && break
10782 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10782: error: not found" >&5
10783 echo "$as_me: error: not found" >&2;}
10784 { (exit 1); exit 1; }; }
10787 echo "$as_me:10787: result: $cf_cv_ncurses_h2" >&5
10788 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10790 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10791 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10792 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10793 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10796 if test -n "$cf_1st_incdir" ; then
10797 for cf_add_incdir in $cf_1st_incdir
10799 while test $cf_add_incdir != /usr/include
10801 if test -d $cf_add_incdir
10804 if test -n "$CFLAGS$CPPFLAGS" ; then
10805 # a loop is needed to ensure we can add subdirs of existing dirs
10806 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10807 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10808 cf_have_incdir=yes; break
10813 if test "$cf_have_incdir" = no ; then
10814 if test "$cf_add_incdir" = /usr/local/include ; then
10815 if test "$GCC" = yes
10817 cf_save_CPPFLAGS=$CPPFLAGS
10819 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10820 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10822 cat >conftest.$ac_ext <<_ACEOF
10823 #line 10823 "configure"
10824 #include "confdefs.h"
10834 rm -f conftest.$ac_objext
10835 if { (eval echo "$as_me:10835: \"$ac_compile\"") >&5
10836 (eval $ac_compile) 2>&5
10838 echo "$as_me:10838: \$? = $ac_status" >&5
10839 (exit $ac_status); } &&
10840 { ac_try='test -s conftest.$ac_objext'
10841 { (eval echo "$as_me:10841: \"$ac_try\"") >&5
10842 (eval $ac_try) 2>&5
10844 echo "$as_me:10844: \$? = $ac_status" >&5
10845 (exit $ac_status); }; }; then
10848 echo "$as_me: failed program was:" >&5
10849 cat conftest.$ac_ext >&5
10852 rm -f conftest.$ac_objext conftest.$ac_ext
10853 CPPFLAGS=$cf_save_CPPFLAGS
10858 if test "$cf_have_incdir" = no ; then
10859 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10861 echo "${as_me:-configure}:10861: testing adding $cf_add_incdir to include-path ..." 1>&5
10863 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10865 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10866 test "$cf_top_incdir" = "$cf_add_incdir" && break
10867 cf_add_incdir="$cf_top_incdir"
10880 # Set definitions to allow ifdef'ing for ncurses.h
10882 case $cf_cv_ncurses_header in
10885 cat >>confdefs.h <<\EOF
10886 #define HAVE_NCURSES_H 1
10892 case $cf_cv_ncurses_header in
10893 (ncurses/curses.h|ncurses/ncurses.h)
10895 cat >>confdefs.h <<\EOF
10896 #define HAVE_NCURSES_NCURSES_H 1
10900 (ncursesw/curses.h|ncursesw/ncurses.h)
10902 cat >>confdefs.h <<\EOF
10903 #define HAVE_NCURSESW_NCURSES_H 1
10909 echo "$as_me:10909: checking for terminfo header" >&5
10910 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10911 if test "${cf_cv_term_header+set}" = set; then
10912 echo $ECHO_N "(cached) $ECHO_C" >&6
10915 case ${cf_cv_ncurses_header} in
10916 (*/ncurses.h|*/ncursesw.h)
10917 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10920 cf_term_header=term.h
10924 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10926 cat >conftest.$ac_ext <<_ACEOF
10927 #line 10927 "configure"
10928 #include "confdefs.h"
10930 #include <${cf_cv_ncurses_header:-curses.h}>
10931 #include <$cf_test>
10936 int x = auto_left_margin
10941 rm -f conftest.$ac_objext
10942 if { (eval echo "$as_me:10942: \"$ac_compile\"") >&5
10943 (eval $ac_compile) 2>&5
10945 echo "$as_me:10945: \$? = $ac_status" >&5
10946 (exit $ac_status); } &&
10947 { ac_try='test -s conftest.$ac_objext'
10948 { (eval echo "$as_me:10948: \"$ac_try\"") >&5
10949 (eval $ac_try) 2>&5
10951 echo "$as_me:10951: \$? = $ac_status" >&5
10952 (exit $ac_status); }; }; then
10954 cf_cv_term_header="$cf_test"
10956 echo "$as_me: failed program was:" >&5
10957 cat conftest.$ac_ext >&5
10959 cf_cv_term_header=unknown
10962 rm -f conftest.$ac_objext conftest.$ac_ext
10963 test "$cf_cv_term_header" != unknown && break
10967 echo "$as_me:10967: result: $cf_cv_term_header" >&5
10968 echo "${ECHO_T}$cf_cv_term_header" >&6
10970 # Set definitions to allow ifdef'ing to accommodate subdirectories
10972 case $cf_cv_term_header in
10975 cat >>confdefs.h <<\EOF
10976 #define HAVE_TERM_H 1
10982 case $cf_cv_term_header in
10985 cat >>confdefs.h <<\EOF
10986 #define HAVE_NCURSES_TERM_H 1
10992 cat >>confdefs.h <<\EOF
10993 #define HAVE_NCURSESW_TERM_H 1
10999 # some applications need this, but should check for NCURSES_VERSION
11001 cat >>confdefs.h <<\EOF
11005 echo "$as_me:11005: checking for ncurses version" >&5
11006 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11007 if test "${cf_cv_ncurses_version+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
11011 cf_cv_ncurses_version=no
11014 if test "$cross_compiling" = yes; then
11016 # This will not work if the preprocessor splits the line after the
11017 # Autoconf token. The 'unproto' program does that.
11018 cat > conftest.$ac_ext <<EOF
11019 #include <${cf_cv_ncurses_header:-curses.h}>
11021 #ifdef NCURSES_VERSION
11022 Autoconf NCURSES_VERSION
11030 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11031 { (eval echo "$as_me:11031: \"$cf_try\"") >&5
11032 (eval $cf_try) 2>&5
11034 echo "$as_me:11034: \$? = $ac_status" >&5
11035 (exit $ac_status); }
11036 if test -f conftest.out ; then
11037 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11038 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11043 cat >conftest.$ac_ext <<_ACEOF
11044 #line 11044 "configure"
11045 #include "confdefs.h"
11047 #include <${cf_cv_ncurses_header:-curses.h}>
11051 FILE *fp = fopen("$cf_tempfile", "w");
11052 #ifdef NCURSES_VERSION
11053 # ifdef NCURSES_VERSION_PATCH
11054 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11056 fprintf(fp, "%s\n", NCURSES_VERSION);
11059 # ifdef __NCURSES_H
11060 fprintf(fp, "old\n");
11065 ${cf_cv_main_return:-return}(0);
11068 rm -f conftest$ac_exeext
11069 if { (eval echo "$as_me:11069: \"$ac_link\"") >&5
11070 (eval $ac_link) 2>&5
11072 echo "$as_me:11072: \$? = $ac_status" >&5
11073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11074 { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075 (eval $ac_try) 2>&5
11077 echo "$as_me:11077: \$? = $ac_status" >&5
11078 (exit $ac_status); }; }; then
11080 cf_cv_ncurses_version=`cat $cf_tempfile`
11082 echo "$as_me: program exited with status $ac_status" >&5
11083 echo "$as_me: failed program was:" >&5
11084 cat conftest.$ac_ext >&5
11086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11091 echo "$as_me:11091: result: $cf_cv_ncurses_version" >&5
11092 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11093 test "$cf_cv_ncurses_version" = no ||
11094 cat >>confdefs.h <<\EOF
11098 cf_nculib_root=$cf_cv_screen
11099 # This works, except for the special case where we find gpm, but
11100 # ncurses is in a nonstandard location via $LIBS, and we really want
11103 cf_ncurses_SAVE="$LIBS"
11104 echo "$as_me:11104: checking for Gpm_Open in -lgpm" >&5
11105 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11106 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
11109 ac_check_lib_save_LIBS=$LIBS
11111 cat >conftest.$ac_ext <<_ACEOF
11112 #line 11112 "configure"
11113 #include "confdefs.h"
11115 /* Override any gcc2 internal prototype to avoid an error. */
11119 /* We use char because int might match the return type of a gcc2
11120 builtin and then its argument prototype would still apply. */
11130 rm -f conftest.$ac_objext conftest$ac_exeext
11131 if { (eval echo "$as_me:11131: \"$ac_link\"") >&5
11132 (eval $ac_link) 2>&5
11134 echo "$as_me:11134: \$? = $ac_status" >&5
11135 (exit $ac_status); } &&
11136 { ac_try='test -s conftest$ac_exeext'
11137 { (eval echo "$as_me:11137: \"$ac_try\"") >&5
11138 (eval $ac_try) 2>&5
11140 echo "$as_me:11140: \$? = $ac_status" >&5
11141 (exit $ac_status); }; }; then
11142 ac_cv_lib_gpm_Gpm_Open=yes
11144 echo "$as_me: failed program was:" >&5
11145 cat conftest.$ac_ext >&5
11146 ac_cv_lib_gpm_Gpm_Open=no
11148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11149 LIBS=$ac_check_lib_save_LIBS
11151 echo "$as_me:11151: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11152 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11153 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
11154 echo "$as_me:11154: checking for initscr in -lgpm" >&5
11155 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11156 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11157 echo $ECHO_N "(cached) $ECHO_C" >&6
11159 ac_check_lib_save_LIBS=$LIBS
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11165 /* Override any gcc2 internal prototype to avoid an error. */
11169 /* We use char because int might match the return type of a gcc2
11170 builtin and then its argument prototype would still apply. */
11180 rm -f conftest.$ac_objext conftest$ac_exeext
11181 if { (eval echo "$as_me:11181: \"$ac_link\"") >&5
11182 (eval $ac_link) 2>&5
11184 echo "$as_me:11184: \$? = $ac_status" >&5
11185 (exit $ac_status); } &&
11186 { ac_try='test -s conftest$ac_exeext'
11187 { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11190 echo "$as_me:11190: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
11192 ac_cv_lib_gpm_initscr=yes
11194 echo "$as_me: failed program was:" >&5
11195 cat conftest.$ac_ext >&5
11196 ac_cv_lib_gpm_initscr=no
11198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11199 LIBS=$ac_check_lib_save_LIBS
11201 echo "$as_me:11201: result: $ac_cv_lib_gpm_initscr" >&5
11202 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11203 if test $ac_cv_lib_gpm_initscr = yes; then
11204 LIBS="$cf_ncurses_SAVE"
11206 cf_ncurses_LIBS="-lgpm"
11213 # This is only necessary if you are linking against an obsolete
11214 # version of ncurses (but it should do no harm, since it's static).
11215 if test "$cf_nculib_root" = ncurses ; then
11216 echo "$as_me:11216: checking for tgoto in -lmytinfo" >&5
11217 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11218 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11219 echo $ECHO_N "(cached) $ECHO_C" >&6
11221 ac_check_lib_save_LIBS=$LIBS
11222 LIBS="-lmytinfo $LIBS"
11223 cat >conftest.$ac_ext <<_ACEOF
11224 #line 11224 "configure"
11225 #include "confdefs.h"
11227 /* Override any gcc2 internal prototype to avoid an error. */
11231 /* We use char because int might match the return type of a gcc2
11232 builtin and then its argument prototype would still apply. */
11242 rm -f conftest.$ac_objext conftest$ac_exeext
11243 if { (eval echo "$as_me:11243: \"$ac_link\"") >&5
11244 (eval $ac_link) 2>&5
11246 echo "$as_me:11246: \$? = $ac_status" >&5
11247 (exit $ac_status); } &&
11248 { ac_try='test -s conftest$ac_exeext'
11249 { (eval echo "$as_me:11249: \"$ac_try\"") >&5
11250 (eval $ac_try) 2>&5
11252 echo "$as_me:11252: \$? = $ac_status" >&5
11253 (exit $ac_status); }; }; then
11254 ac_cv_lib_mytinfo_tgoto=yes
11256 echo "$as_me: failed program was:" >&5
11257 cat conftest.$ac_ext >&5
11258 ac_cv_lib_mytinfo_tgoto=no
11260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11261 LIBS=$ac_check_lib_save_LIBS
11263 echo "$as_me:11263: result: $ac_cv_lib_mytinfo_tgoto" >&5
11264 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11265 if test $ac_cv_lib_mytinfo_tgoto = yes; then
11266 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11273 cf_add_libs="$LIBS"
11276 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11277 # filter duplicates
11278 for cf_add_1lib in $cf_add_0lib; do
11279 for cf_add_2lib in $cf_add_libs; do
11280 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11285 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11287 LIBS="$cf_add_libs"
11289 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11292 cf_add_libs="$LIBS"
11295 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11296 # filter duplicates
11297 for cf_add_1lib in $cf_add_0lib; do
11298 for cf_add_2lib in $cf_add_libs; do
11299 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11304 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11306 LIBS="$cf_add_libs"
11310 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
11312 echo "$as_me:11312: checking for initscr" >&5
11313 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11314 if test "${ac_cv_func_initscr+set}" = set; then
11315 echo $ECHO_N "(cached) $ECHO_C" >&6
11317 cat >conftest.$ac_ext <<_ACEOF
11318 #line 11318 "configure"
11319 #include "confdefs.h"
11320 #define initscr autoconf_temporary
11321 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11328 /* We use char because int might match the return type of a gcc2
11329 builtin and then its argument prototype would still apply. */
11330 char initscr (void);
11336 /* The GNU C library defines stubs for functions which it implements
11337 to always fail with ENOSYS. Some functions are actually named
11338 something starting with __ and the normal name is an alias. */
11339 #if defined (__stub_initscr) || defined (__stub___initscr)
11340 #error found stub for initscr
11348 rm -f conftest.$ac_objext conftest$ac_exeext
11349 if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
11350 (eval $ac_link) 2>&5
11352 echo "$as_me:11352: \$? = $ac_status" >&5
11353 (exit $ac_status); } &&
11354 { ac_try='test -s conftest$ac_exeext'
11355 { (eval echo "$as_me:11355: \"$ac_try\"") >&5
11356 (eval $ac_try) 2>&5
11358 echo "$as_me:11358: \$? = $ac_status" >&5
11359 (exit $ac_status); }; }; then
11360 ac_cv_func_initscr=yes
11362 echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_cv_func_initscr=no
11366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11368 echo "$as_me:11368: result: $ac_cv_func_initscr" >&5
11369 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11370 if test $ac_cv_func_initscr = yes; then
11371 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11374 cf_save_LIBS="$LIBS"
11375 echo "$as_me:11375: checking for initscr in -l$cf_nculib_root" >&5
11376 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11377 LIBS="-l$cf_nculib_root $LIBS"
11378 cat >conftest.$ac_ext <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381 #include <${cf_cv_ncurses_header:-curses.h}>
11390 rm -f conftest.$ac_objext conftest$ac_exeext
11391 if { (eval echo "$as_me:11391: \"$ac_link\"") >&5
11392 (eval $ac_link) 2>&5
11394 echo "$as_me:11394: \$? = $ac_status" >&5
11395 (exit $ac_status); } &&
11396 { ac_try='test -s conftest$ac_exeext'
11397 { (eval echo "$as_me:11397: \"$ac_try\"") >&5
11398 (eval $ac_try) 2>&5
11400 echo "$as_me:11400: \$? = $ac_status" >&5
11401 (exit $ac_status); }; }; then
11402 echo "$as_me:11402: result: yes" >&5
11403 echo "${ECHO_T}yes" >&6
11404 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11407 echo "$as_me: failed program was:" >&5
11408 cat conftest.$ac_ext >&5
11409 echo "$as_me:11409: result: no" >&5
11410 echo "${ECHO_T}no" >&6
11413 cf_library_path_list=""
11414 if test -n "${LDFLAGS}${LIBS}" ; then
11415 for cf_library_path in $LDFLAGS $LIBS
11417 case $cf_library_path in
11419 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11421 test "x$cf_library_path" != "xNONE" && \
11422 test -d "$cf_library_path" && \
11424 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11425 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
11426 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11427 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11428 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11429 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"
11432 cf_library_path_list="$cf_library_path_list $cf_search"
11440 test "x$prefix" != "xNONE" && \
11441 test -d "$prefix" && \
11443 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11444 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
11445 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11446 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11447 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11448 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11451 for cf_subdir_prefix in \
11460 test "x$cf_subdir_prefix" != "x$prefix" && \
11461 test -d "$cf_subdir_prefix" && \
11462 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11463 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11464 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
11465 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11466 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11467 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11468 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
11473 cf_search="$cf_library_path_list $cf_search"
11475 for cf_libdir in $cf_search
11477 echo "$as_me:11477: checking for -l$cf_nculib_root in $cf_libdir" >&5
11478 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11479 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11480 cat >conftest.$ac_ext <<_ACEOF
11481 #line 11481 "configure"
11482 #include "confdefs.h"
11483 #include <${cf_cv_ncurses_header:-curses.h}>
11492 rm -f conftest.$ac_objext conftest$ac_exeext
11493 if { (eval echo "$as_me:11493: \"$ac_link\"") >&5
11494 (eval $ac_link) 2>&5
11496 echo "$as_me:11496: \$? = $ac_status" >&5
11497 (exit $ac_status); } &&
11498 { ac_try='test -s conftest$ac_exeext'
11499 { (eval echo "$as_me:11499: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11502 echo "$as_me:11502: \$? = $ac_status" >&5
11503 (exit $ac_status); }; }; then
11504 echo "$as_me:11504: result: yes" >&5
11505 echo "${ECHO_T}yes" >&6
11506 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11509 echo "$as_me: failed program was:" >&5
11510 cat conftest.$ac_ext >&5
11511 echo "$as_me:11511: result: no" >&5
11512 echo "${ECHO_T}no" >&6
11513 LIBS="$cf_save_LIBS"
11515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11523 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11525 if test $cf_found_library = no ; then
11526 { { echo "$as_me:11526: error: Cannot link $cf_nculib_root library" >&5
11527 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11528 { (exit 1); exit 1; }; }
11533 if test -n "$cf_ncurses_LIBS" ; then
11534 echo "$as_me:11534: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11535 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11536 cf_ncurses_SAVE="$LIBS"
11537 for p in $cf_ncurses_LIBS ; do
11538 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11539 if test "$q" != "$LIBS" ; then
11543 cat >conftest.$ac_ext <<_ACEOF
11544 #line 11544 "configure"
11545 #include "confdefs.h"
11546 #include <${cf_cv_ncurses_header:-curses.h}>
11550 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11555 rm -f conftest.$ac_objext conftest$ac_exeext
11556 if { (eval echo "$as_me:11556: \"$ac_link\"") >&5
11557 (eval $ac_link) 2>&5
11559 echo "$as_me:11559: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest$ac_exeext'
11562 { (eval echo "$as_me:11562: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11565 echo "$as_me:11565: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11567 echo "$as_me:11567: result: yes" >&5
11568 echo "${ECHO_T}yes" >&6
11570 echo "$as_me: failed program was:" >&5
11571 cat conftest.$ac_ext >&5
11572 echo "$as_me:11572: result: no" >&5
11573 echo "${ECHO_T}no" >&6
11574 LIBS="$cf_ncurses_SAVE"
11576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11579 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11581 cat >>confdefs.h <<EOF
11582 #define $cf_nculib_ROOT 1
11587 NCURSES_CONFIG=none
11592 echo "$as_me:11592: checking for X" >&5
11593 echo $ECHO_N "checking for X... $ECHO_C" >&6
11595 # Check whether --with-x or --without-x was given.
11596 if test "${with_x+set}" = set; then
11600 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11601 if test "x$with_x" = xno; then
11602 # The user explicitly disabled X.
11605 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11606 # Both variables are already set.
11609 if test "${ac_cv_have_x+set}" = set; then
11610 echo $ECHO_N "(cached) $ECHO_C" >&6
11612 # One or both of the vars are not set, and there is no cached value.
11613 ac_x_includes=no ac_x_libraries=no
11614 rm -fr conftest.dir
11615 if mkdir conftest.dir; then
11617 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11618 cat >Imakefile <<'EOF'
11620 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11622 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11623 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11624 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11625 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11626 for ac_extension in a so sl dylib dll; do
11627 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11628 test -f $ac_im_libdir/libX11.$ac_extension; then
11629 ac_im_usrlibdir=$ac_im_libdir; break
11632 # Screen out bogus values from the imake configuration. They are
11633 # bogus both because they are the default anyway, and because
11634 # using them would break gcc on systems where it needs fixed includes.
11635 case $ac_im_incroot in
11637 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11639 case $ac_im_usrlibdir in
11640 /usr/lib | /lib) ;;
11641 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11645 rm -fr conftest.dir
11648 # Standard set of common directories for X headers.
11649 # Check X11 before X11Rn because it is often a symlink to the current release.
11666 /usr/local/X11/include
11667 /usr/local/X11R7/include
11668 /usr/local/X11R6/include
11669 /usr/local/X11R5/include
11670 /usr/local/X11R4/include
11672 /usr/local/include/X11
11673 /usr/local/include/X11R7
11674 /usr/local/include/X11R6
11675 /usr/local/include/X11R5
11676 /usr/local/include/X11R4
11680 /usr/XFree86/include/X11
11684 /usr/unsupported/include
11685 /usr/athena/include
11686 /usr/local/x11r5/include
11687 /usr/lpp/Xamples/include
11689 /usr/openwin/include
11690 /usr/openwin/share/include'
11692 if test "$ac_x_includes" = no; then
11693 # Guess where to find include files, by looking for Intrinsic.h.
11694 # First, try using that file with no special directory specified.
11695 cat >conftest.$ac_ext <<_ACEOF
11696 #line 11696 "configure"
11697 #include "confdefs.h"
11698 #include <X11/Intrinsic.h>
11700 if { (eval echo "$as_me:11700: \"$ac_cpp conftest.$ac_ext\"") >&5
11701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11703 egrep -v '^ *\+' conftest.er1 >conftest.err
11705 cat conftest.err >&5
11706 echo "$as_me:11706: \$? = $ac_status" >&5
11707 (exit $ac_status); } >/dev/null; then
11708 if test -s conftest.err; then
11709 ac_cpp_err=$ac_c_preproc_warn_flag
11716 if test -z "$ac_cpp_err"; then
11717 # We can compile using X headers with no special include directory.
11720 echo "$as_me: failed program was:" >&5
11721 cat conftest.$ac_ext >&5
11722 for ac_dir in $ac_x_header_dirs; do
11723 if test -r "$ac_dir/X11/Intrinsic.h"; then
11724 ac_x_includes=$ac_dir
11729 rm -f conftest.err conftest.$ac_ext
11730 fi # $ac_x_includes = no
11732 if test "$ac_x_libraries" = no; then
11733 # Check for the libraries.
11734 # See if we find them without any special options.
11735 # Don't add to $LIBS permanently.
11738 cat >conftest.$ac_ext <<_ACEOF
11739 #line 11739 "configure"
11740 #include "confdefs.h"
11741 #include <X11/Intrinsic.h>
11750 rm -f conftest.$ac_objext conftest$ac_exeext
11751 if { (eval echo "$as_me:11751: \"$ac_link\"") >&5
11752 (eval $ac_link) 2>&5
11754 echo "$as_me:11754: \$? = $ac_status" >&5
11755 (exit $ac_status); } &&
11756 { ac_try='test -s conftest$ac_exeext'
11757 { (eval echo "$as_me:11757: \"$ac_try\"") >&5
11758 (eval $ac_try) 2>&5
11760 echo "$as_me:11760: \$? = $ac_status" >&5
11761 (exit $ac_status); }; }; then
11763 # We can link X programs with no special library path.
11766 echo "$as_me: failed program was:" >&5
11767 cat conftest.$ac_ext >&5
11769 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11771 # Don't even attempt the hair of trying to link an X program!
11772 for ac_extension in a so sl dylib dll; do
11773 if test -r $ac_dir/libXt.$ac_extension; then
11774 ac_x_libraries=$ac_dir
11780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11781 fi # $ac_x_libraries = no
11783 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11784 # Didn't find X anywhere. Cache the known absence of X.
11785 ac_cv_have_x="have_x=no"
11787 # Record where we found X for the cache.
11788 ac_cv_have_x="have_x=yes \
11789 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11794 eval "$ac_cv_have_x"
11797 if test "$have_x" != yes; then
11798 echo "$as_me:11798: result: $have_x" >&5
11799 echo "${ECHO_T}$have_x" >&6
11802 # If each of the values was on the command line, it overrides each guess.
11803 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11804 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11805 # Update the cache value to reflect the command line values.
11806 ac_cv_have_x="have_x=yes \
11807 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11808 echo "$as_me:11808: result: libraries $x_libraries, headers $x_includes" >&5
11809 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11812 if test "$no_x" = yes; then
11813 # Not all programs may use this symbol, but it does not hurt to define it.
11815 cat >>confdefs.h <<\EOF
11816 #define X_DISPLAY_MISSING 1
11819 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11821 if test -n "$x_includes"; then
11822 X_CFLAGS="$X_CFLAGS -I$x_includes"
11825 # It would also be nice to do this for all -L options, not just this one.
11826 if test -n "$x_libraries"; then
11827 X_LIBS="$X_LIBS -L$x_libraries"
11828 # For Solaris; some versions of Sun CC require a space after -R and
11829 # others require no space. Words are not sufficient . . . .
11830 case `(uname -sr) 2>/dev/null` in
11832 echo "$as_me:11832: checking whether -R must be followed by a space" >&5
11833 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11834 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11835 cat >conftest.$ac_ext <<_ACEOF
11836 #line 11836 "configure"
11837 #include "confdefs.h"
11847 rm -f conftest.$ac_objext conftest$ac_exeext
11848 if { (eval echo "$as_me:11848: \"$ac_link\"") >&5
11849 (eval $ac_link) 2>&5
11851 echo "$as_me:11851: \$? = $ac_status" >&5
11852 (exit $ac_status); } &&
11853 { ac_try='test -s conftest$ac_exeext'
11854 { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855 (eval $ac_try) 2>&5
11857 echo "$as_me:11857: \$? = $ac_status" >&5
11858 (exit $ac_status); }; }; then
11861 echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11866 if test $ac_R_nospace = yes; then
11867 echo "$as_me:11867: result: no" >&5
11868 echo "${ECHO_T}no" >&6
11869 X_LIBS="$X_LIBS -R$x_libraries"
11871 LIBS="$ac_xsave_LIBS -R $x_libraries"
11872 cat >conftest.$ac_ext <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11884 rm -f conftest.$ac_objext conftest$ac_exeext
11885 if { (eval echo "$as_me:11885: \"$ac_link\"") >&5
11886 (eval $ac_link) 2>&5
11888 echo "$as_me:11888: \$? = $ac_status" >&5
11889 (exit $ac_status); } &&
11890 { ac_try='test -s conftest$ac_exeext'
11891 { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892 (eval $ac_try) 2>&5
11894 echo "$as_me:11894: \$? = $ac_status" >&5
11895 (exit $ac_status); }; }; then
11898 echo "$as_me: failed program was:" >&5
11899 cat conftest.$ac_ext >&5
11902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11903 if test $ac_R_space = yes; then
11904 echo "$as_me:11904: result: yes" >&5
11905 echo "${ECHO_T}yes" >&6
11906 X_LIBS="$X_LIBS -R $x_libraries"
11908 echo "$as_me:11908: result: neither works" >&5
11909 echo "${ECHO_T}neither works" >&6
11912 LIBS=$ac_xsave_LIBS
11916 # Check for system-dependent libraries X programs must link with.
11917 # Do this before checking for the system-independent R6 libraries
11918 # (-lICE), since we may need -lsocket or whatever for X linking.
11920 if test "$ISC" = yes; then
11921 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11923 # Martyn Johnson says this is needed for Ultrix, if the X
11924 # libraries were built with DECnet support. And Karl Berry says
11925 # the Alpha needs dnet_stub (dnet does not exist).
11926 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11927 cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11931 /* Override any gcc2 internal prototype to avoid an error. */
11935 /* We use char because int might match the return type of a gcc2
11936 builtin and then its argument prototype would still apply. */
11937 char XOpenDisplay ();
11946 rm -f conftest.$ac_objext conftest$ac_exeext
11947 if { (eval echo "$as_me:11947: \"$ac_link\"") >&5
11948 (eval $ac_link) 2>&5
11950 echo "$as_me:11950: \$? = $ac_status" >&5
11951 (exit $ac_status); } &&
11952 { ac_try='test -s conftest$ac_exeext'
11953 { (eval echo "$as_me:11953: \"$ac_try\"") >&5
11954 (eval $ac_try) 2>&5
11956 echo "$as_me:11956: \$? = $ac_status" >&5
11957 (exit $ac_status); }; }; then
11960 echo "$as_me: failed program was:" >&5
11961 cat conftest.$ac_ext >&5
11962 echo "$as_me:11962: checking for dnet_ntoa in -ldnet" >&5
11963 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11964 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11965 echo $ECHO_N "(cached) $ECHO_C" >&6
11967 ac_check_lib_save_LIBS=$LIBS
11968 LIBS="-ldnet $LIBS"
11969 cat >conftest.$ac_ext <<_ACEOF
11970 #line 11970 "configure"
11971 #include "confdefs.h"
11973 /* Override any gcc2 internal prototype to avoid an error. */
11977 /* We use char because int might match the return type of a gcc2
11978 builtin and then its argument prototype would still apply. */
11988 rm -f conftest.$ac_objext conftest$ac_exeext
11989 if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
11990 (eval $ac_link) 2>&5
11992 echo "$as_me:11992: \$? = $ac_status" >&5
11993 (exit $ac_status); } &&
11994 { ac_try='test -s conftest$ac_exeext'
11995 { (eval echo "$as_me:11995: \"$ac_try\"") >&5
11996 (eval $ac_try) 2>&5
11998 echo "$as_me:11998: \$? = $ac_status" >&5
11999 (exit $ac_status); }; }; then
12000 ac_cv_lib_dnet_dnet_ntoa=yes
12002 echo "$as_me: failed program was:" >&5
12003 cat conftest.$ac_ext >&5
12004 ac_cv_lib_dnet_dnet_ntoa=no
12006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12007 LIBS=$ac_check_lib_save_LIBS
12009 echo "$as_me:12009: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12010 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12011 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
12012 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12015 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12016 echo "$as_me:12016: checking for dnet_ntoa in -ldnet_stub" >&5
12017 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12018 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12019 echo $ECHO_N "(cached) $ECHO_C" >&6
12021 ac_check_lib_save_LIBS=$LIBS
12022 LIBS="-ldnet_stub $LIBS"
12023 cat >conftest.$ac_ext <<_ACEOF
12024 #line 12024 "configure"
12025 #include "confdefs.h"
12027 /* Override any gcc2 internal prototype to avoid an error. */
12031 /* We use char because int might match the return type of a gcc2
12032 builtin and then its argument prototype would still apply. */
12042 rm -f conftest.$ac_objext conftest$ac_exeext
12043 if { (eval echo "$as_me:12043: \"$ac_link\"") >&5
12044 (eval $ac_link) 2>&5
12046 echo "$as_me:12046: \$? = $ac_status" >&5
12047 (exit $ac_status); } &&
12048 { ac_try='test -s conftest$ac_exeext'
12049 { (eval echo "$as_me:12049: \"$ac_try\"") >&5
12050 (eval $ac_try) 2>&5
12052 echo "$as_me:12052: \$? = $ac_status" >&5
12053 (exit $ac_status); }; }; then
12054 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12056 echo "$as_me: failed program was:" >&5
12057 cat conftest.$ac_ext >&5
12058 ac_cv_lib_dnet_stub_dnet_ntoa=no
12060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12061 LIBS=$ac_check_lib_save_LIBS
12063 echo "$as_me:12063: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12064 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12065 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
12066 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12072 LIBS="$ac_xsave_LIBS"
12074 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12075 # to get the SysV transport functions.
12076 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12078 # The nsl library prevents programs from opening the X display
12079 # on Irix 5.2, according to T.E. Dickey.
12080 # The functions gethostbyname, getservbyname, and inet_addr are
12081 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12082 echo "$as_me:12082: checking for gethostbyname" >&5
12083 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12084 if test "${ac_cv_func_gethostbyname+set}" = set; then
12085 echo $ECHO_N "(cached) $ECHO_C" >&6
12087 cat >conftest.$ac_ext <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090 #define gethostbyname autoconf_temporary
12091 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12092 #undef gethostbyname
12098 /* We use char because int might match the return type of a gcc2
12099 builtin and then its argument prototype would still apply. */
12100 char gethostbyname (void);
12106 /* The GNU C library defines stubs for functions which it implements
12107 to always fail with ENOSYS. Some functions are actually named
12108 something starting with __ and the normal name is an alias. */
12109 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12110 #error found stub for gethostbyname
12113 return gethostbyname ();
12118 rm -f conftest.$ac_objext conftest$ac_exeext
12119 if { (eval echo "$as_me:12119: \"$ac_link\"") >&5
12120 (eval $ac_link) 2>&5
12122 echo "$as_me:12122: \$? = $ac_status" >&5
12123 (exit $ac_status); } &&
12124 { ac_try='test -s conftest$ac_exeext'
12125 { (eval echo "$as_me:12125: \"$ac_try\"") >&5
12126 (eval $ac_try) 2>&5
12128 echo "$as_me:12128: \$? = $ac_status" >&5
12129 (exit $ac_status); }; }; then
12130 ac_cv_func_gethostbyname=yes
12132 echo "$as_me: failed program was:" >&5
12133 cat conftest.$ac_ext >&5
12134 ac_cv_func_gethostbyname=no
12136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12138 echo "$as_me:12138: result: $ac_cv_func_gethostbyname" >&5
12139 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12141 if test $ac_cv_func_gethostbyname = no; then
12142 echo "$as_me:12142: checking for gethostbyname in -lnsl" >&5
12143 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12144 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12145 echo $ECHO_N "(cached) $ECHO_C" >&6
12147 ac_check_lib_save_LIBS=$LIBS
12149 cat >conftest.$ac_ext <<_ACEOF
12150 #line 12150 "configure"
12151 #include "confdefs.h"
12153 /* Override any gcc2 internal prototype to avoid an error. */
12157 /* We use char because int might match the return type of a gcc2
12158 builtin and then its argument prototype would still apply. */
12159 char gethostbyname ();
12168 rm -f conftest.$ac_objext conftest$ac_exeext
12169 if { (eval echo "$as_me:12169: \"$ac_link\"") >&5
12170 (eval $ac_link) 2>&5
12172 echo "$as_me:12172: \$? = $ac_status" >&5
12173 (exit $ac_status); } &&
12174 { ac_try='test -s conftest$ac_exeext'
12175 { (eval echo "$as_me:12175: \"$ac_try\"") >&5
12176 (eval $ac_try) 2>&5
12178 echo "$as_me:12178: \$? = $ac_status" >&5
12179 (exit $ac_status); }; }; then
12180 ac_cv_lib_nsl_gethostbyname=yes
12182 echo "$as_me: failed program was:" >&5
12183 cat conftest.$ac_ext >&5
12184 ac_cv_lib_nsl_gethostbyname=no
12186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12187 LIBS=$ac_check_lib_save_LIBS
12189 echo "$as_me:12189: result: $ac_cv_lib_nsl_gethostbyname" >&5
12190 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12191 if test $ac_cv_lib_nsl_gethostbyname = yes; then
12192 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12195 if test $ac_cv_lib_nsl_gethostbyname = no; then
12196 echo "$as_me:12196: checking for gethostbyname in -lbsd" >&5
12197 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12198 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12199 echo $ECHO_N "(cached) $ECHO_C" >&6
12201 ac_check_lib_save_LIBS=$LIBS
12203 cat >conftest.$ac_ext <<_ACEOF
12204 #line 12204 "configure"
12205 #include "confdefs.h"
12207 /* Override any gcc2 internal prototype to avoid an error. */
12211 /* We use char because int might match the return type of a gcc2
12212 builtin and then its argument prototype would still apply. */
12213 char gethostbyname ();
12222 rm -f conftest.$ac_objext conftest$ac_exeext
12223 if { (eval echo "$as_me:12223: \"$ac_link\"") >&5
12224 (eval $ac_link) 2>&5
12226 echo "$as_me:12226: \$? = $ac_status" >&5
12227 (exit $ac_status); } &&
12228 { ac_try='test -s conftest$ac_exeext'
12229 { (eval echo "$as_me:12229: \"$ac_try\"") >&5
12230 (eval $ac_try) 2>&5
12232 echo "$as_me:12232: \$? = $ac_status" >&5
12233 (exit $ac_status); }; }; then
12234 ac_cv_lib_bsd_gethostbyname=yes
12236 echo "$as_me: failed program was:" >&5
12237 cat conftest.$ac_ext >&5
12238 ac_cv_lib_bsd_gethostbyname=no
12240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12241 LIBS=$ac_check_lib_save_LIBS
12243 echo "$as_me:12243: result: $ac_cv_lib_bsd_gethostbyname" >&5
12244 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12245 if test $ac_cv_lib_bsd_gethostbyname = yes; then
12246 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12252 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12253 # socket/setsockopt and other routines are undefined under SCO ODT
12254 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12255 # on later versions), says Simon Leinen: it contains gethostby*
12256 # variants that don't use the nameserver (or something). -lsocket
12257 # must be given before -lnsl if both are needed. We assume that
12258 # if connect needs -lnsl, so does gethostbyname.
12259 echo "$as_me:12259: checking for connect" >&5
12260 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12261 if test "${ac_cv_func_connect+set}" = set; then
12262 echo $ECHO_N "(cached) $ECHO_C" >&6
12264 cat >conftest.$ac_ext <<_ACEOF
12265 #line 12265 "configure"
12266 #include "confdefs.h"
12267 #define connect autoconf_temporary
12268 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12275 /* We use char because int might match the return type of a gcc2
12276 builtin and then its argument prototype would still apply. */
12277 char connect (void);
12283 /* The GNU C library defines stubs for functions which it implements
12284 to always fail with ENOSYS. Some functions are actually named
12285 something starting with __ and the normal name is an alias. */
12286 #if defined (__stub_connect) || defined (__stub___connect)
12287 #error found stub for connect
12295 rm -f conftest.$ac_objext conftest$ac_exeext
12296 if { (eval echo "$as_me:12296: \"$ac_link\"") >&5
12297 (eval $ac_link) 2>&5
12299 echo "$as_me:12299: \$? = $ac_status" >&5
12300 (exit $ac_status); } &&
12301 { ac_try='test -s conftest$ac_exeext'
12302 { (eval echo "$as_me:12302: \"$ac_try\"") >&5
12303 (eval $ac_try) 2>&5
12305 echo "$as_me:12305: \$? = $ac_status" >&5
12306 (exit $ac_status); }; }; then
12307 ac_cv_func_connect=yes
12309 echo "$as_me: failed program was:" >&5
12310 cat conftest.$ac_ext >&5
12311 ac_cv_func_connect=no
12313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12315 echo "$as_me:12315: result: $ac_cv_func_connect" >&5
12316 echo "${ECHO_T}$ac_cv_func_connect" >&6
12318 if test $ac_cv_func_connect = no; then
12319 echo "$as_me:12319: checking for connect in -lsocket" >&5
12320 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12321 if test "${ac_cv_lib_socket_connect+set}" = set; then
12322 echo $ECHO_N "(cached) $ECHO_C" >&6
12324 ac_check_lib_save_LIBS=$LIBS
12325 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12326 cat >conftest.$ac_ext <<_ACEOF
12327 #line 12327 "configure"
12328 #include "confdefs.h"
12330 /* Override any gcc2 internal prototype to avoid an error. */
12334 /* We use char because int might match the return type of a gcc2
12335 builtin and then its argument prototype would still apply. */
12345 rm -f conftest.$ac_objext conftest$ac_exeext
12346 if { (eval echo "$as_me:12346: \"$ac_link\"") >&5
12347 (eval $ac_link) 2>&5
12349 echo "$as_me:12349: \$? = $ac_status" >&5
12350 (exit $ac_status); } &&
12351 { ac_try='test -s conftest$ac_exeext'
12352 { (eval echo "$as_me:12352: \"$ac_try\"") >&5
12353 (eval $ac_try) 2>&5
12355 echo "$as_me:12355: \$? = $ac_status" >&5
12356 (exit $ac_status); }; }; then
12357 ac_cv_lib_socket_connect=yes
12359 echo "$as_me: failed program was:" >&5
12360 cat conftest.$ac_ext >&5
12361 ac_cv_lib_socket_connect=no
12363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12364 LIBS=$ac_check_lib_save_LIBS
12366 echo "$as_me:12366: result: $ac_cv_lib_socket_connect" >&5
12367 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12368 if test $ac_cv_lib_socket_connect = yes; then
12369 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12374 # Guillermo Gomez says -lposix is necessary on A/UX.
12375 echo "$as_me:12375: checking for remove" >&5
12376 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12377 if test "${ac_cv_func_remove+set}" = set; then
12378 echo $ECHO_N "(cached) $ECHO_C" >&6
12380 cat >conftest.$ac_ext <<_ACEOF
12381 #line 12381 "configure"
12382 #include "confdefs.h"
12383 #define remove autoconf_temporary
12384 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12391 /* We use char because int might match the return type of a gcc2
12392 builtin and then its argument prototype would still apply. */
12393 char remove (void);
12399 /* The GNU C library defines stubs for functions which it implements
12400 to always fail with ENOSYS. Some functions are actually named
12401 something starting with __ and the normal name is an alias. */
12402 #if defined (__stub_remove) || defined (__stub___remove)
12403 #error found stub for remove
12411 rm -f conftest.$ac_objext conftest$ac_exeext
12412 if { (eval echo "$as_me:12412: \"$ac_link\"") >&5
12413 (eval $ac_link) 2>&5
12415 echo "$as_me:12415: \$? = $ac_status" >&5
12416 (exit $ac_status); } &&
12417 { ac_try='test -s conftest$ac_exeext'
12418 { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12421 echo "$as_me:12421: \$? = $ac_status" >&5
12422 (exit $ac_status); }; }; then
12423 ac_cv_func_remove=yes
12425 echo "$as_me: failed program was:" >&5
12426 cat conftest.$ac_ext >&5
12427 ac_cv_func_remove=no
12429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12431 echo "$as_me:12431: result: $ac_cv_func_remove" >&5
12432 echo "${ECHO_T}$ac_cv_func_remove" >&6
12434 if test $ac_cv_func_remove = no; then
12435 echo "$as_me:12435: checking for remove in -lposix" >&5
12436 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12437 if test "${ac_cv_lib_posix_remove+set}" = set; then
12438 echo $ECHO_N "(cached) $ECHO_C" >&6
12440 ac_check_lib_save_LIBS=$LIBS
12441 LIBS="-lposix $LIBS"
12442 cat >conftest.$ac_ext <<_ACEOF
12443 #line 12443 "configure"
12444 #include "confdefs.h"
12446 /* Override any gcc2 internal prototype to avoid an error. */
12450 /* We use char because int might match the return type of a gcc2
12451 builtin and then its argument prototype would still apply. */
12461 rm -f conftest.$ac_objext conftest$ac_exeext
12462 if { (eval echo "$as_me:12462: \"$ac_link\"") >&5
12463 (eval $ac_link) 2>&5
12465 echo "$as_me:12465: \$? = $ac_status" >&5
12466 (exit $ac_status); } &&
12467 { ac_try='test -s conftest$ac_exeext'
12468 { (eval echo "$as_me:12468: \"$ac_try\"") >&5
12469 (eval $ac_try) 2>&5
12471 echo "$as_me:12471: \$? = $ac_status" >&5
12472 (exit $ac_status); }; }; then
12473 ac_cv_lib_posix_remove=yes
12475 echo "$as_me: failed program was:" >&5
12476 cat conftest.$ac_ext >&5
12477 ac_cv_lib_posix_remove=no
12479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12480 LIBS=$ac_check_lib_save_LIBS
12482 echo "$as_me:12482: result: $ac_cv_lib_posix_remove" >&5
12483 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12484 if test $ac_cv_lib_posix_remove = yes; then
12485 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12490 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12491 echo "$as_me:12491: checking for shmat" >&5
12492 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12493 if test "${ac_cv_func_shmat+set}" = set; then
12494 echo $ECHO_N "(cached) $ECHO_C" >&6
12496 cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499 #define shmat autoconf_temporary
12500 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12507 /* We use char because int might match the return type of a gcc2
12508 builtin and then its argument prototype would still apply. */
12515 /* The GNU C library defines stubs for functions which it implements
12516 to always fail with ENOSYS. Some functions are actually named
12517 something starting with __ and the normal name is an alias. */
12518 #if defined (__stub_shmat) || defined (__stub___shmat)
12519 #error found stub for shmat
12527 rm -f conftest.$ac_objext conftest$ac_exeext
12528 if { (eval echo "$as_me:12528: \"$ac_link\"") >&5
12529 (eval $ac_link) 2>&5
12531 echo "$as_me:12531: \$? = $ac_status" >&5
12532 (exit $ac_status); } &&
12533 { ac_try='test -s conftest$ac_exeext'
12534 { (eval echo "$as_me:12534: \"$ac_try\"") >&5
12535 (eval $ac_try) 2>&5
12537 echo "$as_me:12537: \$? = $ac_status" >&5
12538 (exit $ac_status); }; }; then
12539 ac_cv_func_shmat=yes
12541 echo "$as_me: failed program was:" >&5
12542 cat conftest.$ac_ext >&5
12543 ac_cv_func_shmat=no
12545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12547 echo "$as_me:12547: result: $ac_cv_func_shmat" >&5
12548 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12550 if test $ac_cv_func_shmat = no; then
12551 echo "$as_me:12551: checking for shmat in -lipc" >&5
12552 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12553 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12554 echo $ECHO_N "(cached) $ECHO_C" >&6
12556 ac_check_lib_save_LIBS=$LIBS
12558 cat >conftest.$ac_ext <<_ACEOF
12559 #line 12559 "configure"
12560 #include "confdefs.h"
12562 /* Override any gcc2 internal prototype to avoid an error. */
12566 /* We use char because int might match the return type of a gcc2
12567 builtin and then its argument prototype would still apply. */
12577 rm -f conftest.$ac_objext conftest$ac_exeext
12578 if { (eval echo "$as_me:12578: \"$ac_link\"") >&5
12579 (eval $ac_link) 2>&5
12581 echo "$as_me:12581: \$? = $ac_status" >&5
12582 (exit $ac_status); } &&
12583 { ac_try='test -s conftest$ac_exeext'
12584 { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585 (eval $ac_try) 2>&5
12587 echo "$as_me:12587: \$? = $ac_status" >&5
12588 (exit $ac_status); }; }; then
12589 ac_cv_lib_ipc_shmat=yes
12591 echo "$as_me: failed program was:" >&5
12592 cat conftest.$ac_ext >&5
12593 ac_cv_lib_ipc_shmat=no
12595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12596 LIBS=$ac_check_lib_save_LIBS
12598 echo "$as_me:12598: result: $ac_cv_lib_ipc_shmat" >&5
12599 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12600 if test $ac_cv_lib_ipc_shmat = yes; then
12601 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12607 # Check for libraries that X11R6 Xt/Xaw programs need.
12608 ac_save_LDFLAGS=$LDFLAGS
12609 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12610 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12611 # check for ICE first), but we must link in the order -lSM -lICE or
12612 # we get undefined symbols. So assume we have SM if we have ICE.
12613 # These have to be linked with before -lX11, unlike the other
12614 # libraries we check for below, so use a different variable.
12615 # John Interrante, Karl Berry
12616 echo "$as_me:12616: checking for IceConnectionNumber in -lICE" >&5
12617 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12618 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
12621 ac_check_lib_save_LIBS=$LIBS
12622 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12623 cat >conftest.$ac_ext <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12627 /* Override any gcc2 internal prototype to avoid an error. */
12631 /* We use char because int might match the return type of a gcc2
12632 builtin and then its argument prototype would still apply. */
12633 char IceConnectionNumber ();
12637 IceConnectionNumber ();
12642 rm -f conftest.$ac_objext conftest$ac_exeext
12643 if { (eval echo "$as_me:12643: \"$ac_link\"") >&5
12644 (eval $ac_link) 2>&5
12646 echo "$as_me:12646: \$? = $ac_status" >&5
12647 (exit $ac_status); } &&
12648 { ac_try='test -s conftest$ac_exeext'
12649 { (eval echo "$as_me:12649: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12652 echo "$as_me:12652: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
12654 ac_cv_lib_ICE_IceConnectionNumber=yes
12656 echo "$as_me: failed program was:" >&5
12657 cat conftest.$ac_ext >&5
12658 ac_cv_lib_ICE_IceConnectionNumber=no
12660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12661 LIBS=$ac_check_lib_save_LIBS
12663 echo "$as_me:12663: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12664 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12665 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12666 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12669 LDFLAGS=$ac_save_LDFLAGS
12673 cf_x_athena=${cf_x_athena:-Xaw}
12675 echo "$as_me:12675: checking if you want to link with Xaw 3d library" >&5
12676 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12679 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12680 if test "${with_Xaw3d+set}" = set; then
12681 withval="$with_Xaw3d"
12684 if test "$withval" = yes ; then
12686 echo "$as_me:12686: result: yes" >&5
12687 echo "${ECHO_T}yes" >&6
12689 echo "$as_me:12689: result: no" >&5
12690 echo "${ECHO_T}no" >&6
12693 echo "$as_me:12693: checking if you want to link with Xaw 3d xft library" >&5
12694 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12697 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12698 if test "${with_Xaw3dxft+set}" = set; then
12699 withval="$with_Xaw3dxft"
12702 if test "$withval" = yes ; then
12703 cf_x_athena=Xaw3dxft
12704 echo "$as_me:12704: result: yes" >&5
12705 echo "${ECHO_T}yes" >&6
12707 echo "$as_me:12707: result: no" >&5
12708 echo "${ECHO_T}no" >&6
12711 echo "$as_me:12711: checking if you want to link with neXT Athena library" >&5
12712 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12715 # Check whether --with-neXtaw or --without-neXtaw was given.
12716 if test "${with_neXtaw+set}" = set; then
12717 withval="$with_neXtaw"
12720 if test "$withval" = yes ; then
12722 echo "$as_me:12722: result: yes" >&5
12723 echo "${ECHO_T}yes" >&6
12725 echo "$as_me:12725: result: no" >&5
12726 echo "${ECHO_T}no" >&6
12729 echo "$as_me:12729: checking if you want to link with Athena-Plus library" >&5
12730 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12733 # Check whether --with-XawPlus or --without-XawPlus was given.
12734 if test "${with_XawPlus+set}" = set; then
12735 withval="$with_XawPlus"
12738 if test "$withval" = yes ; then
12739 cf_x_athena=XawPlus
12740 echo "$as_me:12740: result: yes" >&5
12741 echo "${ECHO_T}yes" >&6
12743 echo "$as_me:12743: result: no" >&5
12744 echo "${ECHO_T}no" >&6
12749 if test "$PKG_CONFIG" != none ; then
12751 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12752 for cf_athena_pkg in \
12755 ${cf_x_athena}-devel \
12756 lib${cf_x_athena} \
12757 lib${cf_x_athena}-devel
12760 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12761 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12763 echo "${as_me:-configure}:12763: testing found package $cf_athena_pkg ..." 1>&5
12765 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12766 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12767 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12769 echo "${as_me:-configure}:12769: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12771 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12773 echo "${as_me:-configure}:12773: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12778 cf_new_extra_cppflags=
12780 for cf_add_cflags in $cf_pkgconfig_incs
12782 case $cf_fix_cppflags in
12784 case $cf_add_cflags in
12785 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12786 case $cf_add_cflags in
12788 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12791 && test -z "${cf_tst_cflags}" \
12792 && cf_fix_cppflags=yes
12794 if test $cf_fix_cppflags = yes ; then
12796 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12797 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12800 elif test "${cf_tst_cflags}" = "\"'" ; then
12802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12809 case "$CPPFLAGS" in
12813 case $cf_add_cflags in
12815 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12817 CPPFLAGS=`echo "$CPPFLAGS" | \
12818 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12819 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12824 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12825 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12832 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12833 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12843 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12845 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12846 && test -z "${cf_tst_cflags}" \
12847 && cf_fix_cppflags=no
12852 if test -n "$cf_new_cflags" ; then
12854 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12855 CFLAGS="${CFLAGS}$cf_new_cflags"
12859 if test -n "$cf_new_cppflags" ; then
12861 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12862 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12866 if test -n "$cf_new_extra_cppflags" ; then
12868 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12869 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12873 cf_add_libs="$LIBS"
12876 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12877 # filter duplicates
12878 for cf_add_1lib in $cf_add_0lib; do
12879 for cf_add_2lib in $cf_add_libs; do
12880 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12885 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12887 LIBS="$cf_add_libs"
12889 cf_x_athena_lib="$cf_pkgconfig_libs"
12891 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12893 cat >>confdefs.h <<EOF
12894 #define $cf_x_athena_LIBS 1
12897 for cf_trim_lib in Xmu Xt X11
12900 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12901 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12902 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12904 echo "${as_me:-configure}:12904: testing ..trimmed $LIBS ..." 1>&5
12910 echo "$as_me:12910: checking for usable $cf_x_athena/Xmu package" >&5
12911 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12912 if test "${cf_cv_xaw_compat+set}" = set; then
12913 echo $ECHO_N "(cached) $ECHO_C" >&6
12916 cat >conftest.$ac_ext <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12920 #include <X11/Xmu/CharSet.h>
12926 int check = XmuCompareISOLatin1("big", "small")
12932 rm -f conftest.$ac_objext conftest$ac_exeext
12933 if { (eval echo "$as_me:12933: \"$ac_link\"") >&5
12934 (eval $ac_link) 2>&5
12936 echo "$as_me:12936: \$? = $ac_status" >&5
12937 (exit $ac_status); } &&
12938 { ac_try='test -s conftest$ac_exeext'
12939 { (eval echo "$as_me:12939: \"$ac_try\"") >&5
12940 (eval $ac_try) 2>&5
12942 echo "$as_me:12942: \$? = $ac_status" >&5
12943 (exit $ac_status); }; }; then
12944 cf_cv_xaw_compat=yes
12946 echo "$as_me: failed program was:" >&5
12947 cat conftest.$ac_ext >&5
12948 cf_cv_xaw_compat=no
12950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12952 echo "$as_me:12952: result: $cf_cv_xaw_compat" >&5
12953 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12955 if test "$cf_cv_xaw_compat" = no
12957 # workaround for broken ".pc" files...
12958 case "$cf_x_athena_lib" in
12962 test -n "$verbose" && echo " work around broken package" 1>&6
12964 echo "${as_me:-configure}:12964: testing work around broken package ..." 1>&5
12966 cf_save_xmu="$LIBS"
12967 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12969 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12970 test -n "$verbose" && echo " found package xmu" 1>&6
12972 echo "${as_me:-configure}:12972: testing found package xmu ..." 1>&5
12974 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12975 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12976 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12978 echo "${as_me:-configure}:12978: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12980 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12982 echo "${as_me:-configure}:12982: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12987 cf_new_extra_cppflags=
12989 for cf_add_cflags in $cf_pkgconfig_incs
12991 case $cf_fix_cppflags in
12993 case $cf_add_cflags in
12994 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12995 case $cf_add_cflags in
12997 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12999 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13000 && test -z "${cf_tst_cflags}" \
13001 && cf_fix_cppflags=yes
13003 if test $cf_fix_cppflags = yes ; then
13005 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13006 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13009 elif test "${cf_tst_cflags}" = "\"'" ; then
13011 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13012 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13018 case "$CPPFLAGS" in
13022 case $cf_add_cflags in
13024 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13026 CPPFLAGS=`echo "$CPPFLAGS" | \
13027 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13028 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13033 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13034 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13041 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13042 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13052 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13054 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13055 && test -z "${cf_tst_cflags}" \
13056 && cf_fix_cppflags=no
13061 if test -n "$cf_new_cflags" ; then
13063 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13064 CFLAGS="${CFLAGS}$cf_new_cflags"
13068 if test -n "$cf_new_cppflags" ; then
13070 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13071 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13075 if test -n "$cf_new_extra_cppflags" ; then
13077 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13078 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13082 cf_add_libs="$LIBS"
13085 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13086 # filter duplicates
13087 for cf_add_1lib in $cf_add_0lib; do
13088 for cf_add_2lib in $cf_add_libs; do
13089 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13094 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13096 LIBS="$cf_add_libs"
13098 LIBS="$cf_save_xmu"
13100 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13102 echo "${as_me:-configure}:13102: testing ...before $LIBS ..." 1>&5
13104 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13105 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13107 echo "${as_me:-configure}:13107: testing ...after $LIBS ..." 1>&5
13113 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13115 echo "${as_me:-configure}:13115: testing ...before $LIBS ..." 1>&5
13117 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13118 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13120 echo "${as_me:-configure}:13120: testing ...after $LIBS ..." 1>&5
13124 for cf_trim_lib in Xmu Xt X11
13127 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13128 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13129 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13131 echo "${as_me:-configure}:13131: testing ..trimmed $LIBS ..." 1>&5
13151 if test -z "$cf_x_athena_lib" ; then
13153 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
13154 test -n "$verbose" && echo " found package Xext" 1>&6
13156 echo "${as_me:-configure}:13156: testing found package Xext ..." 1>&5
13158 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
13159 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
13160 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13162 echo "${as_me:-configure}:13162: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13164 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13166 echo "${as_me:-configure}:13166: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13171 cf_new_extra_cppflags=
13173 for cf_add_cflags in $cf_pkgconfig_incs
13175 case $cf_fix_cppflags in
13177 case $cf_add_cflags in
13178 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13179 case $cf_add_cflags in
13181 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13184 && test -z "${cf_tst_cflags}" \
13185 && cf_fix_cppflags=yes
13187 if test $cf_fix_cppflags = yes ; then
13189 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13190 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13193 elif test "${cf_tst_cflags}" = "\"'" ; then
13195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13202 case "$CPPFLAGS" in
13206 case $cf_add_cflags in
13208 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13210 CPPFLAGS=`echo "$CPPFLAGS" | \
13211 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13212 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13217 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13218 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13225 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13226 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13236 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13238 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13239 && test -z "${cf_tst_cflags}" \
13240 && cf_fix_cppflags=no
13245 if test -n "$cf_new_cflags" ; then
13247 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13248 CFLAGS="${CFLAGS}$cf_new_cflags"
13252 if test -n "$cf_new_cppflags" ; then
13254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13255 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13259 if test -n "$cf_new_extra_cppflags" ; then
13261 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13262 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13266 cf_add_libs="$LIBS"
13269 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13270 # filter duplicates
13271 for cf_add_1lib in $cf_add_0lib; do
13272 for cf_add_2lib in $cf_add_libs; do
13273 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13278 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13280 LIBS="$cf_add_libs"
13287 echo "$as_me:13287: checking for XextCreateExtension in -lXext" >&5
13288 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13289 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13290 echo $ECHO_N "(cached) $ECHO_C" >&6
13292 ac_check_lib_save_LIBS=$LIBS
13293 LIBS="-lXext $LIBS"
13294 cat >conftest.$ac_ext <<_ACEOF
13295 #line 13295 "configure"
13296 #include "confdefs.h"
13298 /* Override any gcc2 internal prototype to avoid an error. */
13302 /* We use char because int might match the return type of a gcc2
13303 builtin and then its argument prototype would still apply. */
13304 char XextCreateExtension ();
13308 XextCreateExtension ();
13313 rm -f conftest.$ac_objext conftest$ac_exeext
13314 if { (eval echo "$as_me:13314: \"$ac_link\"") >&5
13315 (eval $ac_link) 2>&5
13317 echo "$as_me:13317: \$? = $ac_status" >&5
13318 (exit $ac_status); } &&
13319 { ac_try='test -s conftest$ac_exeext'
13320 { (eval echo "$as_me:13320: \"$ac_try\"") >&5
13321 (eval $ac_try) 2>&5
13323 echo "$as_me:13323: \$? = $ac_status" >&5
13324 (exit $ac_status); }; }; then
13325 ac_cv_lib_Xext_XextCreateExtension=yes
13327 echo "$as_me: failed program was:" >&5
13328 cat conftest.$ac_ext >&5
13329 ac_cv_lib_Xext_XextCreateExtension=no
13331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13332 LIBS=$ac_check_lib_save_LIBS
13334 echo "$as_me:13334: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13335 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13336 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
13338 cf_add_libs="$LIBS"
13341 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13342 # filter duplicates
13343 for cf_add_1lib in $cf_add_0lib; do
13344 for cf_add_2lib in $cf_add_libs; do
13345 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13350 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13352 LIBS="$cf_add_libs"
13358 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13359 # in some cases has installed dummy files in the former, other cases replaced
13360 # it with a link to the new location). This complicates the configure script.
13361 # Check for that pitfall, and recover using pkg-config
13363 # If none of these are set, the configuration is almost certainly broken.
13364 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13367 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13368 test -n "$verbose" && echo " found package x11" 1>&6
13370 echo "${as_me:-configure}:13370: testing found package x11 ..." 1>&5
13372 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13373 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13374 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13376 echo "${as_me:-configure}:13376: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13378 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13380 echo "${as_me:-configure}:13380: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13385 cf_new_extra_cppflags=
13387 for cf_add_cflags in $cf_pkgconfig_incs
13389 case $cf_fix_cppflags in
13391 case $cf_add_cflags in
13392 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13393 case $cf_add_cflags in
13395 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13397 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13398 && test -z "${cf_tst_cflags}" \
13399 && cf_fix_cppflags=yes
13401 if test $cf_fix_cppflags = yes ; then
13403 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13404 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13407 elif test "${cf_tst_cflags}" = "\"'" ; then
13409 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13410 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13416 case "$CPPFLAGS" in
13420 case $cf_add_cflags in
13422 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13424 CPPFLAGS=`echo "$CPPFLAGS" | \
13425 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13426 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13431 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13432 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13439 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13440 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13450 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13452 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13453 && test -z "${cf_tst_cflags}" \
13454 && cf_fix_cppflags=no
13459 if test -n "$cf_new_cflags" ; then
13461 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13462 CFLAGS="${CFLAGS}$cf_new_cflags"
13466 if test -n "$cf_new_cppflags" ; then
13468 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13469 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13473 if test -n "$cf_new_extra_cppflags" ; then
13475 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13476 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13480 cf_add_libs="$LIBS"
13483 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13484 # filter duplicates
13485 for cf_add_1lib in $cf_add_0lib; do
13486 for cf_add_2lib in $cf_add_libs; do
13487 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13492 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13494 LIBS="$cf_add_libs"
13500 { echo "$as_me:13500: WARNING: unable to find X11 library" >&5
13501 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13504 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13505 test -n "$verbose" && echo " found package ice" 1>&6
13507 echo "${as_me:-configure}:13507: testing found package ice ..." 1>&5
13509 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13510 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13511 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13513 echo "${as_me:-configure}:13513: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13515 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13517 echo "${as_me:-configure}:13517: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13522 cf_new_extra_cppflags=
13524 for cf_add_cflags in $cf_pkgconfig_incs
13526 case $cf_fix_cppflags in
13528 case $cf_add_cflags in
13529 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13530 case $cf_add_cflags in
13532 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13534 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13535 && test -z "${cf_tst_cflags}" \
13536 && cf_fix_cppflags=yes
13538 if test $cf_fix_cppflags = yes ; then
13540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13544 elif test "${cf_tst_cflags}" = "\"'" ; then
13546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13553 case "$CPPFLAGS" in
13557 case $cf_add_cflags in
13559 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13561 CPPFLAGS=`echo "$CPPFLAGS" | \
13562 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13563 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13568 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13569 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13576 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13577 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13587 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13590 && test -z "${cf_tst_cflags}" \
13591 && cf_fix_cppflags=no
13596 if test -n "$cf_new_cflags" ; then
13598 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13599 CFLAGS="${CFLAGS}$cf_new_cflags"
13603 if test -n "$cf_new_cppflags" ; then
13605 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13606 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13610 if test -n "$cf_new_extra_cppflags" ; then
13612 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13613 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13617 cf_add_libs="$LIBS"
13620 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13621 # filter duplicates
13622 for cf_add_1lib in $cf_add_0lib; do
13623 for cf_add_2lib in $cf_add_libs; do
13624 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13629 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13631 LIBS="$cf_add_libs"
13637 { echo "$as_me:13637: WARNING: unable to find ICE library" >&5
13638 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13641 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13642 test -n "$verbose" && echo " found package sm" 1>&6
13644 echo "${as_me:-configure}:13644: testing found package sm ..." 1>&5
13646 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13647 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13648 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13650 echo "${as_me:-configure}:13650: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13652 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13654 echo "${as_me:-configure}:13654: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13659 cf_new_extra_cppflags=
13661 for cf_add_cflags in $cf_pkgconfig_incs
13663 case $cf_fix_cppflags in
13665 case $cf_add_cflags in
13666 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13667 case $cf_add_cflags in
13669 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13671 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13672 && test -z "${cf_tst_cflags}" \
13673 && cf_fix_cppflags=yes
13675 if test $cf_fix_cppflags = yes ; then
13677 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13678 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13681 elif test "${cf_tst_cflags}" = "\"'" ; then
13683 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13684 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13690 case "$CPPFLAGS" in
13694 case $cf_add_cflags in
13696 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13698 CPPFLAGS=`echo "$CPPFLAGS" | \
13699 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13700 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13705 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13706 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13713 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13714 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13721 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13722 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13724 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13726 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13727 && test -z "${cf_tst_cflags}" \
13728 && cf_fix_cppflags=no
13733 if test -n "$cf_new_cflags" ; then
13735 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13736 CFLAGS="${CFLAGS}$cf_new_cflags"
13740 if test -n "$cf_new_cppflags" ; then
13742 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13743 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13747 if test -n "$cf_new_extra_cppflags" ; then
13749 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13750 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13754 cf_add_libs="$LIBS"
13757 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13758 # filter duplicates
13759 for cf_add_1lib in $cf_add_0lib; do
13760 for cf_add_2lib in $cf_add_libs; do
13761 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13766 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13768 LIBS="$cf_add_libs"
13774 { echo "$as_me:13774: WARNING: unable to find SM library" >&5
13775 echo "$as_me: WARNING: unable to find SM library" >&2;}
13778 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13779 test -n "$verbose" && echo " found package xt" 1>&6
13781 echo "${as_me:-configure}:13781: testing found package xt ..." 1>&5
13783 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13784 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13785 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13787 echo "${as_me:-configure}:13787: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13789 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13791 echo "${as_me:-configure}:13791: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13796 cf_new_extra_cppflags=
13798 for cf_add_cflags in $cf_pkgconfig_incs
13800 case $cf_fix_cppflags in
13802 case $cf_add_cflags in
13803 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13804 case $cf_add_cflags in
13806 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13809 && test -z "${cf_tst_cflags}" \
13810 && cf_fix_cppflags=yes
13812 if test $cf_fix_cppflags = yes ; then
13814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13818 elif test "${cf_tst_cflags}" = "\"'" ; then
13820 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13821 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13827 case "$CPPFLAGS" in
13831 case $cf_add_cflags in
13833 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13835 CPPFLAGS=`echo "$CPPFLAGS" | \
13836 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13837 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13842 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13843 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13850 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13851 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13864 && test -z "${cf_tst_cflags}" \
13865 && cf_fix_cppflags=no
13870 if test -n "$cf_new_cflags" ; then
13872 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13873 CFLAGS="${CFLAGS}$cf_new_cflags"
13877 if test -n "$cf_new_cppflags" ; then
13879 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13880 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13884 if test -n "$cf_new_extra_cppflags" ; then
13886 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13887 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13891 cf_add_libs="$LIBS"
13894 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13895 # filter duplicates
13896 for cf_add_1lib in $cf_add_0lib; do
13897 for cf_add_2lib in $cf_add_libs; do
13898 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13905 LIBS="$cf_add_libs"
13911 { echo "$as_me:13911: WARNING: unable to find Xt library" >&5
13912 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13919 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13920 test -n "$verbose" && echo " found package xt" 1>&6
13922 echo "${as_me:-configure}:13922: testing found package xt ..." 1>&5
13924 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13925 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13926 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13928 echo "${as_me:-configure}:13928: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13930 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13932 echo "${as_me:-configure}:13932: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13937 cf_new_extra_cppflags=
13939 for cf_add_cflags in $cf_pkgconfig_incs
13941 case $cf_fix_cppflags in
13943 case $cf_add_cflags in
13944 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13945 case $cf_add_cflags in
13947 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13949 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13950 && test -z "${cf_tst_cflags}" \
13951 && cf_fix_cppflags=yes
13953 if test $cf_fix_cppflags = yes ; then
13955 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13956 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13959 elif test "${cf_tst_cflags}" = "\"'" ; then
13961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13968 case "$CPPFLAGS" in
13972 case $cf_add_cflags in
13974 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13976 CPPFLAGS=`echo "$CPPFLAGS" | \
13977 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13978 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13983 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13984 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13991 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13992 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13999 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14000 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14005 && test -z "${cf_tst_cflags}" \
14006 && cf_fix_cppflags=no
14011 if test -n "$cf_new_cflags" ; then
14013 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14014 CFLAGS="${CFLAGS}$cf_new_cflags"
14018 if test -n "$cf_new_cppflags" ; then
14020 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14021 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14025 if test -n "$cf_new_extra_cppflags" ; then
14027 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14028 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14032 cf_add_libs="$LIBS"
14035 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14036 # filter duplicates
14037 for cf_add_1lib in $cf_add_0lib; do
14038 for cf_add_2lib in $cf_add_libs; do
14039 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14044 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14046 LIBS="$cf_add_libs"
14052 # we have an "xt" package, but it may omit Xt's dependency on X11
14053 echo "$as_me:14053: checking for usable X dependency" >&5
14054 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14055 if test "${cf_cv_xt_x11_compat+set}" = set; then
14056 echo $ECHO_N "(cached) $ECHO_C" >&6
14059 cat >conftest.$ac_ext <<_ACEOF
14060 #line 14060 "configure"
14061 #include "confdefs.h"
14063 #include <X11/Xlib.h>
14069 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14070 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14071 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14072 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14078 rm -f conftest.$ac_objext conftest$ac_exeext
14079 if { (eval echo "$as_me:14079: \"$ac_link\"") >&5
14080 (eval $ac_link) 2>&5
14082 echo "$as_me:14082: \$? = $ac_status" >&5
14083 (exit $ac_status); } &&
14084 { ac_try='test -s conftest$ac_exeext'
14085 { (eval echo "$as_me:14085: \"$ac_try\"") >&5
14086 (eval $ac_try) 2>&5
14088 echo "$as_me:14088: \$? = $ac_status" >&5
14089 (exit $ac_status); }; }; then
14090 cf_cv_xt_x11_compat=yes
14092 echo "$as_me: failed program was:" >&5
14093 cat conftest.$ac_ext >&5
14094 cf_cv_xt_x11_compat=no
14096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14098 echo "$as_me:14098: result: $cf_cv_xt_x11_compat" >&5
14099 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14100 if test "$cf_cv_xt_x11_compat" = no
14102 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14104 echo "${as_me:-configure}:14104: testing work around broken X11 dependency ..." 1>&5
14106 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14108 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
14109 test -n "$verbose" && echo " found package x11" 1>&6
14111 echo "${as_me:-configure}:14111: testing found package x11 ..." 1>&5
14113 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
14114 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
14115 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14117 echo "${as_me:-configure}:14117: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14119 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14121 echo "${as_me:-configure}:14121: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14126 cf_new_extra_cppflags=
14128 for cf_add_cflags in $cf_pkgconfig_incs
14130 case $cf_fix_cppflags in
14132 case $cf_add_cflags in
14133 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14134 case $cf_add_cflags in
14136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14139 && test -z "${cf_tst_cflags}" \
14140 && cf_fix_cppflags=yes
14142 if test $cf_fix_cppflags = yes ; then
14144 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14145 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14148 elif test "${cf_tst_cflags}" = "\"'" ; then
14150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14157 case "$CPPFLAGS" in
14161 case $cf_add_cflags in
14163 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14165 CPPFLAGS=`echo "$CPPFLAGS" | \
14166 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14167 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14172 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14173 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14180 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14181 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14191 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14194 && test -z "${cf_tst_cflags}" \
14195 && cf_fix_cppflags=no
14200 if test -n "$cf_new_cflags" ; then
14202 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14203 CFLAGS="${CFLAGS}$cf_new_cflags"
14207 if test -n "$cf_new_cppflags" ; then
14209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14210 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14214 if test -n "$cf_new_extra_cppflags" ; then
14216 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14217 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14221 cf_add_libs="$LIBS"
14224 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14225 # filter duplicates
14226 for cf_add_1lib in $cf_add_0lib; do
14227 for cf_add_2lib in $cf_add_libs; do
14228 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14235 LIBS="$cf_add_libs"
14242 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14244 echo "${as_me:-configure}:14244: testing ...before $LIBS ..." 1>&5
14246 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14247 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14249 echo "${as_me:-configure}:14249: testing ...after $LIBS ..." 1>&5
14257 echo "$as_me:14257: checking for usable X Toolkit package" >&5
14258 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14259 if test "${cf_cv_xt_ice_compat+set}" = set; then
14260 echo $ECHO_N "(cached) $ECHO_C" >&6
14263 cat >conftest.$ac_ext <<_ACEOF
14264 #line 14264 "configure"
14265 #include "confdefs.h"
14267 #include <X11/Shell.h>
14272 int num = IceConnectionNumber(0)
14278 rm -f conftest.$ac_objext conftest$ac_exeext
14279 if { (eval echo "$as_me:14279: \"$ac_link\"") >&5
14280 (eval $ac_link) 2>&5
14282 echo "$as_me:14282: \$? = $ac_status" >&5
14283 (exit $ac_status); } &&
14284 { ac_try='test -s conftest$ac_exeext'
14285 { (eval echo "$as_me:14285: \"$ac_try\"") >&5
14286 (eval $ac_try) 2>&5
14288 echo "$as_me:14288: \$? = $ac_status" >&5
14289 (exit $ac_status); }; }; then
14290 cf_cv_xt_ice_compat=yes
14292 echo "$as_me: failed program was:" >&5
14293 cat conftest.$ac_ext >&5
14294 cf_cv_xt_ice_compat=no
14296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14298 echo "$as_me:14298: result: $cf_cv_xt_ice_compat" >&5
14299 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14301 if test "$cf_cv_xt_ice_compat" = no
14303 # workaround for broken ".pc" files used for X Toolkit.
14304 case "x$X_PRE_LIBS" in
14310 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14312 echo "${as_me:-configure}:14312: testing work around broken ICE dependency ..." 1>&5
14314 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
14315 test -n "$verbose" && echo " found package ice" 1>&6
14317 echo "${as_me:-configure}:14317: testing found package ice ..." 1>&5
14319 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
14320 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
14321 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14323 echo "${as_me:-configure}:14323: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14325 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14327 echo "${as_me:-configure}:14327: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14332 cf_new_extra_cppflags=
14334 for cf_add_cflags in $cf_pkgconfig_incs
14336 case $cf_fix_cppflags in
14338 case $cf_add_cflags in
14339 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14340 case $cf_add_cflags in
14342 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14344 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14345 && test -z "${cf_tst_cflags}" \
14346 && cf_fix_cppflags=yes
14348 if test $cf_fix_cppflags = yes ; then
14350 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14351 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14354 elif test "${cf_tst_cflags}" = "\"'" ; then
14356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14363 case "$CPPFLAGS" in
14367 case $cf_add_cflags in
14369 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14371 CPPFLAGS=`echo "$CPPFLAGS" | \
14372 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14373 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14378 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14379 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14386 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14387 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14394 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14395 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14397 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14400 && test -z "${cf_tst_cflags}" \
14401 && cf_fix_cppflags=no
14406 if test -n "$cf_new_cflags" ; then
14408 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14409 CFLAGS="${CFLAGS}$cf_new_cflags"
14413 if test -n "$cf_new_cppflags" ; then
14415 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14416 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14420 if test -n "$cf_new_extra_cppflags" ; then
14422 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14423 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14427 cf_add_libs="$LIBS"
14430 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14431 # filter duplicates
14432 for cf_add_1lib in $cf_add_0lib; do
14433 for cf_add_2lib in $cf_add_libs; do
14434 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14439 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14441 LIBS="$cf_add_libs"
14443 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
14444 test -n "$verbose" && echo " found package sm" 1>&6
14446 echo "${as_me:-configure}:14446: testing found package sm ..." 1>&5
14448 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
14449 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
14450 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14452 echo "${as_me:-configure}:14452: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14454 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14456 echo "${as_me:-configure}:14456: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14461 cf_new_extra_cppflags=
14463 for cf_add_cflags in $cf_pkgconfig_incs
14465 case $cf_fix_cppflags in
14467 case $cf_add_cflags in
14468 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14469 case $cf_add_cflags in
14471 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14473 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14474 && test -z "${cf_tst_cflags}" \
14475 && cf_fix_cppflags=yes
14477 if test $cf_fix_cppflags = yes ; then
14479 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14480 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14483 elif test "${cf_tst_cflags}" = "\"'" ; then
14485 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14486 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14492 case "$CPPFLAGS" in
14496 case $cf_add_cflags in
14498 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14500 CPPFLAGS=`echo "$CPPFLAGS" | \
14501 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14502 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14507 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14508 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14515 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14516 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14523 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14524 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14526 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14528 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14529 && test -z "${cf_tst_cflags}" \
14530 && cf_fix_cppflags=no
14535 if test -n "$cf_new_cflags" ; then
14537 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14538 CFLAGS="${CFLAGS}$cf_new_cflags"
14542 if test -n "$cf_new_cppflags" ; then
14544 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14545 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14549 if test -n "$cf_new_extra_cppflags" ; then
14551 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14552 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14556 cf_add_libs="$LIBS"
14559 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14560 # filter duplicates
14561 for cf_add_1lib in $cf_add_0lib; do
14562 for cf_add_2lib in $cf_add_libs; do
14563 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14568 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14570 LIBS="$cf_add_libs"
14583 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14585 echo "${as_me:-configure}:14585: testing ...before $LIBS ..." 1>&5
14587 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14588 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14590 echo "${as_me:-configure}:14590: testing ...after $LIBS ..." 1>&5
14606 LDFLAGS="$X_LIBS $LDFLAGS"
14608 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14610 echo "${as_me:-configure}:14610: testing checking additions to CFLAGS ..." 1>&5
14612 cf_check_cflags="$CFLAGS"
14613 cf_check_cppflags="$CPPFLAGS"
14618 cf_new_extra_cppflags=
14620 for cf_add_cflags in $X_CFLAGS
14622 case $cf_fix_cppflags in
14624 case $cf_add_cflags in
14625 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14626 case $cf_add_cflags in
14628 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14630 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14631 && test -z "${cf_tst_cflags}" \
14632 && cf_fix_cppflags=yes
14634 if test $cf_fix_cppflags = yes ; then
14636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14640 elif test "${cf_tst_cflags}" = "\"'" ; then
14642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14649 case "$CPPFLAGS" in
14653 case $cf_add_cflags in
14655 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14657 CPPFLAGS=`echo "$CPPFLAGS" | \
14658 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14659 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14664 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14665 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14672 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14673 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14683 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14686 && test -z "${cf_tst_cflags}" \
14687 && cf_fix_cppflags=no
14692 if test -n "$cf_new_cflags" ; then
14693 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14695 echo "${as_me:-configure}:14695: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14697 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14698 CFLAGS="${CFLAGS}$cf_new_cflags"
14702 if test -n "$cf_new_cppflags" ; then
14703 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14705 echo "${as_me:-configure}:14705: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14707 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14708 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14712 if test -n "$cf_new_extra_cppflags" ; then
14713 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14715 echo "${as_me:-configure}:14715: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14717 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14718 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14722 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14723 cat >conftest.$ac_ext <<_ACEOF
14724 #line 14724 "configure"
14725 #include "confdefs.h"
14730 printf("Hello world");
14735 rm -f conftest.$ac_objext conftest$ac_exeext
14736 if { (eval echo "$as_me:14736: \"$ac_link\"") >&5
14737 (eval $ac_link) 2>&5
14739 echo "$as_me:14739: \$? = $ac_status" >&5
14740 (exit $ac_status); } &&
14741 { ac_try='test -s conftest$ac_exeext'
14742 { (eval echo "$as_me:14742: \"$ac_try\"") >&5
14743 (eval $ac_try) 2>&5
14745 echo "$as_me:14745: \$? = $ac_status" >&5
14746 (exit $ac_status); }; }; then
14749 echo "$as_me: failed program was:" >&5
14750 cat conftest.$ac_ext >&5
14751 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14753 echo "${as_me:-configure}:14753: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14755 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14756 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14758 echo "${as_me:-configure}:14758: testing but keeping change to \$CPPFLAGS ..." 1>&5
14761 CFLAGS="$cf_check_flags"
14763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14766 echo "$as_me:14766: checking for XOpenDisplay" >&5
14767 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14768 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14769 echo $ECHO_N "(cached) $ECHO_C" >&6
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14774 #define XOpenDisplay autoconf_temporary
14775 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14776 #undef XOpenDisplay
14782 /* We use char because int might match the return type of a gcc2
14783 builtin and then its argument prototype would still apply. */
14784 char XOpenDisplay (void);
14790 /* The GNU C library defines stubs for functions which it implements
14791 to always fail with ENOSYS. Some functions are actually named
14792 something starting with __ and the normal name is an alias. */
14793 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14794 #error found stub for XOpenDisplay
14797 return XOpenDisplay ();
14802 rm -f conftest.$ac_objext conftest$ac_exeext
14803 if { (eval echo "$as_me:14803: \"$ac_link\"") >&5
14804 (eval $ac_link) 2>&5
14806 echo "$as_me:14806: \$? = $ac_status" >&5
14807 (exit $ac_status); } &&
14808 { ac_try='test -s conftest$ac_exeext'
14809 { (eval echo "$as_me:14809: \"$ac_try\"") >&5
14810 (eval $ac_try) 2>&5
14812 echo "$as_me:14812: \$? = $ac_status" >&5
14813 (exit $ac_status); }; }; then
14814 ac_cv_func_XOpenDisplay=yes
14816 echo "$as_me: failed program was:" >&5
14817 cat conftest.$ac_ext >&5
14818 ac_cv_func_XOpenDisplay=no
14820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14822 echo "$as_me:14822: result: $ac_cv_func_XOpenDisplay" >&5
14823 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14824 if test $ac_cv_func_XOpenDisplay = yes; then
14828 echo "$as_me:14828: checking for XOpenDisplay in -lX11" >&5
14829 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14830 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14831 echo $ECHO_N "(cached) $ECHO_C" >&6
14833 ac_check_lib_save_LIBS=$LIBS
14834 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14835 cat >conftest.$ac_ext <<_ACEOF
14836 #line 14836 "configure"
14837 #include "confdefs.h"
14839 /* Override any gcc2 internal prototype to avoid an error. */
14843 /* We use char because int might match the return type of a gcc2
14844 builtin and then its argument prototype would still apply. */
14845 char XOpenDisplay ();
14854 rm -f conftest.$ac_objext conftest$ac_exeext
14855 if { (eval echo "$as_me:14855: \"$ac_link\"") >&5
14856 (eval $ac_link) 2>&5
14858 echo "$as_me:14858: \$? = $ac_status" >&5
14859 (exit $ac_status); } &&
14860 { ac_try='test -s conftest$ac_exeext'
14861 { (eval echo "$as_me:14861: \"$ac_try\"") >&5
14862 (eval $ac_try) 2>&5
14864 echo "$as_me:14864: \$? = $ac_status" >&5
14865 (exit $ac_status); }; }; then
14866 ac_cv_lib_X11_XOpenDisplay=yes
14868 echo "$as_me: failed program was:" >&5
14869 cat conftest.$ac_ext >&5
14870 ac_cv_lib_X11_XOpenDisplay=no
14872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14873 LIBS=$ac_check_lib_save_LIBS
14875 echo "$as_me:14875: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14876 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14877 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14879 cf_add_libs="$LIBS"
14882 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14883 # filter duplicates
14884 for cf_add_1lib in $cf_add_0lib; do
14885 for cf_add_2lib in $cf_add_libs; do
14886 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14891 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14893 LIBS="$cf_add_libs"
14899 echo "$as_me:14899: checking for XtAppInitialize" >&5
14900 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14901 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14902 echo $ECHO_N "(cached) $ECHO_C" >&6
14904 cat >conftest.$ac_ext <<_ACEOF
14905 #line 14905 "configure"
14906 #include "confdefs.h"
14907 #define XtAppInitialize autoconf_temporary
14908 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14909 #undef XtAppInitialize
14915 /* We use char because int might match the return type of a gcc2
14916 builtin and then its argument prototype would still apply. */
14917 char XtAppInitialize (void);
14923 /* The GNU C library defines stubs for functions which it implements
14924 to always fail with ENOSYS. Some functions are actually named
14925 something starting with __ and the normal name is an alias. */
14926 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14927 #error found stub for XtAppInitialize
14930 return XtAppInitialize ();
14935 rm -f conftest.$ac_objext conftest$ac_exeext
14936 if { (eval echo "$as_me:14936: \"$ac_link\"") >&5
14937 (eval $ac_link) 2>&5
14939 echo "$as_me:14939: \$? = $ac_status" >&5
14940 (exit $ac_status); } &&
14941 { ac_try='test -s conftest$ac_exeext'
14942 { (eval echo "$as_me:14942: \"$ac_try\"") >&5
14943 (eval $ac_try) 2>&5
14945 echo "$as_me:14945: \$? = $ac_status" >&5
14946 (exit $ac_status); }; }; then
14947 ac_cv_func_XtAppInitialize=yes
14949 echo "$as_me: failed program was:" >&5
14950 cat conftest.$ac_ext >&5
14951 ac_cv_func_XtAppInitialize=no
14953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14955 echo "$as_me:14955: result: $ac_cv_func_XtAppInitialize" >&5
14956 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14957 if test $ac_cv_func_XtAppInitialize = yes; then
14961 echo "$as_me:14961: checking for XtAppInitialize in -lXt" >&5
14962 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14963 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14964 echo $ECHO_N "(cached) $ECHO_C" >&6
14966 ac_check_lib_save_LIBS=$LIBS
14967 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14968 cat >conftest.$ac_ext <<_ACEOF
14969 #line 14969 "configure"
14970 #include "confdefs.h"
14972 /* Override any gcc2 internal prototype to avoid an error. */
14976 /* We use char because int might match the return type of a gcc2
14977 builtin and then its argument prototype would still apply. */
14978 char XtAppInitialize ();
14982 XtAppInitialize ();
14987 rm -f conftest.$ac_objext conftest$ac_exeext
14988 if { (eval echo "$as_me:14988: \"$ac_link\"") >&5
14989 (eval $ac_link) 2>&5
14991 echo "$as_me:14991: \$? = $ac_status" >&5
14992 (exit $ac_status); } &&
14993 { ac_try='test -s conftest$ac_exeext'
14994 { (eval echo "$as_me:14994: \"$ac_try\"") >&5
14995 (eval $ac_try) 2>&5
14997 echo "$as_me:14997: \$? = $ac_status" >&5
14998 (exit $ac_status); }; }; then
14999 ac_cv_lib_Xt_XtAppInitialize=yes
15001 echo "$as_me: failed program was:" >&5
15002 cat conftest.$ac_ext >&5
15003 ac_cv_lib_Xt_XtAppInitialize=no
15005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15006 LIBS=$ac_check_lib_save_LIBS
15008 echo "$as_me:15008: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15009 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15010 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
15012 cat >>confdefs.h <<\EOF
15013 #define HAVE_LIBXT 1
15017 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
15024 if test $cf_have_X_LIBS = no ; then
15025 { echo "$as_me:15025: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15026 test program. You will have to check and add the proper libraries by hand
15028 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15029 test program. You will have to check and add the proper libraries by hand
15030 to makefile." >&2;}
15033 cf_x_athena_root=$cf_x_athena
15036 for cf_path in default \
15037 /usr/contrib/X11R6 \
15038 /usr/contrib/X11R5 \
15042 if test -z "$cf_x_athena_inc" ; then
15044 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15045 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15046 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15047 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15048 for cf_X_CFLAGS in $X_CFLAGS
15050 case "x$cf_X_CFLAGS" in
15052 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15055 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15060 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15061 if test $cf_path != default ; then
15063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15064 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15066 echo "$as_me:15066: checking for $cf_test in $cf_path" >&5
15067 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15069 echo "$as_me:15069: checking for $cf_test" >&5
15070 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15072 cat >conftest.$ac_ext <<_ACEOF
15073 #line 15073 "configure"
15074 #include "confdefs.h"
15076 #include <X11/Intrinsic.h>
15077 #include <$cf_test>
15086 rm -f conftest.$ac_objext
15087 if { (eval echo "$as_me:15087: \"$ac_compile\"") >&5
15088 (eval $ac_compile) 2>&5
15090 echo "$as_me:15090: \$? = $ac_status" >&5
15091 (exit $ac_status); } &&
15092 { ac_try='test -s conftest.$ac_objext'
15093 { (eval echo "$as_me:15093: \"$ac_try\"") >&5
15094 (eval $ac_try) 2>&5
15096 echo "$as_me:15096: \$? = $ac_status" >&5
15097 (exit $ac_status); }; }; then
15100 echo "$as_me: failed program was:" >&5
15101 cat conftest.$ac_ext >&5
15104 rm -f conftest.$ac_objext conftest.$ac_ext
15105 echo "$as_me:15105: result: $cf_result" >&5
15106 echo "${ECHO_T}$cf_result" >&6
15108 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15109 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15110 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15112 if test "$cf_result" = yes ; then
15113 test "$cf_path" = default && cf_x_athena_inc=default
15114 test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
15120 if test -z "$cf_x_athena_inc" ; then
15121 { echo "$as_me:15121: WARNING: Unable to find Athena header files" >&5
15122 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15123 elif test "$cf_x_athena_inc" != default ; then
15125 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15126 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15130 cf_x_athena_root=$cf_x_athena
15133 for cf_path in default \
15134 /usr/contrib/X11R6 \
15135 /usr/contrib/X11R5 \
15140 ${cf_x_athena_root} \
15141 ${cf_x_athena_root}7 \
15142 ${cf_x_athena_root}6
15145 "-l$cf_lib -lXmu" \
15146 "-l$cf_lib -lXpm -lXmu" \
15147 "-l${cf_lib}_s -lXmu_s"
15149 test -n "$cf_x_athena_lib" && break
15151 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15152 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15153 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15154 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15155 for cf_X_CFLAGS in $X_CFLAGS
15157 case "x$cf_X_CFLAGS" in
15159 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15162 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15167 cf_test=XawSimpleMenuAddGlobalActions
15168 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15170 cf_add_libs="$LIBS"
15173 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15174 # filter duplicates
15175 for cf_add_1lib in $cf_add_0lib; do
15176 for cf_add_2lib in $cf_add_libs; do
15177 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15182 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15184 LIBS="$cf_add_libs"
15186 echo "$as_me:15186: checking for $cf_test in $cf_libs" >&5
15187 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15188 cat >conftest.$ac_ext <<_ACEOF
15189 #line 15189 "configure"
15190 #include "confdefs.h"
15192 #include <X11/Intrinsic.h>
15193 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15199 $cf_test((XtAppContext) 0)
15204 rm -f conftest.$ac_objext conftest$ac_exeext
15205 if { (eval echo "$as_me:15205: \"$ac_link\"") >&5
15206 (eval $ac_link) 2>&5
15208 echo "$as_me:15208: \$? = $ac_status" >&5
15209 (exit $ac_status); } &&
15210 { ac_try='test -s conftest$ac_exeext'
15211 { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212 (eval $ac_try) 2>&5
15214 echo "$as_me:15214: \$? = $ac_status" >&5
15215 (exit $ac_status); }; }; then
15218 echo "$as_me: failed program was:" >&5
15219 cat conftest.$ac_ext >&5
15222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15223 echo "$as_me:15223: result: $cf_result" >&5
15224 echo "${ECHO_T}$cf_result" >&6
15226 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15227 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15228 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15230 if test "$cf_result" = yes ; then
15231 cf_x_athena_lib="$cf_libs"
15235 test -n "$cf_x_athena_lib" && break
15239 if test -z "$cf_x_athena_lib" ; then
15240 { { echo "$as_me:15240: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15241 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15242 { (exit 1); exit 1; }; }
15245 cf_add_libs="$LIBS"
15248 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15249 # filter duplicates
15250 for cf_add_1lib in $cf_add_0lib; do
15251 for cf_add_2lib in $cf_add_libs; do
15252 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15259 LIBS="$cf_add_libs"
15261 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15263 cat >>confdefs.h <<EOF
15264 #define $cf_x_athena_LIBS 1
15269 if test -n "$ac_tool_prefix"; then
15270 for ac_prog in xcurses-config
15272 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15273 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15274 echo "$as_me:15274: checking for $ac_word" >&5
15275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15276 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15277 echo $ECHO_N "(cached) $ECHO_C" >&6
15279 if test -n "$XCURSES_CONFIG"; then
15280 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15282 ac_save_IFS=$IFS; IFS=$ac_path_separator
15284 for ac_dir in $ac_dummy; do
15286 test -z "$ac_dir" && ac_dir=.
15287 $as_executable_p "$ac_dir/$ac_word" || continue
15288 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15289 echo "$as_me:15289: found $ac_dir/$ac_word" >&5
15295 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15296 if test -n "$XCURSES_CONFIG"; then
15297 echo "$as_me:15297: result: $XCURSES_CONFIG" >&5
15298 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15300 echo "$as_me:15300: result: no" >&5
15301 echo "${ECHO_T}no" >&6
15304 test -n "$XCURSES_CONFIG" && break
15307 if test -z "$XCURSES_CONFIG"; then
15308 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15309 for ac_prog in xcurses-config
15311 # Extract the first word of "$ac_prog", so it can be a program name with args.
15312 set dummy $ac_prog; ac_word=$2
15313 echo "$as_me:15313: checking for $ac_word" >&5
15314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15315 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15316 echo $ECHO_N "(cached) $ECHO_C" >&6
15318 if test -n "$ac_ct_XCURSES_CONFIG"; then
15319 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15321 ac_save_IFS=$IFS; IFS=$ac_path_separator
15323 for ac_dir in $ac_dummy; do
15325 test -z "$ac_dir" && ac_dir=.
15326 $as_executable_p "$ac_dir/$ac_word" || continue
15327 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15328 echo "$as_me:15328: found $ac_dir/$ac_word" >&5
15334 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15335 if test -n "$ac_ct_XCURSES_CONFIG"; then
15336 echo "$as_me:15336: result: $ac_ct_XCURSES_CONFIG" >&5
15337 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15339 echo "$as_me:15339: result: no" >&5
15340 echo "${ECHO_T}no" >&6
15343 test -n "$ac_ct_XCURSES_CONFIG" && break
15345 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15347 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15350 if test "$XCURSES_CONFIG" != none ; then
15355 cf_new_extra_cppflags=
15357 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15359 case $cf_fix_cppflags in
15361 case $cf_add_cflags in
15362 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15363 case $cf_add_cflags in
15365 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15367 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15368 && test -z "${cf_tst_cflags}" \
15369 && cf_fix_cppflags=yes
15371 if test $cf_fix_cppflags = yes ; then
15373 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15374 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15377 elif test "${cf_tst_cflags}" = "\"'" ; then
15379 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15380 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15386 case "$CPPFLAGS" in
15390 case $cf_add_cflags in
15392 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15394 CPPFLAGS=`echo "$CPPFLAGS" | \
15395 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15396 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15401 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15402 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15409 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15410 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15417 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15418 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15420 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15422 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15423 && test -z "${cf_tst_cflags}" \
15424 && cf_fix_cppflags=no
15429 if test -n "$cf_new_cflags" ; then
15431 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15432 CFLAGS="${CFLAGS}$cf_new_cflags"
15436 if test -n "$cf_new_cppflags" ; then
15438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15439 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15443 if test -n "$cf_new_extra_cppflags" ; then
15445 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15446 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15450 cf_add_libs="$LIBS"
15453 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15454 # filter duplicates
15455 for cf_add_1lib in $cf_add_0lib; do
15456 for cf_add_2lib in $cf_add_libs; do
15457 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15462 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15464 LIBS="$cf_add_libs"
15466 cf_cv_lib_XCurses=yes
15470 LDFLAGS="$LDFLAGS $X_LIBS"
15472 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15474 echo "${as_me:-configure}:15474: testing checking additions to CFLAGS ..." 1>&5
15476 cf_check_cflags="$CFLAGS"
15477 cf_check_cppflags="$CPPFLAGS"
15482 cf_new_extra_cppflags=
15484 for cf_add_cflags in $X_CFLAGS
15486 case $cf_fix_cppflags in
15488 case $cf_add_cflags in
15489 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15490 case $cf_add_cflags in
15492 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15494 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15495 && test -z "${cf_tst_cflags}" \
15496 && cf_fix_cppflags=yes
15498 if test $cf_fix_cppflags = yes ; then
15500 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15501 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15504 elif test "${cf_tst_cflags}" = "\"'" ; then
15506 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15507 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15513 case "$CPPFLAGS" in
15517 case $cf_add_cflags in
15519 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15521 CPPFLAGS=`echo "$CPPFLAGS" | \
15522 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15523 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15528 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15529 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15536 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15537 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15544 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15545 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15547 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15550 && test -z "${cf_tst_cflags}" \
15551 && cf_fix_cppflags=no
15556 if test -n "$cf_new_cflags" ; then
15557 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15559 echo "${as_me:-configure}:15559: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15561 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15562 CFLAGS="${CFLAGS}$cf_new_cflags"
15566 if test -n "$cf_new_cppflags" ; then
15567 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15569 echo "${as_me:-configure}:15569: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15571 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15572 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15576 if test -n "$cf_new_extra_cppflags" ; then
15577 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15579 echo "${as_me:-configure}:15579: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15581 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15582 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15586 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15587 cat >conftest.$ac_ext <<_ACEOF
15588 #line 15588 "configure"
15589 #include "confdefs.h"
15594 printf("Hello world");
15599 rm -f conftest.$ac_objext conftest$ac_exeext
15600 if { (eval echo "$as_me:15600: \"$ac_link\"") >&5
15601 (eval $ac_link) 2>&5
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit $ac_status); } &&
15605 { ac_try='test -s conftest$ac_exeext'
15606 { (eval echo "$as_me:15606: \"$ac_try\"") >&5
15607 (eval $ac_try) 2>&5
15609 echo "$as_me:15609: \$? = $ac_status" >&5
15610 (exit $ac_status); }; }; then
15613 echo "$as_me: failed program was:" >&5
15614 cat conftest.$ac_ext >&5
15615 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15617 echo "${as_me:-configure}:15617: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15619 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15620 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15622 echo "${as_me:-configure}:15622: testing but keeping change to \$CPPFLAGS ..." 1>&5
15625 CFLAGS="$cf_check_flags"
15627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15630 echo "$as_me:15630: checking for XOpenDisplay in -lX11" >&5
15631 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15632 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15633 echo $ECHO_N "(cached) $ECHO_C" >&6
15635 ac_check_lib_save_LIBS=$LIBS
15636 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15637 cat >conftest.$ac_ext <<_ACEOF
15638 #line 15638 "configure"
15639 #include "confdefs.h"
15641 /* Override any gcc2 internal prototype to avoid an error. */
15645 /* We use char because int might match the return type of a gcc2
15646 builtin and then its argument prototype would still apply. */
15647 char XOpenDisplay ();
15656 rm -f conftest.$ac_objext conftest$ac_exeext
15657 if { (eval echo "$as_me:15657: \"$ac_link\"") >&5
15658 (eval $ac_link) 2>&5
15660 echo "$as_me:15660: \$? = $ac_status" >&5
15661 (exit $ac_status); } &&
15662 { ac_try='test -s conftest$ac_exeext'
15663 { (eval echo "$as_me:15663: \"$ac_try\"") >&5
15664 (eval $ac_try) 2>&5
15666 echo "$as_me:15666: \$? = $ac_status" >&5
15667 (exit $ac_status); }; }; then
15668 ac_cv_lib_X11_XOpenDisplay=yes
15670 echo "$as_me: failed program was:" >&5
15671 cat conftest.$ac_ext >&5
15672 ac_cv_lib_X11_XOpenDisplay=no
15674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15675 LIBS=$ac_check_lib_save_LIBS
15677 echo "$as_me:15677: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15678 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15679 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15681 cf_add_libs="$LIBS"
15684 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15685 # filter duplicates
15686 for cf_add_1lib in $cf_add_0lib; do
15687 for cf_add_2lib in $cf_add_libs; do
15688 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15693 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15695 LIBS="$cf_add_libs"
15699 echo "$as_me:15699: checking for XCurses library" >&5
15700 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15701 if test "${cf_cv_lib_XCurses+set}" = set; then
15702 echo $ECHO_N "(cached) $ECHO_C" >&6
15705 cf_add_libs="$LIBS"
15708 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15709 # filter duplicates
15710 for cf_add_1lib in $cf_add_0lib; do
15711 for cf_add_2lib in $cf_add_libs; do
15712 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15717 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15719 LIBS="$cf_add_libs"
15721 cat >conftest.$ac_ext <<_ACEOF
15722 #line 15722 "configure"
15723 #include "confdefs.h"
15725 #include <xcurses.h>
15726 char *XCursesProgramName = "test";
15736 rm -f conftest.$ac_objext conftest$ac_exeext
15737 if { (eval echo "$as_me:15737: \"$ac_link\"") >&5
15738 (eval $ac_link) 2>&5
15740 echo "$as_me:15740: \$? = $ac_status" >&5
15741 (exit $ac_status); } &&
15742 { ac_try='test -s conftest$ac_exeext'
15743 { (eval echo "$as_me:15743: \"$ac_try\"") >&5
15744 (eval $ac_try) 2>&5
15746 echo "$as_me:15746: \$? = $ac_status" >&5
15747 (exit $ac_status); }; }; then
15748 cf_cv_lib_XCurses=yes
15750 echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 cf_cv_lib_XCurses=no
15754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15757 echo "$as_me:15757: result: $cf_cv_lib_XCurses" >&5
15758 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15762 if test $cf_cv_lib_XCurses = yes ; then
15764 cat >>confdefs.h <<\EOF
15768 cat >>confdefs.h <<\EOF
15772 echo "$as_me:15772: checking for xcurses.h" >&5
15773 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15774 if test "${ac_cv_header_xcurses_h+set}" = set; then
15775 echo $ECHO_N "(cached) $ECHO_C" >&6
15777 cat >conftest.$ac_ext <<_ACEOF
15778 #line 15778 "configure"
15779 #include "confdefs.h"
15780 #include <xcurses.h>
15782 if { (eval echo "$as_me:15782: \"$ac_cpp conftest.$ac_ext\"") >&5
15783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15785 egrep -v '^ *\+' conftest.er1 >conftest.err
15787 cat conftest.err >&5
15788 echo "$as_me:15788: \$? = $ac_status" >&5
15789 (exit $ac_status); } >/dev/null; then
15790 if test -s conftest.err; then
15791 ac_cpp_err=$ac_c_preproc_warn_flag
15798 if test -z "$ac_cpp_err"; then
15799 ac_cv_header_xcurses_h=yes
15801 echo "$as_me: failed program was:" >&5
15802 cat conftest.$ac_ext >&5
15803 ac_cv_header_xcurses_h=no
15805 rm -f conftest.err conftest.$ac_ext
15807 echo "$as_me:15807: result: $ac_cv_header_xcurses_h" >&5
15808 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15809 if test $ac_cv_header_xcurses_h = yes; then
15811 cat >>confdefs.h <<\EOF
15812 #define HAVE_XCURSES 1
15818 { { echo "$as_me:15818: error: Cannot link with XCurses" >&5
15819 echo "$as_me: error: Cannot link with XCurses" >&2;}
15820 { (exit 1); exit 1; }; }
15825 { { echo "$as_me:15825: error: unexpected screen-value: $cf_cv_screen" >&5
15826 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15827 { (exit 1); exit 1; }; }
15831 : ${cf_nculib_root:=$cf_cv_screen}
15832 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15833 echo "$as_me:15833: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15834 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15835 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15836 echo $ECHO_N "(cached) $ECHO_C" >&6
15838 ac_check_lib_save_LIBS=$LIBS
15839 LIBS="-l$cf_nculib_root $LIBS"
15840 cat >conftest.$ac_ext <<_ACEOF
15841 #line 15841 "configure"
15842 #include "confdefs.h"
15844 /* Override any gcc2 internal prototype to avoid an error. */
15848 /* We use char because int might match the return type of a gcc2
15849 builtin and then its argument prototype would still apply. */
15850 char _nc_init_pthreads ();
15854 _nc_init_pthreads ();
15859 rm -f conftest.$ac_objext conftest$ac_exeext
15860 if { (eval echo "$as_me:15860: \"$ac_link\"") >&5
15861 (eval $ac_link) 2>&5
15863 echo "$as_me:15863: \$? = $ac_status" >&5
15864 (exit $ac_status); } &&
15865 { ac_try='test -s conftest$ac_exeext'
15866 { (eval echo "$as_me:15866: \"$ac_try\"") >&5
15867 (eval $ac_try) 2>&5
15869 echo "$as_me:15869: \$? = $ac_status" >&5
15870 (exit $ac_status); }; }; then
15871 eval "$as_ac_Lib=yes"
15873 echo "$as_me: failed program was:" >&5
15874 cat conftest.$ac_ext >&5
15875 eval "$as_ac_Lib=no"
15877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15878 LIBS=$ac_check_lib_save_LIBS
15880 echo "$as_me:15880: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15881 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15882 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15883 cf_cv_ncurses_pthreads=yes
15885 cf_cv_ncurses_pthreads=no
15888 if test "$cf_cv_ncurses_pthreads" = yes
15891 cf_add_libs="$LIBS"
15894 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15895 # filter duplicates
15896 for cf_add_1lib in $cf_add_0lib; do
15897 for cf_add_2lib in $cf_add_libs; do
15898 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15905 LIBS="$cf_add_libs"
15909 case $cf_cv_screen in
15911 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15915 echo "$as_me:15915: checking for X11 rgb file" >&5
15916 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15918 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15919 if test "${with_x11_rgb+set}" = set; then
15920 withval="$with_x11_rgb"
15926 if test "x$RGB_PATH" = xauto
15928 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15930 /opt/local/share/X11/rgb.txt \
15931 /opt/X11/share/X11/rgb.txt \
15932 /usr/share/X11/rgb.txt \
15933 /usr/X11/share/X11/rgb.txt \
15934 /usr/X11/lib/X11/rgb.txt \
15935 /usr/lib/X11/rgb.txt \
15937 /usr/pkg/lib/X11/rgb.txt \
15938 /usr/X11R7/lib/X11/rgb.txt \
15939 /usr/X11R6/lib/X11/rgb.txt \
15940 /usr/X11R5/lib/X11/rgb.txt \
15941 /usr/X11R4/lib/X11/rgb.txt \
15942 /usr/local/lib/X11/rgb.txt \
15943 /usr/local/share/X11/rgb.txt \
15944 /usr/lib64/X11/rgb.txt
15946 if test -f "$cf_path" ; then
15947 RGB_PATH="$cf_path"
15954 if test "x$prefix" != xNONE; then
15955 cf_path_syntax="$prefix"
15957 cf_path_syntax="$ac_default_prefix"
15960 case ".$cf_path" in
15961 (.\$\(*\)*|.\'*\'*)
15965 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15967 (.\${*prefix}*|.\${*dir}*)
15968 eval cf_path="$cf_path"
15969 case ".$cf_path" in
15971 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15976 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15979 { { echo "$as_me:15979: error: expected a pathname, not \"$cf_path\"" >&5
15980 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15981 { (exit 1); exit 1; }; }
15987 echo "$as_me:15987: result: $RGB_PATH" >&5
15988 echo "${ECHO_T}$RGB_PATH" >&6
15990 cat >>confdefs.h <<EOF
15991 #define RGB_PATH "$cf_path"
15995 if test "$RGB_PATH" = no
16002 case $cf_cv_screen in
16004 cf_default_panel=no
16007 cf_default_tinfo=no
16009 (xcurses|bsdcurses)
16010 cf_default_panel=no
16013 cf_default_tinfo=yes
16016 cf_default_panel=yes
16017 cf_default_form=yes
16018 cf_default_menu=yes
16019 cf_default_tinfo=yes
16020 case $cf_cv_screen in
16022 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16028 echo "$as_me:16028: checking if you want to check for panel functions" >&5
16029 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16031 # Check whether --enable-panel or --disable-panel was given.
16032 if test "${enable_panel+set}" = set; then
16033 enableval="$enable_panel"
16034 test "$enableval" != no && enableval=yes
16035 if test "$enableval" != "yes" ; then
16038 cf_enable_panel=$cf_default_panel
16042 cf_enable_panel=$cf_default_panel
16045 echo "$as_me:16045: result: $cf_enable_panel" >&5
16046 echo "${ECHO_T}$cf_enable_panel" >&6
16047 if test $cf_enable_panel = yes
16050 cf_have_curses_lib=no
16052 : ${NCURSES_CONFIG_PKG:=none}
16053 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16055 elif test "x${PKG_CONFIG:=none}" != xnone; then
16056 echo "$as_me:16056: checking pkg-config for panel$cf_cv_libtype" >&5
16057 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
16058 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
16059 echo "$as_me:16059: result: yes" >&5
16060 echo "${ECHO_T}yes" >&6
16062 echo "$as_me:16062: checking if the panel$cf_cv_libtype package files work" >&5
16063 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
16065 cf_save_CPPFLAGS="$CPPFLAGS"
16066 cf_save_LIBS="$LIBS"
16071 cf_new_extra_cppflags=
16073 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
16075 case $cf_fix_cppflags in
16077 case $cf_add_cflags in
16078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16079 case $cf_add_cflags in
16081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16084 && test -z "${cf_tst_cflags}" \
16085 && cf_fix_cppflags=yes
16087 if test $cf_fix_cppflags = yes ; then
16089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16093 elif test "${cf_tst_cflags}" = "\"'" ; then
16095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16102 case "$CPPFLAGS" in
16106 case $cf_add_cflags in
16108 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16110 CPPFLAGS=`echo "$CPPFLAGS" | \
16111 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16112 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16117 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16118 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16125 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16126 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16139 && test -z "${cf_tst_cflags}" \
16140 && cf_fix_cppflags=no
16145 if test -n "$cf_new_cflags" ; then
16147 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16148 CFLAGS="${CFLAGS}$cf_new_cflags"
16152 if test -n "$cf_new_cppflags" ; then
16154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16155 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16159 if test -n "$cf_new_extra_cppflags" ; then
16161 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16162 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16166 cf_add_libs="$LIBS"
16169 for cf_add_1lib in `$PKG_CONFIG --libs panel$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16170 # filter duplicates
16171 for cf_add_1lib in $cf_add_0lib; do
16172 for cf_add_2lib in $cf_add_libs; do
16173 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16178 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16180 LIBS="$cf_add_libs"
16182 cat >conftest.$ac_ext <<_ACEOF
16183 #line 16183 "configure"
16184 #include "confdefs.h"
16189 (void) new_panel ( 0 );
16194 rm -f conftest.$ac_objext conftest$ac_exeext
16195 if { (eval echo "$as_me:16195: \"$ac_link\"") >&5
16196 (eval $ac_link) 2>&5
16198 echo "$as_me:16198: \$? = $ac_status" >&5
16199 (exit $ac_status); } &&
16200 { ac_try='test -s conftest$ac_exeext'
16201 { (eval echo "$as_me:16201: \"$ac_try\"") >&5
16202 (eval $ac_try) 2>&5
16204 echo "$as_me:16204: \$? = $ac_status" >&5
16205 (exit $ac_status); }; }; then
16206 if test "$cross_compiling" = yes; then
16207 cf_have_curses_lib=maybe
16209 cat >conftest.$ac_ext <<_ACEOF
16210 #line 16210 "configure"
16211 #include "confdefs.h"
16214 { (void) new_panel ( 0 ); return 0; }
16216 rm -f conftest$ac_exeext
16217 if { (eval echo "$as_me:16217: \"$ac_link\"") >&5
16218 (eval $ac_link) 2>&5
16220 echo "$as_me:16220: \$? = $ac_status" >&5
16221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16222 { (eval echo "$as_me:16222: \"$ac_try\"") >&5
16223 (eval $ac_try) 2>&5
16225 echo "$as_me:16225: \$? = $ac_status" >&5
16226 (exit $ac_status); }; }; then
16227 cf_have_curses_lib=yes
16229 echo "$as_me: program exited with status $ac_status" >&5
16230 echo "$as_me: failed program was:" >&5
16231 cat conftest.$ac_ext >&5
16232 cf_have_curses_lib=no
16234 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16237 echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 cf_have_curses_lib=no
16241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16242 echo "$as_me:16242: result: $cf_have_curses_lib" >&5
16243 echo "${ECHO_T}$cf_have_curses_lib" >&6
16244 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16245 if test "$cf_have_curses_lib" != "yes"
16247 CPPFLAGS="$cf_save_CPPFLAGS"
16248 LIBS="$cf_save_LIBS"
16251 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16253 cat >>confdefs.h <<EOF
16254 #define $cf_upper 1
16260 if test "$cf_have_curses_lib" = no; then
16261 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
16262 echo "$as_me:16262: checking for new_panel in -lpanel$cf_cv_libtype" >&5
16263 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
16264 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16265 echo $ECHO_N "(cached) $ECHO_C" >&6
16267 ac_check_lib_save_LIBS=$LIBS
16268 LIBS="-lpanel$cf_cv_libtype $LIBS"
16269 cat >conftest.$ac_ext <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16273 /* Override any gcc2 internal prototype to avoid an error. */
16277 /* We use char because int might match the return type of a gcc2
16278 builtin and then its argument prototype would still apply. */
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290 (eval $ac_link) 2>&5
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit $ac_status); } &&
16294 { ac_try='test -s conftest$ac_exeext'
16295 { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16298 echo "$as_me:16298: \$? = $ac_status" >&5
16299 (exit $ac_status); }; }; then
16300 eval "$as_ac_Lib=yes"
16302 echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 eval "$as_ac_Lib=no"
16306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16307 LIBS=$ac_check_lib_save_LIBS
16309 echo "$as_me:16309: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16310 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16311 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16313 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16315 cf_add_libs="$LIBS"
16318 for cf_add_1lib in -lpanel$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16319 # filter duplicates
16320 for cf_add_1lib in $cf_add_0lib; do
16321 for cf_add_2lib in $cf_add_libs; do
16322 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16327 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16329 LIBS="$cf_add_libs"
16331 cat >>confdefs.h <<EOF
16332 #define $cf_upper 1
16339 cf_curses_headers="$cf_curses_headers panel.h"
16342 echo "$as_me:16342: checking if you want to check for menu functions" >&5
16343 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16345 # Check whether --enable-menu or --disable-menu was given.
16346 if test "${enable_menu+set}" = set; then
16347 enableval="$enable_menu"
16348 test "$enableval" != no && enableval=yes
16349 if test "$enableval" != "yes" ; then
16352 cf_enable_menu=$cf_default_menu
16356 cf_enable_menu=$cf_default_menu
16359 echo "$as_me:16359: result: $cf_enable_menu" >&5
16360 echo "${ECHO_T}$cf_enable_menu" >&6
16361 if test $cf_enable_menu = yes
16363 case $cf_cv_screen in
16368 echo "$as_me:16368: checking for NetBSD menu.h" >&5
16369 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16370 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16371 echo $ECHO_N "(cached) $ECHO_C" >&6
16374 cat >conftest.$ac_ext <<_ACEOF
16375 #line 16375 "configure"
16376 #include "confdefs.h"
16378 #include <${cf_cv_ncurses_header:-curses.h}>
16386 int y = menu->max_item_width;
16392 rm -f conftest.$ac_objext
16393 if { (eval echo "$as_me:16393: \"$ac_compile\"") >&5
16394 (eval $ac_compile) 2>&5
16396 echo "$as_me:16396: \$? = $ac_status" >&5
16397 (exit $ac_status); } &&
16398 { ac_try='test -s conftest.$ac_objext'
16399 { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400 (eval $ac_try) 2>&5
16402 echo "$as_me:16402: \$? = $ac_status" >&5
16403 (exit $ac_status); }; }; then
16404 cf_cv_netbsd_menu_h=yes
16407 echo "$as_me: failed program was:" >&5
16408 cat conftest.$ac_ext >&5
16409 cf_cv_netbsd_menu_h=no
16411 rm -f conftest.$ac_objext conftest.$ac_ext
16414 echo "$as_me:16414: result: $cf_cv_netbsd_menu_h" >&5
16415 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16417 test "$cf_cv_netbsd_menu_h" = yes &&
16418 cat >>confdefs.h <<\EOF
16419 #define HAVE_NETBSD_MENU_H 1
16425 cf_have_curses_lib=no
16427 : ${NCURSES_CONFIG_PKG:=none}
16428 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16430 elif test "x${PKG_CONFIG:=none}" != xnone; then
16431 echo "$as_me:16431: checking pkg-config for menu$cf_cv_libtype" >&5
16432 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
16433 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
16434 echo "$as_me:16434: result: yes" >&5
16435 echo "${ECHO_T}yes" >&6
16437 echo "$as_me:16437: checking if the menu$cf_cv_libtype package files work" >&5
16438 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
16440 cf_save_CPPFLAGS="$CPPFLAGS"
16441 cf_save_LIBS="$LIBS"
16446 cf_new_extra_cppflags=
16448 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
16450 case $cf_fix_cppflags in
16452 case $cf_add_cflags in
16453 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16454 case $cf_add_cflags in
16456 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16459 && test -z "${cf_tst_cflags}" \
16460 && cf_fix_cppflags=yes
16462 if test $cf_fix_cppflags = yes ; then
16464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16468 elif test "${cf_tst_cflags}" = "\"'" ; then
16470 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16471 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16477 case "$CPPFLAGS" in
16481 case $cf_add_cflags in
16483 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16485 CPPFLAGS=`echo "$CPPFLAGS" | \
16486 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16487 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16492 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16493 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16500 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16501 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16508 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16509 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16511 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16513 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16514 && test -z "${cf_tst_cflags}" \
16515 && cf_fix_cppflags=no
16520 if test -n "$cf_new_cflags" ; then
16522 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16523 CFLAGS="${CFLAGS}$cf_new_cflags"
16527 if test -n "$cf_new_cppflags" ; then
16529 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16530 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16534 if test -n "$cf_new_extra_cppflags" ; then
16536 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16537 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16541 cf_add_libs="$LIBS"
16544 for cf_add_1lib in `$PKG_CONFIG --libs menu$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16545 # filter duplicates
16546 for cf_add_1lib in $cf_add_0lib; do
16547 for cf_add_2lib in $cf_add_libs; do
16548 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16553 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16555 LIBS="$cf_add_libs"
16557 cat >conftest.$ac_ext <<_ACEOF
16558 #line 16558 "configure"
16559 #include "confdefs.h"
16564 (void) menu_driver ( 0,0 );
16569 rm -f conftest.$ac_objext conftest$ac_exeext
16570 if { (eval echo "$as_me:16570: \"$ac_link\"") >&5
16571 (eval $ac_link) 2>&5
16573 echo "$as_me:16573: \$? = $ac_status" >&5
16574 (exit $ac_status); } &&
16575 { ac_try='test -s conftest$ac_exeext'
16576 { (eval echo "$as_me:16576: \"$ac_try\"") >&5
16577 (eval $ac_try) 2>&5
16579 echo "$as_me:16579: \$? = $ac_status" >&5
16580 (exit $ac_status); }; }; then
16581 if test "$cross_compiling" = yes; then
16582 cf_have_curses_lib=maybe
16584 cat >conftest.$ac_ext <<_ACEOF
16585 #line 16585 "configure"
16586 #include "confdefs.h"
16589 { (void) menu_driver ( 0,0 ); return 0; }
16591 rm -f conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593 (eval $ac_link) 2>&5
16595 echo "$as_me:16595: \$? = $ac_status" >&5
16596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16597 { (eval echo "$as_me:16597: \"$ac_try\"") >&5
16598 (eval $ac_try) 2>&5
16600 echo "$as_me:16600: \$? = $ac_status" >&5
16601 (exit $ac_status); }; }; then
16602 cf_have_curses_lib=yes
16604 echo "$as_me: program exited with status $ac_status" >&5
16605 echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16607 cf_have_curses_lib=no
16609 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16612 echo "$as_me: failed program was:" >&5
16613 cat conftest.$ac_ext >&5
16614 cf_have_curses_lib=no
16616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16617 echo "$as_me:16617: result: $cf_have_curses_lib" >&5
16618 echo "${ECHO_T}$cf_have_curses_lib" >&6
16619 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16620 if test "$cf_have_curses_lib" != "yes"
16622 CPPFLAGS="$cf_save_CPPFLAGS"
16623 LIBS="$cf_save_LIBS"
16626 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16628 cat >>confdefs.h <<EOF
16629 #define $cf_upper 1
16635 if test "$cf_have_curses_lib" = no; then
16636 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16637 echo "$as_me:16637: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16638 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16639 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16640 echo $ECHO_N "(cached) $ECHO_C" >&6
16642 ac_check_lib_save_LIBS=$LIBS
16643 LIBS="-lmenu$cf_cv_libtype $LIBS"
16644 cat >conftest.$ac_ext <<_ACEOF
16645 #line 16645 "configure"
16646 #include "confdefs.h"
16648 /* Override any gcc2 internal prototype to avoid an error. */
16652 /* We use char because int might match the return type of a gcc2
16653 builtin and then its argument prototype would still apply. */
16654 char menu_driver ();
16663 rm -f conftest.$ac_objext conftest$ac_exeext
16664 if { (eval echo "$as_me:16664: \"$ac_link\"") >&5
16665 (eval $ac_link) 2>&5
16667 echo "$as_me:16667: \$? = $ac_status" >&5
16668 (exit $ac_status); } &&
16669 { ac_try='test -s conftest$ac_exeext'
16670 { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671 (eval $ac_try) 2>&5
16673 echo "$as_me:16673: \$? = $ac_status" >&5
16674 (exit $ac_status); }; }; then
16675 eval "$as_ac_Lib=yes"
16677 echo "$as_me: failed program was:" >&5
16678 cat conftest.$ac_ext >&5
16679 eval "$as_ac_Lib=no"
16681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16682 LIBS=$ac_check_lib_save_LIBS
16684 echo "$as_me:16684: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16685 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16686 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16688 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16690 cf_add_libs="$LIBS"
16693 for cf_add_1lib in -lmenu$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16694 # filter duplicates
16695 for cf_add_1lib in $cf_add_0lib; do
16696 for cf_add_2lib in $cf_add_libs; do
16697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16704 LIBS="$cf_add_libs"
16706 cat >>confdefs.h <<EOF
16707 #define $cf_upper 1
16714 cf_curses_headers="$cf_curses_headers menu.h"
16717 echo "$as_me:16717: checking if you want to check for form functions" >&5
16718 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16720 # Check whether --enable-form or --disable-form was given.
16721 if test "${enable_form+set}" = set; then
16722 enableval="$enable_form"
16723 test "$enableval" != no && enableval=yes
16724 if test "$enableval" != "yes" ; then
16727 cf_enable_form=$cf_default_form
16731 cf_enable_form=$cf_default_form
16734 echo "$as_me:16734: result: $cf_enable_form" >&5
16735 echo "${ECHO_T}$cf_enable_form" >&6
16736 if test $cf_enable_form = yes
16738 case $cf_cv_screen in
16743 echo "$as_me:16743: checking for NetBSD form.h" >&5
16744 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16745 if test "${cf_cv_netbsd_form_h+set}" = set; then
16746 echo $ECHO_N "(cached) $ECHO_C" >&6
16749 cat >conftest.$ac_ext <<_ACEOF
16750 #line 16750 "configure"
16751 #include "confdefs.h"
16753 #include <${cf_cv_ncurses_header:-curses.h}>
16761 int y = current_field(form)->cursor_ypos;
16762 int x = current_field(form)->cursor_xpos;
16768 rm -f conftest.$ac_objext
16769 if { (eval echo "$as_me:16769: \"$ac_compile\"") >&5
16770 (eval $ac_compile) 2>&5
16772 echo "$as_me:16772: \$? = $ac_status" >&5
16773 (exit $ac_status); } &&
16774 { ac_try='test -s conftest.$ac_objext'
16775 { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776 (eval $ac_try) 2>&5
16778 echo "$as_me:16778: \$? = $ac_status" >&5
16779 (exit $ac_status); }; }; then
16780 cf_cv_netbsd_form_h=yes
16783 echo "$as_me: failed program was:" >&5
16784 cat conftest.$ac_ext >&5
16785 cf_cv_netbsd_form_h=no
16787 rm -f conftest.$ac_objext conftest.$ac_ext
16790 echo "$as_me:16790: result: $cf_cv_netbsd_form_h" >&5
16791 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16793 test "$cf_cv_netbsd_form_h" = yes &&
16794 cat >>confdefs.h <<\EOF
16795 #define HAVE_NETBSD_FORM_H 1
16801 cf_have_curses_lib=no
16803 : ${NCURSES_CONFIG_PKG:=none}
16804 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16806 elif test "x${PKG_CONFIG:=none}" != xnone; then
16807 echo "$as_me:16807: checking pkg-config for form$cf_cv_libtype" >&5
16808 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16809 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16810 echo "$as_me:16810: result: yes" >&5
16811 echo "${ECHO_T}yes" >&6
16813 echo "$as_me:16813: checking if the form$cf_cv_libtype package files work" >&5
16814 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16816 cf_save_CPPFLAGS="$CPPFLAGS"
16817 cf_save_LIBS="$LIBS"
16822 cf_new_extra_cppflags=
16824 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16826 case $cf_fix_cppflags in
16828 case $cf_add_cflags in
16829 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16830 case $cf_add_cflags in
16832 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16834 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16835 && test -z "${cf_tst_cflags}" \
16836 && cf_fix_cppflags=yes
16838 if test $cf_fix_cppflags = yes ; then
16840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16844 elif test "${cf_tst_cflags}" = "\"'" ; then
16846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16853 case "$CPPFLAGS" in
16857 case $cf_add_cflags in
16859 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16861 CPPFLAGS=`echo "$CPPFLAGS" | \
16862 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16863 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16868 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16869 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16876 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16877 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16887 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16889 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16890 && test -z "${cf_tst_cflags}" \
16891 && cf_fix_cppflags=no
16896 if test -n "$cf_new_cflags" ; then
16898 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16899 CFLAGS="${CFLAGS}$cf_new_cflags"
16903 if test -n "$cf_new_cppflags" ; then
16905 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16906 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16910 if test -n "$cf_new_extra_cppflags" ; then
16912 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16913 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16917 cf_add_libs="$LIBS"
16920 for cf_add_1lib in `$PKG_CONFIG --libs form$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16921 # filter duplicates
16922 for cf_add_1lib in $cf_add_0lib; do
16923 for cf_add_2lib in $cf_add_libs; do
16924 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16929 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16931 LIBS="$cf_add_libs"
16933 cat >conftest.$ac_ext <<_ACEOF
16934 #line 16934 "configure"
16935 #include "confdefs.h"
16940 (void) form_driver ( 0,0 );
16945 rm -f conftest.$ac_objext conftest$ac_exeext
16946 if { (eval echo "$as_me:16946: \"$ac_link\"") >&5
16947 (eval $ac_link) 2>&5
16949 echo "$as_me:16949: \$? = $ac_status" >&5
16950 (exit $ac_status); } &&
16951 { ac_try='test -s conftest$ac_exeext'
16952 { (eval echo "$as_me:16952: \"$ac_try\"") >&5
16953 (eval $ac_try) 2>&5
16955 echo "$as_me:16955: \$? = $ac_status" >&5
16956 (exit $ac_status); }; }; then
16957 if test "$cross_compiling" = yes; then
16958 cf_have_curses_lib=maybe
16960 cat >conftest.$ac_ext <<_ACEOF
16961 #line 16961 "configure"
16962 #include "confdefs.h"
16965 { (void) form_driver ( 0,0 ); return 0; }
16967 rm -f conftest$ac_exeext
16968 if { (eval echo "$as_me:16968: \"$ac_link\"") >&5
16969 (eval $ac_link) 2>&5
16971 echo "$as_me:16971: \$? = $ac_status" >&5
16972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16973 { (eval echo "$as_me:16973: \"$ac_try\"") >&5
16974 (eval $ac_try) 2>&5
16976 echo "$as_me:16976: \$? = $ac_status" >&5
16977 (exit $ac_status); }; }; then
16978 cf_have_curses_lib=yes
16980 echo "$as_me: program exited with status $ac_status" >&5
16981 echo "$as_me: failed program was:" >&5
16982 cat conftest.$ac_ext >&5
16983 cf_have_curses_lib=no
16985 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16988 echo "$as_me: failed program was:" >&5
16989 cat conftest.$ac_ext >&5
16990 cf_have_curses_lib=no
16992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16993 echo "$as_me:16993: result: $cf_have_curses_lib" >&5
16994 echo "${ECHO_T}$cf_have_curses_lib" >&6
16995 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16996 if test "$cf_have_curses_lib" != "yes"
16998 CPPFLAGS="$cf_save_CPPFLAGS"
16999 LIBS="$cf_save_LIBS"
17002 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17004 cat >>confdefs.h <<EOF
17005 #define $cf_upper 1
17011 if test "$cf_have_curses_lib" = no; then
17012 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
17013 echo "$as_me:17013: checking for form_driver in -lform$cf_cv_libtype" >&5
17014 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
17015 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17016 echo $ECHO_N "(cached) $ECHO_C" >&6
17018 ac_check_lib_save_LIBS=$LIBS
17019 LIBS="-lform$cf_cv_libtype $LIBS"
17020 cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17024 /* Override any gcc2 internal prototype to avoid an error. */
17028 /* We use char because int might match the return type of a gcc2
17029 builtin and then its argument prototype would still apply. */
17030 char form_driver ();
17039 rm -f conftest.$ac_objext conftest$ac_exeext
17040 if { (eval echo "$as_me:17040: \"$ac_link\"") >&5
17041 (eval $ac_link) 2>&5
17043 echo "$as_me:17043: \$? = $ac_status" >&5
17044 (exit $ac_status); } &&
17045 { ac_try='test -s conftest$ac_exeext'
17046 { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047 (eval $ac_try) 2>&5
17049 echo "$as_me:17049: \$? = $ac_status" >&5
17050 (exit $ac_status); }; }; then
17051 eval "$as_ac_Lib=yes"
17053 echo "$as_me: failed program was:" >&5
17054 cat conftest.$ac_ext >&5
17055 eval "$as_ac_Lib=no"
17057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17058 LIBS=$ac_check_lib_save_LIBS
17060 echo "$as_me:17060: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17061 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17062 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17064 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17066 cf_add_libs="$LIBS"
17069 for cf_add_1lib in -lform$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17070 # filter duplicates
17071 for cf_add_1lib in $cf_add_0lib; do
17072 for cf_add_2lib in $cf_add_libs; do
17073 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17078 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17080 LIBS="$cf_add_libs"
17082 cat >>confdefs.h <<EOF
17083 #define $cf_upper 1
17090 cf_curses_headers="$cf_curses_headers form.h"
17093 # look for curses-related headers
17095 for ac_header in $cf_curses_headers
17097 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17098 echo "$as_me:17098: checking for $ac_header" >&5
17099 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17100 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17101 echo $ECHO_N "(cached) $ECHO_C" >&6
17103 cat >conftest.$ac_ext <<_ACEOF
17104 #line 17104 "configure"
17105 #include "confdefs.h"
17106 #include <$ac_header>
17108 if { (eval echo "$as_me:17108: \"$ac_cpp conftest.$ac_ext\"") >&5
17109 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17111 egrep -v '^ *\+' conftest.er1 >conftest.err
17113 cat conftest.err >&5
17114 echo "$as_me:17114: \$? = $ac_status" >&5
17115 (exit $ac_status); } >/dev/null; then
17116 if test -s conftest.err; then
17117 ac_cpp_err=$ac_c_preproc_warn_flag
17124 if test -z "$ac_cpp_err"; then
17125 eval "$as_ac_Header=yes"
17127 echo "$as_me: failed program was:" >&5
17128 cat conftest.$ac_ext >&5
17129 eval "$as_ac_Header=no"
17131 rm -f conftest.err conftest.$ac_ext
17133 echo "$as_me:17133: result: `eval echo '${'$as_ac_Header'}'`" >&5
17134 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17135 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17136 cat >>confdefs.h <<EOF
17137 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17143 echo "$as_me:17143: checking for ANSI C header files" >&5
17144 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17145 if test "${ac_cv_header_stdc+set}" = set; then
17146 echo $ECHO_N "(cached) $ECHO_C" >&6
17148 cat >conftest.$ac_ext <<_ACEOF
17149 #line 17149 "configure"
17150 #include "confdefs.h"
17151 #include <stdlib.h>
17152 #include <stdarg.h>
17153 #include <string.h>
17157 if { (eval echo "$as_me:17157: \"$ac_cpp conftest.$ac_ext\"") >&5
17158 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17160 egrep -v '^ *\+' conftest.er1 >conftest.err
17162 cat conftest.err >&5
17163 echo "$as_me:17163: \$? = $ac_status" >&5
17164 (exit $ac_status); } >/dev/null; then
17165 if test -s conftest.err; then
17166 ac_cpp_err=$ac_c_preproc_warn_flag
17173 if test -z "$ac_cpp_err"; then
17174 ac_cv_header_stdc=yes
17176 echo "$as_me: failed program was:" >&5
17177 cat conftest.$ac_ext >&5
17178 ac_cv_header_stdc=no
17180 rm -f conftest.err conftest.$ac_ext
17182 if test $ac_cv_header_stdc = yes; then
17183 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17184 cat >conftest.$ac_ext <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187 #include <string.h>
17190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17191 egrep "memchr" >/dev/null 2>&1; then
17194 ac_cv_header_stdc=no
17200 if test $ac_cv_header_stdc = yes; then
17201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17202 cat >conftest.$ac_ext <<_ACEOF
17203 #line 17203 "configure"
17204 #include "confdefs.h"
17205 #include <stdlib.h>
17208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17209 egrep "free" >/dev/null 2>&1; then
17212 ac_cv_header_stdc=no
17218 if test $ac_cv_header_stdc = yes; then
17219 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17220 if test "$cross_compiling" = yes; then
17223 cat >conftest.$ac_ext <<_ACEOF
17224 #line 17224 "configure"
17225 #include "confdefs.h"
17227 #if ((' ' & 0x0FF) == 0x020)
17228 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17229 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17231 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17232 || ('j' <= (c) && (c) <= 'r') \
17233 || ('s' <= (c) && (c) <= 'z'))
17234 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17237 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17242 for (i = 0; i < 256; i++)
17243 if (XOR (islower (i), ISLOWER (i))
17244 || toupper (i) != TOUPPER (i))
17245 $ac_main_return(2);
17246 $ac_main_return (0);
17249 rm -f conftest$ac_exeext
17250 if { (eval echo "$as_me:17250: \"$ac_link\"") >&5
17251 (eval $ac_link) 2>&5
17253 echo "$as_me:17253: \$? = $ac_status" >&5
17254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17255 { (eval echo "$as_me:17255: \"$ac_try\"") >&5
17256 (eval $ac_try) 2>&5
17258 echo "$as_me:17258: \$? = $ac_status" >&5
17259 (exit $ac_status); }; }; then
17262 echo "$as_me: program exited with status $ac_status" >&5
17263 echo "$as_me: failed program was:" >&5
17264 cat conftest.$ac_ext >&5
17265 ac_cv_header_stdc=no
17267 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17271 echo "$as_me:17271: result: $ac_cv_header_stdc" >&5
17272 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17273 if test $ac_cv_header_stdc = yes; then
17275 cat >>confdefs.h <<\EOF
17276 #define STDC_HEADERS 1
17281 echo "$as_me:17281: checking whether time.h and sys/time.h may both be included" >&5
17282 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17283 if test "${ac_cv_header_time+set}" = set; then
17284 echo $ECHO_N "(cached) $ECHO_C" >&6
17286 cat >conftest.$ac_ext <<_ACEOF
17287 #line 17287 "configure"
17288 #include "confdefs.h"
17289 #include <sys/types.h>
17290 #include <sys/time.h>
17296 if ((struct tm *) 0)
17302 rm -f conftest.$ac_objext
17303 if { (eval echo "$as_me:17303: \"$ac_compile\"") >&5
17304 (eval $ac_compile) 2>&5
17306 echo "$as_me:17306: \$? = $ac_status" >&5
17307 (exit $ac_status); } &&
17308 { ac_try='test -s conftest.$ac_objext'
17309 { (eval echo "$as_me:17309: \"$ac_try\"") >&5
17310 (eval $ac_try) 2>&5
17312 echo "$as_me:17312: \$? = $ac_status" >&5
17313 (exit $ac_status); }; }; then
17314 ac_cv_header_time=yes
17316 echo "$as_me: failed program was:" >&5
17317 cat conftest.$ac_ext >&5
17318 ac_cv_header_time=no
17320 rm -f conftest.$ac_objext conftest.$ac_ext
17322 echo "$as_me:17322: result: $ac_cv_header_time" >&5
17323 echo "${ECHO_T}$ac_cv_header_time" >&6
17324 if test $ac_cv_header_time = yes; then
17326 cat >>confdefs.h <<\EOF
17327 #define TIME_WITH_SYS_TIME 1
17345 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17346 echo "$as_me:17346: checking for $ac_header" >&5
17347 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17348 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17349 echo $ECHO_N "(cached) $ECHO_C" >&6
17351 cat >conftest.$ac_ext <<_ACEOF
17352 #line 17352 "configure"
17353 #include "confdefs.h"
17354 #include <$ac_header>
17356 if { (eval echo "$as_me:17356: \"$ac_cpp conftest.$ac_ext\"") >&5
17357 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17359 egrep -v '^ *\+' conftest.er1 >conftest.err
17361 cat conftest.err >&5
17362 echo "$as_me:17362: \$? = $ac_status" >&5
17363 (exit $ac_status); } >/dev/null; then
17364 if test -s conftest.err; then
17365 ac_cpp_err=$ac_c_preproc_warn_flag
17372 if test -z "$ac_cpp_err"; then
17373 eval "$as_ac_Header=yes"
17375 echo "$as_me: failed program was:" >&5
17376 cat conftest.$ac_ext >&5
17377 eval "$as_ac_Header=no"
17379 rm -f conftest.err conftest.$ac_ext
17381 echo "$as_me:17381: result: `eval echo '${'$as_ac_Header'}'`" >&5
17382 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17383 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17384 cat >>confdefs.h <<EOF
17385 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17391 for ac_header in unistd.h getopt.h
17393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17394 echo "$as_me:17394: checking for $ac_header" >&5
17395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17397 echo $ECHO_N "(cached) $ECHO_C" >&6
17399 cat >conftest.$ac_ext <<_ACEOF
17400 #line 17400 "configure"
17401 #include "confdefs.h"
17402 #include <$ac_header>
17404 if { (eval echo "$as_me:17404: \"$ac_cpp conftest.$ac_ext\"") >&5
17405 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17407 egrep -v '^ *\+' conftest.er1 >conftest.err
17409 cat conftest.err >&5
17410 echo "$as_me:17410: \$? = $ac_status" >&5
17411 (exit $ac_status); } >/dev/null; then
17412 if test -s conftest.err; then
17413 ac_cpp_err=$ac_c_preproc_warn_flag
17420 if test -z "$ac_cpp_err"; then
17421 eval "$as_ac_Header=yes"
17423 echo "$as_me: failed program was:" >&5
17424 cat conftest.$ac_ext >&5
17425 eval "$as_ac_Header=no"
17427 rm -f conftest.err conftest.$ac_ext
17429 echo "$as_me:17429: result: `eval echo '${'$as_ac_Header'}'`" >&5
17430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17432 cat >>confdefs.h <<EOF
17433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17439 echo "$as_me:17439: checking for header declaring getopt variables" >&5
17440 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17441 if test "${cf_cv_getopt_header+set}" = set; then
17442 echo $ECHO_N "(cached) $ECHO_C" >&6
17445 cf_cv_getopt_header=none
17446 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17448 cat >conftest.$ac_ext <<_ACEOF
17449 #line 17449 "configure"
17450 #include "confdefs.h"
17452 #include <$cf_header>
17456 int x = optind; char *y = optarg
17461 rm -f conftest.$ac_objext
17462 if { (eval echo "$as_me:17462: \"$ac_compile\"") >&5
17463 (eval $ac_compile) 2>&5
17465 echo "$as_me:17465: \$? = $ac_status" >&5
17466 (exit $ac_status); } &&
17467 { ac_try='test -s conftest.$ac_objext'
17468 { (eval echo "$as_me:17468: \"$ac_try\"") >&5
17469 (eval $ac_try) 2>&5
17471 echo "$as_me:17471: \$? = $ac_status" >&5
17472 (exit $ac_status); }; }; then
17473 cf_cv_getopt_header=$cf_header
17476 echo "$as_me: failed program was:" >&5
17477 cat conftest.$ac_ext >&5
17479 rm -f conftest.$ac_objext conftest.$ac_ext
17483 echo "$as_me:17483: result: $cf_cv_getopt_header" >&5
17484 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17485 if test $cf_cv_getopt_header != none ; then
17487 cat >>confdefs.h <<\EOF
17488 #define HAVE_GETOPT_HEADER 1
17492 if test $cf_cv_getopt_header = getopt.h ; then
17494 cat >>confdefs.h <<\EOF
17495 #define NEED_GETOPT_H 1
17507 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17508 echo "$as_me:17508: checking for $ac_func" >&5
17509 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17510 if eval "test \"\${$as_ac_var+set}\" = set"; then
17511 echo $ECHO_N "(cached) $ECHO_C" >&6
17513 cat >conftest.$ac_ext <<_ACEOF
17514 #line 17514 "configure"
17515 #include "confdefs.h"
17516 #define $ac_func autoconf_temporary
17517 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17524 /* We use char because int might match the return type of a gcc2
17525 builtin and then its argument prototype would still apply. */
17526 char $ac_func (void);
17532 /* The GNU C library defines stubs for functions which it implements
17533 to always fail with ENOSYS. Some functions are actually named
17534 something starting with __ and the normal name is an alias. */
17535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17536 #error found stub for $ac_func
17539 return $ac_func ();
17544 rm -f conftest.$ac_objext conftest$ac_exeext
17545 if { (eval echo "$as_me:17545: \"$ac_link\"") >&5
17546 (eval $ac_link) 2>&5
17548 echo "$as_me:17548: \$? = $ac_status" >&5
17549 (exit $ac_status); } &&
17550 { ac_try='test -s conftest$ac_exeext'
17551 { (eval echo "$as_me:17551: \"$ac_try\"") >&5
17552 (eval $ac_try) 2>&5
17554 echo "$as_me:17554: \$? = $ac_status" >&5
17555 (exit $ac_status); }; }; then
17556 eval "$as_ac_var=yes"
17558 echo "$as_me: failed program was:" >&5
17559 cat conftest.$ac_ext >&5
17560 eval "$as_ac_var=no"
17562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17564 echo "$as_me:17564: result: `eval echo '${'$as_ac_var'}'`" >&5
17565 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17566 if test `eval echo '${'$as_ac_var'}'` = yes; then
17567 cat >>confdefs.h <<EOF
17568 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17574 # use a compile-check to work with ncurses*-config and subdirectory includes
17575 echo "$as_me:17575: checking if we can use termcap.h" >&5
17576 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17577 if test "${cf_cv_have_termcap_h+set}" = set; then
17578 echo $ECHO_N "(cached) $ECHO_C" >&6
17581 cat >conftest.$ac_ext <<_ACEOF
17582 #line 17582 "configure"
17583 #include "confdefs.h"
17585 #include <curses.h>
17586 #ifdef NCURSES_VERSION
17587 #undef NCURSES_VERSION
17589 #include <termcap.h>
17590 #ifndef NCURSES_VERSION
17591 #error wrong header
17602 rm -f conftest.$ac_objext
17603 if { (eval echo "$as_me:17603: \"$ac_compile\"") >&5
17604 (eval $ac_compile) 2>&5
17606 echo "$as_me:17606: \$? = $ac_status" >&5
17607 (exit $ac_status); } &&
17608 { ac_try='test -s conftest.$ac_objext'
17609 { (eval echo "$as_me:17609: \"$ac_try\"") >&5
17610 (eval $ac_try) 2>&5
17612 echo "$as_me:17612: \$? = $ac_status" >&5
17613 (exit $ac_status); }; }; then
17614 cf_cv_have_termcap_h=yes
17616 echo "$as_me: failed program was:" >&5
17617 cat conftest.$ac_ext >&5
17618 cf_cv_have_termcap_h=no
17620 rm -f conftest.$ac_objext conftest.$ac_ext
17622 echo "$as_me:17622: result: $cf_cv_have_termcap_h" >&5
17623 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17624 if test "x$cf_cv_have_termcap_h" = xyes
17627 cat >>confdefs.h <<\EOF
17628 #define HAVE_TERMCAP_H 1
17632 echo "$as_me:17632: checking if we can use ncurses/termcap.h" >&5
17633 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17634 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17635 echo $ECHO_N "(cached) $ECHO_C" >&6
17638 cat >conftest.$ac_ext <<_ACEOF
17639 #line 17639 "configure"
17640 #include "confdefs.h"
17642 #include <ncurses/curses.h>
17643 #ifdef NCURSES_VERSION
17644 #undef NCURSES_VERSION
17646 #include <ncurses/termcap.h>
17647 #ifndef NCURSES_VERSION
17648 #error wrong header
17659 rm -f conftest.$ac_objext
17660 if { (eval echo "$as_me:17660: \"$ac_compile\"") >&5
17661 (eval $ac_compile) 2>&5
17663 echo "$as_me:17663: \$? = $ac_status" >&5
17664 (exit $ac_status); } &&
17665 { ac_try='test -s conftest.$ac_objext'
17666 { (eval echo "$as_me:17666: \"$ac_try\"") >&5
17667 (eval $ac_try) 2>&5
17669 echo "$as_me:17669: \$? = $ac_status" >&5
17670 (exit $ac_status); }; }; then
17671 cf_cv_have_ncurses_termcap_h=yes
17673 echo "$as_me: failed program was:" >&5
17674 cat conftest.$ac_ext >&5
17675 cf_cv_have_ncurses_termcap_h=no
17677 rm -f conftest.$ac_objext conftest.$ac_ext
17679 echo "$as_me:17679: result: $cf_cv_have_ncurses_termcap_h" >&5
17680 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17681 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
17682 cat >>confdefs.h <<\EOF
17683 #define HAVE_NCURSES_TERMCAP_H 1
17688 if test "x$ac_cv_func_getopt" = xno; then
17689 { { echo "$as_me:17689: error: getopt is required for building programs" >&5
17690 echo "$as_me: error: getopt is required for building programs" >&2;}
17691 { (exit 1); exit 1; }; }
17694 if test "$cf_enable_widec" = yes; then
17707 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17708 echo "$as_me:17708: checking for $ac_func" >&5
17709 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17710 if eval "test \"\${$as_ac_var+set}\" = set"; then
17711 echo $ECHO_N "(cached) $ECHO_C" >&6
17713 cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716 #define $ac_func autoconf_temporary
17717 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17724 /* We use char because int might match the return type of a gcc2
17725 builtin and then its argument prototype would still apply. */
17726 char $ac_func (void);
17732 /* The GNU C library defines stubs for functions which it implements
17733 to always fail with ENOSYS. Some functions are actually named
17734 something starting with __ and the normal name is an alias. */
17735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17736 #error found stub for $ac_func
17739 return $ac_func ();
17744 rm -f conftest.$ac_objext conftest$ac_exeext
17745 if { (eval echo "$as_me:17745: \"$ac_link\"") >&5
17746 (eval $ac_link) 2>&5
17748 echo "$as_me:17748: \$? = $ac_status" >&5
17749 (exit $ac_status); } &&
17750 { ac_try='test -s conftest$ac_exeext'
17751 { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17754 echo "$as_me:17754: \$? = $ac_status" >&5
17755 (exit $ac_status); }; }; then
17756 eval "$as_ac_var=yes"
17758 echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 eval "$as_ac_var=no"
17762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17764 echo "$as_me:17764: result: `eval echo '${'$as_ac_var'}'`" >&5
17765 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17766 if test `eval echo '${'$as_ac_var'}'` = yes; then
17767 cat >>confdefs.h <<EOF
17768 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17776 echo "$as_me:17776: checking definition to turn on extended curses functions" >&5
17777 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17778 if test "${cf_cv_need_xopen_extension+set}" = set; then
17779 echo $ECHO_N "(cached) $ECHO_C" >&6
17782 cf_cv_need_xopen_extension=unknown
17783 cat >conftest.$ac_ext <<_ACEOF
17784 #line 17784 "configure"
17785 #include "confdefs.h"
17787 #include <stdlib.h>
17788 #include <${cf_cv_ncurses_header:-curses.h}>
17793 #if defined(NCURSES_VERSION_PATCH)
17794 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17798 #ifdef NCURSES_VERSION
17800 int check2 = curs_set((int)sizeof(check));
17802 long x = winnstr(stdscr, "", 0);
17804 getbegyx(stdscr, y1, x1)
17809 rm -f conftest.$ac_objext conftest$ac_exeext
17810 if { (eval echo "$as_me:17810: \"$ac_link\"") >&5
17811 (eval $ac_link) 2>&5
17813 echo "$as_me:17813: \$? = $ac_status" >&5
17814 (exit $ac_status); } &&
17815 { ac_try='test -s conftest$ac_exeext'
17816 { (eval echo "$as_me:17816: \"$ac_try\"") >&5
17817 (eval $ac_try) 2>&5
17819 echo "$as_me:17819: \$? = $ac_status" >&5
17820 (exit $ac_status); }; }; then
17821 cf_cv_need_xopen_extension=none
17823 echo "$as_me: failed program was:" >&5
17824 cat conftest.$ac_ext >&5
17826 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17828 cat >conftest.$ac_ext <<_ACEOF
17829 #line 17829 "configure"
17830 #include "confdefs.h"
17832 #define $cf_try_xopen_extension 1
17833 #include <stdlib.h>
17834 #include <${cf_cv_ncurses_header:-curses.h}>
17839 #ifdef NCURSES_VERSION
17841 int check2 = curs_set((int)sizeof(check));
17843 long x = winnstr(stdscr, "", 0);
17845 getbegyx(stdscr, y1, x1)
17850 rm -f conftest.$ac_objext conftest$ac_exeext
17851 if { (eval echo "$as_me:17851: \"$ac_link\"") >&5
17852 (eval $ac_link) 2>&5
17854 echo "$as_me:17854: \$? = $ac_status" >&5
17855 (exit $ac_status); } &&
17856 { ac_try='test -s conftest$ac_exeext'
17857 { (eval echo "$as_me:17857: \"$ac_try\"") >&5
17858 (eval $ac_try) 2>&5
17860 echo "$as_me:17860: \$? = $ac_status" >&5
17861 (exit $ac_status); }; }; then
17862 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17864 echo "$as_me: failed program was:" >&5
17865 cat conftest.$ac_ext >&5
17867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17874 echo "$as_me:17874: result: $cf_cv_need_xopen_extension" >&5
17875 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17877 case $cf_cv_need_xopen_extension in
17880 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17881 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17886 echo "$as_me:17886: checking for term.h" >&5
17887 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17888 if test "${cf_cv_term_header+set}" = set; then
17889 echo $ECHO_N "(cached) $ECHO_C" >&6
17892 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17893 # for <term.h> if we do not find the variant.
17895 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17897 case ${cf_cv_ncurses_header:-curses.h} in
17899 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17900 cf_header_list="$cf_header_item $cf_header_list"
17904 for cf_header in $cf_header_list
17906 cat >conftest.$ac_ext <<_ACEOF
17907 #line 17907 "configure"
17908 #include "confdefs.h"
17910 #include <${cf_cv_ncurses_header:-curses.h}>
17911 #include <${cf_header}>
17920 rm -f conftest.$ac_objext
17921 if { (eval echo "$as_me:17921: \"$ac_compile\"") >&5
17922 (eval $ac_compile) 2>&5
17924 echo "$as_me:17924: \$? = $ac_status" >&5
17925 (exit $ac_status); } &&
17926 { ac_try='test -s conftest.$ac_objext'
17927 { (eval echo "$as_me:17927: \"$ac_try\"") >&5
17928 (eval $ac_try) 2>&5
17930 echo "$as_me:17930: \$? = $ac_status" >&5
17931 (exit $ac_status); }; }; then
17932 cf_cv_term_header=$cf_header
17935 echo "$as_me: failed program was:" >&5
17936 cat conftest.$ac_ext >&5
17937 cf_cv_term_header=no
17939 rm -f conftest.$ac_objext conftest.$ac_ext
17942 case $cf_cv_term_header in
17944 # If curses is ncurses, some packagers still mess it up by trying to make
17945 # us use GNU termcap. This handles the most common case.
17946 for cf_header in ncurses/term.h ncursesw/term.h
17948 cat >conftest.$ac_ext <<_ACEOF
17949 #line 17949 "configure"
17950 #include "confdefs.h"
17952 #include <${cf_cv_ncurses_header:-curses.h}>
17953 #ifdef NCURSES_VERSION
17954 #include <${cf_header}>
17966 rm -f conftest.$ac_objext
17967 if { (eval echo "$as_me:17967: \"$ac_compile\"") >&5
17968 (eval $ac_compile) 2>&5
17970 echo "$as_me:17970: \$? = $ac_status" >&5
17971 (exit $ac_status); } &&
17972 { ac_try='test -s conftest.$ac_objext'
17973 { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974 (eval $ac_try) 2>&5
17976 echo "$as_me:17976: \$? = $ac_status" >&5
17977 (exit $ac_status); }; }; then
17978 cf_cv_term_header=$cf_header
17981 echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17983 cf_cv_term_header=no
17985 rm -f conftest.$ac_objext conftest.$ac_ext
17991 echo "$as_me:17991: result: $cf_cv_term_header" >&5
17992 echo "${ECHO_T}$cf_cv_term_header" >&6
17994 case $cf_cv_term_header in
17997 cat >>confdefs.h <<\EOF
17998 #define HAVE_TERM_H 1
18004 cat >>confdefs.h <<\EOF
18005 #define HAVE_NCURSES_TERM_H 1
18011 cat >>confdefs.h <<\EOF
18012 #define HAVE_NCURSESW_TERM_H 1
18018 echo "$as_me:18018: checking for unctrl.h" >&5
18019 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18020 if test "${cf_cv_unctrl_header+set}" = set; then
18021 echo $ECHO_N "(cached) $ECHO_C" >&6
18024 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18025 # for <unctrl.h> if we do not find the variant.
18027 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18029 case ${cf_cv_ncurses_header:-curses.h} in
18031 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18032 cf_header_list="$cf_header_item $cf_header_list"
18036 for cf_header in $cf_header_list
18038 cat >conftest.$ac_ext <<_ACEOF
18039 #line 18039 "configure"
18040 #include "confdefs.h"
18042 #include <${cf_cv_ncurses_header:-curses.h}>
18043 #include <${cf_header}>
18052 rm -f conftest.$ac_objext
18053 if { (eval echo "$as_me:18053: \"$ac_compile\"") >&5
18054 (eval $ac_compile) 2>&5
18056 echo "$as_me:18056: \$? = $ac_status" >&5
18057 (exit $ac_status); } &&
18058 { ac_try='test -s conftest.$ac_objext'
18059 { (eval echo "$as_me:18059: \"$ac_try\"") >&5
18060 (eval $ac_try) 2>&5
18062 echo "$as_me:18062: \$? = $ac_status" >&5
18063 (exit $ac_status); }; }; then
18064 cf_cv_unctrl_header=$cf_header
18067 echo "$as_me: failed program was:" >&5
18068 cat conftest.$ac_ext >&5
18069 cf_cv_unctrl_header=no
18071 rm -f conftest.$ac_objext conftest.$ac_ext
18075 echo "$as_me:18075: result: $cf_cv_unctrl_header" >&5
18076 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18078 case $cf_cv_unctrl_header in
18080 { echo "$as_me:18080: WARNING: unctrl.h header not found" >&5
18081 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18085 case $cf_cv_unctrl_header in
18088 cat >>confdefs.h <<\EOF
18089 #define HAVE_UNCTRL_H 1
18095 cat >>confdefs.h <<\EOF
18096 #define HAVE_NCURSES_UNCTRL_H 1
18100 (ncursesw/unctrl.h)
18102 cat >>confdefs.h <<\EOF
18103 #define HAVE_NCURSESW_UNCTRL_H 1
18111 assume_default_colors \
18126 init_extended_color \
18134 reset_color_pairs \
18149 use_default_colors \
18151 use_extended_names \
18167 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18169 echo "$as_me:18169: checking for ${cf_func}" >&5
18170 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18172 echo "${as_me:-configure}:18172: testing ${cf_func} ..." 1>&5
18174 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18175 echo $ECHO_N "(cached) $ECHO_C" >&6
18178 eval cf_result='$ac_cv_func_'$cf_func
18179 if test ".$cf_result" != ".no"; then
18180 cat >conftest.$ac_ext <<_ACEOF
18181 #line 18181 "configure"
18182 #include "confdefs.h"
18184 #ifdef HAVE_XCURSES
18185 #include <xcurses.h>
18186 char * XCursesProgramName = "test";
18188 #include <${cf_cv_ncurses_header:-curses.h}>
18189 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18190 #include <ncursesw/term.h>
18191 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18192 #include <ncurses/term.h>
18193 #elif defined(HAVE_TERM_H)
18203 long foo = (long)(&${cf_func});
18204 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18205 if (foo + 1234L > 5678L)
18206 ${cf_cv_main_return:-return}(foo != 0);
18213 rm -f conftest.$ac_objext conftest$ac_exeext
18214 if { (eval echo "$as_me:18214: \"$ac_link\"") >&5
18215 (eval $ac_link) 2>&5
18217 echo "$as_me:18217: \$? = $ac_status" >&5
18218 (exit $ac_status); } &&
18219 { ac_try='test -s conftest$ac_exeext'
18220 { (eval echo "$as_me:18220: \"$ac_try\"") >&5
18221 (eval $ac_try) 2>&5
18223 echo "$as_me:18223: \$? = $ac_status" >&5
18224 (exit $ac_status); }; }; then
18227 echo "$as_me: failed program was:" >&5
18228 cat conftest.$ac_ext >&5
18231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18233 eval 'cf_cv_func_'$cf_func'=$cf_result'
18237 # use the computed/retrieved cache-value:
18238 eval 'cf_result=$cf_cv_func_'$cf_func
18239 echo "$as_me:18239: result: $cf_result" >&5
18240 echo "${ECHO_T}$cf_result" >&6
18241 if test $cf_result != no; then
18242 cat >>confdefs.h <<EOF
18243 #define HAVE_${cf_tr_func} 1
18249 for cf_func in tputs
18252 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18254 echo "$as_me:18254: checking for ${cf_func}" >&5
18255 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18257 echo "${as_me:-configure}:18257: testing ${cf_func} ..." 1>&5
18259 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18260 echo $ECHO_N "(cached) $ECHO_C" >&6
18263 eval cf_result='$ac_cv_func_'$cf_func
18264 if test ".$cf_result" != ".no"; then
18265 cat >conftest.$ac_ext <<_ACEOF
18266 #line 18266 "configure"
18267 #include "confdefs.h"
18269 #ifdef HAVE_XCURSES
18270 #include <xcurses.h>
18271 char * XCursesProgramName = "test";
18273 #include <${cf_cv_ncurses_header:-curses.h}>
18274 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18275 #include <ncursesw/term.h>
18276 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18277 #include <ncurses/term.h>
18278 #elif defined(HAVE_TERM_H)
18288 long foo = (long)(&${cf_func});
18289 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18290 if (foo + 1234L > 5678L)
18291 ${cf_cv_main_return:-return}(foo != 0);
18298 rm -f conftest.$ac_objext conftest$ac_exeext
18299 if { (eval echo "$as_me:18299: \"$ac_link\"") >&5
18300 (eval $ac_link) 2>&5
18302 echo "$as_me:18302: \$? = $ac_status" >&5
18303 (exit $ac_status); } &&
18304 { ac_try='test -s conftest$ac_exeext'
18305 { (eval echo "$as_me:18305: \"$ac_try\"") >&5
18306 (eval $ac_try) 2>&5
18308 echo "$as_me:18308: \$? = $ac_status" >&5
18309 (exit $ac_status); }; }; then
18312 echo "$as_me: failed program was:" >&5
18313 cat conftest.$ac_ext >&5
18316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18318 eval 'cf_cv_func_'$cf_func'=$cf_result'
18322 # use the computed/retrieved cache-value:
18323 eval 'cf_result=$cf_cv_func_'$cf_func
18324 echo "$as_me:18324: result: $cf_result" >&5
18325 echo "${ECHO_T}$cf_result" >&6
18326 if test $cf_result != no; then
18327 cat >>confdefs.h <<EOF
18328 #define HAVE_${cf_tr_func} 1
18334 if test x$cf_cv_func_tputs = xyes
18337 for cf_arg in int char
18339 for cf_ret in int void
18341 if test $cf_ret = void
18343 cf_return="/* nothing */"
18345 cf_return="return value"
18347 cat >conftest.$ac_ext <<_ACEOF
18348 #line 18348 "configure"
18349 #include "confdefs.h"
18351 #include <${cf_cv_ncurses_header:-curses.h}>
18352 #include <$cf_cv_term_header>
18354 static $cf_ret outc($cf_arg value) { $cf_return; }
18360 tputs("hello", 0, outc);
18361 ${cf_cv_main_return:-return}(0);
18367 rm -f conftest.$ac_objext
18368 if { (eval echo "$as_me:18368: \"$ac_compile\"") >&5
18369 (eval $ac_compile) 2>&5
18371 echo "$as_me:18371: \$? = $ac_status" >&5
18372 (exit $ac_status); } &&
18373 { ac_try='test -s conftest.$ac_objext'
18374 { (eval echo "$as_me:18374: \"$ac_try\"") >&5
18375 (eval $ac_try) 2>&5
18377 echo "$as_me:18377: \$? = $ac_status" >&5
18378 (exit $ac_status); }; }; then
18380 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18382 echo "${as_me:-configure}:18382: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18384 cat >>confdefs.h <<EOF
18385 #define TPUTS_ARG $cf_arg
18386 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18387 #define TPUTS_RETURN(value) $cf_return
18393 echo "$as_me: failed program was:" >&5
18394 cat conftest.$ac_ext >&5
18396 rm -f conftest.$ac_objext conftest.$ac_ext
18398 test $cf_done = yes && break
18402 echo "$as_me:18402: checking for ncurses extended functions" >&5
18403 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18404 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18405 echo $ECHO_N "(cached) $ECHO_C" >&6
18408 cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18412 #include <${cf_cv_ncurses_header:-curses.h}>
18417 int x = NCURSES_EXT_FUNCS
18423 rm -f conftest.$ac_objext
18424 if { (eval echo "$as_me:18424: \"$ac_compile\"") >&5
18425 (eval $ac_compile) 2>&5
18427 echo "$as_me:18427: \$? = $ac_status" >&5
18428 (exit $ac_status); } &&
18429 { ac_try='test -s conftest.$ac_objext'
18430 { (eval echo "$as_me:18430: \"$ac_try\"") >&5
18431 (eval $ac_try) 2>&5
18433 echo "$as_me:18433: \$? = $ac_status" >&5
18434 (exit $ac_status); }; }; then
18435 cf_cv_ncurses_ext_funcs=defined
18437 echo "$as_me: failed program was:" >&5
18438 cat conftest.$ac_ext >&5
18440 cat >conftest.$ac_ext <<_ACEOF
18441 #line 18441 "configure"
18442 #include "confdefs.h"
18444 #include <${cf_cv_ncurses_header:-curses.h}>
18449 (void) assume_default_colors (0, 0);
18450 (void) curses_version ();
18451 (void) define_key (0, 0);
18452 (void) is_term_resized (0, 0);
18453 (void) key_defined (0);
18454 (void) keybound (0, 0);
18455 (void) keyok (0, 0);
18456 (void) resize_term (0, 0);
18457 (void) resizeterm (0, 0);
18458 (void) use_default_colors ();
18459 (void) use_extended_names (0);
18460 (void) wresize (0, 0, 0);
18465 rm -f conftest.$ac_objext conftest$ac_exeext
18466 if { (eval echo "$as_me:18466: \"$ac_link\"") >&5
18467 (eval $ac_link) 2>&5
18469 echo "$as_me:18469: \$? = $ac_status" >&5
18470 (exit $ac_status); } &&
18471 { ac_try='test -s conftest$ac_exeext'
18472 { (eval echo "$as_me:18472: \"$ac_try\"") >&5
18473 (eval $ac_try) 2>&5
18475 echo "$as_me:18475: \$? = $ac_status" >&5
18476 (exit $ac_status); }; }; then
18477 cf_cv_ncurses_ext_funcs=yes
18479 echo "$as_me: failed program was:" >&5
18480 cat conftest.$ac_ext >&5
18481 cf_cv_ncurses_ext_funcs=no
18483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18486 rm -f conftest.$ac_objext conftest.$ac_ext
18489 echo "$as_me:18489: result: $cf_cv_ncurses_ext_funcs" >&5
18490 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18491 test "$cf_cv_ncurses_ext_funcs" = yes &&
18492 cat >>confdefs.h <<\EOF
18493 #define NCURSES_EXT_FUNCS 1
18496 if test "$cf_enable_widec" = yes
18498 # workaround for systems with ncurses before 20111029, due to change of
18499 # feature test macro from _XPG5 to _XOPEN_SOURCE
18500 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18503 echo "$as_me:18503: checking if _XPG5 should be defined to enable wide-characters" >&5
18504 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18506 cat >conftest.$ac_ext <<_ACEOF
18507 #line 18507 "configure"
18508 #include "confdefs.h"
18510 #include <${cf_cv_ncurses_header:-curses.h}>
18519 rm -f conftest.$ac_objext
18520 if { (eval echo "$as_me:18520: \"$ac_compile\"") >&5
18521 (eval $ac_compile) 2>&5
18523 echo "$as_me:18523: \$? = $ac_status" >&5
18524 (exit $ac_status); } &&
18525 { ac_try='test -s conftest.$ac_objext'
18526 { (eval echo "$as_me:18526: \"$ac_try\"") >&5
18527 (eval $ac_try) 2>&5
18529 echo "$as_me:18529: \$? = $ac_status" >&5
18530 (exit $ac_status); }; }; then
18533 echo "$as_me: failed program was:" >&5
18534 cat conftest.$ac_ext >&5
18535 cf_save_cppflags="$CPPFLAGS"
18536 CPPFLAGS="$CPPFLAGS -D_XPG5"
18537 cat >conftest.$ac_ext <<_ACEOF
18538 #line 18538 "configure"
18539 #include "confdefs.h"
18541 #include <${cf_cv_ncurses_header:-curses.h}>
18550 rm -f conftest.$ac_objext
18551 if { (eval echo "$as_me:18551: \"$ac_compile\"") >&5
18552 (eval $ac_compile) 2>&5
18554 echo "$as_me:18554: \$? = $ac_status" >&5
18555 (exit $ac_status); } &&
18556 { ac_try='test -s conftest.$ac_objext'
18557 { (eval echo "$as_me:18557: \"$ac_try\"") >&5
18558 (eval $ac_try) 2>&5
18560 echo "$as_me:18560: \$? = $ac_status" >&5
18561 (exit $ac_status); }; }; then
18564 echo "$as_me: failed program was:" >&5
18565 cat conftest.$ac_ext >&5
18567 rm -f conftest.$ac_objext conftest.$ac_ext
18568 CPPFLAGS="$cf_save_cppflags"
18570 rm -f conftest.$ac_objext conftest.$ac_ext
18571 echo "$as_me:18571: result: $cf_define_xpg5" >&5
18572 echo "${ECHO_T}$cf_define_xpg5" >&6
18574 if test "$cf_define_xpg5" = yes
18576 CPPFLAGS="$CPPFLAGS -D_XPG5"
18580 echo "$as_me:18580: checking for wide-character functions" >&5
18581 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18582 if test "${cf_cv_widechar_funcs+set}" = set; then
18583 echo $ECHO_N "(cached) $ECHO_C" >&6
18586 cat >conftest.$ac_ext <<_ACEOF
18587 #line 18587 "configure"
18588 #include "confdefs.h"
18590 #include <${cf_cv_ncurses_header:-curses.h}>
18595 static wchar_t src_wchar[2];
18596 static cchar_t dst_cchar;
18597 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18603 rm -f conftest.$ac_objext conftest$ac_exeext
18604 if { (eval echo "$as_me:18604: \"$ac_link\"") >&5
18605 (eval $ac_link) 2>&5
18607 echo "$as_me:18607: \$? = $ac_status" >&5
18608 (exit $ac_status); } &&
18609 { ac_try='test -s conftest$ac_exeext'
18610 { (eval echo "$as_me:18610: \"$ac_try\"") >&5
18611 (eval $ac_try) 2>&5
18613 echo "$as_me:18613: \$? = $ac_status" >&5
18614 (exit $ac_status); }; }; then
18615 cf_cv_widechar_funcs=yes
18617 echo "$as_me: failed program was:" >&5
18618 cat conftest.$ac_ext >&5
18619 cf_cv_widechar_funcs=no
18621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18624 echo "$as_me:18624: result: $cf_cv_widechar_funcs" >&5
18625 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18626 if test "$cf_cv_widechar_funcs" != no ; then
18628 cat >>confdefs.h <<\EOF
18629 #define USE_WIDEC_SUPPORT 1
18633 cat >>confdefs.h <<\EOF
18634 #define USE_WIDEC_SUPPORT 0
18639 cat >>confdefs.h <<\EOF
18640 #define USE_WIDEC_SUPPORT 0
18645 echo "$as_me:18645: checking if $cf_cv_screen library uses pthreads" >&5
18646 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18647 if test "${cf_cv_use_pthreads+set}" = set; then
18648 echo $ECHO_N "(cached) $ECHO_C" >&6
18651 cat >conftest.$ac_ext <<_ACEOF
18652 #line 18652 "configure"
18653 #include "confdefs.h"
18655 #include <${cf_cv_ncurses_header:-curses.h}>
18656 extern void _nc_init_pthreads(void);
18663 _nc_init_pthreads();
18669 rm -f conftest.$ac_objext conftest$ac_exeext
18670 if { (eval echo "$as_me:18670: \"$ac_link\"") >&5
18671 (eval $ac_link) 2>&5
18673 echo "$as_me:18673: \$? = $ac_status" >&5
18674 (exit $ac_status); } &&
18675 { ac_try='test -s conftest$ac_exeext'
18676 { (eval echo "$as_me:18676: \"$ac_try\"") >&5
18677 (eval $ac_try) 2>&5
18679 echo "$as_me:18679: \$? = $ac_status" >&5
18680 (exit $ac_status); }; }; then
18681 cf_cv_use_pthreads=yes
18683 echo "$as_me: failed program was:" >&5
18684 cat conftest.$ac_ext >&5
18685 cf_cv_use_pthreads=no
18687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18690 echo "$as_me:18690: result: $cf_cv_use_pthreads" >&5
18691 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18692 test $cf_cv_use_pthreads = yes &&
18693 cat >>confdefs.h <<\EOF
18694 #define USE_PTHREADS 1
18697 echo "$as_me:18697: checking if sys/time.h works with sys/select.h" >&5
18698 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18699 if test "${cf_cv_sys_time_select+set}" = set; then
18700 echo $ECHO_N "(cached) $ECHO_C" >&6
18703 cat >conftest.$ac_ext <<_ACEOF
18704 #line 18704 "configure"
18705 #include "confdefs.h"
18707 #include <sys/types.h>
18708 #ifdef HAVE_SYS_TIME_H
18709 #include <sys/time.h>
18711 #ifdef HAVE_SYS_SELECT_H
18712 #include <sys/select.h>
18723 rm -f conftest.$ac_objext
18724 if { (eval echo "$as_me:18724: \"$ac_compile\"") >&5
18725 (eval $ac_compile) 2>&5
18727 echo "$as_me:18727: \$? = $ac_status" >&5
18728 (exit $ac_status); } &&
18729 { ac_try='test -s conftest.$ac_objext'
18730 { (eval echo "$as_me:18730: \"$ac_try\"") >&5
18731 (eval $ac_try) 2>&5
18733 echo "$as_me:18733: \$? = $ac_status" >&5
18734 (exit $ac_status); }; }; then
18735 cf_cv_sys_time_select=yes
18737 echo "$as_me: failed program was:" >&5
18738 cat conftest.$ac_ext >&5
18739 cf_cv_sys_time_select=no
18741 rm -f conftest.$ac_objext conftest.$ac_ext
18745 echo "$as_me:18745: result: $cf_cv_sys_time_select" >&5
18746 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18747 test "$cf_cv_sys_time_select" = yes &&
18748 cat >>confdefs.h <<\EOF
18749 #define HAVE_SYS_TIME_SELECT 1
18752 # special check for test/ditto.c
18754 echo "$as_me:18754: checking for openpty in -lutil" >&5
18755 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18756 if test "${ac_cv_lib_util_openpty+set}" = set; then
18757 echo $ECHO_N "(cached) $ECHO_C" >&6
18759 ac_check_lib_save_LIBS=$LIBS
18760 LIBS="-lutil $LIBS"
18761 cat >conftest.$ac_ext <<_ACEOF
18762 #line 18762 "configure"
18763 #include "confdefs.h"
18765 /* Override any gcc2 internal prototype to avoid an error. */
18769 /* We use char because int might match the return type of a gcc2
18770 builtin and then its argument prototype would still apply. */
18780 rm -f conftest.$ac_objext conftest$ac_exeext
18781 if { (eval echo "$as_me:18781: \"$ac_link\"") >&5
18782 (eval $ac_link) 2>&5
18784 echo "$as_me:18784: \$? = $ac_status" >&5
18785 (exit $ac_status); } &&
18786 { ac_try='test -s conftest$ac_exeext'
18787 { (eval echo "$as_me:18787: \"$ac_try\"") >&5
18788 (eval $ac_try) 2>&5
18790 echo "$as_me:18790: \$? = $ac_status" >&5
18791 (exit $ac_status); }; }; then
18792 ac_cv_lib_util_openpty=yes
18794 echo "$as_me: failed program was:" >&5
18795 cat conftest.$ac_ext >&5
18796 ac_cv_lib_util_openpty=no
18798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18799 LIBS=$ac_check_lib_save_LIBS
18801 echo "$as_me:18801: result: $ac_cv_lib_util_openpty" >&5
18802 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18803 if test $ac_cv_lib_util_openpty = yes; then
18809 echo "$as_me:18809: checking for openpty header" >&5
18810 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18811 if test "${cf_cv_func_openpty+set}" = set; then
18812 echo $ECHO_N "(cached) $ECHO_C" >&6
18815 cf_save_LIBS="$LIBS"
18816 test $cf_cv_lib_util = yes && {
18817 cf_add_libs="$LIBS"
18820 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18821 # filter duplicates
18822 for cf_add_1lib in $cf_add_0lib; do
18823 for cf_add_2lib in $cf_add_libs; do
18824 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18829 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18831 LIBS="$cf_add_libs"
18833 for cf_header in pty.h libutil.h util.h
18835 cat >conftest.$ac_ext <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18839 #include <$cf_header>
18845 int x = openpty((int *)0, (int *)0, (char *)0,
18846 (struct termios *)0, (struct winsize *)0);
18852 rm -f conftest.$ac_objext conftest$ac_exeext
18853 if { (eval echo "$as_me:18853: \"$ac_link\"") >&5
18854 (eval $ac_link) 2>&5
18856 echo "$as_me:18856: \$? = $ac_status" >&5
18857 (exit $ac_status); } &&
18858 { ac_try='test -s conftest$ac_exeext'
18859 { (eval echo "$as_me:18859: \"$ac_try\"") >&5
18860 (eval $ac_try) 2>&5
18862 echo "$as_me:18862: \$? = $ac_status" >&5
18863 (exit $ac_status); }; }; then
18865 cf_cv_func_openpty=$cf_header
18869 echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18872 cf_cv_func_openpty=no
18875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18877 LIBS="$cf_save_LIBS"
18880 echo "$as_me:18880: result: $cf_cv_func_openpty" >&5
18881 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18883 if test "$cf_cv_func_openpty" != no ; then
18885 cat >>confdefs.h <<EOF
18886 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18889 cat >>confdefs.h <<\EOF
18890 #define USE_XTERM_PTY 1
18893 if test "x$cf_cv_lib_util" = xyes ; then
18895 cf_add_libs="$TEST_LIBS"
18898 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18899 # filter duplicates
18900 for cf_add_1lib in $cf_add_0lib; do
18901 for cf_add_2lib in $cf_add_libs; do
18902 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18907 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18909 TEST_LIBS="$cf_add_libs"
18914 echo "$as_me:18914: checking for function curses_version" >&5
18915 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18916 if test "${cf_cv_func_curses_version+set}" = set; then
18917 echo $ECHO_N "(cached) $ECHO_C" >&6
18920 if test "$cross_compiling" = yes; then
18921 cf_cv_func_curses_version=unknown
18923 cat >conftest.$ac_ext <<_ACEOF
18924 #line 18924 "configure"
18925 #include "confdefs.h"
18927 #include <${cf_cv_ncurses_header:-curses.h}>
18931 sprintf(temp, "%s\n", curses_version());
18932 ${cf_cv_main_return:-return}(0);
18936 rm -f conftest$ac_exeext
18937 if { (eval echo "$as_me:18937: \"$ac_link\"") >&5
18938 (eval $ac_link) 2>&5
18940 echo "$as_me:18940: \$? = $ac_status" >&5
18941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18942 { (eval echo "$as_me:18942: \"$ac_try\"") >&5
18943 (eval $ac_try) 2>&5
18945 echo "$as_me:18945: \$? = $ac_status" >&5
18946 (exit $ac_status); }; }; then
18947 cf_cv_func_curses_version=yes
18950 echo "$as_me: program exited with status $ac_status" >&5
18951 echo "$as_me: failed program was:" >&5
18952 cat conftest.$ac_ext >&5
18953 cf_cv_func_curses_version=no
18956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18960 echo "$as_me:18960: result: $cf_cv_func_curses_version" >&5
18961 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18962 test "$cf_cv_func_curses_version" = yes &&
18963 cat >>confdefs.h <<\EOF
18964 #define HAVE_CURSES_VERSION 1
18967 echo "$as_me:18967: checking for alternate character set array" >&5
18968 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18969 if test "${cf_cv_curses_acs_map+set}" = set; then
18970 echo $ECHO_N "(cached) $ECHO_C" >&6
18973 cf_cv_curses_acs_map=unknown
18974 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18976 cat >conftest.$ac_ext <<_ACEOF
18977 #line 18977 "configure"
18978 #include "confdefs.h"
18980 #include <${cf_cv_ncurses_header:-curses.h}>
18986 $name['k'] = ACS_PLUS
18992 rm -f conftest.$ac_objext conftest$ac_exeext
18993 if { (eval echo "$as_me:18993: \"$ac_link\"") >&5
18994 (eval $ac_link) 2>&5
18996 echo "$as_me:18996: \$? = $ac_status" >&5
18997 (exit $ac_status); } &&
18998 { ac_try='test -s conftest$ac_exeext'
18999 { (eval echo "$as_me:18999: \"$ac_try\"") >&5
19000 (eval $ac_try) 2>&5
19002 echo "$as_me:19002: \$? = $ac_status" >&5
19003 (exit $ac_status); }; }; then
19004 cf_cv_curses_acs_map=$name; break
19006 echo "$as_me: failed program was:" >&5
19007 cat conftest.$ac_ext >&5
19009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19013 echo "$as_me:19013: result: $cf_cv_curses_acs_map" >&5
19014 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19016 test "$cf_cv_curses_acs_map" != unknown &&
19017 cat >>confdefs.h <<EOF
19018 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19021 if test "$cf_enable_widec" = yes; then
19023 echo "$as_me:19023: checking for wide alternate character set array" >&5
19024 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19025 if test "${cf_cv_curses_wacs_map+set}" = set; then
19026 echo $ECHO_N "(cached) $ECHO_C" >&6
19029 cf_cv_curses_wacs_map=unknown
19030 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19032 cat >conftest.$ac_ext <<_ACEOF
19033 #line 19033 "configure"
19034 #include "confdefs.h"
19036 #ifndef _XOPEN_SOURCE_EXTENDED
19037 #define _XOPEN_SOURCE_EXTENDED
19039 #include <${cf_cv_ncurses_header:-curses.h}>
19043 void *foo = &($name['k'])
19048 rm -f conftest.$ac_objext conftest$ac_exeext
19049 if { (eval echo "$as_me:19049: \"$ac_link\"") >&5
19050 (eval $ac_link) 2>&5
19052 echo "$as_me:19052: \$? = $ac_status" >&5
19053 (exit $ac_status); } &&
19054 { ac_try='test -s conftest$ac_exeext'
19055 { (eval echo "$as_me:19055: \"$ac_try\"") >&5
19056 (eval $ac_try) 2>&5
19058 echo "$as_me:19058: \$? = $ac_status" >&5
19059 (exit $ac_status); }; }; then
19060 cf_cv_curses_wacs_map=$name
19063 echo "$as_me: failed program was:" >&5
19064 cat conftest.$ac_ext >&5
19066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19069 echo "$as_me:19069: result: $cf_cv_curses_wacs_map" >&5
19070 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19072 test "$cf_cv_curses_wacs_map" != unknown &&
19073 cat >>confdefs.h <<EOF
19074 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19077 echo "$as_me:19077: checking for wide alternate character constants" >&5
19078 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19079 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19080 echo $ECHO_N "(cached) $ECHO_C" >&6
19083 cf_cv_curses_wacs_symbols=no
19084 if test "$cf_cv_curses_wacs_map" != unknown
19086 cat >conftest.$ac_ext <<_ACEOF
19087 #line 19087 "configure"
19088 #include "confdefs.h"
19090 #ifndef _XOPEN_SOURCE_EXTENDED
19091 #define _XOPEN_SOURCE_EXTENDED
19093 #include <${cf_cv_ncurses_header:-curses.h}>
19097 cchar_t *foo = WACS_PLUS;
19098 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
19103 rm -f conftest.$ac_objext conftest$ac_exeext
19104 if { (eval echo "$as_me:19104: \"$ac_link\"") >&5
19105 (eval $ac_link) 2>&5
19107 echo "$as_me:19107: \$? = $ac_status" >&5
19108 (exit $ac_status); } &&
19109 { ac_try='test -s conftest$ac_exeext'
19110 { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111 (eval $ac_try) 2>&5
19113 echo "$as_me:19113: \$? = $ac_status" >&5
19114 (exit $ac_status); }; }; then
19115 cf_cv_curses_wacs_symbols=yes
19117 echo "$as_me: failed program was:" >&5
19118 cat conftest.$ac_ext >&5
19120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19122 cat >conftest.$ac_ext <<_ACEOF
19123 #line 19123 "configure"
19124 #include "confdefs.h"
19126 #ifndef _XOPEN_SOURCE_EXTENDED
19127 #define _XOPEN_SOURCE_EXTENDED
19129 #include <${cf_cv_ncurses_header:-curses.h}>
19133 cchar_t *foo = WACS_PLUS
19138 rm -f conftest.$ac_objext conftest$ac_exeext
19139 if { (eval echo "$as_me:19139: \"$ac_link\"") >&5
19140 (eval $ac_link) 2>&5
19142 echo "$as_me:19142: \$? = $ac_status" >&5
19143 (exit $ac_status); } &&
19144 { ac_try='test -s conftest$ac_exeext'
19145 { (eval echo "$as_me:19145: \"$ac_try\"") >&5
19146 (eval $ac_try) 2>&5
19148 echo "$as_me:19148: \$? = $ac_status" >&5
19149 (exit $ac_status); }; }; then
19150 cf_cv_curses_wacs_symbols=yes
19152 echo "$as_me: failed program was:" >&5
19153 cat conftest.$ac_ext >&5
19155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19159 echo "$as_me:19159: result: $cf_cv_curses_wacs_symbols" >&5
19160 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19162 test "$cf_cv_curses_wacs_symbols" != no &&
19163 cat >>confdefs.h <<\EOF
19164 #define CURSES_WACS_SYMBOLS 1
19169 echo "$as_me:19169: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19170 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19171 cat >conftest.$ac_ext <<_ACEOF
19172 #line 19172 "configure"
19173 #include "confdefs.h"
19175 #ifndef _XOPEN_SOURCE_EXTENDED
19176 #define _XOPEN_SOURCE_EXTENDED
19178 #include <${cf_cv_ncurses_header:-curses.h}>
19189 rm -f conftest.$ac_objext
19190 if { (eval echo "$as_me:19190: \"$ac_compile\"") >&5
19191 (eval $ac_compile) 2>&5
19193 echo "$as_me:19193: \$? = $ac_status" >&5
19194 (exit $ac_status); } &&
19195 { ac_try='test -s conftest.$ac_objext'
19196 { (eval echo "$as_me:19196: \"$ac_try\"") >&5
19197 (eval $ac_try) 2>&5
19199 echo "$as_me:19199: \$? = $ac_status" >&5
19200 (exit $ac_status); }; }; then
19203 echo "$as_me: failed program was:" >&5
19204 cat conftest.$ac_ext >&5
19207 rm -f conftest.$ac_objext conftest.$ac_ext
19208 echo "$as_me:19208: result: $cf_result" >&5
19209 echo "${ECHO_T}$cf_result" >&6
19210 if test $cf_result = yes ; then
19212 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19214 cat >>confdefs.h <<EOF
19215 #define $cf_result 1
19220 cat >>confdefs.h <<EOF
19221 #define attr_t long
19226 if test "$cf_enable_widec" = yes; then
19228 # This is needed on Tru64 5.0 to declare mbstate_t
19229 echo "$as_me:19229: checking if we must include wchar.h to declare mbstate_t" >&5
19230 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19231 if test "${cf_cv_mbstate_t+set}" = set; then
19232 echo $ECHO_N "(cached) $ECHO_C" >&6
19235 cat >conftest.$ac_ext <<_ACEOF
19236 #line 19236 "configure"
19237 #include "confdefs.h"
19239 #include <stdlib.h>
19240 #include <stdarg.h>
19242 #ifdef HAVE_LIBUTF8_H
19243 #include <libutf8.h>
19253 rm -f conftest.$ac_objext
19254 if { (eval echo "$as_me:19254: \"$ac_compile\"") >&5
19255 (eval $ac_compile) 2>&5
19257 echo "$as_me:19257: \$? = $ac_status" >&5
19258 (exit $ac_status); } &&
19259 { ac_try='test -s conftest.$ac_objext'
19260 { (eval echo "$as_me:19260: \"$ac_try\"") >&5
19261 (eval $ac_try) 2>&5
19263 echo "$as_me:19263: \$? = $ac_status" >&5
19264 (exit $ac_status); }; }; then
19267 echo "$as_me: failed program was:" >&5
19268 cat conftest.$ac_ext >&5
19269 cat >conftest.$ac_ext <<_ACEOF
19270 #line 19270 "configure"
19271 #include "confdefs.h"
19273 #include <stdlib.h>
19274 #include <stdarg.h>
19277 #ifdef HAVE_LIBUTF8_H
19278 #include <libutf8.h>
19288 rm -f conftest.$ac_objext
19289 if { (eval echo "$as_me:19289: \"$ac_compile\"") >&5
19290 (eval $ac_compile) 2>&5
19292 echo "$as_me:19292: \$? = $ac_status" >&5
19293 (exit $ac_status); } &&
19294 { ac_try='test -s conftest.$ac_objext'
19295 { (eval echo "$as_me:19295: \"$ac_try\"") >&5
19296 (eval $ac_try) 2>&5
19298 echo "$as_me:19298: \$? = $ac_status" >&5
19299 (exit $ac_status); }; }; then
19300 cf_cv_mbstate_t=yes
19302 echo "$as_me: failed program was:" >&5
19303 cat conftest.$ac_ext >&5
19304 cf_cv_mbstate_t=unknown
19306 rm -f conftest.$ac_objext conftest.$ac_ext
19308 rm -f conftest.$ac_objext conftest.$ac_ext
19310 echo "$as_me:19310: result: $cf_cv_mbstate_t" >&5
19311 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19313 if test "$cf_cv_mbstate_t" = yes ; then
19315 cat >>confdefs.h <<\EOF
19316 #define NEED_WCHAR_H 1
19322 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19323 if test "$cf_cv_mbstate_t" = unknown ; then
19324 NCURSES_MBSTATE_T=1
19327 # if we find mbstate_t in either place, use substitution to provide a fallback.
19328 if test "$cf_cv_mbstate_t" != unknown ; then
19329 NCURSES_OK_MBSTATE_T=1
19332 # This is needed on Tru64 5.0 to declare wchar_t
19333 echo "$as_me:19333: checking if we must include wchar.h to declare wchar_t" >&5
19334 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19335 if test "${cf_cv_wchar_t+set}" = set; then
19336 echo $ECHO_N "(cached) $ECHO_C" >&6
19339 cat >conftest.$ac_ext <<_ACEOF
19340 #line 19340 "configure"
19341 #include "confdefs.h"
19343 #include <stdlib.h>
19344 #include <stdarg.h>
19346 #ifdef HAVE_LIBUTF8_H
19347 #include <libutf8.h>
19357 rm -f conftest.$ac_objext
19358 if { (eval echo "$as_me:19358: \"$ac_compile\"") >&5
19359 (eval $ac_compile) 2>&5
19361 echo "$as_me:19361: \$? = $ac_status" >&5
19362 (exit $ac_status); } &&
19363 { ac_try='test -s conftest.$ac_objext'
19364 { (eval echo "$as_me:19364: \"$ac_try\"") >&5
19365 (eval $ac_try) 2>&5
19367 echo "$as_me:19367: \$? = $ac_status" >&5
19368 (exit $ac_status); }; }; then
19371 echo "$as_me: failed program was:" >&5
19372 cat conftest.$ac_ext >&5
19373 cat >conftest.$ac_ext <<_ACEOF
19374 #line 19374 "configure"
19375 #include "confdefs.h"
19377 #include <stdlib.h>
19378 #include <stdarg.h>
19381 #ifdef HAVE_LIBUTF8_H
19382 #include <libutf8.h>
19392 rm -f conftest.$ac_objext
19393 if { (eval echo "$as_me:19393: \"$ac_compile\"") >&5
19394 (eval $ac_compile) 2>&5
19396 echo "$as_me:19396: \$? = $ac_status" >&5
19397 (exit $ac_status); } &&
19398 { ac_try='test -s conftest.$ac_objext'
19399 { (eval echo "$as_me:19399: \"$ac_try\"") >&5
19400 (eval $ac_try) 2>&5
19402 echo "$as_me:19402: \$? = $ac_status" >&5
19403 (exit $ac_status); }; }; then
19406 echo "$as_me: failed program was:" >&5
19407 cat conftest.$ac_ext >&5
19408 cf_cv_wchar_t=unknown
19410 rm -f conftest.$ac_objext conftest.$ac_ext
19412 rm -f conftest.$ac_objext conftest.$ac_ext
19414 echo "$as_me:19414: result: $cf_cv_wchar_t" >&5
19415 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19417 if test "$cf_cv_wchar_t" = yes ; then
19419 cat >>confdefs.h <<\EOF
19420 #define NEED_WCHAR_H 1
19426 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19427 if test "$cf_cv_wchar_t" = unknown ; then
19431 # if we find wchar_t in either place, use substitution to provide a fallback.
19432 if test "$cf_cv_wchar_t" != unknown ; then
19433 NCURSES_OK_WCHAR_T=1
19436 # This is needed on Tru64 5.0 to declare wint_t
19437 echo "$as_me:19437: checking if we must include wchar.h to declare wint_t" >&5
19438 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19439 if test "${cf_cv_wint_t+set}" = set; then
19440 echo $ECHO_N "(cached) $ECHO_C" >&6
19443 cat >conftest.$ac_ext <<_ACEOF
19444 #line 19444 "configure"
19445 #include "confdefs.h"
19447 #include <stdlib.h>
19448 #include <stdarg.h>
19450 #ifdef HAVE_LIBUTF8_H
19451 #include <libutf8.h>
19461 rm -f conftest.$ac_objext
19462 if { (eval echo "$as_me:19462: \"$ac_compile\"") >&5
19463 (eval $ac_compile) 2>&5
19465 echo "$as_me:19465: \$? = $ac_status" >&5
19466 (exit $ac_status); } &&
19467 { ac_try='test -s conftest.$ac_objext'
19468 { (eval echo "$as_me:19468: \"$ac_try\"") >&5
19469 (eval $ac_try) 2>&5
19471 echo "$as_me:19471: \$? = $ac_status" >&5
19472 (exit $ac_status); }; }; then
19475 echo "$as_me: failed program was:" >&5
19476 cat conftest.$ac_ext >&5
19477 cat >conftest.$ac_ext <<_ACEOF
19478 #line 19478 "configure"
19479 #include "confdefs.h"
19481 #include <stdlib.h>
19482 #include <stdarg.h>
19485 #ifdef HAVE_LIBUTF8_H
19486 #include <libutf8.h>
19496 rm -f conftest.$ac_objext
19497 if { (eval echo "$as_me:19497: \"$ac_compile\"") >&5
19498 (eval $ac_compile) 2>&5
19500 echo "$as_me:19500: \$? = $ac_status" >&5
19501 (exit $ac_status); } &&
19502 { ac_try='test -s conftest.$ac_objext'
19503 { (eval echo "$as_me:19503: \"$ac_try\"") >&5
19504 (eval $ac_try) 2>&5
19506 echo "$as_me:19506: \$? = $ac_status" >&5
19507 (exit $ac_status); }; }; then
19510 echo "$as_me: failed program was:" >&5
19511 cat conftest.$ac_ext >&5
19512 cf_cv_wint_t=unknown
19514 rm -f conftest.$ac_objext conftest.$ac_ext
19516 rm -f conftest.$ac_objext conftest.$ac_ext
19518 echo "$as_me:19518: result: $cf_cv_wint_t" >&5
19519 echo "${ECHO_T}$cf_cv_wint_t" >&6
19521 if test "$cf_cv_wint_t" = yes ; then
19523 cat >>confdefs.h <<\EOF
19524 #define NEED_WCHAR_H 1
19530 # if we do not find wint_t in either place, use substitution to provide a fallback.
19531 if test "$cf_cv_wint_t" = unknown ; then
19535 # if we find wint_t in either place, use substitution to provide a fallback.
19536 if test "$cf_cv_wint_t" != unknown ; then
19537 NCURSES_OK_WINT_T=1
19540 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19542 echo "$as_me:19542: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19543 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19544 cat >conftest.$ac_ext <<_ACEOF
19545 #line 19545 "configure"
19546 #include "confdefs.h"
19548 #ifndef _XOPEN_SOURCE_EXTENDED
19549 #define _XOPEN_SOURCE_EXTENDED
19551 #include <${cf_cv_ncurses_header:-curses.h}>
19562 rm -f conftest.$ac_objext
19563 if { (eval echo "$as_me:19563: \"$ac_compile\"") >&5
19564 (eval $ac_compile) 2>&5
19566 echo "$as_me:19566: \$? = $ac_status" >&5
19567 (exit $ac_status); } &&
19568 { ac_try='test -s conftest.$ac_objext'
19569 { (eval echo "$as_me:19569: \"$ac_try\"") >&5
19570 (eval $ac_try) 2>&5
19572 echo "$as_me:19572: \$? = $ac_status" >&5
19573 (exit $ac_status); }; }; then
19576 echo "$as_me: failed program was:" >&5
19577 cat conftest.$ac_ext >&5
19580 rm -f conftest.$ac_objext conftest.$ac_ext
19581 echo "$as_me:19581: result: $cf_result" >&5
19582 echo "${ECHO_T}$cf_result" >&6
19583 if test $cf_result = yes ; then
19585 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19587 cat >>confdefs.h <<EOF
19588 #define $cf_result 1
19593 cat >>confdefs.h <<EOF
19594 #define mbstate_t long
19601 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19603 echo "$as_me:19603: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19604 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19605 cat >conftest.$ac_ext <<_ACEOF
19606 #line 19606 "configure"
19607 #include "confdefs.h"
19609 #ifndef _XOPEN_SOURCE_EXTENDED
19610 #define _XOPEN_SOURCE_EXTENDED
19612 #include <${cf_cv_ncurses_header:-curses.h}>
19623 rm -f conftest.$ac_objext
19624 if { (eval echo "$as_me:19624: \"$ac_compile\"") >&5
19625 (eval $ac_compile) 2>&5
19627 echo "$as_me:19627: \$? = $ac_status" >&5
19628 (exit $ac_status); } &&
19629 { ac_try='test -s conftest.$ac_objext'
19630 { (eval echo "$as_me:19630: \"$ac_try\"") >&5
19631 (eval $ac_try) 2>&5
19633 echo "$as_me:19633: \$? = $ac_status" >&5
19634 (exit $ac_status); }; }; then
19637 echo "$as_me: failed program was:" >&5
19638 cat conftest.$ac_ext >&5
19641 rm -f conftest.$ac_objext conftest.$ac_ext
19642 echo "$as_me:19642: result: $cf_result" >&5
19643 echo "${ECHO_T}$cf_result" >&6
19644 if test $cf_result = yes ; then
19646 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19648 cat >>confdefs.h <<EOF
19649 #define $cf_result 1
19654 cat >>confdefs.h <<EOF
19655 #define wchar_t long
19662 if test "$NCURSES_OK_WINT_T" = 0 ; then
19664 echo "$as_me:19664: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19665 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19666 cat >conftest.$ac_ext <<_ACEOF
19667 #line 19667 "configure"
19668 #include "confdefs.h"
19670 #ifndef _XOPEN_SOURCE_EXTENDED
19671 #define _XOPEN_SOURCE_EXTENDED
19673 #include <${cf_cv_ncurses_header:-curses.h}>
19684 rm -f conftest.$ac_objext
19685 if { (eval echo "$as_me:19685: \"$ac_compile\"") >&5
19686 (eval $ac_compile) 2>&5
19688 echo "$as_me:19688: \$? = $ac_status" >&5
19689 (exit $ac_status); } &&
19690 { ac_try='test -s conftest.$ac_objext'
19691 { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692 (eval $ac_try) 2>&5
19694 echo "$as_me:19694: \$? = $ac_status" >&5
19695 (exit $ac_status); }; }; then
19698 echo "$as_me: failed program was:" >&5
19699 cat conftest.$ac_ext >&5
19702 rm -f conftest.$ac_objext conftest.$ac_ext
19703 echo "$as_me:19703: result: $cf_result" >&5
19704 echo "${ECHO_T}$cf_result" >&6
19705 if test $cf_result = yes ; then
19707 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19709 cat >>confdefs.h <<EOF
19710 #define $cf_result 1
19715 cat >>confdefs.h <<EOF
19716 #define wint_t long
19732 echo "$as_me:19732: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19733 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19735 cat >conftest.$ac_ext <<_ACEOF
19736 #line 19736 "configure"
19737 #include "confdefs.h"
19739 #ifdef HAVE_XCURSES
19740 #include <xcurses.h>
19741 char * XCursesProgramName = "test";
19743 #include <${cf_cv_ncurses_header:-curses.h}>
19744 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19745 #include <ncursesw/term.h>
19746 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19747 #include <ncurses/term.h>
19748 #elif defined(HAVE_TERM_H)
19757 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19758 const void *foo = (const void *)($cf_data);
19760 const void *foo = &($cf_data);
19762 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19768 rm -f conftest.$ac_objext
19769 if { (eval echo "$as_me:19769: \"$ac_compile\"") >&5
19770 (eval $ac_compile) 2>&5
19772 echo "$as_me:19772: \$? = $ac_status" >&5
19773 (exit $ac_status); } &&
19774 { ac_try='test -s conftest.$ac_objext'
19775 { (eval echo "$as_me:19775: \"$ac_try\"") >&5
19776 (eval $ac_try) 2>&5
19778 echo "$as_me:19778: \$? = $ac_status" >&5
19779 (exit $ac_status); }; }; then
19783 echo "$as_me: failed program was:" >&5
19784 cat conftest.$ac_ext >&5
19787 rm -f conftest.$ac_objext conftest.$ac_ext
19788 echo "$as_me:19788: result: $cf_result" >&5
19789 echo "${ECHO_T}$cf_result" >&6
19791 if test $cf_result = yes ; then
19793 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19795 cat >>confdefs.h <<EOF
19796 #define $cf_result 1
19800 echo "$as_me:19800: checking for data $cf_data in library" >&5
19801 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19802 # BSD linkers insist on making weak linkage, but resolve at runtime.
19803 if test "$cross_compiling" = yes; then
19806 cat >conftest.$ac_ext <<_ACEOF
19807 #line 19807 "configure"
19808 #include "confdefs.h"
19810 #ifdef HAVE_XCURSES
19811 #include <xcurses.h>
19812 char * XCursesProgramName = "test";
19814 #include <${cf_cv_ncurses_header:-curses.h}>
19815 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19816 #include <ncursesw/term.h>
19817 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19818 #include <ncurses/term.h>
19819 #elif defined(HAVE_TERM_H)
19824 extern char $cf_data;
19831 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19832 const void *foo = (const void *)($cf_data);
19834 const void *foo = &($cf_data);
19836 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19838 ${cf_cv_main_return:-return}(foo == 0);
19845 rm -f conftest.$ac_objext conftest$ac_exeext
19846 if { (eval echo "$as_me:19846: \"$ac_link\"") >&5
19847 (eval $ac_link) 2>&5
19849 echo "$as_me:19849: \$? = $ac_status" >&5
19850 (exit $ac_status); } &&
19851 { ac_try='test -s conftest$ac_exeext'
19852 { (eval echo "$as_me:19852: \"$ac_try\"") >&5
19853 (eval $ac_try) 2>&5
19855 echo "$as_me:19855: \$? = $ac_status" >&5
19856 (exit $ac_status); }; }; then
19859 echo "$as_me: failed program was:" >&5
19860 cat conftest.$ac_ext >&5
19863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19866 cat >conftest.$ac_ext <<_ACEOF
19867 #line 19867 "configure"
19868 #include "confdefs.h"
19870 #ifdef HAVE_XCURSES
19871 #include <xcurses.h>
19872 char * XCursesProgramName = "test";
19874 #include <${cf_cv_ncurses_header:-curses.h}>
19875 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19876 #include <ncursesw/term.h>
19877 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19878 #include <ncurses/term.h>
19879 #elif defined(HAVE_TERM_H)
19884 extern char $cf_data;
19888 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19889 const void *foo = (const void *)($cf_data);
19891 const void *foo = &($cf_data);
19893 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19895 ${cf_cv_main_return:-return}(foo == 0);
19898 rm -f conftest$ac_exeext
19899 if { (eval echo "$as_me:19899: \"$ac_link\"") >&5
19900 (eval $ac_link) 2>&5
19902 echo "$as_me:19902: \$? = $ac_status" >&5
19903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19904 { (eval echo "$as_me:19904: \"$ac_try\"") >&5
19905 (eval $ac_try) 2>&5
19907 echo "$as_me:19907: \$? = $ac_status" >&5
19908 (exit $ac_status); }; }; then
19912 echo "$as_me: program exited with status $ac_status" >&5
19913 echo "$as_me: failed program was:" >&5
19914 cat conftest.$ac_ext >&5
19917 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19919 echo "$as_me:19919: result: $cf_result" >&5
19920 echo "${ECHO_T}$cf_result" >&6
19921 if test $cf_result = yes ; then
19923 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19925 cat >>confdefs.h <<EOF
19926 #define $cf_result 1
19929 # do not exit loop here, since we prefer system's declarations
19934 if ( test "$GCC" = yes || test "$GXX" = yes )
19936 echo "$as_me:19936: checking if you want to turn on gcc warnings" >&5
19937 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19939 # Check whether --enable-warnings or --disable-warnings was given.
19940 if test "${enable_warnings+set}" = set; then
19941 enableval="$enable_warnings"
19942 test "$enableval" != yes && enableval=no
19943 if test "$enableval" != "no" ; then
19953 echo "$as_me:19953: result: $with_warnings" >&5
19954 echo "${ECHO_T}$with_warnings" >&6
19955 if test "$with_warnings" = "yes"
19958 if test "$GCC" = yes
19960 cat > conftest.i <<EOF
19962 #define GCC_PRINTF 0
19965 #define GCC_SCANF 0
19967 #ifndef GCC_NORETURN
19968 #define GCC_NORETURN /* nothing */
19971 #define GCC_UNUSED /* nothing */
19974 if test "$GCC" = yes
19976 { echo "$as_me:19976: checking for $CC __attribute__ directives..." >&5
19977 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19978 cat > conftest.$ac_ext <<EOF
19979 #line 19979 "${as_me:-configure}"
19980 #include "confdefs.h"
19981 #include "conftest.h"
19982 #include "conftest.i"
19984 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19986 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19989 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19991 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19993 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19994 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19995 extern void foo(void) GCC_NORETURN;
19996 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19998 cf_printf_attribute=no
19999 cf_scanf_attribute=no
20000 for cf_attribute in scanf printf unused noreturn
20003 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20005 cf_directive="__attribute__(($cf_attribute))"
20006 echo "checking for $CC $cf_directive" 1>&5
20008 case $cf_attribute in
20010 cf_printf_attribute=yes
20011 cat >conftest.h <<EOF
20012 #define GCC_$cf_ATTRIBUTE 1
20016 cf_scanf_attribute=yes
20017 cat >conftest.h <<EOF
20018 #define GCC_$cf_ATTRIBUTE 1
20022 cat >conftest.h <<EOF
20023 #define GCC_$cf_ATTRIBUTE $cf_directive
20028 if { (eval echo "$as_me:20028: \"$ac_compile\"") >&5
20029 (eval $ac_compile) 2>&5
20031 echo "$as_me:20031: \$? = $ac_status" >&5
20032 (exit $ac_status); }; then
20033 test -n "$verbose" && echo "$as_me:20033: result: ... $cf_attribute" >&5
20034 echo "${ECHO_T}... $cf_attribute" >&6
20035 cat conftest.h >>confdefs.h
20036 case $cf_attribute in
20039 cat >>confdefs.h <<EOF
20040 #define GCC_NORETURN $cf_directive
20045 cf_value='/* nothing */'
20046 if test "$cf_printf_attribute" != no ; then
20047 cf_value='__attribute__((format(printf,fmt,var)))'
20049 cat >>confdefs.h <<\EOF
20050 #define GCC_PRINTF 1
20055 cat >>confdefs.h <<EOF
20056 #define GCC_PRINTFLIKE(fmt,var) $cf_value
20061 cf_value='/* nothing */'
20062 if test "$cf_scanf_attribute" != no ; then
20063 cf_value='__attribute__((format(scanf,fmt,var)))'
20065 cat >>confdefs.h <<\EOF
20066 #define GCC_SCANF 1
20071 cat >>confdefs.h <<EOF
20072 #define GCC_SCANFLIKE(fmt,var) $cf_value
20078 cat >>confdefs.h <<EOF
20079 #define GCC_UNUSED $cf_directive
20087 fgrep define conftest.i >>confdefs.h
20092 if test "x$have_x" = xyes; then
20094 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
20095 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
20096 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
20097 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
20098 for cf_X_CFLAGS in $X_CFLAGS
20100 case "x$cf_X_CFLAGS" in
20102 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
20105 CFLAGS="$CFLAGS $cf_X_CFLAGS"
20110 cat >conftest.$ac_ext <<_ACEOF
20111 #line 20111 "configure"
20112 #include "confdefs.h"
20114 #include <stdlib.h>
20115 #include <X11/Intrinsic.h>
20120 String foo = malloc(1)
20125 rm -f conftest.$ac_objext
20126 if { (eval echo "$as_me:20126: \"$ac_compile\"") >&5
20127 (eval $ac_compile) 2>&5
20129 echo "$as_me:20129: \$? = $ac_status" >&5
20130 (exit $ac_status); } &&
20131 { ac_try='test -s conftest.$ac_objext'
20132 { (eval echo "$as_me:20132: \"$ac_try\"") >&5
20133 (eval $ac_try) 2>&5
20135 echo "$as_me:20135: \$? = $ac_status" >&5
20136 (exit $ac_status); }; }; then
20138 echo "$as_me:20138: checking for X11/Xt const-feature" >&5
20139 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
20140 if test "${cf_cv_const_x_string+set}" = set; then
20141 echo $ECHO_N "(cached) $ECHO_C" >&6
20144 cat >conftest.$ac_ext <<_ACEOF
20145 #line 20145 "configure"
20146 #include "confdefs.h"
20148 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
20149 #undef XTSTRINGDEFINES /* X11R5 and later */
20150 #include <stdlib.h>
20151 #include <X11/Intrinsic.h>
20156 String foo = malloc(1); *foo = 0
20161 rm -f conftest.$ac_objext
20162 if { (eval echo "$as_me:20162: \"$ac_compile\"") >&5
20163 (eval $ac_compile) 2>&5
20165 echo "$as_me:20165: \$? = $ac_status" >&5
20166 (exit $ac_status); } &&
20167 { ac_try='test -s conftest.$ac_objext'
20168 { (eval echo "$as_me:20168: \"$ac_try\"") >&5
20169 (eval $ac_try) 2>&5
20171 echo "$as_me:20171: \$? = $ac_status" >&5
20172 (exit $ac_status); }; }; then
20174 cf_cv_const_x_string=no
20177 echo "$as_me: failed program was:" >&5
20178 cat conftest.$ac_ext >&5
20180 cf_cv_const_x_string=yes
20183 rm -f conftest.$ac_objext conftest.$ac_ext
20186 echo "$as_me:20186: result: $cf_cv_const_x_string" >&5
20187 echo "${ECHO_T}$cf_cv_const_x_string" >&6
20189 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
20190 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
20191 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
20193 case $cf_cv_const_x_string in
20196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20197 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
20202 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20203 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
20209 echo "$as_me: failed program was:" >&5
20210 cat conftest.$ac_ext >&5
20212 rm -f conftest.$ac_objext conftest.$ac_ext
20214 cat > conftest.$ac_ext <<EOF
20215 #line 20215 "${as_me:-configure}"
20216 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
20218 if test "$INTEL_COMPILER" = yes
20220 # The "-wdXXX" options suppress warnings:
20221 # remark #1419: external declaration in primary source file
20222 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
20223 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
20224 # remark #193: zero used for undefined preprocessing identifier
20225 # remark #593: variable "curs_sb_left_arrow" was set but never used
20226 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
20227 # remark #869: parameter "tw" was never referenced
20228 # remark #981: operands are evaluated in unspecified order
20229 # warning #279: controlling expression is constant
20231 { echo "$as_me:20231: checking for $CC warning options..." >&5
20232 echo "$as_me: checking for $CC warning options..." >&6;}
20233 cf_save_CFLAGS="$CFLAGS"
20234 EXTRA_CFLAGS="-Wall"
20246 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
20247 if { (eval echo "$as_me:20247: \"$ac_compile\"") >&5
20248 (eval $ac_compile) 2>&5
20250 echo "$as_me:20250: \$? = $ac_status" >&5
20251 (exit $ac_status); }; then
20252 test -n "$verbose" && echo "$as_me:20252: result: ... -$cf_opt" >&5
20253 echo "${ECHO_T}... -$cf_opt" >&6
20254 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
20257 CFLAGS="$cf_save_CFLAGS"
20258 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
20260 { echo "$as_me:20260: checking for $CC warning options..." >&5
20261 echo "$as_me: checking for $CC warning options..." >&6;}
20262 cf_save_CFLAGS="$CFLAGS"
20265 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
20266 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
20267 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
20268 for cf_opt in W Wall \
20269 Wbad-function-cast \
20272 Wdeclaration-after-statement \
20275 Wmissing-declarations \
20276 Wmissing-prototypes \
20280 Wstrict-prototypes \
20281 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
20283 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
20284 if { (eval echo "$as_me:20284: \"$ac_compile\"") >&5
20285 (eval $ac_compile) 2>&5
20287 echo "$as_me:20287: \$? = $ac_status" >&5
20288 (exit $ac_status); }; then
20289 test -n "$verbose" && echo "$as_me:20289: result: ... -$cf_opt" >&5
20290 echo "${ECHO_T}... -$cf_opt" >&6
20293 case $GCC_VERSION in
20295 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
20297 echo "${as_me:-configure}:20297: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
20303 case $GCC_VERSION in
20305 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
20307 echo "${as_me:-configure}:20307: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
20313 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
20316 CFLAGS="$cf_save_CFLAGS"
20323 echo "$as_me:20323: checking if you want to use dmalloc for testing" >&5
20324 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
20326 # Check whether --with-dmalloc or --without-dmalloc was given.
20327 if test "${with_dmalloc+set}" = set; then
20328 withval="$with_dmalloc"
20330 cat >>confdefs.h <<EOF
20331 #define USE_DMALLOC 1
20334 : ${with_cflags:=-g}
20335 : ${with_no_leaks:=yes}
20340 echo "$as_me:20340: result: ${with_dmalloc:-no}" >&5
20341 echo "${ECHO_T}${with_dmalloc:-no}" >&6
20343 case .$with_cflags in
20353 cf_new_extra_cppflags=
20355 for cf_add_cflags in -g
20357 case $cf_fix_cppflags in
20359 case $cf_add_cflags in
20360 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20361 case $cf_add_cflags in
20363 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20365 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20366 && test -z "${cf_tst_cflags}" \
20367 && cf_fix_cppflags=yes
20369 if test $cf_fix_cppflags = yes ; then
20371 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20372 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20375 elif test "${cf_tst_cflags}" = "\"'" ; then
20377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20384 case "$CPPFLAGS" in
20388 case $cf_add_cflags in
20390 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20392 CPPFLAGS=`echo "$CPPFLAGS" | \
20393 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20394 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20399 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20400 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20407 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20408 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20418 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20420 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20421 && test -z "${cf_tst_cflags}" \
20422 && cf_fix_cppflags=no
20427 if test -n "$cf_new_cflags" ; then
20429 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20430 CFLAGS="${CFLAGS}$cf_new_cflags"
20434 if test -n "$cf_new_cppflags" ; then
20436 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20437 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20441 if test -n "$cf_new_extra_cppflags" ; then
20443 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20444 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20453 if test "$with_dmalloc" = yes ; then
20454 echo "$as_me:20454: checking for dmalloc.h" >&5
20455 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
20456 if test "${ac_cv_header_dmalloc_h+set}" = set; then
20457 echo $ECHO_N "(cached) $ECHO_C" >&6
20459 cat >conftest.$ac_ext <<_ACEOF
20460 #line 20460 "configure"
20461 #include "confdefs.h"
20462 #include <dmalloc.h>
20464 if { (eval echo "$as_me:20464: \"$ac_cpp conftest.$ac_ext\"") >&5
20465 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20467 egrep -v '^ *\+' conftest.er1 >conftest.err
20469 cat conftest.err >&5
20470 echo "$as_me:20470: \$? = $ac_status" >&5
20471 (exit $ac_status); } >/dev/null; then
20472 if test -s conftest.err; then
20473 ac_cpp_err=$ac_c_preproc_warn_flag
20480 if test -z "$ac_cpp_err"; then
20481 ac_cv_header_dmalloc_h=yes
20483 echo "$as_me: failed program was:" >&5
20484 cat conftest.$ac_ext >&5
20485 ac_cv_header_dmalloc_h=no
20487 rm -f conftest.err conftest.$ac_ext
20489 echo "$as_me:20489: result: $ac_cv_header_dmalloc_h" >&5
20490 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
20491 if test $ac_cv_header_dmalloc_h = yes; then
20493 echo "$as_me:20493: checking for dmalloc_debug in -ldmalloc" >&5
20494 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
20495 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
20496 echo $ECHO_N "(cached) $ECHO_C" >&6
20498 ac_check_lib_save_LIBS=$LIBS
20499 LIBS="-ldmalloc $LIBS"
20500 cat >conftest.$ac_ext <<_ACEOF
20501 #line 20501 "configure"
20502 #include "confdefs.h"
20504 /* Override any gcc2 internal prototype to avoid an error. */
20508 /* We use char because int might match the return type of a gcc2
20509 builtin and then its argument prototype would still apply. */
20510 char dmalloc_debug ();
20519 rm -f conftest.$ac_objext conftest$ac_exeext
20520 if { (eval echo "$as_me:20520: \"$ac_link\"") >&5
20521 (eval $ac_link) 2>&5
20523 echo "$as_me:20523: \$? = $ac_status" >&5
20524 (exit $ac_status); } &&
20525 { ac_try='test -s conftest$ac_exeext'
20526 { (eval echo "$as_me:20526: \"$ac_try\"") >&5
20527 (eval $ac_try) 2>&5
20529 echo "$as_me:20529: \$? = $ac_status" >&5
20530 (exit $ac_status); }; }; then
20531 ac_cv_lib_dmalloc_dmalloc_debug=yes
20533 echo "$as_me: failed program was:" >&5
20534 cat conftest.$ac_ext >&5
20535 ac_cv_lib_dmalloc_dmalloc_debug=no
20537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20538 LIBS=$ac_check_lib_save_LIBS
20540 echo "$as_me:20540: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
20541 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
20542 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
20543 cat >>confdefs.h <<EOF
20544 #define HAVE_LIBDMALLOC 1
20547 LIBS="-ldmalloc $LIBS"
20555 echo "$as_me:20555: checking if you want to use dbmalloc for testing" >&5
20556 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
20558 # Check whether --with-dbmalloc or --without-dbmalloc was given.
20559 if test "${with_dbmalloc+set}" = set; then
20560 withval="$with_dbmalloc"
20562 cat >>confdefs.h <<EOF
20563 #define USE_DBMALLOC 1
20566 : ${with_cflags:=-g}
20567 : ${with_no_leaks:=yes}
20572 echo "$as_me:20572: result: ${with_dbmalloc:-no}" >&5
20573 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
20575 case .$with_cflags in
20585 cf_new_extra_cppflags=
20587 for cf_add_cflags in -g
20589 case $cf_fix_cppflags in
20591 case $cf_add_cflags in
20592 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20593 case $cf_add_cflags in
20595 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20598 && test -z "${cf_tst_cflags}" \
20599 && cf_fix_cppflags=yes
20601 if test $cf_fix_cppflags = yes ; then
20603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20607 elif test "${cf_tst_cflags}" = "\"'" ; then
20609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20616 case "$CPPFLAGS" in
20620 case $cf_add_cflags in
20622 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20624 CPPFLAGS=`echo "$CPPFLAGS" | \
20625 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20626 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20631 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20632 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20639 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20640 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20647 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20648 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20650 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20652 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20653 && test -z "${cf_tst_cflags}" \
20654 && cf_fix_cppflags=no
20659 if test -n "$cf_new_cflags" ; then
20661 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20662 CFLAGS="${CFLAGS}$cf_new_cflags"
20666 if test -n "$cf_new_cppflags" ; then
20668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20669 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20673 if test -n "$cf_new_extra_cppflags" ; then
20675 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20676 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20685 if test "$with_dbmalloc" = yes ; then
20686 echo "$as_me:20686: checking for dbmalloc.h" >&5
20687 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20688 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20689 echo $ECHO_N "(cached) $ECHO_C" >&6
20691 cat >conftest.$ac_ext <<_ACEOF
20692 #line 20692 "configure"
20693 #include "confdefs.h"
20694 #include <dbmalloc.h>
20696 if { (eval echo "$as_me:20696: \"$ac_cpp conftest.$ac_ext\"") >&5
20697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20699 egrep -v '^ *\+' conftest.er1 >conftest.err
20701 cat conftest.err >&5
20702 echo "$as_me:20702: \$? = $ac_status" >&5
20703 (exit $ac_status); } >/dev/null; then
20704 if test -s conftest.err; then
20705 ac_cpp_err=$ac_c_preproc_warn_flag
20712 if test -z "$ac_cpp_err"; then
20713 ac_cv_header_dbmalloc_h=yes
20715 echo "$as_me: failed program was:" >&5
20716 cat conftest.$ac_ext >&5
20717 ac_cv_header_dbmalloc_h=no
20719 rm -f conftest.err conftest.$ac_ext
20721 echo "$as_me:20721: result: $ac_cv_header_dbmalloc_h" >&5
20722 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20723 if test $ac_cv_header_dbmalloc_h = yes; then
20725 echo "$as_me:20725: checking for debug_malloc in -ldbmalloc" >&5
20726 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20727 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20728 echo $ECHO_N "(cached) $ECHO_C" >&6
20730 ac_check_lib_save_LIBS=$LIBS
20731 LIBS="-ldbmalloc $LIBS"
20732 cat >conftest.$ac_ext <<_ACEOF
20733 #line 20733 "configure"
20734 #include "confdefs.h"
20736 /* Override any gcc2 internal prototype to avoid an error. */
20740 /* We use char because int might match the return type of a gcc2
20741 builtin and then its argument prototype would still apply. */
20742 char debug_malloc ();
20751 rm -f conftest.$ac_objext conftest$ac_exeext
20752 if { (eval echo "$as_me:20752: \"$ac_link\"") >&5
20753 (eval $ac_link) 2>&5
20755 echo "$as_me:20755: \$? = $ac_status" >&5
20756 (exit $ac_status); } &&
20757 { ac_try='test -s conftest$ac_exeext'
20758 { (eval echo "$as_me:20758: \"$ac_try\"") >&5
20759 (eval $ac_try) 2>&5
20761 echo "$as_me:20761: \$? = $ac_status" >&5
20762 (exit $ac_status); }; }; then
20763 ac_cv_lib_dbmalloc_debug_malloc=yes
20765 echo "$as_me: failed program was:" >&5
20766 cat conftest.$ac_ext >&5
20767 ac_cv_lib_dbmalloc_debug_malloc=no
20769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20770 LIBS=$ac_check_lib_save_LIBS
20772 echo "$as_me:20772: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20773 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20774 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20775 cat >>confdefs.h <<EOF
20776 #define HAVE_LIBDBMALLOC 1
20779 LIBS="-ldbmalloc $LIBS"
20787 echo "$as_me:20787: checking if you want to use valgrind for testing" >&5
20788 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20790 # Check whether --with-valgrind or --without-valgrind was given.
20791 if test "${with_valgrind+set}" = set; then
20792 withval="$with_valgrind"
20794 cat >>confdefs.h <<EOF
20795 #define USE_VALGRIND 1
20798 : ${with_cflags:=-g}
20799 : ${with_no_leaks:=yes}
20804 echo "$as_me:20804: result: ${with_valgrind:-no}" >&5
20805 echo "${ECHO_T}${with_valgrind:-no}" >&6
20807 case .$with_cflags in
20817 cf_new_extra_cppflags=
20819 for cf_add_cflags in -g
20821 case $cf_fix_cppflags in
20823 case $cf_add_cflags in
20824 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20825 case $cf_add_cflags in
20827 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20830 && test -z "${cf_tst_cflags}" \
20831 && cf_fix_cppflags=yes
20833 if test $cf_fix_cppflags = yes ; then
20835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20839 elif test "${cf_tst_cflags}" = "\"'" ; then
20841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20848 case "$CPPFLAGS" in
20852 case $cf_add_cflags in
20854 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20856 CPPFLAGS=`echo "$CPPFLAGS" | \
20857 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20858 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20863 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20864 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20871 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20872 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20885 && test -z "${cf_tst_cflags}" \
20886 && cf_fix_cppflags=no
20891 if test -n "$cf_new_cflags" ; then
20893 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20894 CFLAGS="${CFLAGS}$cf_new_cflags"
20898 if test -n "$cf_new_cppflags" ; then
20900 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20901 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20905 if test -n "$cf_new_extra_cppflags" ; then
20907 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20908 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20917 echo "$as_me:20917: checking if you want to perform memory-leak testing" >&5
20918 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20920 # Check whether --enable-leaks or --disable-leaks was given.
20921 if test "${enable_leaks+set}" = set; then
20922 enableval="$enable_leaks"
20923 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20925 : ${with_no_leaks:=no}
20927 echo "$as_me:20927: result: $with_no_leaks" >&5
20928 echo "${ECHO_T}$with_no_leaks" >&6
20930 if test "$with_no_leaks" = yes ; then
20932 cat >>confdefs.h <<\EOF
20936 cat >>confdefs.h <<\EOF
20937 #define YY_NO_LEAKS 1
20943 if test "x$cf_cv_enable_rpath" != xno
20945 echo "$as_me:20945: checking for an rpath option" >&5
20946 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20947 case $cf_cv_system_name in
20949 if test "$GCC" = yes; then
20950 LD_RPATH_OPT="-Wl,-rpath,"
20952 LD_RPATH_OPT="-rpath "
20955 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20956 LD_RPATH_OPT="-Wl,-rpath,"
20958 (openbsd[2-9].*|mirbsd*)
20959 LD_RPATH_OPT="-Wl,-rpath,"
20962 LD_RPATH_OPT="-rpath "
20965 LD_RPATH_OPT="-Wl,-rpath,"
20968 LD_RPATH_OPT="-rpath "
20976 echo "$as_me:20976: result: $LD_RPATH_OPT" >&5
20977 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20979 case "x$LD_RPATH_OPT" in
20981 echo "$as_me:20981: checking if we need a space after rpath option" >&5
20982 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20983 cf_save_LIBS="$LIBS"
20985 cf_add_libs="$LIBS"
20988 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20989 # filter duplicates
20990 for cf_add_1lib in $cf_add_0lib; do
20991 for cf_add_2lib in $cf_add_libs; do
20992 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20997 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20999 LIBS="$cf_add_libs"
21001 cat >conftest.$ac_ext <<_ACEOF
21002 #line 21002 "configure"
21003 #include "confdefs.h"
21013 rm -f conftest.$ac_objext conftest$ac_exeext
21014 if { (eval echo "$as_me:21014: \"$ac_link\"") >&5
21015 (eval $ac_link) 2>&5
21017 echo "$as_me:21017: \$? = $ac_status" >&5
21018 (exit $ac_status); } &&
21019 { ac_try='test -s conftest$ac_exeext'
21020 { (eval echo "$as_me:21020: \"$ac_try\"") >&5
21021 (eval $ac_try) 2>&5
21023 echo "$as_me:21023: \$? = $ac_status" >&5
21024 (exit $ac_status); }; }; then
21027 echo "$as_me: failed program was:" >&5
21028 cat conftest.$ac_ext >&5
21031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21032 LIBS="$cf_save_LIBS"
21033 echo "$as_me:21033: result: $cf_rpath_space" >&5
21034 echo "${ECHO_T}$cf_rpath_space" >&6
21035 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
21040 echo "$as_me:21040: checking if rpath-hack should be disabled" >&5
21041 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
21043 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
21044 if test "${enable_rpath_hack+set}" = set; then
21045 enableval="$enable_rpath_hack"
21046 test "$enableval" != no && enableval=yes
21047 if test "$enableval" != "yes" ; then
21048 cf_disable_rpath_hack=yes
21050 cf_disable_rpath_hack=no
21054 cf_disable_rpath_hack=no
21057 echo "$as_me:21057: result: $cf_disable_rpath_hack" >&5
21058 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
21059 if test "$cf_disable_rpath_hack" = no ; then
21061 echo "$as_me:21061: checking for updated LDFLAGS" >&5
21062 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
21063 if test -n "$LD_RPATH_OPT" ; then
21064 echo "$as_me:21064: result: maybe" >&5
21065 echo "${ECHO_T}maybe" >&6
21069 # Extract the first word of "$ac_prog", so it can be a program name with args.
21070 set dummy $ac_prog; ac_word=$2
21071 echo "$as_me:21071: checking for $ac_word" >&5
21072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21073 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
21074 echo $ECHO_N "(cached) $ECHO_C" >&6
21076 if test -n "$cf_ldd_prog"; then
21077 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
21079 ac_save_IFS=$IFS; IFS=$ac_path_separator
21081 for ac_dir in $ac_dummy; do
21083 test -z "$ac_dir" && ac_dir=.
21084 $as_executable_p "$ac_dir/$ac_word" || continue
21085 ac_cv_prog_cf_ldd_prog="$ac_prog"
21086 echo "$as_me:21086: found $ac_dir/$ac_word" >&5
21092 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
21093 if test -n "$cf_ldd_prog"; then
21094 echo "$as_me:21094: result: $cf_ldd_prog" >&5
21095 echo "${ECHO_T}$cf_ldd_prog" >&6
21097 echo "$as_me:21097: result: no" >&5
21098 echo "${ECHO_T}no" >&6
21101 test -n "$cf_ldd_prog" && break
21103 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
21105 cf_rpath_list="/usr/lib /lib"
21106 if test "$cf_ldd_prog" != no
21110 cat >conftest.$ac_ext <<_ACEOF
21111 #line 21111 "configure"
21112 #include "confdefs.h"
21122 rm -f conftest.$ac_objext conftest$ac_exeext
21123 if { (eval echo "$as_me:21123: \"$ac_link\"") >&5
21124 (eval $ac_link) 2>&5
21126 echo "$as_me:21126: \$? = $ac_status" >&5
21127 (exit $ac_status); } &&
21128 { ac_try='test -s conftest$ac_exeext'
21129 { (eval echo "$as_me:21129: \"$ac_try\"") >&5
21130 (eval $ac_try) 2>&5
21132 echo "$as_me:21132: \$? = $ac_status" >&5
21133 (exit $ac_status); }; }; then
21134 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
21135 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
21137 echo "$as_me: failed program was:" >&5
21138 cat conftest.$ac_ext >&5
21140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21142 # If we passed the link-test, but get a "not found" on a given library,
21143 # this could be due to inept reconfiguration of gcc to make it only
21144 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
21145 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
21146 # /usr/local libraries.
21147 if test -n "$cf_rpath_oops"
21149 for cf_rpath_src in $cf_rpath_oops
21151 for cf_rpath_dir in \
21156 if test -f $cf_rpath_dir/lib/$cf_rpath_src
21158 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
21160 echo "${as_me:-configure}:21160: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
21162 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
21170 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
21172 echo "${as_me:-configure}:21172: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
21174 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
21176 echo "${as_me:-configure}:21176: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
21179 for cf_rpath_src in $LDFLAGS
21181 case $cf_rpath_src in
21184 # check if this refers to a directory which we will ignore
21186 if test -n "$cf_rpath_list"
21188 for cf_rpath_item in $cf_rpath_list
21190 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
21198 if test "$cf_rpath_skip" = no
21200 # transform the option
21201 if test "$LD_RPATH_OPT" = "-R " ; then
21202 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
21204 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
21207 # if we have not already added this, add it now
21208 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
21209 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
21211 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
21213 echo "${as_me:-configure}:21213: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
21215 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
21220 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
21222 LDFLAGS=$cf_rpath_dst
21224 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
21226 echo "${as_me:-configure}:21226: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
21228 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
21230 echo "${as_me:-configure}:21230: testing ...checking LIBS $LIBS ..." 1>&5
21233 for cf_rpath_src in $LIBS
21235 case $cf_rpath_src in
21238 # check if this refers to a directory which we will ignore
21240 if test -n "$cf_rpath_list"
21242 for cf_rpath_item in $cf_rpath_list
21244 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
21252 if test "$cf_rpath_skip" = no
21254 # transform the option
21255 if test "$LD_RPATH_OPT" = "-R " ; then
21256 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
21258 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
21261 # if we have not already added this, add it now
21262 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
21263 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
21265 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
21267 echo "${as_me:-configure}:21267: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
21269 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
21274 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
21278 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
21280 echo "${as_me:-configure}:21280: testing ...checked LIBS $LIBS ..." 1>&5
21282 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
21284 echo "${as_me:-configure}:21284: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
21287 echo "$as_me:21287: result: no" >&5
21288 echo "${ECHO_T}no" >&6
21296 ac_config_files="$ac_config_files Makefile"
21297 ac_config_commands="$ac_config_commands default"
21298 cat >confcache <<\_ACEOF
21299 # This file is a shell script that caches the results of configure
21300 # tests run on this system so they can be shared between configure
21301 # scripts and configure runs, see configure's option --config-cache.
21302 # It is not useful on other systems. If it contains results you don't
21303 # want to keep, you may remove or edit it.
21305 # config.status only pays attention to the cache file if you give it
21306 # the --recheck option to rerun configure.
21308 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21310 # following values.
21314 # The following way of writing the cache mishandles newlines in values,
21315 # but we know of no workaround that is simple, portable, and efficient.
21316 # So, don't put newlines in cache variables' values.
21317 # Ultrix sh set writes to stderr and can't be redirected directly,
21318 # and sets the high bit in the cache file unless we assign to the vars.
21321 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21323 # `set' does not quote correctly, so add quotes (double-quote
21324 # substitution turns \\\\ into \\, and sed turns \\ into \).
21327 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21330 # `set' quotes correctly as required by POSIX, so do not add quotes.
21332 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21339 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21341 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21343 if cmp -s $cache_file confcache; then :; else
21344 if test -w $cache_file; then
21345 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21346 cat confcache >$cache_file
21348 echo "not updating unwritable cache $cache_file"
21353 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21354 # Let make expand exec_prefix.
21355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21357 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21358 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21359 # trailing colons and then remove the whole line if VPATH becomes empty
21360 # (actually we leave an empty line to preserve line numbers).
21361 if test "x$srcdir" = x.; then
21362 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21363 s/:*\$(srcdir):*/:/;
21364 s/:*\${srcdir}:*/:/;
21366 s/^\([^=]*=[ ]*\):*/\1/;
21372 DEFS=-DHAVE_CONFIG_H
21374 : ${CONFIG_STATUS=./config.status}
21375 ac_clean_files_save=$ac_clean_files
21376 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21377 { echo "$as_me:21377: creating $CONFIG_STATUS" >&5
21378 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21379 cat >$CONFIG_STATUS <<_ACEOF
21381 # Generated automatically by configure.
21382 # Run this file to recreate the current configuration.
21383 # Compiler output produced by configure, useful for debugging
21384 # configure, is in config.log if it exists.
21387 SHELL=\${CONFIG_SHELL-$SHELL}
21388 ac_cs_invocation="\$0 \$@"
21392 cat >>$CONFIG_STATUS <<\_ACEOF
21393 # Be Bourne compatible
21394 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21397 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21401 # Name of the executable.
21402 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21404 if expr a : '\(a\)' >/dev/null 2>&1; then
21410 rm -f conf$$ conf$$.exe conf$$.file
21412 if ln -s conf$$.file conf$$ 2>/dev/null; then
21413 # We could just check for DJGPP; but this test a) works b) is more generic
21414 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21415 if test -f conf$$.exe; then
21416 # Don't use ln at all; we don't have any links
21421 elif ln conf$$.file conf$$ 2>/dev/null; then
21426 rm -f conf$$ conf$$.exe conf$$.file
21428 as_executable_p="test -f"
21430 # Support unset when possible.
21431 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21438 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21439 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21440 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21441 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21442 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21443 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21444 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21445 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21448 # We need space, tab and new line, in precisely that order.
21454 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21460 # Files that config.status was made for.
21461 if test -n "$ac_config_files"; then
21462 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21465 if test -n "$ac_config_headers"; then
21466 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21469 if test -n "$ac_config_links"; then
21470 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21473 if test -n "$ac_config_commands"; then
21474 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21477 cat >>$CONFIG_STATUS <<\EOF
21480 \`$as_me' instantiates files from templates according to the
21481 current configuration.
21483 Usage: $0 [OPTIONS] [FILE]...
21485 -h, --help print this help, then exit
21486 -V, --version print version number, then exit
21487 -d, --debug don't remove temporary files
21488 --recheck update $as_me by reconfiguring in the same conditions
21489 --file=FILE[:TEMPLATE]
21490 instantiate the configuration file FILE
21491 --header=FILE[:TEMPLATE]
21492 instantiate the configuration header FILE
21494 Configuration files:
21497 Configuration headers:
21500 Configuration commands:
21503 Report bugs to <dickey@invisible-island.net>."
21506 cat >>$CONFIG_STATUS <<EOF
21509 configured by $0, generated by GNU Autoconf 2.52.20200111,
21510 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21512 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21513 Free Software Foundation, Inc.
21514 This config.status script is free software; the Free Software Foundation
21515 gives unlimited permission to copy, distribute and modify it."
21520 cat >>$CONFIG_STATUS <<\EOF
21521 # If no file are specified by the user, then we need to provide default
21522 # value. By we need to know if files were specified by the user.
21528 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21529 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21531 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21535 *) # This is not an option, so the user has probably given explicit
21537 ac_need_defaults=false;;
21541 # Handling of the options.
21543 cat >>$CONFIG_STATUS <<EOF
21544 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21545 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21546 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21548 cat >>$CONFIG_STATUS <<\EOF
21549 --version | --vers* | -V )
21550 echo "$ac_cs_version"; exit 0 ;;
21552 # Conflict between --help and --header
21553 { { echo "$as_me:21553: error: ambiguous option: $1
21554 Try \`$0 --help' for more information." >&5
21555 echo "$as_me: error: ambiguous option: $1
21556 Try \`$0 --help' for more information." >&2;}
21557 { (exit 1); exit 1; }; };;
21558 --help | --hel | -h )
21559 echo "$ac_cs_usage"; exit 0 ;;
21560 --debug | --d* | -d )
21562 --file | --fil | --fi | --f )
21564 CONFIG_FILES="$CONFIG_FILES $1"
21565 ac_need_defaults=false;;
21566 --header | --heade | --head | --hea )
21568 CONFIG_HEADERS="$CONFIG_HEADERS $1"
21569 ac_need_defaults=false;;
21571 # This is an error.
21572 -*) { { echo "$as_me:21572: error: unrecognized option: $1
21573 Try \`$0 --help' for more information." >&5
21574 echo "$as_me: error: unrecognized option: $1
21575 Try \`$0 --help' for more information." >&2;}
21576 { (exit 1); exit 1; }; } ;;
21578 *) ac_config_targets="$ac_config_targets $1" ;;
21587 ## ----------------------- ##
21588 ## Running config.status. ##
21589 ## ----------------------- ##
21591 This file was extended by $as_me 2.52.20200111, executed with
21592 CONFIG_FILES = $CONFIG_FILES
21593 CONFIG_HEADERS = $CONFIG_HEADERS
21594 CONFIG_LINKS = $CONFIG_LINKS
21595 CONFIG_COMMANDS = $CONFIG_COMMANDS
21596 > $ac_cs_invocation
21597 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21602 cat >>$CONFIG_STATUS <<EOF
21604 # INIT-COMMANDS section.
21614 cat >>$CONFIG_STATUS <<\EOF
21615 for ac_config_target in $ac_config_targets
21617 case "$ac_config_target" in
21618 # Handling of arguments.
21619 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21620 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21621 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
21622 *) { { echo "$as_me:21622: error: invalid argument: $ac_config_target" >&5
21623 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21624 { (exit 1); exit 1; }; };;
21628 # If the user did not use the arguments to specify the items to instantiate,
21629 # then the envvar interface is used. Set only those that are not.
21630 # We use the long form for the default assignment because of an extremely
21631 # bizarre bug on SunOS 4.1.3.
21632 if $ac_need_defaults; then
21633 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21634 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21635 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21638 # Create a temporary directory, and hook for its removal unless debugging.
21641 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21642 trap '{ (exit 1); exit 1; }' 1 2 13 15
21645 # Create a (secure) tmp directory for tmp files.
21648 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21649 test -n "$tmp" && test -d "$tmp"
21652 tmp=$TMPDIR/cs$$-$RANDOM
21653 (umask 077 && mkdir $tmp)
21656 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21657 { (exit 1); exit 1; }
21662 cat >>$CONFIG_STATUS <<EOF
21665 # CONFIG_FILES section.
21668 # No need to generate the scripts if there are no CONFIG_FILES.
21669 # This happens for instance when ./config.status config.h
21670 if test -n "\$CONFIG_FILES"; then
21671 # Protect against being on the right side of a sed subst in config.status.
21672 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21673 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21674 s,@SHELL@,$SHELL,;t t
21675 s,@exec_prefix@,$exec_prefix,;t t
21676 s,@prefix@,$prefix,;t t
21677 s,@program_transform_name@,$program_transform_name,;t t
21678 s,@bindir@,$bindir,;t t
21679 s,@sbindir@,$sbindir,;t t
21680 s,@libexecdir@,$libexecdir,;t t
21681 s,@datarootdir@,$datarootdir,;t t
21682 s,@datadir@,$datadir,;t t
21683 s,@sysconfdir@,$sysconfdir,;t t
21684 s,@sharedstatedir@,$sharedstatedir,;t t
21685 s,@localstatedir@,$localstatedir,;t t
21686 s,@runstatedir@,$runstatedir,;t t
21687 s,@libdir@,$libdir,;t t
21688 s,@includedir@,$includedir,;t t
21689 s,@oldincludedir@,$oldincludedir,;t t
21690 s,@infodir@,$infodir,;t t
21691 s,@mandir@,$mandir,;t t
21692 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21693 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21694 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21695 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21696 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21697 s,@build_alias@,$build_alias,;t t
21698 s,@host_alias@,$host_alias,;t t
21699 s,@target_alias@,$target_alias,;t t
21700 s,@ECHO_C@,$ECHO_C,;t t
21701 s,@ECHO_N@,$ECHO_N,;t t
21702 s,@ECHO_T@,$ECHO_T,;t t
21703 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21704 s,@DEFS@,$DEFS,;t t
21705 s,@LIBS@,$LIBS,;t t
21706 s,@build@,$build,;t t
21707 s,@build_cpu@,$build_cpu,;t t
21708 s,@build_vendor@,$build_vendor,;t t
21709 s,@build_os@,$build_os,;t t
21710 s,@host@,$host,;t t
21711 s,@host_cpu@,$host_cpu,;t t
21712 s,@host_vendor@,$host_vendor,;t t
21713 s,@host_os@,$host_os,;t t
21714 s,@SET_MAKE@,$SET_MAKE,;t t
21716 s,@CFLAGS@,$CFLAGS,;t t
21717 s,@LDFLAGS@,$LDFLAGS,;t t
21718 s,@CPPFLAGS@,$CPPFLAGS,;t t
21719 s,@ac_ct_CC@,$ac_ct_CC,;t t
21720 s,@EXEEXT@,$EXEEXT,;t t
21721 s,@OBJEXT@,$OBJEXT,;t t
21722 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21725 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21726 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21727 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21728 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21729 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21730 s,@LINT@,$LINT,;t t
21731 s,@LINT_OPTS@,$LINT_OPTS,;t t
21732 s,@CTAGS@,$CTAGS,;t t
21733 s,@ETAGS@,$ETAGS,;t t
21734 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21735 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21736 s,@MATH_LIB@,$MATH_LIB,;t t
21737 s,@top_builddir@,$top_builddir,;t t
21738 s,@CC_G_OPT@,$CC_G_OPT,;t t
21739 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21740 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21741 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21742 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21744 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21745 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21746 s,@LD_MODEL@,$LD_MODEL,;t t
21747 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21748 s,@LIBTOOL@,$LIBTOOL,;t t
21749 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21750 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21751 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21752 s,@LIB_LINK@,$LIB_LINK,;t t
21753 s,@LINK_TESTS@,$LINK_TESTS,;t t
21754 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21755 s,@PACKAGE@,$PACKAGE,;t t
21756 s,@PTHREAD@,$PTHREAD,;t t
21757 s,@TEST_ARGS@,$TEST_ARGS,;t t
21758 s,@TEST_DEPS@,$TEST_DEPS,;t t
21759 s,@TEST_LIBS@,$TEST_LIBS,;t t
21760 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21761 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21762 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21763 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21764 s,@includesubdir@,$includesubdir,;t t
21765 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21766 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21767 s,@ECHO_LT@,$ECHO_LT,;t t
21768 s,@ECHO_LD@,$ECHO_LD,;t t
21769 s,@RULE_CC@,$RULE_CC,;t t
21770 s,@SHOW_CC@,$SHOW_CC,;t t
21771 s,@ECHO_CC@,$ECHO_CC,;t t
21772 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21773 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21774 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21775 s,@X_CFLAGS@,$X_CFLAGS,;t t
21776 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21777 s,@X_LIBS@,$X_LIBS,;t t
21778 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21779 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21780 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21781 s,@RGB_PATH@,$RGB_PATH,;t t
21782 s,@no_x11_rgb@,$no_x11_rgb,;t t
21783 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21784 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21785 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21790 cat >>$CONFIG_STATUS <<\EOF
21791 # Split the substitutions into bite-sized pieces for seds with
21792 # small command number limits, like on Digital OSF/1 and HP-UX.
21793 ac_max_sed_lines=48
21794 ac_sed_frag=1 # Number of current file.
21795 ac_beg=1 # First line for current file.
21796 ac_end=$ac_max_sed_lines # Line after last line for current file.
21799 while $ac_more_lines; do
21800 if test $ac_beg -gt 1; then
21801 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21803 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21805 if test ! -s $tmp/subs.frag; then
21806 ac_more_lines=false
21808 # The purpose of the label and of the branching condition is to
21809 # speed up the sed processing (if there are no `@' at all, there
21810 # is no need to browse any of the substitutions).
21811 # These are the two extra sed commands mentioned above.
21813 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21814 # It is possible to make a multiline substitution using escaped newlines.
21815 # Ensure that we do not split the substitution between script fragments.
21817 ac_END=`expr $ac_end + $ac_max_sed_lines`
21818 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21819 if test -s $tmp/subs.next; then
21820 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21821 if test ! -s $tmp/subs.edit; then
21822 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21823 if test ! -s $tmp/subs.edit; then
21824 if test $ac_beg -gt 1; then
21825 ac_end=`expr $ac_end - 1`
21832 if test -z "$ac_sed_cmds"; then
21833 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21835 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21837 ac_sed_frag=`expr $ac_sed_frag + 1`
21839 ac_end=`expr $ac_end + $ac_max_sed_lines`
21842 if test -z "$ac_sed_cmds"; then
21845 fi # test -n "$CONFIG_FILES"
21848 cat >>$CONFIG_STATUS <<\EOF
21849 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21850 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21852 - | *:- | *:-:* ) # input from stdin
21854 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21855 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21856 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21857 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21858 * ) ac_file_in=$ac_file.in ;;
21861 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21862 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21863 X"$ac_file" : 'X\(//\)[^/]' \| \
21864 X"$ac_file" : 'X\(//\)$' \| \
21865 X"$ac_file" : 'X\(/\)' \| \
21866 . : '\(.\)' 2>/dev/null ||
21868 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21869 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21870 /^X\(\/\/\)$/{ s//\1/; q; }
21871 /^X\(\/\).*/{ s//\1/; q; }
21873 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21874 { case "$ac_dir" in
21875 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21879 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21880 case $as_mkdir_dir in
21881 # Skip DOS drivespec
21882 ?:) as_incr_dir=$as_mkdir_dir ;;
21884 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21885 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21890 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21891 # A "../" for each directory in $ac_dir_suffix.
21892 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21894 ac_dir_suffix= ac_dots=
21899 if test -z "$ac_dots"; then
21902 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21904 [\\/]* | ?:[\\/]* )
21905 ac_srcdir=$srcdir$ac_dir_suffix;
21906 ac_top_srcdir=$srcdir ;;
21907 *) # Relative path.
21908 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21909 ac_top_srcdir=$ac_dots$srcdir ;;
21913 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21914 *) ac_INSTALL=$ac_dots$INSTALL ;;
21917 if test x"$ac_file" != x-; then
21918 { echo "$as_me:21918: creating $ac_file" >&5
21919 echo "$as_me: creating $ac_file" >&6;}
21922 # Let's still pretend it is `configure' which instantiates (i.e., don't
21923 # use $as_me), people would be surprised to read:
21924 # /* config.h. Generated automatically by config.status. */
21925 configure_input="Generated automatically from `echo $ac_file_in |
21926 sed 's,.*/,,'` by configure."
21928 # First look for the input files in the build tree, otherwise in the
21930 ac_file_inputs=`IFS=:
21931 for f in $ac_file_in; do
21933 -) echo $tmp/stdin ;;
21935 # Absolute (can't be DOS-style, as IFS=:)
21936 test -f "$f" || { { echo "$as_me:21936: error: cannot find input file: $f" >&5
21937 echo "$as_me: error: cannot find input file: $f" >&2;}
21938 { (exit 1); exit 1; }; }
21941 if test -f "$f"; then
21944 elif test -f "$srcdir/$f"; then
21949 { { echo "$as_me:21949: error: cannot find input file: $f" >&5
21950 echo "$as_me: error: cannot find input file: $f" >&2;}
21951 { (exit 1); exit 1; }; }
21954 done` || { (exit 1); exit 1; }
21956 cat >>$CONFIG_STATUS <<\EOF
21957 ac_warn_datarootdir=no
21958 if test x"$ac_file" != x-; then
21959 for ac_item in $ac_file_inputs
21961 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21962 if test -n "$ac_seen"; then
21963 ac_used=`grep '@datarootdir@' $ac_item`
21964 if test -z "$ac_used"; then
21965 { echo "$as_me:21965: WARNING: datarootdir was used implicitly but not set:
21967 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21969 ac_warn_datarootdir=yes
21972 ac_seen=`grep '${datarootdir}' $ac_item`
21973 if test -n "$ac_seen"; then
21974 { echo "$as_me:21974: WARNING: datarootdir was used explicitly but not set:
21976 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21978 ac_warn_datarootdir=yes
21983 if test "x$ac_warn_datarootdir" = xyes; then
21984 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21988 cat >>$CONFIG_STATUS <<EOF
21992 cat >>$CONFIG_STATUS <<\EOF
21994 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21995 s,@configure_input@,$configure_input,;t t
21996 s,@srcdir@,$ac_srcdir,;t t
21997 s,@top_srcdir@,$ac_top_srcdir,;t t
21998 s,@INSTALL@,$ac_INSTALL,;t t
21999 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22001 if test x"$ac_file" != x-; then
22002 cp $tmp/out $ac_file
22004 for ac_name in prefix exec_prefix datarootdir
22006 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22007 if test -n "$ac_seen"; then
22008 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
22009 if test -z "$ac_init"; then
22010 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22011 { echo "$as_me:22011: WARNING: Variable $ac_name is used but was not set:
22013 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22018 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22019 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22020 if test -s $tmp/out; then
22021 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22022 { echo "$as_me:22022: WARNING: Some variables may not be substituted:
22024 echo "$as_me: WARNING: Some variables may not be substituted:
22034 cat >>$CONFIG_STATUS <<\EOF
22037 # CONFIG_HEADER section.
22040 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22041 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22043 # ac_d sets the value in "#define NAME VALUE" lines.
22044 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22045 ac_dB='[ ].*$,\1#\2'
22048 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22049 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22050 ac_iB='\([ ]\),\1#\2define\3'
22053 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22054 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22055 ac_uB='$,\1#\2define\3'
22059 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22060 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22062 - | *:- | *:-:* ) # input from stdin
22064 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22065 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22066 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22067 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22068 * ) ac_file_in=$ac_file.in ;;
22071 test x"$ac_file" != x- && { echo "$as_me:22071: creating $ac_file" >&5
22072 echo "$as_me: creating $ac_file" >&6;}
22074 # First look for the input files in the build tree, otherwise in the
22076 ac_file_inputs=`IFS=:
22077 for f in $ac_file_in; do
22079 -) echo $tmp/stdin ;;
22081 # Absolute (can't be DOS-style, as IFS=:)
22082 test -f "$f" || { { echo "$as_me:22082: error: cannot find input file: $f" >&5
22083 echo "$as_me: error: cannot find input file: $f" >&2;}
22084 { (exit 1); exit 1; }; }
22087 if test -f "$f"; then
22090 elif test -f "$srcdir/$f"; then
22095 { { echo "$as_me:22095: error: cannot find input file: $f" >&5
22096 echo "$as_me: error: cannot find input file: $f" >&2;}
22097 { (exit 1); exit 1; }; }
22100 done` || { (exit 1); exit 1; }
22101 # Remove the trailing spaces.
22102 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22106 # Transform confdefs.h into a list of #define's. We won't use it as a sed
22107 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
22108 # be either 'cat' or 'sort'.
22109 cat confdefs.h | uniq >conftest.vals
22111 # Break up conftest.vals because some shells have a limit on
22112 # the size of here documents, and old seds have small limits too.
22114 rm -f conftest.tail
22115 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
22116 while grep . conftest.vals >/dev/null
22118 # Write chunks of a limited-size here document to conftest.frag.
22119 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22120 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22121 echo 'CEOF' >> $CONFIG_STATUS
22122 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22123 rm -f conftest.vals
22124 mv conftest.tail conftest.vals
22126 rm -f conftest.vals
22128 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22130 echo ' cat >> conftest.edit <<CEOF
22131 /@DEFS@/r conftest.frag
22134 sed -f conftest.edit $tmp/in > $tmp/out
22136 mv $tmp/out $tmp/in
22137 rm -f conftest.edit conftest.frag
22138 ' >> $CONFIG_STATUS
22140 cat >>$CONFIG_STATUS <<\EOF
22141 # Let's still pretend it is `configure' which instantiates (i.e., don't
22142 # use $as_me), people would be surprised to read:
22143 # /* config.h. Generated automatically by config.status. */
22144 if test x"$ac_file" = x-; then
22145 echo "/* Generated automatically by configure. */" >$tmp/config.h
22147 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
22149 cat $tmp/in >>$tmp/config.h
22151 if test x"$ac_file" != x-; then
22152 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22153 { echo "$as_me:22153: $ac_file is unchanged" >&5
22154 echo "$as_me: $ac_file is unchanged" >&6;}
22156 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22157 X"$ac_file" : 'X\(//\)[^/]' \| \
22158 X"$ac_file" : 'X\(//\)$' \| \
22159 X"$ac_file" : 'X\(/\)' \| \
22160 . : '\(.\)' 2>/dev/null ||
22162 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22163 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22164 /^X\(\/\/\)$/{ s//\1/; q; }
22165 /^X\(\/\).*/{ s//\1/; q; }
22167 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22168 { case "$ac_dir" in
22169 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22173 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22174 case $as_mkdir_dir in
22175 # Skip DOS drivespec
22176 ?:) as_incr_dir=$as_mkdir_dir ;;
22178 as_incr_dir=$as_incr_dir/$as_mkdir_dir
22179 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22186 mv $tmp/config.h $ac_file
22190 rm -f $tmp/config.h
22194 cat >>$CONFIG_STATUS <<\EOF
22196 # CONFIG_COMMANDS section.
22198 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22199 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22200 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22207 if test ! -d $srcdir/$cf_dir; then
22209 elif test -f $srcdir/$cf_dir/programs; then
22210 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22214 cat >>Makefile <<TEST_EOF
22216 # These rules are generated so we do not rely on suffix rules, which do not
22217 # work consistently for different make-programs (the '\$(MODEL)/' confuses
22218 # some, and the '\$x' confuses others).
22221 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
22224 cat >>Makefile <<TEST_EOF
22226 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
22227 \$(srcdir)/test.priv.h \\
22230 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
22234 if test -f ../config.guess && test -f ../config.sub
22236 cat >>Makefile <<TEST_EOF
22238 # if we used CF_INHERIT for getting these files, we can remove them
22240 rm -f config.guess config.sub
22248 cat >>$CONFIG_STATUS <<\EOF
22250 { (exit 0); exit 0; }
22252 chmod +x $CONFIG_STATUS
22253 ac_clean_files=$ac_clean_files_save
22255 # configure is writing to config.log, and then calls config.status.
22256 # config.status does its own redirection, appending to config.log.
22257 # Unfortunately, on DOS this fails, as config.log is still kept open
22258 # by configure, so config.status won't be able to write to it; its
22259 # output is simply discarded. So we exec the FD to /dev/null,
22260 # effectively closing config.log, so it can be properly (re)opened and
22261 # appended to by config.status. When coming back to configure, we
22262 # need to make the FD available again.
22263 if test "$no_create" != yes; then
22266 $SHELL $CONFIG_STATUS || ac_cs_success=false
22268 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22269 # would make configure fail if this is the last instruction.
22270 $ac_cs_success || { (exit 1); exit 1; }