2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20181006.
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.20181006. 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
1859 echo "$as_me:1859: checking for $CC option to accept ANSI C" >&5
1860 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1861 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1862 echo $ECHO_N "(cached) $ECHO_C" >&6
1864 ac_cv_prog_cc_stdc=no
1866 cat >conftest.$ac_ext <<_ACEOF
1867 #line 1867 "configure"
1868 #include "confdefs.h"
1871 #include <sys/types.h>
1872 #include <sys/stat.h>
1873 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1874 struct buf { int x; };
1875 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1876 static char *e (p, i)
1882 static char *f (char * (*g) (char **, int), char **p, ...)
1887 s = g (p, va_arg (v,int));
1891 int test (int i, double x);
1892 struct s1 {int (*f) (int a);};
1893 struct s2 {int (*f) (double a);};
1894 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1900 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1905 # Don't try gcc -ansi; that turns off useful extensions and
1906 # breaks some systems' header files.
1907 # AIX -qlanglvl=ansi
1908 # Ultrix and OSF/1 -std1
1909 # HP-UX 10.20 and later -Ae
1910 # HP-UX older versions -Aa -D_HPUX_SOURCE
1911 # SVR4 -Xc -D__EXTENSIONS__
1912 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1914 CC="$ac_save_CC $ac_arg"
1915 rm -f conftest.$ac_objext
1916 if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
1917 (eval $ac_compile) 2>&5
1919 echo "$as_me:1919: \$? = $ac_status" >&5
1920 (exit $ac_status); } &&
1921 { ac_try='test -s conftest.$ac_objext'
1922 { (eval echo "$as_me:1922: \"$ac_try\"") >&5
1925 echo "$as_me:1925: \$? = $ac_status" >&5
1926 (exit $ac_status); }; }; then
1927 ac_cv_prog_cc_stdc=$ac_arg
1930 echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1933 rm -f conftest.$ac_objext
1935 rm -f conftest.$ac_ext conftest.$ac_objext
1940 case "x$ac_cv_prog_cc_stdc" in
1942 echo "$as_me:1942: result: none needed" >&5
1943 echo "${ECHO_T}none needed" >&6 ;;
1945 echo "$as_me:1945: result: $ac_cv_prog_cc_stdc" >&5
1946 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1947 CC="$CC $ac_cv_prog_cc_stdc" ;;
1950 # This should have been defined by AC_PROG_CC
1953 echo "$as_me:1953: checking \$CFLAGS variable" >&5
1954 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
1957 echo "$as_me:1957: result: broken" >&5
1958 echo "${ECHO_T}broken" >&6
1959 { echo "$as_me:1959: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
1960 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1963 for cf_arg in $cf_flags
1969 cf_new_extra_cppflags=
1971 for cf_add_cflags in $cf_arg
1973 case $cf_fix_cppflags in
1975 case $cf_add_cflags in
1976 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1977 case $cf_add_cflags in
1979 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1981 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1982 && test -z "${cf_tst_cflags}" \
1983 && cf_fix_cppflags=yes
1985 if test $cf_fix_cppflags = yes ; then
1987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1991 elif test "${cf_tst_cflags}" = "\"'" ; then
1993 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1994 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2004 case $cf_add_cflags in
2006 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2008 CPPFLAGS=`echo "$CPPFLAGS" | \
2009 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2010 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2015 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2016 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2023 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2024 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2034 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2037 && test -z "${cf_tst_cflags}" \
2038 && cf_fix_cppflags=no
2043 if test -n "$cf_new_cflags" ; then
2045 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2046 CFLAGS="${CFLAGS}$cf_new_cflags"
2050 if test -n "$cf_new_cppflags" ; then
2052 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2053 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2057 if test -n "$cf_new_extra_cppflags" ; then
2059 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2060 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2067 echo "$as_me:2067: result: ok" >&5
2068 echo "${ECHO_T}ok" >&6
2072 echo "$as_me:2072: checking \$CC variable" >&5
2073 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2076 echo "$as_me:2076: result: broken" >&5
2077 echo "${ECHO_T}broken" >&6
2078 { echo "$as_me:2078: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2079 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2081 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2082 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2084 for cf_arg in $cf_flags
2092 cf_new_extra_cppflags=
2094 for cf_add_cflags in $cf_arg
2096 case $cf_fix_cppflags in
2098 case $cf_add_cflags in
2099 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2100 case $cf_add_cflags in
2102 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2105 && test -z "${cf_tst_cflags}" \
2106 && cf_fix_cppflags=yes
2108 if test $cf_fix_cppflags = yes ; then
2110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2114 elif test "${cf_tst_cflags}" = "\"'" ; then
2116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2127 case $cf_add_cflags in
2129 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2131 CPPFLAGS=`echo "$CPPFLAGS" | \
2132 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2133 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2138 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2139 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2146 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2147 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=no
2166 if test -n "$cf_new_cflags" ; then
2168 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2169 CFLAGS="${CFLAGS}$cf_new_cflags"
2173 if test -n "$cf_new_cppflags" ; then
2175 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2176 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2180 if test -n "$cf_new_extra_cppflags" ; then
2182 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2183 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2193 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2195 echo "${as_me:-configure}:2195: testing resulting CC: '$CC' ..." 1>&5
2197 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2199 echo "${as_me:-configure}:2199: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2201 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2203 echo "${as_me:-configure}:2203: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2207 echo "$as_me:2207: result: ok" >&5
2208 echo "${ECHO_T}ok" >&6
2212 echo "$as_me:2212: checking for inline" >&5
2213 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2214 if test "${ac_cv_c_inline+set}" = set; then
2215 echo $ECHO_N "(cached) $ECHO_C" >&6
2218 for ac_kw in inline __inline__ __inline; do
2219 cat >conftest.$ac_ext <<_ACEOF
2220 #line 2220 "configure"
2221 #include "confdefs.h"
2223 static $ac_kw int static_foo () {return 0; }
2224 $ac_kw int foo () {return 0; }
2228 rm -f conftest.$ac_objext
2229 if { (eval echo "$as_me:2229: \"$ac_compile\"") >&5
2230 (eval $ac_compile) 2>&5
2232 echo "$as_me:2232: \$? = $ac_status" >&5
2233 (exit $ac_status); } &&
2234 { ac_try='test -s conftest.$ac_objext'
2235 { (eval echo "$as_me:2235: \"$ac_try\"") >&5
2238 echo "$as_me:2238: \$? = $ac_status" >&5
2239 (exit $ac_status); }; }; then
2240 ac_cv_c_inline=$ac_kw; break
2242 echo "$as_me: failed program was:" >&5
2243 cat conftest.$ac_ext >&5
2245 rm -f conftest.$ac_objext conftest.$ac_ext
2249 echo "$as_me:2249: result: $ac_cv_c_inline" >&5
2250 echo "${ECHO_T}$ac_cv_c_inline" >&6
2251 case $ac_cv_c_inline in
2254 cat >>confdefs.h <<\EOF
2258 *) cat >>confdefs.h <<EOF
2259 #define inline $ac_cv_c_inline
2265 ac_cpp='$CPP $CPPFLAGS'
2266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2269 ac_main_return=return
2270 echo "$as_me:2270: checking how to run the C preprocessor" >&5
2271 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2272 # On Suns, sometimes $CPP names a directory.
2273 if test -n "$CPP" && test -d "$CPP"; then
2276 if test -z "$CPP"; then
2277 if test "${ac_cv_prog_CPP+set}" = set; then
2278 echo $ECHO_N "(cached) $ECHO_C" >&6
2280 # Double quotes because CPP needs to be expanded
2281 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2284 for ac_c_preproc_warn_flag in '' yes
2286 # Use a header file that comes with gcc, so configuring glibc
2287 # with a fresh cross-compiler works.
2288 # On the NeXT, cc -E runs the code through the compiler's parser,
2289 # not just through cpp. "Syntax error" is here to catch this case.
2290 cat >conftest.$ac_ext <<_ACEOF
2291 #line 2291 "configure"
2292 #include "confdefs.h"
2296 if { (eval echo "$as_me:2296: \"$ac_cpp conftest.$ac_ext\"") >&5
2297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2299 egrep -v '^ *\+' conftest.er1 >conftest.err
2301 cat conftest.err >&5
2302 echo "$as_me:2302: \$? = $ac_status" >&5
2303 (exit $ac_status); } >/dev/null; then
2304 if test -s conftest.err; then
2305 ac_cpp_err=$ac_c_preproc_warn_flag
2312 if test -z "$ac_cpp_err"; then
2315 echo "$as_me: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 # Broken: fails on valid input.
2320 rm -f conftest.err conftest.$ac_ext
2322 # OK, works on sane cases. Now check whether non-existent headers
2323 # can be detected and how.
2324 cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <ac_nonexistent.h>
2329 if { (eval echo "$as_me:2329: \"$ac_cpp conftest.$ac_ext\"") >&5
2330 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2332 egrep -v '^ *\+' conftest.er1 >conftest.err
2334 cat conftest.err >&5
2335 echo "$as_me:2335: \$? = $ac_status" >&5
2336 (exit $ac_status); } >/dev/null; then
2337 if test -s conftest.err; then
2338 ac_cpp_err=$ac_c_preproc_warn_flag
2345 if test -z "$ac_cpp_err"; then
2346 # Broken: success on invalid input.
2349 echo "$as_me: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 # Passes both tests.
2355 rm -f conftest.err conftest.$ac_ext
2358 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2359 rm -f conftest.err conftest.$ac_ext
2360 if $ac_preproc_ok; then
2372 echo "$as_me:2372: result: $CPP" >&5
2373 echo "${ECHO_T}$CPP" >&6
2375 for ac_c_preproc_warn_flag in '' yes
2377 # Use a header file that comes with gcc, so configuring glibc
2378 # with a fresh cross-compiler works.
2379 # On the NeXT, cc -E runs the code through the compiler's parser,
2380 # not just through cpp. "Syntax error" is here to catch this case.
2381 cat >conftest.$ac_ext <<_ACEOF
2382 #line 2382 "configure"
2383 #include "confdefs.h"
2387 if { (eval echo "$as_me:2387: \"$ac_cpp conftest.$ac_ext\"") >&5
2388 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2390 egrep -v '^ *\+' conftest.er1 >conftest.err
2392 cat conftest.err >&5
2393 echo "$as_me:2393: \$? = $ac_status" >&5
2394 (exit $ac_status); } >/dev/null; then
2395 if test -s conftest.err; then
2396 ac_cpp_err=$ac_c_preproc_warn_flag
2403 if test -z "$ac_cpp_err"; then
2406 echo "$as_me: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 # Broken: fails on valid input.
2411 rm -f conftest.err conftest.$ac_ext
2413 # OK, works on sane cases. Now check whether non-existent headers
2414 # can be detected and how.
2415 cat >conftest.$ac_ext <<_ACEOF
2416 #line 2416 "configure"
2417 #include "confdefs.h"
2418 #include <ac_nonexistent.h>
2420 if { (eval echo "$as_me:2420: \"$ac_cpp conftest.$ac_ext\"") >&5
2421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2423 egrep -v '^ *\+' conftest.er1 >conftest.err
2425 cat conftest.err >&5
2426 echo "$as_me:2426: \$? = $ac_status" >&5
2427 (exit $ac_status); } >/dev/null; then
2428 if test -s conftest.err; then
2429 ac_cpp_err=$ac_c_preproc_warn_flag
2436 if test -z "$ac_cpp_err"; then
2437 # Broken: success on invalid input.
2440 echo "$as_me: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 # Passes both tests.
2446 rm -f conftest.err conftest.$ac_ext
2449 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2450 rm -f conftest.err conftest.$ac_ext
2451 if $ac_preproc_ok; then
2454 { { echo "$as_me:2454: error: C preprocessor \"$CPP\" fails sanity check" >&5
2455 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2456 { (exit 1); exit 1; }; }
2460 ac_cpp='$CPP $CPPFLAGS'
2461 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2462 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2464 ac_main_return=return
2466 for ac_prog in mawk gawk nawk awk
2468 # Extract the first word of "$ac_prog", so it can be a program name with args.
2469 set dummy $ac_prog; ac_word=$2
2470 echo "$as_me:2470: checking for $ac_word" >&5
2471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2472 if test "${ac_cv_prog_AWK+set}" = set; then
2473 echo $ECHO_N "(cached) $ECHO_C" >&6
2475 if test -n "$AWK"; then
2476 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2478 ac_save_IFS=$IFS; IFS=$ac_path_separator
2480 for ac_dir in $ac_dummy; do
2482 test -z "$ac_dir" && ac_dir=.
2483 $as_executable_p "$ac_dir/$ac_word" || continue
2484 ac_cv_prog_AWK="$ac_prog"
2485 echo "$as_me:2485: found $ac_dir/$ac_word" >&5
2492 if test -n "$AWK"; then
2493 echo "$as_me:2493: result: $AWK" >&5
2494 echo "${ECHO_T}$AWK" >&6
2496 echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2500 test -n "$AWK" && break
2503 # Find a good install program. We prefer a C program (faster),
2504 # so one script is as good as another. But avoid the broken or
2505 # incompatible versions:
2506 # SysV /etc/install, /usr/sbin/install
2507 # SunOS /usr/etc/install
2508 # IRIX /sbin/install
2510 # AmigaOS /C/install, which installs bootblocks on floppy discs
2511 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2512 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2513 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2514 # ./install, which can be erroneously created by make from ./install.sh.
2515 echo "$as_me:2515: checking for a BSD compatible install" >&5
2516 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2517 if test -z "$INSTALL"; then
2518 if test "${ac_cv_path_install+set}" = set; then
2519 echo $ECHO_N "(cached) $ECHO_C" >&6
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2522 for ac_dir in $PATH; do
2524 # Account for people who put trailing slashes in PATH elements.
2526 / | ./ | .// | /cC/* \
2527 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2530 # OSF1 and SCO ODT 3.0 have their own names for install.
2531 # Don't use installbsd from OSF since it installs stuff as root
2533 for ac_prog in ginstall scoinst install; do
2534 if $as_executable_p "$ac_dir/$ac_prog"; then
2535 if test $ac_prog = install &&
2536 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2537 # AIX install. It has an incompatible calling convention.
2539 elif test $ac_prog = install &&
2540 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2541 # program-specific install script used by HP pwplus--don't use.
2544 ac_cv_path_install="$ac_dir/$ac_prog -c"
2554 if test "${ac_cv_path_install+set}" = set; then
2555 INSTALL=$ac_cv_path_install
2557 # As a last resort, use the slow shell script. We don't cache a
2558 # path for INSTALL within a source directory, because that will
2559 # break other packages using the cache if that directory is
2560 # removed, or if the path is relative.
2561 INSTALL=$ac_install_sh
2564 echo "$as_me:2564: result: $INSTALL" >&5
2565 echo "${ECHO_T}$INSTALL" >&6
2567 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2568 # It thinks the first close brace ends the variable substitution.
2569 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2571 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2573 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2579 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2580 test -z "$cf_dir" && cf_dir=.
2581 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2585 echo "$as_me:2585: checking if you want to install stripped executables" >&5
2586 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2588 # Check whether --enable-stripping or --disable-stripping was given.
2589 if test "${enable_stripping+set}" = set; then
2590 enableval="$enable_stripping"
2591 test "$enableval" != no && enableval=yes
2592 if test "$enableval" != "yes" ; then
2602 echo "$as_me:2602: result: $with_stripping" >&5
2603 echo "${ECHO_T}$with_stripping" >&6
2605 if test "$with_stripping" = yes
2612 : ${INSTALL:=install}
2613 echo "$as_me:2613: checking if install accepts -p option" >&5
2614 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2615 if test "${cf_cv_install_p+set}" = set; then
2616 echo $ECHO_N "(cached) $ECHO_C" >&6
2623 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2625 if test -f conftest.out/conftest.in
2627 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2628 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2629 if test -s conftest.err
2644 echo "$as_me:2644: result: $cf_cv_install_p" >&5
2645 echo "${ECHO_T}$cf_cv_install_p" >&6
2647 echo "$as_me:2647: checking if install needs to be told about ownership" >&5
2648 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2649 case `$ac_config_guess` in
2658 echo "$as_me:2658: result: $with_install_o" >&5
2659 echo "${ECHO_T}$with_install_o" >&6
2660 if test "x$with_install_o" = xyes
2662 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'`
2667 for ac_prog in lint cppcheck splint
2669 # Extract the first word of "$ac_prog", so it can be a program name with args.
2670 set dummy $ac_prog; ac_word=$2
2671 echo "$as_me:2671: checking for $ac_word" >&5
2672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2673 if test "${ac_cv_prog_LINT+set}" = set; then
2674 echo $ECHO_N "(cached) $ECHO_C" >&6
2676 if test -n "$LINT"; then
2677 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2679 ac_save_IFS=$IFS; IFS=$ac_path_separator
2681 for ac_dir in $ac_dummy; do
2683 test -z "$ac_dir" && ac_dir=.
2684 $as_executable_p "$ac_dir/$ac_word" || continue
2685 ac_cv_prog_LINT="$ac_prog"
2686 echo "$as_me:2686: found $ac_dir/$ac_word" >&5
2692 LINT=$ac_cv_prog_LINT
2693 if test -n "$LINT"; then
2694 echo "$as_me:2694: result: $LINT" >&5
2695 echo "${ECHO_T}$LINT" >&6
2697 echo "$as_me:2697: result: no" >&5
2698 echo "${ECHO_T}no" >&6
2701 test -n "$LINT" && break
2704 echo "$as_me:2704: checking if filesystem supports mixed-case filenames" >&5
2705 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2706 if test "${cf_cv_mixedcase+set}" = set; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
2710 if test "$cross_compiling" = yes ; then
2711 case $target_alias in
2712 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2720 rm -f conftest CONFTEST
2722 if test -f CONFTEST ; then
2727 rm -f conftest CONFTEST
2731 echo "$as_me:2731: result: $cf_cv_mixedcase" >&5
2732 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2733 test "$cf_cv_mixedcase" = yes &&
2734 cat >>confdefs.h <<\EOF
2735 #define MIXEDCASE_FILENAMES 1
2738 for ac_prog in exctags ctags
2740 # Extract the first word of "$ac_prog", so it can be a program name with args.
2741 set dummy $ac_prog; ac_word=$2
2742 echo "$as_me:2742: checking for $ac_word" >&5
2743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2744 if test "${ac_cv_prog_CTAGS+set}" = set; then
2745 echo $ECHO_N "(cached) $ECHO_C" >&6
2747 if test -n "$CTAGS"; then
2748 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2750 ac_save_IFS=$IFS; IFS=$ac_path_separator
2752 for ac_dir in $ac_dummy; do
2754 test -z "$ac_dir" && ac_dir=.
2755 $as_executable_p "$ac_dir/$ac_word" || continue
2756 ac_cv_prog_CTAGS="$ac_prog"
2757 echo "$as_me:2757: found $ac_dir/$ac_word" >&5
2763 CTAGS=$ac_cv_prog_CTAGS
2764 if test -n "$CTAGS"; then
2765 echo "$as_me:2765: result: $CTAGS" >&5
2766 echo "${ECHO_T}$CTAGS" >&6
2768 echo "$as_me:2768: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2772 test -n "$CTAGS" && break
2775 for ac_prog in exetags etags
2777 # Extract the first word of "$ac_prog", so it can be a program name with args.
2778 set dummy $ac_prog; ac_word=$2
2779 echo "$as_me:2779: checking for $ac_word" >&5
2780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2781 if test "${ac_cv_prog_ETAGS+set}" = set; then
2782 echo $ECHO_N "(cached) $ECHO_C" >&6
2784 if test -n "$ETAGS"; then
2785 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2787 ac_save_IFS=$IFS; IFS=$ac_path_separator
2789 for ac_dir in $ac_dummy; do
2791 test -z "$ac_dir" && ac_dir=.
2792 $as_executable_p "$ac_dir/$ac_word" || continue
2793 ac_cv_prog_ETAGS="$ac_prog"
2794 echo "$as_me:2794: found $ac_dir/$ac_word" >&5
2800 ETAGS=$ac_cv_prog_ETAGS
2801 if test -n "$ETAGS"; then
2802 echo "$as_me:2802: result: $ETAGS" >&5
2803 echo "${ECHO_T}$ETAGS" >&6
2805 echo "$as_me:2805: result: no" >&5
2806 echo "${ECHO_T}no" >&6
2809 test -n "$ETAGS" && break
2812 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2813 set dummy ${CTAGS:-ctags}; ac_word=$2
2814 echo "$as_me:2814: checking for $ac_word" >&5
2815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2816 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2817 echo $ECHO_N "(cached) $ECHO_C" >&6
2819 if test -n "$MAKE_LOWER_TAGS"; then
2820 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2822 ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 for ac_dir in $ac_dummy; do
2826 test -z "$ac_dir" && ac_dir=.
2827 $as_executable_p "$ac_dir/$ac_word" || continue
2828 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2829 echo "$as_me:2829: found $ac_dir/$ac_word" >&5
2833 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2836 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2837 if test -n "$MAKE_LOWER_TAGS"; then
2838 echo "$as_me:2838: result: $MAKE_LOWER_TAGS" >&5
2839 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2841 echo "$as_me:2841: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2845 if test "$cf_cv_mixedcase" = yes ; then
2846 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2847 set dummy ${ETAGS:-etags}; ac_word=$2
2848 echo "$as_me:2848: checking for $ac_word" >&5
2849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2853 if test -n "$MAKE_UPPER_TAGS"; then
2854 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2856 ac_save_IFS=$IFS; IFS=$ac_path_separator
2858 for ac_dir in $ac_dummy; do
2860 test -z "$ac_dir" && ac_dir=.
2861 $as_executable_p "$ac_dir/$ac_word" || continue
2862 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2863 echo "$as_me:2863: found $ac_dir/$ac_word" >&5
2867 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2870 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2871 if test -n "$MAKE_UPPER_TAGS"; then
2872 echo "$as_me:2872: result: $MAKE_UPPER_TAGS" >&5
2873 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2875 echo "$as_me:2875: result: no" >&5
2876 echo "${ECHO_T}no" >&6
2883 if test "$MAKE_UPPER_TAGS" = yes ; then
2889 if test "$MAKE_LOWER_TAGS" = yes ; then
2895 echo "$as_me:2895: checking if -lm needed for math functions" >&5
2896 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2897 if test "${cf_cv_need_libm+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2901 cat >conftest.$ac_ext <<_ACEOF
2902 #line 2902 "configure"
2903 #include "confdefs.h"
2912 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2917 rm -f conftest.$ac_objext conftest$ac_exeext
2918 if { (eval echo "$as_me:2918: \"$ac_link\"") >&5
2919 (eval $ac_link) 2>&5
2921 echo "$as_me:2921: \$? = $ac_status" >&5
2922 (exit $ac_status); } &&
2923 { ac_try='test -s conftest$ac_exeext'
2924 { (eval echo "$as_me:2924: \"$ac_try\"") >&5
2927 echo "$as_me:2927: \$? = $ac_status" >&5
2928 (exit $ac_status); }; }; then
2931 echo "$as_me: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2937 echo "$as_me:2937: result: $cf_cv_need_libm" >&5
2938 echo "${ECHO_T}$cf_cv_need_libm" >&6
2939 if test "$cf_cv_need_libm" = yes
2947 CC_SHARED_OPTS=unknown
2948 CPPFLAGS="$CPPFLAGS"
2950 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2951 DFT_UPR_MODEL="NORMAL"
2964 PACKAGE="ncurses-examples"
2970 TINFO_LIBS='$(LIBS_CURSES)'
2971 cf_cv_abi_version=""
2972 cf_cv_rel_version=""
2978 if test "$GCC" = yes
2980 cat > conftest.i <<EOF
2982 #define GCC_PRINTF 0
2987 #ifndef GCC_NORETURN
2988 #define GCC_NORETURN /* nothing */
2991 #define GCC_UNUSED /* nothing */
2994 if test "$GCC" = yes
2996 { echo "$as_me:2996: checking for $CC __attribute__ directives..." >&5
2997 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2998 cat > conftest.$ac_ext <<EOF
2999 #line 2999 "${as_me:-configure}"
3000 #include "confdefs.h"
3001 #include "conftest.h"
3002 #include "conftest.i"
3004 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3006 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3009 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3011 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3013 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3014 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3015 extern void foo(void) GCC_NORETURN;
3016 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3018 cf_printf_attribute=no
3019 cf_scanf_attribute=no
3020 for cf_attribute in scanf printf unused noreturn
3023 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3025 cf_directive="__attribute__(($cf_attribute))"
3026 echo "checking for $CC $cf_directive" 1>&5
3028 case $cf_attribute in
3030 cf_printf_attribute=yes
3031 cat >conftest.h <<EOF
3032 #define GCC_$cf_ATTRIBUTE 1
3036 cf_scanf_attribute=yes
3037 cat >conftest.h <<EOF
3038 #define GCC_$cf_ATTRIBUTE 1
3042 cat >conftest.h <<EOF
3043 #define GCC_$cf_ATTRIBUTE $cf_directive
3048 if { (eval echo "$as_me:3048: \"$ac_compile\"") >&5
3049 (eval $ac_compile) 2>&5
3051 echo "$as_me:3051: \$? = $ac_status" >&5
3052 (exit $ac_status); }; then
3053 test -n "$verbose" && echo "$as_me:3053: result: ... $cf_attribute" >&5
3054 echo "${ECHO_T}... $cf_attribute" >&6
3055 cat conftest.h >>confdefs.h
3056 case $cf_attribute in
3059 cat >>confdefs.h <<EOF
3060 #define GCC_NORETURN $cf_directive
3065 cf_value='/* nothing */'
3066 if test "$cf_printf_attribute" != no ; then
3067 cf_value='__attribute__((format(printf,fmt,var)))'
3069 cat >>confdefs.h <<\EOF
3070 #define GCC_PRINTF 1
3075 cat >>confdefs.h <<EOF
3076 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3081 cf_value='/* nothing */'
3082 if test "$cf_scanf_attribute" != no ; then
3083 cf_value='__attribute__((format(scanf,fmt,var)))'
3085 cat >>confdefs.h <<\EOF
3091 cat >>confdefs.h <<EOF
3092 #define GCC_SCANFLIKE(fmt,var) $cf_value
3098 cat >>confdefs.h <<EOF
3099 #define GCC_UNUSED $cf_directive
3107 fgrep define conftest.i >>confdefs.h
3112 echo "$as_me:3112: checking if you want to work around bogus compiler/loader warnings" >&5
3113 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3115 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3116 if test "${enable_string_hacks+set}" = set; then
3117 enableval="$enable_string_hacks"
3118 with_string_hacks=$enableval
3120 with_string_hacks=no
3122 echo "$as_me:3122: result: $with_string_hacks" >&5
3123 echo "${ECHO_T}$with_string_hacks" >&6
3125 if test "x$with_string_hacks" = "xyes"; then
3127 cat >>confdefs.h <<\EOF
3128 #define USE_STRING_HACKS 1
3131 { echo "$as_me:3131: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3132 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3133 echo "$as_me:3133: checking for strlcat" >&5
3134 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3135 if test "${ac_cv_func_strlcat+set}" = set; then
3136 echo $ECHO_N "(cached) $ECHO_C" >&6
3138 cat >conftest.$ac_ext <<_ACEOF
3139 #line 3139 "configure"
3140 #include "confdefs.h"
3141 #define strlcat autoconf_temporary
3142 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3149 /* We use char because int might match the return type of a gcc2
3150 builtin and then its argument prototype would still apply. */
3151 char strlcat (void);
3157 /* The GNU C library defines stubs for functions which it implements
3158 to always fail with ENOSYS. Some functions are actually named
3159 something starting with __ and the normal name is an alias. */
3160 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3161 #error found stub for strlcat
3169 rm -f conftest.$ac_objext conftest$ac_exeext
3170 if { (eval echo "$as_me:3170: \"$ac_link\"") >&5
3171 (eval $ac_link) 2>&5
3173 echo "$as_me:3173: \$? = $ac_status" >&5
3174 (exit $ac_status); } &&
3175 { ac_try='test -s conftest$ac_exeext'
3176 { (eval echo "$as_me:3176: \"$ac_try\"") >&5
3179 echo "$as_me:3179: \$? = $ac_status" >&5
3180 (exit $ac_status); }; }; then
3181 ac_cv_func_strlcat=yes
3183 echo "$as_me: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3185 ac_cv_func_strlcat=no
3187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3189 echo "$as_me:3189: result: $ac_cv_func_strlcat" >&5
3190 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3191 if test $ac_cv_func_strlcat = yes; then
3193 cat >>confdefs.h <<\EOF
3194 #define HAVE_STRLCAT 1
3199 echo "$as_me:3199: checking for strlcat in -lbsd" >&5
3200 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3201 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3202 echo $ECHO_N "(cached) $ECHO_C" >&6
3204 ac_check_lib_save_LIBS=$LIBS
3206 cat >conftest.$ac_ext <<_ACEOF
3207 #line 3207 "configure"
3208 #include "confdefs.h"
3210 /* Override any gcc2 internal prototype to avoid an error. */
3214 /* We use char because int might match the return type of a gcc2
3215 builtin and then its argument prototype would still apply. */
3225 rm -f conftest.$ac_objext conftest$ac_exeext
3226 if { (eval echo "$as_me:3226: \"$ac_link\"") >&5
3227 (eval $ac_link) 2>&5
3229 echo "$as_me:3229: \$? = $ac_status" >&5
3230 (exit $ac_status); } &&
3231 { ac_try='test -s conftest$ac_exeext'
3232 { (eval echo "$as_me:3232: \"$ac_try\"") >&5
3235 echo "$as_me:3235: \$? = $ac_status" >&5
3236 (exit $ac_status); }; }; then
3237 ac_cv_lib_bsd_strlcat=yes
3239 echo "$as_me: failed program was:" >&5
3240 cat conftest.$ac_ext >&5
3241 ac_cv_lib_bsd_strlcat=no
3243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3244 LIBS=$ac_check_lib_save_LIBS
3246 echo "$as_me:3246: result: $ac_cv_lib_bsd_strlcat" >&5
3247 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3248 if test $ac_cv_lib_bsd_strlcat = yes; then
3251 # Filter out duplicates - this happens with badly-designed ".pc" files...
3252 for cf_add_1lib in $LIBS
3254 for cf_add_2lib in $cf_add_libs
3256 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3262 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3266 for ac_header in bsd/string.h
3268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3269 echo "$as_me:3269: checking for $ac_header" >&5
3270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3272 echo $ECHO_N "(cached) $ECHO_C" >&6
3274 cat >conftest.$ac_ext <<_ACEOF
3275 #line 3275 "configure"
3276 #include "confdefs.h"
3277 #include <$ac_header>
3279 if { (eval echo "$as_me:3279: \"$ac_cpp conftest.$ac_ext\"") >&5
3280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3282 egrep -v '^ *\+' conftest.er1 >conftest.err
3284 cat conftest.err >&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit $ac_status); } >/dev/null; then
3287 if test -s conftest.err; then
3288 ac_cpp_err=$ac_c_preproc_warn_flag
3295 if test -z "$ac_cpp_err"; then
3296 eval "$as_ac_Header=yes"
3298 echo "$as_me: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 eval "$as_ac_Header=no"
3302 rm -f conftest.err conftest.$ac_ext
3304 echo "$as_me:3304: result: `eval echo '${'$as_ac_Header'}'`" >&5
3305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3307 cat >>confdefs.h <<EOF
3308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3314 cat >>confdefs.h <<\EOF
3315 #define HAVE_STRLCAT 1
3322 for ac_func in strlcpy snprintf
3324 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3325 echo "$as_me:3325: checking for $ac_func" >&5
3326 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3327 if eval "test \"\${$as_ac_var+set}\" = set"; then
3328 echo $ECHO_N "(cached) $ECHO_C" >&6
3330 cat >conftest.$ac_ext <<_ACEOF
3331 #line 3331 "configure"
3332 #include "confdefs.h"
3333 #define $ac_func autoconf_temporary
3334 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3341 /* We use char because int might match the return type of a gcc2
3342 builtin and then its argument prototype would still apply. */
3343 char $ac_func (void);
3349 /* The GNU C library defines stubs for functions which it implements
3350 to always fail with ENOSYS. Some functions are actually named
3351 something starting with __ and the normal name is an alias. */
3352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3353 #error found stub for $ac_func
3361 rm -f conftest.$ac_objext conftest$ac_exeext
3362 if { (eval echo "$as_me:3362: \"$ac_link\"") >&5
3363 (eval $ac_link) 2>&5
3365 echo "$as_me:3365: \$? = $ac_status" >&5
3366 (exit $ac_status); } &&
3367 { ac_try='test -s conftest$ac_exeext'
3368 { (eval echo "$as_me:3368: \"$ac_try\"") >&5
3371 echo "$as_me:3371: \$? = $ac_status" >&5
3372 (exit $ac_status); }; }; then
3373 eval "$as_ac_var=yes"
3375 echo "$as_me: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 eval "$as_ac_var=no"
3379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3381 echo "$as_me:3381: result: `eval echo '${'$as_ac_var'}'`" >&5
3382 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3383 if test `eval echo '${'$as_ac_var'}'` = yes; then
3384 cat >>confdefs.h <<EOF
3385 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3394 cf_POSIX_C_SOURCE=199506L
3399 cf_xopen_source="-D_ALL_SOURCE"
3405 cf_xopen_source="-D_APPLE_C_SOURCE"
3408 cf_xopen_source="-D_DARWIN_C_SOURCE"
3411 (freebsd*|dragonfly*)
3412 # 5.x headers associate
3413 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3414 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3415 cf_POSIX_C_SOURCE=200112L
3417 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3420 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3423 cf_xopen_source="-D_HPUX_SOURCE"
3426 cf_xopen_source="-D_SGI_SOURCE"
3429 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3431 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3433 echo "$as_me:3433: checking if this is the GNU C library" >&5
3434 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3435 if test "${cf_cv_gnu_library+set}" = set; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 cat >conftest.$ac_ext <<_ACEOF
3440 #line 3440 "configure"
3441 #include "confdefs.h"
3442 #include <sys/types.h>
3447 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3450 # error not GNU C library
3456 rm -f conftest.$ac_objext
3457 if { (eval echo "$as_me:3457: \"$ac_compile\"") >&5
3458 (eval $ac_compile) 2>&5
3460 echo "$as_me:3460: \$? = $ac_status" >&5
3461 (exit $ac_status); } &&
3462 { ac_try='test -s conftest.$ac_objext'
3463 { (eval echo "$as_me:3463: \"$ac_try\"") >&5
3466 echo "$as_me:3466: \$? = $ac_status" >&5
3467 (exit $ac_status); }; }; then
3468 cf_cv_gnu_library=yes
3470 echo "$as_me: failed program was:" >&5
3471 cat conftest.$ac_ext >&5
3472 cf_cv_gnu_library=no
3474 rm -f conftest.$ac_objext conftest.$ac_ext
3477 echo "$as_me:3477: result: $cf_cv_gnu_library" >&5
3478 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3480 if test x$cf_cv_gnu_library = xyes; then
3482 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3483 # was changed to help a little...
3484 echo "$as_me:3484: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3485 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3486 if test "${cf_cv_gnu_library_219+set}" = set; then
3487 echo $ECHO_N "(cached) $ECHO_C" >&6
3492 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3493 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3495 cat >conftest.$ac_ext <<_ACEOF
3496 #line 3496 "configure"
3497 #include "confdefs.h"
3498 #include <sys/types.h>
3503 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3506 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3512 rm -f conftest.$ac_objext
3513 if { (eval echo "$as_me:3513: \"$ac_compile\"") >&5
3514 (eval $ac_compile) 2>&5
3516 echo "$as_me:3516: \$? = $ac_status" >&5
3517 (exit $ac_status); } &&
3518 { ac_try='test -s conftest.$ac_objext'
3519 { (eval echo "$as_me:3519: \"$ac_try\"") >&5
3522 echo "$as_me:3522: \$? = $ac_status" >&5
3523 (exit $ac_status); }; }; then
3524 cf_cv_gnu_library_219=yes
3526 echo "$as_me: failed program was:" >&5
3527 cat conftest.$ac_ext >&5
3528 cf_cv_gnu_library_219=no
3530 rm -f conftest.$ac_objext conftest.$ac_ext
3534 echo "$as_me:3534: result: $cf_cv_gnu_library_219" >&5
3535 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3537 if test "x$cf_cv_gnu_library_219" = xyes; then
3539 echo "$as_me:3539: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3540 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3541 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3542 echo $ECHO_N "(cached) $ECHO_C" >&6
3548 cf_new_extra_cppflags=
3550 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3552 case $cf_fix_cppflags in
3554 case $cf_add_cflags in
3555 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3556 case $cf_add_cflags in
3558 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3561 && test -z "${cf_tst_cflags}" \
3562 && cf_fix_cppflags=yes
3564 if test $cf_fix_cppflags = yes ; then
3566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3570 elif test "${cf_tst_cflags}" = "\"'" ; then
3572 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3573 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3583 case $cf_add_cflags in
3585 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3587 CPPFLAGS=`echo "$CPPFLAGS" | \
3588 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3589 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3594 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3595 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3602 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3603 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3613 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3615 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3616 && test -z "${cf_tst_cflags}" \
3617 && cf_fix_cppflags=no
3622 if test -n "$cf_new_cflags" ; then
3624 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3625 CFLAGS="${CFLAGS}$cf_new_cflags"
3629 if test -n "$cf_new_cppflags" ; then
3631 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3632 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3636 if test -n "$cf_new_extra_cppflags" ; then
3638 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3639 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3643 cat >conftest.$ac_ext <<_ACEOF
3644 #line 3644 "configure"
3645 #include "confdefs.h"
3648 #include <sys/types.h>
3654 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3657 # error GNU C library is too old
3663 rm -f conftest.$ac_objext
3664 if { (eval echo "$as_me:3664: \"$ac_compile\"") >&5
3665 (eval $ac_compile) 2>&5
3667 echo "$as_me:3667: \$? = $ac_status" >&5
3668 (exit $ac_status); } &&
3669 { ac_try='test -s conftest.$ac_objext'
3670 { (eval echo "$as_me:3670: \"$ac_try\"") >&5
3673 echo "$as_me:3673: \$? = $ac_status" >&5
3674 (exit $ac_status); }; }; then
3675 cf_cv_gnu_dftsrc_219=yes
3677 echo "$as_me: failed program was:" >&5
3678 cat conftest.$ac_ext >&5
3679 cf_cv_gnu_dftsrc_219=no
3681 rm -f conftest.$ac_objext conftest.$ac_ext
3684 echo "$as_me:3684: result: $cf_cv_gnu_dftsrc_219" >&5
3685 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3686 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3688 cf_cv_gnu_dftsrc_219=maybe
3691 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3693 echo "$as_me:3693: checking if we must define _GNU_SOURCE" >&5
3694 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3695 if test "${cf_cv_gnu_source+set}" = set; then
3696 echo $ECHO_N "(cached) $ECHO_C" >&6
3699 cat >conftest.$ac_ext <<_ACEOF
3700 #line 3700 "configure"
3701 #include "confdefs.h"
3702 #include <sys/types.h>
3707 #ifndef _XOPEN_SOURCE
3708 #error expected _XOPEN_SOURCE to be defined
3714 rm -f conftest.$ac_objext
3715 if { (eval echo "$as_me:3715: \"$ac_compile\"") >&5
3716 (eval $ac_compile) 2>&5
3718 echo "$as_me:3718: \$? = $ac_status" >&5
3719 (exit $ac_status); } &&
3720 { ac_try='test -s conftest.$ac_objext'
3721 { (eval echo "$as_me:3721: \"$ac_try\"") >&5
3724 echo "$as_me:3724: \$? = $ac_status" >&5
3725 (exit $ac_status); }; }; then
3728 echo "$as_me: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
3735 cf_new_extra_cppflags=
3737 for cf_add_cflags in -D_GNU_SOURCE
3739 case $cf_fix_cppflags in
3741 case $cf_add_cflags in
3742 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3743 case $cf_add_cflags in
3745 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3747 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3748 && test -z "${cf_tst_cflags}" \
3749 && cf_fix_cppflags=yes
3751 if test $cf_fix_cppflags = yes ; then
3753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3757 elif test "${cf_tst_cflags}" = "\"'" ; then
3759 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3760 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3770 case $cf_add_cflags in
3772 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3774 CPPFLAGS=`echo "$CPPFLAGS" | \
3775 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3776 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3781 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3782 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3789 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3790 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3800 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3802 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3803 && test -z "${cf_tst_cflags}" \
3804 && cf_fix_cppflags=no
3809 if test -n "$cf_new_cflags" ; then
3811 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3812 CFLAGS="${CFLAGS}$cf_new_cflags"
3816 if test -n "$cf_new_cppflags" ; then
3818 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3819 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3823 if test -n "$cf_new_extra_cppflags" ; then
3825 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3826 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3830 cat >conftest.$ac_ext <<_ACEOF
3831 #line 3831 "configure"
3832 #include "confdefs.h"
3833 #include <sys/types.h>
3838 #ifdef _XOPEN_SOURCE
3839 #error expected _XOPEN_SOURCE to be undefined
3845 rm -f conftest.$ac_objext
3846 if { (eval echo "$as_me:3846: \"$ac_compile\"") >&5
3847 (eval $ac_compile) 2>&5
3849 echo "$as_me:3849: \$? = $ac_status" >&5
3850 (exit $ac_status); } &&
3851 { ac_try='test -s conftest.$ac_objext'
3852 { (eval echo "$as_me:3852: \"$ac_try\"") >&5
3855 echo "$as_me:3855: \$? = $ac_status" >&5
3856 (exit $ac_status); }; }; then
3859 echo "$as_me: failed program was:" >&5
3860 cat conftest.$ac_ext >&5
3861 cf_cv_gnu_source=yes
3863 rm -f conftest.$ac_objext conftest.$ac_ext
3867 rm -f conftest.$ac_objext conftest.$ac_ext
3870 echo "$as_me:3870: result: $cf_cv_gnu_source" >&5
3871 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3873 if test "$cf_cv_gnu_source" = yes
3875 echo "$as_me:3875: checking if we should also define _DEFAULT_SOURCE" >&5
3876 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3877 if test "${cf_cv_default_source+set}" = set; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3881 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3882 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3884 cat >conftest.$ac_ext <<_ACEOF
3885 #line 3885 "configure"
3886 #include "confdefs.h"
3887 #include <sys/types.h>
3892 #ifdef _DEFAULT_SOURCE
3893 #error expected _DEFAULT_SOURCE to be undefined
3899 rm -f conftest.$ac_objext
3900 if { (eval echo "$as_me:3900: \"$ac_compile\"") >&5
3901 (eval $ac_compile) 2>&5
3903 echo "$as_me:3903: \$? = $ac_status" >&5
3904 (exit $ac_status); } &&
3905 { ac_try='test -s conftest.$ac_objext'
3906 { (eval echo "$as_me:3906: \"$ac_try\"") >&5
3909 echo "$as_me:3909: \$? = $ac_status" >&5
3910 (exit $ac_status); }; }; then
3911 cf_cv_default_source=no
3913 echo "$as_me: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3915 cf_cv_default_source=yes
3917 rm -f conftest.$ac_objext conftest.$ac_ext
3920 echo "$as_me:3920: result: $cf_cv_default_source" >&5
3921 echo "${ECHO_T}$cf_cv_default_source" >&6
3922 if test "$cf_cv_default_source" = yes
3925 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3926 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3936 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3939 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3942 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3944 cf_save_CFLAGS="$CFLAGS"
3945 cf_save_CPPFLAGS="$CPPFLAGS"
3947 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3948 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3949 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3951 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3952 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3953 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3955 echo "$as_me:3955: checking if we should define _POSIX_C_SOURCE" >&5
3956 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3957 if test "${cf_cv_posix_c_source+set}" = set; then
3958 echo $ECHO_N "(cached) $ECHO_C" >&6
3961 echo "${as_me:-configure}:3961: testing if the symbol is already defined go no further ..." 1>&5
3963 cat >conftest.$ac_ext <<_ACEOF
3964 #line 3964 "configure"
3965 #include "confdefs.h"
3966 #include <sys/types.h>
3971 #ifndef _POSIX_C_SOURCE
3978 rm -f conftest.$ac_objext
3979 if { (eval echo "$as_me:3979: \"$ac_compile\"") >&5
3980 (eval $ac_compile) 2>&5
3982 echo "$as_me:3982: \$? = $ac_status" >&5
3983 (exit $ac_status); } &&
3984 { ac_try='test -s conftest.$ac_objext'
3985 { (eval echo "$as_me:3985: \"$ac_try\"") >&5
3988 echo "$as_me:3988: \$? = $ac_status" >&5
3989 (exit $ac_status); }; }; then
3990 cf_cv_posix_c_source=no
3992 echo "$as_me: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3994 cf_want_posix_source=no
3995 case .$cf_POSIX_C_SOURCE in
3997 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4000 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4001 cf_want_posix_source=yes
4004 cf_want_posix_source=yes
4007 if test "$cf_want_posix_source" = yes ; then
4008 cat >conftest.$ac_ext <<_ACEOF
4009 #line 4009 "configure"
4010 #include "confdefs.h"
4011 #include <sys/types.h>
4016 #ifdef _POSIX_SOURCE
4023 rm -f conftest.$ac_objext
4024 if { (eval echo "$as_me:4024: \"$ac_compile\"") >&5
4025 (eval $ac_compile) 2>&5
4027 echo "$as_me:4027: \$? = $ac_status" >&5
4028 (exit $ac_status); } &&
4029 { ac_try='test -s conftest.$ac_objext'
4030 { (eval echo "$as_me:4030: \"$ac_try\"") >&5
4033 echo "$as_me:4033: \$? = $ac_status" >&5
4034 (exit $ac_status); }; }; then
4037 echo "$as_me: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
4039 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4041 rm -f conftest.$ac_objext conftest.$ac_ext
4044 echo "${as_me:-configure}:4044: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4046 CFLAGS="$cf_trim_CFLAGS"
4047 CPPFLAGS="$cf_trim_CPPFLAGS"
4049 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4050 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4052 echo "${as_me:-configure}:4052: testing if the second compile does not leave our definition intact error ..." 1>&5
4054 cat >conftest.$ac_ext <<_ACEOF
4055 #line 4055 "configure"
4056 #include "confdefs.h"
4057 #include <sys/types.h>
4062 #ifndef _POSIX_C_SOURCE
4069 rm -f conftest.$ac_objext
4070 if { (eval echo "$as_me:4070: \"$ac_compile\"") >&5
4071 (eval $ac_compile) 2>&5
4073 echo "$as_me:4073: \$? = $ac_status" >&5
4074 (exit $ac_status); } &&
4075 { ac_try='test -s conftest.$ac_objext'
4076 { (eval echo "$as_me:4076: \"$ac_try\"") >&5
4079 echo "$as_me:4079: \$? = $ac_status" >&5
4080 (exit $ac_status); }; }; then
4083 echo "$as_me: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
4085 cf_cv_posix_c_source=no
4087 rm -f conftest.$ac_objext conftest.$ac_ext
4088 CFLAGS="$cf_save_CFLAGS"
4089 CPPFLAGS="$cf_save_CPPFLAGS"
4092 rm -f conftest.$ac_objext conftest.$ac_ext
4095 echo "$as_me:4095: result: $cf_cv_posix_c_source" >&5
4096 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4098 if test "$cf_cv_posix_c_source" != no ; then
4099 CFLAGS="$cf_trim_CFLAGS"
4100 CPPFLAGS="$cf_trim_CPPFLAGS"
4105 cf_new_extra_cppflags=
4107 for cf_add_cflags in $cf_cv_posix_c_source
4109 case $cf_fix_cppflags in
4111 case $cf_add_cflags in
4112 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4113 case $cf_add_cflags in
4115 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4117 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4118 && test -z "${cf_tst_cflags}" \
4119 && cf_fix_cppflags=yes
4121 if test $cf_fix_cppflags = yes ; then
4123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4127 elif test "${cf_tst_cflags}" = "\"'" ; then
4129 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4130 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4140 case $cf_add_cflags in
4142 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4144 CPPFLAGS=`echo "$CPPFLAGS" | \
4145 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4146 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4151 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4152 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4159 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4160 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4167 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4168 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4170 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4173 && test -z "${cf_tst_cflags}" \
4174 && cf_fix_cppflags=no
4179 if test -n "$cf_new_cflags" ; then
4181 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4182 CFLAGS="${CFLAGS}$cf_new_cflags"
4186 if test -n "$cf_new_cppflags" ; then
4188 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4189 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4193 if test -n "$cf_new_extra_cppflags" ; then
4195 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4196 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4204 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4207 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4208 cf_xopen_source="-D_BSD_SOURCE"
4212 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4215 cf_xopen_source="-D_OSF_SOURCE"
4218 cf_xopen_source="-D_QNX_SOURCE"
4221 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4224 cf_xopen_source="-D__EXTENSIONS__"
4225 cf_cv_xopen_source=broken
4227 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4233 echo "$as_me:4233: checking if we should define _XOPEN_SOURCE" >&5
4234 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4235 if test "${cf_cv_xopen_source+set}" = set; then
4236 echo $ECHO_N "(cached) $ECHO_C" >&6
4239 cat >conftest.$ac_ext <<_ACEOF
4240 #line 4240 "configure"
4241 #include "confdefs.h"
4245 #include <sys/types.h>
4251 #ifndef _XOPEN_SOURCE
4258 rm -f conftest.$ac_objext
4259 if { (eval echo "$as_me:4259: \"$ac_compile\"") >&5
4260 (eval $ac_compile) 2>&5
4262 echo "$as_me:4262: \$? = $ac_status" >&5
4263 (exit $ac_status); } &&
4264 { ac_try='test -s conftest.$ac_objext'
4265 { (eval echo "$as_me:4265: \"$ac_try\"") >&5
4268 echo "$as_me:4268: \$? = $ac_status" >&5
4269 (exit $ac_status); }; }; then
4270 cf_cv_xopen_source=no
4272 echo "$as_me: failed program was:" >&5
4273 cat conftest.$ac_ext >&5
4276 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4277 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4279 cat >conftest.$ac_ext <<_ACEOF
4280 #line 4280 "configure"
4281 #include "confdefs.h"
4285 #include <sys/types.h>
4291 #ifdef _XOPEN_SOURCE
4298 rm -f conftest.$ac_objext
4299 if { (eval echo "$as_me:4299: \"$ac_compile\"") >&5
4300 (eval $ac_compile) 2>&5
4302 echo "$as_me:4302: \$? = $ac_status" >&5
4303 (exit $ac_status); } &&
4304 { ac_try='test -s conftest.$ac_objext'
4305 { (eval echo "$as_me:4305: \"$ac_try\"") >&5
4308 echo "$as_me:4308: \$? = $ac_status" >&5
4309 (exit $ac_status); }; }; then
4310 cf_cv_xopen_source=no
4312 echo "$as_me: failed program was:" >&5
4313 cat conftest.$ac_ext >&5
4314 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4316 rm -f conftest.$ac_objext conftest.$ac_ext
4320 rm -f conftest.$ac_objext conftest.$ac_ext
4323 echo "$as_me:4323: result: $cf_cv_xopen_source" >&5
4324 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4326 if test "$cf_cv_xopen_source" != no ; then
4328 CFLAGS=`echo "$CFLAGS" | \
4329 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4330 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4332 CPPFLAGS=`echo "$CPPFLAGS" | \
4333 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4334 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4336 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4341 cf_new_extra_cppflags=
4343 for cf_add_cflags in $cf_temp_xopen_source
4345 case $cf_fix_cppflags in
4347 case $cf_add_cflags in
4348 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4349 case $cf_add_cflags in
4351 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4353 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4354 && test -z "${cf_tst_cflags}" \
4355 && cf_fix_cppflags=yes
4357 if test $cf_fix_cppflags = yes ; then
4359 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4360 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4363 elif test "${cf_tst_cflags}" = "\"'" ; then
4365 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4366 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4376 case $cf_add_cflags in
4378 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4380 CPPFLAGS=`echo "$CPPFLAGS" | \
4381 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4382 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4387 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4388 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4395 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4396 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4403 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4404 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4406 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4408 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4409 && test -z "${cf_tst_cflags}" \
4410 && cf_fix_cppflags=no
4415 if test -n "$cf_new_cflags" ; then
4417 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4418 CFLAGS="${CFLAGS}$cf_new_cflags"
4422 if test -n "$cf_new_cppflags" ; then
4424 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4425 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4429 if test -n "$cf_new_extra_cppflags" ; then
4431 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4432 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4438 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4440 cf_save_CFLAGS="$CFLAGS"
4441 cf_save_CPPFLAGS="$CPPFLAGS"
4443 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4444 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4445 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4447 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4448 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4449 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4451 echo "$as_me:4451: checking if we should define _POSIX_C_SOURCE" >&5
4452 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4453 if test "${cf_cv_posix_c_source+set}" = set; then
4454 echo $ECHO_N "(cached) $ECHO_C" >&6
4457 echo "${as_me:-configure}:4457: testing if the symbol is already defined go no further ..." 1>&5
4459 cat >conftest.$ac_ext <<_ACEOF
4460 #line 4460 "configure"
4461 #include "confdefs.h"
4462 #include <sys/types.h>
4467 #ifndef _POSIX_C_SOURCE
4474 rm -f conftest.$ac_objext
4475 if { (eval echo "$as_me:4475: \"$ac_compile\"") >&5
4476 (eval $ac_compile) 2>&5
4478 echo "$as_me:4478: \$? = $ac_status" >&5
4479 (exit $ac_status); } &&
4480 { ac_try='test -s conftest.$ac_objext'
4481 { (eval echo "$as_me:4481: \"$ac_try\"") >&5
4484 echo "$as_me:4484: \$? = $ac_status" >&5
4485 (exit $ac_status); }; }; then
4486 cf_cv_posix_c_source=no
4488 echo "$as_me: failed program was:" >&5
4489 cat conftest.$ac_ext >&5
4490 cf_want_posix_source=no
4491 case .$cf_POSIX_C_SOURCE in
4493 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4496 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4497 cf_want_posix_source=yes
4500 cf_want_posix_source=yes
4503 if test "$cf_want_posix_source" = yes ; then
4504 cat >conftest.$ac_ext <<_ACEOF
4505 #line 4505 "configure"
4506 #include "confdefs.h"
4507 #include <sys/types.h>
4512 #ifdef _POSIX_SOURCE
4519 rm -f conftest.$ac_objext
4520 if { (eval echo "$as_me:4520: \"$ac_compile\"") >&5
4521 (eval $ac_compile) 2>&5
4523 echo "$as_me:4523: \$? = $ac_status" >&5
4524 (exit $ac_status); } &&
4525 { ac_try='test -s conftest.$ac_objext'
4526 { (eval echo "$as_me:4526: \"$ac_try\"") >&5
4529 echo "$as_me:4529: \$? = $ac_status" >&5
4530 (exit $ac_status); }; }; then
4533 echo "$as_me: failed program was:" >&5
4534 cat conftest.$ac_ext >&5
4535 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4537 rm -f conftest.$ac_objext conftest.$ac_ext
4540 echo "${as_me:-configure}:4540: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4542 CFLAGS="$cf_trim_CFLAGS"
4543 CPPFLAGS="$cf_trim_CPPFLAGS"
4545 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4546 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4548 echo "${as_me:-configure}:4548: testing if the second compile does not leave our definition intact error ..." 1>&5
4550 cat >conftest.$ac_ext <<_ACEOF
4551 #line 4551 "configure"
4552 #include "confdefs.h"
4553 #include <sys/types.h>
4558 #ifndef _POSIX_C_SOURCE
4565 rm -f conftest.$ac_objext
4566 if { (eval echo "$as_me:4566: \"$ac_compile\"") >&5
4567 (eval $ac_compile) 2>&5
4569 echo "$as_me:4569: \$? = $ac_status" >&5
4570 (exit $ac_status); } &&
4571 { ac_try='test -s conftest.$ac_objext'
4572 { (eval echo "$as_me:4572: \"$ac_try\"") >&5
4575 echo "$as_me:4575: \$? = $ac_status" >&5
4576 (exit $ac_status); }; }; then
4579 echo "$as_me: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4581 cf_cv_posix_c_source=no
4583 rm -f conftest.$ac_objext conftest.$ac_ext
4584 CFLAGS="$cf_save_CFLAGS"
4585 CPPFLAGS="$cf_save_CPPFLAGS"
4588 rm -f conftest.$ac_objext conftest.$ac_ext
4591 echo "$as_me:4591: result: $cf_cv_posix_c_source" >&5
4592 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4594 if test "$cf_cv_posix_c_source" != no ; then
4595 CFLAGS="$cf_trim_CFLAGS"
4596 CPPFLAGS="$cf_trim_CPPFLAGS"
4601 cf_new_extra_cppflags=
4603 for cf_add_cflags in $cf_cv_posix_c_source
4605 case $cf_fix_cppflags in
4607 case $cf_add_cflags in
4608 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4609 case $cf_add_cflags in
4611 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4613 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4614 && test -z "${cf_tst_cflags}" \
4615 && cf_fix_cppflags=yes
4617 if test $cf_fix_cppflags = yes ; then
4619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4623 elif test "${cf_tst_cflags}" = "\"'" ; then
4625 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4626 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4636 case $cf_add_cflags in
4638 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4640 CPPFLAGS=`echo "$CPPFLAGS" | \
4641 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4642 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4647 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4648 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4655 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4656 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4666 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4669 && test -z "${cf_tst_cflags}" \
4670 && cf_fix_cppflags=no
4675 if test -n "$cf_new_cflags" ; then
4677 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4678 CFLAGS="${CFLAGS}$cf_new_cflags"
4682 if test -n "$cf_new_cppflags" ; then
4684 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4685 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4689 if test -n "$cf_new_extra_cppflags" ; then
4691 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4692 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4701 if test -n "$cf_xopen_source" ; then
4706 cf_new_extra_cppflags=
4708 for cf_add_cflags in $cf_xopen_source
4710 case $cf_fix_cppflags in
4712 case $cf_add_cflags in
4713 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4714 case $cf_add_cflags in
4716 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4718 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4719 && test -z "${cf_tst_cflags}" \
4720 && cf_fix_cppflags=yes
4722 if test $cf_fix_cppflags = yes ; then
4724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4728 elif test "${cf_tst_cflags}" = "\"'" ; then
4730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4741 case $cf_add_cflags in
4743 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4745 CPPFLAGS=`echo "$CPPFLAGS" | \
4746 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4747 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4752 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4753 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4760 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4761 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4771 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4774 && test -z "${cf_tst_cflags}" \
4775 && cf_fix_cppflags=no
4780 if test -n "$cf_new_cflags" ; then
4781 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4783 echo "${as_me:-configure}:4783: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4785 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4786 CFLAGS="${CFLAGS}$cf_new_cflags"
4790 if test -n "$cf_new_cppflags" ; then
4791 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4793 echo "${as_me:-configure}:4793: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4795 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4796 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4800 if test -n "$cf_new_extra_cppflags" ; then
4801 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4803 echo "${as_me:-configure}:4803: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4805 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4806 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4812 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4813 echo "$as_me:4813: checking if _XOPEN_SOURCE really is set" >&5
4814 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4815 cat >conftest.$ac_ext <<_ACEOF
4816 #line 4816 "configure"
4817 #include "confdefs.h"
4823 #ifndef _XOPEN_SOURCE
4830 rm -f conftest.$ac_objext
4831 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832 (eval $ac_compile) 2>&5
4834 echo "$as_me:4834: \$? = $ac_status" >&5
4835 (exit $ac_status); } &&
4836 { ac_try='test -s conftest.$ac_objext'
4837 { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit $ac_status); }; }; then
4842 cf_XOPEN_SOURCE_set=yes
4844 echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 cf_XOPEN_SOURCE_set=no
4848 rm -f conftest.$ac_objext conftest.$ac_ext
4849 echo "$as_me:4849: result: $cf_XOPEN_SOURCE_set" >&5
4850 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4851 if test $cf_XOPEN_SOURCE_set = yes
4853 cat >conftest.$ac_ext <<_ACEOF
4854 #line 4854 "configure"
4855 #include "confdefs.h"
4861 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4868 rm -f conftest.$ac_objext
4869 if { (eval echo "$as_me:4869: \"$ac_compile\"") >&5
4870 (eval $ac_compile) 2>&5
4872 echo "$as_me:4872: \$? = $ac_status" >&5
4873 (exit $ac_status); } &&
4874 { ac_try='test -s conftest.$ac_objext'
4875 { (eval echo "$as_me:4875: \"$ac_try\"") >&5
4878 echo "$as_me:4878: \$? = $ac_status" >&5
4879 (exit $ac_status); }; }; then
4880 cf_XOPEN_SOURCE_set_ok=yes
4882 echo "$as_me: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 cf_XOPEN_SOURCE_set_ok=no
4886 rm -f conftest.$ac_objext conftest.$ac_ext
4887 if test $cf_XOPEN_SOURCE_set_ok = no
4889 { echo "$as_me:4889: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4890 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4894 echo "$as_me:4894: checking if we should define _XOPEN_SOURCE" >&5
4895 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4896 if test "${cf_cv_xopen_source+set}" = set; then
4897 echo $ECHO_N "(cached) $ECHO_C" >&6
4900 cat >conftest.$ac_ext <<_ACEOF
4901 #line 4901 "configure"
4902 #include "confdefs.h"
4906 #include <sys/types.h>
4912 #ifndef _XOPEN_SOURCE
4919 rm -f conftest.$ac_objext
4920 if { (eval echo "$as_me:4920: \"$ac_compile\"") >&5
4921 (eval $ac_compile) 2>&5
4923 echo "$as_me:4923: \$? = $ac_status" >&5
4924 (exit $ac_status); } &&
4925 { ac_try='test -s conftest.$ac_objext'
4926 { (eval echo "$as_me:4926: \"$ac_try\"") >&5
4929 echo "$as_me:4929: \$? = $ac_status" >&5
4930 (exit $ac_status); }; }; then
4931 cf_cv_xopen_source=no
4933 echo "$as_me: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
4937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4938 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4940 cat >conftest.$ac_ext <<_ACEOF
4941 #line 4941 "configure"
4942 #include "confdefs.h"
4946 #include <sys/types.h>
4952 #ifdef _XOPEN_SOURCE
4959 rm -f conftest.$ac_objext
4960 if { (eval echo "$as_me:4960: \"$ac_compile\"") >&5
4961 (eval $ac_compile) 2>&5
4963 echo "$as_me:4963: \$? = $ac_status" >&5
4964 (exit $ac_status); } &&
4965 { ac_try='test -s conftest.$ac_objext'
4966 { (eval echo "$as_me:4966: \"$ac_try\"") >&5
4969 echo "$as_me:4969: \$? = $ac_status" >&5
4970 (exit $ac_status); }; }; then
4971 cf_cv_xopen_source=no
4973 echo "$as_me: failed program was:" >&5
4974 cat conftest.$ac_ext >&5
4975 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4977 rm -f conftest.$ac_objext conftest.$ac_ext
4981 rm -f conftest.$ac_objext conftest.$ac_ext
4984 echo "$as_me:4984: result: $cf_cv_xopen_source" >&5
4985 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4987 if test "$cf_cv_xopen_source" != no ; then
4989 CFLAGS=`echo "$CFLAGS" | \
4990 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4991 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4993 CPPFLAGS=`echo "$CPPFLAGS" | \
4994 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4995 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4997 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5002 cf_new_extra_cppflags=
5004 for cf_add_cflags in $cf_temp_xopen_source
5006 case $cf_fix_cppflags in
5008 case $cf_add_cflags in
5009 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5010 case $cf_add_cflags in
5012 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5014 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5015 && test -z "${cf_tst_cflags}" \
5016 && cf_fix_cppflags=yes
5018 if test $cf_fix_cppflags = yes ; then
5020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5024 elif test "${cf_tst_cflags}" = "\"'" ; then
5026 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5027 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5037 case $cf_add_cflags in
5039 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5041 CPPFLAGS=`echo "$CPPFLAGS" | \
5042 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5043 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5048 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5049 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5056 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5057 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5067 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5069 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5070 && test -z "${cf_tst_cflags}" \
5071 && cf_fix_cppflags=no
5076 if test -n "$cf_new_cflags" ; then
5078 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5079 CFLAGS="${CFLAGS}$cf_new_cflags"
5083 if test -n "$cf_new_cppflags" ; then
5085 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5086 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5090 if test -n "$cf_new_extra_cppflags" ; then
5092 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5093 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5102 echo "$as_me:5102: checking for signal global datatype" >&5
5103 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5104 if test "${cf_cv_sig_atomic_t+set}" = set; then
5105 echo $ECHO_N "(cached) $ECHO_C" >&6
5109 "volatile sig_atomic_t" \
5113 cat >conftest.$ac_ext <<_ACEOF
5114 #line 5114 "configure"
5115 #include "confdefs.h"
5117 #include <sys/types.h>
5123 static void handler(int sig)
5130 signal(SIGINT, handler);
5136 rm -f conftest.$ac_objext
5137 if { (eval echo "$as_me:5137: \"$ac_compile\"") >&5
5138 (eval $ac_compile) 2>&5
5140 echo "$as_me:5140: \$? = $ac_status" >&5
5141 (exit $ac_status); } &&
5142 { ac_try='test -s conftest.$ac_objext'
5143 { (eval echo "$as_me:5143: \"$ac_try\"") >&5
5146 echo "$as_me:5146: \$? = $ac_status" >&5
5147 (exit $ac_status); }; }; then
5148 cf_cv_sig_atomic_t=$cf_type
5150 echo "$as_me: failed program was:" >&5
5151 cat conftest.$ac_ext >&5
5152 cf_cv_sig_atomic_t=no
5154 rm -f conftest.$ac_objext conftest.$ac_ext
5155 test "$cf_cv_sig_atomic_t" != no && break
5160 echo "$as_me:5160: result: $cf_cv_sig_atomic_t" >&5
5161 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5162 test "$cf_cv_sig_atomic_t" != no &&
5163 cat >>confdefs.h <<EOF
5164 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5167 # Work around breakage on OS X
5169 echo "$as_me:5169: checking if SIGWINCH is defined" >&5
5170 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5171 if test "${cf_cv_define_sigwinch+set}" = set; then
5172 echo $ECHO_N "(cached) $ECHO_C" >&6
5175 cat >conftest.$ac_ext <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5179 #include <sys/types.h>
5180 #include <sys/signal.h>
5190 rm -f conftest.$ac_objext
5191 if { (eval echo "$as_me:5191: \"$ac_compile\"") >&5
5192 (eval $ac_compile) 2>&5
5194 echo "$as_me:5194: \$? = $ac_status" >&5
5195 (exit $ac_status); } &&
5196 { ac_try='test -s conftest.$ac_objext'
5197 { (eval echo "$as_me:5197: \"$ac_try\"") >&5
5200 echo "$as_me:5200: \$? = $ac_status" >&5
5201 (exit $ac_status); }; }; then
5202 cf_cv_define_sigwinch=yes
5204 echo "$as_me: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5206 cat >conftest.$ac_ext <<_ACEOF
5207 #line 5207 "configure"
5208 #include "confdefs.h"
5210 #undef _XOPEN_SOURCE
5211 #undef _POSIX_SOURCE
5212 #undef _POSIX_C_SOURCE
5213 #include <sys/types.h>
5214 #include <sys/signal.h>
5224 rm -f conftest.$ac_objext
5225 if { (eval echo "$as_me:5225: \"$ac_compile\"") >&5
5226 (eval $ac_compile) 2>&5
5228 echo "$as_me:5228: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
5230 { ac_try='test -s conftest.$ac_objext'
5231 { (eval echo "$as_me:5231: \"$ac_try\"") >&5
5234 echo "$as_me:5234: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5236 cf_cv_define_sigwinch=maybe
5238 echo "$as_me: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5240 cf_cv_define_sigwinch=no
5242 rm -f conftest.$ac_objext conftest.$ac_ext
5245 rm -f conftest.$ac_objext conftest.$ac_ext
5248 echo "$as_me:5248: result: $cf_cv_define_sigwinch" >&5
5249 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5251 if test "$cf_cv_define_sigwinch" = maybe ; then
5252 echo "$as_me:5252: checking for actual SIGWINCH definition" >&5
5253 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5254 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5255 echo $ECHO_N "(cached) $ECHO_C" >&6
5258 cf_cv_fixup_sigwinch=unknown
5260 while test $cf_sigwinch != 1
5262 cat >conftest.$ac_ext <<_ACEOF
5263 #line 5263 "configure"
5264 #include "confdefs.h"
5266 #undef _XOPEN_SOURCE
5267 #undef _POSIX_SOURCE
5268 #undef _POSIX_C_SOURCE
5269 #include <sys/types.h>
5270 #include <sys/signal.h>
5276 #if SIGWINCH != $cf_sigwinch
5284 rm -f conftest.$ac_objext
5285 if { (eval echo "$as_me:5285: \"$ac_compile\"") >&5
5286 (eval $ac_compile) 2>&5
5288 echo "$as_me:5288: \$? = $ac_status" >&5
5289 (exit $ac_status); } &&
5290 { ac_try='test -s conftest.$ac_objext'
5291 { (eval echo "$as_me:5291: \"$ac_try\"") >&5
5294 echo "$as_me:5294: \$? = $ac_status" >&5
5295 (exit $ac_status); }; }; then
5296 cf_cv_fixup_sigwinch=$cf_sigwinch
5299 echo "$as_me: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5302 rm -f conftest.$ac_objext conftest.$ac_ext
5304 cf_sigwinch=`expr $cf_sigwinch - 1`
5308 echo "$as_me:5308: result: $cf_cv_fixup_sigwinch" >&5
5309 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5311 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5312 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5316 # Checks for CODESET support.
5318 echo "$as_me:5318: checking for nl_langinfo and CODESET" >&5
5319 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5320 if test "${am_cv_langinfo_codeset+set}" = set; then
5321 echo $ECHO_N "(cached) $ECHO_C" >&6
5323 cat >conftest.$ac_ext <<_ACEOF
5324 #line 5324 "configure"
5325 #include "confdefs.h"
5326 #include <langinfo.h>
5330 char* cs = nl_langinfo(CODESET);
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337 (eval $ac_link) 2>&5
5339 echo "$as_me:5339: \$? = $ac_status" >&5
5340 (exit $ac_status); } &&
5341 { ac_try='test -s conftest$ac_exeext'
5342 { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5345 echo "$as_me:5345: \$? = $ac_status" >&5
5346 (exit $ac_status); }; }; then
5347 am_cv_langinfo_codeset=yes
5349 echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 am_cv_langinfo_codeset=no
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5356 echo "$as_me:5356: result: $am_cv_langinfo_codeset" >&5
5357 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5358 if test $am_cv_langinfo_codeset = yes; then
5360 cat >>confdefs.h <<\EOF
5361 #define HAVE_LANGINFO_CODESET 1
5366 echo "$as_me:5366: checking if you want to use pkg-config" >&5
5367 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5369 # Check whether --with-pkg-config or --without-pkg-config was given.
5370 if test "${with_pkg_config+set}" = set; then
5371 withval="$with_pkg_config"
5372 cf_pkg_config=$withval
5376 echo "$as_me:5376: result: $cf_pkg_config" >&5
5377 echo "${ECHO_T}$cf_pkg_config" >&6
5379 case $cf_pkg_config in
5385 if test -n "$ac_tool_prefix"; then
5386 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5387 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5388 echo "$as_me:5388: checking for $ac_word" >&5
5389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5390 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5391 echo $ECHO_N "(cached) $ECHO_C" >&6
5395 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5398 ac_save_IFS=$IFS; IFS=$ac_path_separator
5400 for ac_dir in $ac_dummy; do
5402 test -z "$ac_dir" && ac_dir=.
5403 if $as_executable_p "$ac_dir/$ac_word"; then
5404 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5405 echo "$as_me:5405: found $ac_dir/$ac_word" >&5
5413 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5415 if test -n "$PKG_CONFIG"; then
5416 echo "$as_me:5416: result: $PKG_CONFIG" >&5
5417 echo "${ECHO_T}$PKG_CONFIG" >&6
5419 echo "$as_me:5419: result: no" >&5
5420 echo "${ECHO_T}no" >&6
5424 if test -z "$ac_cv_path_PKG_CONFIG"; then
5425 ac_pt_PKG_CONFIG=$PKG_CONFIG
5426 # Extract the first word of "pkg-config", so it can be a program name with args.
5427 set dummy pkg-config; ac_word=$2
5428 echo "$as_me:5428: checking for $ac_word" >&5
5429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5430 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5431 echo $ECHO_N "(cached) $ECHO_C" >&6
5433 case $ac_pt_PKG_CONFIG in
5435 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5438 ac_save_IFS=$IFS; IFS=$ac_path_separator
5440 for ac_dir in $ac_dummy; do
5442 test -z "$ac_dir" && ac_dir=.
5443 if $as_executable_p "$ac_dir/$ac_word"; then
5444 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5445 echo "$as_me:5445: found $ac_dir/$ac_word" >&5
5450 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5454 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5456 if test -n "$ac_pt_PKG_CONFIG"; then
5457 echo "$as_me:5457: result: $ac_pt_PKG_CONFIG" >&5
5458 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5460 echo "$as_me:5460: result: no" >&5
5461 echo "${ECHO_T}no" >&6
5464 PKG_CONFIG=$ac_pt_PKG_CONFIG
5466 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5475 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5476 if test "$PKG_CONFIG" != none ; then
5478 if test "x$prefix" != xNONE; then
5479 cf_path_syntax="$prefix"
5481 cf_path_syntax="$ac_default_prefix"
5484 case ".$PKG_CONFIG" in
5489 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5491 (.\${*prefix}*|.\${*dir}*)
5492 eval PKG_CONFIG="$PKG_CONFIG"
5493 case ".$PKG_CONFIG" in
5495 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5500 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5503 { { echo "$as_me:5503: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5504 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5505 { (exit 1); exit 1; }; }
5509 elif test "x$cf_pkg_config" != xno ; then
5510 { echo "$as_me:5510: WARNING: pkg-config is not installed" >&5
5511 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5514 echo "$as_me:5514: checking if you want to see long compiling messages" >&5
5515 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5517 # Check whether --enable-echo or --disable-echo was given.
5518 if test "${enable_echo+set}" = set; then
5519 enableval="$enable_echo"
5520 test "$enableval" != no && enableval=yes
5521 if test "$enableval" != "yes" ; then
5524 ECHO_LD='@echo linking $@;'
5525 RULE_CC='@echo compiling $<'
5526 SHOW_CC='@echo compiling $@'
5548 echo "$as_me:5548: result: $enableval" >&5
5549 echo "${ECHO_T}$enableval" >&6
5551 echo "$as_me:5551: checking for ncurses wrap-prefix" >&5
5552 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5554 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5555 if test "${with_ncurses_wrap_prefix+set}" = set; then
5556 withval="$with_ncurses_wrap_prefix"
5557 NCURSES_WRAP_PREFIX=$withval
5559 NCURSES_WRAP_PREFIX=_nc_
5561 echo "$as_me:5561: result: $NCURSES_WRAP_PREFIX" >&5
5562 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5564 echo "$as_me:5564: checking if you want to check for wide-character functions" >&5
5565 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5567 # Check whether --enable-widec or --disable-widec was given.
5568 if test "${enable_widec+set}" = set; then
5569 enableval="$enable_widec"
5570 test "$enableval" != no && enableval=yes
5571 if test "$enableval" != "yes" ; then
5581 echo "$as_me:5581: result: $cf_enable_widec" >&5
5582 echo "${ECHO_T}$cf_enable_widec" >&6
5584 echo "$as_me:5584: checking for specific curses-directory" >&5
5585 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5587 # Check whether --with-curses-dir or --without-curses-dir was given.
5588 if test "${with_curses_dir+set}" = set; then
5589 withval="$with_curses_dir"
5590 cf_cv_curses_dir=$withval
5594 echo "$as_me:5594: result: $cf_cv_curses_dir" >&5
5595 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5597 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5600 if test "x$prefix" != xNONE; then
5601 cf_path_syntax="$prefix"
5603 cf_path_syntax="$ac_default_prefix"
5611 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5613 (.\${*prefix}*|.\${*dir}*)
5614 eval withval="$withval"
5617 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5622 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5625 { { echo "$as_me:5625: error: expected a pathname, not \"$withval\"" >&5
5626 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5627 { (exit 1); exit 1; }; }
5631 if test -d "$cf_cv_curses_dir"
5634 if test -n "$cf_cv_curses_dir/include" ; then
5635 for cf_add_incdir in $cf_cv_curses_dir/include
5637 while test $cf_add_incdir != /usr/include
5639 if test -d $cf_add_incdir
5642 if test -n "$CFLAGS$CPPFLAGS" ; then
5643 # a loop is needed to ensure we can add subdirs of existing dirs
5644 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5645 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5646 cf_have_incdir=yes; break
5651 if test "$cf_have_incdir" = no ; then
5652 if test "$cf_add_incdir" = /usr/local/include ; then
5653 if test "$GCC" = yes
5655 cf_save_CPPFLAGS=$CPPFLAGS
5657 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5658 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5660 cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674 (eval $ac_compile) 2>&5
5676 echo "$as_me:5676: \$? = $ac_status" >&5
5677 (exit $ac_status); } &&
5678 { ac_try='test -s conftest.$ac_objext'
5679 { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5682 echo "$as_me:5682: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
5686 echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5690 rm -f conftest.$ac_objext conftest.$ac_ext
5691 CPPFLAGS=$cf_save_CPPFLAGS
5696 if test "$cf_have_incdir" = no ; then
5697 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5699 echo "${as_me:-configure}:5699: testing adding $cf_add_incdir to include-path ..." 1>&5
5701 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5703 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5704 test "$cf_top_incdir" = "$cf_add_incdir" && break
5705 cf_add_incdir="$cf_top_incdir"
5716 if test -n "$cf_cv_curses_dir/lib" ; then
5717 for cf_add_libdir in $cf_cv_curses_dir/lib
5719 if test $cf_add_libdir = /usr/lib ; then
5721 elif test -d $cf_add_libdir
5724 if test -n "$LDFLAGS$LIBS" ; then
5725 # a loop is needed to ensure we can add subdirs of existing dirs
5726 for cf_test_libdir in $LDFLAGS $LIBS ; do
5727 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5728 cf_have_libdir=yes; break
5732 if test "$cf_have_libdir" = no ; then
5733 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5735 echo "${as_me:-configure}:5735: testing adding $cf_add_libdir to library-path ..." 1>&5
5737 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5748 echo "$as_me:5748: checking for specified curses library type" >&5
5749 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5751 # Check whether --with-screen or --without-screen was given.
5752 if test "${with_screen+set}" = set; then
5753 withval="$with_screen"
5754 cf_cv_screen=$withval
5757 # Check whether --with-ncursesw or --without-ncursesw was given.
5758 if test "${with_ncursesw+set}" = set; then
5759 withval="$with_ncursesw"
5760 cf_cv_screen=ncursesw
5763 # Check whether --with-ncurses or --without-ncurses was given.
5764 if test "${with_ncurses+set}" = set; then
5765 withval="$with_ncurses"
5766 cf_cv_screen=ncurses
5769 # Check whether --with-pdcurses or --without-pdcurses was given.
5770 if test "${with_pdcurses+set}" = set; then
5771 withval="$with_pdcurses"
5772 cf_cv_screen=pdcurses
5775 # Check whether --with-curses-colr or --without-curses-colr was given.
5776 if test "${with_curses_colr+set}" = set; then
5777 withval="$with_curses_colr"
5778 cf_cv_screen=curses_colr
5781 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5782 if test "${with_curses_5lib+set}" = set; then
5783 withval="$with_curses_5lib"
5784 cf_cv_screen=curses_5lib
5792 echo "$as_me:5792: result: $cf_cv_screen" >&5
5793 echo "${ECHO_T}$cf_cv_screen" >&6
5795 case $cf_cv_screen in
5798 echo "$as_me:5798: checking for extra include directories" >&5
5799 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5800 if test "${cf_cv_curses_incdir+set}" = set; then
5801 echo $ECHO_N "(cached) $ECHO_C" >&6
5804 cf_cv_curses_incdir=no
5807 if test "x$cf_cv_screen" = "xcurses_colr"
5809 test -d /usr/include/curses_colr && \
5810 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5814 if test "x$cf_cv_screen" = "xcurses_5lib"
5816 test -d /usr/5lib && \
5817 test -d /usr/5include && \
5818 cf_cv_curses_incdir="-I/usr/5include"
5824 echo "$as_me:5824: result: $cf_cv_curses_incdir" >&5
5825 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5826 if test "$cf_cv_curses_incdir" != no
5829 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5830 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
5834 echo "$as_me:5834: checking if we have identified curses headers" >&5
5835 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5836 if test "${cf_cv_ncurses_header+set}" = set; then
5837 echo $ECHO_N "(cached) $ECHO_C" >&6
5840 cf_cv_ncurses_header=none
5843 curses.h ncurses/ncurses.h ncurses/curses.h
5845 cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848 #include <${cf_header}>
5852 initscr(); tgoto("?", 0,0)
5857 rm -f conftest.$ac_objext
5858 if { (eval echo "$as_me:5858: \"$ac_compile\"") >&5
5859 (eval $ac_compile) 2>&5
5861 echo "$as_me:5861: \$? = $ac_status" >&5
5862 (exit $ac_status); } &&
5863 { ac_try='test -s conftest.$ac_objext'
5864 { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5867 echo "$as_me:5867: \$? = $ac_status" >&5
5868 (exit $ac_status); }; }; then
5869 cf_cv_ncurses_header=$cf_header; break
5871 echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5874 rm -f conftest.$ac_objext conftest.$ac_ext
5878 echo "$as_me:5878: result: $cf_cv_ncurses_header" >&5
5879 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5881 if test "$cf_cv_ncurses_header" = none ; then
5882 { { echo "$as_me:5882: error: No curses header-files found" >&5
5883 echo "$as_me: error: No curses header-files found" >&2;}
5884 { (exit 1); exit 1; }; }
5887 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5889 for ac_header in $cf_cv_ncurses_header
5891 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5892 echo "$as_me:5892: checking for $ac_header" >&5
5893 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5894 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5895 echo $ECHO_N "(cached) $ECHO_C" >&6
5897 cat >conftest.$ac_ext <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5900 #include <$ac_header>
5902 if { (eval echo "$as_me:5902: \"$ac_cpp conftest.$ac_ext\"") >&5
5903 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5905 egrep -v '^ *\+' conftest.er1 >conftest.err
5907 cat conftest.err >&5
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit $ac_status); } >/dev/null; then
5910 if test -s conftest.err; then
5911 ac_cpp_err=$ac_c_preproc_warn_flag
5918 if test -z "$ac_cpp_err"; then
5919 eval "$as_ac_Header=yes"
5921 echo "$as_me: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 eval "$as_ac_Header=no"
5925 rm -f conftest.err conftest.$ac_ext
5927 echo "$as_me:5927: result: `eval echo '${'$as_ac_Header'}'`" >&5
5928 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5929 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5930 cat >>confdefs.h <<EOF
5931 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5937 echo "$as_me:5937: checking for terminfo header" >&5
5938 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5939 if test "${cf_cv_term_header+set}" = set; then
5940 echo $ECHO_N "(cached) $ECHO_C" >&6
5943 case ${cf_cv_ncurses_header} in
5944 (*/ncurses.h|*/ncursesw.h)
5945 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5948 cf_term_header=term.h
5952 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5954 cat >conftest.$ac_ext <<_ACEOF
5955 #line 5955 "configure"
5956 #include "confdefs.h"
5958 #include <${cf_cv_ncurses_header:-curses.h}>
5964 int x = auto_left_margin
5969 rm -f conftest.$ac_objext
5970 if { (eval echo "$as_me:5970: \"$ac_compile\"") >&5
5971 (eval $ac_compile) 2>&5
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit $ac_status); } &&
5975 { ac_try='test -s conftest.$ac_objext'
5976 { (eval echo "$as_me:5976: \"$ac_try\"") >&5
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit $ac_status); }; }; then
5982 cf_cv_term_header="$cf_test"
5984 echo "$as_me: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5987 cf_cv_term_header=unknown
5990 rm -f conftest.$ac_objext conftest.$ac_ext
5991 test "$cf_cv_term_header" != unknown && break
5995 echo "$as_me:5995: result: $cf_cv_term_header" >&5
5996 echo "${ECHO_T}$cf_cv_term_header" >&6
5998 # Set definitions to allow ifdef'ing to accommodate subdirectories
6000 case $cf_cv_term_header in
6003 cat >>confdefs.h <<\EOF
6004 #define HAVE_TERM_H 1
6010 case $cf_cv_term_header in
6013 cat >>confdefs.h <<\EOF
6014 #define HAVE_NCURSES_TERM_H 1
6020 cat >>confdefs.h <<\EOF
6021 #define HAVE_NCURSESW_TERM_H 1
6027 echo "$as_me:6027: checking for ncurses version" >&5
6028 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6029 if test "${cf_cv_ncurses_version+set}" = set; then
6030 echo $ECHO_N "(cached) $ECHO_C" >&6
6033 cf_cv_ncurses_version=no
6036 if test "$cross_compiling" = yes; then
6038 # This will not work if the preprocessor splits the line after the
6039 # Autoconf token. The 'unproto' program does that.
6040 cat > conftest.$ac_ext <<EOF
6041 #include <${cf_cv_ncurses_header:-curses.h}>
6043 #ifdef NCURSES_VERSION
6044 Autoconf NCURSES_VERSION
6052 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6053 { (eval echo "$as_me:6053: \"$cf_try\"") >&5
6056 echo "$as_me:6056: \$? = $ac_status" >&5
6057 (exit $ac_status); }
6058 if test -f conftest.out ; then
6059 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6060 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6065 cat >conftest.$ac_ext <<_ACEOF
6066 #line 6066 "configure"
6067 #include "confdefs.h"
6069 #include <${cf_cv_ncurses_header:-curses.h}>
6073 FILE *fp = fopen("$cf_tempfile", "w");
6074 #ifdef NCURSES_VERSION
6075 # ifdef NCURSES_VERSION_PATCH
6076 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6078 fprintf(fp, "%s\n", NCURSES_VERSION);
6082 fprintf(fp, "old\n");
6087 ${cf_cv_main_return:-return}(0);
6090 rm -f conftest$ac_exeext
6091 if { (eval echo "$as_me:6091: \"$ac_link\"") >&5
6092 (eval $ac_link) 2>&5
6094 echo "$as_me:6094: \$? = $ac_status" >&5
6095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6096 { (eval echo "$as_me:6096: \"$ac_try\"") >&5
6099 echo "$as_me:6099: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6102 cf_cv_ncurses_version=`cat $cf_tempfile`
6104 echo "$as_me: program exited with status $ac_status" >&5
6105 echo "$as_me: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6108 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6113 echo "$as_me:6113: result: $cf_cv_ncurses_version" >&5
6114 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6115 test "$cf_cv_ncurses_version" = no ||
6116 cat >>confdefs.h <<\EOF
6120 echo "$as_me:6120: checking if we have identified curses libraries" >&5
6121 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6122 cat >conftest.$ac_ext <<_ACEOF
6123 #line 6123 "configure"
6124 #include "confdefs.h"
6125 #include <${cf_cv_ncurses_header:-curses.h}>
6129 initscr(); tgoto("?", 0,0)
6134 rm -f conftest.$ac_objext conftest$ac_exeext
6135 if { (eval echo "$as_me:6135: \"$ac_link\"") >&5
6136 (eval $ac_link) 2>&5
6138 echo "$as_me:6138: \$? = $ac_status" >&5
6139 (exit $ac_status); } &&
6140 { ac_try='test -s conftest$ac_exeext'
6141 { (eval echo "$as_me:6141: \"$ac_try\"") >&5
6144 echo "$as_me:6144: \$? = $ac_status" >&5
6145 (exit $ac_status); }; }; then
6148 echo "$as_me: failed program was:" >&5
6149 cat conftest.$ac_ext >&5
6152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6153 echo "$as_me:6153: result: $cf_result" >&5
6154 echo "${ECHO_T}$cf_result" >&6
6156 if test "$cf_result" = no ; then
6159 echo "$as_me:6159: checking for tgoto in -lmytinfo" >&5
6160 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6161 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6162 echo $ECHO_N "(cached) $ECHO_C" >&6
6164 ac_check_lib_save_LIBS=$LIBS
6165 LIBS="-lmytinfo $LIBS"
6166 cat >conftest.$ac_ext <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6170 /* Override any gcc2 internal prototype to avoid an error. */
6174 /* We use char because int might match the return type of a gcc2
6175 builtin and then its argument prototype would still apply. */
6185 rm -f conftest.$ac_objext conftest$ac_exeext
6186 if { (eval echo "$as_me:6186: \"$ac_link\"") >&5
6187 (eval $ac_link) 2>&5
6189 echo "$as_me:6189: \$? = $ac_status" >&5
6190 (exit $ac_status); } &&
6191 { ac_try='test -s conftest$ac_exeext'
6192 { (eval echo "$as_me:6192: \"$ac_try\"") >&5
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit $ac_status); }; }; then
6197 ac_cv_lib_mytinfo_tgoto=yes
6199 echo "$as_me: failed program was:" >&5
6200 cat conftest.$ac_ext >&5
6201 ac_cv_lib_mytinfo_tgoto=no
6203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6204 LIBS=$ac_check_lib_save_LIBS
6206 echo "$as_me:6206: result: $ac_cv_lib_mytinfo_tgoto" >&5
6207 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6208 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6210 cf_add_libs="-lmytinfo"
6211 # Filter out duplicates - this happens with badly-designed ".pc" files...
6212 for cf_add_1lib in $LIBS
6214 for cf_add_2lib in $cf_add_libs
6216 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6230 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6231 # next (1998), and xcurses "newer" (2000). There is no header file for
6232 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6233 # term.h) for cur_colr
6234 if test "x$cf_cv_screen" = "xcurses_colr"
6236 echo "$as_me:6236: checking for initscr in -lcur_colr" >&5
6237 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6238 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6239 echo $ECHO_N "(cached) $ECHO_C" >&6
6241 ac_check_lib_save_LIBS=$LIBS
6242 LIBS="-lcur_colr $LIBS"
6243 cat >conftest.$ac_ext <<_ACEOF
6244 #line 6244 "configure"
6245 #include "confdefs.h"
6247 /* Override any gcc2 internal prototype to avoid an error. */
6251 /* We use char because int might match the return type of a gcc2
6252 builtin and then its argument prototype would still apply. */
6262 rm -f conftest.$ac_objext conftest$ac_exeext
6263 if { (eval echo "$as_me:6263: \"$ac_link\"") >&5
6264 (eval $ac_link) 2>&5
6266 echo "$as_me:6266: \$? = $ac_status" >&5
6267 (exit $ac_status); } &&
6268 { ac_try='test -s 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
6274 ac_cv_lib_cur_colr_initscr=yes
6276 echo "$as_me: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6278 ac_cv_lib_cur_colr_initscr=no
6280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6281 LIBS=$ac_check_lib_save_LIBS
6283 echo "$as_me:6283: result: $ac_cv_lib_cur_colr_initscr" >&5
6284 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6285 if test $ac_cv_lib_cur_colr_initscr = yes; then
6287 cf_add_libs="-lcur_colr"
6288 # Filter out duplicates - this happens with badly-designed ".pc" files...
6289 for cf_add_1lib in $LIBS
6291 for cf_add_2lib in $cf_add_libs
6293 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6299 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6303 ac_cv_func_initscr=yes
6307 echo "$as_me:6307: checking for initscr in -lHcurses" >&5
6308 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6309 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6310 echo $ECHO_N "(cached) $ECHO_C" >&6
6312 ac_check_lib_save_LIBS=$LIBS
6313 LIBS="-lHcurses $LIBS"
6314 cat >conftest.$ac_ext <<_ACEOF
6315 #line 6315 "configure"
6316 #include "confdefs.h"
6318 /* Override any gcc2 internal prototype to avoid an error. */
6322 /* We use char because int might match the return type of a gcc2
6323 builtin and then its argument prototype would still apply. */
6333 rm -f conftest.$ac_objext conftest$ac_exeext
6334 if { (eval echo "$as_me:6334: \"$ac_link\"") >&5
6335 (eval $ac_link) 2>&5
6337 echo "$as_me:6337: \$? = $ac_status" >&5
6338 (exit $ac_status); } &&
6339 { ac_try='test -s conftest$ac_exeext'
6340 { (eval echo "$as_me:6340: \"$ac_try\"") >&5
6343 echo "$as_me:6343: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_cv_lib_Hcurses_initscr=yes
6347 echo "$as_me: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6349 ac_cv_lib_Hcurses_initscr=no
6351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6352 LIBS=$ac_check_lib_save_LIBS
6354 echo "$as_me:6354: result: $ac_cv_lib_Hcurses_initscr" >&5
6355 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6356 if test $ac_cv_lib_Hcurses_initscr = yes; then
6358 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6360 cf_add_libs="-lHcurses"
6361 # Filter out duplicates - this happens with badly-designed ".pc" files...
6362 for cf_add_1lib in $LIBS
6364 for cf_add_2lib in $cf_add_libs
6366 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6372 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6376 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6377 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6379 ac_cv_func_initscr=yes
6388 case `arch 2>/dev/null` in
6393 if test -n "/lib64" ; then
6394 for cf_add_libdir in /lib64
6396 if test $cf_add_libdir = /usr/lib ; then
6398 elif test -d $cf_add_libdir
6401 if test -n "$LDFLAGS$LIBS" ; then
6402 # a loop is needed to ensure we can add subdirs of existing dirs
6403 for cf_test_libdir in $LDFLAGS $LIBS ; do
6404 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6405 cf_have_libdir=yes; break
6409 if test "$cf_have_libdir" = no ; then
6410 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6412 echo "${as_me:-configure}:6412: testing adding $cf_add_libdir to library-path ..." 1>&5
6414 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6422 if test -n "/lib" ; then
6423 for cf_add_libdir in /lib
6425 if test $cf_add_libdir = /usr/lib ; then
6427 elif test -d $cf_add_libdir
6430 if test -n "$LDFLAGS$LIBS" ; then
6431 # a loop is needed to ensure we can add subdirs of existing dirs
6432 for cf_test_libdir in $LDFLAGS $LIBS ; do
6433 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6434 cf_have_libdir=yes; break
6438 if test "$cf_have_libdir" = no ; then
6439 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6441 echo "${as_me:-configure}:6441: testing adding $cf_add_libdir to library-path ..." 1>&5
6443 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6453 if test -n "/lib" ; then
6454 for cf_add_libdir in /lib
6456 if test $cf_add_libdir = /usr/lib ; then
6458 elif test -d $cf_add_libdir
6461 if test -n "$LDFLAGS$LIBS" ; then
6462 # a loop is needed to ensure we can add subdirs of existing dirs
6463 for cf_test_libdir in $LDFLAGS $LIBS ; do
6464 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6465 cf_have_libdir=yes; break
6469 if test "$cf_have_libdir" = no ; then
6470 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6472 echo "${as_me:-configure}:6472: testing adding $cf_add_libdir to library-path ..." 1>&5
6474 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6484 if test "x$cf_cv_screen" = "xcurses_5lib"
6486 if test -d /usr/5lib ; then
6488 if test -n "/usr/5lib" ; then
6489 for cf_add_libdir in /usr/5lib
6491 if test $cf_add_libdir = /usr/lib ; then
6493 elif test -d $cf_add_libdir
6496 if test -n "$LDFLAGS$LIBS" ; then
6497 # a loop is needed to ensure we can add subdirs of existing dirs
6498 for cf_test_libdir in $LDFLAGS $LIBS ; do
6499 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6500 cf_have_libdir=yes; break
6504 if test "$cf_have_libdir" = no ; then
6505 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6507 echo "${as_me:-configure}:6507: testing adding $cf_add_libdir to library-path ..." 1>&5
6509 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6515 cf_add_libs="-lcurses -ltermcap"
6516 # Filter out duplicates - this happens with badly-designed ".pc" files...
6517 for cf_add_1lib in $LIBS
6519 for cf_add_2lib in $cf_add_libs
6521 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6527 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6533 ac_cv_func_initscr=yes
6537 if test ".$ac_cv_func_initscr" != .yes ; then
6538 cf_save_LIBS="$LIBS"
6540 if test ".${cf_cv_ncurses_version:-no}" != .no
6542 cf_check_list="ncurses curses cursesX"
6544 cf_check_list="cursesX curses ncurses"
6547 # Check for library containing tgoto. Do this before curses library
6548 # because it may be needed to link the test-case for initscr.
6549 if test "x$cf_term_lib" = x
6551 echo "$as_me:6551: checking for tgoto" >&5
6552 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6553 if test "${ac_cv_func_tgoto+set}" = set; then
6554 echo $ECHO_N "(cached) $ECHO_C" >&6
6556 cat >conftest.$ac_ext <<_ACEOF
6557 #line 6557 "configure"
6558 #include "confdefs.h"
6559 #define tgoto autoconf_temporary
6560 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6567 /* We use char because int might match the return type of a gcc2
6568 builtin and then its argument prototype would still apply. */
6575 /* The GNU C library defines stubs for functions which it implements
6576 to always fail with ENOSYS. Some functions are actually named
6577 something starting with __ and the normal name is an alias. */
6578 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6579 #error found stub for tgoto
6587 rm -f conftest.$ac_objext conftest$ac_exeext
6588 if { (eval echo "$as_me:6588: \"$ac_link\"") >&5
6589 (eval $ac_link) 2>&5
6591 echo "$as_me:6591: \$? = $ac_status" >&5
6592 (exit $ac_status); } &&
6593 { ac_try='test -s conftest$ac_exeext'
6594 { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6597 echo "$as_me:6597: \$? = $ac_status" >&5
6598 (exit $ac_status); }; }; then
6599 ac_cv_func_tgoto=yes
6601 echo "$as_me: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6607 echo "$as_me:6607: result: $ac_cv_func_tgoto" >&5
6608 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6609 if test $ac_cv_func_tgoto = yes; then
6610 cf_term_lib=predefined
6613 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6615 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6616 echo "$as_me:6616: checking for tgoto in -l$cf_term_lib" >&5
6617 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6618 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6621 ac_check_lib_save_LIBS=$LIBS
6622 LIBS="-l$cf_term_lib $LIBS"
6623 cat >conftest.$ac_ext <<_ACEOF
6624 #line 6624 "configure"
6625 #include "confdefs.h"
6627 /* Override any gcc2 internal prototype to avoid an error. */
6631 /* We use char because int might match the return type of a gcc2
6632 builtin and then its argument prototype would still apply. */
6642 rm -f conftest.$ac_objext conftest$ac_exeext
6643 if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
6644 (eval $ac_link) 2>&5
6646 echo "$as_me:6646: \$? = $ac_status" >&5
6647 (exit $ac_status); } &&
6648 { ac_try='test -s conftest$ac_exeext'
6649 { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6652 echo "$as_me:6652: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
6654 eval "$as_ac_Lib=yes"
6656 echo "$as_me: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6658 eval "$as_ac_Lib=no"
6660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 LIBS=$ac_check_lib_save_LIBS
6663 echo "$as_me:6663: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6664 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6665 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6667 : ${cf_nculib_root:=$cf_term_lib}
6678 # Check for library containing initscr
6679 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6680 if test "x$cf_curs_lib" = x
6682 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6684 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6685 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6686 echo "$as_me:6686: checking if we can link with $cf_curs_lib library" >&5
6687 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6688 cat >conftest.$ac_ext <<_ACEOF
6689 #line 6689 "configure"
6690 #include "confdefs.h"
6691 #include <${cf_cv_ncurses_header:-curses.h}>
6700 rm -f conftest.$ac_objext conftest$ac_exeext
6701 if { (eval echo "$as_me:6701: \"$ac_link\"") >&5
6702 (eval $ac_link) 2>&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit $ac_status); } &&
6706 { ac_try='test -s conftest$ac_exeext'
6707 { (eval echo "$as_me:6707: \"$ac_try\"") >&5
6710 echo "$as_me:6710: \$? = $ac_status" >&5
6711 (exit $ac_status); }; }; then
6714 echo "$as_me: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6719 echo "$as_me:6719: result: $cf_result" >&5
6720 echo "${ECHO_T}$cf_result" >&6
6721 test $cf_result = yes && break
6722 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6724 elif test "$cf_term_lib" != predefined ; then
6725 echo "$as_me:6725: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6726 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6727 cat >conftest.$ac_ext <<_ACEOF
6728 #line 6728 "configure"
6729 #include "confdefs.h"
6730 #include <${cf_cv_ncurses_header:-curses.h}>
6734 initscr(); tgoto((char *)0, 0, 0);
6739 rm -f conftest.$ac_objext conftest$ac_exeext
6740 if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
6741 (eval $ac_link) 2>&5
6743 echo "$as_me:6743: \$? = $ac_status" >&5
6744 (exit $ac_status); } &&
6745 { ac_try='test -s conftest$ac_exeext'
6746 { (eval echo "$as_me:6746: \"$ac_try\"") >&5
6749 echo "$as_me:6749: \$? = $ac_status" >&5
6750 (exit $ac_status); }; }; then
6753 echo "$as_me: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6756 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6757 cat >conftest.$ac_ext <<_ACEOF
6758 #line 6758 "configure"
6759 #include "confdefs.h"
6760 #include <${cf_cv_ncurses_header:-curses.h}>
6769 rm -f conftest.$ac_objext conftest$ac_exeext
6770 if { (eval echo "$as_me:6770: \"$ac_link\"") >&5
6771 (eval $ac_link) 2>&5
6773 echo "$as_me:6773: \$? = $ac_status" >&5
6774 (exit $ac_status); } &&
6775 { ac_try='test -s conftest$ac_exeext'
6776 { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6779 echo "$as_me:6779: \$? = $ac_status" >&5
6780 (exit $ac_status); }; }; then
6783 echo "$as_me: failed program was:" >&5
6784 cat conftest.$ac_ext >&5
6787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6791 echo "$as_me:6791: result: $cf_result" >&5
6792 echo "${ECHO_T}$cf_result" >&6
6793 test $cf_result != error && break
6797 test $cf_curs_lib = unknown && { { echo "$as_me:6797: error: no curses library found" >&5
6798 echo "$as_me: error: no curses library found" >&2;}
6799 { (exit 1); exit 1; }; }
6806 echo "$as_me:6806: checking for multibyte character support" >&5
6807 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6808 if test "${cf_cv_utf8_lib+set}" = set; then
6809 echo $ECHO_N "(cached) $ECHO_C" >&6
6812 cf_save_LIBS="$LIBS"
6813 cat >conftest.$ac_ext <<_ACEOF
6814 #line 6814 "configure"
6815 #include "confdefs.h"
6826 rm -f conftest.$ac_objext conftest$ac_exeext
6827 if { (eval echo "$as_me:6827: \"$ac_link\"") >&5
6828 (eval $ac_link) 2>&5
6830 echo "$as_me:6830: \$? = $ac_status" >&5
6831 (exit $ac_status); } &&
6832 { ac_try='test -s conftest$ac_exeext'
6833 { (eval echo "$as_me:6833: \"$ac_try\"") >&5
6836 echo "$as_me:6836: \$? = $ac_status" >&5
6837 (exit $ac_status); }; }; then
6840 echo "$as_me: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6843 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6844 # will be set on completion of the AC_TRY_LINK below.
6845 cf_cv_header_path_utf8=
6846 cf_cv_library_path_utf8=
6848 echo "${as_me:-configure}:6848: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6850 cf_save_LIBS="$LIBS"
6852 cat >conftest.$ac_ext <<_ACEOF
6853 #line 6853 "configure"
6854 #include "confdefs.h"
6856 #include <libutf8.h>
6865 rm -f conftest.$ac_objext conftest$ac_exeext
6866 if { (eval echo "$as_me:6866: \"$ac_link\"") >&5
6867 (eval $ac_link) 2>&5
6869 echo "$as_me:6869: \$? = $ac_status" >&5
6870 (exit $ac_status); } &&
6871 { ac_try='test -s conftest$ac_exeext'
6872 { (eval echo "$as_me:6872: \"$ac_try\"") >&5
6875 echo "$as_me:6875: \$? = $ac_status" >&5
6876 (exit $ac_status); }; }; then
6878 cf_cv_find_linkage_utf8=yes
6879 cf_cv_header_path_utf8=/usr/include
6880 cf_cv_library_path_utf8=/usr/lib
6883 echo "$as_me: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6886 LIBS="-lutf8 $cf_save_LIBS"
6888 cat >conftest.$ac_ext <<_ACEOF
6889 #line 6889 "configure"
6890 #include "confdefs.h"
6892 #include <libutf8.h>
6901 rm -f conftest.$ac_objext conftest$ac_exeext
6902 if { (eval echo "$as_me:6902: \"$ac_link\"") >&5
6903 (eval $ac_link) 2>&5
6905 echo "$as_me:6905: \$? = $ac_status" >&5
6906 (exit $ac_status); } &&
6907 { ac_try='test -s conftest$ac_exeext'
6908 { (eval echo "$as_me:6908: \"$ac_try\"") >&5
6911 echo "$as_me:6911: \$? = $ac_status" >&5
6912 (exit $ac_status); }; }; then
6914 cf_cv_find_linkage_utf8=yes
6915 cf_cv_header_path_utf8=/usr/include
6916 cf_cv_library_path_utf8=/usr/lib
6917 cf_cv_library_file_utf8="-lutf8"
6920 echo "$as_me: failed program was:" >&5
6921 cat conftest.$ac_ext >&5
6923 cf_cv_find_linkage_utf8=no
6924 LIBS="$cf_save_LIBS"
6926 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6928 echo "${as_me:-configure}:6928: testing find linkage for utf8 library ..." 1>&5
6930 echo "${as_me:-configure}:6930: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6932 cf_save_CPPFLAGS="$CPPFLAGS"
6933 cf_test_CPPFLAGS="$CPPFLAGS"
6937 # collect the current set of include-directories from compiler flags
6938 cf_header_path_list=""
6939 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6940 for cf_header_path in $CPPFLAGS $CFLAGS
6942 case $cf_header_path in
6944 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6946 test "x$cf_header_path" != "xNONE" && \
6947 test -d "$cf_header_path" && \
6949 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6950 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6951 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6952 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6953 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6954 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6957 cf_header_path_list="$cf_header_path_list $cf_search"
6963 # add the variations for the package we are looking for
6967 test "x$prefix" != "xNONE" && \
6968 test -d "$prefix" && \
6970 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6971 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6972 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6973 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6974 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6975 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6978 for cf_subdir_prefix in \
6987 test "x$cf_subdir_prefix" != "x$prefix" && \
6988 test -d "$cf_subdir_prefix" && \
6989 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6990 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6991 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6992 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6993 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6994 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6995 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7000 test "$includedir" != NONE && \
7001 test "$includedir" != "/usr/include" && \
7002 test -d "$includedir" && {
7003 test -d $includedir && cf_search="$cf_search $includedir"
7004 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7007 test "$oldincludedir" != NONE && \
7008 test "$oldincludedir" != "/usr/include" && \
7009 test -d "$oldincludedir" && {
7010 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7011 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7014 cf_search="$cf_search $cf_header_path_list"
7016 for cf_cv_header_path_utf8 in $cf_search
7018 if test -d $cf_cv_header_path_utf8 ; then
7019 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7021 echo "${as_me:-configure}:7021: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7023 CPPFLAGS="$cf_save_CPPFLAGS"
7025 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7026 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7028 cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7032 #include <libutf8.h>
7041 rm -f conftest.$ac_objext
7042 if { (eval echo "$as_me:7042: \"$ac_compile\"") >&5
7043 (eval $ac_compile) 2>&5
7045 echo "$as_me:7045: \$? = $ac_status" >&5
7046 (exit $ac_status); } &&
7047 { ac_try='test -s conftest.$ac_objext'
7048 { (eval echo "$as_me:7048: \"$ac_try\"") >&5
7051 echo "$as_me:7051: \$? = $ac_status" >&5
7052 (exit $ac_status); }; }; then
7054 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7056 echo "${as_me:-configure}:7056: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7058 cf_cv_find_linkage_utf8=maybe
7059 cf_test_CPPFLAGS="$CPPFLAGS"
7062 echo "$as_me: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7065 CPPFLAGS="$cf_save_CPPFLAGS"
7068 rm -f conftest.$ac_objext conftest.$ac_ext
7072 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7074 echo "${as_me:-configure}:7074: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7076 cf_save_LIBS="$LIBS"
7077 cf_save_LDFLAGS="$LDFLAGS"
7079 if test "$cf_cv_find_linkage_utf8" != yes ; then
7082 cf_library_path_list=""
7083 if test -n "${LDFLAGS}${LIBS}" ; then
7084 for cf_library_path in $LDFLAGS $LIBS
7086 case $cf_library_path in
7088 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7090 test "x$cf_library_path" != "xNONE" && \
7091 test -d "$cf_library_path" && \
7093 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7094 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7095 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7096 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7097 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7098 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7101 cf_library_path_list="$cf_library_path_list $cf_search"
7109 test "x$prefix" != "xNONE" && \
7110 test -d "$prefix" && \
7112 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7113 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7114 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7115 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7116 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7117 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7120 for cf_subdir_prefix in \
7129 test "x$cf_subdir_prefix" != "x$prefix" && \
7130 test -d "$cf_subdir_prefix" && \
7131 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7132 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7133 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7134 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7135 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7136 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7137 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7142 cf_search="$cf_library_path_list $cf_search"
7144 for cf_cv_library_path_utf8 in $cf_search
7146 if test -d $cf_cv_library_path_utf8 ; then
7147 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7149 echo "${as_me:-configure}:7149: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7151 CPPFLAGS="$cf_test_CPPFLAGS"
7152 LIBS="-lutf8 $cf_save_LIBS"
7153 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7154 cat >conftest.$ac_ext <<_ACEOF
7155 #line 7155 "configure"
7156 #include "confdefs.h"
7158 #include <libutf8.h>
7167 rm -f conftest.$ac_objext conftest$ac_exeext
7168 if { (eval echo "$as_me:7168: \"$ac_link\"") >&5
7169 (eval $ac_link) 2>&5
7171 echo "$as_me:7171: \$? = $ac_status" >&5
7172 (exit $ac_status); } &&
7173 { ac_try='test -s conftest$ac_exeext'
7174 { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7177 echo "$as_me:7177: \$? = $ac_status" >&5
7178 (exit $ac_status); }; }; then
7180 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7182 echo "${as_me:-configure}:7182: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7184 cf_cv_find_linkage_utf8=yes
7185 cf_cv_library_file_utf8="-lutf8"
7188 echo "$as_me: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7191 CPPFLAGS="$cf_save_CPPFLAGS"
7192 LIBS="$cf_save_LIBS"
7193 LDFLAGS="$cf_save_LDFLAGS"
7196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7199 CPPFLAGS="$cf_save_CPPFLAGS"
7200 LDFLAGS="$cf_save_LDFLAGS"
7204 cf_cv_find_linkage_utf8=no
7208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7213 LIBS="$cf_save_LIBS"
7215 if test "$cf_cv_find_linkage_utf8" = yes ; then
7216 cf_cv_utf8_lib=add-on
7222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7224 echo "$as_me:7224: result: $cf_cv_utf8_lib" >&5
7225 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7227 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7229 if test "$cf_cv_utf8_lib" = "add-on" ; then
7231 cat >>confdefs.h <<\EOF
7232 #define HAVE_LIBUTF8_H 1
7235 if test -n "$cf_cv_header_path_utf8" ; then
7236 for cf_add_incdir in $cf_cv_header_path_utf8
7238 while test $cf_add_incdir != /usr/include
7240 if test -d $cf_add_incdir
7243 if test -n "$CFLAGS$CPPFLAGS" ; then
7244 # a loop is needed to ensure we can add subdirs of existing dirs
7245 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7246 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7247 cf_have_incdir=yes; break
7252 if test "$cf_have_incdir" = no ; then
7253 if test "$cf_add_incdir" = /usr/local/include ; then
7254 if test "$GCC" = yes
7256 cf_save_CPPFLAGS=$CPPFLAGS
7258 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7259 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7261 cat >conftest.$ac_ext <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7273 rm -f conftest.$ac_objext
7274 if { (eval echo "$as_me:7274: \"$ac_compile\"") >&5
7275 (eval $ac_compile) 2>&5
7277 echo "$as_me:7277: \$? = $ac_status" >&5
7278 (exit $ac_status); } &&
7279 { ac_try='test -s conftest.$ac_objext'
7280 { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7283 echo "$as_me:7283: \$? = $ac_status" >&5
7284 (exit $ac_status); }; }; then
7287 echo "$as_me: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7291 rm -f conftest.$ac_objext conftest.$ac_ext
7292 CPPFLAGS=$cf_save_CPPFLAGS
7297 if test "$cf_have_incdir" = no ; then
7298 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7300 echo "${as_me:-configure}:7300: testing adding $cf_add_incdir to include-path ..." 1>&5
7302 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7304 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7305 test "$cf_top_incdir" = "$cf_add_incdir" && break
7306 cf_add_incdir="$cf_top_incdir"
7317 if test -n "$cf_cv_library_path_utf8" ; then
7318 for cf_add_libdir in $cf_cv_library_path_utf8
7320 if test $cf_add_libdir = /usr/lib ; then
7322 elif test -d $cf_add_libdir
7325 if test -n "$LDFLAGS$LIBS" ; then
7326 # a loop is needed to ensure we can add subdirs of existing dirs
7327 for cf_test_libdir in $LDFLAGS $LIBS ; do
7328 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7329 cf_have_libdir=yes; break
7333 if test "$cf_have_libdir" = no ; then
7334 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7336 echo "${as_me:-configure}:7336: testing adding $cf_add_libdir to library-path ..." 1>&5
7338 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7344 cf_add_libs="$cf_cv_library_file_utf8"
7345 # Filter out duplicates - this happens with badly-designed ".pc" files...
7346 for cf_add_1lib in $LIBS
7348 for cf_add_2lib in $cf_add_libs
7350 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7356 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7362 cf_ncuconfig_root=$cf_cv_screen
7363 cf_have_ncuconfig=no
7365 if test "x${PKG_CONFIG:=none}" != xnone; then
7366 echo "$as_me:7366: checking pkg-config for $cf_ncuconfig_root" >&5
7367 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7368 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7369 echo "$as_me:7369: result: yes" >&5
7370 echo "${ECHO_T}yes" >&6
7372 echo "$as_me:7372: checking if the $cf_ncuconfig_root package files work" >&5
7373 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7374 cf_have_ncuconfig=unknown
7376 cf_save_CPPFLAGS="$CPPFLAGS"
7377 cf_save_LIBS="$LIBS"
7382 cf_new_extra_cppflags=
7384 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7386 case $cf_fix_cppflags in
7388 case $cf_add_cflags in
7389 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7390 case $cf_add_cflags in
7392 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7395 && test -z "${cf_tst_cflags}" \
7396 && cf_fix_cppflags=yes
7398 if test $cf_fix_cppflags = yes ; then
7400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7404 elif test "${cf_tst_cflags}" = "\"'" ; then
7406 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7407 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7417 case $cf_add_cflags in
7419 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7421 CPPFLAGS=`echo "$CPPFLAGS" | \
7422 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7423 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7428 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7429 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7436 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7437 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7447 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7449 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7450 && test -z "${cf_tst_cflags}" \
7451 && cf_fix_cppflags=no
7456 if test -n "$cf_new_cflags" ; then
7458 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7459 CFLAGS="${CFLAGS}$cf_new_cflags"
7463 if test -n "$cf_new_cppflags" ; then
7465 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7466 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7470 if test -n "$cf_new_extra_cppflags" ; then
7472 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7473 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7477 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7478 # Filter out duplicates - this happens with badly-designed ".pc" files...
7479 for cf_add_1lib in $LIBS
7481 for cf_add_2lib in $cf_add_libs
7483 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7489 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7493 cat >conftest.$ac_ext <<_ACEOF
7494 #line 7494 "configure"
7495 #include "confdefs.h"
7496 #include <${cf_cv_ncurses_header:-curses.h}>
7500 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7505 rm -f conftest.$ac_objext conftest$ac_exeext
7506 if { (eval echo "$as_me:7506: \"$ac_link\"") >&5
7507 (eval $ac_link) 2>&5
7509 echo "$as_me:7509: \$? = $ac_status" >&5
7510 (exit $ac_status); } &&
7511 { ac_try='test -s conftest$ac_exeext'
7512 { (eval echo "$as_me:7512: \"$ac_try\"") >&5
7515 echo "$as_me:7515: \$? = $ac_status" >&5
7516 (exit $ac_status); }; }; then
7517 if test "$cross_compiling" = yes; then
7518 cf_have_ncuconfig=maybe
7520 cat >conftest.$ac_ext <<_ACEOF
7521 #line 7521 "configure"
7522 #include "confdefs.h"
7523 #include <${cf_cv_ncurses_header:-curses.h}>
7525 { char *xx = curses_version(); return (xx == 0); }
7527 rm -f conftest$ac_exeext
7528 if { (eval echo "$as_me:7528: \"$ac_link\"") >&5
7529 (eval $ac_link) 2>&5
7531 echo "$as_me:7531: \$? = $ac_status" >&5
7532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7533 { (eval echo "$as_me:7533: \"$ac_try\"") >&5
7536 echo "$as_me:7536: \$? = $ac_status" >&5
7537 (exit $ac_status); }; }; then
7538 cf_have_ncuconfig=yes
7540 echo "$as_me: program exited with status $ac_status" >&5
7541 echo "$as_me: failed program was:" >&5
7542 cat conftest.$ac_ext >&5
7543 cf_have_ncuconfig=no
7545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7548 echo "$as_me: failed program was:" >&5
7549 cat conftest.$ac_ext >&5
7550 cf_have_ncuconfig=no
7552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7553 echo "$as_me:7553: result: $cf_have_ncuconfig" >&5
7554 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7555 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7556 if test "$cf_have_ncuconfig" != "yes"
7558 CPPFLAGS="$cf_save_CPPFLAGS"
7559 LIBS="$cf_save_LIBS"
7560 NCURSES_CONFIG_PKG=none
7563 cat >>confdefs.h <<\EOF
7567 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7569 echo "$as_me:7569: checking for terminfo header" >&5
7570 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7571 if test "${cf_cv_term_header+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7575 case ${cf_cv_ncurses_header} in
7576 (*/ncurses.h|*/ncursesw.h)
7577 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7580 cf_term_header=term.h
7584 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7586 cat >conftest.$ac_ext <<_ACEOF
7587 #line 7587 "configure"
7588 #include "confdefs.h"
7590 #include <${cf_cv_ncurses_header:-curses.h}>
7596 int x = auto_left_margin
7601 rm -f conftest.$ac_objext
7602 if { (eval echo "$as_me:7602: \"$ac_compile\"") >&5
7603 (eval $ac_compile) 2>&5
7605 echo "$as_me:7605: \$? = $ac_status" >&5
7606 (exit $ac_status); } &&
7607 { ac_try='test -s conftest.$ac_objext'
7608 { (eval echo "$as_me:7608: \"$ac_try\"") >&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit $ac_status); }; }; then
7614 cf_cv_term_header="$cf_test"
7616 echo "$as_me: failed program was:" >&5
7617 cat conftest.$ac_ext >&5
7619 cf_cv_term_header=unknown
7622 rm -f conftest.$ac_objext conftest.$ac_ext
7623 test "$cf_cv_term_header" != unknown && break
7627 echo "$as_me:7627: result: $cf_cv_term_header" >&5
7628 echo "${ECHO_T}$cf_cv_term_header" >&6
7630 # Set definitions to allow ifdef'ing to accommodate subdirectories
7632 case $cf_cv_term_header in
7635 cat >>confdefs.h <<\EOF
7636 #define HAVE_TERM_H 1
7642 case $cf_cv_term_header in
7645 cat >>confdefs.h <<\EOF
7646 #define HAVE_NCURSES_TERM_H 1
7652 cat >>confdefs.h <<\EOF
7653 #define HAVE_NCURSESW_TERM_H 1
7662 echo "$as_me:7662: result: no" >&5
7663 echo "${ECHO_T}no" >&6
7664 NCURSES_CONFIG_PKG=none
7667 NCURSES_CONFIG_PKG=none
7670 if test "x$cf_have_ncuconfig" = "xno"; then
7671 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7673 if test -n "$ac_tool_prefix"; then
7674 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7676 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7677 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7678 echo "$as_me:7678: checking for $ac_word" >&5
7679 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7680 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7681 echo $ECHO_N "(cached) $ECHO_C" >&6
7683 if test -n "$NCURSES_CONFIG"; then
7684 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7686 ac_save_IFS=$IFS; IFS=$ac_path_separator
7688 for ac_dir in $ac_dummy; do
7690 test -z "$ac_dir" && ac_dir=.
7691 $as_executable_p "$ac_dir/$ac_word" || continue
7692 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7693 echo "$as_me:7693: found $ac_dir/$ac_word" >&5
7699 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7700 if test -n "$NCURSES_CONFIG"; then
7701 echo "$as_me:7701: result: $NCURSES_CONFIG" >&5
7702 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7704 echo "$as_me:7704: result: no" >&5
7705 echo "${ECHO_T}no" >&6
7708 test -n "$NCURSES_CONFIG" && break
7711 if test -z "$NCURSES_CONFIG"; then
7712 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7713 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7715 # Extract the first word of "$ac_prog", so it can be a program name with args.
7716 set dummy $ac_prog; ac_word=$2
7717 echo "$as_me:7717: checking for $ac_word" >&5
7718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7719 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7720 echo $ECHO_N "(cached) $ECHO_C" >&6
7722 if test -n "$ac_ct_NCURSES_CONFIG"; then
7723 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7725 ac_save_IFS=$IFS; IFS=$ac_path_separator
7727 for ac_dir in $ac_dummy; do
7729 test -z "$ac_dir" && ac_dir=.
7730 $as_executable_p "$ac_dir/$ac_word" || continue
7731 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7732 echo "$as_me:7732: found $ac_dir/$ac_word" >&5
7738 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7739 if test -n "$ac_ct_NCURSES_CONFIG"; then
7740 echo "$as_me:7740: result: $ac_ct_NCURSES_CONFIG" >&5
7741 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7743 echo "$as_me:7743: result: no" >&5
7744 echo "${ECHO_T}no" >&6
7747 test -n "$ac_ct_NCURSES_CONFIG" && break
7749 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7751 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7754 if test "$NCURSES_CONFIG" != none ; then
7759 cf_new_extra_cppflags=
7761 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7763 case $cf_fix_cppflags in
7765 case $cf_add_cflags in
7766 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7767 case $cf_add_cflags in
7769 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7771 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7772 && test -z "${cf_tst_cflags}" \
7773 && cf_fix_cppflags=yes
7775 if test $cf_fix_cppflags = yes ; then
7777 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7778 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7781 elif test "${cf_tst_cflags}" = "\"'" ; then
7783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7794 case $cf_add_cflags in
7796 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7798 CPPFLAGS=`echo "$CPPFLAGS" | \
7799 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7800 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7805 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7806 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7813 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7814 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7821 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7822 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7824 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7827 && test -z "${cf_tst_cflags}" \
7828 && cf_fix_cppflags=no
7833 if test -n "$cf_new_cflags" ; then
7835 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7836 CFLAGS="${CFLAGS}$cf_new_cflags"
7840 if test -n "$cf_new_cppflags" ; then
7842 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7843 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7847 if test -n "$cf_new_extra_cppflags" ; then
7849 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7850 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7854 cf_add_libs="`$NCURSES_CONFIG --libs`"
7855 # Filter out duplicates - this happens with badly-designed ".pc" files...
7856 for cf_add_1lib in $LIBS
7858 for cf_add_2lib in $cf_add_libs
7860 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7866 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7870 # even with config script, some packages use no-override for curses.h
7872 echo "$as_me:7872: checking if we have identified curses headers" >&5
7873 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7874 if test "${cf_cv_ncurses_header+set}" = set; then
7875 echo $ECHO_N "(cached) $ECHO_C" >&6
7878 cf_cv_ncurses_header=none
7880 ncurses.h $cf_cv_screen/ncurses.h \
7881 curses.h $cf_cv_screen/curses.h
7883 cat >conftest.$ac_ext <<_ACEOF
7884 #line 7884 "configure"
7885 #include "confdefs.h"
7886 #include <${cf_header}>
7890 initscr(); tgoto("?", 0,0)
7895 rm -f conftest.$ac_objext
7896 if { (eval echo "$as_me:7896: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7899 echo "$as_me:7899: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:7902: \"$ac_try\"") >&5
7905 echo "$as_me:7905: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 cf_cv_ncurses_header=$cf_header; break
7909 echo "$as_me: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7912 rm -f conftest.$ac_objext conftest.$ac_ext
7916 echo "$as_me:7916: result: $cf_cv_ncurses_header" >&5
7917 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7919 if test "$cf_cv_ncurses_header" = none ; then
7920 { { echo "$as_me:7920: error: No curses header-files found" >&5
7921 echo "$as_me: error: No curses header-files found" >&2;}
7922 { (exit 1); exit 1; }; }
7925 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7927 for ac_header in $cf_cv_ncurses_header
7929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7930 echo "$as_me:7930: checking for $ac_header" >&5
7931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7933 echo $ECHO_N "(cached) $ECHO_C" >&6
7935 cat >conftest.$ac_ext <<_ACEOF
7936 #line 7936 "configure"
7937 #include "confdefs.h"
7938 #include <$ac_header>
7940 if { (eval echo "$as_me:7940: \"$ac_cpp conftest.$ac_ext\"") >&5
7941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7943 egrep -v '^ *\+' conftest.er1 >conftest.err
7945 cat conftest.err >&5
7946 echo "$as_me:7946: \$? = $ac_status" >&5
7947 (exit $ac_status); } >/dev/null; then
7948 if test -s conftest.err; then
7949 ac_cpp_err=$ac_c_preproc_warn_flag
7956 if test -z "$ac_cpp_err"; then
7957 eval "$as_ac_Header=yes"
7959 echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961 eval "$as_ac_Header=no"
7963 rm -f conftest.err conftest.$ac_ext
7965 echo "$as_me:7965: result: `eval echo '${'$as_ac_Header'}'`" >&5
7966 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7967 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7968 cat >>confdefs.h <<EOF
7969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7975 cat >>confdefs.h <<\EOF
7979 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7981 cat >>confdefs.h <<EOF
7982 #define $cf_nculib_ROOT 1
7985 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7989 cf_ncuhdr_root=$cf_cv_screen
7991 test -n "$cf_cv_curses_dir" && \
7992 test "$cf_cv_curses_dir" != "no" && { \
7994 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7995 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7997 while test $cf_add_incdir != /usr/include
7999 if test -d $cf_add_incdir
8002 if test -n "$CFLAGS$CPPFLAGS" ; then
8003 # a loop is needed to ensure we can add subdirs of existing dirs
8004 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8005 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8006 cf_have_incdir=yes; break
8011 if test "$cf_have_incdir" = no ; then
8012 if test "$cf_add_incdir" = /usr/local/include ; then
8013 if test "$GCC" = yes
8015 cf_save_CPPFLAGS=$CPPFLAGS
8017 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8018 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8020 cat >conftest.$ac_ext <<_ACEOF
8021 #line 8021 "configure"
8022 #include "confdefs.h"
8032 rm -f conftest.$ac_objext
8033 if { (eval echo "$as_me:8033: \"$ac_compile\"") >&5
8034 (eval $ac_compile) 2>&5
8036 echo "$as_me:8036: \$? = $ac_status" >&5
8037 (exit $ac_status); } &&
8038 { ac_try='test -s conftest.$ac_objext'
8039 { (eval echo "$as_me:8039: \"$ac_try\"") >&5
8042 echo "$as_me:8042: \$? = $ac_status" >&5
8043 (exit $ac_status); }; }; then
8046 echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8050 rm -f conftest.$ac_objext conftest.$ac_ext
8051 CPPFLAGS=$cf_save_CPPFLAGS
8056 if test "$cf_have_incdir" = no ; then
8057 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8059 echo "${as_me:-configure}:8059: testing adding $cf_add_incdir to include-path ..." 1>&5
8061 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8063 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8064 test "$cf_top_incdir" = "$cf_add_incdir" && break
8065 cf_add_incdir="$cf_top_incdir"
8078 echo "$as_me:8078: checking for $cf_ncuhdr_root header in include-path" >&5
8079 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8080 if test "${cf_cv_ncurses_h+set}" = set; then
8081 echo $ECHO_N "(cached) $ECHO_C" >&6
8084 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8085 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8086 for cf_header in $cf_header_list
8089 cat >conftest.$ac_ext <<_ACEOF
8090 #line 8090 "configure"
8091 #include "confdefs.h"
8093 #include <$cf_header>
8098 #ifdef NCURSES_VERSION
8100 printf("%s\n", NCURSES_VERSION);
8113 rm -f conftest.$ac_objext
8114 if { (eval echo "$as_me:8114: \"$ac_compile\"") >&5
8115 (eval $ac_compile) 2>&5
8117 echo "$as_me:8117: \$? = $ac_status" >&5
8118 (exit $ac_status); } &&
8119 { ac_try='test -s conftest.$ac_objext'
8120 { (eval echo "$as_me:8120: \"$ac_try\"") >&5
8123 echo "$as_me:8123: \$? = $ac_status" >&5
8124 (exit $ac_status); }; }; then
8125 cf_cv_ncurses_h=$cf_header
8128 echo "$as_me: failed program was:" >&5
8129 cat conftest.$ac_ext >&5
8132 rm -f conftest.$ac_objext conftest.$ac_ext
8134 test "$cf_cv_ncurses_h" != no && break
8138 echo "$as_me:8138: result: $cf_cv_ncurses_h" >&5
8139 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8141 if test "$cf_cv_ncurses_h" != no ; then
8142 cf_cv_ncurses_header=$cf_cv_ncurses_h
8145 echo "$as_me:8145: checking for $cf_ncuhdr_root include-path" >&5
8146 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8147 if test "${cf_cv_ncurses_h2+set}" = set; then
8148 echo $ECHO_N "(cached) $ECHO_C" >&6
8151 test -n "$verbose" && echo
8155 # collect the current set of include-directories from compiler flags
8156 cf_header_path_list=""
8157 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8158 for cf_header_path in $CPPFLAGS $CFLAGS
8160 case $cf_header_path in
8162 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8164 test "x$cf_header_path" != "xNONE" && \
8165 test -d "$cf_header_path" && \
8167 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8168 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8169 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8170 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8171 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8172 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"
8175 cf_header_path_list="$cf_header_path_list $cf_search"
8181 # add the variations for the package we are looking for
8185 test "x$prefix" != "xNONE" && \
8186 test -d "$prefix" && \
8188 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8189 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8190 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8191 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8192 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8193 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8196 for cf_subdir_prefix in \
8205 test "x$cf_subdir_prefix" != "x$prefix" && \
8206 test -d "$cf_subdir_prefix" && \
8207 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8208 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8209 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8210 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8211 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8212 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8213 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"
8218 test "$includedir" != NONE && \
8219 test "$includedir" != "/usr/include" && \
8220 test -d "$includedir" && {
8221 test -d $includedir && cf_search="$cf_search $includedir"
8222 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8225 test "$oldincludedir" != NONE && \
8226 test "$oldincludedir" != "/usr/include" && \
8227 test -d "$oldincludedir" && {
8228 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8229 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8232 cf_search="$cf_search $cf_header_path_list"
8234 test -n "$verbose" && echo search path $cf_search
8235 cf_save2_CPPFLAGS="$CPPFLAGS"
8236 for cf_incdir in $cf_search
8239 if test -n "$cf_incdir" ; then
8240 for cf_add_incdir in $cf_incdir
8242 while test $cf_add_incdir != /usr/include
8244 if test -d $cf_add_incdir
8247 if test -n "$CFLAGS$CPPFLAGS" ; then
8248 # a loop is needed to ensure we can add subdirs of existing dirs
8249 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8250 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8251 cf_have_incdir=yes; break
8256 if test "$cf_have_incdir" = no ; then
8257 if test "$cf_add_incdir" = /usr/local/include ; then
8258 if test "$GCC" = yes
8260 cf_save_CPPFLAGS=$CPPFLAGS
8262 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8263 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8265 cat >conftest.$ac_ext <<_ACEOF
8266 #line 8266 "configure"
8267 #include "confdefs.h"
8277 rm -f conftest.$ac_objext
8278 if { (eval echo "$as_me:8278: \"$ac_compile\"") >&5
8279 (eval $ac_compile) 2>&5
8281 echo "$as_me:8281: \$? = $ac_status" >&5
8282 (exit $ac_status); } &&
8283 { ac_try='test -s conftest.$ac_objext'
8284 { (eval echo "$as_me:8284: \"$ac_try\"") >&5
8287 echo "$as_me:8287: \$? = $ac_status" >&5
8288 (exit $ac_status); }; }; then
8291 echo "$as_me: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
8295 rm -f conftest.$ac_objext conftest.$ac_ext
8296 CPPFLAGS=$cf_save_CPPFLAGS
8301 if test "$cf_have_incdir" = no ; then
8302 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8304 echo "${as_me:-configure}:8304: testing adding $cf_add_incdir to include-path ..." 1>&5
8306 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8308 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8309 test "$cf_top_incdir" = "$cf_add_incdir" && break
8310 cf_add_incdir="$cf_top_incdir"
8326 cat >conftest.$ac_ext <<_ACEOF
8327 #line 8327 "configure"
8328 #include "confdefs.h"
8330 #include <$cf_header>
8335 #ifdef NCURSES_VERSION
8337 printf("%s\n", NCURSES_VERSION);
8350 rm -f conftest.$ac_objext
8351 if { (eval echo "$as_me:8351: \"$ac_compile\"") >&5
8352 (eval $ac_compile) 2>&5
8354 echo "$as_me:8354: \$? = $ac_status" >&5
8355 (exit $ac_status); } &&
8356 { ac_try='test -s conftest.$ac_objext'
8357 { (eval echo "$as_me:8357: \"$ac_try\"") >&5
8360 echo "$as_me:8360: \$? = $ac_status" >&5
8361 (exit $ac_status); }; }; then
8362 cf_cv_ncurses_h2=$cf_header
8365 echo "$as_me: failed program was:" >&5
8366 cat conftest.$ac_ext >&5
8369 rm -f conftest.$ac_objext conftest.$ac_ext
8371 if test "$cf_cv_ncurses_h2" != no ; then
8372 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8373 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8376 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8378 CPPFLAGS="$cf_save2_CPPFLAGS"
8379 test "$cf_cv_ncurses_h2" != no && break
8381 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8381: error: not found" >&5
8382 echo "$as_me: error: not found" >&2;}
8383 { (exit 1); exit 1; }; }
8386 echo "$as_me:8386: result: $cf_cv_ncurses_h2" >&5
8387 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8389 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8390 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8391 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8392 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8395 if test -n "$cf_1st_incdir" ; then
8396 for cf_add_incdir in $cf_1st_incdir
8398 while test $cf_add_incdir != /usr/include
8400 if test -d $cf_add_incdir
8403 if test -n "$CFLAGS$CPPFLAGS" ; then
8404 # a loop is needed to ensure we can add subdirs of existing dirs
8405 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8406 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8407 cf_have_incdir=yes; break
8412 if test "$cf_have_incdir" = no ; then
8413 if test "$cf_add_incdir" = /usr/local/include ; then
8414 if test "$GCC" = yes
8416 cf_save_CPPFLAGS=$CPPFLAGS
8418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8419 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8421 cat >conftest.$ac_ext <<_ACEOF
8422 #line 8422 "configure"
8423 #include "confdefs.h"
8433 rm -f conftest.$ac_objext
8434 if { (eval echo "$as_me:8434: \"$ac_compile\"") >&5
8435 (eval $ac_compile) 2>&5
8437 echo "$as_me:8437: \$? = $ac_status" >&5
8438 (exit $ac_status); } &&
8439 { ac_try='test -s conftest.$ac_objext'
8440 { (eval echo "$as_me:8440: \"$ac_try\"") >&5
8443 echo "$as_me:8443: \$? = $ac_status" >&5
8444 (exit $ac_status); }; }; then
8447 echo "$as_me: failed program was:" >&5
8448 cat conftest.$ac_ext >&5
8451 rm -f conftest.$ac_objext conftest.$ac_ext
8452 CPPFLAGS=$cf_save_CPPFLAGS
8457 if test "$cf_have_incdir" = no ; then
8458 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8460 echo "${as_me:-configure}:8460: testing adding $cf_add_incdir to include-path ..." 1>&5
8462 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8464 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8465 test "$cf_top_incdir" = "$cf_add_incdir" && break
8466 cf_add_incdir="$cf_top_incdir"
8479 # Set definitions to allow ifdef'ing for ncurses.h
8481 case $cf_cv_ncurses_header in
8484 cat >>confdefs.h <<\EOF
8485 #define HAVE_NCURSES_H 1
8491 case $cf_cv_ncurses_header in
8492 (ncurses/curses.h|ncurses/ncurses.h)
8494 cat >>confdefs.h <<\EOF
8495 #define HAVE_NCURSES_NCURSES_H 1
8499 (ncursesw/curses.h|ncursesw/ncurses.h)
8501 cat >>confdefs.h <<\EOF
8502 #define HAVE_NCURSESW_NCURSES_H 1
8508 echo "$as_me:8508: checking for terminfo header" >&5
8509 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8510 if test "${cf_cv_term_header+set}" = set; then
8511 echo $ECHO_N "(cached) $ECHO_C" >&6
8514 case ${cf_cv_ncurses_header} in
8515 (*/ncurses.h|*/ncursesw.h)
8516 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8519 cf_term_header=term.h
8523 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8525 cat >conftest.$ac_ext <<_ACEOF
8526 #line 8526 "configure"
8527 #include "confdefs.h"
8529 #include <${cf_cv_ncurses_header:-curses.h}>
8535 int x = auto_left_margin
8540 rm -f conftest.$ac_objext
8541 if { (eval echo "$as_me:8541: \"$ac_compile\"") >&5
8542 (eval $ac_compile) 2>&5
8544 echo "$as_me:8544: \$? = $ac_status" >&5
8545 (exit $ac_status); } &&
8546 { ac_try='test -s conftest.$ac_objext'
8547 { (eval echo "$as_me:8547: \"$ac_try\"") >&5
8550 echo "$as_me:8550: \$? = $ac_status" >&5
8551 (exit $ac_status); }; }; then
8553 cf_cv_term_header="$cf_test"
8555 echo "$as_me: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8558 cf_cv_term_header=unknown
8561 rm -f conftest.$ac_objext conftest.$ac_ext
8562 test "$cf_cv_term_header" != unknown && break
8566 echo "$as_me:8566: result: $cf_cv_term_header" >&5
8567 echo "${ECHO_T}$cf_cv_term_header" >&6
8569 # Set definitions to allow ifdef'ing to accommodate subdirectories
8571 case $cf_cv_term_header in
8574 cat >>confdefs.h <<\EOF
8575 #define HAVE_TERM_H 1
8581 case $cf_cv_term_header in
8584 cat >>confdefs.h <<\EOF
8585 #define HAVE_NCURSES_TERM_H 1
8591 cat >>confdefs.h <<\EOF
8592 #define HAVE_NCURSESW_TERM_H 1
8598 # some applications need this, but should check for NCURSES_VERSION
8600 cat >>confdefs.h <<\EOF
8604 echo "$as_me:8604: checking for ncurses version" >&5
8605 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8606 if test "${cf_cv_ncurses_version+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8610 cf_cv_ncurses_version=no
8613 if test "$cross_compiling" = yes; then
8615 # This will not work if the preprocessor splits the line after the
8616 # Autoconf token. The 'unproto' program does that.
8617 cat > conftest.$ac_ext <<EOF
8618 #include <${cf_cv_ncurses_header:-curses.h}>
8620 #ifdef NCURSES_VERSION
8621 Autoconf NCURSES_VERSION
8629 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8630 { (eval echo "$as_me:8630: \"$cf_try\"") >&5
8633 echo "$as_me:8633: \$? = $ac_status" >&5
8634 (exit $ac_status); }
8635 if test -f conftest.out ; then
8636 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8637 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8642 cat >conftest.$ac_ext <<_ACEOF
8643 #line 8643 "configure"
8644 #include "confdefs.h"
8646 #include <${cf_cv_ncurses_header:-curses.h}>
8650 FILE *fp = fopen("$cf_tempfile", "w");
8651 #ifdef NCURSES_VERSION
8652 # ifdef NCURSES_VERSION_PATCH
8653 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8655 fprintf(fp, "%s\n", NCURSES_VERSION);
8659 fprintf(fp, "old\n");
8664 ${cf_cv_main_return:-return}(0);
8667 rm -f conftest$ac_exeext
8668 if { (eval echo "$as_me:8668: \"$ac_link\"") >&5
8669 (eval $ac_link) 2>&5
8671 echo "$as_me:8671: \$? = $ac_status" >&5
8672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8673 { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8676 echo "$as_me:8676: \$? = $ac_status" >&5
8677 (exit $ac_status); }; }; then
8679 cf_cv_ncurses_version=`cat $cf_tempfile`
8681 echo "$as_me: program exited with status $ac_status" >&5
8682 echo "$as_me: failed program was:" >&5
8683 cat conftest.$ac_ext >&5
8685 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8690 echo "$as_me:8690: result: $cf_cv_ncurses_version" >&5
8691 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8692 test "$cf_cv_ncurses_version" = no ||
8693 cat >>confdefs.h <<\EOF
8697 cf_nculib_root=$cf_cv_screen
8698 # This works, except for the special case where we find gpm, but
8699 # ncurses is in a nonstandard location via $LIBS, and we really want
8702 cf_ncurses_SAVE="$LIBS"
8703 echo "$as_me:8703: checking for Gpm_Open in -lgpm" >&5
8704 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8705 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8706 echo $ECHO_N "(cached) $ECHO_C" >&6
8708 ac_check_lib_save_LIBS=$LIBS
8710 cat >conftest.$ac_ext <<_ACEOF
8711 #line 8711 "configure"
8712 #include "confdefs.h"
8714 /* Override any gcc2 internal prototype to avoid an error. */
8718 /* We use char because int might match the return type of a gcc2
8719 builtin and then its argument prototype would still apply. */
8729 rm -f conftest.$ac_objext conftest$ac_exeext
8730 if { (eval echo "$as_me:8730: \"$ac_link\"") >&5
8731 (eval $ac_link) 2>&5
8733 echo "$as_me:8733: \$? = $ac_status" >&5
8734 (exit $ac_status); } &&
8735 { ac_try='test -s conftest$ac_exeext'
8736 { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit $ac_status); }; }; then
8741 ac_cv_lib_gpm_Gpm_Open=yes
8743 echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 ac_cv_lib_gpm_Gpm_Open=no
8747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8748 LIBS=$ac_check_lib_save_LIBS
8750 echo "$as_me:8750: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8751 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8752 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8753 echo "$as_me:8753: checking for initscr in -lgpm" >&5
8754 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8755 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8756 echo $ECHO_N "(cached) $ECHO_C" >&6
8758 ac_check_lib_save_LIBS=$LIBS
8760 cat >conftest.$ac_ext <<_ACEOF
8761 #line 8761 "configure"
8762 #include "confdefs.h"
8764 /* Override any gcc2 internal prototype to avoid an error. */
8768 /* We use char because int might match the return type of a gcc2
8769 builtin and then its argument prototype would still apply. */
8779 rm -f conftest.$ac_objext conftest$ac_exeext
8780 if { (eval echo "$as_me:8780: \"$ac_link\"") >&5
8781 (eval $ac_link) 2>&5
8783 echo "$as_me:8783: \$? = $ac_status" >&5
8784 (exit $ac_status); } &&
8785 { ac_try='test -s conftest$ac_exeext'
8786 { (eval echo "$as_me:8786: \"$ac_try\"") >&5
8789 echo "$as_me:8789: \$? = $ac_status" >&5
8790 (exit $ac_status); }; }; then
8791 ac_cv_lib_gpm_initscr=yes
8793 echo "$as_me: failed program was:" >&5
8794 cat conftest.$ac_ext >&5
8795 ac_cv_lib_gpm_initscr=no
8797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8798 LIBS=$ac_check_lib_save_LIBS
8800 echo "$as_me:8800: result: $ac_cv_lib_gpm_initscr" >&5
8801 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8802 if test $ac_cv_lib_gpm_initscr = yes; then
8803 LIBS="$cf_ncurses_SAVE"
8805 cf_ncurses_LIBS="-lgpm"
8812 # This is only necessary if you are linking against an obsolete
8813 # version of ncurses (but it should do no harm, since it's static).
8814 if test "$cf_nculib_root" = ncurses ; then
8815 echo "$as_me:8815: checking for tgoto in -lmytinfo" >&5
8816 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8817 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8818 echo $ECHO_N "(cached) $ECHO_C" >&6
8820 ac_check_lib_save_LIBS=$LIBS
8821 LIBS="-lmytinfo $LIBS"
8822 cat >conftest.$ac_ext <<_ACEOF
8823 #line 8823 "configure"
8824 #include "confdefs.h"
8826 /* Override any gcc2 internal prototype to avoid an error. */
8830 /* We use char because int might match the return type of a gcc2
8831 builtin and then its argument prototype would still apply. */
8841 rm -f conftest.$ac_objext conftest$ac_exeext
8842 if { (eval echo "$as_me:8842: \"$ac_link\"") >&5
8843 (eval $ac_link) 2>&5
8845 echo "$as_me:8845: \$? = $ac_status" >&5
8846 (exit $ac_status); } &&
8847 { ac_try='test -s conftest$ac_exeext'
8848 { (eval echo "$as_me:8848: \"$ac_try\"") >&5
8851 echo "$as_me:8851: \$? = $ac_status" >&5
8852 (exit $ac_status); }; }; then
8853 ac_cv_lib_mytinfo_tgoto=yes
8855 echo "$as_me: failed program was:" >&5
8856 cat conftest.$ac_ext >&5
8857 ac_cv_lib_mytinfo_tgoto=no
8859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8860 LIBS=$ac_check_lib_save_LIBS
8862 echo "$as_me:8862: result: $ac_cv_lib_mytinfo_tgoto" >&5
8863 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8864 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8865 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8872 cf_add_libs="$cf_ncurses_LIBS"
8873 # Filter out duplicates - this happens with badly-designed ".pc" files...
8874 for cf_add_1lib in $LIBS
8876 for cf_add_2lib in $cf_add_libs
8878 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8884 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8888 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8891 cf_add_libs="-l$cf_nculib_root"
8892 # Filter out duplicates - this happens with badly-designed ".pc" files...
8893 for cf_add_1lib in $LIBS
8895 for cf_add_2lib in $cf_add_libs
8897 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8909 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8911 echo "$as_me:8911: checking for initscr" >&5
8912 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8913 if test "${ac_cv_func_initscr+set}" = set; then
8914 echo $ECHO_N "(cached) $ECHO_C" >&6
8916 cat >conftest.$ac_ext <<_ACEOF
8917 #line 8917 "configure"
8918 #include "confdefs.h"
8919 #define initscr autoconf_temporary
8920 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8927 /* We use char because int might match the return type of a gcc2
8928 builtin and then its argument prototype would still apply. */
8929 char initscr (void);
8935 /* The GNU C library defines stubs for functions which it implements
8936 to always fail with ENOSYS. Some functions are actually named
8937 something starting with __ and the normal name is an alias. */
8938 #if defined (__stub_initscr) || defined (__stub___initscr)
8939 #error found stub for initscr
8947 rm -f conftest.$ac_objext conftest$ac_exeext
8948 if { (eval echo "$as_me:8948: \"$ac_link\"") >&5
8949 (eval $ac_link) 2>&5
8951 echo "$as_me:8951: \$? = $ac_status" >&5
8952 (exit $ac_status); } &&
8953 { ac_try='test -s conftest$ac_exeext'
8954 { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8957 echo "$as_me:8957: \$? = $ac_status" >&5
8958 (exit $ac_status); }; }; then
8959 ac_cv_func_initscr=yes
8961 echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963 ac_cv_func_initscr=no
8965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8967 echo "$as_me:8967: result: $ac_cv_func_initscr" >&5
8968 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8969 if test $ac_cv_func_initscr = yes; then
8970 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8973 cf_save_LIBS="$LIBS"
8974 echo "$as_me:8974: checking for initscr in -l$cf_nculib_root" >&5
8975 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8976 LIBS="-l$cf_nculib_root $LIBS"
8977 cat >conftest.$ac_ext <<_ACEOF
8978 #line 8978 "configure"
8979 #include "confdefs.h"
8980 #include <${cf_cv_ncurses_header:-curses.h}>
8989 rm -f conftest.$ac_objext conftest$ac_exeext
8990 if { (eval echo "$as_me:8990: \"$ac_link\"") >&5
8991 (eval $ac_link) 2>&5
8993 echo "$as_me:8993: \$? = $ac_status" >&5
8994 (exit $ac_status); } &&
8995 { ac_try='test -s conftest$ac_exeext'
8996 { (eval echo "$as_me:8996: \"$ac_try\"") >&5
8999 echo "$as_me:8999: \$? = $ac_status" >&5
9000 (exit $ac_status); }; }; then
9001 echo "$as_me:9001: result: yes" >&5
9002 echo "${ECHO_T}yes" >&6
9003 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9006 echo "$as_me: failed program was:" >&5
9007 cat conftest.$ac_ext >&5
9008 echo "$as_me:9008: result: no" >&5
9009 echo "${ECHO_T}no" >&6
9012 cf_library_path_list=""
9013 if test -n "${LDFLAGS}${LIBS}" ; then
9014 for cf_library_path in $LDFLAGS $LIBS
9016 case $cf_library_path in
9018 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9020 test "x$cf_library_path" != "xNONE" && \
9021 test -d "$cf_library_path" && \
9023 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9024 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9025 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9026 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9027 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9028 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"
9031 cf_library_path_list="$cf_library_path_list $cf_search"
9039 test "x$prefix" != "xNONE" && \
9040 test -d "$prefix" && \
9042 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9043 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9044 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9045 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9046 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9047 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9050 for cf_subdir_prefix in \
9059 test "x$cf_subdir_prefix" != "x$prefix" && \
9060 test -d "$cf_subdir_prefix" && \
9061 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9062 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9063 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9064 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9065 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9066 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9067 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"
9072 cf_search="$cf_library_path_list $cf_search"
9074 for cf_libdir in $cf_search
9076 echo "$as_me:9076: checking for -l$cf_nculib_root in $cf_libdir" >&5
9077 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9078 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9079 cat >conftest.$ac_ext <<_ACEOF
9080 #line 9080 "configure"
9081 #include "confdefs.h"
9082 #include <${cf_cv_ncurses_header:-curses.h}>
9091 rm -f conftest.$ac_objext conftest$ac_exeext
9092 if { (eval echo "$as_me:9092: \"$ac_link\"") >&5
9093 (eval $ac_link) 2>&5
9095 echo "$as_me:9095: \$? = $ac_status" >&5
9096 (exit $ac_status); } &&
9097 { ac_try='test -s conftest$ac_exeext'
9098 { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9101 echo "$as_me:9101: \$? = $ac_status" >&5
9102 (exit $ac_status); }; }; then
9103 echo "$as_me:9103: result: yes" >&5
9104 echo "${ECHO_T}yes" >&6
9105 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9108 echo "$as_me: failed program was:" >&5
9109 cat conftest.$ac_ext >&5
9110 echo "$as_me:9110: result: no" >&5
9111 echo "${ECHO_T}no" >&6
9112 LIBS="$cf_save_LIBS"
9114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9122 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9124 if test $cf_found_library = no ; then
9125 { { echo "$as_me:9125: error: Cannot link $cf_nculib_root library" >&5
9126 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9127 { (exit 1); exit 1; }; }
9132 if test -n "$cf_ncurses_LIBS" ; then
9133 echo "$as_me:9133: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9134 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9135 cf_ncurses_SAVE="$LIBS"
9136 for p in $cf_ncurses_LIBS ; do
9137 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9138 if test "$q" != "$LIBS" ; then
9142 cat >conftest.$ac_ext <<_ACEOF
9143 #line 9143 "configure"
9144 #include "confdefs.h"
9145 #include <${cf_cv_ncurses_header:-curses.h}>
9149 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9154 rm -f conftest.$ac_objext conftest$ac_exeext
9155 if { (eval echo "$as_me:9155: \"$ac_link\"") >&5
9156 (eval $ac_link) 2>&5
9158 echo "$as_me:9158: \$? = $ac_status" >&5
9159 (exit $ac_status); } &&
9160 { ac_try='test -s conftest$ac_exeext'
9161 { (eval echo "$as_me:9161: \"$ac_try\"") >&5
9164 echo "$as_me:9164: \$? = $ac_status" >&5
9165 (exit $ac_status); }; }; then
9166 echo "$as_me:9166: result: yes" >&5
9167 echo "${ECHO_T}yes" >&6
9169 echo "$as_me: failed program was:" >&5
9170 cat conftest.$ac_ext >&5
9171 echo "$as_me:9171: result: no" >&5
9172 echo "${ECHO_T}no" >&6
9173 LIBS="$cf_ncurses_SAVE"
9175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9178 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9180 cat >>confdefs.h <<EOF
9181 #define $cf_nculib_ROOT 1
9192 cf_ncuconfig_root=$cf_cv_screen
9193 cf_have_ncuconfig=no
9195 if test "x${PKG_CONFIG:=none}" != xnone; then
9196 echo "$as_me:9196: checking pkg-config for $cf_ncuconfig_root" >&5
9197 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9198 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9199 echo "$as_me:9199: result: yes" >&5
9200 echo "${ECHO_T}yes" >&6
9202 echo "$as_me:9202: checking if the $cf_ncuconfig_root package files work" >&5
9203 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9204 cf_have_ncuconfig=unknown
9206 cf_save_CPPFLAGS="$CPPFLAGS"
9207 cf_save_LIBS="$LIBS"
9212 cf_new_extra_cppflags=
9214 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9216 case $cf_fix_cppflags in
9218 case $cf_add_cflags in
9219 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9220 case $cf_add_cflags in
9222 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9224 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9225 && test -z "${cf_tst_cflags}" \
9226 && cf_fix_cppflags=yes
9228 if test $cf_fix_cppflags = yes ; then
9230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9234 elif test "${cf_tst_cflags}" = "\"'" ; then
9236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9247 case $cf_add_cflags in
9249 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9251 CPPFLAGS=`echo "$CPPFLAGS" | \
9252 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9253 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9258 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9259 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9266 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9267 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9277 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9280 && test -z "${cf_tst_cflags}" \
9281 && cf_fix_cppflags=no
9286 if test -n "$cf_new_cflags" ; then
9288 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9289 CFLAGS="${CFLAGS}$cf_new_cflags"
9293 if test -n "$cf_new_cppflags" ; then
9295 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9296 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9300 if test -n "$cf_new_extra_cppflags" ; then
9302 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9303 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9307 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9308 # Filter out duplicates - this happens with badly-designed ".pc" files...
9309 for cf_add_1lib in $LIBS
9311 for cf_add_2lib in $cf_add_libs
9313 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9319 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9323 cat >conftest.$ac_ext <<_ACEOF
9324 #line 9324 "configure"
9325 #include "confdefs.h"
9326 #include <${cf_cv_ncurses_header:-curses.h}>
9330 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9335 rm -f conftest.$ac_objext conftest$ac_exeext
9336 if { (eval echo "$as_me:9336: \"$ac_link\"") >&5
9337 (eval $ac_link) 2>&5
9339 echo "$as_me:9339: \$? = $ac_status" >&5
9340 (exit $ac_status); } &&
9341 { ac_try='test -s conftest$ac_exeext'
9342 { (eval echo "$as_me:9342: \"$ac_try\"") >&5
9345 echo "$as_me:9345: \$? = $ac_status" >&5
9346 (exit $ac_status); }; }; then
9347 if test "$cross_compiling" = yes; then
9348 cf_have_ncuconfig=maybe
9350 cat >conftest.$ac_ext <<_ACEOF
9351 #line 9351 "configure"
9352 #include "confdefs.h"
9353 #include <${cf_cv_ncurses_header:-curses.h}>
9355 { char *xx = curses_version(); return (xx == 0); }
9357 rm -f conftest$ac_exeext
9358 if { (eval echo "$as_me:9358: \"$ac_link\"") >&5
9359 (eval $ac_link) 2>&5
9361 echo "$as_me:9361: \$? = $ac_status" >&5
9362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9363 { (eval echo "$as_me:9363: \"$ac_try\"") >&5
9366 echo "$as_me:9366: \$? = $ac_status" >&5
9367 (exit $ac_status); }; }; then
9368 cf_have_ncuconfig=yes
9370 echo "$as_me: program exited with status $ac_status" >&5
9371 echo "$as_me: failed program was:" >&5
9372 cat conftest.$ac_ext >&5
9373 cf_have_ncuconfig=no
9375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9378 echo "$as_me: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 cf_have_ncuconfig=no
9382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9383 echo "$as_me:9383: result: $cf_have_ncuconfig" >&5
9384 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9385 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9386 if test "$cf_have_ncuconfig" != "yes"
9388 CPPFLAGS="$cf_save_CPPFLAGS"
9389 LIBS="$cf_save_LIBS"
9390 NCURSES_CONFIG_PKG=none
9393 cat >>confdefs.h <<\EOF
9397 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9399 echo "$as_me:9399: checking for terminfo header" >&5
9400 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9401 if test "${cf_cv_term_header+set}" = set; then
9402 echo $ECHO_N "(cached) $ECHO_C" >&6
9405 case ${cf_cv_ncurses_header} in
9406 (*/ncurses.h|*/ncursesw.h)
9407 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9410 cf_term_header=term.h
9414 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9416 cat >conftest.$ac_ext <<_ACEOF
9417 #line 9417 "configure"
9418 #include "confdefs.h"
9420 #include <${cf_cv_ncurses_header:-curses.h}>
9426 int x = auto_left_margin
9431 rm -f conftest.$ac_objext
9432 if { (eval echo "$as_me:9432: \"$ac_compile\"") >&5
9433 (eval $ac_compile) 2>&5
9435 echo "$as_me:9435: \$? = $ac_status" >&5
9436 (exit $ac_status); } &&
9437 { ac_try='test -s conftest.$ac_objext'
9438 { (eval echo "$as_me:9438: \"$ac_try\"") >&5
9441 echo "$as_me:9441: \$? = $ac_status" >&5
9442 (exit $ac_status); }; }; then
9444 cf_cv_term_header="$cf_test"
9446 echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9449 cf_cv_term_header=unknown
9452 rm -f conftest.$ac_objext conftest.$ac_ext
9453 test "$cf_cv_term_header" != unknown && break
9457 echo "$as_me:9457: result: $cf_cv_term_header" >&5
9458 echo "${ECHO_T}$cf_cv_term_header" >&6
9460 # Set definitions to allow ifdef'ing to accommodate subdirectories
9462 case $cf_cv_term_header in
9465 cat >>confdefs.h <<\EOF
9466 #define HAVE_TERM_H 1
9472 case $cf_cv_term_header in
9475 cat >>confdefs.h <<\EOF
9476 #define HAVE_NCURSES_TERM_H 1
9482 cat >>confdefs.h <<\EOF
9483 #define HAVE_NCURSESW_TERM_H 1
9492 echo "$as_me:9492: result: no" >&5
9493 echo "${ECHO_T}no" >&6
9494 NCURSES_CONFIG_PKG=none
9497 NCURSES_CONFIG_PKG=none
9500 if test "x$cf_have_ncuconfig" = "xno"; then
9501 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9503 if test -n "$ac_tool_prefix"; then
9504 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9506 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9508 echo "$as_me:9508: checking for $ac_word" >&5
9509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9510 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9513 if test -n "$NCURSES_CONFIG"; then
9514 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9516 ac_save_IFS=$IFS; IFS=$ac_path_separator
9518 for ac_dir in $ac_dummy; do
9520 test -z "$ac_dir" && ac_dir=.
9521 $as_executable_p "$ac_dir/$ac_word" || continue
9522 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9523 echo "$as_me:9523: found $ac_dir/$ac_word" >&5
9529 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9530 if test -n "$NCURSES_CONFIG"; then
9531 echo "$as_me:9531: result: $NCURSES_CONFIG" >&5
9532 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9534 echo "$as_me:9534: result: no" >&5
9535 echo "${ECHO_T}no" >&6
9538 test -n "$NCURSES_CONFIG" && break
9541 if test -z "$NCURSES_CONFIG"; then
9542 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9543 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9545 # Extract the first word of "$ac_prog", so it can be a program name with args.
9546 set dummy $ac_prog; ac_word=$2
9547 echo "$as_me:9547: checking for $ac_word" >&5
9548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9549 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9552 if test -n "$ac_ct_NCURSES_CONFIG"; then
9553 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9555 ac_save_IFS=$IFS; IFS=$ac_path_separator
9557 for ac_dir in $ac_dummy; do
9559 test -z "$ac_dir" && ac_dir=.
9560 $as_executable_p "$ac_dir/$ac_word" || continue
9561 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9562 echo "$as_me:9562: found $ac_dir/$ac_word" >&5
9568 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9569 if test -n "$ac_ct_NCURSES_CONFIG"; then
9570 echo "$as_me:9570: result: $ac_ct_NCURSES_CONFIG" >&5
9571 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9573 echo "$as_me:9573: result: no" >&5
9574 echo "${ECHO_T}no" >&6
9577 test -n "$ac_ct_NCURSES_CONFIG" && break
9579 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9581 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9584 if test "$NCURSES_CONFIG" != none ; then
9589 cf_new_extra_cppflags=
9591 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9593 case $cf_fix_cppflags in
9595 case $cf_add_cflags in
9596 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9597 case $cf_add_cflags in
9599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9602 && test -z "${cf_tst_cflags}" \
9603 && cf_fix_cppflags=yes
9605 if test $cf_fix_cppflags = yes ; then
9607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9611 elif test "${cf_tst_cflags}" = "\"'" ; 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"
9624 case $cf_add_cflags in
9626 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9628 CPPFLAGS=`echo "$CPPFLAGS" | \
9629 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9630 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9635 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9636 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9643 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9644 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9654 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9656 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9657 && test -z "${cf_tst_cflags}" \
9658 && cf_fix_cppflags=no
9663 if test -n "$cf_new_cflags" ; then
9665 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9666 CFLAGS="${CFLAGS}$cf_new_cflags"
9670 if test -n "$cf_new_cppflags" ; then
9672 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9673 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9677 if test -n "$cf_new_extra_cppflags" ; then
9679 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9680 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9684 cf_add_libs="`$NCURSES_CONFIG --libs`"
9685 # Filter out duplicates - this happens with badly-designed ".pc" files...
9686 for cf_add_1lib in $LIBS
9688 for cf_add_2lib in $cf_add_libs
9690 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9696 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9700 # even with config script, some packages use no-override for curses.h
9702 echo "$as_me:9702: checking if we have identified curses headers" >&5
9703 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9704 if test "${cf_cv_ncurses_header+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9708 cf_cv_ncurses_header=none
9710 ncurses.h $cf_cv_screen/ncurses.h \
9711 curses.h $cf_cv_screen/curses.h
9713 cat >conftest.$ac_ext <<_ACEOF
9714 #line 9714 "configure"
9715 #include "confdefs.h"
9716 #include <${cf_header}>
9720 initscr(); tgoto("?", 0,0)
9725 rm -f conftest.$ac_objext
9726 if { (eval echo "$as_me:9726: \"$ac_compile\"") >&5
9727 (eval $ac_compile) 2>&5
9729 echo "$as_me:9729: \$? = $ac_status" >&5
9730 (exit $ac_status); } &&
9731 { ac_try='test -s conftest.$ac_objext'
9732 { (eval echo "$as_me:9732: \"$ac_try\"") >&5
9735 echo "$as_me:9735: \$? = $ac_status" >&5
9736 (exit $ac_status); }; }; then
9737 cf_cv_ncurses_header=$cf_header; break
9739 echo "$as_me: failed program was:" >&5
9740 cat conftest.$ac_ext >&5
9742 rm -f conftest.$ac_objext conftest.$ac_ext
9746 echo "$as_me:9746: result: $cf_cv_ncurses_header" >&5
9747 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9749 if test "$cf_cv_ncurses_header" = none ; then
9750 { { echo "$as_me:9750: error: No curses header-files found" >&5
9751 echo "$as_me: error: No curses header-files found" >&2;}
9752 { (exit 1); exit 1; }; }
9755 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9757 for ac_header in $cf_cv_ncurses_header
9759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9760 echo "$as_me:9760: checking for $ac_header" >&5
9761 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9762 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9763 echo $ECHO_N "(cached) $ECHO_C" >&6
9765 cat >conftest.$ac_ext <<_ACEOF
9766 #line 9766 "configure"
9767 #include "confdefs.h"
9768 #include <$ac_header>
9770 if { (eval echo "$as_me:9770: \"$ac_cpp conftest.$ac_ext\"") >&5
9771 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9773 egrep -v '^ *\+' conftest.er1 >conftest.err
9775 cat conftest.err >&5
9776 echo "$as_me:9776: \$? = $ac_status" >&5
9777 (exit $ac_status); } >/dev/null; then
9778 if test -s conftest.err; then
9779 ac_cpp_err=$ac_c_preproc_warn_flag
9786 if test -z "$ac_cpp_err"; then
9787 eval "$as_ac_Header=yes"
9789 echo "$as_me: failed program was:" >&5
9790 cat conftest.$ac_ext >&5
9791 eval "$as_ac_Header=no"
9793 rm -f conftest.err conftest.$ac_ext
9795 echo "$as_me:9795: result: `eval echo '${'$as_ac_Header'}'`" >&5
9796 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9797 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9798 cat >>confdefs.h <<EOF
9799 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9805 cat >>confdefs.h <<\EOF
9809 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9811 cat >>confdefs.h <<EOF
9812 #define $cf_nculib_ROOT 1
9815 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9819 cf_ncuhdr_root=$cf_cv_screen
9821 test -n "$cf_cv_curses_dir" && \
9822 test "$cf_cv_curses_dir" != "no" && { \
9824 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9825 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9827 while test $cf_add_incdir != /usr/include
9829 if test -d $cf_add_incdir
9832 if test -n "$CFLAGS$CPPFLAGS" ; then
9833 # a loop is needed to ensure we can add subdirs of existing dirs
9834 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9835 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9836 cf_have_incdir=yes; break
9841 if test "$cf_have_incdir" = no ; then
9842 if test "$cf_add_incdir" = /usr/local/include ; then
9843 if test "$GCC" = yes
9845 cf_save_CPPFLAGS=$CPPFLAGS
9847 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9848 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9850 cat >conftest.$ac_ext <<_ACEOF
9851 #line 9851 "configure"
9852 #include "confdefs.h"
9862 rm -f conftest.$ac_objext
9863 if { (eval echo "$as_me:9863: \"$ac_compile\"") >&5
9864 (eval $ac_compile) 2>&5
9866 echo "$as_me:9866: \$? = $ac_status" >&5
9867 (exit $ac_status); } &&
9868 { ac_try='test -s conftest.$ac_objext'
9869 { (eval echo "$as_me:9869: \"$ac_try\"") >&5
9872 echo "$as_me:9872: \$? = $ac_status" >&5
9873 (exit $ac_status); }; }; then
9876 echo "$as_me: failed program was:" >&5
9877 cat conftest.$ac_ext >&5
9880 rm -f conftest.$ac_objext conftest.$ac_ext
9881 CPPFLAGS=$cf_save_CPPFLAGS
9886 if test "$cf_have_incdir" = no ; then
9887 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9889 echo "${as_me:-configure}:9889: testing adding $cf_add_incdir to include-path ..." 1>&5
9891 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9893 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9894 test "$cf_top_incdir" = "$cf_add_incdir" && break
9895 cf_add_incdir="$cf_top_incdir"
9908 echo "$as_me:9908: checking for $cf_ncuhdr_root header in include-path" >&5
9909 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9910 if test "${cf_cv_ncurses_h+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
9914 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9915 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9916 for cf_header in $cf_header_list
9919 cat >conftest.$ac_ext <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9923 #include <$cf_header>
9928 #ifdef NCURSES_VERSION
9930 printf("%s\n", NCURSES_VERSION);
9943 rm -f conftest.$ac_objext
9944 if { (eval echo "$as_me:9944: \"$ac_compile\"") >&5
9945 (eval $ac_compile) 2>&5
9947 echo "$as_me:9947: \$? = $ac_status" >&5
9948 (exit $ac_status); } &&
9949 { ac_try='test -s conftest.$ac_objext'
9950 { (eval echo "$as_me:9950: \"$ac_try\"") >&5
9953 echo "$as_me:9953: \$? = $ac_status" >&5
9954 (exit $ac_status); }; }; then
9955 cf_cv_ncurses_h=$cf_header
9958 echo "$as_me: failed program was:" >&5
9959 cat conftest.$ac_ext >&5
9962 rm -f conftest.$ac_objext conftest.$ac_ext
9964 test "$cf_cv_ncurses_h" != no && break
9968 echo "$as_me:9968: result: $cf_cv_ncurses_h" >&5
9969 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9971 if test "$cf_cv_ncurses_h" != no ; then
9972 cf_cv_ncurses_header=$cf_cv_ncurses_h
9975 echo "$as_me:9975: checking for $cf_ncuhdr_root include-path" >&5
9976 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9977 if test "${cf_cv_ncurses_h2+set}" = set; then
9978 echo $ECHO_N "(cached) $ECHO_C" >&6
9981 test -n "$verbose" && echo
9985 # collect the current set of include-directories from compiler flags
9986 cf_header_path_list=""
9987 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9988 for cf_header_path in $CPPFLAGS $CFLAGS
9990 case $cf_header_path in
9992 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9994 test "x$cf_header_path" != "xNONE" && \
9995 test -d "$cf_header_path" && \
9997 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9998 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9999 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10000 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10001 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10002 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"
10005 cf_header_path_list="$cf_header_path_list $cf_search"
10011 # add the variations for the package we are looking for
10015 test "x$prefix" != "xNONE" && \
10016 test -d "$prefix" && \
10018 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10019 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10020 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10021 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10022 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10023 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10026 for cf_subdir_prefix in \
10035 test "x$cf_subdir_prefix" != "x$prefix" && \
10036 test -d "$cf_subdir_prefix" && \
10037 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10038 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10039 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10040 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10041 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10042 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10043 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"
10048 test "$includedir" != NONE && \
10049 test "$includedir" != "/usr/include" && \
10050 test -d "$includedir" && {
10051 test -d $includedir && cf_search="$cf_search $includedir"
10052 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10055 test "$oldincludedir" != NONE && \
10056 test "$oldincludedir" != "/usr/include" && \
10057 test -d "$oldincludedir" && {
10058 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10059 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10062 cf_search="$cf_search $cf_header_path_list"
10064 test -n "$verbose" && echo search path $cf_search
10065 cf_save2_CPPFLAGS="$CPPFLAGS"
10066 for cf_incdir in $cf_search
10069 if test -n "$cf_incdir" ; then
10070 for cf_add_incdir in $cf_incdir
10072 while test $cf_add_incdir != /usr/include
10074 if test -d $cf_add_incdir
10077 if test -n "$CFLAGS$CPPFLAGS" ; then
10078 # a loop is needed to ensure we can add subdirs of existing dirs
10079 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10080 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10081 cf_have_incdir=yes; break
10086 if test "$cf_have_incdir" = no ; then
10087 if test "$cf_add_incdir" = /usr/local/include ; then
10088 if test "$GCC" = yes
10090 cf_save_CPPFLAGS=$CPPFLAGS
10092 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10093 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10095 cat >conftest.$ac_ext <<_ACEOF
10096 #line 10096 "configure"
10097 #include "confdefs.h"
10107 rm -f conftest.$ac_objext
10108 if { (eval echo "$as_me:10108: \"$ac_compile\"") >&5
10109 (eval $ac_compile) 2>&5
10111 echo "$as_me:10111: \$? = $ac_status" >&5
10112 (exit $ac_status); } &&
10113 { ac_try='test -s conftest.$ac_objext'
10114 { (eval echo "$as_me:10114: \"$ac_try\"") >&5
10115 (eval $ac_try) 2>&5
10117 echo "$as_me:10117: \$? = $ac_status" >&5
10118 (exit $ac_status); }; }; then
10121 echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10125 rm -f conftest.$ac_objext conftest.$ac_ext
10126 CPPFLAGS=$cf_save_CPPFLAGS
10131 if test "$cf_have_incdir" = no ; then
10132 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10134 echo "${as_me:-configure}:10134: testing adding $cf_add_incdir to include-path ..." 1>&5
10136 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10138 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10139 test "$cf_top_incdir" = "$cf_add_incdir" && break
10140 cf_add_incdir="$cf_top_incdir"
10156 cat >conftest.$ac_ext <<_ACEOF
10157 #line 10157 "configure"
10158 #include "confdefs.h"
10160 #include <$cf_header>
10165 #ifdef NCURSES_VERSION
10167 printf("%s\n", NCURSES_VERSION);
10180 rm -f conftest.$ac_objext
10181 if { (eval echo "$as_me:10181: \"$ac_compile\"") >&5
10182 (eval $ac_compile) 2>&5
10184 echo "$as_me:10184: \$? = $ac_status" >&5
10185 (exit $ac_status); } &&
10186 { ac_try='test -s conftest.$ac_objext'
10187 { (eval echo "$as_me:10187: \"$ac_try\"") >&5
10188 (eval $ac_try) 2>&5
10190 echo "$as_me:10190: \$? = $ac_status" >&5
10191 (exit $ac_status); }; }; then
10192 cf_cv_ncurses_h2=$cf_header
10195 echo "$as_me: failed program was:" >&5
10196 cat conftest.$ac_ext >&5
10197 cf_cv_ncurses_h2=no
10199 rm -f conftest.$ac_objext conftest.$ac_ext
10201 if test "$cf_cv_ncurses_h2" != no ; then
10202 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10203 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10206 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10208 CPPFLAGS="$cf_save2_CPPFLAGS"
10209 test "$cf_cv_ncurses_h2" != no && break
10211 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10211: error: not found" >&5
10212 echo "$as_me: error: not found" >&2;}
10213 { (exit 1); exit 1; }; }
10216 echo "$as_me:10216: result: $cf_cv_ncurses_h2" >&5
10217 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10219 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10220 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10221 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10222 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10225 if test -n "$cf_1st_incdir" ; then
10226 for cf_add_incdir in $cf_1st_incdir
10228 while test $cf_add_incdir != /usr/include
10230 if test -d $cf_add_incdir
10233 if test -n "$CFLAGS$CPPFLAGS" ; then
10234 # a loop is needed to ensure we can add subdirs of existing dirs
10235 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10236 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10237 cf_have_incdir=yes; break
10242 if test "$cf_have_incdir" = no ; then
10243 if test "$cf_add_incdir" = /usr/local/include ; then
10244 if test "$GCC" = yes
10246 cf_save_CPPFLAGS=$CPPFLAGS
10248 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10249 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10251 cat >conftest.$ac_ext <<_ACEOF
10252 #line 10252 "configure"
10253 #include "confdefs.h"
10263 rm -f conftest.$ac_objext
10264 if { (eval echo "$as_me:10264: \"$ac_compile\"") >&5
10265 (eval $ac_compile) 2>&5
10267 echo "$as_me:10267: \$? = $ac_status" >&5
10268 (exit $ac_status); } &&
10269 { ac_try='test -s conftest.$ac_objext'
10270 { (eval echo "$as_me:10270: \"$ac_try\"") >&5
10271 (eval $ac_try) 2>&5
10273 echo "$as_me:10273: \$? = $ac_status" >&5
10274 (exit $ac_status); }; }; then
10277 echo "$as_me: failed program was:" >&5
10278 cat conftest.$ac_ext >&5
10281 rm -f conftest.$ac_objext conftest.$ac_ext
10282 CPPFLAGS=$cf_save_CPPFLAGS
10287 if test "$cf_have_incdir" = no ; then
10288 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10290 echo "${as_me:-configure}:10290: testing adding $cf_add_incdir to include-path ..." 1>&5
10292 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10294 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10295 test "$cf_top_incdir" = "$cf_add_incdir" && break
10296 cf_add_incdir="$cf_top_incdir"
10309 # Set definitions to allow ifdef'ing for ncurses.h
10311 case $cf_cv_ncurses_header in
10314 cat >>confdefs.h <<\EOF
10315 #define HAVE_NCURSES_H 1
10321 case $cf_cv_ncurses_header in
10322 (ncurses/curses.h|ncurses/ncurses.h)
10324 cat >>confdefs.h <<\EOF
10325 #define HAVE_NCURSES_NCURSES_H 1
10329 (ncursesw/curses.h|ncursesw/ncurses.h)
10331 cat >>confdefs.h <<\EOF
10332 #define HAVE_NCURSESW_NCURSES_H 1
10338 echo "$as_me:10338: checking for terminfo header" >&5
10339 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10340 if test "${cf_cv_term_header+set}" = set; then
10341 echo $ECHO_N "(cached) $ECHO_C" >&6
10344 case ${cf_cv_ncurses_header} in
10345 (*/ncurses.h|*/ncursesw.h)
10346 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10349 cf_term_header=term.h
10353 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10355 cat >conftest.$ac_ext <<_ACEOF
10356 #line 10356 "configure"
10357 #include "confdefs.h"
10359 #include <${cf_cv_ncurses_header:-curses.h}>
10360 #include <$cf_test>
10365 int x = auto_left_margin
10370 rm -f conftest.$ac_objext
10371 if { (eval echo "$as_me:10371: \"$ac_compile\"") >&5
10372 (eval $ac_compile) 2>&5
10374 echo "$as_me:10374: \$? = $ac_status" >&5
10375 (exit $ac_status); } &&
10376 { ac_try='test -s conftest.$ac_objext'
10377 { (eval echo "$as_me:10377: \"$ac_try\"") >&5
10378 (eval $ac_try) 2>&5
10380 echo "$as_me:10380: \$? = $ac_status" >&5
10381 (exit $ac_status); }; }; then
10383 cf_cv_term_header="$cf_test"
10385 echo "$as_me: failed program was:" >&5
10386 cat conftest.$ac_ext >&5
10388 cf_cv_term_header=unknown
10391 rm -f conftest.$ac_objext conftest.$ac_ext
10392 test "$cf_cv_term_header" != unknown && break
10396 echo "$as_me:10396: result: $cf_cv_term_header" >&5
10397 echo "${ECHO_T}$cf_cv_term_header" >&6
10399 # Set definitions to allow ifdef'ing to accommodate subdirectories
10401 case $cf_cv_term_header in
10404 cat >>confdefs.h <<\EOF
10405 #define HAVE_TERM_H 1
10411 case $cf_cv_term_header in
10414 cat >>confdefs.h <<\EOF
10415 #define HAVE_NCURSES_TERM_H 1
10421 cat >>confdefs.h <<\EOF
10422 #define HAVE_NCURSESW_TERM_H 1
10428 # some applications need this, but should check for NCURSES_VERSION
10430 cat >>confdefs.h <<\EOF
10434 echo "$as_me:10434: checking for ncurses version" >&5
10435 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10436 if test "${cf_cv_ncurses_version+set}" = set; then
10437 echo $ECHO_N "(cached) $ECHO_C" >&6
10440 cf_cv_ncurses_version=no
10443 if test "$cross_compiling" = yes; then
10445 # This will not work if the preprocessor splits the line after the
10446 # Autoconf token. The 'unproto' program does that.
10447 cat > conftest.$ac_ext <<EOF
10448 #include <${cf_cv_ncurses_header:-curses.h}>
10450 #ifdef NCURSES_VERSION
10451 Autoconf NCURSES_VERSION
10459 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10460 { (eval echo "$as_me:10460: \"$cf_try\"") >&5
10461 (eval $cf_try) 2>&5
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit $ac_status); }
10465 if test -f conftest.out ; then
10466 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10467 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10472 cat >conftest.$ac_ext <<_ACEOF
10473 #line 10473 "configure"
10474 #include "confdefs.h"
10476 #include <${cf_cv_ncurses_header:-curses.h}>
10480 FILE *fp = fopen("$cf_tempfile", "w");
10481 #ifdef NCURSES_VERSION
10482 # ifdef NCURSES_VERSION_PATCH
10483 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10485 fprintf(fp, "%s\n", NCURSES_VERSION);
10488 # ifdef __NCURSES_H
10489 fprintf(fp, "old\n");
10494 ${cf_cv_main_return:-return}(0);
10497 rm -f conftest$ac_exeext
10498 if { (eval echo "$as_me:10498: \"$ac_link\"") >&5
10499 (eval $ac_link) 2>&5
10501 echo "$as_me:10501: \$? = $ac_status" >&5
10502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10503 { (eval echo "$as_me:10503: \"$ac_try\"") >&5
10504 (eval $ac_try) 2>&5
10506 echo "$as_me:10506: \$? = $ac_status" >&5
10507 (exit $ac_status); }; }; then
10509 cf_cv_ncurses_version=`cat $cf_tempfile`
10511 echo "$as_me: program exited with status $ac_status" >&5
10512 echo "$as_me: failed program was:" >&5
10513 cat conftest.$ac_ext >&5
10515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10520 echo "$as_me:10520: result: $cf_cv_ncurses_version" >&5
10521 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10522 test "$cf_cv_ncurses_version" = no ||
10523 cat >>confdefs.h <<\EOF
10527 cf_nculib_root=$cf_cv_screen
10528 # This works, except for the special case where we find gpm, but
10529 # ncurses is in a nonstandard location via $LIBS, and we really want
10532 cf_ncurses_SAVE="$LIBS"
10533 echo "$as_me:10533: checking for Gpm_Open in -lgpm" >&5
10534 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10535 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10536 echo $ECHO_N "(cached) $ECHO_C" >&6
10538 ac_check_lib_save_LIBS=$LIBS
10540 cat >conftest.$ac_ext <<_ACEOF
10541 #line 10541 "configure"
10542 #include "confdefs.h"
10544 /* Override any gcc2 internal prototype to avoid an error. */
10548 /* We use char because int might match the return type of a gcc2
10549 builtin and then its argument prototype would still apply. */
10559 rm -f conftest.$ac_objext conftest$ac_exeext
10560 if { (eval echo "$as_me:10560: \"$ac_link\"") >&5
10561 (eval $ac_link) 2>&5
10563 echo "$as_me:10563: \$? = $ac_status" >&5
10564 (exit $ac_status); } &&
10565 { ac_try='test -s conftest$ac_exeext'
10566 { (eval echo "$as_me:10566: \"$ac_try\"") >&5
10567 (eval $ac_try) 2>&5
10569 echo "$as_me:10569: \$? = $ac_status" >&5
10570 (exit $ac_status); }; }; then
10571 ac_cv_lib_gpm_Gpm_Open=yes
10573 echo "$as_me: failed program was:" >&5
10574 cat conftest.$ac_ext >&5
10575 ac_cv_lib_gpm_Gpm_Open=no
10577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10578 LIBS=$ac_check_lib_save_LIBS
10580 echo "$as_me:10580: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10581 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10582 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10583 echo "$as_me:10583: checking for initscr in -lgpm" >&5
10584 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10585 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10586 echo $ECHO_N "(cached) $ECHO_C" >&6
10588 ac_check_lib_save_LIBS=$LIBS
10590 cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10594 /* Override any gcc2 internal prototype to avoid an error. */
10598 /* We use char because int might match the return type of a gcc2
10599 builtin and then its argument prototype would still apply. */
10609 rm -f conftest.$ac_objext conftest$ac_exeext
10610 if { (eval echo "$as_me:10610: \"$ac_link\"") >&5
10611 (eval $ac_link) 2>&5
10613 echo "$as_me:10613: \$? = $ac_status" >&5
10614 (exit $ac_status); } &&
10615 { ac_try='test -s conftest$ac_exeext'
10616 { (eval echo "$as_me:10616: \"$ac_try\"") >&5
10617 (eval $ac_try) 2>&5
10619 echo "$as_me:10619: \$? = $ac_status" >&5
10620 (exit $ac_status); }; }; then
10621 ac_cv_lib_gpm_initscr=yes
10623 echo "$as_me: failed program was:" >&5
10624 cat conftest.$ac_ext >&5
10625 ac_cv_lib_gpm_initscr=no
10627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10628 LIBS=$ac_check_lib_save_LIBS
10630 echo "$as_me:10630: result: $ac_cv_lib_gpm_initscr" >&5
10631 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10632 if test $ac_cv_lib_gpm_initscr = yes; then
10633 LIBS="$cf_ncurses_SAVE"
10635 cf_ncurses_LIBS="-lgpm"
10642 # This is only necessary if you are linking against an obsolete
10643 # version of ncurses (but it should do no harm, since it's static).
10644 if test "$cf_nculib_root" = ncurses ; then
10645 echo "$as_me:10645: checking for tgoto in -lmytinfo" >&5
10646 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10647 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10648 echo $ECHO_N "(cached) $ECHO_C" >&6
10650 ac_check_lib_save_LIBS=$LIBS
10651 LIBS="-lmytinfo $LIBS"
10652 cat >conftest.$ac_ext <<_ACEOF
10653 #line 10653 "configure"
10654 #include "confdefs.h"
10656 /* Override any gcc2 internal prototype to avoid an error. */
10660 /* We use char because int might match the return type of a gcc2
10661 builtin and then its argument prototype would still apply. */
10671 rm -f conftest.$ac_objext conftest$ac_exeext
10672 if { (eval echo "$as_me:10672: \"$ac_link\"") >&5
10673 (eval $ac_link) 2>&5
10675 echo "$as_me:10675: \$? = $ac_status" >&5
10676 (exit $ac_status); } &&
10677 { ac_try='test -s conftest$ac_exeext'
10678 { (eval echo "$as_me:10678: \"$ac_try\"") >&5
10679 (eval $ac_try) 2>&5
10681 echo "$as_me:10681: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 ac_cv_lib_mytinfo_tgoto=yes
10685 echo "$as_me: failed program was:" >&5
10686 cat conftest.$ac_ext >&5
10687 ac_cv_lib_mytinfo_tgoto=no
10689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10690 LIBS=$ac_check_lib_save_LIBS
10692 echo "$as_me:10692: result: $ac_cv_lib_mytinfo_tgoto" >&5
10693 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10694 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10695 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10702 cf_add_libs="$cf_ncurses_LIBS"
10703 # Filter out duplicates - this happens with badly-designed ".pc" files...
10704 for cf_add_1lib in $LIBS
10706 for cf_add_2lib in $cf_add_libs
10708 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10714 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10716 LIBS="$cf_add_libs"
10718 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10721 cf_add_libs="-l$cf_nculib_root"
10722 # Filter out duplicates - this happens with badly-designed ".pc" files...
10723 for cf_add_1lib in $LIBS
10725 for cf_add_2lib in $cf_add_libs
10727 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10733 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10735 LIBS="$cf_add_libs"
10739 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10741 echo "$as_me:10741: checking for initscr" >&5
10742 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10743 if test "${ac_cv_func_initscr+set}" = set; then
10744 echo $ECHO_N "(cached) $ECHO_C" >&6
10746 cat >conftest.$ac_ext <<_ACEOF
10747 #line 10747 "configure"
10748 #include "confdefs.h"
10749 #define initscr autoconf_temporary
10750 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10757 /* We use char because int might match the return type of a gcc2
10758 builtin and then its argument prototype would still apply. */
10759 char initscr (void);
10765 /* The GNU C library defines stubs for functions which it implements
10766 to always fail with ENOSYS. Some functions are actually named
10767 something starting with __ and the normal name is an alias. */
10768 #if defined (__stub_initscr) || defined (__stub___initscr)
10769 #error found stub for initscr
10777 rm -f conftest.$ac_objext conftest$ac_exeext
10778 if { (eval echo "$as_me:10778: \"$ac_link\"") >&5
10779 (eval $ac_link) 2>&5
10781 echo "$as_me:10781: \$? = $ac_status" >&5
10782 (exit $ac_status); } &&
10783 { ac_try='test -s conftest$ac_exeext'
10784 { (eval echo "$as_me:10784: \"$ac_try\"") >&5
10785 (eval $ac_try) 2>&5
10787 echo "$as_me:10787: \$? = $ac_status" >&5
10788 (exit $ac_status); }; }; then
10789 ac_cv_func_initscr=yes
10791 echo "$as_me: failed program was:" >&5
10792 cat conftest.$ac_ext >&5
10793 ac_cv_func_initscr=no
10795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10797 echo "$as_me:10797: result: $ac_cv_func_initscr" >&5
10798 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10799 if test $ac_cv_func_initscr = yes; then
10800 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10803 cf_save_LIBS="$LIBS"
10804 echo "$as_me:10804: checking for initscr in -l$cf_nculib_root" >&5
10805 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10806 LIBS="-l$cf_nculib_root $LIBS"
10807 cat >conftest.$ac_ext <<_ACEOF
10808 #line 10808 "configure"
10809 #include "confdefs.h"
10810 #include <${cf_cv_ncurses_header:-curses.h}>
10819 rm -f conftest.$ac_objext conftest$ac_exeext
10820 if { (eval echo "$as_me:10820: \"$ac_link\"") >&5
10821 (eval $ac_link) 2>&5
10823 echo "$as_me:10823: \$? = $ac_status" >&5
10824 (exit $ac_status); } &&
10825 { ac_try='test -s conftest$ac_exeext'
10826 { (eval echo "$as_me:10826: \"$ac_try\"") >&5
10827 (eval $ac_try) 2>&5
10829 echo "$as_me:10829: \$? = $ac_status" >&5
10830 (exit $ac_status); }; }; then
10831 echo "$as_me:10831: result: yes" >&5
10832 echo "${ECHO_T}yes" >&6
10833 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10836 echo "$as_me: failed program was:" >&5
10837 cat conftest.$ac_ext >&5
10838 echo "$as_me:10838: result: no" >&5
10839 echo "${ECHO_T}no" >&6
10842 cf_library_path_list=""
10843 if test -n "${LDFLAGS}${LIBS}" ; then
10844 for cf_library_path in $LDFLAGS $LIBS
10846 case $cf_library_path in
10848 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10850 test "x$cf_library_path" != "xNONE" && \
10851 test -d "$cf_library_path" && \
10853 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10854 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10855 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10856 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10857 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10858 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"
10861 cf_library_path_list="$cf_library_path_list $cf_search"
10869 test "x$prefix" != "xNONE" && \
10870 test -d "$prefix" && \
10872 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10873 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10874 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10875 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10876 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10877 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10880 for cf_subdir_prefix in \
10889 test "x$cf_subdir_prefix" != "x$prefix" && \
10890 test -d "$cf_subdir_prefix" && \
10891 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10892 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10893 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10894 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10895 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10896 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10897 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"
10902 cf_search="$cf_library_path_list $cf_search"
10904 for cf_libdir in $cf_search
10906 echo "$as_me:10906: checking for -l$cf_nculib_root in $cf_libdir" >&5
10907 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10908 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10909 cat >conftest.$ac_ext <<_ACEOF
10910 #line 10910 "configure"
10911 #include "confdefs.h"
10912 #include <${cf_cv_ncurses_header:-curses.h}>
10921 rm -f conftest.$ac_objext conftest$ac_exeext
10922 if { (eval echo "$as_me:10922: \"$ac_link\"") >&5
10923 (eval $ac_link) 2>&5
10925 echo "$as_me:10925: \$? = $ac_status" >&5
10926 (exit $ac_status); } &&
10927 { ac_try='test -s conftest$ac_exeext'
10928 { (eval echo "$as_me:10928: \"$ac_try\"") >&5
10929 (eval $ac_try) 2>&5
10931 echo "$as_me:10931: \$? = $ac_status" >&5
10932 (exit $ac_status); }; }; then
10933 echo "$as_me:10933: result: yes" >&5
10934 echo "${ECHO_T}yes" >&6
10935 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10938 echo "$as_me: failed program was:" >&5
10939 cat conftest.$ac_ext >&5
10940 echo "$as_me:10940: result: no" >&5
10941 echo "${ECHO_T}no" >&6
10942 LIBS="$cf_save_LIBS"
10944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10952 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10954 if test $cf_found_library = no ; then
10955 { { echo "$as_me:10955: error: Cannot link $cf_nculib_root library" >&5
10956 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10957 { (exit 1); exit 1; }; }
10962 if test -n "$cf_ncurses_LIBS" ; then
10963 echo "$as_me:10963: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10964 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10965 cf_ncurses_SAVE="$LIBS"
10966 for p in $cf_ncurses_LIBS ; do
10967 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10968 if test "$q" != "$LIBS" ; then
10972 cat >conftest.$ac_ext <<_ACEOF
10973 #line 10973 "configure"
10974 #include "confdefs.h"
10975 #include <${cf_cv_ncurses_header:-curses.h}>
10979 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10984 rm -f conftest.$ac_objext conftest$ac_exeext
10985 if { (eval echo "$as_me:10985: \"$ac_link\"") >&5
10986 (eval $ac_link) 2>&5
10988 echo "$as_me:10988: \$? = $ac_status" >&5
10989 (exit $ac_status); } &&
10990 { ac_try='test -s conftest$ac_exeext'
10991 { (eval echo "$as_me:10991: \"$ac_try\"") >&5
10992 (eval $ac_try) 2>&5
10994 echo "$as_me:10994: \$? = $ac_status" >&5
10995 (exit $ac_status); }; }; then
10996 echo "$as_me:10996: result: yes" >&5
10997 echo "${ECHO_T}yes" >&6
10999 echo "$as_me: failed program was:" >&5
11000 cat conftest.$ac_ext >&5
11001 echo "$as_me:11001: result: no" >&5
11002 echo "${ECHO_T}no" >&6
11003 LIBS="$cf_ncurses_SAVE"
11005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11008 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11010 cat >>confdefs.h <<EOF
11011 #define $cf_nculib_ROOT 1
11016 NCURSES_CONFIG=none
11021 echo "$as_me:11021: checking for X" >&5
11022 echo $ECHO_N "checking for X... $ECHO_C" >&6
11024 # Check whether --with-x or --without-x was given.
11025 if test "${with_x+set}" = set; then
11029 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11030 if test "x$with_x" = xno; then
11031 # The user explicitly disabled X.
11034 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11035 # Both variables are already set.
11038 if test "${ac_cv_have_x+set}" = set; then
11039 echo $ECHO_N "(cached) $ECHO_C" >&6
11041 # One or both of the vars are not set, and there is no cached value.
11042 ac_x_includes=no ac_x_libraries=no
11043 rm -fr conftest.dir
11044 if mkdir conftest.dir; then
11046 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11047 cat >Imakefile <<'EOF'
11049 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11051 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11052 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11053 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11054 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11055 for ac_extension in a so sl dylib dll; do
11056 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11057 test -f $ac_im_libdir/libX11.$ac_extension; then
11058 ac_im_usrlibdir=$ac_im_libdir; break
11061 # Screen out bogus values from the imake configuration. They are
11062 # bogus both because they are the default anyway, and because
11063 # using them would break gcc on systems where it needs fixed includes.
11064 case $ac_im_incroot in
11066 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11068 case $ac_im_usrlibdir in
11069 /usr/lib | /lib) ;;
11070 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11074 rm -fr conftest.dir
11077 # Standard set of common directories for X headers.
11078 # Check X11 before X11Rn because it is often a symlink to the current release.
11090 /usr/local/X11/include
11091 /usr/local/X11R6/include
11092 /usr/local/X11R5/include
11093 /usr/local/X11R4/include
11095 /usr/local/include/X11
11096 /usr/local/include/X11R6
11097 /usr/local/include/X11R5
11098 /usr/local/include/X11R4
11102 /usr/XFree86/include/X11
11106 /usr/unsupported/include
11107 /usr/athena/include
11108 /usr/local/x11r5/include
11109 /usr/lpp/Xamples/include
11111 /usr/openwin/include
11112 /usr/openwin/share/include'
11114 if test "$ac_x_includes" = no; then
11115 # Guess where to find include files, by looking for Intrinsic.h.
11116 # First, try using that file with no special directory specified.
11117 cat >conftest.$ac_ext <<_ACEOF
11118 #line 11118 "configure"
11119 #include "confdefs.h"
11120 #include <X11/Intrinsic.h>
11122 if { (eval echo "$as_me:11122: \"$ac_cpp conftest.$ac_ext\"") >&5
11123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11125 egrep -v '^ *\+' conftest.er1 >conftest.err
11127 cat conftest.err >&5
11128 echo "$as_me:11128: \$? = $ac_status" >&5
11129 (exit $ac_status); } >/dev/null; then
11130 if test -s conftest.err; then
11131 ac_cpp_err=$ac_c_preproc_warn_flag
11138 if test -z "$ac_cpp_err"; then
11139 # We can compile using X headers with no special include directory.
11142 echo "$as_me: failed program was:" >&5
11143 cat conftest.$ac_ext >&5
11144 for ac_dir in $ac_x_header_dirs; do
11145 if test -r "$ac_dir/X11/Intrinsic.h"; then
11146 ac_x_includes=$ac_dir
11151 rm -f conftest.err conftest.$ac_ext
11152 fi # $ac_x_includes = no
11154 if test "$ac_x_libraries" = no; then
11155 # Check for the libraries.
11156 # See if we find them without any special options.
11157 # Don't add to $LIBS permanently.
11160 cat >conftest.$ac_ext <<_ACEOF
11161 #line 11161 "configure"
11162 #include "confdefs.h"
11163 #include <X11/Intrinsic.h>
11172 rm -f conftest.$ac_objext conftest$ac_exeext
11173 if { (eval echo "$as_me:11173: \"$ac_link\"") >&5
11174 (eval $ac_link) 2>&5
11176 echo "$as_me:11176: \$? = $ac_status" >&5
11177 (exit $ac_status); } &&
11178 { ac_try='test -s conftest$ac_exeext'
11179 { (eval echo "$as_me:11179: \"$ac_try\"") >&5
11180 (eval $ac_try) 2>&5
11182 echo "$as_me:11182: \$? = $ac_status" >&5
11183 (exit $ac_status); }; }; then
11185 # We can link X programs with no special library path.
11188 echo "$as_me: failed program was:" >&5
11189 cat conftest.$ac_ext >&5
11191 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11193 # Don't even attempt the hair of trying to link an X program!
11194 for ac_extension in a so sl dylib dll; do
11195 if test -r $ac_dir/libXt.$ac_extension; then
11196 ac_x_libraries=$ac_dir
11202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11203 fi # $ac_x_libraries = no
11205 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11206 # Didn't find X anywhere. Cache the known absence of X.
11207 ac_cv_have_x="have_x=no"
11209 # Record where we found X for the cache.
11210 ac_cv_have_x="have_x=yes \
11211 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11216 eval "$ac_cv_have_x"
11219 if test "$have_x" != yes; then
11220 echo "$as_me:11220: result: $have_x" >&5
11221 echo "${ECHO_T}$have_x" >&6
11224 # If each of the values was on the command line, it overrides each guess.
11225 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11226 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11227 # Update the cache value to reflect the command line values.
11228 ac_cv_have_x="have_x=yes \
11229 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11230 echo "$as_me:11230: result: libraries $x_libraries, headers $x_includes" >&5
11231 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11234 if test "$no_x" = yes; then
11235 # Not all programs may use this symbol, but it does not hurt to define it.
11237 cat >>confdefs.h <<\EOF
11238 #define X_DISPLAY_MISSING 1
11241 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11243 if test -n "$x_includes"; then
11244 X_CFLAGS="$X_CFLAGS -I$x_includes"
11247 # It would also be nice to do this for all -L options, not just this one.
11248 if test -n "$x_libraries"; then
11249 X_LIBS="$X_LIBS -L$x_libraries"
11250 # For Solaris; some versions of Sun CC require a space after -R and
11251 # others require no space. Words are not sufficient . . . .
11252 case `(uname -sr) 2>/dev/null` in
11254 echo "$as_me:11254: checking whether -R must be followed by a space" >&5
11255 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11256 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11257 cat >conftest.$ac_ext <<_ACEOF
11258 #line 11258 "configure"
11259 #include "confdefs.h"
11269 rm -f conftest.$ac_objext conftest$ac_exeext
11270 if { (eval echo "$as_me:11270: \"$ac_link\"") >&5
11271 (eval $ac_link) 2>&5
11273 echo "$as_me:11273: \$? = $ac_status" >&5
11274 (exit $ac_status); } &&
11275 { ac_try='test -s conftest$ac_exeext'
11276 { (eval echo "$as_me:11276: \"$ac_try\"") >&5
11277 (eval $ac_try) 2>&5
11279 echo "$as_me:11279: \$? = $ac_status" >&5
11280 (exit $ac_status); }; }; then
11283 echo "$as_me: failed program was:" >&5
11284 cat conftest.$ac_ext >&5
11287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11288 if test $ac_R_nospace = yes; then
11289 echo "$as_me:11289: result: no" >&5
11290 echo "${ECHO_T}no" >&6
11291 X_LIBS="$X_LIBS -R$x_libraries"
11293 LIBS="$ac_xsave_LIBS -R $x_libraries"
11294 cat >conftest.$ac_ext <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11306 rm -f conftest.$ac_objext conftest$ac_exeext
11307 if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
11308 (eval $ac_link) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit $ac_status); } &&
11312 { ac_try='test -s conftest$ac_exeext'
11313 { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314 (eval $ac_try) 2>&5
11316 echo "$as_me:11316: \$? = $ac_status" >&5
11317 (exit $ac_status); }; }; then
11320 echo "$as_me: failed program was:" >&5
11321 cat conftest.$ac_ext >&5
11324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11325 if test $ac_R_space = yes; then
11326 echo "$as_me:11326: result: yes" >&5
11327 echo "${ECHO_T}yes" >&6
11328 X_LIBS="$X_LIBS -R $x_libraries"
11330 echo "$as_me:11330: result: neither works" >&5
11331 echo "${ECHO_T}neither works" >&6
11334 LIBS=$ac_xsave_LIBS
11338 # Check for system-dependent libraries X programs must link with.
11339 # Do this before checking for the system-independent R6 libraries
11340 # (-lICE), since we may need -lsocket or whatever for X linking.
11342 if test "$ISC" = yes; then
11343 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11345 # Martyn Johnson says this is needed for Ultrix, if the X
11346 # libraries were built with DECnet support. And Karl Berry says
11347 # the Alpha needs dnet_stub (dnet does not exist).
11348 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11349 cat >conftest.$ac_ext <<_ACEOF
11350 #line 11350 "configure"
11351 #include "confdefs.h"
11353 /* Override any gcc2 internal prototype to avoid an error. */
11357 /* We use char because int might match the return type of a gcc2
11358 builtin and then its argument prototype would still apply. */
11359 char XOpenDisplay ();
11368 rm -f conftest.$ac_objext conftest$ac_exeext
11369 if { (eval echo "$as_me:11369: \"$ac_link\"") >&5
11370 (eval $ac_link) 2>&5
11372 echo "$as_me:11372: \$? = $ac_status" >&5
11373 (exit $ac_status); } &&
11374 { ac_try='test -s conftest$ac_exeext'
11375 { (eval echo "$as_me:11375: \"$ac_try\"") >&5
11376 (eval $ac_try) 2>&5
11378 echo "$as_me:11378: \$? = $ac_status" >&5
11379 (exit $ac_status); }; }; then
11382 echo "$as_me: failed program was:" >&5
11383 cat conftest.$ac_ext >&5
11384 echo "$as_me:11384: checking for dnet_ntoa in -ldnet" >&5
11385 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11386 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11387 echo $ECHO_N "(cached) $ECHO_C" >&6
11389 ac_check_lib_save_LIBS=$LIBS
11390 LIBS="-ldnet $LIBS"
11391 cat >conftest.$ac_ext <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11395 /* Override any gcc2 internal prototype to avoid an error. */
11399 /* We use char because int might match the return type of a gcc2
11400 builtin and then its argument prototype would still apply. */
11410 rm -f conftest.$ac_objext conftest$ac_exeext
11411 if { (eval echo "$as_me:11411: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11414 echo "$as_me:11414: \$? = $ac_status" >&5
11415 (exit $ac_status); } &&
11416 { ac_try='test -s conftest$ac_exeext'
11417 { (eval echo "$as_me:11417: \"$ac_try\"") >&5
11418 (eval $ac_try) 2>&5
11420 echo "$as_me:11420: \$? = $ac_status" >&5
11421 (exit $ac_status); }; }; then
11422 ac_cv_lib_dnet_dnet_ntoa=yes
11424 echo "$as_me: failed program was:" >&5
11425 cat conftest.$ac_ext >&5
11426 ac_cv_lib_dnet_dnet_ntoa=no
11428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11429 LIBS=$ac_check_lib_save_LIBS
11431 echo "$as_me:11431: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11432 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11433 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11434 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11437 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11438 echo "$as_me:11438: checking for dnet_ntoa in -ldnet_stub" >&5
11439 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11440 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11441 echo $ECHO_N "(cached) $ECHO_C" >&6
11443 ac_check_lib_save_LIBS=$LIBS
11444 LIBS="-ldnet_stub $LIBS"
11445 cat >conftest.$ac_ext <<_ACEOF
11446 #line 11446 "configure"
11447 #include "confdefs.h"
11449 /* Override any gcc2 internal prototype to avoid an error. */
11453 /* We use char because int might match the return type of a gcc2
11454 builtin and then its argument prototype would still apply. */
11464 rm -f conftest.$ac_objext conftest$ac_exeext
11465 if { (eval echo "$as_me:11465: \"$ac_link\"") >&5
11466 (eval $ac_link) 2>&5
11468 echo "$as_me:11468: \$? = $ac_status" >&5
11469 (exit $ac_status); } &&
11470 { ac_try='test -s conftest$ac_exeext'
11471 { (eval echo "$as_me:11471: \"$ac_try\"") >&5
11472 (eval $ac_try) 2>&5
11474 echo "$as_me:11474: \$? = $ac_status" >&5
11475 (exit $ac_status); }; }; then
11476 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11478 echo "$as_me: failed program was:" >&5
11479 cat conftest.$ac_ext >&5
11480 ac_cv_lib_dnet_stub_dnet_ntoa=no
11482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11483 LIBS=$ac_check_lib_save_LIBS
11485 echo "$as_me:11485: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11486 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11487 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11488 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11494 LIBS="$ac_xsave_LIBS"
11496 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11497 # to get the SysV transport functions.
11498 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11500 # The nsl library prevents programs from opening the X display
11501 # on Irix 5.2, according to T.E. Dickey.
11502 # The functions gethostbyname, getservbyname, and inet_addr are
11503 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11504 echo "$as_me:11504: checking for gethostbyname" >&5
11505 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11506 if test "${ac_cv_func_gethostbyname+set}" = set; then
11507 echo $ECHO_N "(cached) $ECHO_C" >&6
11509 cat >conftest.$ac_ext <<_ACEOF
11510 #line 11510 "configure"
11511 #include "confdefs.h"
11512 #define gethostbyname autoconf_temporary
11513 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11514 #undef gethostbyname
11520 /* We use char because int might match the return type of a gcc2
11521 builtin and then its argument prototype would still apply. */
11522 char gethostbyname (void);
11528 /* The GNU C library defines stubs for functions which it implements
11529 to always fail with ENOSYS. Some functions are actually named
11530 something starting with __ and the normal name is an alias. */
11531 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11532 #error found stub for gethostbyname
11535 return gethostbyname ();
11540 rm -f conftest.$ac_objext conftest$ac_exeext
11541 if { (eval echo "$as_me:11541: \"$ac_link\"") >&5
11542 (eval $ac_link) 2>&5
11544 echo "$as_me:11544: \$? = $ac_status" >&5
11545 (exit $ac_status); } &&
11546 { ac_try='test -s conftest$ac_exeext'
11547 { (eval echo "$as_me:11547: \"$ac_try\"") >&5
11548 (eval $ac_try) 2>&5
11550 echo "$as_me:11550: \$? = $ac_status" >&5
11551 (exit $ac_status); }; }; then
11552 ac_cv_func_gethostbyname=yes
11554 echo "$as_me: failed program was:" >&5
11555 cat conftest.$ac_ext >&5
11556 ac_cv_func_gethostbyname=no
11558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11560 echo "$as_me:11560: result: $ac_cv_func_gethostbyname" >&5
11561 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11563 if test $ac_cv_func_gethostbyname = no; then
11564 echo "$as_me:11564: checking for gethostbyname in -lnsl" >&5
11565 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11566 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11567 echo $ECHO_N "(cached) $ECHO_C" >&6
11569 ac_check_lib_save_LIBS=$LIBS
11571 cat >conftest.$ac_ext <<_ACEOF
11572 #line 11572 "configure"
11573 #include "confdefs.h"
11575 /* Override any gcc2 internal prototype to avoid an error. */
11579 /* We use char because int might match the return type of a gcc2
11580 builtin and then its argument prototype would still apply. */
11581 char gethostbyname ();
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592 (eval $ac_link) 2>&5
11594 echo "$as_me:11594: \$? = $ac_status" >&5
11595 (exit $ac_status); } &&
11596 { ac_try='test -s conftest$ac_exeext'
11597 { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598 (eval $ac_try) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit $ac_status); }; }; then
11602 ac_cv_lib_nsl_gethostbyname=yes
11604 echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 ac_cv_lib_nsl_gethostbyname=no
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 LIBS=$ac_check_lib_save_LIBS
11611 echo "$as_me:11611: result: $ac_cv_lib_nsl_gethostbyname" >&5
11612 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11613 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11614 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11617 if test $ac_cv_lib_nsl_gethostbyname = no; then
11618 echo "$as_me:11618: checking for gethostbyname in -lbsd" >&5
11619 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11620 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11621 echo $ECHO_N "(cached) $ECHO_C" >&6
11623 ac_check_lib_save_LIBS=$LIBS
11625 cat >conftest.$ac_ext <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11629 /* Override any gcc2 internal prototype to avoid an error. */
11633 /* We use char because int might match the return type of a gcc2
11634 builtin and then its argument prototype would still apply. */
11635 char gethostbyname ();
11644 rm -f conftest.$ac_objext conftest$ac_exeext
11645 if { (eval echo "$as_me:11645: \"$ac_link\"") >&5
11646 (eval $ac_link) 2>&5
11648 echo "$as_me:11648: \$? = $ac_status" >&5
11649 (exit $ac_status); } &&
11650 { ac_try='test -s conftest$ac_exeext'
11651 { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11654 echo "$as_me:11654: \$? = $ac_status" >&5
11655 (exit $ac_status); }; }; then
11656 ac_cv_lib_bsd_gethostbyname=yes
11658 echo "$as_me: failed program was:" >&5
11659 cat conftest.$ac_ext >&5
11660 ac_cv_lib_bsd_gethostbyname=no
11662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11663 LIBS=$ac_check_lib_save_LIBS
11665 echo "$as_me:11665: result: $ac_cv_lib_bsd_gethostbyname" >&5
11666 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11667 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11668 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11674 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11675 # socket/setsockopt and other routines are undefined under SCO ODT
11676 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11677 # on later versions), says Simon Leinen: it contains gethostby*
11678 # variants that don't use the nameserver (or something). -lsocket
11679 # must be given before -lnsl if both are needed. We assume that
11680 # if connect needs -lnsl, so does gethostbyname.
11681 echo "$as_me:11681: checking for connect" >&5
11682 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11683 if test "${ac_cv_func_connect+set}" = set; then
11684 echo $ECHO_N "(cached) $ECHO_C" >&6
11686 cat >conftest.$ac_ext <<_ACEOF
11687 #line 11687 "configure"
11688 #include "confdefs.h"
11689 #define connect autoconf_temporary
11690 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11697 /* We use char because int might match the return type of a gcc2
11698 builtin and then its argument prototype would still apply. */
11699 char connect (void);
11705 /* The GNU C library defines stubs for functions which it implements
11706 to always fail with ENOSYS. Some functions are actually named
11707 something starting with __ and the normal name is an alias. */
11708 #if defined (__stub_connect) || defined (__stub___connect)
11709 #error found stub for connect
11717 rm -f conftest.$ac_objext conftest$ac_exeext
11718 if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
11719 (eval $ac_link) 2>&5
11721 echo "$as_me:11721: \$? = $ac_status" >&5
11722 (exit $ac_status); } &&
11723 { ac_try='test -s conftest$ac_exeext'
11724 { (eval echo "$as_me:11724: \"$ac_try\"") >&5
11725 (eval $ac_try) 2>&5
11727 echo "$as_me:11727: \$? = $ac_status" >&5
11728 (exit $ac_status); }; }; then
11729 ac_cv_func_connect=yes
11731 echo "$as_me: failed program was:" >&5
11732 cat conftest.$ac_ext >&5
11733 ac_cv_func_connect=no
11735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11737 echo "$as_me:11737: result: $ac_cv_func_connect" >&5
11738 echo "${ECHO_T}$ac_cv_func_connect" >&6
11740 if test $ac_cv_func_connect = no; then
11741 echo "$as_me:11741: checking for connect in -lsocket" >&5
11742 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11743 if test "${ac_cv_lib_socket_connect+set}" = set; then
11744 echo $ECHO_N "(cached) $ECHO_C" >&6
11746 ac_check_lib_save_LIBS=$LIBS
11747 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11748 cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11752 /* Override any gcc2 internal prototype to avoid an error. */
11756 /* We use char because int might match the return type of a gcc2
11757 builtin and then its argument prototype would still apply. */
11767 rm -f conftest.$ac_objext conftest$ac_exeext
11768 if { (eval echo "$as_me:11768: \"$ac_link\"") >&5
11769 (eval $ac_link) 2>&5
11771 echo "$as_me:11771: \$? = $ac_status" >&5
11772 (exit $ac_status); } &&
11773 { ac_try='test -s conftest$ac_exeext'
11774 { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775 (eval $ac_try) 2>&5
11777 echo "$as_me:11777: \$? = $ac_status" >&5
11778 (exit $ac_status); }; }; then
11779 ac_cv_lib_socket_connect=yes
11781 echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 ac_cv_lib_socket_connect=no
11785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11786 LIBS=$ac_check_lib_save_LIBS
11788 echo "$as_me:11788: result: $ac_cv_lib_socket_connect" >&5
11789 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11790 if test $ac_cv_lib_socket_connect = yes; then
11791 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11796 # Guillermo Gomez says -lposix is necessary on A/UX.
11797 echo "$as_me:11797: checking for remove" >&5
11798 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11799 if test "${ac_cv_func_remove+set}" = set; then
11800 echo $ECHO_N "(cached) $ECHO_C" >&6
11802 cat >conftest.$ac_ext <<_ACEOF
11803 #line 11803 "configure"
11804 #include "confdefs.h"
11805 #define remove autoconf_temporary
11806 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11813 /* We use char because int might match the return type of a gcc2
11814 builtin and then its argument prototype would still apply. */
11815 char remove (void);
11821 /* The GNU C library defines stubs for functions which it implements
11822 to always fail with ENOSYS. Some functions are actually named
11823 something starting with __ and the normal name is an alias. */
11824 #if defined (__stub_remove) || defined (__stub___remove)
11825 #error found stub for remove
11833 rm -f conftest.$ac_objext conftest$ac_exeext
11834 if { (eval echo "$as_me:11834: \"$ac_link\"") >&5
11835 (eval $ac_link) 2>&5
11837 echo "$as_me:11837: \$? = $ac_status" >&5
11838 (exit $ac_status); } &&
11839 { ac_try='test -s conftest$ac_exeext'
11840 { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841 (eval $ac_try) 2>&5
11843 echo "$as_me:11843: \$? = $ac_status" >&5
11844 (exit $ac_status); }; }; then
11845 ac_cv_func_remove=yes
11847 echo "$as_me: failed program was:" >&5
11848 cat conftest.$ac_ext >&5
11849 ac_cv_func_remove=no
11851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11853 echo "$as_me:11853: result: $ac_cv_func_remove" >&5
11854 echo "${ECHO_T}$ac_cv_func_remove" >&6
11856 if test $ac_cv_func_remove = no; then
11857 echo "$as_me:11857: checking for remove in -lposix" >&5
11858 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11859 if test "${ac_cv_lib_posix_remove+set}" = set; then
11860 echo $ECHO_N "(cached) $ECHO_C" >&6
11862 ac_check_lib_save_LIBS=$LIBS
11863 LIBS="-lposix $LIBS"
11864 cat >conftest.$ac_ext <<_ACEOF
11865 #line 11865 "configure"
11866 #include "confdefs.h"
11868 /* Override any gcc2 internal prototype to avoid an error. */
11872 /* We use char because int might match the return type of a gcc2
11873 builtin and then its argument prototype would still apply. */
11883 rm -f conftest.$ac_objext conftest$ac_exeext
11884 if { (eval echo "$as_me:11884: \"$ac_link\"") >&5
11885 (eval $ac_link) 2>&5
11887 echo "$as_me:11887: \$? = $ac_status" >&5
11888 (exit $ac_status); } &&
11889 { ac_try='test -s conftest$ac_exeext'
11890 { (eval echo "$as_me:11890: \"$ac_try\"") >&5
11891 (eval $ac_try) 2>&5
11893 echo "$as_me:11893: \$? = $ac_status" >&5
11894 (exit $ac_status); }; }; then
11895 ac_cv_lib_posix_remove=yes
11897 echo "$as_me: failed program was:" >&5
11898 cat conftest.$ac_ext >&5
11899 ac_cv_lib_posix_remove=no
11901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11902 LIBS=$ac_check_lib_save_LIBS
11904 echo "$as_me:11904: result: $ac_cv_lib_posix_remove" >&5
11905 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11906 if test $ac_cv_lib_posix_remove = yes; then
11907 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11912 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11913 echo "$as_me:11913: checking for shmat" >&5
11914 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11915 if test "${ac_cv_func_shmat+set}" = set; then
11916 echo $ECHO_N "(cached) $ECHO_C" >&6
11918 cat >conftest.$ac_ext <<_ACEOF
11919 #line 11919 "configure"
11920 #include "confdefs.h"
11921 #define shmat autoconf_temporary
11922 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11929 /* We use char because int might match the return type of a gcc2
11930 builtin and then its argument prototype would still apply. */
11937 /* The GNU C library defines stubs for functions which it implements
11938 to always fail with ENOSYS. Some functions are actually named
11939 something starting with __ and the normal name is an alias. */
11940 #if defined (__stub_shmat) || defined (__stub___shmat)
11941 #error found stub for shmat
11949 rm -f conftest.$ac_objext conftest$ac_exeext
11950 if { (eval echo "$as_me:11950: \"$ac_link\"") >&5
11951 (eval $ac_link) 2>&5
11953 echo "$as_me:11953: \$? = $ac_status" >&5
11954 (exit $ac_status); } &&
11955 { ac_try='test -s conftest$ac_exeext'
11956 { (eval echo "$as_me:11956: \"$ac_try\"") >&5
11957 (eval $ac_try) 2>&5
11959 echo "$as_me:11959: \$? = $ac_status" >&5
11960 (exit $ac_status); }; }; then
11961 ac_cv_func_shmat=yes
11963 echo "$as_me: failed program was:" >&5
11964 cat conftest.$ac_ext >&5
11965 ac_cv_func_shmat=no
11967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11969 echo "$as_me:11969: result: $ac_cv_func_shmat" >&5
11970 echo "${ECHO_T}$ac_cv_func_shmat" >&6
11972 if test $ac_cv_func_shmat = no; then
11973 echo "$as_me:11973: checking for shmat in -lipc" >&5
11974 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
11975 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
11976 echo $ECHO_N "(cached) $ECHO_C" >&6
11978 ac_check_lib_save_LIBS=$LIBS
11980 cat >conftest.$ac_ext <<_ACEOF
11981 #line 11981 "configure"
11982 #include "confdefs.h"
11984 /* Override any gcc2 internal prototype to avoid an error. */
11988 /* We use char because int might match the return type of a gcc2
11989 builtin and then its argument prototype would still apply. */
11999 rm -f conftest.$ac_objext conftest$ac_exeext
12000 if { (eval echo "$as_me:12000: \"$ac_link\"") >&5
12001 (eval $ac_link) 2>&5
12003 echo "$as_me:12003: \$? = $ac_status" >&5
12004 (exit $ac_status); } &&
12005 { ac_try='test -s conftest$ac_exeext'
12006 { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007 (eval $ac_try) 2>&5
12009 echo "$as_me:12009: \$? = $ac_status" >&5
12010 (exit $ac_status); }; }; then
12011 ac_cv_lib_ipc_shmat=yes
12013 echo "$as_me: failed program was:" >&5
12014 cat conftest.$ac_ext >&5
12015 ac_cv_lib_ipc_shmat=no
12017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12018 LIBS=$ac_check_lib_save_LIBS
12020 echo "$as_me:12020: result: $ac_cv_lib_ipc_shmat" >&5
12021 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12022 if test $ac_cv_lib_ipc_shmat = yes; then
12023 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12029 # Check for libraries that X11R6 Xt/Xaw programs need.
12030 ac_save_LDFLAGS=$LDFLAGS
12031 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12032 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12033 # check for ICE first), but we must link in the order -lSM -lICE or
12034 # we get undefined symbols. So assume we have SM if we have ICE.
12035 # These have to be linked with before -lX11, unlike the other
12036 # libraries we check for below, so use a different variable.
12037 # John Interrante, Karl Berry
12038 echo "$as_me:12038: checking for IceConnectionNumber in -lICE" >&5
12039 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12040 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12041 echo $ECHO_N "(cached) $ECHO_C" >&6
12043 ac_check_lib_save_LIBS=$LIBS
12044 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12045 cat >conftest.$ac_ext <<_ACEOF
12046 #line 12046 "configure"
12047 #include "confdefs.h"
12049 /* Override any gcc2 internal prototype to avoid an error. */
12053 /* We use char because int might match the return type of a gcc2
12054 builtin and then its argument prototype would still apply. */
12055 char IceConnectionNumber ();
12059 IceConnectionNumber ();
12064 rm -f conftest.$ac_objext conftest$ac_exeext
12065 if { (eval echo "$as_me:12065: \"$ac_link\"") >&5
12066 (eval $ac_link) 2>&5
12068 echo "$as_me:12068: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
12070 { ac_try='test -s conftest$ac_exeext'
12071 { (eval echo "$as_me:12071: \"$ac_try\"") >&5
12072 (eval $ac_try) 2>&5
12074 echo "$as_me:12074: \$? = $ac_status" >&5
12075 (exit $ac_status); }; }; then
12076 ac_cv_lib_ICE_IceConnectionNumber=yes
12078 echo "$as_me: failed program was:" >&5
12079 cat conftest.$ac_ext >&5
12080 ac_cv_lib_ICE_IceConnectionNumber=no
12082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12083 LIBS=$ac_check_lib_save_LIBS
12085 echo "$as_me:12085: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12086 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12087 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12088 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12091 LDFLAGS=$ac_save_LDFLAGS
12095 cf_x_athena=${cf_x_athena:-Xaw}
12097 echo "$as_me:12097: checking if you want to link with Xaw 3d library" >&5
12098 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12101 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12102 if test "${with_Xaw3d+set}" = set; then
12103 withval="$with_Xaw3d"
12106 if test "$withval" = yes ; then
12108 echo "$as_me:12108: result: yes" >&5
12109 echo "${ECHO_T}yes" >&6
12111 echo "$as_me:12111: result: no" >&5
12112 echo "${ECHO_T}no" >&6
12115 echo "$as_me:12115: checking if you want to link with Xaw 3d xft library" >&5
12116 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12119 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12120 if test "${with_Xaw3dxft+set}" = set; then
12121 withval="$with_Xaw3dxft"
12124 if test "$withval" = yes ; then
12125 cf_x_athena=Xaw3dxft
12126 echo "$as_me:12126: result: yes" >&5
12127 echo "${ECHO_T}yes" >&6
12129 echo "$as_me:12129: result: no" >&5
12130 echo "${ECHO_T}no" >&6
12133 echo "$as_me:12133: checking if you want to link with neXT Athena library" >&5
12134 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12137 # Check whether --with-neXtaw or --without-neXtaw was given.
12138 if test "${with_neXtaw+set}" = set; then
12139 withval="$with_neXtaw"
12142 if test "$withval" = yes ; then
12144 echo "$as_me:12144: result: yes" >&5
12145 echo "${ECHO_T}yes" >&6
12147 echo "$as_me:12147: result: no" >&5
12148 echo "${ECHO_T}no" >&6
12151 echo "$as_me:12151: checking if you want to link with Athena-Plus library" >&5
12152 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12155 # Check whether --with-XawPlus or --without-XawPlus was given.
12156 if test "${with_XawPlus+set}" = set; then
12157 withval="$with_XawPlus"
12160 if test "$withval" = yes ; then
12161 cf_x_athena=XawPlus
12162 echo "$as_me:12162: result: yes" >&5
12163 echo "${ECHO_T}yes" >&6
12165 echo "$as_me:12165: result: no" >&5
12166 echo "${ECHO_T}no" >&6
12171 if test "$PKG_CONFIG" != none ; then
12173 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12174 for cf_athena_pkg in \
12177 ${cf_x_athena}-devel \
12178 lib${cf_x_athena} \
12179 lib${cf_x_athena}-devel
12182 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12183 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12185 echo "${as_me:-configure}:12185: testing found package $cf_athena_pkg ..." 1>&5
12187 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12188 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12189 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12191 echo "${as_me:-configure}:12191: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12193 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12195 echo "${as_me:-configure}:12195: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12200 cf_new_extra_cppflags=
12202 for cf_add_cflags in $cf_pkgconfig_incs
12204 case $cf_fix_cppflags in
12206 case $cf_add_cflags in
12207 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12208 case $cf_add_cflags in
12210 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12212 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12213 && test -z "${cf_tst_cflags}" \
12214 && cf_fix_cppflags=yes
12216 if test $cf_fix_cppflags = yes ; then
12218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12222 elif test "${cf_tst_cflags}" = "\"'" ; then
12224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12231 case "$CPPFLAGS" in
12235 case $cf_add_cflags in
12237 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12239 CPPFLAGS=`echo "$CPPFLAGS" | \
12240 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12241 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12246 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12247 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12254 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12255 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12265 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12267 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12268 && test -z "${cf_tst_cflags}" \
12269 && cf_fix_cppflags=no
12274 if test -n "$cf_new_cflags" ; then
12276 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12277 CFLAGS="${CFLAGS}$cf_new_cflags"
12281 if test -n "$cf_new_cppflags" ; then
12283 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12284 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12288 if test -n "$cf_new_extra_cppflags" ; then
12290 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12291 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12295 cf_add_libs="$cf_pkgconfig_libs"
12296 # Filter out duplicates - this happens with badly-designed ".pc" files...
12297 for cf_add_1lib in $LIBS
12299 for cf_add_2lib in $cf_add_libs
12301 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12307 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12309 LIBS="$cf_add_libs"
12311 cf_x_athena_lib="$cf_pkgconfig_libs"
12313 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12315 cat >>confdefs.h <<EOF
12316 #define $cf_x_athena_LIBS 1
12319 for cf_trim_lib in Xmu Xt X11
12322 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12323 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12324 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12326 echo "${as_me:-configure}:12326: testing ..trimmed $LIBS ..." 1>&5
12332 echo "$as_me:12332: checking for usable $cf_x_athena/Xmu package" >&5
12333 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12334 if test "${cf_cv_xaw_compat+set}" = set; then
12335 echo $ECHO_N "(cached) $ECHO_C" >&6
12338 cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12342 #include <X11/Xmu/CharSet.h>
12348 int check = XmuCompareISOLatin1("big", "small")
12354 rm -f conftest.$ac_objext conftest$ac_exeext
12355 if { (eval echo "$as_me:12355: \"$ac_link\"") >&5
12356 (eval $ac_link) 2>&5
12358 echo "$as_me:12358: \$? = $ac_status" >&5
12359 (exit $ac_status); } &&
12360 { ac_try='test -s conftest$ac_exeext'
12361 { (eval echo "$as_me:12361: \"$ac_try\"") >&5
12362 (eval $ac_try) 2>&5
12364 echo "$as_me:12364: \$? = $ac_status" >&5
12365 (exit $ac_status); }; }; then
12366 cf_cv_xaw_compat=yes
12368 echo "$as_me: failed program was:" >&5
12369 cat conftest.$ac_ext >&5
12370 cf_cv_xaw_compat=no
12372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12374 echo "$as_me:12374: result: $cf_cv_xaw_compat" >&5
12375 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12377 if test "$cf_cv_xaw_compat" = no
12379 # workaround for broken ".pc" files...
12380 case "$cf_x_athena_lib" in
12384 test -n "$verbose" && echo " work around broken package" 1>&6
12386 echo "${as_me:-configure}:12386: testing work around broken package ..." 1>&5
12388 cf_save_xmu="$LIBS"
12389 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12391 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12392 test -n "$verbose" && echo " found package xmu" 1>&6
12394 echo "${as_me:-configure}:12394: testing found package xmu ..." 1>&5
12396 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12397 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12398 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12400 echo "${as_me:-configure}:12400: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12402 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12404 echo "${as_me:-configure}:12404: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12409 cf_new_extra_cppflags=
12411 for cf_add_cflags in $cf_pkgconfig_incs
12413 case $cf_fix_cppflags in
12415 case $cf_add_cflags in
12416 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12417 case $cf_add_cflags in
12419 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12421 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12422 && test -z "${cf_tst_cflags}" \
12423 && cf_fix_cppflags=yes
12425 if test $cf_fix_cppflags = yes ; then
12427 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12428 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12431 elif test "${cf_tst_cflags}" = "\"'" ; then
12433 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12434 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12440 case "$CPPFLAGS" in
12444 case $cf_add_cflags in
12446 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12448 CPPFLAGS=`echo "$CPPFLAGS" | \
12449 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12450 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12455 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12456 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12463 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12464 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12471 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12472 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12474 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12476 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12477 && test -z "${cf_tst_cflags}" \
12478 && cf_fix_cppflags=no
12483 if test -n "$cf_new_cflags" ; then
12485 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12486 CFLAGS="${CFLAGS}$cf_new_cflags"
12490 if test -n "$cf_new_cppflags" ; then
12492 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12493 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12497 if test -n "$cf_new_extra_cppflags" ; then
12499 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12500 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12504 cf_add_libs="$cf_pkgconfig_libs"
12505 # Filter out duplicates - this happens with badly-designed ".pc" files...
12506 for cf_add_1lib in $LIBS
12508 for cf_add_2lib in $cf_add_libs
12510 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12518 LIBS="$cf_add_libs"
12520 LIBS="$cf_save_xmu"
12522 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12524 echo "${as_me:-configure}:12524: testing ...before $LIBS ..." 1>&5
12526 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12527 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12529 echo "${as_me:-configure}:12529: testing ...after $LIBS ..." 1>&5
12535 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12537 echo "${as_me:-configure}:12537: testing ...before $LIBS ..." 1>&5
12539 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12540 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12542 echo "${as_me:-configure}:12542: testing ...after $LIBS ..." 1>&5
12546 for cf_trim_lib in Xmu Xt X11
12549 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12550 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12551 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12553 echo "${as_me:-configure}:12553: testing ..trimmed $LIBS ..." 1>&5
12573 if test -z "$cf_x_athena_lib" ; then
12575 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12576 test -n "$verbose" && echo " found package Xext" 1>&6
12578 echo "${as_me:-configure}:12578: testing found package Xext ..." 1>&5
12580 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12581 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12582 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12584 echo "${as_me:-configure}:12584: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12586 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12588 echo "${as_me:-configure}:12588: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12593 cf_new_extra_cppflags=
12595 for cf_add_cflags in $cf_pkgconfig_incs
12597 case $cf_fix_cppflags in
12599 case $cf_add_cflags in
12600 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12601 case $cf_add_cflags in
12603 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12605 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12606 && test -z "${cf_tst_cflags}" \
12607 && cf_fix_cppflags=yes
12609 if test $cf_fix_cppflags = yes ; then
12611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12615 elif test "${cf_tst_cflags}" = "\"'" ; then
12617 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12618 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12624 case "$CPPFLAGS" in
12628 case $cf_add_cflags in
12630 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12632 CPPFLAGS=`echo "$CPPFLAGS" | \
12633 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12634 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12639 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12640 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12647 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12648 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12655 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12656 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12658 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12660 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12661 && test -z "${cf_tst_cflags}" \
12662 && cf_fix_cppflags=no
12667 if test -n "$cf_new_cflags" ; then
12669 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12670 CFLAGS="${CFLAGS}$cf_new_cflags"
12674 if test -n "$cf_new_cppflags" ; then
12676 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12677 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12681 if test -n "$cf_new_extra_cppflags" ; then
12683 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12684 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12688 cf_add_libs="$cf_pkgconfig_libs"
12689 # Filter out duplicates - this happens with badly-designed ".pc" files...
12690 for cf_add_1lib in $LIBS
12692 for cf_add_2lib in $cf_add_libs
12694 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12700 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12702 LIBS="$cf_add_libs"
12709 echo "$as_me:12709: checking for XextCreateExtension in -lXext" >&5
12710 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12711 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12712 echo $ECHO_N "(cached) $ECHO_C" >&6
12714 ac_check_lib_save_LIBS=$LIBS
12715 LIBS="-lXext $LIBS"
12716 cat >conftest.$ac_ext <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12720 /* Override any gcc2 internal prototype to avoid an error. */
12724 /* We use char because int might match the return type of a gcc2
12725 builtin and then its argument prototype would still apply. */
12726 char XextCreateExtension ();
12730 XextCreateExtension ();
12735 rm -f conftest.$ac_objext conftest$ac_exeext
12736 if { (eval echo "$as_me:12736: \"$ac_link\"") >&5
12737 (eval $ac_link) 2>&5
12739 echo "$as_me:12739: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
12741 { ac_try='test -s conftest$ac_exeext'
12742 { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12745 echo "$as_me:12745: \$? = $ac_status" >&5
12746 (exit $ac_status); }; }; then
12747 ac_cv_lib_Xext_XextCreateExtension=yes
12749 echo "$as_me: failed program was:" >&5
12750 cat conftest.$ac_ext >&5
12751 ac_cv_lib_Xext_XextCreateExtension=no
12753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12754 LIBS=$ac_check_lib_save_LIBS
12756 echo "$as_me:12756: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12757 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12758 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12760 cf_add_libs="-lXext"
12761 # Filter out duplicates - this happens with badly-designed ".pc" files...
12762 for cf_add_1lib in $LIBS
12764 for cf_add_2lib in $cf_add_libs
12766 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12772 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12774 LIBS="$cf_add_libs"
12780 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12781 # in some cases has installed dummy files in the former, other cases replaced
12782 # it with a link to the new location). This complicates the configure script.
12783 # Check for that pitfall, and recover using pkg-config
12785 # If none of these are set, the configuration is almost certainly broken.
12786 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12789 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12790 test -n "$verbose" && echo " found package x11" 1>&6
12792 echo "${as_me:-configure}:12792: testing found package x11 ..." 1>&5
12794 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12795 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12796 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12798 echo "${as_me:-configure}:12798: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12800 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12802 echo "${as_me:-configure}:12802: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12807 cf_new_extra_cppflags=
12809 for cf_add_cflags in $cf_pkgconfig_incs
12811 case $cf_fix_cppflags in
12813 case $cf_add_cflags in
12814 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12815 case $cf_add_cflags in
12817 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12819 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12820 && test -z "${cf_tst_cflags}" \
12821 && cf_fix_cppflags=yes
12823 if test $cf_fix_cppflags = yes ; then
12825 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12826 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12829 elif test "${cf_tst_cflags}" = "\"'" ; then
12831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12838 case "$CPPFLAGS" in
12842 case $cf_add_cflags in
12844 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12846 CPPFLAGS=`echo "$CPPFLAGS" | \
12847 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12848 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12853 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12854 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12861 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12862 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12869 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12870 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12872 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12874 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12875 && test -z "${cf_tst_cflags}" \
12876 && cf_fix_cppflags=no
12881 if test -n "$cf_new_cflags" ; then
12883 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12884 CFLAGS="${CFLAGS}$cf_new_cflags"
12888 if test -n "$cf_new_cppflags" ; then
12890 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12891 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12895 if test -n "$cf_new_extra_cppflags" ; then
12897 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12898 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12902 cf_add_libs="$cf_pkgconfig_libs"
12903 # Filter out duplicates - this happens with badly-designed ".pc" files...
12904 for cf_add_1lib in $LIBS
12906 for cf_add_2lib in $cf_add_libs
12908 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12914 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12916 LIBS="$cf_add_libs"
12922 { echo "$as_me:12922: WARNING: unable to find X11 library" >&5
12923 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12926 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12927 test -n "$verbose" && echo " found package ice" 1>&6
12929 echo "${as_me:-configure}:12929: testing found package ice ..." 1>&5
12931 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12932 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12933 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12935 echo "${as_me:-configure}:12935: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12937 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12939 echo "${as_me:-configure}:12939: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12944 cf_new_extra_cppflags=
12946 for cf_add_cflags in $cf_pkgconfig_incs
12948 case $cf_fix_cppflags in
12950 case $cf_add_cflags in
12951 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12952 case $cf_add_cflags in
12954 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12956 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12957 && test -z "${cf_tst_cflags}" \
12958 && cf_fix_cppflags=yes
12960 if test $cf_fix_cppflags = yes ; then
12962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12966 elif test "${cf_tst_cflags}" = "\"'" ; then
12968 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12969 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12975 case "$CPPFLAGS" in
12979 case $cf_add_cflags in
12981 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12983 CPPFLAGS=`echo "$CPPFLAGS" | \
12984 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12985 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12990 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12991 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12998 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12999 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13006 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13007 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13009 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13011 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13012 && test -z "${cf_tst_cflags}" \
13013 && cf_fix_cppflags=no
13018 if test -n "$cf_new_cflags" ; then
13020 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13021 CFLAGS="${CFLAGS}$cf_new_cflags"
13025 if test -n "$cf_new_cppflags" ; then
13027 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13028 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13032 if test -n "$cf_new_extra_cppflags" ; then
13034 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13035 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13039 cf_add_libs="$cf_pkgconfig_libs"
13040 # Filter out duplicates - this happens with badly-designed ".pc" files...
13041 for cf_add_1lib in $LIBS
13043 for cf_add_2lib in $cf_add_libs
13045 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13053 LIBS="$cf_add_libs"
13059 { echo "$as_me:13059: WARNING: unable to find ICE library" >&5
13060 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13063 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13064 test -n "$verbose" && echo " found package sm" 1>&6
13066 echo "${as_me:-configure}:13066: testing found package sm ..." 1>&5
13068 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13069 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13070 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13072 echo "${as_me:-configure}:13072: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13074 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13076 echo "${as_me:-configure}:13076: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13081 cf_new_extra_cppflags=
13083 for cf_add_cflags in $cf_pkgconfig_incs
13085 case $cf_fix_cppflags in
13087 case $cf_add_cflags in
13088 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13089 case $cf_add_cflags in
13091 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13094 && test -z "${cf_tst_cflags}" \
13095 && cf_fix_cppflags=yes
13097 if test $cf_fix_cppflags = yes ; then
13099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13103 elif test "${cf_tst_cflags}" = "\"'" ; then
13105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13112 case "$CPPFLAGS" in
13116 case $cf_add_cflags in
13118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13120 CPPFLAGS=`echo "$CPPFLAGS" | \
13121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13127 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13128 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13135 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13136 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13146 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13149 && test -z "${cf_tst_cflags}" \
13150 && cf_fix_cppflags=no
13155 if test -n "$cf_new_cflags" ; then
13157 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13158 CFLAGS="${CFLAGS}$cf_new_cflags"
13162 if test -n "$cf_new_cppflags" ; then
13164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13165 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13169 if test -n "$cf_new_extra_cppflags" ; then
13171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13176 cf_add_libs="$cf_pkgconfig_libs"
13177 # Filter out duplicates - this happens with badly-designed ".pc" files...
13178 for cf_add_1lib in $LIBS
13180 for cf_add_2lib in $cf_add_libs
13182 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13188 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13190 LIBS="$cf_add_libs"
13196 { echo "$as_me:13196: WARNING: unable to find SM library" >&5
13197 echo "$as_me: WARNING: unable to find SM library" >&2;}
13200 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13201 test -n "$verbose" && echo " found package xt" 1>&6
13203 echo "${as_me:-configure}:13203: testing found package xt ..." 1>&5
13205 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13206 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13207 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13209 echo "${as_me:-configure}:13209: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13211 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13213 echo "${as_me:-configure}:13213: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13218 cf_new_extra_cppflags=
13220 for cf_add_cflags in $cf_pkgconfig_incs
13222 case $cf_fix_cppflags in
13224 case $cf_add_cflags in
13225 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13226 case $cf_add_cflags in
13228 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13230 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13231 && test -z "${cf_tst_cflags}" \
13232 && cf_fix_cppflags=yes
13234 if test $cf_fix_cppflags = yes ; then
13236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13240 elif test "${cf_tst_cflags}" = "\"'" ; then
13242 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13243 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13249 case "$CPPFLAGS" in
13253 case $cf_add_cflags in
13255 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13257 CPPFLAGS=`echo "$CPPFLAGS" | \
13258 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13259 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13264 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13265 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13272 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13273 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13280 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13281 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13283 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13285 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13286 && test -z "${cf_tst_cflags}" \
13287 && cf_fix_cppflags=no
13292 if test -n "$cf_new_cflags" ; then
13294 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13295 CFLAGS="${CFLAGS}$cf_new_cflags"
13299 if test -n "$cf_new_cppflags" ; then
13301 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13302 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13306 if test -n "$cf_new_extra_cppflags" ; then
13308 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13309 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13313 cf_add_libs="$cf_pkgconfig_libs"
13314 # Filter out duplicates - this happens with badly-designed ".pc" files...
13315 for cf_add_1lib in $LIBS
13317 for cf_add_2lib in $cf_add_libs
13319 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13325 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13327 LIBS="$cf_add_libs"
13333 { echo "$as_me:13333: WARNING: unable to find Xt library" >&5
13334 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13341 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13342 test -n "$verbose" && echo " found package xt" 1>&6
13344 echo "${as_me:-configure}:13344: testing found package xt ..." 1>&5
13346 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13347 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13348 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13350 echo "${as_me:-configure}:13350: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13352 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13354 echo "${as_me:-configure}:13354: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13359 cf_new_extra_cppflags=
13361 for cf_add_cflags in $cf_pkgconfig_incs
13363 case $cf_fix_cppflags in
13365 case $cf_add_cflags in
13366 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13367 case $cf_add_cflags in
13369 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13372 && test -z "${cf_tst_cflags}" \
13373 && cf_fix_cppflags=yes
13375 if test $cf_fix_cppflags = yes ; then
13377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13381 elif test "${cf_tst_cflags}" = "\"'" ; then
13383 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13384 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13390 case "$CPPFLAGS" in
13394 case $cf_add_cflags in
13396 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13398 CPPFLAGS=`echo "$CPPFLAGS" | \
13399 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13400 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13405 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13406 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13413 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13414 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13424 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13426 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13427 && test -z "${cf_tst_cflags}" \
13428 && cf_fix_cppflags=no
13433 if test -n "$cf_new_cflags" ; then
13435 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13436 CFLAGS="${CFLAGS}$cf_new_cflags"
13440 if test -n "$cf_new_cppflags" ; then
13442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13443 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13447 if test -n "$cf_new_extra_cppflags" ; then
13449 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13450 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13454 cf_add_libs="$cf_pkgconfig_libs"
13455 # Filter out duplicates - this happens with badly-designed ".pc" files...
13456 for cf_add_1lib in $LIBS
13458 for cf_add_2lib in $cf_add_libs
13460 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13468 LIBS="$cf_add_libs"
13474 # we have an "xt" package, but it may omit Xt's dependency on X11
13475 echo "$as_me:13475: checking for usable X dependency" >&5
13476 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13477 if test "${cf_cv_xt_x11_compat+set}" = set; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
13481 cat >conftest.$ac_ext <<_ACEOF
13482 #line 13482 "configure"
13483 #include "confdefs.h"
13485 #include <X11/Xlib.h>
13491 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13492 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13493 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13494 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13500 rm -f conftest.$ac_objext conftest$ac_exeext
13501 if { (eval echo "$as_me:13501: \"$ac_link\"") >&5
13502 (eval $ac_link) 2>&5
13504 echo "$as_me:13504: \$? = $ac_status" >&5
13505 (exit $ac_status); } &&
13506 { ac_try='test -s conftest$ac_exeext'
13507 { (eval echo "$as_me:13507: \"$ac_try\"") >&5
13508 (eval $ac_try) 2>&5
13510 echo "$as_me:13510: \$? = $ac_status" >&5
13511 (exit $ac_status); }; }; then
13512 cf_cv_xt_x11_compat=yes
13514 echo "$as_me: failed program was:" >&5
13515 cat conftest.$ac_ext >&5
13516 cf_cv_xt_x11_compat=no
13518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13520 echo "$as_me:13520: result: $cf_cv_xt_x11_compat" >&5
13521 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13522 if test "$cf_cv_xt_x11_compat" = no
13524 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13526 echo "${as_me:-configure}:13526: testing work around broken X11 dependency ..." 1>&5
13528 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13530 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13531 test -n "$verbose" && echo " found package x11" 1>&6
13533 echo "${as_me:-configure}:13533: testing found package x11 ..." 1>&5
13535 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13536 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13537 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13539 echo "${as_me:-configure}:13539: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13541 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13543 echo "${as_me:-configure}:13543: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13548 cf_new_extra_cppflags=
13550 for cf_add_cflags in $cf_pkgconfig_incs
13552 case $cf_fix_cppflags in
13554 case $cf_add_cflags in
13555 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13556 case $cf_add_cflags in
13558 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13561 && test -z "${cf_tst_cflags}" \
13562 && cf_fix_cppflags=yes
13564 if test $cf_fix_cppflags = yes ; then
13566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13570 elif test "${cf_tst_cflags}" = "\"'" ; then
13572 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13573 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13579 case "$CPPFLAGS" in
13583 case $cf_add_cflags in
13585 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13587 CPPFLAGS=`echo "$CPPFLAGS" | \
13588 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13589 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13594 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13595 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13602 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13603 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13613 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13615 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13616 && test -z "${cf_tst_cflags}" \
13617 && cf_fix_cppflags=no
13622 if test -n "$cf_new_cflags" ; then
13624 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13625 CFLAGS="${CFLAGS}$cf_new_cflags"
13629 if test -n "$cf_new_cppflags" ; then
13631 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13632 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13636 if test -n "$cf_new_extra_cppflags" ; then
13638 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13639 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13643 cf_add_libs="$cf_pkgconfig_libs"
13644 # Filter out duplicates - this happens with badly-designed ".pc" files...
13645 for cf_add_1lib in $LIBS
13647 for cf_add_2lib in $cf_add_libs
13649 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13655 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13657 LIBS="$cf_add_libs"
13664 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13666 echo "${as_me:-configure}:13666: testing ...before $LIBS ..." 1>&5
13668 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13669 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13671 echo "${as_me:-configure}:13671: testing ...after $LIBS ..." 1>&5
13679 echo "$as_me:13679: checking for usable X Toolkit package" >&5
13680 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13681 if test "${cf_cv_xt_ice_compat+set}" = set; then
13682 echo $ECHO_N "(cached) $ECHO_C" >&6
13685 cat >conftest.$ac_ext <<_ACEOF
13686 #line 13686 "configure"
13687 #include "confdefs.h"
13689 #include <X11/Shell.h>
13694 int num = IceConnectionNumber(0)
13700 rm -f conftest.$ac_objext conftest$ac_exeext
13701 if { (eval echo "$as_me:13701: \"$ac_link\"") >&5
13702 (eval $ac_link) 2>&5
13704 echo "$as_me:13704: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
13706 { ac_try='test -s conftest$ac_exeext'
13707 { (eval echo "$as_me:13707: \"$ac_try\"") >&5
13708 (eval $ac_try) 2>&5
13710 echo "$as_me:13710: \$? = $ac_status" >&5
13711 (exit $ac_status); }; }; then
13712 cf_cv_xt_ice_compat=yes
13714 echo "$as_me: failed program was:" >&5
13715 cat conftest.$ac_ext >&5
13716 cf_cv_xt_ice_compat=no
13718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13720 echo "$as_me:13720: result: $cf_cv_xt_ice_compat" >&5
13721 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13723 if test "$cf_cv_xt_ice_compat" = no
13725 # workaround for broken ".pc" files used for X Toolkit.
13726 case "x$X_PRE_LIBS" in
13732 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13734 echo "${as_me:-configure}:13734: testing work around broken ICE dependency ..." 1>&5
13736 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13737 test -n "$verbose" && echo " found package ice" 1>&6
13739 echo "${as_me:-configure}:13739: testing found package ice ..." 1>&5
13741 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13742 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13743 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13745 echo "${as_me:-configure}:13745: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13747 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13749 echo "${as_me:-configure}:13749: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13754 cf_new_extra_cppflags=
13756 for cf_add_cflags in $cf_pkgconfig_incs
13758 case $cf_fix_cppflags in
13760 case $cf_add_cflags in
13761 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13762 case $cf_add_cflags in
13764 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13767 && test -z "${cf_tst_cflags}" \
13768 && cf_fix_cppflags=yes
13770 if test $cf_fix_cppflags = yes ; then
13772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13776 elif test "${cf_tst_cflags}" = "\"'" ; then
13778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13785 case "$CPPFLAGS" in
13789 case $cf_add_cflags in
13791 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13793 CPPFLAGS=`echo "$CPPFLAGS" | \
13794 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13795 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13800 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13801 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13808 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13809 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13819 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13822 && test -z "${cf_tst_cflags}" \
13823 && cf_fix_cppflags=no
13828 if test -n "$cf_new_cflags" ; then
13830 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13831 CFLAGS="${CFLAGS}$cf_new_cflags"
13835 if test -n "$cf_new_cppflags" ; then
13837 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13838 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13842 if test -n "$cf_new_extra_cppflags" ; then
13844 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13845 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13849 cf_add_libs="$cf_pkgconfig_libs"
13850 # Filter out duplicates - this happens with badly-designed ".pc" files...
13851 for cf_add_1lib in $LIBS
13853 for cf_add_2lib in $cf_add_libs
13855 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13863 LIBS="$cf_add_libs"
13865 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13866 test -n "$verbose" && echo " found package sm" 1>&6
13868 echo "${as_me:-configure}:13868: testing found package sm ..." 1>&5
13870 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13871 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13872 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13874 echo "${as_me:-configure}:13874: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13876 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13878 echo "${as_me:-configure}:13878: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13883 cf_new_extra_cppflags=
13885 for cf_add_cflags in $cf_pkgconfig_incs
13887 case $cf_fix_cppflags in
13889 case $cf_add_cflags in
13890 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13891 case $cf_add_cflags in
13893 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13895 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13896 && test -z "${cf_tst_cflags}" \
13897 && cf_fix_cppflags=yes
13899 if test $cf_fix_cppflags = yes ; then
13901 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13902 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13905 elif test "${cf_tst_cflags}" = "\"'" ; then
13907 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13908 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13914 case "$CPPFLAGS" in
13918 case $cf_add_cflags in
13920 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13922 CPPFLAGS=`echo "$CPPFLAGS" | \
13923 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13924 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13929 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13930 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13937 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13938 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13945 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13946 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13948 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13950 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13951 && test -z "${cf_tst_cflags}" \
13952 && cf_fix_cppflags=no
13957 if test -n "$cf_new_cflags" ; then
13959 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13960 CFLAGS="${CFLAGS}$cf_new_cflags"
13964 if test -n "$cf_new_cppflags" ; then
13966 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13967 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13971 if test -n "$cf_new_extra_cppflags" ; then
13973 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13974 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13978 cf_add_libs="$cf_pkgconfig_libs"
13979 # Filter out duplicates - this happens with badly-designed ".pc" files...
13980 for cf_add_1lib in $LIBS
13982 for cf_add_2lib in $cf_add_libs
13984 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13990 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13992 LIBS="$cf_add_libs"
14005 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14007 echo "${as_me:-configure}:14007: testing ...before $LIBS ..." 1>&5
14009 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14010 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14012 echo "${as_me:-configure}:14012: testing ...after $LIBS ..." 1>&5
14028 LDFLAGS="$X_LIBS $LDFLAGS"
14030 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14032 echo "${as_me:-configure}:14032: testing checking additions to CFLAGS ..." 1>&5
14034 cf_check_cflags="$CFLAGS"
14035 cf_check_cppflags="$CPPFLAGS"
14040 cf_new_extra_cppflags=
14042 for cf_add_cflags in $X_CFLAGS
14044 case $cf_fix_cppflags in
14046 case $cf_add_cflags in
14047 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14048 case $cf_add_cflags in
14050 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14052 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14053 && test -z "${cf_tst_cflags}" \
14054 && cf_fix_cppflags=yes
14056 if test $cf_fix_cppflags = yes ; then
14058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14062 elif test "${cf_tst_cflags}" = "\"'" ; then
14064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14071 case "$CPPFLAGS" in
14075 case $cf_add_cflags in
14077 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14079 CPPFLAGS=`echo "$CPPFLAGS" | \
14080 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14081 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14086 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14087 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14094 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14095 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14105 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14107 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14108 && test -z "${cf_tst_cflags}" \
14109 && cf_fix_cppflags=no
14114 if test -n "$cf_new_cflags" ; then
14115 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14117 echo "${as_me:-configure}:14117: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14119 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14120 CFLAGS="${CFLAGS}$cf_new_cflags"
14124 if test -n "$cf_new_cppflags" ; then
14125 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14127 echo "${as_me:-configure}:14127: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14130 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14134 if test -n "$cf_new_extra_cppflags" ; then
14135 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14137 echo "${as_me:-configure}:14137: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14139 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14140 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14144 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14145 cat >conftest.$ac_ext <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14152 printf("Hello world");
14157 rm -f conftest.$ac_objext conftest$ac_exeext
14158 if { (eval echo "$as_me:14158: \"$ac_link\"") >&5
14159 (eval $ac_link) 2>&5
14161 echo "$as_me:14161: \$? = $ac_status" >&5
14162 (exit $ac_status); } &&
14163 { ac_try='test -s conftest$ac_exeext'
14164 { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165 (eval $ac_try) 2>&5
14167 echo "$as_me:14167: \$? = $ac_status" >&5
14168 (exit $ac_status); }; }; then
14171 echo "$as_me: failed program was:" >&5
14172 cat conftest.$ac_ext >&5
14173 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14175 echo "${as_me:-configure}:14175: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14177 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14178 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14180 echo "${as_me:-configure}:14180: testing but keeping change to \$CPPFLAGS ..." 1>&5
14183 CFLAGS="$cf_check_flags"
14185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14188 echo "$as_me:14188: checking for XOpenDisplay" >&5
14189 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14190 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14191 echo $ECHO_N "(cached) $ECHO_C" >&6
14193 cat >conftest.$ac_ext <<_ACEOF
14194 #line 14194 "configure"
14195 #include "confdefs.h"
14196 #define XOpenDisplay autoconf_temporary
14197 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14198 #undef XOpenDisplay
14204 /* We use char because int might match the return type of a gcc2
14205 builtin and then its argument prototype would still apply. */
14206 char XOpenDisplay (void);
14212 /* The GNU C library defines stubs for functions which it implements
14213 to always fail with ENOSYS. Some functions are actually named
14214 something starting with __ and the normal name is an alias. */
14215 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14216 #error found stub for XOpenDisplay
14219 return XOpenDisplay ();
14224 rm -f conftest.$ac_objext conftest$ac_exeext
14225 if { (eval echo "$as_me:14225: \"$ac_link\"") >&5
14226 (eval $ac_link) 2>&5
14228 echo "$as_me:14228: \$? = $ac_status" >&5
14229 (exit $ac_status); } &&
14230 { ac_try='test -s conftest$ac_exeext'
14231 { (eval echo "$as_me:14231: \"$ac_try\"") >&5
14232 (eval $ac_try) 2>&5
14234 echo "$as_me:14234: \$? = $ac_status" >&5
14235 (exit $ac_status); }; }; then
14236 ac_cv_func_XOpenDisplay=yes
14238 echo "$as_me: failed program was:" >&5
14239 cat conftest.$ac_ext >&5
14240 ac_cv_func_XOpenDisplay=no
14242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14244 echo "$as_me:14244: result: $ac_cv_func_XOpenDisplay" >&5
14245 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14246 if test $ac_cv_func_XOpenDisplay = yes; then
14250 echo "$as_me:14250: checking for XOpenDisplay in -lX11" >&5
14251 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14252 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14253 echo $ECHO_N "(cached) $ECHO_C" >&6
14255 ac_check_lib_save_LIBS=$LIBS
14256 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14257 cat >conftest.$ac_ext <<_ACEOF
14258 #line 14258 "configure"
14259 #include "confdefs.h"
14261 /* Override any gcc2 internal prototype to avoid an error. */
14265 /* We use char because int might match the return type of a gcc2
14266 builtin and then its argument prototype would still apply. */
14267 char XOpenDisplay ();
14276 rm -f conftest.$ac_objext conftest$ac_exeext
14277 if { (eval echo "$as_me:14277: \"$ac_link\"") >&5
14278 (eval $ac_link) 2>&5
14280 echo "$as_me:14280: \$? = $ac_status" >&5
14281 (exit $ac_status); } &&
14282 { ac_try='test -s conftest$ac_exeext'
14283 { (eval echo "$as_me:14283: \"$ac_try\"") >&5
14284 (eval $ac_try) 2>&5
14286 echo "$as_me:14286: \$? = $ac_status" >&5
14287 (exit $ac_status); }; }; then
14288 ac_cv_lib_X11_XOpenDisplay=yes
14290 echo "$as_me: failed program was:" >&5
14291 cat conftest.$ac_ext >&5
14292 ac_cv_lib_X11_XOpenDisplay=no
14294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14295 LIBS=$ac_check_lib_save_LIBS
14297 echo "$as_me:14297: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14298 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14299 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14301 cf_add_libs="-lX11"
14302 # Filter out duplicates - this happens with badly-designed ".pc" files...
14303 for cf_add_1lib in $LIBS
14305 for cf_add_2lib in $cf_add_libs
14307 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14313 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14315 LIBS="$cf_add_libs"
14321 echo "$as_me:14321: checking for XtAppInitialize" >&5
14322 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14323 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14324 echo $ECHO_N "(cached) $ECHO_C" >&6
14326 cat >conftest.$ac_ext <<_ACEOF
14327 #line 14327 "configure"
14328 #include "confdefs.h"
14329 #define XtAppInitialize autoconf_temporary
14330 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14331 #undef XtAppInitialize
14337 /* We use char because int might match the return type of a gcc2
14338 builtin and then its argument prototype would still apply. */
14339 char XtAppInitialize (void);
14345 /* The GNU C library defines stubs for functions which it implements
14346 to always fail with ENOSYS. Some functions are actually named
14347 something starting with __ and the normal name is an alias. */
14348 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14349 #error found stub for XtAppInitialize
14352 return XtAppInitialize ();
14357 rm -f conftest.$ac_objext conftest$ac_exeext
14358 if { (eval echo "$as_me:14358: \"$ac_link\"") >&5
14359 (eval $ac_link) 2>&5
14361 echo "$as_me:14361: \$? = $ac_status" >&5
14362 (exit $ac_status); } &&
14363 { ac_try='test -s conftest$ac_exeext'
14364 { (eval echo "$as_me:14364: \"$ac_try\"") >&5
14365 (eval $ac_try) 2>&5
14367 echo "$as_me:14367: \$? = $ac_status" >&5
14368 (exit $ac_status); }; }; then
14369 ac_cv_func_XtAppInitialize=yes
14371 echo "$as_me: failed program was:" >&5
14372 cat conftest.$ac_ext >&5
14373 ac_cv_func_XtAppInitialize=no
14375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14377 echo "$as_me:14377: result: $ac_cv_func_XtAppInitialize" >&5
14378 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14379 if test $ac_cv_func_XtAppInitialize = yes; then
14383 echo "$as_me:14383: checking for XtAppInitialize in -lXt" >&5
14384 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14385 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14386 echo $ECHO_N "(cached) $ECHO_C" >&6
14388 ac_check_lib_save_LIBS=$LIBS
14389 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14390 cat >conftest.$ac_ext <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14394 /* Override any gcc2 internal prototype to avoid an error. */
14398 /* We use char because int might match the return type of a gcc2
14399 builtin and then its argument prototype would still apply. */
14400 char XtAppInitialize ();
14404 XtAppInitialize ();
14409 rm -f conftest.$ac_objext conftest$ac_exeext
14410 if { (eval echo "$as_me:14410: \"$ac_link\"") >&5
14411 (eval $ac_link) 2>&5
14413 echo "$as_me:14413: \$? = $ac_status" >&5
14414 (exit $ac_status); } &&
14415 { ac_try='test -s conftest$ac_exeext'
14416 { (eval echo "$as_me:14416: \"$ac_try\"") >&5
14417 (eval $ac_try) 2>&5
14419 echo "$as_me:14419: \$? = $ac_status" >&5
14420 (exit $ac_status); }; }; then
14421 ac_cv_lib_Xt_XtAppInitialize=yes
14423 echo "$as_me: failed program was:" >&5
14424 cat conftest.$ac_ext >&5
14425 ac_cv_lib_Xt_XtAppInitialize=no
14427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14428 LIBS=$ac_check_lib_save_LIBS
14430 echo "$as_me:14430: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14431 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14432 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14434 cat >>confdefs.h <<\EOF
14435 #define HAVE_LIBXT 1
14439 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14446 if test $cf_have_X_LIBS = no ; then
14447 { echo "$as_me:14447: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14448 test program. You will have to check and add the proper libraries by hand
14450 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14451 test program. You will have to check and add the proper libraries by hand
14452 to makefile." >&2;}
14455 cf_x_athena_root=$cf_x_athena
14458 for cf_path in default \
14459 /usr/contrib/X11R6 \
14460 /usr/contrib/X11R5 \
14464 if test -z "$cf_x_athena_inc" ; then
14465 cf_save="$CPPFLAGS"
14466 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14467 if test $cf_path != default ; then
14468 CPPFLAGS="$cf_save"
14470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14471 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14473 echo "$as_me:14473: checking for $cf_test in $cf_path" >&5
14474 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14476 echo "$as_me:14476: checking for $cf_test" >&5
14477 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14479 cat >conftest.$ac_ext <<_ACEOF
14480 #line 14480 "configure"
14481 #include "confdefs.h"
14483 #include <X11/Intrinsic.h>
14484 #include <$cf_test>
14493 rm -f conftest.$ac_objext
14494 if { (eval echo "$as_me:14494: \"$ac_compile\"") >&5
14495 (eval $ac_compile) 2>&5
14497 echo "$as_me:14497: \$? = $ac_status" >&5
14498 (exit $ac_status); } &&
14499 { ac_try='test -s conftest.$ac_objext'
14500 { (eval echo "$as_me:14500: \"$ac_try\"") >&5
14501 (eval $ac_try) 2>&5
14503 echo "$as_me:14503: \$? = $ac_status" >&5
14504 (exit $ac_status); }; }; then
14507 echo "$as_me: failed program was:" >&5
14508 cat conftest.$ac_ext >&5
14511 rm -f conftest.$ac_objext conftest.$ac_ext
14512 echo "$as_me:14512: result: $cf_result" >&5
14513 echo "${ECHO_T}$cf_result" >&6
14514 if test "$cf_result" = yes ; then
14515 cf_x_athena_inc=$cf_path
14518 CPPFLAGS="$cf_save"
14523 if test -z "$cf_x_athena_inc" ; then
14524 { echo "$as_me:14524: WARNING: Unable to successfully find Athena header files with test program" >&5
14525 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14526 elif test "$cf_x_athena_inc" != default ; then
14528 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14529 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14533 cf_x_athena_root=$cf_x_athena
14536 for cf_path in default \
14537 /usr/contrib/X11R6 \
14538 /usr/contrib/X11R5 \
14543 ${cf_x_athena_root} \
14544 ${cf_x_athena_root}7 \
14545 ${cf_x_athena_root}6
14548 "-l$cf_lib -lXmu" \
14549 "-l$cf_lib -lXpm -lXmu" \
14550 "-l${cf_lib}_s -lXmu_s"
14552 if test -z "$cf_x_athena_lib" ; then
14554 cf_test=XawSimpleMenuAddGlobalActions
14555 if test $cf_path != default ; then
14557 cf_add_libs="-L$cf_path/lib $cf_libs"
14558 # Filter out duplicates - this happens with badly-designed ".pc" files...
14559 for cf_add_1lib in $LIBS
14561 for cf_add_2lib in $cf_add_libs
14563 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14569 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14571 LIBS="$cf_add_libs"
14573 echo "$as_me:14573: checking for $cf_libs in $cf_path" >&5
14574 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14577 cf_add_libs="$cf_libs"
14578 # Filter out duplicates - this happens with badly-designed ".pc" files...
14579 for cf_add_1lib in $LIBS
14581 for cf_add_2lib in $cf_add_libs
14583 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14589 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14591 LIBS="$cf_add_libs"
14593 echo "$as_me:14593: checking for $cf_test in $cf_libs" >&5
14594 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14596 cat >conftest.$ac_ext <<_ACEOF
14597 #line 14597 "configure"
14598 #include "confdefs.h"
14600 #include <X11/Intrinsic.h>
14601 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14607 $cf_test((XtAppContext) 0)
14612 rm -f conftest.$ac_objext conftest$ac_exeext
14613 if { (eval echo "$as_me:14613: \"$ac_link\"") >&5
14614 (eval $ac_link) 2>&5
14616 echo "$as_me:14616: \$? = $ac_status" >&5
14617 (exit $ac_status); } &&
14618 { ac_try='test -s conftest$ac_exeext'
14619 { (eval echo "$as_me:14619: \"$ac_try\"") >&5
14620 (eval $ac_try) 2>&5
14622 echo "$as_me:14622: \$? = $ac_status" >&5
14623 (exit $ac_status); }; }; then
14626 echo "$as_me: failed program was:" >&5
14627 cat conftest.$ac_ext >&5
14630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14631 echo "$as_me:14631: result: $cf_result" >&5
14632 echo "${ECHO_T}$cf_result" >&6
14633 if test "$cf_result" = yes ; then
14634 cf_x_athena_lib="$cf_libs"
14640 test -n "$cf_x_athena_lib" && break
14644 if test -z "$cf_x_athena_lib" ; then
14645 { { echo "$as_me:14645: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14646 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14647 { (exit 1); exit 1; }; }
14650 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14652 cat >>confdefs.h <<EOF
14653 #define $cf_x_athena_LIBS 1
14658 if test -n "$ac_tool_prefix"; then
14659 for ac_prog in xcurses-config
14661 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14662 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14663 echo "$as_me:14663: checking for $ac_word" >&5
14664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14665 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14666 echo $ECHO_N "(cached) $ECHO_C" >&6
14668 if test -n "$XCURSES_CONFIG"; then
14669 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14671 ac_save_IFS=$IFS; IFS=$ac_path_separator
14673 for ac_dir in $ac_dummy; do
14675 test -z "$ac_dir" && ac_dir=.
14676 $as_executable_p "$ac_dir/$ac_word" || continue
14677 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14678 echo "$as_me:14678: found $ac_dir/$ac_word" >&5
14684 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14685 if test -n "$XCURSES_CONFIG"; then
14686 echo "$as_me:14686: result: $XCURSES_CONFIG" >&5
14687 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14689 echo "$as_me:14689: result: no" >&5
14690 echo "${ECHO_T}no" >&6
14693 test -n "$XCURSES_CONFIG" && break
14696 if test -z "$XCURSES_CONFIG"; then
14697 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14698 for ac_prog in xcurses-config
14700 # Extract the first word of "$ac_prog", so it can be a program name with args.
14701 set dummy $ac_prog; ac_word=$2
14702 echo "$as_me:14702: checking for $ac_word" >&5
14703 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14704 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14705 echo $ECHO_N "(cached) $ECHO_C" >&6
14707 if test -n "$ac_ct_XCURSES_CONFIG"; then
14708 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14710 ac_save_IFS=$IFS; IFS=$ac_path_separator
14712 for ac_dir in $ac_dummy; do
14714 test -z "$ac_dir" && ac_dir=.
14715 $as_executable_p "$ac_dir/$ac_word" || continue
14716 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14717 echo "$as_me:14717: found $ac_dir/$ac_word" >&5
14723 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14724 if test -n "$ac_ct_XCURSES_CONFIG"; then
14725 echo "$as_me:14725: result: $ac_ct_XCURSES_CONFIG" >&5
14726 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14728 echo "$as_me:14728: result: no" >&5
14729 echo "${ECHO_T}no" >&6
14732 test -n "$ac_ct_XCURSES_CONFIG" && break
14734 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14736 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14739 if test "$XCURSES_CONFIG" != none ; then
14744 cf_new_extra_cppflags=
14746 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14748 case $cf_fix_cppflags in
14750 case $cf_add_cflags in
14751 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14752 case $cf_add_cflags in
14754 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14756 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14757 && test -z "${cf_tst_cflags}" \
14758 && cf_fix_cppflags=yes
14760 if test $cf_fix_cppflags = yes ; then
14762 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14763 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14766 elif test "${cf_tst_cflags}" = "\"'" ; then
14768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14775 case "$CPPFLAGS" in
14779 case $cf_add_cflags in
14781 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14783 CPPFLAGS=`echo "$CPPFLAGS" | \
14784 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14785 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14790 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14791 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14798 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14799 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14806 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14807 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14809 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14811 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14812 && test -z "${cf_tst_cflags}" \
14813 && cf_fix_cppflags=no
14818 if test -n "$cf_new_cflags" ; then
14820 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14821 CFLAGS="${CFLAGS}$cf_new_cflags"
14825 if test -n "$cf_new_cppflags" ; then
14827 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14828 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14832 if test -n "$cf_new_extra_cppflags" ; then
14834 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14835 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14839 cf_add_libs="`$XCURSES_CONFIG --libs`"
14840 # Filter out duplicates - this happens with badly-designed ".pc" files...
14841 for cf_add_1lib in $LIBS
14843 for cf_add_2lib in $cf_add_libs
14845 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14851 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14853 LIBS="$cf_add_libs"
14855 cf_cv_lib_XCurses=yes
14859 LDFLAGS="$LDFLAGS $X_LIBS"
14861 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14863 echo "${as_me:-configure}:14863: testing checking additions to CFLAGS ..." 1>&5
14865 cf_check_cflags="$CFLAGS"
14866 cf_check_cppflags="$CPPFLAGS"
14871 cf_new_extra_cppflags=
14873 for cf_add_cflags in $X_CFLAGS
14875 case $cf_fix_cppflags in
14877 case $cf_add_cflags in
14878 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14879 case $cf_add_cflags in
14881 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14883 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14884 && test -z "${cf_tst_cflags}" \
14885 && cf_fix_cppflags=yes
14887 if test $cf_fix_cppflags = yes ; then
14889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14893 elif test "${cf_tst_cflags}" = "\"'" ; then
14895 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14896 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14902 case "$CPPFLAGS" in
14906 case $cf_add_cflags in
14908 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14910 CPPFLAGS=`echo "$CPPFLAGS" | \
14911 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14912 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14917 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14918 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14925 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14926 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14936 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14938 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14939 && test -z "${cf_tst_cflags}" \
14940 && cf_fix_cppflags=no
14945 if test -n "$cf_new_cflags" ; then
14946 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14948 echo "${as_me:-configure}:14948: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14950 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14951 CFLAGS="${CFLAGS}$cf_new_cflags"
14955 if test -n "$cf_new_cppflags" ; then
14956 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14958 echo "${as_me:-configure}:14958: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14960 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14961 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14965 if test -n "$cf_new_extra_cppflags" ; then
14966 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14968 echo "${as_me:-configure}:14968: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14970 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14971 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14975 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14976 cat >conftest.$ac_ext <<_ACEOF
14977 #line 14977 "configure"
14978 #include "confdefs.h"
14983 printf("Hello world");
14988 rm -f conftest.$ac_objext conftest$ac_exeext
14989 if { (eval echo "$as_me:14989: \"$ac_link\"") >&5
14990 (eval $ac_link) 2>&5
14992 echo "$as_me:14992: \$? = $ac_status" >&5
14993 (exit $ac_status); } &&
14994 { ac_try='test -s conftest$ac_exeext'
14995 { (eval echo "$as_me:14995: \"$ac_try\"") >&5
14996 (eval $ac_try) 2>&5
14998 echo "$as_me:14998: \$? = $ac_status" >&5
14999 (exit $ac_status); }; }; then
15002 echo "$as_me: failed program was:" >&5
15003 cat conftest.$ac_ext >&5
15004 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15006 echo "${as_me:-configure}:15006: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15008 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15009 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15011 echo "${as_me:-configure}:15011: testing but keeping change to \$CPPFLAGS ..." 1>&5
15014 CFLAGS="$cf_check_flags"
15016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15019 echo "$as_me:15019: checking for XOpenDisplay in -lX11" >&5
15020 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15021 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15022 echo $ECHO_N "(cached) $ECHO_C" >&6
15024 ac_check_lib_save_LIBS=$LIBS
15025 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15026 cat >conftest.$ac_ext <<_ACEOF
15027 #line 15027 "configure"
15028 #include "confdefs.h"
15030 /* Override any gcc2 internal prototype to avoid an error. */
15034 /* We use char because int might match the return type of a gcc2
15035 builtin and then its argument prototype would still apply. */
15036 char XOpenDisplay ();
15045 rm -f conftest.$ac_objext conftest$ac_exeext
15046 if { (eval echo "$as_me:15046: \"$ac_link\"") >&5
15047 (eval $ac_link) 2>&5
15049 echo "$as_me:15049: \$? = $ac_status" >&5
15050 (exit $ac_status); } &&
15051 { ac_try='test -s conftest$ac_exeext'
15052 { (eval echo "$as_me:15052: \"$ac_try\"") >&5
15053 (eval $ac_try) 2>&5
15055 echo "$as_me:15055: \$? = $ac_status" >&5
15056 (exit $ac_status); }; }; then
15057 ac_cv_lib_X11_XOpenDisplay=yes
15059 echo "$as_me: failed program was:" >&5
15060 cat conftest.$ac_ext >&5
15061 ac_cv_lib_X11_XOpenDisplay=no
15063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15064 LIBS=$ac_check_lib_save_LIBS
15066 echo "$as_me:15066: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15067 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15068 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15070 cf_add_libs="-lX11"
15071 # Filter out duplicates - this happens with badly-designed ".pc" files...
15072 for cf_add_1lib in $LIBS
15074 for cf_add_2lib in $cf_add_libs
15076 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15082 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15084 LIBS="$cf_add_libs"
15088 echo "$as_me:15088: checking for XCurses library" >&5
15089 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15090 if test "${cf_cv_lib_XCurses+set}" = set; then
15091 echo $ECHO_N "(cached) $ECHO_C" >&6
15094 cf_add_libs="-lXCurses"
15095 # Filter out duplicates - this happens with badly-designed ".pc" files...
15096 for cf_add_1lib in $LIBS
15098 for cf_add_2lib in $cf_add_libs
15100 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15106 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15108 LIBS="$cf_add_libs"
15110 cat >conftest.$ac_ext <<_ACEOF
15111 #line 15111 "configure"
15112 #include "confdefs.h"
15114 #include <xcurses.h>
15115 char *XCursesProgramName = "test";
15125 rm -f conftest.$ac_objext conftest$ac_exeext
15126 if { (eval echo "$as_me:15126: \"$ac_link\"") >&5
15127 (eval $ac_link) 2>&5
15129 echo "$as_me:15129: \$? = $ac_status" >&5
15130 (exit $ac_status); } &&
15131 { ac_try='test -s conftest$ac_exeext'
15132 { (eval echo "$as_me:15132: \"$ac_try\"") >&5
15133 (eval $ac_try) 2>&5
15135 echo "$as_me:15135: \$? = $ac_status" >&5
15136 (exit $ac_status); }; }; then
15137 cf_cv_lib_XCurses=yes
15139 echo "$as_me: failed program was:" >&5
15140 cat conftest.$ac_ext >&5
15141 cf_cv_lib_XCurses=no
15143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15146 echo "$as_me:15146: result: $cf_cv_lib_XCurses" >&5
15147 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15151 if test $cf_cv_lib_XCurses = yes ; then
15153 cat >>confdefs.h <<\EOF
15157 cat >>confdefs.h <<\EOF
15161 echo "$as_me:15161: checking for xcurses.h" >&5
15162 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15163 if test "${ac_cv_header_xcurses_h+set}" = set; then
15164 echo $ECHO_N "(cached) $ECHO_C" >&6
15166 cat >conftest.$ac_ext <<_ACEOF
15167 #line 15167 "configure"
15168 #include "confdefs.h"
15169 #include <xcurses.h>
15171 if { (eval echo "$as_me:15171: \"$ac_cpp conftest.$ac_ext\"") >&5
15172 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15174 egrep -v '^ *\+' conftest.er1 >conftest.err
15176 cat conftest.err >&5
15177 echo "$as_me:15177: \$? = $ac_status" >&5
15178 (exit $ac_status); } >/dev/null; then
15179 if test -s conftest.err; then
15180 ac_cpp_err=$ac_c_preproc_warn_flag
15187 if test -z "$ac_cpp_err"; then
15188 ac_cv_header_xcurses_h=yes
15190 echo "$as_me: failed program was:" >&5
15191 cat conftest.$ac_ext >&5
15192 ac_cv_header_xcurses_h=no
15194 rm -f conftest.err conftest.$ac_ext
15196 echo "$as_me:15196: result: $ac_cv_header_xcurses_h" >&5
15197 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15198 if test $ac_cv_header_xcurses_h = yes; then
15200 cat >>confdefs.h <<\EOF
15201 #define HAVE_XCURSES 1
15207 { { echo "$as_me:15207: error: Cannot link with XCurses" >&5
15208 echo "$as_me: error: Cannot link with XCurses" >&2;}
15209 { (exit 1); exit 1; }; }
15214 { { echo "$as_me:15214: error: unexpected screen-value: $cf_cv_screen" >&5
15215 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15216 { (exit 1); exit 1; }; }
15220 : ${cf_nculib_root:=$cf_cv_screen}
15221 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15222 echo "$as_me:15222: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15223 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15224 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15225 echo $ECHO_N "(cached) $ECHO_C" >&6
15227 ac_check_lib_save_LIBS=$LIBS
15228 LIBS="-l$cf_nculib_root $LIBS"
15229 cat >conftest.$ac_ext <<_ACEOF
15230 #line 15230 "configure"
15231 #include "confdefs.h"
15233 /* Override any gcc2 internal prototype to avoid an error. */
15237 /* We use char because int might match the return type of a gcc2
15238 builtin and then its argument prototype would still apply. */
15239 char _nc_init_pthreads ();
15243 _nc_init_pthreads ();
15248 rm -f conftest.$ac_objext conftest$ac_exeext
15249 if { (eval echo "$as_me:15249: \"$ac_link\"") >&5
15250 (eval $ac_link) 2>&5
15252 echo "$as_me:15252: \$? = $ac_status" >&5
15253 (exit $ac_status); } &&
15254 { ac_try='test -s conftest$ac_exeext'
15255 { (eval echo "$as_me:15255: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15258 echo "$as_me:15258: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }; then
15260 eval "$as_ac_Lib=yes"
15262 echo "$as_me: failed program was:" >&5
15263 cat conftest.$ac_ext >&5
15264 eval "$as_ac_Lib=no"
15266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15267 LIBS=$ac_check_lib_save_LIBS
15269 echo "$as_me:15269: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15270 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15271 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15272 cf_cv_ncurses_pthreads=yes
15274 cf_cv_ncurses_pthreads=no
15277 if test "$cf_cv_ncurses_pthreads" = yes
15280 cf_add_libs="-lpthread"
15281 # Filter out duplicates - this happens with badly-designed ".pc" files...
15282 for cf_add_1lib in $LIBS
15284 for cf_add_2lib in $cf_add_libs
15286 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15292 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15294 LIBS="$cf_add_libs"
15298 case $cf_cv_screen in
15300 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15304 echo "$as_me:15304: checking for X11 rgb file" >&5
15305 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15307 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15308 if test "${with_x11_rgb+set}" = set; then
15309 withval="$with_x11_rgb"
15315 if test "x$RGB_PATH" = xauto
15317 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15319 /opt/local/share/X11/rgb.txt \
15320 /opt/X11/share/X11/rgb.txt \
15321 /usr/share/X11/rgb.txt \
15322 /usr/X11/share/X11/rgb.txt \
15323 /usr/X11/lib/X11/rgb.txt \
15324 /usr/lib/X11/rgb.txt \
15326 /usr/pkg/lib/X11/rgb.txt \
15327 /usr/X11R7/lib/X11/rgb.txt \
15328 /usr/X11R6/lib/X11/rgb.txt \
15329 /usr/X11R5/lib/X11/rgb.txt \
15330 /usr/X11R4/lib/X11/rgb.txt \
15331 /usr/local/lib/X11/rgb.txt \
15332 /usr/local/share/X11/rgb.txt \
15333 /usr/lib64/X11/rgb.txt
15335 if test -f "$cf_path" ; then
15336 RGB_PATH="$cf_path"
15343 if test "x$prefix" != xNONE; then
15344 cf_path_syntax="$prefix"
15346 cf_path_syntax="$ac_default_prefix"
15349 case ".$cf_path" in
15350 (.\$\(*\)*|.\'*\'*)
15354 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15356 (.\${*prefix}*|.\${*dir}*)
15357 eval cf_path="$cf_path"
15358 case ".$cf_path" in
15360 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15365 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15368 { { echo "$as_me:15368: error: expected a pathname, not \"$cf_path\"" >&5
15369 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15370 { (exit 1); exit 1; }; }
15376 echo "$as_me:15376: result: $RGB_PATH" >&5
15377 echo "${ECHO_T}$RGB_PATH" >&6
15379 cat >>confdefs.h <<EOF
15380 #define RGB_PATH "$cf_path"
15384 if test "$RGB_PATH" = no
15391 case $cf_cv_screen in
15393 cf_default_panel=no
15396 cf_default_tinfo=no
15398 (xcurses|bsdcurses)
15399 cf_default_panel=no
15402 cf_default_tinfo=yes
15405 cf_default_panel=yes
15406 cf_default_form=yes
15407 cf_default_menu=yes
15408 cf_default_tinfo=yes
15409 case $cf_cv_screen in
15411 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15417 echo "$as_me:15417: checking if you want to check for panel functions" >&5
15418 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15420 # Check whether --enable-panel or --disable-panel was given.
15421 if test "${enable_panel+set}" = set; then
15422 enableval="$enable_panel"
15423 test "$enableval" != no && enableval=yes
15424 if test "$enableval" != "yes" ; then
15427 cf_enable_panel=$cf_default_panel
15431 cf_enable_panel=$cf_default_panel
15434 echo "$as_me:15434: result: $cf_enable_panel" >&5
15435 echo "${ECHO_T}$cf_enable_panel" >&6
15436 if test $cf_enable_panel = yes
15439 cf_have_curses_lib=no
15441 : ${NCURSES_CONFIG_PKG:=none}
15442 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15444 elif test "x${PKG_CONFIG:=none}" != xnone; then
15445 echo "$as_me:15445: checking pkg-config for panel$cf_cv_libtype" >&5
15446 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15447 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15448 echo "$as_me:15448: result: yes" >&5
15449 echo "${ECHO_T}yes" >&6
15451 echo "$as_me:15451: checking if the panel$cf_cv_libtype package files work" >&5
15452 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15454 cf_save_CPPFLAGS="$CPPFLAGS"
15455 cf_save_LIBS="$LIBS"
15460 cf_new_extra_cppflags=
15462 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15464 case $cf_fix_cppflags in
15466 case $cf_add_cflags in
15467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15468 case $cf_add_cflags in
15470 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15473 && test -z "${cf_tst_cflags}" \
15474 && cf_fix_cppflags=yes
15476 if test $cf_fix_cppflags = yes ; then
15478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15482 elif test "${cf_tst_cflags}" = "\"'" ; then
15484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15491 case "$CPPFLAGS" in
15495 case $cf_add_cflags in
15497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15499 CPPFLAGS=`echo "$CPPFLAGS" | \
15500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15525 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15528 && test -z "${cf_tst_cflags}" \
15529 && cf_fix_cppflags=no
15534 if test -n "$cf_new_cflags" ; then
15536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15537 CFLAGS="${CFLAGS}$cf_new_cflags"
15541 if test -n "$cf_new_cppflags" ; then
15543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15548 if test -n "$cf_new_extra_cppflags" ; then
15550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15555 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15556 # Filter out duplicates - this happens with badly-designed ".pc" files...
15557 for cf_add_1lib in $LIBS
15559 for cf_add_2lib in $cf_add_libs
15561 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15569 LIBS="$cf_add_libs"
15571 cat >conftest.$ac_ext <<_ACEOF
15572 #line 15572 "configure"
15573 #include "confdefs.h"
15578 (void) new_panel ( 0 );
15583 rm -f conftest.$ac_objext conftest$ac_exeext
15584 if { (eval echo "$as_me:15584: \"$ac_link\"") >&5
15585 (eval $ac_link) 2>&5
15587 echo "$as_me:15587: \$? = $ac_status" >&5
15588 (exit $ac_status); } &&
15589 { ac_try='test -s conftest$ac_exeext'
15590 { (eval echo "$as_me:15590: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15593 echo "$as_me:15593: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
15595 if test "$cross_compiling" = yes; then
15596 cf_have_curses_lib=maybe
15598 cat >conftest.$ac_ext <<_ACEOF
15599 #line 15599 "configure"
15600 #include "confdefs.h"
15603 { (void) new_panel ( 0 ); return 0; }
15605 rm -f conftest$ac_exeext
15606 if { (eval echo "$as_me:15606: \"$ac_link\"") >&5
15607 (eval $ac_link) 2>&5
15609 echo "$as_me:15609: \$? = $ac_status" >&5
15610 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15611 { (eval echo "$as_me:15611: \"$ac_try\"") >&5
15612 (eval $ac_try) 2>&5
15614 echo "$as_me:15614: \$? = $ac_status" >&5
15615 (exit $ac_status); }; }; then
15616 cf_have_curses_lib=yes
15618 echo "$as_me: program exited with status $ac_status" >&5
15619 echo "$as_me: failed program was:" >&5
15620 cat conftest.$ac_ext >&5
15621 cf_have_curses_lib=no
15623 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15626 echo "$as_me: failed program was:" >&5
15627 cat conftest.$ac_ext >&5
15628 cf_have_curses_lib=no
15630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15631 echo "$as_me:15631: result: $cf_have_curses_lib" >&5
15632 echo "${ECHO_T}$cf_have_curses_lib" >&6
15633 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15634 if test "$cf_have_curses_lib" != "yes"
15636 CPPFLAGS="$cf_save_CPPFLAGS"
15637 LIBS="$cf_save_LIBS"
15640 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15642 cat >>confdefs.h <<EOF
15643 #define $cf_upper 1
15649 if test "$cf_have_curses_lib" = no; then
15650 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15651 echo "$as_me:15651: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15652 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15653 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15654 echo $ECHO_N "(cached) $ECHO_C" >&6
15656 ac_check_lib_save_LIBS=$LIBS
15657 LIBS="-lpanel$cf_cv_libtype $LIBS"
15658 cat >conftest.$ac_ext <<_ACEOF
15659 #line 15659 "configure"
15660 #include "confdefs.h"
15662 /* Override any gcc2 internal prototype to avoid an error. */
15666 /* We use char because int might match the return type of a gcc2
15667 builtin and then its argument prototype would still apply. */
15677 rm -f conftest.$ac_objext conftest$ac_exeext
15678 if { (eval echo "$as_me:15678: \"$ac_link\"") >&5
15679 (eval $ac_link) 2>&5
15681 echo "$as_me:15681: \$? = $ac_status" >&5
15682 (exit $ac_status); } &&
15683 { ac_try='test -s conftest$ac_exeext'
15684 { (eval echo "$as_me:15684: \"$ac_try\"") >&5
15685 (eval $ac_try) 2>&5
15687 echo "$as_me:15687: \$? = $ac_status" >&5
15688 (exit $ac_status); }; }; then
15689 eval "$as_ac_Lib=yes"
15691 echo "$as_me: failed program was:" >&5
15692 cat conftest.$ac_ext >&5
15693 eval "$as_ac_Lib=no"
15695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15696 LIBS=$ac_check_lib_save_LIBS
15698 echo "$as_me:15698: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15699 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15700 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15702 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15704 cf_add_libs="-lpanel$cf_cv_libtype"
15705 # Filter out duplicates - this happens with badly-designed ".pc" files...
15706 for cf_add_1lib in $LIBS
15708 for cf_add_2lib in $cf_add_libs
15710 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15716 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15718 LIBS="$cf_add_libs"
15720 cat >>confdefs.h <<EOF
15721 #define $cf_upper 1
15728 cf_curses_headers="$cf_curses_headers panel.h"
15731 echo "$as_me:15731: checking if you want to check for menu functions" >&5
15732 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15734 # Check whether --enable-menu or --disable-menu was given.
15735 if test "${enable_menu+set}" = set; then
15736 enableval="$enable_menu"
15737 test "$enableval" != no && enableval=yes
15738 if test "$enableval" != "yes" ; then
15741 cf_enable_menu=$cf_default_menu
15745 cf_enable_menu=$cf_default_menu
15748 echo "$as_me:15748: result: $cf_enable_menu" >&5
15749 echo "${ECHO_T}$cf_enable_menu" >&6
15750 if test $cf_enable_menu = yes
15752 case $cf_cv_screen in
15757 echo "$as_me:15757: checking for NetBSD menu.h" >&5
15758 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15759 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15760 echo $ECHO_N "(cached) $ECHO_C" >&6
15763 cat >conftest.$ac_ext <<_ACEOF
15764 #line 15764 "configure"
15765 #include "confdefs.h"
15767 #include <${cf_cv_ncurses_header:-curses.h}>
15775 int y = menu->max_item_width;
15781 rm -f conftest.$ac_objext
15782 if { (eval echo "$as_me:15782: \"$ac_compile\"") >&5
15783 (eval $ac_compile) 2>&5
15785 echo "$as_me:15785: \$? = $ac_status" >&5
15786 (exit $ac_status); } &&
15787 { ac_try='test -s conftest.$ac_objext'
15788 { (eval echo "$as_me:15788: \"$ac_try\"") >&5
15789 (eval $ac_try) 2>&5
15791 echo "$as_me:15791: \$? = $ac_status" >&5
15792 (exit $ac_status); }; }; then
15793 cf_cv_netbsd_menu_h=yes
15796 echo "$as_me: failed program was:" >&5
15797 cat conftest.$ac_ext >&5
15798 cf_cv_netbsd_menu_h=no
15800 rm -f conftest.$ac_objext conftest.$ac_ext
15803 echo "$as_me:15803: result: $cf_cv_netbsd_menu_h" >&5
15804 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15806 test "$cf_cv_netbsd_menu_h" = yes &&
15807 cat >>confdefs.h <<\EOF
15808 #define HAVE_NETBSD_MENU_H 1
15814 cf_have_curses_lib=no
15816 : ${NCURSES_CONFIG_PKG:=none}
15817 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15819 elif test "x${PKG_CONFIG:=none}" != xnone; then
15820 echo "$as_me:15820: checking pkg-config for menu$cf_cv_libtype" >&5
15821 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15822 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15823 echo "$as_me:15823: result: yes" >&5
15824 echo "${ECHO_T}yes" >&6
15826 echo "$as_me:15826: checking if the menu$cf_cv_libtype package files work" >&5
15827 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
15829 cf_save_CPPFLAGS="$CPPFLAGS"
15830 cf_save_LIBS="$LIBS"
15835 cf_new_extra_cppflags=
15837 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
15839 case $cf_fix_cppflags in
15841 case $cf_add_cflags in
15842 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15843 case $cf_add_cflags in
15845 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15847 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15848 && test -z "${cf_tst_cflags}" \
15849 && cf_fix_cppflags=yes
15851 if test $cf_fix_cppflags = yes ; then
15853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15857 elif test "${cf_tst_cflags}" = "\"'" ; then
15859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15866 case "$CPPFLAGS" in
15870 case $cf_add_cflags in
15872 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15874 CPPFLAGS=`echo "$CPPFLAGS" | \
15875 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15876 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15881 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15882 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15889 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15890 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15897 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15898 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15900 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15902 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15903 && test -z "${cf_tst_cflags}" \
15904 && cf_fix_cppflags=no
15909 if test -n "$cf_new_cflags" ; then
15911 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15912 CFLAGS="${CFLAGS}$cf_new_cflags"
15916 if test -n "$cf_new_cppflags" ; then
15918 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15919 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15923 if test -n "$cf_new_extra_cppflags" ; then
15925 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15926 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15930 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
15931 # Filter out duplicates - this happens with badly-designed ".pc" files...
15932 for cf_add_1lib in $LIBS
15934 for cf_add_2lib in $cf_add_libs
15936 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15942 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15944 LIBS="$cf_add_libs"
15946 cat >conftest.$ac_ext <<_ACEOF
15947 #line 15947 "configure"
15948 #include "confdefs.h"
15953 (void) menu_driver ( 0,0 );
15958 rm -f conftest.$ac_objext conftest$ac_exeext
15959 if { (eval echo "$as_me:15959: \"$ac_link\"") >&5
15960 (eval $ac_link) 2>&5
15962 echo "$as_me:15962: \$? = $ac_status" >&5
15963 (exit $ac_status); } &&
15964 { ac_try='test -s conftest$ac_exeext'
15965 { (eval echo "$as_me:15965: \"$ac_try\"") >&5
15966 (eval $ac_try) 2>&5
15968 echo "$as_me:15968: \$? = $ac_status" >&5
15969 (exit $ac_status); }; }; then
15970 if test "$cross_compiling" = yes; then
15971 cf_have_curses_lib=maybe
15973 cat >conftest.$ac_ext <<_ACEOF
15974 #line 15974 "configure"
15975 #include "confdefs.h"
15978 { (void) menu_driver ( 0,0 ); return 0; }
15980 rm -f conftest$ac_exeext
15981 if { (eval echo "$as_me:15981: \"$ac_link\"") >&5
15982 (eval $ac_link) 2>&5
15984 echo "$as_me:15984: \$? = $ac_status" >&5
15985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15986 { (eval echo "$as_me:15986: \"$ac_try\"") >&5
15987 (eval $ac_try) 2>&5
15989 echo "$as_me:15989: \$? = $ac_status" >&5
15990 (exit $ac_status); }; }; then
15991 cf_have_curses_lib=yes
15993 echo "$as_me: program exited with status $ac_status" >&5
15994 echo "$as_me: failed program was:" >&5
15995 cat conftest.$ac_ext >&5
15996 cf_have_curses_lib=no
15998 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16001 echo "$as_me: failed program was:" >&5
16002 cat conftest.$ac_ext >&5
16003 cf_have_curses_lib=no
16005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16006 echo "$as_me:16006: result: $cf_have_curses_lib" >&5
16007 echo "${ECHO_T}$cf_have_curses_lib" >&6
16008 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16009 if test "$cf_have_curses_lib" != "yes"
16011 CPPFLAGS="$cf_save_CPPFLAGS"
16012 LIBS="$cf_save_LIBS"
16015 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16017 cat >>confdefs.h <<EOF
16018 #define $cf_upper 1
16024 if test "$cf_have_curses_lib" = no; then
16025 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16026 echo "$as_me:16026: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16027 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16028 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16029 echo $ECHO_N "(cached) $ECHO_C" >&6
16031 ac_check_lib_save_LIBS=$LIBS
16032 LIBS="-lmenu$cf_cv_libtype $LIBS"
16033 cat >conftest.$ac_ext <<_ACEOF
16034 #line 16034 "configure"
16035 #include "confdefs.h"
16037 /* Override any gcc2 internal prototype to avoid an error. */
16041 /* We use char because int might match the return type of a gcc2
16042 builtin and then its argument prototype would still apply. */
16043 char menu_driver ();
16052 rm -f conftest.$ac_objext conftest$ac_exeext
16053 if { (eval echo "$as_me:16053: \"$ac_link\"") >&5
16054 (eval $ac_link) 2>&5
16056 echo "$as_me:16056: \$? = $ac_status" >&5
16057 (exit $ac_status); } &&
16058 { ac_try='test -s conftest$ac_exeext'
16059 { (eval echo "$as_me:16059: \"$ac_try\"") >&5
16060 (eval $ac_try) 2>&5
16062 echo "$as_me:16062: \$? = $ac_status" >&5
16063 (exit $ac_status); }; }; then
16064 eval "$as_ac_Lib=yes"
16066 echo "$as_me: failed program was:" >&5
16067 cat conftest.$ac_ext >&5
16068 eval "$as_ac_Lib=no"
16070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16071 LIBS=$ac_check_lib_save_LIBS
16073 echo "$as_me:16073: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16074 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16075 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16077 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16079 cf_add_libs="-lmenu$cf_cv_libtype"
16080 # Filter out duplicates - this happens with badly-designed ".pc" files...
16081 for cf_add_1lib in $LIBS
16083 for cf_add_2lib in $cf_add_libs
16085 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16091 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16093 LIBS="$cf_add_libs"
16095 cat >>confdefs.h <<EOF
16096 #define $cf_upper 1
16103 cf_curses_headers="$cf_curses_headers menu.h"
16106 echo "$as_me:16106: checking if you want to check for form functions" >&5
16107 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16109 # Check whether --enable-form or --disable-form was given.
16110 if test "${enable_form+set}" = set; then
16111 enableval="$enable_form"
16112 test "$enableval" != no && enableval=yes
16113 if test "$enableval" != "yes" ; then
16116 cf_enable_form=$cf_default_form
16120 cf_enable_form=$cf_default_form
16123 echo "$as_me:16123: result: $cf_enable_form" >&5
16124 echo "${ECHO_T}$cf_enable_form" >&6
16125 if test $cf_enable_form = yes
16127 case $cf_cv_screen in
16132 echo "$as_me:16132: checking for NetBSD form.h" >&5
16133 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16134 if test "${cf_cv_netbsd_form_h+set}" = set; then
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
16138 cat >conftest.$ac_ext <<_ACEOF
16139 #line 16139 "configure"
16140 #include "confdefs.h"
16142 #include <${cf_cv_ncurses_header:-curses.h}>
16150 int y = current_field(form)->cursor_ypos;
16151 int x = current_field(form)->cursor_xpos;
16157 rm -f conftest.$ac_objext
16158 if { (eval echo "$as_me:16158: \"$ac_compile\"") >&5
16159 (eval $ac_compile) 2>&5
16161 echo "$as_me:16161: \$? = $ac_status" >&5
16162 (exit $ac_status); } &&
16163 { ac_try='test -s conftest.$ac_objext'
16164 { (eval echo "$as_me:16164: \"$ac_try\"") >&5
16165 (eval $ac_try) 2>&5
16167 echo "$as_me:16167: \$? = $ac_status" >&5
16168 (exit $ac_status); }; }; then
16169 cf_cv_netbsd_form_h=yes
16172 echo "$as_me: failed program was:" >&5
16173 cat conftest.$ac_ext >&5
16174 cf_cv_netbsd_form_h=no
16176 rm -f conftest.$ac_objext conftest.$ac_ext
16179 echo "$as_me:16179: result: $cf_cv_netbsd_form_h" >&5
16180 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16182 test "$cf_cv_netbsd_form_h" = yes &&
16183 cat >>confdefs.h <<\EOF
16184 #define HAVE_NETBSD_FORM_H 1
16190 cf_have_curses_lib=no
16192 : ${NCURSES_CONFIG_PKG:=none}
16193 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16195 elif test "x${PKG_CONFIG:=none}" != xnone; then
16196 echo "$as_me:16196: checking pkg-config for form$cf_cv_libtype" >&5
16197 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16198 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16199 echo "$as_me:16199: result: yes" >&5
16200 echo "${ECHO_T}yes" >&6
16202 echo "$as_me:16202: checking if the form$cf_cv_libtype package files work" >&5
16203 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16205 cf_save_CPPFLAGS="$CPPFLAGS"
16206 cf_save_LIBS="$LIBS"
16211 cf_new_extra_cppflags=
16213 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16215 case $cf_fix_cppflags in
16217 case $cf_add_cflags in
16218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16219 case $cf_add_cflags in
16221 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16224 && test -z "${cf_tst_cflags}" \
16225 && cf_fix_cppflags=yes
16227 if test $cf_fix_cppflags = yes ; then
16229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16233 elif test "${cf_tst_cflags}" = "\"'" ; then
16235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16242 case "$CPPFLAGS" in
16246 case $cf_add_cflags in
16248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16250 CPPFLAGS=`echo "$CPPFLAGS" | \
16251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16276 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16279 && test -z "${cf_tst_cflags}" \
16280 && cf_fix_cppflags=no
16285 if test -n "$cf_new_cflags" ; then
16287 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16288 CFLAGS="${CFLAGS}$cf_new_cflags"
16292 if test -n "$cf_new_cppflags" ; then
16294 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16295 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16299 if test -n "$cf_new_extra_cppflags" ; then
16301 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16302 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16306 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16307 # Filter out duplicates - this happens with badly-designed ".pc" files...
16308 for cf_add_1lib in $LIBS
16310 for cf_add_2lib in $cf_add_libs
16312 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16318 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16320 LIBS="$cf_add_libs"
16322 cat >conftest.$ac_ext <<_ACEOF
16323 #line 16323 "configure"
16324 #include "confdefs.h"
16329 (void) form_driver ( 0,0 );
16334 rm -f conftest.$ac_objext conftest$ac_exeext
16335 if { (eval echo "$as_me:16335: \"$ac_link\"") >&5
16336 (eval $ac_link) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); } &&
16340 { ac_try='test -s conftest$ac_exeext'
16341 { (eval echo "$as_me:16341: \"$ac_try\"") >&5
16342 (eval $ac_try) 2>&5
16344 echo "$as_me:16344: \$? = $ac_status" >&5
16345 (exit $ac_status); }; }; then
16346 if test "$cross_compiling" = yes; then
16347 cf_have_curses_lib=maybe
16349 cat >conftest.$ac_ext <<_ACEOF
16350 #line 16350 "configure"
16351 #include "confdefs.h"
16354 { (void) form_driver ( 0,0 ); return 0; }
16356 rm -f conftest$ac_exeext
16357 if { (eval echo "$as_me:16357: \"$ac_link\"") >&5
16358 (eval $ac_link) 2>&5
16360 echo "$as_me:16360: \$? = $ac_status" >&5
16361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16362 { (eval echo "$as_me:16362: \"$ac_try\"") >&5
16363 (eval $ac_try) 2>&5
16365 echo "$as_me:16365: \$? = $ac_status" >&5
16366 (exit $ac_status); }; }; then
16367 cf_have_curses_lib=yes
16369 echo "$as_me: program exited with status $ac_status" >&5
16370 echo "$as_me: failed program was:" >&5
16371 cat conftest.$ac_ext >&5
16372 cf_have_curses_lib=no
16374 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16377 echo "$as_me: failed program was:" >&5
16378 cat conftest.$ac_ext >&5
16379 cf_have_curses_lib=no
16381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16382 echo "$as_me:16382: result: $cf_have_curses_lib" >&5
16383 echo "${ECHO_T}$cf_have_curses_lib" >&6
16384 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16385 if test "$cf_have_curses_lib" != "yes"
16387 CPPFLAGS="$cf_save_CPPFLAGS"
16388 LIBS="$cf_save_LIBS"
16391 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16393 cat >>confdefs.h <<EOF
16394 #define $cf_upper 1
16400 if test "$cf_have_curses_lib" = no; then
16401 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16402 echo "$as_me:16402: checking for form_driver in -lform$cf_cv_libtype" >&5
16403 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16404 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16405 echo $ECHO_N "(cached) $ECHO_C" >&6
16407 ac_check_lib_save_LIBS=$LIBS
16408 LIBS="-lform$cf_cv_libtype $LIBS"
16409 cat >conftest.$ac_ext <<_ACEOF
16410 #line 16410 "configure"
16411 #include "confdefs.h"
16413 /* Override any gcc2 internal prototype to avoid an error. */
16417 /* We use char because int might match the return type of a gcc2
16418 builtin and then its argument prototype would still apply. */
16419 char form_driver ();
16428 rm -f conftest.$ac_objext conftest$ac_exeext
16429 if { (eval echo "$as_me:16429: \"$ac_link\"") >&5
16430 (eval $ac_link) 2>&5
16432 echo "$as_me:16432: \$? = $ac_status" >&5
16433 (exit $ac_status); } &&
16434 { ac_try='test -s conftest$ac_exeext'
16435 { (eval echo "$as_me:16435: \"$ac_try\"") >&5
16436 (eval $ac_try) 2>&5
16438 echo "$as_me:16438: \$? = $ac_status" >&5
16439 (exit $ac_status); }; }; then
16440 eval "$as_ac_Lib=yes"
16442 echo "$as_me: failed program was:" >&5
16443 cat conftest.$ac_ext >&5
16444 eval "$as_ac_Lib=no"
16446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16447 LIBS=$ac_check_lib_save_LIBS
16449 echo "$as_me:16449: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16450 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16451 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16453 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16455 cf_add_libs="-lform$cf_cv_libtype"
16456 # Filter out duplicates - this happens with badly-designed ".pc" files...
16457 for cf_add_1lib in $LIBS
16459 for cf_add_2lib in $cf_add_libs
16461 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16467 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16469 LIBS="$cf_add_libs"
16471 cat >>confdefs.h <<EOF
16472 #define $cf_upper 1
16479 cf_curses_headers="$cf_curses_headers form.h"
16482 # look for curses-related headers
16484 for ac_header in $cf_curses_headers
16486 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16487 echo "$as_me:16487: checking for $ac_header" >&5
16488 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16489 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16490 echo $ECHO_N "(cached) $ECHO_C" >&6
16492 cat >conftest.$ac_ext <<_ACEOF
16493 #line 16493 "configure"
16494 #include "confdefs.h"
16495 #include <$ac_header>
16497 if { (eval echo "$as_me:16497: \"$ac_cpp conftest.$ac_ext\"") >&5
16498 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16500 egrep -v '^ *\+' conftest.er1 >conftest.err
16502 cat conftest.err >&5
16503 echo "$as_me:16503: \$? = $ac_status" >&5
16504 (exit $ac_status); } >/dev/null; then
16505 if test -s conftest.err; then
16506 ac_cpp_err=$ac_c_preproc_warn_flag
16513 if test -z "$ac_cpp_err"; then
16514 eval "$as_ac_Header=yes"
16516 echo "$as_me: failed program was:" >&5
16517 cat conftest.$ac_ext >&5
16518 eval "$as_ac_Header=no"
16520 rm -f conftest.err conftest.$ac_ext
16522 echo "$as_me:16522: result: `eval echo '${'$as_ac_Header'}'`" >&5
16523 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16524 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16525 cat >>confdefs.h <<EOF
16526 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16532 echo "$as_me:16532: checking for ANSI C header files" >&5
16533 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16534 if test "${ac_cv_header_stdc+set}" = set; then
16535 echo $ECHO_N "(cached) $ECHO_C" >&6
16537 cat >conftest.$ac_ext <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540 #include <stdlib.h>
16541 #include <stdarg.h>
16542 #include <string.h>
16546 if { (eval echo "$as_me:16546: \"$ac_cpp conftest.$ac_ext\"") >&5
16547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16549 egrep -v '^ *\+' conftest.er1 >conftest.err
16551 cat conftest.err >&5
16552 echo "$as_me:16552: \$? = $ac_status" >&5
16553 (exit $ac_status); } >/dev/null; then
16554 if test -s conftest.err; then
16555 ac_cpp_err=$ac_c_preproc_warn_flag
16562 if test -z "$ac_cpp_err"; then
16563 ac_cv_header_stdc=yes
16565 echo "$as_me: failed program was:" >&5
16566 cat conftest.$ac_ext >&5
16567 ac_cv_header_stdc=no
16569 rm -f conftest.err conftest.$ac_ext
16571 if test $ac_cv_header_stdc = yes; then
16572 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16573 cat >conftest.$ac_ext <<_ACEOF
16574 #line 16574 "configure"
16575 #include "confdefs.h"
16576 #include <string.h>
16579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16580 egrep "memchr" >/dev/null 2>&1; then
16583 ac_cv_header_stdc=no
16589 if test $ac_cv_header_stdc = yes; then
16590 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16591 cat >conftest.$ac_ext <<_ACEOF
16592 #line 16592 "configure"
16593 #include "confdefs.h"
16594 #include <stdlib.h>
16597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16598 egrep "free" >/dev/null 2>&1; then
16601 ac_cv_header_stdc=no
16607 if test $ac_cv_header_stdc = yes; then
16608 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16609 if test "$cross_compiling" = yes; then
16612 cat >conftest.$ac_ext <<_ACEOF
16613 #line 16613 "configure"
16614 #include "confdefs.h"
16616 #if ((' ' & 0x0FF) == 0x020)
16617 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16618 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16620 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16621 || ('j' <= (c) && (c) <= 'r') \
16622 || ('s' <= (c) && (c) <= 'z'))
16623 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16626 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16631 for (i = 0; i < 256; i++)
16632 if (XOR (islower (i), ISLOWER (i))
16633 || toupper (i) != TOUPPER (i))
16634 $ac_main_return(2);
16635 $ac_main_return (0);
16638 rm -f conftest$ac_exeext
16639 if { (eval echo "$as_me:16639: \"$ac_link\"") >&5
16640 (eval $ac_link) 2>&5
16642 echo "$as_me:16642: \$? = $ac_status" >&5
16643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16644 { (eval echo "$as_me:16644: \"$ac_try\"") >&5
16645 (eval $ac_try) 2>&5
16647 echo "$as_me:16647: \$? = $ac_status" >&5
16648 (exit $ac_status); }; }; then
16651 echo "$as_me: program exited with status $ac_status" >&5
16652 echo "$as_me: failed program was:" >&5
16653 cat conftest.$ac_ext >&5
16654 ac_cv_header_stdc=no
16656 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16660 echo "$as_me:16660: result: $ac_cv_header_stdc" >&5
16661 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16662 if test $ac_cv_header_stdc = yes; then
16664 cat >>confdefs.h <<\EOF
16665 #define STDC_HEADERS 1
16670 echo "$as_me:16670: checking whether time.h and sys/time.h may both be included" >&5
16671 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16672 if test "${ac_cv_header_time+set}" = set; then
16673 echo $ECHO_N "(cached) $ECHO_C" >&6
16675 cat >conftest.$ac_ext <<_ACEOF
16676 #line 16676 "configure"
16677 #include "confdefs.h"
16678 #include <sys/types.h>
16679 #include <sys/time.h>
16685 if ((struct tm *) 0)
16691 rm -f conftest.$ac_objext
16692 if { (eval echo "$as_me:16692: \"$ac_compile\"") >&5
16693 (eval $ac_compile) 2>&5
16695 echo "$as_me:16695: \$? = $ac_status" >&5
16696 (exit $ac_status); } &&
16697 { ac_try='test -s conftest.$ac_objext'
16698 { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699 (eval $ac_try) 2>&5
16701 echo "$as_me:16701: \$? = $ac_status" >&5
16702 (exit $ac_status); }; }; then
16703 ac_cv_header_time=yes
16705 echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16707 ac_cv_header_time=no
16709 rm -f conftest.$ac_objext conftest.$ac_ext
16711 echo "$as_me:16711: result: $ac_cv_header_time" >&5
16712 echo "${ECHO_T}$ac_cv_header_time" >&6
16713 if test $ac_cv_header_time = yes; then
16715 cat >>confdefs.h <<\EOF
16716 #define TIME_WITH_SYS_TIME 1
16734 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16735 echo "$as_me:16735: checking for $ac_header" >&5
16736 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16737 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16738 echo $ECHO_N "(cached) $ECHO_C" >&6
16740 cat >conftest.$ac_ext <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16743 #include <$ac_header>
16745 if { (eval echo "$as_me:16745: \"$ac_cpp conftest.$ac_ext\"") >&5
16746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16748 egrep -v '^ *\+' conftest.er1 >conftest.err
16750 cat conftest.err >&5
16751 echo "$as_me:16751: \$? = $ac_status" >&5
16752 (exit $ac_status); } >/dev/null; then
16753 if test -s conftest.err; then
16754 ac_cpp_err=$ac_c_preproc_warn_flag
16761 if test -z "$ac_cpp_err"; then
16762 eval "$as_ac_Header=yes"
16764 echo "$as_me: failed program was:" >&5
16765 cat conftest.$ac_ext >&5
16766 eval "$as_ac_Header=no"
16768 rm -f conftest.err conftest.$ac_ext
16770 echo "$as_me:16770: result: `eval echo '${'$as_ac_Header'}'`" >&5
16771 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16772 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16773 cat >>confdefs.h <<EOF
16774 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16780 for ac_header in unistd.h getopt.h
16782 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16783 echo "$as_me:16783: checking for $ac_header" >&5
16784 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16785 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16786 echo $ECHO_N "(cached) $ECHO_C" >&6
16788 cat >conftest.$ac_ext <<_ACEOF
16789 #line 16789 "configure"
16790 #include "confdefs.h"
16791 #include <$ac_header>
16793 if { (eval echo "$as_me:16793: \"$ac_cpp conftest.$ac_ext\"") >&5
16794 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16796 egrep -v '^ *\+' conftest.er1 >conftest.err
16798 cat conftest.err >&5
16799 echo "$as_me:16799: \$? = $ac_status" >&5
16800 (exit $ac_status); } >/dev/null; then
16801 if test -s conftest.err; then
16802 ac_cpp_err=$ac_c_preproc_warn_flag
16809 if test -z "$ac_cpp_err"; then
16810 eval "$as_ac_Header=yes"
16812 echo "$as_me: failed program was:" >&5
16813 cat conftest.$ac_ext >&5
16814 eval "$as_ac_Header=no"
16816 rm -f conftest.err conftest.$ac_ext
16818 echo "$as_me:16818: result: `eval echo '${'$as_ac_Header'}'`" >&5
16819 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16820 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16821 cat >>confdefs.h <<EOF
16822 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16828 echo "$as_me:16828: checking for header declaring getopt variables" >&5
16829 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16830 if test "${cf_cv_getopt_header+set}" = set; then
16831 echo $ECHO_N "(cached) $ECHO_C" >&6
16834 cf_cv_getopt_header=none
16835 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16837 cat >conftest.$ac_ext <<_ACEOF
16838 #line 16838 "configure"
16839 #include "confdefs.h"
16841 #include <$cf_header>
16845 int x = optind; char *y = optarg
16850 rm -f conftest.$ac_objext
16851 if { (eval echo "$as_me:16851: \"$ac_compile\"") >&5
16852 (eval $ac_compile) 2>&5
16854 echo "$as_me:16854: \$? = $ac_status" >&5
16855 (exit $ac_status); } &&
16856 { ac_try='test -s conftest.$ac_objext'
16857 { (eval echo "$as_me:16857: \"$ac_try\"") >&5
16858 (eval $ac_try) 2>&5
16860 echo "$as_me:16860: \$? = $ac_status" >&5
16861 (exit $ac_status); }; }; then
16862 cf_cv_getopt_header=$cf_header
16865 echo "$as_me: failed program was:" >&5
16866 cat conftest.$ac_ext >&5
16868 rm -f conftest.$ac_objext conftest.$ac_ext
16872 echo "$as_me:16872: result: $cf_cv_getopt_header" >&5
16873 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16874 if test $cf_cv_getopt_header != none ; then
16876 cat >>confdefs.h <<\EOF
16877 #define HAVE_GETOPT_HEADER 1
16881 if test $cf_cv_getopt_header = getopt.h ; then
16883 cat >>confdefs.h <<\EOF
16884 #define NEED_GETOPT_H 1
16896 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16897 echo "$as_me:16897: checking for $ac_func" >&5
16898 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16899 if eval "test \"\${$as_ac_var+set}\" = set"; then
16900 echo $ECHO_N "(cached) $ECHO_C" >&6
16902 cat >conftest.$ac_ext <<_ACEOF
16903 #line 16903 "configure"
16904 #include "confdefs.h"
16905 #define $ac_func autoconf_temporary
16906 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16913 /* We use char because int might match the return type of a gcc2
16914 builtin and then its argument prototype would still apply. */
16915 char $ac_func (void);
16921 /* The GNU C library defines stubs for functions which it implements
16922 to always fail with ENOSYS. Some functions are actually named
16923 something starting with __ and the normal name is an alias. */
16924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16925 #error found stub for $ac_func
16928 return $ac_func ();
16933 rm -f conftest.$ac_objext conftest$ac_exeext
16934 if { (eval echo "$as_me:16934: \"$ac_link\"") >&5
16935 (eval $ac_link) 2>&5
16937 echo "$as_me:16937: \$? = $ac_status" >&5
16938 (exit $ac_status); } &&
16939 { ac_try='test -s conftest$ac_exeext'
16940 { (eval echo "$as_me:16940: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16943 echo "$as_me:16943: \$? = $ac_status" >&5
16944 (exit $ac_status); }; }; then
16945 eval "$as_ac_var=yes"
16947 echo "$as_me: failed program was:" >&5
16948 cat conftest.$ac_ext >&5
16949 eval "$as_ac_var=no"
16951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16953 echo "$as_me:16953: result: `eval echo '${'$as_ac_var'}'`" >&5
16954 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16955 if test `eval echo '${'$as_ac_var'}'` = yes; then
16956 cat >>confdefs.h <<EOF
16957 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16963 # use a compile-check to work with ncurses*-config and subdirectory includes
16964 echo "$as_me:16964: checking if we can use termcap.h" >&5
16965 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
16966 if test "${cf_cv_have_termcap_h+set}" = set; then
16967 echo $ECHO_N "(cached) $ECHO_C" >&6
16970 cat >conftest.$ac_ext <<_ACEOF
16971 #line 16971 "configure"
16972 #include "confdefs.h"
16974 #include <curses.h>
16975 #include <termcap.h>
16985 rm -f conftest.$ac_objext
16986 if { (eval echo "$as_me:16986: \"$ac_compile\"") >&5
16987 (eval $ac_compile) 2>&5
16989 echo "$as_me:16989: \$? = $ac_status" >&5
16990 (exit $ac_status); } &&
16991 { ac_try='test -s conftest.$ac_objext'
16992 { (eval echo "$as_me:16992: \"$ac_try\"") >&5
16993 (eval $ac_try) 2>&5
16995 echo "$as_me:16995: \$? = $ac_status" >&5
16996 (exit $ac_status); }; }; then
16997 cf_cv_have_termcap_h=yes
16999 echo "$as_me: failed program was:" >&5
17000 cat conftest.$ac_ext >&5
17001 cf_cv_have_termcap_h=no
17003 rm -f conftest.$ac_objext conftest.$ac_ext
17005 echo "$as_me:17005: result: $cf_cv_have_termcap_h" >&5
17006 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17007 test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
17008 #define HAVE_TERMCAP_H 1
17011 if test "x$ac_cv_func_getopt" = xno; then
17012 { { echo "$as_me:17012: error: getopt is required for building programs" >&5
17013 echo "$as_me: error: getopt is required for building programs" >&2;}
17014 { (exit 1); exit 1; }; }
17017 if test "$cf_enable_widec" = yes; then
17030 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17031 echo "$as_me:17031: checking for $ac_func" >&5
17032 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17033 if eval "test \"\${$as_ac_var+set}\" = set"; then
17034 echo $ECHO_N "(cached) $ECHO_C" >&6
17036 cat >conftest.$ac_ext <<_ACEOF
17037 #line 17037 "configure"
17038 #include "confdefs.h"
17039 #define $ac_func autoconf_temporary
17040 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17047 /* We use char because int might match the return type of a gcc2
17048 builtin and then its argument prototype would still apply. */
17049 char $ac_func (void);
17055 /* The GNU C library defines stubs for functions which it implements
17056 to always fail with ENOSYS. Some functions are actually named
17057 something starting with __ and the normal name is an alias. */
17058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17059 #error found stub for $ac_func
17062 return $ac_func ();
17067 rm -f conftest.$ac_objext conftest$ac_exeext
17068 if { (eval echo "$as_me:17068: \"$ac_link\"") >&5
17069 (eval $ac_link) 2>&5
17071 echo "$as_me:17071: \$? = $ac_status" >&5
17072 (exit $ac_status); } &&
17073 { ac_try='test -s conftest$ac_exeext'
17074 { (eval echo "$as_me:17074: \"$ac_try\"") >&5
17075 (eval $ac_try) 2>&5
17077 echo "$as_me:17077: \$? = $ac_status" >&5
17078 (exit $ac_status); }; }; then
17079 eval "$as_ac_var=yes"
17081 echo "$as_me: failed program was:" >&5
17082 cat conftest.$ac_ext >&5
17083 eval "$as_ac_var=no"
17085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17087 echo "$as_me:17087: result: `eval echo '${'$as_ac_var'}'`" >&5
17088 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17089 if test `eval echo '${'$as_ac_var'}'` = yes; then
17090 cat >>confdefs.h <<EOF
17091 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17099 echo "$as_me:17099: checking definition to turn on extended curses functions" >&5
17100 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17101 if test "${cf_cv_need_xopen_extension+set}" = set; then
17102 echo $ECHO_N "(cached) $ECHO_C" >&6
17105 cf_cv_need_xopen_extension=unknown
17106 cat >conftest.$ac_ext <<_ACEOF
17107 #line 17107 "configure"
17108 #include "confdefs.h"
17110 #include <stdlib.h>
17111 #include <${cf_cv_ncurses_header:-curses.h}>
17116 #if defined(NCURSES_VERSION_PATCH)
17117 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17121 #ifdef NCURSES_VERSION
17123 int check2 = curs_set((int)sizeof(check));
17125 long x = winnstr(stdscr, "", 0);
17127 getbegyx(stdscr, y1, x1)
17132 rm -f conftest.$ac_objext conftest$ac_exeext
17133 if { (eval echo "$as_me:17133: \"$ac_link\"") >&5
17134 (eval $ac_link) 2>&5
17136 echo "$as_me:17136: \$? = $ac_status" >&5
17137 (exit $ac_status); } &&
17138 { ac_try='test -s conftest$ac_exeext'
17139 { (eval echo "$as_me:17139: \"$ac_try\"") >&5
17140 (eval $ac_try) 2>&5
17142 echo "$as_me:17142: \$? = $ac_status" >&5
17143 (exit $ac_status); }; }; then
17144 cf_cv_need_xopen_extension=none
17146 echo "$as_me: failed program was:" >&5
17147 cat conftest.$ac_ext >&5
17149 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17151 cat >conftest.$ac_ext <<_ACEOF
17152 #line 17152 "configure"
17153 #include "confdefs.h"
17155 #define $cf_try_xopen_extension 1
17156 #include <stdlib.h>
17157 #include <${cf_cv_ncurses_header:-curses.h}>
17162 #ifdef NCURSES_VERSION
17164 int check2 = curs_set((int)sizeof(check));
17166 long x = winnstr(stdscr, "", 0);
17168 getbegyx(stdscr, y1, x1)
17173 rm -f conftest.$ac_objext conftest$ac_exeext
17174 if { (eval echo "$as_me:17174: \"$ac_link\"") >&5
17175 (eval $ac_link) 2>&5
17177 echo "$as_me:17177: \$? = $ac_status" >&5
17178 (exit $ac_status); } &&
17179 { ac_try='test -s conftest$ac_exeext'
17180 { (eval echo "$as_me:17180: \"$ac_try\"") >&5
17181 (eval $ac_try) 2>&5
17183 echo "$as_me:17183: \$? = $ac_status" >&5
17184 (exit $ac_status); }; }; then
17185 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17187 echo "$as_me: failed program was:" >&5
17188 cat conftest.$ac_ext >&5
17190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17197 echo "$as_me:17197: result: $cf_cv_need_xopen_extension" >&5
17198 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17200 case $cf_cv_need_xopen_extension in
17203 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17204 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17209 echo "$as_me:17209: checking for term.h" >&5
17210 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17211 if test "${cf_cv_term_header+set}" = set; then
17212 echo $ECHO_N "(cached) $ECHO_C" >&6
17215 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17216 # for <term.h> if we do not find the variant.
17218 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17220 case ${cf_cv_ncurses_header:-curses.h} in
17222 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17223 cf_header_list="$cf_header_item $cf_header_list"
17227 for cf_header in $cf_header_list
17229 cat >conftest.$ac_ext <<_ACEOF
17230 #line 17230 "configure"
17231 #include "confdefs.h"
17233 #include <${cf_cv_ncurses_header:-curses.h}>
17234 #include <${cf_header}>
17243 rm -f conftest.$ac_objext
17244 if { (eval echo "$as_me:17244: \"$ac_compile\"") >&5
17245 (eval $ac_compile) 2>&5
17247 echo "$as_me:17247: \$? = $ac_status" >&5
17248 (exit $ac_status); } &&
17249 { ac_try='test -s conftest.$ac_objext'
17250 { (eval echo "$as_me:17250: \"$ac_try\"") >&5
17251 (eval $ac_try) 2>&5
17253 echo "$as_me:17253: \$? = $ac_status" >&5
17254 (exit $ac_status); }; }; then
17255 cf_cv_term_header=$cf_header
17258 echo "$as_me: failed program was:" >&5
17259 cat conftest.$ac_ext >&5
17260 cf_cv_term_header=no
17262 rm -f conftest.$ac_objext conftest.$ac_ext
17265 case $cf_cv_term_header in
17267 # If curses is ncurses, some packagers still mess it up by trying to make
17268 # us use GNU termcap. This handles the most common case.
17269 for cf_header in ncurses/term.h ncursesw/term.h
17271 cat >conftest.$ac_ext <<_ACEOF
17272 #line 17272 "configure"
17273 #include "confdefs.h"
17275 #include <${cf_cv_ncurses_header:-curses.h}>
17276 #ifdef NCURSES_VERSION
17277 #include <${cf_header}>
17289 rm -f conftest.$ac_objext
17290 if { (eval echo "$as_me:17290: \"$ac_compile\"") >&5
17291 (eval $ac_compile) 2>&5
17293 echo "$as_me:17293: \$? = $ac_status" >&5
17294 (exit $ac_status); } &&
17295 { ac_try='test -s conftest.$ac_objext'
17296 { (eval echo "$as_me:17296: \"$ac_try\"") >&5
17297 (eval $ac_try) 2>&5
17299 echo "$as_me:17299: \$? = $ac_status" >&5
17300 (exit $ac_status); }; }; then
17301 cf_cv_term_header=$cf_header
17304 echo "$as_me: failed program was:" >&5
17305 cat conftest.$ac_ext >&5
17306 cf_cv_term_header=no
17308 rm -f conftest.$ac_objext conftest.$ac_ext
17314 echo "$as_me:17314: result: $cf_cv_term_header" >&5
17315 echo "${ECHO_T}$cf_cv_term_header" >&6
17317 case $cf_cv_term_header in
17320 cat >>confdefs.h <<\EOF
17321 #define HAVE_TERM_H 1
17327 cat >>confdefs.h <<\EOF
17328 #define HAVE_NCURSES_TERM_H 1
17334 cat >>confdefs.h <<\EOF
17335 #define HAVE_NCURSESW_TERM_H 1
17341 echo "$as_me:17341: checking for unctrl.h" >&5
17342 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17343 if test "${cf_cv_unctrl_header+set}" = set; then
17344 echo $ECHO_N "(cached) $ECHO_C" >&6
17347 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17348 # for <unctrl.h> if we do not find the variant.
17350 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17352 case ${cf_cv_ncurses_header:-curses.h} in
17354 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17355 cf_header_list="$cf_header_item $cf_header_list"
17359 for cf_header in $cf_header_list
17361 cat >conftest.$ac_ext <<_ACEOF
17362 #line 17362 "configure"
17363 #include "confdefs.h"
17365 #include <${cf_cv_ncurses_header:-curses.h}>
17366 #include <${cf_header}>
17375 rm -f conftest.$ac_objext
17376 if { (eval echo "$as_me:17376: \"$ac_compile\"") >&5
17377 (eval $ac_compile) 2>&5
17379 echo "$as_me:17379: \$? = $ac_status" >&5
17380 (exit $ac_status); } &&
17381 { ac_try='test -s conftest.$ac_objext'
17382 { (eval echo "$as_me:17382: \"$ac_try\"") >&5
17383 (eval $ac_try) 2>&5
17385 echo "$as_me:17385: \$? = $ac_status" >&5
17386 (exit $ac_status); }; }; then
17387 cf_cv_unctrl_header=$cf_header
17390 echo "$as_me: failed program was:" >&5
17391 cat conftest.$ac_ext >&5
17392 cf_cv_unctrl_header=no
17394 rm -f conftest.$ac_objext conftest.$ac_ext
17398 echo "$as_me:17398: result: $cf_cv_unctrl_header" >&5
17399 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17401 case $cf_cv_unctrl_header in
17403 { echo "$as_me:17403: WARNING: unctrl.h header not found" >&5
17404 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17408 case $cf_cv_unctrl_header in
17411 cat >>confdefs.h <<\EOF
17412 #define HAVE_UNCTRL_H 1
17418 cat >>confdefs.h <<\EOF
17419 #define HAVE_NCURSES_UNCTRL_H 1
17423 (ncursesw/unctrl.h)
17425 cat >>confdefs.h <<\EOF
17426 #define HAVE_NCURSESW_UNCTRL_H 1
17434 assume_default_colors \
17449 init_extended_color \
17457 reset_color_pairs \
17472 use_default_colors \
17474 use_extended_names \
17490 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17492 echo "$as_me:17492: checking for ${cf_func}" >&5
17493 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17495 echo "${as_me:-configure}:17495: testing ${cf_func} ..." 1>&5
17497 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17498 echo $ECHO_N "(cached) $ECHO_C" >&6
17501 eval cf_result='$ac_cv_func_'$cf_func
17502 if test ".$cf_result" != ".no"; then
17503 cat >conftest.$ac_ext <<_ACEOF
17504 #line 17504 "configure"
17505 #include "confdefs.h"
17507 #ifdef HAVE_XCURSES
17508 #include <xcurses.h>
17509 char * XCursesProgramName = "test";
17511 #include <${cf_cv_ncurses_header:-curses.h}>
17512 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17513 #include <ncursesw/term.h>
17514 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17515 #include <ncurses/term.h>
17516 #elif defined(HAVE_TERM_H)
17526 long foo = (long)(&${cf_func});
17527 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17528 if (foo + 1234L > 5678L)
17529 ${cf_cv_main_return:-return}(foo != 0);
17536 rm -f conftest.$ac_objext conftest$ac_exeext
17537 if { (eval echo "$as_me:17537: \"$ac_link\"") >&5
17538 (eval $ac_link) 2>&5
17540 echo "$as_me:17540: \$? = $ac_status" >&5
17541 (exit $ac_status); } &&
17542 { ac_try='test -s conftest$ac_exeext'
17543 { (eval echo "$as_me:17543: \"$ac_try\"") >&5
17544 (eval $ac_try) 2>&5
17546 echo "$as_me:17546: \$? = $ac_status" >&5
17547 (exit $ac_status); }; }; then
17550 echo "$as_me: failed program was:" >&5
17551 cat conftest.$ac_ext >&5
17554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17556 eval 'cf_cv_func_'$cf_func'=$cf_result'
17560 # use the computed/retrieved cache-value:
17561 eval 'cf_result=$cf_cv_func_'$cf_func
17562 echo "$as_me:17562: result: $cf_result" >&5
17563 echo "${ECHO_T}$cf_result" >&6
17564 if test $cf_result != no; then
17565 cat >>confdefs.h <<EOF
17566 #define HAVE_${cf_tr_func} 1
17572 for cf_func in tputs
17575 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17577 echo "$as_me:17577: checking for ${cf_func}" >&5
17578 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17580 echo "${as_me:-configure}:17580: testing ${cf_func} ..." 1>&5
17582 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17583 echo $ECHO_N "(cached) $ECHO_C" >&6
17586 eval cf_result='$ac_cv_func_'$cf_func
17587 if test ".$cf_result" != ".no"; then
17588 cat >conftest.$ac_ext <<_ACEOF
17589 #line 17589 "configure"
17590 #include "confdefs.h"
17592 #ifdef HAVE_XCURSES
17593 #include <xcurses.h>
17594 char * XCursesProgramName = "test";
17596 #include <${cf_cv_ncurses_header:-curses.h}>
17597 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17598 #include <ncursesw/term.h>
17599 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17600 #include <ncurses/term.h>
17601 #elif defined(HAVE_TERM_H)
17611 long foo = (long)(&${cf_func});
17612 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17613 if (foo + 1234L > 5678L)
17614 ${cf_cv_main_return:-return}(foo != 0);
17621 rm -f conftest.$ac_objext conftest$ac_exeext
17622 if { (eval echo "$as_me:17622: \"$ac_link\"") >&5
17623 (eval $ac_link) 2>&5
17625 echo "$as_me:17625: \$? = $ac_status" >&5
17626 (exit $ac_status); } &&
17627 { ac_try='test -s conftest$ac_exeext'
17628 { (eval echo "$as_me:17628: \"$ac_try\"") >&5
17629 (eval $ac_try) 2>&5
17631 echo "$as_me:17631: \$? = $ac_status" >&5
17632 (exit $ac_status); }; }; then
17635 echo "$as_me: failed program was:" >&5
17636 cat conftest.$ac_ext >&5
17639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17641 eval 'cf_cv_func_'$cf_func'=$cf_result'
17645 # use the computed/retrieved cache-value:
17646 eval 'cf_result=$cf_cv_func_'$cf_func
17647 echo "$as_me:17647: result: $cf_result" >&5
17648 echo "${ECHO_T}$cf_result" >&6
17649 if test $cf_result != no; then
17650 cat >>confdefs.h <<EOF
17651 #define HAVE_${cf_tr_func} 1
17657 if test x$cf_cv_func_tputs = xyes
17660 for cf_arg in int char
17662 for cf_ret in int void
17664 if test $cf_ret = void
17666 cf_return="/* nothing */"
17668 cf_return="return value"
17670 cat >conftest.$ac_ext <<_ACEOF
17671 #line 17671 "configure"
17672 #include "confdefs.h"
17674 #include <${cf_cv_ncurses_header:-curses.h}>
17675 #include <$cf_cv_term_header>
17677 static $cf_ret outc($cf_arg value) { $cf_return; }
17683 tputs("hello", 0, outc);
17684 ${cf_cv_main_return:-return}(0);
17690 rm -f conftest.$ac_objext
17691 if { (eval echo "$as_me:17691: \"$ac_compile\"") >&5
17692 (eval $ac_compile) 2>&5
17694 echo "$as_me:17694: \$? = $ac_status" >&5
17695 (exit $ac_status); } &&
17696 { ac_try='test -s conftest.$ac_objext'
17697 { (eval echo "$as_me:17697: \"$ac_try\"") >&5
17698 (eval $ac_try) 2>&5
17700 echo "$as_me:17700: \$? = $ac_status" >&5
17701 (exit $ac_status); }; }; then
17703 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17705 echo "${as_me:-configure}:17705: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17707 cat >>confdefs.h <<EOF
17708 #define TPUTS_ARG $cf_arg
17709 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17710 #define TPUTS_RETURN(value) $cf_return
17716 echo "$as_me: failed program was:" >&5
17717 cat conftest.$ac_ext >&5
17719 rm -f conftest.$ac_objext conftest.$ac_ext
17721 test $cf_done = yes && break
17725 echo "$as_me:17725: checking for ncurses extended functions" >&5
17726 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17727 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17728 echo $ECHO_N "(cached) $ECHO_C" >&6
17731 cat >conftest.$ac_ext <<_ACEOF
17732 #line 17732 "configure"
17733 #include "confdefs.h"
17735 #include <${cf_cv_ncurses_header:-curses.h}>
17740 int x = NCURSES_EXT_FUNCS
17746 rm -f conftest.$ac_objext
17747 if { (eval echo "$as_me:17747: \"$ac_compile\"") >&5
17748 (eval $ac_compile) 2>&5
17750 echo "$as_me:17750: \$? = $ac_status" >&5
17751 (exit $ac_status); } &&
17752 { ac_try='test -s conftest.$ac_objext'
17753 { (eval echo "$as_me:17753: \"$ac_try\"") >&5
17754 (eval $ac_try) 2>&5
17756 echo "$as_me:17756: \$? = $ac_status" >&5
17757 (exit $ac_status); }; }; then
17758 cf_cv_ncurses_ext_funcs=defined
17760 echo "$as_me: failed program was:" >&5
17761 cat conftest.$ac_ext >&5
17763 cat >conftest.$ac_ext <<_ACEOF
17764 #line 17764 "configure"
17765 #include "confdefs.h"
17767 #include <${cf_cv_ncurses_header:-curses.h}>
17772 (void) assume_default_colors (0, 0);
17773 (void) curses_version ();
17774 (void) define_key (0, 0);
17775 (void) is_term_resized (0, 0);
17776 (void) key_defined (0);
17777 (void) keybound (0, 0);
17778 (void) keyok (0, 0);
17779 (void) resize_term (0, 0);
17780 (void) resizeterm (0, 0);
17781 (void) use_default_colors ();
17782 (void) use_extended_names (0);
17783 (void) wresize (0, 0, 0);
17788 rm -f conftest.$ac_objext conftest$ac_exeext
17789 if { (eval echo "$as_me:17789: \"$ac_link\"") >&5
17790 (eval $ac_link) 2>&5
17792 echo "$as_me:17792: \$? = $ac_status" >&5
17793 (exit $ac_status); } &&
17794 { ac_try='test -s conftest$ac_exeext'
17795 { (eval echo "$as_me:17795: \"$ac_try\"") >&5
17796 (eval $ac_try) 2>&5
17798 echo "$as_me:17798: \$? = $ac_status" >&5
17799 (exit $ac_status); }; }; then
17800 cf_cv_ncurses_ext_funcs=yes
17802 echo "$as_me: failed program was:" >&5
17803 cat conftest.$ac_ext >&5
17804 cf_cv_ncurses_ext_funcs=no
17806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17809 rm -f conftest.$ac_objext conftest.$ac_ext
17812 echo "$as_me:17812: result: $cf_cv_ncurses_ext_funcs" >&5
17813 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
17814 test "$cf_cv_ncurses_ext_funcs" = yes &&
17815 cat >>confdefs.h <<\EOF
17816 #define NCURSES_EXT_FUNCS 1
17819 if test "$cf_enable_widec" = yes
17821 # workaround for systems with ncurses before 20111029, due to change of
17822 # feature test macro from _XPG5 to _XOPEN_SOURCE
17823 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
17826 echo "$as_me:17826: checking if _XPG5 should be defined to enable wide-characters" >&5
17827 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
17829 cat >conftest.$ac_ext <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17833 #include <${cf_cv_ncurses_header:-curses.h}>
17842 rm -f conftest.$ac_objext
17843 if { (eval echo "$as_me:17843: \"$ac_compile\"") >&5
17844 (eval $ac_compile) 2>&5
17846 echo "$as_me:17846: \$? = $ac_status" >&5
17847 (exit $ac_status); } &&
17848 { ac_try='test -s conftest.$ac_objext'
17849 { (eval echo "$as_me:17849: \"$ac_try\"") >&5
17850 (eval $ac_try) 2>&5
17852 echo "$as_me:17852: \$? = $ac_status" >&5
17853 (exit $ac_status); }; }; then
17856 echo "$as_me: failed program was:" >&5
17857 cat conftest.$ac_ext >&5
17858 cf_save_cppflags="$CPPFLAGS"
17859 CPPFLAGS="$CPPFLAGS -D_XPG5"
17860 cat >conftest.$ac_ext <<_ACEOF
17861 #line 17861 "configure"
17862 #include "confdefs.h"
17864 #include <${cf_cv_ncurses_header:-curses.h}>
17873 rm -f conftest.$ac_objext
17874 if { (eval echo "$as_me:17874: \"$ac_compile\"") >&5
17875 (eval $ac_compile) 2>&5
17877 echo "$as_me:17877: \$? = $ac_status" >&5
17878 (exit $ac_status); } &&
17879 { ac_try='test -s conftest.$ac_objext'
17880 { (eval echo "$as_me:17880: \"$ac_try\"") >&5
17881 (eval $ac_try) 2>&5
17883 echo "$as_me:17883: \$? = $ac_status" >&5
17884 (exit $ac_status); }; }; then
17887 echo "$as_me: failed program was:" >&5
17888 cat conftest.$ac_ext >&5
17890 rm -f conftest.$ac_objext conftest.$ac_ext
17891 CPPFLAGS="$cf_save_cppflags"
17893 rm -f conftest.$ac_objext conftest.$ac_ext
17894 echo "$as_me:17894: result: $cf_define_xpg5" >&5
17895 echo "${ECHO_T}$cf_define_xpg5" >&6
17897 if test "$cf_define_xpg5" = yes
17899 CPPFLAGS="$CPPFLAGS -D_XPG5"
17903 echo "$as_me:17903: checking for wide-character functions" >&5
17904 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
17905 if test "${cf_cv_widechar_funcs+set}" = set; then
17906 echo $ECHO_N "(cached) $ECHO_C" >&6
17909 cat >conftest.$ac_ext <<_ACEOF
17910 #line 17910 "configure"
17911 #include "confdefs.h"
17913 #include <${cf_cv_ncurses_header:-curses.h}>
17918 static wchar_t src_wchar[2];
17919 static cchar_t dst_cchar;
17920 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
17926 rm -f conftest.$ac_objext conftest$ac_exeext
17927 if { (eval echo "$as_me:17927: \"$ac_link\"") >&5
17928 (eval $ac_link) 2>&5
17930 echo "$as_me:17930: \$? = $ac_status" >&5
17931 (exit $ac_status); } &&
17932 { ac_try='test -s conftest$ac_exeext'
17933 { (eval echo "$as_me:17933: \"$ac_try\"") >&5
17934 (eval $ac_try) 2>&5
17936 echo "$as_me:17936: \$? = $ac_status" >&5
17937 (exit $ac_status); }; }; then
17938 cf_cv_widechar_funcs=yes
17940 echo "$as_me: failed program was:" >&5
17941 cat conftest.$ac_ext >&5
17942 cf_cv_widechar_funcs=no
17944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17947 echo "$as_me:17947: result: $cf_cv_widechar_funcs" >&5
17948 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
17949 if test "$cf_cv_widechar_funcs" != no ; then
17951 cat >>confdefs.h <<\EOF
17952 #define USE_WIDEC_SUPPORT 1
17956 cat >>confdefs.h <<\EOF
17957 #define USE_WIDEC_SUPPORT 0
17962 cat >>confdefs.h <<\EOF
17963 #define USE_WIDEC_SUPPORT 0
17968 echo "$as_me:17968: checking if $cf_cv_screen library uses pthreads" >&5
17969 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
17970 if test "${cf_cv_use_pthreads+set}" = set; then
17971 echo $ECHO_N "(cached) $ECHO_C" >&6
17974 cat >conftest.$ac_ext <<_ACEOF
17975 #line 17975 "configure"
17976 #include "confdefs.h"
17978 #include <${cf_cv_ncurses_header:-curses.h}>
17979 extern void _nc_init_pthreads(void);
17986 _nc_init_pthreads();
17992 rm -f conftest.$ac_objext conftest$ac_exeext
17993 if { (eval echo "$as_me:17993: \"$ac_link\"") >&5
17994 (eval $ac_link) 2>&5
17996 echo "$as_me:17996: \$? = $ac_status" >&5
17997 (exit $ac_status); } &&
17998 { ac_try='test -s conftest$ac_exeext'
17999 { (eval echo "$as_me:17999: \"$ac_try\"") >&5
18000 (eval $ac_try) 2>&5
18002 echo "$as_me:18002: \$? = $ac_status" >&5
18003 (exit $ac_status); }; }; then
18004 cf_cv_use_pthreads=yes
18006 echo "$as_me: failed program was:" >&5
18007 cat conftest.$ac_ext >&5
18008 cf_cv_use_pthreads=no
18010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18013 echo "$as_me:18013: result: $cf_cv_use_pthreads" >&5
18014 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18015 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
18016 #define USE_PTHREADS 1
18019 echo "$as_me:18019: checking if sys/time.h works with sys/select.h" >&5
18020 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18021 if test "${cf_cv_sys_time_select+set}" = set; then
18022 echo $ECHO_N "(cached) $ECHO_C" >&6
18025 cat >conftest.$ac_ext <<_ACEOF
18026 #line 18026 "configure"
18027 #include "confdefs.h"
18029 #include <sys/types.h>
18030 #ifdef HAVE_SYS_TIME_H
18031 #include <sys/time.h>
18033 #ifdef HAVE_SYS_SELECT_H
18034 #include <sys/select.h>
18045 rm -f conftest.$ac_objext
18046 if { (eval echo "$as_me:18046: \"$ac_compile\"") >&5
18047 (eval $ac_compile) 2>&5
18049 echo "$as_me:18049: \$? = $ac_status" >&5
18050 (exit $ac_status); } &&
18051 { ac_try='test -s conftest.$ac_objext'
18052 { (eval echo "$as_me:18052: \"$ac_try\"") >&5
18053 (eval $ac_try) 2>&5
18055 echo "$as_me:18055: \$? = $ac_status" >&5
18056 (exit $ac_status); }; }; then
18057 cf_cv_sys_time_select=yes
18059 echo "$as_me: failed program was:" >&5
18060 cat conftest.$ac_ext >&5
18061 cf_cv_sys_time_select=no
18063 rm -f conftest.$ac_objext conftest.$ac_ext
18067 echo "$as_me:18067: result: $cf_cv_sys_time_select" >&5
18068 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18069 test "$cf_cv_sys_time_select" = yes &&
18070 cat >>confdefs.h <<\EOF
18071 #define HAVE_SYS_TIME_SELECT 1
18074 # special check for test/ditto.c
18076 echo "$as_me:18076: checking for openpty in -lutil" >&5
18077 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18078 if test "${ac_cv_lib_util_openpty+set}" = set; then
18079 echo $ECHO_N "(cached) $ECHO_C" >&6
18081 ac_check_lib_save_LIBS=$LIBS
18082 LIBS="-lutil $LIBS"
18083 cat >conftest.$ac_ext <<_ACEOF
18084 #line 18084 "configure"
18085 #include "confdefs.h"
18087 /* Override any gcc2 internal prototype to avoid an error. */
18091 /* We use char because int might match the return type of a gcc2
18092 builtin and then its argument prototype would still apply. */
18102 rm -f conftest.$ac_objext conftest$ac_exeext
18103 if { (eval echo "$as_me:18103: \"$ac_link\"") >&5
18104 (eval $ac_link) 2>&5
18106 echo "$as_me:18106: \$? = $ac_status" >&5
18107 (exit $ac_status); } &&
18108 { ac_try='test -s conftest$ac_exeext'
18109 { (eval echo "$as_me:18109: \"$ac_try\"") >&5
18110 (eval $ac_try) 2>&5
18112 echo "$as_me:18112: \$? = $ac_status" >&5
18113 (exit $ac_status); }; }; then
18114 ac_cv_lib_util_openpty=yes
18116 echo "$as_me: failed program was:" >&5
18117 cat conftest.$ac_ext >&5
18118 ac_cv_lib_util_openpty=no
18120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18121 LIBS=$ac_check_lib_save_LIBS
18123 echo "$as_me:18123: result: $ac_cv_lib_util_openpty" >&5
18124 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18125 if test $ac_cv_lib_util_openpty = yes; then
18131 echo "$as_me:18131: checking for openpty header" >&5
18132 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18133 if test "${cf_cv_func_openpty+set}" = set; then
18134 echo $ECHO_N "(cached) $ECHO_C" >&6
18137 cf_save_LIBS="$LIBS"
18138 test $cf_cv_lib_util = yes && {
18139 cf_add_libs="-lutil"
18140 # Filter out duplicates - this happens with badly-designed ".pc" files...
18141 for cf_add_1lib in $LIBS
18143 for cf_add_2lib in $cf_add_libs
18145 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18151 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18153 LIBS="$cf_add_libs"
18155 for cf_header in pty.h libutil.h util.h
18157 cat >conftest.$ac_ext <<_ACEOF
18158 #line 18158 "configure"
18159 #include "confdefs.h"
18161 #include <$cf_header>
18167 int x = openpty((int *)0, (int *)0, (char *)0,
18168 (struct termios *)0, (struct winsize *)0);
18174 rm -f conftest.$ac_objext conftest$ac_exeext
18175 if { (eval echo "$as_me:18175: \"$ac_link\"") >&5
18176 (eval $ac_link) 2>&5
18178 echo "$as_me:18178: \$? = $ac_status" >&5
18179 (exit $ac_status); } &&
18180 { ac_try='test -s conftest$ac_exeext'
18181 { (eval echo "$as_me:18181: \"$ac_try\"") >&5
18182 (eval $ac_try) 2>&5
18184 echo "$as_me:18184: \$? = $ac_status" >&5
18185 (exit $ac_status); }; }; then
18187 cf_cv_func_openpty=$cf_header
18191 echo "$as_me: failed program was:" >&5
18192 cat conftest.$ac_ext >&5
18194 cf_cv_func_openpty=no
18197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18199 LIBS="$cf_save_LIBS"
18202 echo "$as_me:18202: result: $cf_cv_func_openpty" >&5
18203 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18205 if test "$cf_cv_func_openpty" != no ; then
18207 cat >>confdefs.h <<EOF
18208 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18211 cat >>confdefs.h <<\EOF
18212 #define USE_XTERM_PTY 1
18215 if test "x$cf_cv_lib_util" = xyes ; then
18217 cf_add_libs="-lutil"
18218 # Filter out duplicates - this happens with badly-designed ".pc" files...
18219 for cf_add_1lib in $TEST_LIBS
18221 for cf_add_2lib in $cf_add_libs
18223 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18229 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18231 TEST_LIBS="$cf_add_libs"
18236 echo "$as_me:18236: checking for function curses_version" >&5
18237 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18238 if test "${cf_cv_func_curses_version+set}" = set; then
18239 echo $ECHO_N "(cached) $ECHO_C" >&6
18242 if test "$cross_compiling" = yes; then
18243 cf_cv_func_curses_version=unknown
18245 cat >conftest.$ac_ext <<_ACEOF
18246 #line 18246 "configure"
18247 #include "confdefs.h"
18249 #include <${cf_cv_ncurses_header:-curses.h}>
18253 sprintf(temp, "%s\n", curses_version());
18254 ${cf_cv_main_return:-return}(0);
18258 rm -f conftest$ac_exeext
18259 if { (eval echo "$as_me:18259: \"$ac_link\"") >&5
18260 (eval $ac_link) 2>&5
18262 echo "$as_me:18262: \$? = $ac_status" >&5
18263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18264 { (eval echo "$as_me:18264: \"$ac_try\"") >&5
18265 (eval $ac_try) 2>&5
18267 echo "$as_me:18267: \$? = $ac_status" >&5
18268 (exit $ac_status); }; }; then
18269 cf_cv_func_curses_version=yes
18272 echo "$as_me: program exited with status $ac_status" >&5
18273 echo "$as_me: failed program was:" >&5
18274 cat conftest.$ac_ext >&5
18275 cf_cv_func_curses_version=no
18278 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18282 echo "$as_me:18282: result: $cf_cv_func_curses_version" >&5
18283 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18284 test "$cf_cv_func_curses_version" = yes &&
18285 cat >>confdefs.h <<\EOF
18286 #define HAVE_CURSES_VERSION 1
18289 echo "$as_me:18289: checking for alternate character set array" >&5
18290 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18291 if test "${cf_cv_curses_acs_map+set}" = set; then
18292 echo $ECHO_N "(cached) $ECHO_C" >&6
18295 cf_cv_curses_acs_map=unknown
18296 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18298 cat >conftest.$ac_ext <<_ACEOF
18299 #line 18299 "configure"
18300 #include "confdefs.h"
18302 #include <${cf_cv_ncurses_header:-curses.h}>
18308 $name['k'] = ACS_PLUS
18314 rm -f conftest.$ac_objext conftest$ac_exeext
18315 if { (eval echo "$as_me:18315: \"$ac_link\"") >&5
18316 (eval $ac_link) 2>&5
18318 echo "$as_me:18318: \$? = $ac_status" >&5
18319 (exit $ac_status); } &&
18320 { ac_try='test -s conftest$ac_exeext'
18321 { (eval echo "$as_me:18321: \"$ac_try\"") >&5
18322 (eval $ac_try) 2>&5
18324 echo "$as_me:18324: \$? = $ac_status" >&5
18325 (exit $ac_status); }; }; then
18326 cf_cv_curses_acs_map=$name; break
18328 echo "$as_me: failed program was:" >&5
18329 cat conftest.$ac_ext >&5
18331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18335 echo "$as_me:18335: result: $cf_cv_curses_acs_map" >&5
18336 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18338 test "$cf_cv_curses_acs_map" != unknown &&
18339 cat >>confdefs.h <<EOF
18340 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18343 if test "$cf_enable_widec" = yes; then
18345 echo "$as_me:18345: checking for wide alternate character set array" >&5
18346 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18347 if test "${cf_cv_curses_wacs_map+set}" = set; then
18348 echo $ECHO_N "(cached) $ECHO_C" >&6
18351 cf_cv_curses_wacs_map=unknown
18352 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18354 cat >conftest.$ac_ext <<_ACEOF
18355 #line 18355 "configure"
18356 #include "confdefs.h"
18358 #ifndef _XOPEN_SOURCE_EXTENDED
18359 #define _XOPEN_SOURCE_EXTENDED
18361 #include <${cf_cv_ncurses_header:-curses.h}>
18365 void *foo = &($name['k'])
18370 rm -f conftest.$ac_objext conftest$ac_exeext
18371 if { (eval echo "$as_me:18371: \"$ac_link\"") >&5
18372 (eval $ac_link) 2>&5
18374 echo "$as_me:18374: \$? = $ac_status" >&5
18375 (exit $ac_status); } &&
18376 { ac_try='test -s conftest$ac_exeext'
18377 { (eval echo "$as_me:18377: \"$ac_try\"") >&5
18378 (eval $ac_try) 2>&5
18380 echo "$as_me:18380: \$? = $ac_status" >&5
18381 (exit $ac_status); }; }; then
18382 cf_cv_curses_wacs_map=$name
18385 echo "$as_me: failed program was:" >&5
18386 cat conftest.$ac_ext >&5
18388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18391 echo "$as_me:18391: result: $cf_cv_curses_wacs_map" >&5
18392 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18394 test "$cf_cv_curses_wacs_map" != unknown &&
18395 cat >>confdefs.h <<EOF
18396 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18399 echo "$as_me:18399: checking for wide alternate character constants" >&5
18400 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18401 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18402 echo $ECHO_N "(cached) $ECHO_C" >&6
18405 cf_cv_curses_wacs_symbols=no
18406 if test "$cf_cv_curses_wacs_map" != unknown
18408 cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18412 #ifndef _XOPEN_SOURCE_EXTENDED
18413 #define _XOPEN_SOURCE_EXTENDED
18415 #include <${cf_cv_ncurses_header:-curses.h}>
18419 cchar_t *foo = WACS_PLUS;
18420 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18425 rm -f conftest.$ac_objext conftest$ac_exeext
18426 if { (eval echo "$as_me:18426: \"$ac_link\"") >&5
18427 (eval $ac_link) 2>&5
18429 echo "$as_me:18429: \$? = $ac_status" >&5
18430 (exit $ac_status); } &&
18431 { ac_try='test -s conftest$ac_exeext'
18432 { (eval echo "$as_me:18432: \"$ac_try\"") >&5
18433 (eval $ac_try) 2>&5
18435 echo "$as_me:18435: \$? = $ac_status" >&5
18436 (exit $ac_status); }; }; then
18437 cf_cv_curses_wacs_symbols=yes
18439 echo "$as_me: failed program was:" >&5
18440 cat conftest.$ac_ext >&5
18442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18444 cat >conftest.$ac_ext <<_ACEOF
18445 #line 18445 "configure"
18446 #include "confdefs.h"
18448 #ifndef _XOPEN_SOURCE_EXTENDED
18449 #define _XOPEN_SOURCE_EXTENDED
18451 #include <${cf_cv_ncurses_header:-curses.h}>
18455 cchar_t *foo = WACS_PLUS
18460 rm -f conftest.$ac_objext conftest$ac_exeext
18461 if { (eval echo "$as_me:18461: \"$ac_link\"") >&5
18462 (eval $ac_link) 2>&5
18464 echo "$as_me:18464: \$? = $ac_status" >&5
18465 (exit $ac_status); } &&
18466 { ac_try='test -s conftest$ac_exeext'
18467 { (eval echo "$as_me:18467: \"$ac_try\"") >&5
18468 (eval $ac_try) 2>&5
18470 echo "$as_me:18470: \$? = $ac_status" >&5
18471 (exit $ac_status); }; }; then
18472 cf_cv_curses_wacs_symbols=yes
18474 echo "$as_me: failed program was:" >&5
18475 cat conftest.$ac_ext >&5
18477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18481 echo "$as_me:18481: result: $cf_cv_curses_wacs_symbols" >&5
18482 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18484 test "$cf_cv_curses_wacs_symbols" != no &&
18485 cat >>confdefs.h <<\EOF
18486 #define CURSES_WACS_SYMBOLS 1
18491 echo "$as_me:18491: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18492 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18493 cat >conftest.$ac_ext <<_ACEOF
18494 #line 18494 "configure"
18495 #include "confdefs.h"
18497 #ifndef _XOPEN_SOURCE_EXTENDED
18498 #define _XOPEN_SOURCE_EXTENDED
18500 #include <${cf_cv_ncurses_header:-curses.h}>
18511 rm -f conftest.$ac_objext
18512 if { (eval echo "$as_me:18512: \"$ac_compile\"") >&5
18513 (eval $ac_compile) 2>&5
18515 echo "$as_me:18515: \$? = $ac_status" >&5
18516 (exit $ac_status); } &&
18517 { ac_try='test -s conftest.$ac_objext'
18518 { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519 (eval $ac_try) 2>&5
18521 echo "$as_me:18521: \$? = $ac_status" >&5
18522 (exit $ac_status); }; }; then
18525 echo "$as_me: failed program was:" >&5
18526 cat conftest.$ac_ext >&5
18529 rm -f conftest.$ac_objext conftest.$ac_ext
18530 echo "$as_me:18530: result: $cf_result" >&5
18531 echo "${ECHO_T}$cf_result" >&6
18532 if test $cf_result = yes ; then
18534 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18536 cat >>confdefs.h <<EOF
18537 #define $cf_result 1
18542 cat >>confdefs.h <<EOF
18543 #define attr_t long
18548 if test "$cf_enable_widec" = yes; then
18550 # This is needed on Tru64 5.0 to declare mbstate_t
18551 echo "$as_me:18551: checking if we must include wchar.h to declare mbstate_t" >&5
18552 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18553 if test "${cf_cv_mbstate_t+set}" = set; then
18554 echo $ECHO_N "(cached) $ECHO_C" >&6
18557 cat >conftest.$ac_ext <<_ACEOF
18558 #line 18558 "configure"
18559 #include "confdefs.h"
18561 #include <stdlib.h>
18562 #include <stdarg.h>
18564 #ifdef HAVE_LIBUTF8_H
18565 #include <libutf8.h>
18575 rm -f conftest.$ac_objext
18576 if { (eval echo "$as_me:18576: \"$ac_compile\"") >&5
18577 (eval $ac_compile) 2>&5
18579 echo "$as_me:18579: \$? = $ac_status" >&5
18580 (exit $ac_status); } &&
18581 { ac_try='test -s conftest.$ac_objext'
18582 { (eval echo "$as_me:18582: \"$ac_try\"") >&5
18583 (eval $ac_try) 2>&5
18585 echo "$as_me:18585: \$? = $ac_status" >&5
18586 (exit $ac_status); }; }; then
18589 echo "$as_me: failed program was:" >&5
18590 cat conftest.$ac_ext >&5
18591 cat >conftest.$ac_ext <<_ACEOF
18592 #line 18592 "configure"
18593 #include "confdefs.h"
18595 #include <stdlib.h>
18596 #include <stdarg.h>
18599 #ifdef HAVE_LIBUTF8_H
18600 #include <libutf8.h>
18610 rm -f conftest.$ac_objext
18611 if { (eval echo "$as_me:18611: \"$ac_compile\"") >&5
18612 (eval $ac_compile) 2>&5
18614 echo "$as_me:18614: \$? = $ac_status" >&5
18615 (exit $ac_status); } &&
18616 { ac_try='test -s conftest.$ac_objext'
18617 { (eval echo "$as_me:18617: \"$ac_try\"") >&5
18618 (eval $ac_try) 2>&5
18620 echo "$as_me:18620: \$? = $ac_status" >&5
18621 (exit $ac_status); }; }; then
18622 cf_cv_mbstate_t=yes
18624 echo "$as_me: failed program was:" >&5
18625 cat conftest.$ac_ext >&5
18626 cf_cv_mbstate_t=unknown
18628 rm -f conftest.$ac_objext conftest.$ac_ext
18630 rm -f conftest.$ac_objext conftest.$ac_ext
18632 echo "$as_me:18632: result: $cf_cv_mbstate_t" >&5
18633 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18635 if test "$cf_cv_mbstate_t" = yes ; then
18637 cat >>confdefs.h <<\EOF
18638 #define NEED_WCHAR_H 1
18644 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18645 if test "$cf_cv_mbstate_t" = unknown ; then
18646 NCURSES_MBSTATE_T=1
18649 # if we find mbstate_t in either place, use substitution to provide a fallback.
18650 if test "$cf_cv_mbstate_t" != unknown ; then
18651 NCURSES_OK_MBSTATE_T=1
18654 # This is needed on Tru64 5.0 to declare wchar_t
18655 echo "$as_me:18655: checking if we must include wchar.h to declare wchar_t" >&5
18656 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18657 if test "${cf_cv_wchar_t+set}" = set; then
18658 echo $ECHO_N "(cached) $ECHO_C" >&6
18661 cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18665 #include <stdlib.h>
18666 #include <stdarg.h>
18668 #ifdef HAVE_LIBUTF8_H
18669 #include <libutf8.h>
18679 rm -f conftest.$ac_objext
18680 if { (eval echo "$as_me:18680: \"$ac_compile\"") >&5
18681 (eval $ac_compile) 2>&5
18683 echo "$as_me:18683: \$? = $ac_status" >&5
18684 (exit $ac_status); } &&
18685 { ac_try='test -s conftest.$ac_objext'
18686 { (eval echo "$as_me:18686: \"$ac_try\"") >&5
18687 (eval $ac_try) 2>&5
18689 echo "$as_me:18689: \$? = $ac_status" >&5
18690 (exit $ac_status); }; }; then
18693 echo "$as_me: failed program was:" >&5
18694 cat conftest.$ac_ext >&5
18695 cat >conftest.$ac_ext <<_ACEOF
18696 #line 18696 "configure"
18697 #include "confdefs.h"
18699 #include <stdlib.h>
18700 #include <stdarg.h>
18703 #ifdef HAVE_LIBUTF8_H
18704 #include <libutf8.h>
18714 rm -f conftest.$ac_objext
18715 if { (eval echo "$as_me:18715: \"$ac_compile\"") >&5
18716 (eval $ac_compile) 2>&5
18718 echo "$as_me:18718: \$? = $ac_status" >&5
18719 (exit $ac_status); } &&
18720 { ac_try='test -s conftest.$ac_objext'
18721 { (eval echo "$as_me:18721: \"$ac_try\"") >&5
18722 (eval $ac_try) 2>&5
18724 echo "$as_me:18724: \$? = $ac_status" >&5
18725 (exit $ac_status); }; }; then
18728 echo "$as_me: failed program was:" >&5
18729 cat conftest.$ac_ext >&5
18730 cf_cv_wchar_t=unknown
18732 rm -f conftest.$ac_objext conftest.$ac_ext
18734 rm -f conftest.$ac_objext conftest.$ac_ext
18736 echo "$as_me:18736: result: $cf_cv_wchar_t" >&5
18737 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18739 if test "$cf_cv_wchar_t" = yes ; then
18741 cat >>confdefs.h <<\EOF
18742 #define NEED_WCHAR_H 1
18748 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18749 if test "$cf_cv_wchar_t" = unknown ; then
18753 # if we find wchar_t in either place, use substitution to provide a fallback.
18754 if test "$cf_cv_wchar_t" != unknown ; then
18755 NCURSES_OK_WCHAR_T=1
18758 # This is needed on Tru64 5.0 to declare wint_t
18759 echo "$as_me:18759: checking if we must include wchar.h to declare wint_t" >&5
18760 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18761 if test "${cf_cv_wint_t+set}" = set; then
18762 echo $ECHO_N "(cached) $ECHO_C" >&6
18765 cat >conftest.$ac_ext <<_ACEOF
18766 #line 18766 "configure"
18767 #include "confdefs.h"
18769 #include <stdlib.h>
18770 #include <stdarg.h>
18772 #ifdef HAVE_LIBUTF8_H
18773 #include <libutf8.h>
18783 rm -f conftest.$ac_objext
18784 if { (eval echo "$as_me:18784: \"$ac_compile\"") >&5
18785 (eval $ac_compile) 2>&5
18787 echo "$as_me:18787: \$? = $ac_status" >&5
18788 (exit $ac_status); } &&
18789 { ac_try='test -s conftest.$ac_objext'
18790 { (eval echo "$as_me:18790: \"$ac_try\"") >&5
18791 (eval $ac_try) 2>&5
18793 echo "$as_me:18793: \$? = $ac_status" >&5
18794 (exit $ac_status); }; }; then
18797 echo "$as_me: failed program was:" >&5
18798 cat conftest.$ac_ext >&5
18799 cat >conftest.$ac_ext <<_ACEOF
18800 #line 18800 "configure"
18801 #include "confdefs.h"
18803 #include <stdlib.h>
18804 #include <stdarg.h>
18807 #ifdef HAVE_LIBUTF8_H
18808 #include <libutf8.h>
18818 rm -f conftest.$ac_objext
18819 if { (eval echo "$as_me:18819: \"$ac_compile\"") >&5
18820 (eval $ac_compile) 2>&5
18822 echo "$as_me:18822: \$? = $ac_status" >&5
18823 (exit $ac_status); } &&
18824 { ac_try='test -s conftest.$ac_objext'
18825 { (eval echo "$as_me:18825: \"$ac_try\"") >&5
18826 (eval $ac_try) 2>&5
18828 echo "$as_me:18828: \$? = $ac_status" >&5
18829 (exit $ac_status); }; }; then
18832 echo "$as_me: failed program was:" >&5
18833 cat conftest.$ac_ext >&5
18834 cf_cv_wint_t=unknown
18836 rm -f conftest.$ac_objext conftest.$ac_ext
18838 rm -f conftest.$ac_objext conftest.$ac_ext
18840 echo "$as_me:18840: result: $cf_cv_wint_t" >&5
18841 echo "${ECHO_T}$cf_cv_wint_t" >&6
18843 if test "$cf_cv_wint_t" = yes ; then
18845 cat >>confdefs.h <<\EOF
18846 #define NEED_WCHAR_H 1
18852 # if we do not find wint_t in either place, use substitution to provide a fallback.
18853 if test "$cf_cv_wint_t" = unknown ; then
18857 # if we find wint_t in either place, use substitution to provide a fallback.
18858 if test "$cf_cv_wint_t" != unknown ; then
18859 NCURSES_OK_WINT_T=1
18862 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
18864 echo "$as_me:18864: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18865 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18866 cat >conftest.$ac_ext <<_ACEOF
18867 #line 18867 "configure"
18868 #include "confdefs.h"
18870 #ifndef _XOPEN_SOURCE_EXTENDED
18871 #define _XOPEN_SOURCE_EXTENDED
18873 #include <${cf_cv_ncurses_header:-curses.h}>
18884 rm -f conftest.$ac_objext
18885 if { (eval echo "$as_me:18885: \"$ac_compile\"") >&5
18886 (eval $ac_compile) 2>&5
18888 echo "$as_me:18888: \$? = $ac_status" >&5
18889 (exit $ac_status); } &&
18890 { ac_try='test -s conftest.$ac_objext'
18891 { (eval echo "$as_me:18891: \"$ac_try\"") >&5
18892 (eval $ac_try) 2>&5
18894 echo "$as_me:18894: \$? = $ac_status" >&5
18895 (exit $ac_status); }; }; then
18898 echo "$as_me: failed program was:" >&5
18899 cat conftest.$ac_ext >&5
18902 rm -f conftest.$ac_objext conftest.$ac_ext
18903 echo "$as_me:18903: result: $cf_result" >&5
18904 echo "${ECHO_T}$cf_result" >&6
18905 if test $cf_result = yes ; then
18907 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18909 cat >>confdefs.h <<EOF
18910 #define $cf_result 1
18915 cat >>confdefs.h <<EOF
18916 #define mbstate_t long
18923 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
18925 echo "$as_me:18925: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18926 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18927 cat >conftest.$ac_ext <<_ACEOF
18928 #line 18928 "configure"
18929 #include "confdefs.h"
18931 #ifndef _XOPEN_SOURCE_EXTENDED
18932 #define _XOPEN_SOURCE_EXTENDED
18934 #include <${cf_cv_ncurses_header:-curses.h}>
18945 rm -f conftest.$ac_objext
18946 if { (eval echo "$as_me:18946: \"$ac_compile\"") >&5
18947 (eval $ac_compile) 2>&5
18949 echo "$as_me:18949: \$? = $ac_status" >&5
18950 (exit $ac_status); } &&
18951 { ac_try='test -s conftest.$ac_objext'
18952 { (eval echo "$as_me:18952: \"$ac_try\"") >&5
18953 (eval $ac_try) 2>&5
18955 echo "$as_me:18955: \$? = $ac_status" >&5
18956 (exit $ac_status); }; }; then
18959 echo "$as_me: failed program was:" >&5
18960 cat conftest.$ac_ext >&5
18963 rm -f conftest.$ac_objext conftest.$ac_ext
18964 echo "$as_me:18964: result: $cf_result" >&5
18965 echo "${ECHO_T}$cf_result" >&6
18966 if test $cf_result = yes ; then
18968 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18970 cat >>confdefs.h <<EOF
18971 #define $cf_result 1
18976 cat >>confdefs.h <<EOF
18977 #define wchar_t long
18984 if test "$NCURSES_OK_WINT_T" = 0 ; then
18986 echo "$as_me:18986: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18987 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18988 cat >conftest.$ac_ext <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18992 #ifndef _XOPEN_SOURCE_EXTENDED
18993 #define _XOPEN_SOURCE_EXTENDED
18995 #include <${cf_cv_ncurses_header:-curses.h}>
19006 rm -f conftest.$ac_objext
19007 if { (eval echo "$as_me:19007: \"$ac_compile\"") >&5
19008 (eval $ac_compile) 2>&5
19010 echo "$as_me:19010: \$? = $ac_status" >&5
19011 (exit $ac_status); } &&
19012 { ac_try='test -s conftest.$ac_objext'
19013 { (eval echo "$as_me:19013: \"$ac_try\"") >&5
19014 (eval $ac_try) 2>&5
19016 echo "$as_me:19016: \$? = $ac_status" >&5
19017 (exit $ac_status); }; }; then
19020 echo "$as_me: failed program was:" >&5
19021 cat conftest.$ac_ext >&5
19024 rm -f conftest.$ac_objext conftest.$ac_ext
19025 echo "$as_me:19025: result: $cf_result" >&5
19026 echo "${ECHO_T}$cf_result" >&6
19027 if test $cf_result = yes ; then
19029 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19031 cat >>confdefs.h <<EOF
19032 #define $cf_result 1
19037 cat >>confdefs.h <<EOF
19038 #define wint_t long
19053 echo "$as_me:19053: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19054 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19056 cat >conftest.$ac_ext <<_ACEOF
19057 #line 19057 "configure"
19058 #include "confdefs.h"
19060 #ifdef HAVE_XCURSES
19061 #include <xcurses.h>
19062 char * XCursesProgramName = "test";
19064 #include <${cf_cv_ncurses_header:-curses.h}>
19065 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19066 #include <ncursesw/term.h>
19067 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19068 #include <ncurses/term.h>
19069 #elif defined(HAVE_TERM_H)
19078 void *foo = &($cf_data)
19084 rm -f conftest.$ac_objext
19085 if { (eval echo "$as_me:19085: \"$ac_compile\"") >&5
19086 (eval $ac_compile) 2>&5
19088 echo "$as_me:19088: \$? = $ac_status" >&5
19089 (exit $ac_status); } &&
19090 { ac_try='test -s conftest.$ac_objext'
19091 { (eval echo "$as_me:19091: \"$ac_try\"") >&5
19092 (eval $ac_try) 2>&5
19094 echo "$as_me:19094: \$? = $ac_status" >&5
19095 (exit $ac_status); }; }; then
19099 echo "$as_me: failed program was:" >&5
19100 cat conftest.$ac_ext >&5
19103 rm -f conftest.$ac_objext conftest.$ac_ext
19104 echo "$as_me:19104: result: $cf_result" >&5
19105 echo "${ECHO_T}$cf_result" >&6
19107 if test $cf_result = yes ; then
19109 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19111 cat >>confdefs.h <<EOF
19112 #define $cf_result 1
19116 echo "$as_me:19116: checking for data $cf_data in library" >&5
19117 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19118 # BSD linkers insist on making weak linkage, but resolve at runtime.
19119 if test "$cross_compiling" = yes; then
19122 cat >conftest.$ac_ext <<_ACEOF
19123 #line 19123 "configure"
19124 #include "confdefs.h"
19126 #ifdef HAVE_XCURSES
19127 #include <xcurses.h>
19128 char * XCursesProgramName = "test";
19130 #include <${cf_cv_ncurses_header:-curses.h}>
19131 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19132 #include <ncursesw/term.h>
19133 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19134 #include <ncurses/term.h>
19135 #elif defined(HAVE_TERM_H)
19140 extern char $cf_data;
19146 void *foo = &($cf_data);
19147 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19148 ${cf_cv_main_return:-return}(foo == 0);
19155 rm -f conftest.$ac_objext conftest$ac_exeext
19156 if { (eval echo "$as_me:19156: \"$ac_link\"") >&5
19157 (eval $ac_link) 2>&5
19159 echo "$as_me:19159: \$? = $ac_status" >&5
19160 (exit $ac_status); } &&
19161 { ac_try='test -s conftest$ac_exeext'
19162 { (eval echo "$as_me:19162: \"$ac_try\"") >&5
19163 (eval $ac_try) 2>&5
19165 echo "$as_me:19165: \$? = $ac_status" >&5
19166 (exit $ac_status); }; }; then
19169 echo "$as_me: failed program was:" >&5
19170 cat conftest.$ac_ext >&5
19173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19176 cat >conftest.$ac_ext <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19180 #ifdef HAVE_XCURSES
19181 #include <xcurses.h>
19182 char * XCursesProgramName = "test";
19184 #include <${cf_cv_ncurses_header:-curses.h}>
19185 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19186 #include <ncursesw/term.h>
19187 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19188 #include <ncurses/term.h>
19189 #elif defined(HAVE_TERM_H)
19194 extern char $cf_data;
19197 void *foo = &($cf_data);
19198 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19199 ${cf_cv_main_return:-return}(foo == 0);
19202 rm -f conftest$ac_exeext
19203 if { (eval echo "$as_me:19203: \"$ac_link\"") >&5
19204 (eval $ac_link) 2>&5
19206 echo "$as_me:19206: \$? = $ac_status" >&5
19207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19208 { (eval echo "$as_me:19208: \"$ac_try\"") >&5
19209 (eval $ac_try) 2>&5
19211 echo "$as_me:19211: \$? = $ac_status" >&5
19212 (exit $ac_status); }; }; then
19216 echo "$as_me: program exited with status $ac_status" >&5
19217 echo "$as_me: failed program was:" >&5
19218 cat conftest.$ac_ext >&5
19221 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19223 echo "$as_me:19223: result: $cf_result" >&5
19224 echo "${ECHO_T}$cf_result" >&6
19225 if test $cf_result = yes ; then
19227 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19229 cat >>confdefs.h <<EOF
19230 #define $cf_result 1
19233 # do not exit loop here, since we prefer system's declarations
19238 if ( test "$GCC" = yes || test "$GXX" = yes )
19240 echo "$as_me:19240: checking if you want to turn on gcc warnings" >&5
19241 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19243 # Check whether --enable-warnings or --disable-warnings was given.
19244 if test "${enable_warnings+set}" = set; then
19245 enableval="$enable_warnings"
19246 test "$enableval" != yes && enableval=no
19247 if test "$enableval" != "no" ; then
19257 echo "$as_me:19257: result: $with_warnings" >&5
19258 echo "${ECHO_T}$with_warnings" >&6
19259 if test "$with_warnings" = "yes"
19262 if test "$GCC" = yes
19264 cat > conftest.i <<EOF
19266 #define GCC_PRINTF 0
19269 #define GCC_SCANF 0
19271 #ifndef GCC_NORETURN
19272 #define GCC_NORETURN /* nothing */
19275 #define GCC_UNUSED /* nothing */
19278 if test "$GCC" = yes
19280 { echo "$as_me:19280: checking for $CC __attribute__ directives..." >&5
19281 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19282 cat > conftest.$ac_ext <<EOF
19283 #line 19283 "${as_me:-configure}"
19284 #include "confdefs.h"
19285 #include "conftest.h"
19286 #include "conftest.i"
19288 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19290 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19293 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19295 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19297 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19298 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19299 extern void foo(void) GCC_NORETURN;
19300 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19302 cf_printf_attribute=no
19303 cf_scanf_attribute=no
19304 for cf_attribute in scanf printf unused noreturn
19307 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19309 cf_directive="__attribute__(($cf_attribute))"
19310 echo "checking for $CC $cf_directive" 1>&5
19312 case $cf_attribute in
19314 cf_printf_attribute=yes
19315 cat >conftest.h <<EOF
19316 #define GCC_$cf_ATTRIBUTE 1
19320 cf_scanf_attribute=yes
19321 cat >conftest.h <<EOF
19322 #define GCC_$cf_ATTRIBUTE 1
19326 cat >conftest.h <<EOF
19327 #define GCC_$cf_ATTRIBUTE $cf_directive
19332 if { (eval echo "$as_me:19332: \"$ac_compile\"") >&5
19333 (eval $ac_compile) 2>&5
19335 echo "$as_me:19335: \$? = $ac_status" >&5
19336 (exit $ac_status); }; then
19337 test -n "$verbose" && echo "$as_me:19337: result: ... $cf_attribute" >&5
19338 echo "${ECHO_T}... $cf_attribute" >&6
19339 cat conftest.h >>confdefs.h
19340 case $cf_attribute in
19343 cat >>confdefs.h <<EOF
19344 #define GCC_NORETURN $cf_directive
19349 cf_value='/* nothing */'
19350 if test "$cf_printf_attribute" != no ; then
19351 cf_value='__attribute__((format(printf,fmt,var)))'
19353 cat >>confdefs.h <<\EOF
19354 #define GCC_PRINTF 1
19359 cat >>confdefs.h <<EOF
19360 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19365 cf_value='/* nothing */'
19366 if test "$cf_scanf_attribute" != no ; then
19367 cf_value='__attribute__((format(scanf,fmt,var)))'
19369 cat >>confdefs.h <<\EOF
19370 #define GCC_SCANF 1
19375 cat >>confdefs.h <<EOF
19376 #define GCC_SCANFLIKE(fmt,var) $cf_value
19382 cat >>confdefs.h <<EOF
19383 #define GCC_UNUSED $cf_directive
19391 fgrep define conftest.i >>confdefs.h
19398 if test "$GCC" = yes ; then
19401 echo "$as_me:19401: checking if this is really Intel C compiler" >&5
19402 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
19403 cf_save_CFLAGS="$CFLAGS"
19404 CFLAGS="$CFLAGS -no-gcc"
19405 cat >conftest.$ac_ext <<_ACEOF
19406 #line 19406 "configure"
19407 #include "confdefs.h"
19413 #ifdef __INTEL_COMPILER
19422 rm -f conftest.$ac_objext
19423 if { (eval echo "$as_me:19423: \"$ac_compile\"") >&5
19424 (eval $ac_compile) 2>&5
19426 echo "$as_me:19426: \$? = $ac_status" >&5
19427 (exit $ac_status); } &&
19428 { ac_try='test -s conftest.$ac_objext'
19429 { (eval echo "$as_me:19429: \"$ac_try\"") >&5
19430 (eval $ac_try) 2>&5
19432 echo "$as_me:19432: \$? = $ac_status" >&5
19433 (exit $ac_status); }; }; then
19435 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
19438 echo "$as_me: failed program was:" >&5
19439 cat conftest.$ac_ext >&5
19441 rm -f conftest.$ac_objext conftest.$ac_ext
19442 CFLAGS="$cf_save_CFLAGS"
19443 echo "$as_me:19443: result: $INTEL_COMPILER" >&5
19444 echo "${ECHO_T}$INTEL_COMPILER" >&6
19451 if test "$GCC" = yes ; then
19452 echo "$as_me:19452: checking if this is really Clang C compiler" >&5
19453 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
19454 cf_save_CFLAGS="$CFLAGS"
19455 CFLAGS="$CFLAGS -Qunused-arguments"
19456 cat >conftest.$ac_ext <<_ACEOF
19457 #line 19457 "configure"
19458 #include "confdefs.h"
19473 rm -f conftest.$ac_objext
19474 if { (eval echo "$as_me:19474: \"$ac_compile\"") >&5
19475 (eval $ac_compile) 2>&5
19477 echo "$as_me:19477: \$? = $ac_status" >&5
19478 (exit $ac_status); } &&
19479 { ac_try='test -s conftest.$ac_objext'
19480 { (eval echo "$as_me:19480: \"$ac_try\"") >&5
19481 (eval $ac_try) 2>&5
19483 echo "$as_me:19483: \$? = $ac_status" >&5
19484 (exit $ac_status); }; }; then
19486 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
19489 echo "$as_me: failed program was:" >&5
19490 cat conftest.$ac_ext >&5
19492 rm -f conftest.$ac_objext conftest.$ac_ext
19493 CFLAGS="$cf_save_CFLAGS"
19494 echo "$as_me:19494: result: $CLANG_COMPILER" >&5
19495 echo "${ECHO_T}$CLANG_COMPILER" >&6
19498 cat > conftest.$ac_ext <<EOF
19499 #line 19499 "${as_me:-configure}"
19500 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19503 if test "$INTEL_COMPILER" = yes
19505 # The "-wdXXX" options suppress warnings:
19506 # remark #1419: external declaration in primary source file
19507 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19508 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19509 # remark #193: zero used for undefined preprocessing identifier
19510 # remark #593: variable "curs_sb_left_arrow" was set but never used
19511 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19512 # remark #869: parameter "tw" was never referenced
19513 # remark #981: operands are evaluated in unspecified order
19514 # warning #279: controlling expression is constant
19516 { echo "$as_me:19516: checking for $CC warning options..." >&5
19517 echo "$as_me: checking for $CC warning options..." >&6;}
19518 cf_save_CFLAGS="$CFLAGS"
19519 EXTRA_CFLAGS="-Wall"
19531 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19532 if { (eval echo "$as_me:19532: \"$ac_compile\"") >&5
19533 (eval $ac_compile) 2>&5
19535 echo "$as_me:19535: \$? = $ac_status" >&5
19536 (exit $ac_status); }; then
19537 test -n "$verbose" && echo "$as_me:19537: result: ... -$cf_opt" >&5
19538 echo "${ECHO_T}... -$cf_opt" >&6
19539 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19542 CFLAGS="$cf_save_CFLAGS"
19544 elif test "$GCC" = yes
19546 { echo "$as_me:19546: checking for $CC warning options..." >&5
19547 echo "$as_me: checking for $CC warning options..." >&6;}
19548 cf_save_CFLAGS="$CFLAGS"
19551 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19552 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19553 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19554 for cf_opt in W Wall \
19555 Wbad-function-cast \
19558 Wdeclaration-after-statement \
19561 Wmissing-declarations \
19562 Wmissing-prototypes \
19566 Wstrict-prototypes \
19567 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19569 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19570 if { (eval echo "$as_me:19570: \"$ac_compile\"") >&5
19571 (eval $ac_compile) 2>&5
19573 echo "$as_me:19573: \$? = $ac_status" >&5
19574 (exit $ac_status); }; then
19575 test -n "$verbose" && echo "$as_me:19575: result: ... -$cf_opt" >&5
19576 echo "${ECHO_T}... -$cf_opt" >&6
19580 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19581 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19585 case $GCC_VERSION in
19587 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19589 echo "${as_me:-configure}:19589: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19595 case $GCC_VERSION in
19597 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19599 echo "${as_me:-configure}:19599: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19605 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19608 CFLAGS="$cf_save_CFLAGS"
19615 echo "$as_me:19615: checking if you want to use dmalloc for testing" >&5
19616 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19618 # Check whether --with-dmalloc or --without-dmalloc was given.
19619 if test "${with_dmalloc+set}" = set; then
19620 withval="$with_dmalloc"
19622 cat >>confdefs.h <<EOF
19623 #define USE_DMALLOC 1
19626 : ${with_cflags:=-g}
19627 : ${with_no_leaks:=yes}
19632 echo "$as_me:19632: result: ${with_dmalloc:-no}" >&5
19633 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19635 case .$with_cflags in
19645 cf_new_extra_cppflags=
19647 for cf_add_cflags in -g
19649 case $cf_fix_cppflags in
19651 case $cf_add_cflags in
19652 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19653 case $cf_add_cflags in
19655 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19658 && test -z "${cf_tst_cflags}" \
19659 && cf_fix_cppflags=yes
19661 if test $cf_fix_cppflags = yes ; then
19663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19667 elif test "${cf_tst_cflags}" = "\"'" ; then
19669 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19670 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19676 case "$CPPFLAGS" in
19680 case $cf_add_cflags in
19682 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19684 CPPFLAGS=`echo "$CPPFLAGS" | \
19685 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19686 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19691 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19692 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19699 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19700 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19707 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19708 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19710 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19712 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19713 && test -z "${cf_tst_cflags}" \
19714 && cf_fix_cppflags=no
19719 if test -n "$cf_new_cflags" ; then
19721 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19722 CFLAGS="${CFLAGS}$cf_new_cflags"
19726 if test -n "$cf_new_cppflags" ; then
19728 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19729 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19733 if test -n "$cf_new_extra_cppflags" ; then
19735 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19736 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19745 if test "$with_dmalloc" = yes ; then
19746 echo "$as_me:19746: checking for dmalloc.h" >&5
19747 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19748 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19749 echo $ECHO_N "(cached) $ECHO_C" >&6
19751 cat >conftest.$ac_ext <<_ACEOF
19752 #line 19752 "configure"
19753 #include "confdefs.h"
19754 #include <dmalloc.h>
19756 if { (eval echo "$as_me:19756: \"$ac_cpp conftest.$ac_ext\"") >&5
19757 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19759 egrep -v '^ *\+' conftest.er1 >conftest.err
19761 cat conftest.err >&5
19762 echo "$as_me:19762: \$? = $ac_status" >&5
19763 (exit $ac_status); } >/dev/null; then
19764 if test -s conftest.err; then
19765 ac_cpp_err=$ac_c_preproc_warn_flag
19772 if test -z "$ac_cpp_err"; then
19773 ac_cv_header_dmalloc_h=yes
19775 echo "$as_me: failed program was:" >&5
19776 cat conftest.$ac_ext >&5
19777 ac_cv_header_dmalloc_h=no
19779 rm -f conftest.err conftest.$ac_ext
19781 echo "$as_me:19781: result: $ac_cv_header_dmalloc_h" >&5
19782 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19783 if test $ac_cv_header_dmalloc_h = yes; then
19785 echo "$as_me:19785: checking for dmalloc_debug in -ldmalloc" >&5
19786 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19787 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19788 echo $ECHO_N "(cached) $ECHO_C" >&6
19790 ac_check_lib_save_LIBS=$LIBS
19791 LIBS="-ldmalloc $LIBS"
19792 cat >conftest.$ac_ext <<_ACEOF
19793 #line 19793 "configure"
19794 #include "confdefs.h"
19796 /* Override any gcc2 internal prototype to avoid an error. */
19800 /* We use char because int might match the return type of a gcc2
19801 builtin and then its argument prototype would still apply. */
19802 char dmalloc_debug ();
19811 rm -f conftest.$ac_objext conftest$ac_exeext
19812 if { (eval echo "$as_me:19812: \"$ac_link\"") >&5
19813 (eval $ac_link) 2>&5
19815 echo "$as_me:19815: \$? = $ac_status" >&5
19816 (exit $ac_status); } &&
19817 { ac_try='test -s conftest$ac_exeext'
19818 { (eval echo "$as_me:19818: \"$ac_try\"") >&5
19819 (eval $ac_try) 2>&5
19821 echo "$as_me:19821: \$? = $ac_status" >&5
19822 (exit $ac_status); }; }; then
19823 ac_cv_lib_dmalloc_dmalloc_debug=yes
19825 echo "$as_me: failed program was:" >&5
19826 cat conftest.$ac_ext >&5
19827 ac_cv_lib_dmalloc_dmalloc_debug=no
19829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19830 LIBS=$ac_check_lib_save_LIBS
19832 echo "$as_me:19832: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19833 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19834 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19835 cat >>confdefs.h <<EOF
19836 #define HAVE_LIBDMALLOC 1
19839 LIBS="-ldmalloc $LIBS"
19847 echo "$as_me:19847: checking if you want to use dbmalloc for testing" >&5
19848 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19850 # Check whether --with-dbmalloc or --without-dbmalloc was given.
19851 if test "${with_dbmalloc+set}" = set; then
19852 withval="$with_dbmalloc"
19854 cat >>confdefs.h <<EOF
19855 #define USE_DBMALLOC 1
19858 : ${with_cflags:=-g}
19859 : ${with_no_leaks:=yes}
19864 echo "$as_me:19864: result: ${with_dbmalloc:-no}" >&5
19865 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
19867 case .$with_cflags in
19877 cf_new_extra_cppflags=
19879 for cf_add_cflags in -g
19881 case $cf_fix_cppflags in
19883 case $cf_add_cflags in
19884 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19885 case $cf_add_cflags in
19887 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19889 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19890 && test -z "${cf_tst_cflags}" \
19891 && cf_fix_cppflags=yes
19893 if test $cf_fix_cppflags = yes ; then
19895 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19896 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19899 elif test "${cf_tst_cflags}" = "\"'" ; then
19901 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19902 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19908 case "$CPPFLAGS" in
19912 case $cf_add_cflags in
19914 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19916 CPPFLAGS=`echo "$CPPFLAGS" | \
19917 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19918 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19923 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19924 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19931 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19932 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19939 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19940 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19942 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19944 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19945 && test -z "${cf_tst_cflags}" \
19946 && cf_fix_cppflags=no
19951 if test -n "$cf_new_cflags" ; then
19953 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19954 CFLAGS="${CFLAGS}$cf_new_cflags"
19958 if test -n "$cf_new_cppflags" ; then
19960 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19961 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19965 if test -n "$cf_new_extra_cppflags" ; then
19967 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19968 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19977 if test "$with_dbmalloc" = yes ; then
19978 echo "$as_me:19978: checking for dbmalloc.h" >&5
19979 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19980 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19981 echo $ECHO_N "(cached) $ECHO_C" >&6
19983 cat >conftest.$ac_ext <<_ACEOF
19984 #line 19984 "configure"
19985 #include "confdefs.h"
19986 #include <dbmalloc.h>
19988 if { (eval echo "$as_me:19988: \"$ac_cpp conftest.$ac_ext\"") >&5
19989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19991 egrep -v '^ *\+' conftest.er1 >conftest.err
19993 cat conftest.err >&5
19994 echo "$as_me:19994: \$? = $ac_status" >&5
19995 (exit $ac_status); } >/dev/null; then
19996 if test -s conftest.err; then
19997 ac_cpp_err=$ac_c_preproc_warn_flag
20004 if test -z "$ac_cpp_err"; then
20005 ac_cv_header_dbmalloc_h=yes
20007 echo "$as_me: failed program was:" >&5
20008 cat conftest.$ac_ext >&5
20009 ac_cv_header_dbmalloc_h=no
20011 rm -f conftest.err conftest.$ac_ext
20013 echo "$as_me:20013: result: $ac_cv_header_dbmalloc_h" >&5
20014 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20015 if test $ac_cv_header_dbmalloc_h = yes; then
20017 echo "$as_me:20017: checking for debug_malloc in -ldbmalloc" >&5
20018 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20019 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20020 echo $ECHO_N "(cached) $ECHO_C" >&6
20022 ac_check_lib_save_LIBS=$LIBS
20023 LIBS="-ldbmalloc $LIBS"
20024 cat >conftest.$ac_ext <<_ACEOF
20025 #line 20025 "configure"
20026 #include "confdefs.h"
20028 /* Override any gcc2 internal prototype to avoid an error. */
20032 /* We use char because int might match the return type of a gcc2
20033 builtin and then its argument prototype would still apply. */
20034 char debug_malloc ();
20043 rm -f conftest.$ac_objext conftest$ac_exeext
20044 if { (eval echo "$as_me:20044: \"$ac_link\"") >&5
20045 (eval $ac_link) 2>&5
20047 echo "$as_me:20047: \$? = $ac_status" >&5
20048 (exit $ac_status); } &&
20049 { ac_try='test -s conftest$ac_exeext'
20050 { (eval echo "$as_me:20050: \"$ac_try\"") >&5
20051 (eval $ac_try) 2>&5
20053 echo "$as_me:20053: \$? = $ac_status" >&5
20054 (exit $ac_status); }; }; then
20055 ac_cv_lib_dbmalloc_debug_malloc=yes
20057 echo "$as_me: failed program was:" >&5
20058 cat conftest.$ac_ext >&5
20059 ac_cv_lib_dbmalloc_debug_malloc=no
20061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20062 LIBS=$ac_check_lib_save_LIBS
20064 echo "$as_me:20064: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20065 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20066 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20067 cat >>confdefs.h <<EOF
20068 #define HAVE_LIBDBMALLOC 1
20071 LIBS="-ldbmalloc $LIBS"
20079 echo "$as_me:20079: checking if you want to use valgrind for testing" >&5
20080 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20082 # Check whether --with-valgrind or --without-valgrind was given.
20083 if test "${with_valgrind+set}" = set; then
20084 withval="$with_valgrind"
20086 cat >>confdefs.h <<EOF
20087 #define USE_VALGRIND 1
20090 : ${with_cflags:=-g}
20091 : ${with_no_leaks:=yes}
20096 echo "$as_me:20096: result: ${with_valgrind:-no}" >&5
20097 echo "${ECHO_T}${with_valgrind:-no}" >&6
20099 case .$with_cflags in
20109 cf_new_extra_cppflags=
20111 for cf_add_cflags in -g
20113 case $cf_fix_cppflags in
20115 case $cf_add_cflags in
20116 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20117 case $cf_add_cflags in
20119 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20122 && test -z "${cf_tst_cflags}" \
20123 && cf_fix_cppflags=yes
20125 if test $cf_fix_cppflags = yes ; then
20127 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20128 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20131 elif test "${cf_tst_cflags}" = "\"'" ; then
20133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20140 case "$CPPFLAGS" in
20144 case $cf_add_cflags in
20146 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20148 CPPFLAGS=`echo "$CPPFLAGS" | \
20149 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20150 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20155 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20156 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20163 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20164 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20174 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20176 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20177 && test -z "${cf_tst_cflags}" \
20178 && cf_fix_cppflags=no
20183 if test -n "$cf_new_cflags" ; then
20185 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20186 CFLAGS="${CFLAGS}$cf_new_cflags"
20190 if test -n "$cf_new_cppflags" ; then
20192 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20193 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20197 if test -n "$cf_new_extra_cppflags" ; then
20199 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20200 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20209 echo "$as_me:20209: checking if you want to perform memory-leak testing" >&5
20210 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20212 # Check whether --enable-leaks or --disable-leaks was given.
20213 if test "${enable_leaks+set}" = set; then
20214 enableval="$enable_leaks"
20215 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20217 : ${with_no_leaks:=no}
20219 echo "$as_me:20219: result: $with_no_leaks" >&5
20220 echo "${ECHO_T}$with_no_leaks" >&6
20222 if test "$with_no_leaks" = yes ; then
20224 cat >>confdefs.h <<\EOF
20228 cat >>confdefs.h <<\EOF
20229 #define YY_NO_LEAKS 1
20235 if test "x$cf_cv_enable_rpath" != xno
20237 echo "$as_me:20237: checking for an rpath option" >&5
20238 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20239 case $cf_cv_system_name in
20241 if test "$GCC" = yes; then
20242 LD_RPATH_OPT="-Wl,-rpath,"
20244 LD_RPATH_OPT="-rpath "
20247 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20248 LD_RPATH_OPT="-Wl,-rpath,"
20250 (openbsd[2-9].*|mirbsd*)
20251 LD_RPATH_OPT="-Wl,-rpath,"
20254 LD_RPATH_OPT="-rpath "
20257 LD_RPATH_OPT="-Wl,-rpath,"
20260 LD_RPATH_OPT="-rpath "
20268 echo "$as_me:20268: result: $LD_RPATH_OPT" >&5
20269 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20271 case "x$LD_RPATH_OPT" in
20273 echo "$as_me:20273: checking if we need a space after rpath option" >&5
20274 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20275 cf_save_LIBS="$LIBS"
20277 cf_add_libs="${LD_RPATH_OPT}$libdir"
20278 # Filter out duplicates - this happens with badly-designed ".pc" files...
20279 for cf_add_1lib in $LIBS
20281 for cf_add_2lib in $cf_add_libs
20283 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20289 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20291 LIBS="$cf_add_libs"
20293 cat >conftest.$ac_ext <<_ACEOF
20294 #line 20294 "configure"
20295 #include "confdefs.h"
20305 rm -f conftest.$ac_objext conftest$ac_exeext
20306 if { (eval echo "$as_me:20306: \"$ac_link\"") >&5
20307 (eval $ac_link) 2>&5
20309 echo "$as_me:20309: \$? = $ac_status" >&5
20310 (exit $ac_status); } &&
20311 { ac_try='test -s conftest$ac_exeext'
20312 { (eval echo "$as_me:20312: \"$ac_try\"") >&5
20313 (eval $ac_try) 2>&5
20315 echo "$as_me:20315: \$? = $ac_status" >&5
20316 (exit $ac_status); }; }; then
20319 echo "$as_me: failed program was:" >&5
20320 cat conftest.$ac_ext >&5
20323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20324 LIBS="$cf_save_LIBS"
20325 echo "$as_me:20325: result: $cf_rpath_space" >&5
20326 echo "${ECHO_T}$cf_rpath_space" >&6
20327 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20332 echo "$as_me:20332: checking if rpath-hack should be disabled" >&5
20333 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20335 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20336 if test "${enable_rpath_hack+set}" = set; then
20337 enableval="$enable_rpath_hack"
20338 test "$enableval" != no && enableval=yes
20339 if test "$enableval" != "yes" ; then
20340 cf_disable_rpath_hack=yes
20342 cf_disable_rpath_hack=no
20346 cf_disable_rpath_hack=no
20349 echo "$as_me:20349: result: $cf_disable_rpath_hack" >&5
20350 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20351 if test "$cf_disable_rpath_hack" = no ; then
20353 echo "$as_me:20353: checking for updated LDFLAGS" >&5
20354 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20355 if test -n "$LD_RPATH_OPT" ; then
20356 echo "$as_me:20356: result: maybe" >&5
20357 echo "${ECHO_T}maybe" >&6
20361 # Extract the first word of "$ac_prog", so it can be a program name with args.
20362 set dummy $ac_prog; ac_word=$2
20363 echo "$as_me:20363: checking for $ac_word" >&5
20364 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20365 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20366 echo $ECHO_N "(cached) $ECHO_C" >&6
20368 if test -n "$cf_ldd_prog"; then
20369 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20371 ac_save_IFS=$IFS; IFS=$ac_path_separator
20373 for ac_dir in $ac_dummy; do
20375 test -z "$ac_dir" && ac_dir=.
20376 $as_executable_p "$ac_dir/$ac_word" || continue
20377 ac_cv_prog_cf_ldd_prog="$ac_prog"
20378 echo "$as_me:20378: found $ac_dir/$ac_word" >&5
20384 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20385 if test -n "$cf_ldd_prog"; then
20386 echo "$as_me:20386: result: $cf_ldd_prog" >&5
20387 echo "${ECHO_T}$cf_ldd_prog" >&6
20389 echo "$as_me:20389: result: no" >&5
20390 echo "${ECHO_T}no" >&6
20393 test -n "$cf_ldd_prog" && break
20395 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20397 cf_rpath_list="/usr/lib /lib"
20398 if test "$cf_ldd_prog" != no
20402 cat >conftest.$ac_ext <<_ACEOF
20403 #line 20403 "configure"
20404 #include "confdefs.h"
20414 rm -f conftest.$ac_objext conftest$ac_exeext
20415 if { (eval echo "$as_me:20415: \"$ac_link\"") >&5
20416 (eval $ac_link) 2>&5
20418 echo "$as_me:20418: \$? = $ac_status" >&5
20419 (exit $ac_status); } &&
20420 { ac_try='test -s conftest$ac_exeext'
20421 { (eval echo "$as_me:20421: \"$ac_try\"") >&5
20422 (eval $ac_try) 2>&5
20424 echo "$as_me:20424: \$? = $ac_status" >&5
20425 (exit $ac_status); }; }; then
20426 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20427 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20429 echo "$as_me: failed program was:" >&5
20430 cat conftest.$ac_ext >&5
20432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20434 # If we passed the link-test, but get a "not found" on a given library,
20435 # this could be due to inept reconfiguration of gcc to make it only
20436 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20437 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20438 # /usr/local libraries.
20439 if test -n "$cf_rpath_oops"
20441 for cf_rpath_src in $cf_rpath_oops
20443 for cf_rpath_dir in \
20448 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20450 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20452 echo "${as_me:-configure}:20452: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20454 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20462 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20464 echo "${as_me:-configure}:20464: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20466 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20468 echo "${as_me:-configure}:20468: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20471 for cf_rpath_src in $LDFLAGS
20473 case $cf_rpath_src in
20476 # check if this refers to a directory which we will ignore
20478 if test -n "$cf_rpath_list"
20480 for cf_rpath_item in $cf_rpath_list
20482 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20490 if test "$cf_rpath_skip" = no
20492 # transform the option
20493 if test "$LD_RPATH_OPT" = "-R " ; then
20494 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20496 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20499 # if we have not already added this, add it now
20500 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20501 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20503 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20505 echo "${as_me:-configure}:20505: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20507 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20512 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20514 LDFLAGS=$cf_rpath_dst
20516 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20518 echo "${as_me:-configure}:20518: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20520 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20522 echo "${as_me:-configure}:20522: testing ...checking LIBS $LIBS ..." 1>&5
20525 for cf_rpath_src in $LIBS
20527 case $cf_rpath_src in
20530 # check if this refers to a directory which we will ignore
20532 if test -n "$cf_rpath_list"
20534 for cf_rpath_item in $cf_rpath_list
20536 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20544 if test "$cf_rpath_skip" = no
20546 # transform the option
20547 if test "$LD_RPATH_OPT" = "-R " ; then
20548 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20550 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20553 # if we have not already added this, add it now
20554 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20555 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20557 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20559 echo "${as_me:-configure}:20559: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20561 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20566 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20570 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20572 echo "${as_me:-configure}:20572: testing ...checked LIBS $LIBS ..." 1>&5
20574 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20576 echo "${as_me:-configure}:20576: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20579 echo "$as_me:20579: result: no" >&5
20580 echo "${ECHO_T}no" >&6
20588 ac_config_files="$ac_config_files Makefile"
20589 ac_config_commands="$ac_config_commands default"
20590 cat >confcache <<\_ACEOF
20591 # This file is a shell script that caches the results of configure
20592 # tests run on this system so they can be shared between configure
20593 # scripts and configure runs, see configure's option --config-cache.
20594 # It is not useful on other systems. If it contains results you don't
20595 # want to keep, you may remove or edit it.
20597 # config.status only pays attention to the cache file if you give it
20598 # the --recheck option to rerun configure.
20600 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20601 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20602 # following values.
20606 # The following way of writing the cache mishandles newlines in values,
20607 # but we know of no workaround that is simple, portable, and efficient.
20608 # So, don't put newlines in cache variables' values.
20609 # Ultrix sh set writes to stderr and can't be redirected directly,
20610 # and sets the high bit in the cache file unless we assign to the vars.
20613 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20615 # `set' does not quote correctly, so add quotes (double-quote
20616 # substitution turns \\\\ into \\, and sed turns \\ into \).
20619 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20622 # `set' quotes correctly as required by POSIX, so do not add quotes.
20624 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20631 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20633 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20635 if cmp -s $cache_file confcache; then :; else
20636 if test -w $cache_file; then
20637 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20638 cat confcache >$cache_file
20640 echo "not updating unwritable cache $cache_file"
20645 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20646 # Let make expand exec_prefix.
20647 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20649 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20650 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20651 # trailing colons and then remove the whole line if VPATH becomes empty
20652 # (actually we leave an empty line to preserve line numbers).
20653 if test "x$srcdir" = x.; then
20654 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20655 s/:*\$(srcdir):*/:/;
20656 s/:*\${srcdir}:*/:/;
20658 s/^\([^=]*=[ ]*\):*/\1/;
20664 DEFS=-DHAVE_CONFIG_H
20666 : ${CONFIG_STATUS=./config.status}
20667 ac_clean_files_save=$ac_clean_files
20668 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20669 { echo "$as_me:20669: creating $CONFIG_STATUS" >&5
20670 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20671 cat >$CONFIG_STATUS <<_ACEOF
20673 # Generated automatically by configure.
20674 # Run this file to recreate the current configuration.
20675 # Compiler output produced by configure, useful for debugging
20676 # configure, is in config.log if it exists.
20679 SHELL=\${CONFIG_SHELL-$SHELL}
20680 ac_cs_invocation="\$0 \$@"
20684 cat >>$CONFIG_STATUS <<\_ACEOF
20685 # Be Bourne compatible
20686 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20689 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20693 # Name of the executable.
20694 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20696 if expr a : '\(a\)' >/dev/null 2>&1; then
20702 rm -f conf$$ conf$$.exe conf$$.file
20704 if ln -s conf$$.file conf$$ 2>/dev/null; then
20705 # We could just check for DJGPP; but this test a) works b) is more generic
20706 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20707 if test -f conf$$.exe; then
20708 # Don't use ln at all; we don't have any links
20713 elif ln conf$$.file conf$$ 2>/dev/null; then
20718 rm -f conf$$ conf$$.exe conf$$.file
20720 as_executable_p="test -f"
20722 # Support unset when possible.
20723 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20730 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20731 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20732 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20733 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20734 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20735 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20736 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20737 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20740 # We need space, tab and new line, in precisely that order.
20746 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20752 # Files that config.status was made for.
20753 if test -n "$ac_config_files"; then
20754 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20757 if test -n "$ac_config_headers"; then
20758 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20761 if test -n "$ac_config_links"; then
20762 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20765 if test -n "$ac_config_commands"; then
20766 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20769 cat >>$CONFIG_STATUS <<\EOF
20772 \`$as_me' instantiates files from templates according to the
20773 current configuration.
20775 Usage: $0 [OPTIONS] [FILE]...
20777 -h, --help print this help, then exit
20778 -V, --version print version number, then exit
20779 -d, --debug don't remove temporary files
20780 --recheck update $as_me by reconfiguring in the same conditions
20781 --file=FILE[:TEMPLATE]
20782 instantiate the configuration file FILE
20783 --header=FILE[:TEMPLATE]
20784 instantiate the configuration header FILE
20786 Configuration files:
20789 Configuration headers:
20792 Configuration commands:
20795 Report bugs to <dickey@invisible-island.net>."
20798 cat >>$CONFIG_STATUS <<EOF
20801 configured by $0, generated by GNU Autoconf 2.52.20181006,
20802 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20804 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20805 Free Software Foundation, Inc.
20806 This config.status script is free software; the Free Software Foundation
20807 gives unlimited permission to copy, distribute and modify it."
20812 cat >>$CONFIG_STATUS <<\EOF
20813 # If no file are specified by the user, then we need to provide default
20814 # value. By we need to know if files were specified by the user.
20820 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20821 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20823 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20827 *) # This is not an option, so the user has probably given explicit
20829 ac_need_defaults=false;;
20833 # Handling of the options.
20835 cat >>$CONFIG_STATUS <<EOF
20836 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20837 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20838 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20840 cat >>$CONFIG_STATUS <<\EOF
20841 --version | --vers* | -V )
20842 echo "$ac_cs_version"; exit 0 ;;
20844 # Conflict between --help and --header
20845 { { echo "$as_me:20845: error: ambiguous option: $1
20846 Try \`$0 --help' for more information." >&5
20847 echo "$as_me: error: ambiguous option: $1
20848 Try \`$0 --help' for more information." >&2;}
20849 { (exit 1); exit 1; }; };;
20850 --help | --hel | -h )
20851 echo "$ac_cs_usage"; exit 0 ;;
20852 --debug | --d* | -d )
20854 --file | --fil | --fi | --f )
20856 CONFIG_FILES="$CONFIG_FILES $1"
20857 ac_need_defaults=false;;
20858 --header | --heade | --head | --hea )
20860 CONFIG_HEADERS="$CONFIG_HEADERS $1"
20861 ac_need_defaults=false;;
20863 # This is an error.
20864 -*) { { echo "$as_me:20864: error: unrecognized option: $1
20865 Try \`$0 --help' for more information." >&5
20866 echo "$as_me: error: unrecognized option: $1
20867 Try \`$0 --help' for more information." >&2;}
20868 { (exit 1); exit 1; }; } ;;
20870 *) ac_config_targets="$ac_config_targets $1" ;;
20879 ## ----------------------- ##
20880 ## Running config.status. ##
20881 ## ----------------------- ##
20883 This file was extended by $as_me 2.52.20181006, executed with
20884 CONFIG_FILES = $CONFIG_FILES
20885 CONFIG_HEADERS = $CONFIG_HEADERS
20886 CONFIG_LINKS = $CONFIG_LINKS
20887 CONFIG_COMMANDS = $CONFIG_COMMANDS
20888 > $ac_cs_invocation
20889 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20894 cat >>$CONFIG_STATUS <<EOF
20896 # INIT-COMMANDS section.
20906 cat >>$CONFIG_STATUS <<\EOF
20907 for ac_config_target in $ac_config_targets
20909 case "$ac_config_target" in
20910 # Handling of arguments.
20911 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20912 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20913 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
20914 *) { { echo "$as_me:20914: error: invalid argument: $ac_config_target" >&5
20915 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20916 { (exit 1); exit 1; }; };;
20920 # If the user did not use the arguments to specify the items to instantiate,
20921 # then the envvar interface is used. Set only those that are not.
20922 # We use the long form for the default assignment because of an extremely
20923 # bizarre bug on SunOS 4.1.3.
20924 if $ac_need_defaults; then
20925 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20926 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20927 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20930 # Create a temporary directory, and hook for its removal unless debugging.
20933 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20934 trap '{ (exit 1); exit 1; }' 1 2 13 15
20937 # Create a (secure) tmp directory for tmp files.
20940 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20941 test -n "$tmp" && test -d "$tmp"
20944 tmp=$TMPDIR/cs$$-$RANDOM
20945 (umask 077 && mkdir $tmp)
20948 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20949 { (exit 1); exit 1; }
20954 cat >>$CONFIG_STATUS <<EOF
20957 # CONFIG_FILES section.
20960 # No need to generate the scripts if there are no CONFIG_FILES.
20961 # This happens for instance when ./config.status config.h
20962 if test -n "\$CONFIG_FILES"; then
20963 # Protect against being on the right side of a sed subst in config.status.
20964 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20965 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20966 s,@SHELL@,$SHELL,;t t
20967 s,@exec_prefix@,$exec_prefix,;t t
20968 s,@prefix@,$prefix,;t t
20969 s,@program_transform_name@,$program_transform_name,;t t
20970 s,@bindir@,$bindir,;t t
20971 s,@sbindir@,$sbindir,;t t
20972 s,@libexecdir@,$libexecdir,;t t
20973 s,@datarootdir@,$datarootdir,;t t
20974 s,@datadir@,$datadir,;t t
20975 s,@sysconfdir@,$sysconfdir,;t t
20976 s,@sharedstatedir@,$sharedstatedir,;t t
20977 s,@localstatedir@,$localstatedir,;t t
20978 s,@runstatedir@,$runstatedir,;t t
20979 s,@libdir@,$libdir,;t t
20980 s,@includedir@,$includedir,;t t
20981 s,@oldincludedir@,$oldincludedir,;t t
20982 s,@infodir@,$infodir,;t t
20983 s,@mandir@,$mandir,;t t
20984 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20985 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20986 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20987 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20988 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20989 s,@build_alias@,$build_alias,;t t
20990 s,@host_alias@,$host_alias,;t t
20991 s,@target_alias@,$target_alias,;t t
20992 s,@ECHO_C@,$ECHO_C,;t t
20993 s,@ECHO_N@,$ECHO_N,;t t
20994 s,@ECHO_T@,$ECHO_T,;t t
20995 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20996 s,@DEFS@,$DEFS,;t t
20997 s,@LIBS@,$LIBS,;t t
20998 s,@build@,$build,;t t
20999 s,@build_cpu@,$build_cpu,;t t
21000 s,@build_vendor@,$build_vendor,;t t
21001 s,@build_os@,$build_os,;t t
21002 s,@host@,$host,;t t
21003 s,@host_cpu@,$host_cpu,;t t
21004 s,@host_vendor@,$host_vendor,;t t
21005 s,@host_os@,$host_os,;t t
21006 s,@SET_MAKE@,$SET_MAKE,;t t
21008 s,@CFLAGS@,$CFLAGS,;t t
21009 s,@LDFLAGS@,$LDFLAGS,;t t
21010 s,@CPPFLAGS@,$CPPFLAGS,;t t
21011 s,@ac_ct_CC@,$ac_ct_CC,;t t
21012 s,@EXEEXT@,$EXEEXT,;t t
21013 s,@OBJEXT@,$OBJEXT,;t t
21014 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21017 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21018 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21019 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21020 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21021 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21022 s,@LINT@,$LINT,;t t
21023 s,@LINT_OPTS@,$LINT_OPTS,;t t
21024 s,@CTAGS@,$CTAGS,;t t
21025 s,@ETAGS@,$ETAGS,;t t
21026 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21027 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21028 s,@MATH_LIB@,$MATH_LIB,;t t
21029 s,@top_builddir@,$top_builddir,;t t
21030 s,@CC_G_OPT@,$CC_G_OPT,;t t
21031 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21032 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21033 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21034 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21036 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21037 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21038 s,@LD_MODEL@,$LD_MODEL,;t t
21039 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21040 s,@LIBTOOL@,$LIBTOOL,;t t
21041 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21042 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21043 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21044 s,@LIB_LINK@,$LIB_LINK,;t t
21045 s,@LINK_TESTS@,$LINK_TESTS,;t t
21046 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21047 s,@PACKAGE@,$PACKAGE,;t t
21048 s,@PTHREAD@,$PTHREAD,;t t
21049 s,@TEST_ARGS@,$TEST_ARGS,;t t
21050 s,@TEST_DEPS@,$TEST_DEPS,;t t
21051 s,@TEST_LIBS@,$TEST_LIBS,;t t
21052 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21053 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21054 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21055 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21056 s,@includesubdir@,$includesubdir,;t t
21057 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21058 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21059 s,@ECHO_LT@,$ECHO_LT,;t t
21060 s,@ECHO_LD@,$ECHO_LD,;t t
21061 s,@RULE_CC@,$RULE_CC,;t t
21062 s,@SHOW_CC@,$SHOW_CC,;t t
21063 s,@ECHO_CC@,$ECHO_CC,;t t
21064 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21065 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21066 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21067 s,@X_CFLAGS@,$X_CFLAGS,;t t
21068 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21069 s,@X_LIBS@,$X_LIBS,;t t
21070 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21071 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21072 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21073 s,@RGB_PATH@,$RGB_PATH,;t t
21074 s,@no_x11_rgb@,$no_x11_rgb,;t t
21075 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21076 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21077 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21082 cat >>$CONFIG_STATUS <<\EOF
21083 # Split the substitutions into bite-sized pieces for seds with
21084 # small command number limits, like on Digital OSF/1 and HP-UX.
21085 ac_max_sed_lines=48
21086 ac_sed_frag=1 # Number of current file.
21087 ac_beg=1 # First line for current file.
21088 ac_end=$ac_max_sed_lines # Line after last line for current file.
21091 while $ac_more_lines; do
21092 if test $ac_beg -gt 1; then
21093 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21095 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21097 if test ! -s $tmp/subs.frag; then
21098 ac_more_lines=false
21100 # The purpose of the label and of the branching condition is to
21101 # speed up the sed processing (if there are no `@' at all, there
21102 # is no need to browse any of the substitutions).
21103 # These are the two extra sed commands mentioned above.
21105 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21106 # It is possible to make a multiline substitution using escaped newlines.
21107 # Ensure that we do not split the substitution between script fragments.
21109 ac_END=`expr $ac_end + $ac_max_sed_lines`
21110 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21111 if test -s $tmp/subs.next; then
21112 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21113 if test ! -s $tmp/subs.edit; then
21114 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21115 if test ! -s $tmp/subs.edit; then
21116 if test $ac_beg -gt 1; then
21117 ac_end=`expr $ac_end - 1`
21124 if test -z "$ac_sed_cmds"; then
21125 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21127 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21129 ac_sed_frag=`expr $ac_sed_frag + 1`
21131 ac_end=`expr $ac_end + $ac_max_sed_lines`
21134 if test -z "$ac_sed_cmds"; then
21137 fi # test -n "$CONFIG_FILES"
21140 cat >>$CONFIG_STATUS <<\EOF
21141 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21142 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21144 - | *:- | *:-:* ) # input from stdin
21146 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21147 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21148 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21149 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21150 * ) ac_file_in=$ac_file.in ;;
21153 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21154 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21155 X"$ac_file" : 'X\(//\)[^/]' \| \
21156 X"$ac_file" : 'X\(//\)$' \| \
21157 X"$ac_file" : 'X\(/\)' \| \
21158 . : '\(.\)' 2>/dev/null ||
21160 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21161 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21162 /^X\(\/\/\)$/{ s//\1/; q; }
21163 /^X\(\/\).*/{ s//\1/; q; }
21165 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21166 { case "$ac_dir" in
21167 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21171 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21172 case $as_mkdir_dir in
21173 # Skip DOS drivespec
21174 ?:) as_incr_dir=$as_mkdir_dir ;;
21176 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21177 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21182 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21183 # A "../" for each directory in $ac_dir_suffix.
21184 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21186 ac_dir_suffix= ac_dots=
21191 if test -z "$ac_dots"; then
21194 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21196 [\\/]* | ?:[\\/]* )
21197 ac_srcdir=$srcdir$ac_dir_suffix;
21198 ac_top_srcdir=$srcdir ;;
21199 *) # Relative path.
21200 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21201 ac_top_srcdir=$ac_dots$srcdir ;;
21205 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21206 *) ac_INSTALL=$ac_dots$INSTALL ;;
21209 if test x"$ac_file" != x-; then
21210 { echo "$as_me:21210: creating $ac_file" >&5
21211 echo "$as_me: creating $ac_file" >&6;}
21214 # Let's still pretend it is `configure' which instantiates (i.e., don't
21215 # use $as_me), people would be surprised to read:
21216 # /* config.h. Generated automatically by config.status. */
21217 configure_input="Generated automatically from `echo $ac_file_in |
21218 sed 's,.*/,,'` by configure."
21220 # First look for the input files in the build tree, otherwise in the
21222 ac_file_inputs=`IFS=:
21223 for f in $ac_file_in; do
21225 -) echo $tmp/stdin ;;
21227 # Absolute (can't be DOS-style, as IFS=:)
21228 test -f "$f" || { { echo "$as_me:21228: error: cannot find input file: $f" >&5
21229 echo "$as_me: error: cannot find input file: $f" >&2;}
21230 { (exit 1); exit 1; }; }
21233 if test -f "$f"; then
21236 elif test -f "$srcdir/$f"; then
21241 { { echo "$as_me:21241: error: cannot find input file: $f" >&5
21242 echo "$as_me: error: cannot find input file: $f" >&2;}
21243 { (exit 1); exit 1; }; }
21246 done` || { (exit 1); exit 1; }
21248 cat >>$CONFIG_STATUS <<\EOF
21249 ac_warn_datarootdir=no
21250 if test x"$ac_file" != x-; then
21251 for ac_item in $ac_file_inputs
21253 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21254 if test -n "$ac_seen"; then
21255 ac_used=`grep '@datarootdir@' $ac_item`
21256 if test -z "$ac_used"; then
21257 { echo "$as_me:21257: WARNING: datarootdir was used implicitly but not set:
21259 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21261 ac_warn_datarootdir=yes
21264 ac_seen=`grep '${datarootdir}' $ac_item`
21265 if test -n "$ac_seen"; then
21266 { echo "$as_me:21266: WARNING: datarootdir was used explicitly but not set:
21268 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21270 ac_warn_datarootdir=yes
21275 if test "x$ac_warn_datarootdir" = xyes; then
21276 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21280 cat >>$CONFIG_STATUS <<EOF
21284 cat >>$CONFIG_STATUS <<\EOF
21286 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21287 s,@configure_input@,$configure_input,;t t
21288 s,@srcdir@,$ac_srcdir,;t t
21289 s,@top_srcdir@,$ac_top_srcdir,;t t
21290 s,@INSTALL@,$ac_INSTALL,;t t
21291 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21293 if test x"$ac_file" != x-; then
21294 cp $tmp/out $ac_file
21296 for ac_name in prefix exec_prefix datarootdir
21298 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21299 if test -n "$ac_seen"; then
21300 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21301 if test -z "$ac_init"; then
21302 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21303 { echo "$as_me:21303: WARNING: Variable $ac_name is used but was not set:
21305 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21310 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21311 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21312 if test -s $tmp/out; then
21313 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21314 { echo "$as_me:21314: WARNING: Some variables may not be substituted:
21316 echo "$as_me: WARNING: Some variables may not be substituted:
21326 cat >>$CONFIG_STATUS <<\EOF
21329 # CONFIG_HEADER section.
21332 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21333 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21335 # ac_d sets the value in "#define NAME VALUE" lines.
21336 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21337 ac_dB='[ ].*$,\1#\2'
21340 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21341 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21342 ac_iB='\([ ]\),\1#\2define\3'
21345 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21346 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21347 ac_uB='$,\1#\2define\3'
21351 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21352 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21354 - | *:- | *:-:* ) # input from stdin
21356 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21357 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21358 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21359 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21360 * ) ac_file_in=$ac_file.in ;;
21363 test x"$ac_file" != x- && { echo "$as_me:21363: creating $ac_file" >&5
21364 echo "$as_me: creating $ac_file" >&6;}
21366 # First look for the input files in the build tree, otherwise in the
21368 ac_file_inputs=`IFS=:
21369 for f in $ac_file_in; do
21371 -) echo $tmp/stdin ;;
21373 # Absolute (can't be DOS-style, as IFS=:)
21374 test -f "$f" || { { echo "$as_me:21374: error: cannot find input file: $f" >&5
21375 echo "$as_me: error: cannot find input file: $f" >&2;}
21376 { (exit 1); exit 1; }; }
21379 if test -f "$f"; then
21382 elif test -f "$srcdir/$f"; then
21387 { { echo "$as_me:21387: error: cannot find input file: $f" >&5
21388 echo "$as_me: error: cannot find input file: $f" >&2;}
21389 { (exit 1); exit 1; }; }
21392 done` || { (exit 1); exit 1; }
21393 # Remove the trailing spaces.
21394 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21398 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21399 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21400 # be either 'cat' or 'sort'.
21401 cat confdefs.h | uniq >conftest.vals
21403 # Break up conftest.vals because some shells have a limit on
21404 # the size of here documents, and old seds have small limits too.
21406 rm -f conftest.tail
21407 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21408 while grep . conftest.vals >/dev/null
21410 # Write chunks of a limited-size here document to conftest.frag.
21411 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21412 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21413 echo 'CEOF' >> $CONFIG_STATUS
21414 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21415 rm -f conftest.vals
21416 mv conftest.tail conftest.vals
21418 rm -f conftest.vals
21420 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21422 echo ' cat >> conftest.edit <<CEOF
21423 /@DEFS@/r conftest.frag
21426 sed -f conftest.edit $tmp/in > $tmp/out
21428 mv $tmp/out $tmp/in
21429 rm -f conftest.edit conftest.frag
21430 ' >> $CONFIG_STATUS
21432 cat >>$CONFIG_STATUS <<\EOF
21433 # Let's still pretend it is `configure' which instantiates (i.e., don't
21434 # use $as_me), people would be surprised to read:
21435 # /* config.h. Generated automatically by config.status. */
21436 if test x"$ac_file" = x-; then
21437 echo "/* Generated automatically by configure. */" >$tmp/config.h
21439 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21441 cat $tmp/in >>$tmp/config.h
21443 if test x"$ac_file" != x-; then
21444 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21445 { echo "$as_me:21445: $ac_file is unchanged" >&5
21446 echo "$as_me: $ac_file is unchanged" >&6;}
21448 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21449 X"$ac_file" : 'X\(//\)[^/]' \| \
21450 X"$ac_file" : 'X\(//\)$' \| \
21451 X"$ac_file" : 'X\(/\)' \| \
21452 . : '\(.\)' 2>/dev/null ||
21454 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21455 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21456 /^X\(\/\/\)$/{ s//\1/; q; }
21457 /^X\(\/\).*/{ s//\1/; q; }
21459 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21460 { case "$ac_dir" in
21461 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21465 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21466 case $as_mkdir_dir in
21467 # Skip DOS drivespec
21468 ?:) as_incr_dir=$as_mkdir_dir ;;
21470 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21471 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21478 mv $tmp/config.h $ac_file
21482 rm -f $tmp/config.h
21486 cat >>$CONFIG_STATUS <<\EOF
21488 # CONFIG_COMMANDS section.
21490 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21491 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21492 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21499 if test ! -d $srcdir/$cf_dir; then
21501 elif test -f $srcdir/$cf_dir/programs; then
21502 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21506 cat >>Makefile <<TEST_EOF
21508 # These rules are generated so we do not rely on suffix rules, which do not
21509 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21510 # some, and the '\$x' confuses others).
21513 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21516 cat >>Makefile <<TEST_EOF
21518 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21519 \$(srcdir)/test.priv.h \\
21522 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21526 if test -f ../config.guess && test -f ../config.sub
21528 cat >>Makefile <<TEST_EOF
21530 # if we used CF_INHERIT for getting these files, we can remove them
21532 rm -f config.guess config.sub
21540 cat >>$CONFIG_STATUS <<\EOF
21542 { (exit 0); exit 0; }
21544 chmod +x $CONFIG_STATUS
21545 ac_clean_files=$ac_clean_files_save
21547 # configure is writing to config.log, and then calls config.status.
21548 # config.status does its own redirection, appending to config.log.
21549 # Unfortunately, on DOS this fails, as config.log is still kept open
21550 # by configure, so config.status won't be able to write to it; its
21551 # output is simply discarded. So we exec the FD to /dev/null,
21552 # effectively closing config.log, so it can be properly (re)opened and
21553 # appended to by config.status. When coming back to configure, we
21554 # need to make the FD available again.
21555 if test "$no_create" != yes; then
21558 $SHELL $CONFIG_STATUS || ac_cs_success=false
21560 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21561 # would make configure fail if this is the last instruction.
21562 $ac_cs_success || { (exit 1); exit 1; }