2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20190828.
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.20190828. 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
3393 echo "$as_me:3393: checking if the POSIX test-macros are already defined" >&5
3394 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3395 if test "${cf_cv_posix_visible+set}" = set; then
3396 echo $ECHO_N "(cached) $ECHO_C" >&6
3399 cat >conftest.$ac_ext <<_ACEOF
3400 #line 3400 "configure"
3401 #include "confdefs.h"
3407 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3408 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3409 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3410 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3411 #error conflicting symbols found
3418 rm -f conftest.$ac_objext
3419 if { (eval echo "$as_me:3419: \"$ac_compile\"") >&5
3420 (eval $ac_compile) 2>&5
3422 echo "$as_me:3422: \$? = $ac_status" >&5
3423 (exit $ac_status); } &&
3424 { ac_try='test -s conftest.$ac_objext'
3425 { (eval echo "$as_me:3425: \"$ac_try\"") >&5
3428 echo "$as_me:3428: \$? = $ac_status" >&5
3429 (exit $ac_status); }; }; then
3430 cf_cv_posix_visible=no
3432 echo "$as_me: failed program was:" >&5
3433 cat conftest.$ac_ext >&5
3434 cf_cv_posix_visible=yes
3436 rm -f conftest.$ac_objext conftest.$ac_ext
3439 echo "$as_me:3439: result: $cf_cv_posix_visible" >&5
3440 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3442 if test "$cf_cv_posix_visible" = no; then
3445 cf_POSIX_C_SOURCE=199506L
3450 cf_xopen_source="-D_ALL_SOURCE"
3456 cf_xopen_source="-D_APPLE_C_SOURCE"
3459 cf_xopen_source="-D_DARWIN_C_SOURCE"
3462 (freebsd*|dragonfly*|midnightbsd*)
3463 # 5.x headers associate
3464 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3465 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3466 cf_POSIX_C_SOURCE=200112L
3468 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3471 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3474 cf_xopen_source="-D_HPUX_SOURCE"
3477 cf_xopen_source="-D_SGI_SOURCE"
3480 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3482 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3484 echo "$as_me:3484: checking if this is the GNU C library" >&5
3485 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3486 if test "${cf_cv_gnu_library+set}" = set; then
3487 echo $ECHO_N "(cached) $ECHO_C" >&6
3490 cat >conftest.$ac_ext <<_ACEOF
3491 #line 3491 "configure"
3492 #include "confdefs.h"
3493 #include <sys/types.h>
3498 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3500 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3503 # error not GNU C library
3509 rm -f conftest.$ac_objext
3510 if { (eval echo "$as_me:3510: \"$ac_compile\"") >&5
3511 (eval $ac_compile) 2>&5
3513 echo "$as_me:3513: \$? = $ac_status" >&5
3514 (exit $ac_status); } &&
3515 { ac_try='test -s conftest.$ac_objext'
3516 { (eval echo "$as_me:3516: \"$ac_try\"") >&5
3519 echo "$as_me:3519: \$? = $ac_status" >&5
3520 (exit $ac_status); }; }; then
3521 cf_cv_gnu_library=yes
3523 echo "$as_me: failed program was:" >&5
3524 cat conftest.$ac_ext >&5
3525 cf_cv_gnu_library=no
3527 rm -f conftest.$ac_objext conftest.$ac_ext
3530 echo "$as_me:3530: result: $cf_cv_gnu_library" >&5
3531 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3533 if test x$cf_cv_gnu_library = xyes; then
3535 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3536 # was changed to help a little. newlib incorporated the change about 4
3538 echo "$as_me:3538: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3539 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3540 if test "${cf_cv_gnu_library_219+set}" = set; then
3541 echo $ECHO_N "(cached) $ECHO_C" >&6
3546 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3547 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3549 cat >conftest.$ac_ext <<_ACEOF
3550 #line 3550 "configure"
3551 #include "confdefs.h"
3552 #include <sys/types.h>
3557 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3559 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3562 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3568 rm -f conftest.$ac_objext
3569 if { (eval echo "$as_me:3569: \"$ac_compile\"") >&5
3570 (eval $ac_compile) 2>&5
3572 echo "$as_me:3572: \$? = $ac_status" >&5
3573 (exit $ac_status); } &&
3574 { ac_try='test -s conftest.$ac_objext'
3575 { (eval echo "$as_me:3575: \"$ac_try\"") >&5
3578 echo "$as_me:3578: \$? = $ac_status" >&5
3579 (exit $ac_status); }; }; then
3580 cf_cv_gnu_library_219=yes
3582 echo "$as_me: failed program was:" >&5
3583 cat conftest.$ac_ext >&5
3584 cf_cv_gnu_library_219=no
3586 rm -f conftest.$ac_objext conftest.$ac_ext
3590 echo "$as_me:3590: result: $cf_cv_gnu_library_219" >&5
3591 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3593 if test "x$cf_cv_gnu_library_219" = xyes; then
3595 echo "$as_me:3595: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3596 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3597 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3598 echo $ECHO_N "(cached) $ECHO_C" >&6
3604 cf_new_extra_cppflags=
3606 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3608 case $cf_fix_cppflags in
3610 case $cf_add_cflags in
3611 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3612 case $cf_add_cflags in
3614 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3617 && test -z "${cf_tst_cflags}" \
3618 && cf_fix_cppflags=yes
3620 if test $cf_fix_cppflags = yes ; then
3622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3626 elif test "${cf_tst_cflags}" = "\"'" ; then
3628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3639 case $cf_add_cflags in
3641 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3643 CPPFLAGS=`echo "$CPPFLAGS" | \
3644 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3645 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3650 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3651 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3658 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3659 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3669 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3671 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3672 && test -z "${cf_tst_cflags}" \
3673 && cf_fix_cppflags=no
3678 if test -n "$cf_new_cflags" ; then
3680 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3681 CFLAGS="${CFLAGS}$cf_new_cflags"
3685 if test -n "$cf_new_cppflags" ; then
3687 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3688 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3692 if test -n "$cf_new_extra_cppflags" ; then
3694 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3695 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3699 cat >conftest.$ac_ext <<_ACEOF
3700 #line 3700 "configure"
3701 #include "confdefs.h"
3704 #include <sys/types.h>
3710 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3713 # error GNU C library is too old
3719 rm -f conftest.$ac_objext
3720 if { (eval echo "$as_me:3720: \"$ac_compile\"") >&5
3721 (eval $ac_compile) 2>&5
3723 echo "$as_me:3723: \$? = $ac_status" >&5
3724 (exit $ac_status); } &&
3725 { ac_try='test -s conftest.$ac_objext'
3726 { (eval echo "$as_me:3726: \"$ac_try\"") >&5
3729 echo "$as_me:3729: \$? = $ac_status" >&5
3730 (exit $ac_status); }; }; then
3731 cf_cv_gnu_dftsrc_219=yes
3733 echo "$as_me: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3735 cf_cv_gnu_dftsrc_219=no
3737 rm -f conftest.$ac_objext conftest.$ac_ext
3740 echo "$as_me:3740: result: $cf_cv_gnu_dftsrc_219" >&5
3741 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3742 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3744 cf_cv_gnu_dftsrc_219=maybe
3747 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3749 echo "$as_me:3749: checking if we must define _GNU_SOURCE" >&5
3750 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3751 if test "${cf_cv_gnu_source+set}" = set; then
3752 echo $ECHO_N "(cached) $ECHO_C" >&6
3755 cat >conftest.$ac_ext <<_ACEOF
3756 #line 3756 "configure"
3757 #include "confdefs.h"
3758 #include <sys/types.h>
3763 #ifndef _XOPEN_SOURCE
3764 #error expected _XOPEN_SOURCE to be defined
3770 rm -f conftest.$ac_objext
3771 if { (eval echo "$as_me:3771: \"$ac_compile\"") >&5
3772 (eval $ac_compile) 2>&5
3774 echo "$as_me:3774: \$? = $ac_status" >&5
3775 (exit $ac_status); } &&
3776 { ac_try='test -s conftest.$ac_objext'
3777 { (eval echo "$as_me:3777: \"$ac_try\"") >&5
3780 echo "$as_me:3780: \$? = $ac_status" >&5
3781 (exit $ac_status); }; }; then
3784 echo "$as_me: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3791 cf_new_extra_cppflags=
3793 for cf_add_cflags in -D_GNU_SOURCE
3795 case $cf_fix_cppflags in
3797 case $cf_add_cflags in
3798 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3799 case $cf_add_cflags in
3801 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3803 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3804 && test -z "${cf_tst_cflags}" \
3805 && cf_fix_cppflags=yes
3807 if test $cf_fix_cppflags = yes ; then
3809 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3810 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3813 elif test "${cf_tst_cflags}" = "\"'" ; then
3815 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3816 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3826 case $cf_add_cflags in
3828 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3830 CPPFLAGS=`echo "$CPPFLAGS" | \
3831 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3832 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3837 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3838 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3845 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3846 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3856 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3858 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3859 && test -z "${cf_tst_cflags}" \
3860 && cf_fix_cppflags=no
3865 if test -n "$cf_new_cflags" ; then
3867 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3868 CFLAGS="${CFLAGS}$cf_new_cflags"
3872 if test -n "$cf_new_cppflags" ; then
3874 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3875 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3879 if test -n "$cf_new_extra_cppflags" ; then
3881 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3882 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3886 cat >conftest.$ac_ext <<_ACEOF
3887 #line 3887 "configure"
3888 #include "confdefs.h"
3889 #include <sys/types.h>
3894 #ifdef _XOPEN_SOURCE
3895 #error expected _XOPEN_SOURCE to be undefined
3901 rm -f conftest.$ac_objext
3902 if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5
3903 (eval $ac_compile) 2>&5
3905 echo "$as_me:3905: \$? = $ac_status" >&5
3906 (exit $ac_status); } &&
3907 { ac_try='test -s conftest.$ac_objext'
3908 { (eval echo "$as_me:3908: \"$ac_try\"") >&5
3911 echo "$as_me:3911: \$? = $ac_status" >&5
3912 (exit $ac_status); }; }; then
3915 echo "$as_me: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 cf_cv_gnu_source=yes
3919 rm -f conftest.$ac_objext conftest.$ac_ext
3923 rm -f conftest.$ac_objext conftest.$ac_ext
3926 echo "$as_me:3926: result: $cf_cv_gnu_source" >&5
3927 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3929 if test "$cf_cv_gnu_source" = yes
3931 echo "$as_me:3931: checking if we should also define _DEFAULT_SOURCE" >&5
3932 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3933 if test "${cf_cv_default_source+set}" = set; then
3934 echo $ECHO_N "(cached) $ECHO_C" >&6
3937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3938 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3940 cat >conftest.$ac_ext <<_ACEOF
3941 #line 3941 "configure"
3942 #include "confdefs.h"
3943 #include <sys/types.h>
3948 #ifdef _DEFAULT_SOURCE
3949 #error expected _DEFAULT_SOURCE to be undefined
3955 rm -f conftest.$ac_objext
3956 if { (eval echo "$as_me:3956: \"$ac_compile\"") >&5
3957 (eval $ac_compile) 2>&5
3959 echo "$as_me:3959: \$? = $ac_status" >&5
3960 (exit $ac_status); } &&
3961 { ac_try='test -s conftest.$ac_objext'
3962 { (eval echo "$as_me:3962: \"$ac_try\"") >&5
3965 echo "$as_me:3965: \$? = $ac_status" >&5
3966 (exit $ac_status); }; }; then
3967 cf_cv_default_source=no
3969 echo "$as_me: failed program was:" >&5
3970 cat conftest.$ac_ext >&5
3971 cf_cv_default_source=yes
3973 rm -f conftest.$ac_objext conftest.$ac_ext
3976 echo "$as_me:3976: result: $cf_cv_default_source" >&5
3977 echo "${ECHO_T}$cf_cv_default_source" >&6
3978 if test "$cf_cv_default_source" = yes
3981 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3982 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3992 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3995 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3998 if test "$cf_cv_posix_visible" = no; then
4000 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4002 cf_save_CFLAGS="$CFLAGS"
4003 cf_save_CPPFLAGS="$CPPFLAGS"
4005 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4006 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4007 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4009 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4010 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4011 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4013 echo "$as_me:4013: checking if we should define _POSIX_C_SOURCE" >&5
4014 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4015 if test "${cf_cv_posix_c_source+set}" = set; then
4016 echo $ECHO_N "(cached) $ECHO_C" >&6
4019 echo "${as_me:-configure}:4019: testing if the symbol is already defined go no further ..." 1>&5
4021 cat >conftest.$ac_ext <<_ACEOF
4022 #line 4022 "configure"
4023 #include "confdefs.h"
4024 #include <sys/types.h>
4029 #ifndef _POSIX_C_SOURCE
4036 rm -f conftest.$ac_objext
4037 if { (eval echo "$as_me:4037: \"$ac_compile\"") >&5
4038 (eval $ac_compile) 2>&5
4040 echo "$as_me:4040: \$? = $ac_status" >&5
4041 (exit $ac_status); } &&
4042 { ac_try='test -s conftest.$ac_objext'
4043 { (eval echo "$as_me:4043: \"$ac_try\"") >&5
4046 echo "$as_me:4046: \$? = $ac_status" >&5
4047 (exit $ac_status); }; }; then
4048 cf_cv_posix_c_source=no
4050 echo "$as_me: failed program was:" >&5
4051 cat conftest.$ac_ext >&5
4052 cf_want_posix_source=no
4053 case .$cf_POSIX_C_SOURCE in
4055 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4058 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4059 cf_want_posix_source=yes
4062 cf_want_posix_source=yes
4065 if test "$cf_want_posix_source" = yes ; then
4066 cat >conftest.$ac_ext <<_ACEOF
4067 #line 4067 "configure"
4068 #include "confdefs.h"
4069 #include <sys/types.h>
4074 #ifdef _POSIX_SOURCE
4081 rm -f conftest.$ac_objext
4082 if { (eval echo "$as_me:4082: \"$ac_compile\"") >&5
4083 (eval $ac_compile) 2>&5
4085 echo "$as_me:4085: \$? = $ac_status" >&5
4086 (exit $ac_status); } &&
4087 { ac_try='test -s conftest.$ac_objext'
4088 { (eval echo "$as_me:4088: \"$ac_try\"") >&5
4091 echo "$as_me:4091: \$? = $ac_status" >&5
4092 (exit $ac_status); }; }; then
4095 echo "$as_me: failed program was:" >&5
4096 cat conftest.$ac_ext >&5
4097 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4099 rm -f conftest.$ac_objext conftest.$ac_ext
4102 echo "${as_me:-configure}:4102: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4104 CFLAGS="$cf_trim_CFLAGS"
4105 CPPFLAGS="$cf_trim_CPPFLAGS"
4107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4108 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4110 echo "${as_me:-configure}:4110: testing if the second compile does not leave our definition intact error ..." 1>&5
4112 cat >conftest.$ac_ext <<_ACEOF
4113 #line 4113 "configure"
4114 #include "confdefs.h"
4115 #include <sys/types.h>
4120 #ifndef _POSIX_C_SOURCE
4127 rm -f conftest.$ac_objext
4128 if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
4129 (eval $ac_compile) 2>&5
4131 echo "$as_me:4131: \$? = $ac_status" >&5
4132 (exit $ac_status); } &&
4133 { ac_try='test -s conftest.$ac_objext'
4134 { (eval echo "$as_me:4134: \"$ac_try\"") >&5
4137 echo "$as_me:4137: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4141 echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 cf_cv_posix_c_source=no
4145 rm -f conftest.$ac_objext conftest.$ac_ext
4146 CFLAGS="$cf_save_CFLAGS"
4147 CPPFLAGS="$cf_save_CPPFLAGS"
4150 rm -f conftest.$ac_objext conftest.$ac_ext
4153 echo "$as_me:4153: result: $cf_cv_posix_c_source" >&5
4154 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4156 if test "$cf_cv_posix_c_source" != no ; then
4157 CFLAGS="$cf_trim_CFLAGS"
4158 CPPFLAGS="$cf_trim_CPPFLAGS"
4163 cf_new_extra_cppflags=
4165 for cf_add_cflags in $cf_cv_posix_c_source
4167 case $cf_fix_cppflags in
4169 case $cf_add_cflags in
4170 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4171 case $cf_add_cflags in
4173 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4175 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4176 && test -z "${cf_tst_cflags}" \
4177 && cf_fix_cppflags=yes
4179 if test $cf_fix_cppflags = yes ; then
4181 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4182 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4185 elif test "${cf_tst_cflags}" = "\"'" ; then
4187 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4188 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4198 case $cf_add_cflags in
4200 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4202 CPPFLAGS=`echo "$CPPFLAGS" | \
4203 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4204 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4209 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4210 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4217 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4218 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4228 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4230 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4231 && test -z "${cf_tst_cflags}" \
4232 && cf_fix_cppflags=no
4237 if test -n "$cf_new_cflags" ; then
4239 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4240 CFLAGS="${CFLAGS}$cf_new_cflags"
4244 if test -n "$cf_new_cppflags" ; then
4246 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4247 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4251 if test -n "$cf_new_extra_cppflags" ; then
4253 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4254 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4260 fi # cf_cv_posix_visible
4264 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4267 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4268 cf_xopen_source="-D_BSD_SOURCE"
4272 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4275 cf_xopen_source="-D_OSF_SOURCE"
4278 cf_xopen_source="-D_QNX_SOURCE"
4281 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4284 cf_xopen_source="-D__EXTENSIONS__"
4285 cf_cv_xopen_source=broken
4287 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4293 echo "$as_me:4293: checking if we should define _XOPEN_SOURCE" >&5
4294 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4295 if test "${cf_cv_xopen_source+set}" = set; then
4296 echo $ECHO_N "(cached) $ECHO_C" >&6
4299 cat >conftest.$ac_ext <<_ACEOF
4300 #line 4300 "configure"
4301 #include "confdefs.h"
4305 #include <sys/types.h>
4311 #ifndef _XOPEN_SOURCE
4318 rm -f conftest.$ac_objext
4319 if { (eval echo "$as_me:4319: \"$ac_compile\"") >&5
4320 (eval $ac_compile) 2>&5
4322 echo "$as_me:4322: \$? = $ac_status" >&5
4323 (exit $ac_status); } &&
4324 { ac_try='test -s conftest.$ac_objext'
4325 { (eval echo "$as_me:4325: \"$ac_try\"") >&5
4328 echo "$as_me:4328: \$? = $ac_status" >&5
4329 (exit $ac_status); }; }; then
4330 cf_cv_xopen_source=no
4332 echo "$as_me: failed program was:" >&5
4333 cat conftest.$ac_ext >&5
4336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4337 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4339 cat >conftest.$ac_ext <<_ACEOF
4340 #line 4340 "configure"
4341 #include "confdefs.h"
4345 #include <sys/types.h>
4351 #ifdef _XOPEN_SOURCE
4358 rm -f conftest.$ac_objext
4359 if { (eval echo "$as_me:4359: \"$ac_compile\"") >&5
4360 (eval $ac_compile) 2>&5
4362 echo "$as_me:4362: \$? = $ac_status" >&5
4363 (exit $ac_status); } &&
4364 { ac_try='test -s conftest.$ac_objext'
4365 { (eval echo "$as_me:4365: \"$ac_try\"") >&5
4368 echo "$as_me:4368: \$? = $ac_status" >&5
4369 (exit $ac_status); }; }; then
4370 cf_cv_xopen_source=no
4372 echo "$as_me: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4376 rm -f conftest.$ac_objext conftest.$ac_ext
4380 rm -f conftest.$ac_objext conftest.$ac_ext
4383 echo "$as_me:4383: result: $cf_cv_xopen_source" >&5
4384 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4386 if test "$cf_cv_xopen_source" != no ; then
4388 CFLAGS=`echo "$CFLAGS" | \
4389 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4390 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4392 CPPFLAGS=`echo "$CPPFLAGS" | \
4393 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4394 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4396 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4401 cf_new_extra_cppflags=
4403 for cf_add_cflags in $cf_temp_xopen_source
4405 case $cf_fix_cppflags in
4407 case $cf_add_cflags in
4408 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4409 case $cf_add_cflags in
4411 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4413 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4414 && test -z "${cf_tst_cflags}" \
4415 && cf_fix_cppflags=yes
4417 if test $cf_fix_cppflags = yes ; then
4419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4423 elif test "${cf_tst_cflags}" = "\"'" ; then
4425 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4426 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4436 case $cf_add_cflags in
4438 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4440 CPPFLAGS=`echo "$CPPFLAGS" | \
4441 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4442 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4447 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4448 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4455 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4456 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4466 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4469 && test -z "${cf_tst_cflags}" \
4470 && cf_fix_cppflags=no
4475 if test -n "$cf_new_cflags" ; then
4477 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4478 CFLAGS="${CFLAGS}$cf_new_cflags"
4482 if test -n "$cf_new_cppflags" ; then
4484 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4485 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4489 if test -n "$cf_new_extra_cppflags" ; then
4491 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4492 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4498 if test "$cf_cv_posix_visible" = no; then
4500 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4502 cf_save_CFLAGS="$CFLAGS"
4503 cf_save_CPPFLAGS="$CPPFLAGS"
4505 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4506 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4507 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4509 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4510 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4511 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4513 echo "$as_me:4513: checking if we should define _POSIX_C_SOURCE" >&5
4514 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4515 if test "${cf_cv_posix_c_source+set}" = set; then
4516 echo $ECHO_N "(cached) $ECHO_C" >&6
4519 echo "${as_me:-configure}:4519: testing if the symbol is already defined go no further ..." 1>&5
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524 #include <sys/types.h>
4529 #ifndef _POSIX_C_SOURCE
4536 rm -f conftest.$ac_objext
4537 if { (eval echo "$as_me:4537: \"$ac_compile\"") >&5
4538 (eval $ac_compile) 2>&5
4540 echo "$as_me:4540: \$? = $ac_status" >&5
4541 (exit $ac_status); } &&
4542 { ac_try='test -s conftest.$ac_objext'
4543 { (eval echo "$as_me:4543: \"$ac_try\"") >&5
4546 echo "$as_me:4546: \$? = $ac_status" >&5
4547 (exit $ac_status); }; }; then
4548 cf_cv_posix_c_source=no
4550 echo "$as_me: failed program was:" >&5
4551 cat conftest.$ac_ext >&5
4552 cf_want_posix_source=no
4553 case .$cf_POSIX_C_SOURCE in
4555 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4558 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4559 cf_want_posix_source=yes
4562 cf_want_posix_source=yes
4565 if test "$cf_want_posix_source" = yes ; then
4566 cat >conftest.$ac_ext <<_ACEOF
4567 #line 4567 "configure"
4568 #include "confdefs.h"
4569 #include <sys/types.h>
4574 #ifdef _POSIX_SOURCE
4581 rm -f conftest.$ac_objext
4582 if { (eval echo "$as_me:4582: \"$ac_compile\"") >&5
4583 (eval $ac_compile) 2>&5
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit $ac_status); } &&
4587 { ac_try='test -s conftest.$ac_objext'
4588 { (eval echo "$as_me:4588: \"$ac_try\"") >&5
4591 echo "$as_me:4591: \$? = $ac_status" >&5
4592 (exit $ac_status); }; }; then
4595 echo "$as_me: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4599 rm -f conftest.$ac_objext conftest.$ac_ext
4602 echo "${as_me:-configure}:4602: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4604 CFLAGS="$cf_trim_CFLAGS"
4605 CPPFLAGS="$cf_trim_CPPFLAGS"
4607 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4608 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4610 echo "${as_me:-configure}:4610: testing if the second compile does not leave our definition intact error ..." 1>&5
4612 cat >conftest.$ac_ext <<_ACEOF
4613 #line 4613 "configure"
4614 #include "confdefs.h"
4615 #include <sys/types.h>
4620 #ifndef _POSIX_C_SOURCE
4627 rm -f conftest.$ac_objext
4628 if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5
4629 (eval $ac_compile) 2>&5
4631 echo "$as_me:4631: \$? = $ac_status" >&5
4632 (exit $ac_status); } &&
4633 { ac_try='test -s conftest.$ac_objext'
4634 { (eval echo "$as_me:4634: \"$ac_try\"") >&5
4637 echo "$as_me:4637: \$? = $ac_status" >&5
4638 (exit $ac_status); }; }; then
4641 echo "$as_me: failed program was:" >&5
4642 cat conftest.$ac_ext >&5
4643 cf_cv_posix_c_source=no
4645 rm -f conftest.$ac_objext conftest.$ac_ext
4646 CFLAGS="$cf_save_CFLAGS"
4647 CPPFLAGS="$cf_save_CPPFLAGS"
4650 rm -f conftest.$ac_objext conftest.$ac_ext
4653 echo "$as_me:4653: result: $cf_cv_posix_c_source" >&5
4654 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4656 if test "$cf_cv_posix_c_source" != no ; then
4657 CFLAGS="$cf_trim_CFLAGS"
4658 CPPFLAGS="$cf_trim_CPPFLAGS"
4663 cf_new_extra_cppflags=
4665 for cf_add_cflags in $cf_cv_posix_c_source
4667 case $cf_fix_cppflags in
4669 case $cf_add_cflags in
4670 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4671 case $cf_add_cflags in
4673 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4675 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4676 && test -z "${cf_tst_cflags}" \
4677 && cf_fix_cppflags=yes
4679 if test $cf_fix_cppflags = yes ; then
4681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4685 elif test "${cf_tst_cflags}" = "\"'" ; then
4687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4698 case $cf_add_cflags in
4700 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4702 CPPFLAGS=`echo "$CPPFLAGS" | \
4703 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4704 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4709 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4710 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4717 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4718 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4725 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4726 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4728 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4730 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4731 && test -z "${cf_tst_cflags}" \
4732 && cf_fix_cppflags=no
4737 if test -n "$cf_new_cflags" ; then
4739 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4740 CFLAGS="${CFLAGS}$cf_new_cflags"
4744 if test -n "$cf_new_cppflags" ; then
4746 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4747 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4751 if test -n "$cf_new_extra_cppflags" ; then
4753 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4754 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4760 fi # cf_cv_posix_visible
4765 if test -n "$cf_xopen_source" ; then
4770 cf_new_extra_cppflags=
4772 for cf_add_cflags in $cf_xopen_source
4774 case $cf_fix_cppflags in
4776 case $cf_add_cflags in
4777 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4778 case $cf_add_cflags in
4780 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4782 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4783 && test -z "${cf_tst_cflags}" \
4784 && cf_fix_cppflags=yes
4786 if test $cf_fix_cppflags = yes ; then
4788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4792 elif test "${cf_tst_cflags}" = "\"'" ; then
4794 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4795 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4805 case $cf_add_cflags in
4807 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4809 CPPFLAGS=`echo "$CPPFLAGS" | \
4810 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4811 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4816 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4817 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4824 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4825 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4832 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4833 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4835 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4837 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4838 && test -z "${cf_tst_cflags}" \
4839 && cf_fix_cppflags=no
4844 if test -n "$cf_new_cflags" ; then
4845 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4847 echo "${as_me:-configure}:4847: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4849 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4850 CFLAGS="${CFLAGS}$cf_new_cflags"
4854 if test -n "$cf_new_cppflags" ; then
4855 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4857 echo "${as_me:-configure}:4857: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4859 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4860 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4864 if test -n "$cf_new_extra_cppflags" ; then
4865 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4867 echo "${as_me:-configure}:4867: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4876 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4877 echo "$as_me:4877: checking if _XOPEN_SOURCE really is set" >&5
4878 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4879 cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4887 #ifndef _XOPEN_SOURCE
4894 rm -f conftest.$ac_objext
4895 if { (eval echo "$as_me:4895: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4898 echo "$as_me:4898: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
4900 { ac_try='test -s conftest.$ac_objext'
4901 { (eval echo "$as_me:4901: \"$ac_try\"") >&5
4904 echo "$as_me:4904: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
4906 cf_XOPEN_SOURCE_set=yes
4908 echo "$as_me: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910 cf_XOPEN_SOURCE_set=no
4912 rm -f conftest.$ac_objext conftest.$ac_ext
4913 echo "$as_me:4913: result: $cf_XOPEN_SOURCE_set" >&5
4914 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4915 if test $cf_XOPEN_SOURCE_set = yes
4917 cat >conftest.$ac_ext <<_ACEOF
4918 #line 4918 "configure"
4919 #include "confdefs.h"
4925 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4932 rm -f conftest.$ac_objext
4933 if { (eval echo "$as_me:4933: \"$ac_compile\"") >&5
4934 (eval $ac_compile) 2>&5
4936 echo "$as_me:4936: \$? = $ac_status" >&5
4937 (exit $ac_status); } &&
4938 { ac_try='test -s conftest.$ac_objext'
4939 { (eval echo "$as_me:4939: \"$ac_try\"") >&5
4942 echo "$as_me:4942: \$? = $ac_status" >&5
4943 (exit $ac_status); }; }; then
4944 cf_XOPEN_SOURCE_set_ok=yes
4946 echo "$as_me: failed program was:" >&5
4947 cat conftest.$ac_ext >&5
4948 cf_XOPEN_SOURCE_set_ok=no
4950 rm -f conftest.$ac_objext conftest.$ac_ext
4951 if test $cf_XOPEN_SOURCE_set_ok = no
4953 { echo "$as_me:4953: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4954 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4958 echo "$as_me:4958: checking if we should define _XOPEN_SOURCE" >&5
4959 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4960 if test "${cf_cv_xopen_source+set}" = set; then
4961 echo $ECHO_N "(cached) $ECHO_C" >&6
4964 cat >conftest.$ac_ext <<_ACEOF
4965 #line 4965 "configure"
4966 #include "confdefs.h"
4970 #include <sys/types.h>
4976 #ifndef _XOPEN_SOURCE
4983 rm -f conftest.$ac_objext
4984 if { (eval echo "$as_me:4984: \"$ac_compile\"") >&5
4985 (eval $ac_compile) 2>&5
4987 echo "$as_me:4987: \$? = $ac_status" >&5
4988 (exit $ac_status); } &&
4989 { ac_try='test -s conftest.$ac_objext'
4990 { (eval echo "$as_me:4990: \"$ac_try\"") >&5
4993 echo "$as_me:4993: \$? = $ac_status" >&5
4994 (exit $ac_status); }; }; then
4995 cf_cv_xopen_source=no
4997 echo "$as_me: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
5001 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5002 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5004 cat >conftest.$ac_ext <<_ACEOF
5005 #line 5005 "configure"
5006 #include "confdefs.h"
5010 #include <sys/types.h>
5016 #ifdef _XOPEN_SOURCE
5023 rm -f conftest.$ac_objext
5024 if { (eval echo "$as_me:5024: \"$ac_compile\"") >&5
5025 (eval $ac_compile) 2>&5
5027 echo "$as_me:5027: \$? = $ac_status" >&5
5028 (exit $ac_status); } &&
5029 { ac_try='test -s conftest.$ac_objext'
5030 { (eval echo "$as_me:5030: \"$ac_try\"") >&5
5033 echo "$as_me:5033: \$? = $ac_status" >&5
5034 (exit $ac_status); }; }; then
5035 cf_cv_xopen_source=no
5037 echo "$as_me: failed program was:" >&5
5038 cat conftest.$ac_ext >&5
5039 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5041 rm -f conftest.$ac_objext conftest.$ac_ext
5045 rm -f conftest.$ac_objext conftest.$ac_ext
5048 echo "$as_me:5048: result: $cf_cv_xopen_source" >&5
5049 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5051 if test "$cf_cv_xopen_source" != no ; then
5053 CFLAGS=`echo "$CFLAGS" | \
5054 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5055 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5057 CPPFLAGS=`echo "$CPPFLAGS" | \
5058 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5059 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5061 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5066 cf_new_extra_cppflags=
5068 for cf_add_cflags in $cf_temp_xopen_source
5070 case $cf_fix_cppflags in
5072 case $cf_add_cflags in
5073 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5074 case $cf_add_cflags in
5076 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5078 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5079 && test -z "${cf_tst_cflags}" \
5080 && cf_fix_cppflags=yes
5082 if test $cf_fix_cppflags = yes ; then
5084 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5085 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5088 elif test "${cf_tst_cflags}" = "\"'" ; then
5090 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5091 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5101 case $cf_add_cflags in
5103 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5105 CPPFLAGS=`echo "$CPPFLAGS" | \
5106 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5107 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5112 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5113 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5120 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5121 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5131 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5133 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5134 && test -z "${cf_tst_cflags}" \
5135 && cf_fix_cppflags=no
5140 if test -n "$cf_new_cflags" ; then
5142 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5143 CFLAGS="${CFLAGS}$cf_new_cflags"
5147 if test -n "$cf_new_cppflags" ; then
5149 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5150 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5154 if test -n "$cf_new_extra_cppflags" ; then
5156 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5157 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5165 fi # cf_cv_posix_visible
5167 echo "$as_me:5167: checking for signal global datatype" >&5
5168 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5169 if test "${cf_cv_sig_atomic_t+set}" = set; then
5170 echo $ECHO_N "(cached) $ECHO_C" >&6
5174 "volatile sig_atomic_t" \
5178 cat >conftest.$ac_ext <<_ACEOF
5179 #line 5179 "configure"
5180 #include "confdefs.h"
5182 #include <sys/types.h>
5188 static void handler(int sig)
5195 signal(SIGINT, handler);
5201 rm -f conftest.$ac_objext
5202 if { (eval echo "$as_me:5202: \"$ac_compile\"") >&5
5203 (eval $ac_compile) 2>&5
5205 echo "$as_me:5205: \$? = $ac_status" >&5
5206 (exit $ac_status); } &&
5207 { ac_try='test -s conftest.$ac_objext'
5208 { (eval echo "$as_me:5208: \"$ac_try\"") >&5
5211 echo "$as_me:5211: \$? = $ac_status" >&5
5212 (exit $ac_status); }; }; then
5213 cf_cv_sig_atomic_t=$cf_type
5215 echo "$as_me: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
5217 cf_cv_sig_atomic_t=no
5219 rm -f conftest.$ac_objext conftest.$ac_ext
5220 test "$cf_cv_sig_atomic_t" != no && break
5225 echo "$as_me:5225: result: $cf_cv_sig_atomic_t" >&5
5226 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5227 test "$cf_cv_sig_atomic_t" != no &&
5228 cat >>confdefs.h <<EOF
5229 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5232 # Work around breakage on OS X
5234 echo "$as_me:5234: checking if SIGWINCH is defined" >&5
5235 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5236 if test "${cf_cv_define_sigwinch+set}" = set; then
5237 echo $ECHO_N "(cached) $ECHO_C" >&6
5240 cat >conftest.$ac_ext <<_ACEOF
5241 #line 5241 "configure"
5242 #include "confdefs.h"
5244 #include <sys/types.h>
5245 #include <sys/signal.h>
5255 rm -f conftest.$ac_objext
5256 if { (eval echo "$as_me:5256: \"$ac_compile\"") >&5
5257 (eval $ac_compile) 2>&5
5259 echo "$as_me:5259: \$? = $ac_status" >&5
5260 (exit $ac_status); } &&
5261 { ac_try='test -s conftest.$ac_objext'
5262 { (eval echo "$as_me:5262: \"$ac_try\"") >&5
5265 echo "$as_me:5265: \$? = $ac_status" >&5
5266 (exit $ac_status); }; }; then
5267 cf_cv_define_sigwinch=yes
5269 echo "$as_me: failed program was:" >&5
5270 cat conftest.$ac_ext >&5
5271 cat >conftest.$ac_ext <<_ACEOF
5272 #line 5272 "configure"
5273 #include "confdefs.h"
5275 #undef _XOPEN_SOURCE
5276 #undef _POSIX_SOURCE
5277 #undef _POSIX_C_SOURCE
5278 #include <sys/types.h>
5279 #include <sys/signal.h>
5289 rm -f conftest.$ac_objext
5290 if { (eval echo "$as_me:5290: \"$ac_compile\"") >&5
5291 (eval $ac_compile) 2>&5
5293 echo "$as_me:5293: \$? = $ac_status" >&5
5294 (exit $ac_status); } &&
5295 { ac_try='test -s conftest.$ac_objext'
5296 { (eval echo "$as_me:5296: \"$ac_try\"") >&5
5299 echo "$as_me:5299: \$? = $ac_status" >&5
5300 (exit $ac_status); }; }; then
5301 cf_cv_define_sigwinch=maybe
5303 echo "$as_me: failed program was:" >&5
5304 cat conftest.$ac_ext >&5
5305 cf_cv_define_sigwinch=no
5307 rm -f conftest.$ac_objext conftest.$ac_ext
5310 rm -f conftest.$ac_objext conftest.$ac_ext
5313 echo "$as_me:5313: result: $cf_cv_define_sigwinch" >&5
5314 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5316 if test "$cf_cv_define_sigwinch" = maybe ; then
5317 echo "$as_me:5317: checking for actual SIGWINCH definition" >&5
5318 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5319 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5320 echo $ECHO_N "(cached) $ECHO_C" >&6
5323 cf_cv_fixup_sigwinch=unknown
5325 while test $cf_sigwinch != 1
5327 cat >conftest.$ac_ext <<_ACEOF
5328 #line 5328 "configure"
5329 #include "confdefs.h"
5331 #undef _XOPEN_SOURCE
5332 #undef _POSIX_SOURCE
5333 #undef _POSIX_C_SOURCE
5334 #include <sys/types.h>
5335 #include <sys/signal.h>
5341 #if SIGWINCH != $cf_sigwinch
5349 rm -f conftest.$ac_objext
5350 if { (eval echo "$as_me:5350: \"$ac_compile\"") >&5
5351 (eval $ac_compile) 2>&5
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit $ac_status); } &&
5355 { ac_try='test -s conftest.$ac_objext'
5356 { (eval echo "$as_me:5356: \"$ac_try\"") >&5
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit $ac_status); }; }; then
5361 cf_cv_fixup_sigwinch=$cf_sigwinch
5364 echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5367 rm -f conftest.$ac_objext conftest.$ac_ext
5369 cf_sigwinch=`expr $cf_sigwinch - 1`
5373 echo "$as_me:5373: result: $cf_cv_fixup_sigwinch" >&5
5374 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5376 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5377 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5381 # Checks for CODESET support.
5383 echo "$as_me:5383: checking for nl_langinfo and CODESET" >&5
5384 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5385 if test "${am_cv_langinfo_codeset+set}" = set; then
5386 echo $ECHO_N "(cached) $ECHO_C" >&6
5388 cat >conftest.$ac_ext <<_ACEOF
5389 #line 5389 "configure"
5390 #include "confdefs.h"
5391 #include <langinfo.h>
5395 char* cs = nl_langinfo(CODESET);
5400 rm -f conftest.$ac_objext conftest$ac_exeext
5401 if { (eval echo "$as_me:5401: \"$ac_link\"") >&5
5402 (eval $ac_link) 2>&5
5404 echo "$as_me:5404: \$? = $ac_status" >&5
5405 (exit $ac_status); } &&
5406 { ac_try='test -s conftest$ac_exeext'
5407 { (eval echo "$as_me:5407: \"$ac_try\"") >&5
5410 echo "$as_me:5410: \$? = $ac_status" >&5
5411 (exit $ac_status); }; }; then
5412 am_cv_langinfo_codeset=yes
5414 echo "$as_me: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 am_cv_langinfo_codeset=no
5418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5421 echo "$as_me:5421: result: $am_cv_langinfo_codeset" >&5
5422 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5423 if test $am_cv_langinfo_codeset = yes; then
5425 cat >>confdefs.h <<\EOF
5426 #define HAVE_LANGINFO_CODESET 1
5431 echo "$as_me:5431: checking if you want to use pkg-config" >&5
5432 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5434 # Check whether --with-pkg-config or --without-pkg-config was given.
5435 if test "${with_pkg_config+set}" = set; then
5436 withval="$with_pkg_config"
5437 cf_pkg_config=$withval
5441 echo "$as_me:5441: result: $cf_pkg_config" >&5
5442 echo "${ECHO_T}$cf_pkg_config" >&6
5444 case $cf_pkg_config in
5450 if test -n "$ac_tool_prefix"; then
5451 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5452 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5453 echo "$as_me:5453: checking for $ac_word" >&5
5454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5455 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5456 echo $ECHO_N "(cached) $ECHO_C" >&6
5460 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5463 ac_save_IFS=$IFS; IFS=$ac_path_separator
5465 for ac_dir in $ac_dummy; do
5467 test -z "$ac_dir" && ac_dir=.
5468 if $as_executable_p "$ac_dir/$ac_word"; then
5469 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5470 echo "$as_me:5470: found $ac_dir/$ac_word" >&5
5478 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5480 if test -n "$PKG_CONFIG"; then
5481 echo "$as_me:5481: result: $PKG_CONFIG" >&5
5482 echo "${ECHO_T}$PKG_CONFIG" >&6
5484 echo "$as_me:5484: result: no" >&5
5485 echo "${ECHO_T}no" >&6
5489 if test -z "$ac_cv_path_PKG_CONFIG"; then
5490 ac_pt_PKG_CONFIG=$PKG_CONFIG
5491 # Extract the first word of "pkg-config", so it can be a program name with args.
5492 set dummy pkg-config; ac_word=$2
5493 echo "$as_me:5493: checking for $ac_word" >&5
5494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5495 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5496 echo $ECHO_N "(cached) $ECHO_C" >&6
5498 case $ac_pt_PKG_CONFIG in
5500 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5503 ac_save_IFS=$IFS; IFS=$ac_path_separator
5505 for ac_dir in $ac_dummy; do
5507 test -z "$ac_dir" && ac_dir=.
5508 if $as_executable_p "$ac_dir/$ac_word"; then
5509 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5510 echo "$as_me:5510: found $ac_dir/$ac_word" >&5
5515 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5519 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5521 if test -n "$ac_pt_PKG_CONFIG"; then
5522 echo "$as_me:5522: result: $ac_pt_PKG_CONFIG" >&5
5523 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5525 echo "$as_me:5525: result: no" >&5
5526 echo "${ECHO_T}no" >&6
5529 PKG_CONFIG=$ac_pt_PKG_CONFIG
5531 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5540 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5541 if test "$PKG_CONFIG" != none ; then
5543 if test "x$prefix" != xNONE; then
5544 cf_path_syntax="$prefix"
5546 cf_path_syntax="$ac_default_prefix"
5549 case ".$PKG_CONFIG" in
5554 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5556 (.\${*prefix}*|.\${*dir}*)
5557 eval PKG_CONFIG="$PKG_CONFIG"
5558 case ".$PKG_CONFIG" in
5560 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5565 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5568 { { echo "$as_me:5568: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5569 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5570 { (exit 1); exit 1; }; }
5574 elif test "x$cf_pkg_config" != xno ; then
5575 { echo "$as_me:5575: WARNING: pkg-config is not installed" >&5
5576 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5579 echo "$as_me:5579: checking if you want to see long compiling messages" >&5
5580 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5582 # Check whether --enable-echo or --disable-echo was given.
5583 if test "${enable_echo+set}" = set; then
5584 enableval="$enable_echo"
5585 test "$enableval" != no && enableval=yes
5586 if test "$enableval" != "yes" ; then
5589 ECHO_LD='@echo linking $@;'
5590 RULE_CC='@echo compiling $<'
5591 SHOW_CC='@echo compiling $@'
5613 echo "$as_me:5613: result: $enableval" >&5
5614 echo "${ECHO_T}$enableval" >&6
5616 echo "$as_me:5616: checking for ncurses wrap-prefix" >&5
5617 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5619 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5620 if test "${with_ncurses_wrap_prefix+set}" = set; then
5621 withval="$with_ncurses_wrap_prefix"
5622 NCURSES_WRAP_PREFIX=$withval
5624 NCURSES_WRAP_PREFIX=_nc_
5626 echo "$as_me:5626: result: $NCURSES_WRAP_PREFIX" >&5
5627 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5629 echo "$as_me:5629: checking if you want to check for wide-character functions" >&5
5630 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5632 # Check whether --enable-widec or --disable-widec was given.
5633 if test "${enable_widec+set}" = set; then
5634 enableval="$enable_widec"
5635 test "$enableval" != no && enableval=yes
5636 if test "$enableval" != "yes" ; then
5646 echo "$as_me:5646: result: $cf_enable_widec" >&5
5647 echo "${ECHO_T}$cf_enable_widec" >&6
5649 echo "$as_me:5649: checking for specific curses-directory" >&5
5650 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5652 # Check whether --with-curses-dir or --without-curses-dir was given.
5653 if test "${with_curses_dir+set}" = set; then
5654 withval="$with_curses_dir"
5655 cf_cv_curses_dir=$withval
5659 echo "$as_me:5659: result: $cf_cv_curses_dir" >&5
5660 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5662 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5665 if test "x$prefix" != xNONE; then
5666 cf_path_syntax="$prefix"
5668 cf_path_syntax="$ac_default_prefix"
5676 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5678 (.\${*prefix}*|.\${*dir}*)
5679 eval withval="$withval"
5682 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5687 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5690 { { echo "$as_me:5690: error: expected a pathname, not \"$withval\"" >&5
5691 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5692 { (exit 1); exit 1; }; }
5696 if test -d "$cf_cv_curses_dir"
5699 if test -n "$cf_cv_curses_dir/include" ; then
5700 for cf_add_incdir in $cf_cv_curses_dir/include
5702 while test $cf_add_incdir != /usr/include
5704 if test -d $cf_add_incdir
5707 if test -n "$CFLAGS$CPPFLAGS" ; then
5708 # a loop is needed to ensure we can add subdirs of existing dirs
5709 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5710 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5711 cf_have_incdir=yes; break
5716 if test "$cf_have_incdir" = no ; then
5717 if test "$cf_add_incdir" = /usr/local/include ; then
5718 if test "$GCC" = yes
5720 cf_save_CPPFLAGS=$CPPFLAGS
5722 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5723 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5725 cat >conftest.$ac_ext <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5737 rm -f conftest.$ac_objext
5738 if { (eval echo "$as_me:5738: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit $ac_status); } &&
5743 { ac_try='test -s conftest.$ac_objext'
5744 { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit $ac_status); }; }; then
5751 echo "$as_me: failed program was:" >&5
5752 cat conftest.$ac_ext >&5
5755 rm -f conftest.$ac_objext conftest.$ac_ext
5756 CPPFLAGS=$cf_save_CPPFLAGS
5761 if test "$cf_have_incdir" = no ; then
5762 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5764 echo "${as_me:-configure}:5764: testing adding $cf_add_incdir to include-path ..." 1>&5
5766 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5768 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5769 test "$cf_top_incdir" = "$cf_add_incdir" && break
5770 cf_add_incdir="$cf_top_incdir"
5781 if test -n "$cf_cv_curses_dir/lib" ; then
5782 for cf_add_libdir in $cf_cv_curses_dir/lib
5784 if test $cf_add_libdir = /usr/lib ; then
5786 elif test -d $cf_add_libdir
5789 if test -n "$LDFLAGS$LIBS" ; then
5790 # a loop is needed to ensure we can add subdirs of existing dirs
5791 for cf_test_libdir in $LDFLAGS $LIBS ; do
5792 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5793 cf_have_libdir=yes; break
5797 if test "$cf_have_libdir" = no ; then
5798 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5800 echo "${as_me:-configure}:5800: testing adding $cf_add_libdir to library-path ..." 1>&5
5802 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5813 echo "$as_me:5813: checking for specified curses library type" >&5
5814 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5816 # Check whether --with-screen or --without-screen was given.
5817 if test "${with_screen+set}" = set; then
5818 withval="$with_screen"
5819 cf_cv_screen=$withval
5822 # Check whether --with-ncursesw or --without-ncursesw was given.
5823 if test "${with_ncursesw+set}" = set; then
5824 withval="$with_ncursesw"
5825 cf_cv_screen=ncursesw
5828 # Check whether --with-ncurses or --without-ncurses was given.
5829 if test "${with_ncurses+set}" = set; then
5830 withval="$with_ncurses"
5831 cf_cv_screen=ncurses
5834 # Check whether --with-pdcurses or --without-pdcurses was given.
5835 if test "${with_pdcurses+set}" = set; then
5836 withval="$with_pdcurses"
5837 cf_cv_screen=pdcurses
5840 # Check whether --with-curses-colr or --without-curses-colr was given.
5841 if test "${with_curses_colr+set}" = set; then
5842 withval="$with_curses_colr"
5843 cf_cv_screen=curses_colr
5846 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5847 if test "${with_curses_5lib+set}" = set; then
5848 withval="$with_curses_5lib"
5849 cf_cv_screen=curses_5lib
5857 echo "$as_me:5857: result: $cf_cv_screen" >&5
5858 echo "${ECHO_T}$cf_cv_screen" >&6
5860 case $cf_cv_screen in
5863 echo "$as_me:5863: checking for extra include directories" >&5
5864 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5865 if test "${cf_cv_curses_incdir+set}" = set; then
5866 echo $ECHO_N "(cached) $ECHO_C" >&6
5869 cf_cv_curses_incdir=no
5872 if test "x$cf_cv_screen" = "xcurses_colr"
5874 test -d /usr/include/curses_colr && \
5875 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5879 if test "x$cf_cv_screen" = "xcurses_5lib"
5881 test -d /usr/5lib && \
5882 test -d /usr/5include && \
5883 cf_cv_curses_incdir="-I/usr/5include"
5889 echo "$as_me:5889: result: $cf_cv_curses_incdir" >&5
5890 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5891 if test "$cf_cv_curses_incdir" != no
5894 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5895 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
5899 echo "$as_me:5899: checking if we have identified curses headers" >&5
5900 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5901 if test "${cf_cv_ncurses_header+set}" = set; then
5902 echo $ECHO_N "(cached) $ECHO_C" >&6
5905 cf_cv_ncurses_header=none
5908 curses.h ncurses/ncurses.h ncurses/curses.h
5910 cat >conftest.$ac_ext <<_ACEOF
5911 #line 5911 "configure"
5912 #include "confdefs.h"
5913 #include <${cf_header}>
5917 initscr(); tgoto("?", 0,0)
5922 rm -f conftest.$ac_objext
5923 if { (eval echo "$as_me:5923: \"$ac_compile\"") >&5
5924 (eval $ac_compile) 2>&5
5926 echo "$as_me:5926: \$? = $ac_status" >&5
5927 (exit $ac_status); } &&
5928 { ac_try='test -s conftest.$ac_objext'
5929 { (eval echo "$as_me:5929: \"$ac_try\"") >&5
5932 echo "$as_me:5932: \$? = $ac_status" >&5
5933 (exit $ac_status); }; }; then
5934 cf_cv_ncurses_header=$cf_header; break
5936 echo "$as_me: failed program was:" >&5
5937 cat conftest.$ac_ext >&5
5939 rm -f conftest.$ac_objext conftest.$ac_ext
5943 echo "$as_me:5943: result: $cf_cv_ncurses_header" >&5
5944 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5946 if test "$cf_cv_ncurses_header" = none ; then
5947 { { echo "$as_me:5947: error: No curses header-files found" >&5
5948 echo "$as_me: error: No curses header-files found" >&2;}
5949 { (exit 1); exit 1; }; }
5952 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5954 for ac_header in $cf_cv_ncurses_header
5956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5957 echo "$as_me:5957: checking for $ac_header" >&5
5958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5960 echo $ECHO_N "(cached) $ECHO_C" >&6
5962 cat >conftest.$ac_ext <<_ACEOF
5963 #line 5963 "configure"
5964 #include "confdefs.h"
5965 #include <$ac_header>
5967 if { (eval echo "$as_me:5967: \"$ac_cpp conftest.$ac_ext\"") >&5
5968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5970 egrep -v '^ *\+' conftest.er1 >conftest.err
5972 cat conftest.err >&5
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit $ac_status); } >/dev/null; then
5975 if test -s conftest.err; then
5976 ac_cpp_err=$ac_c_preproc_warn_flag
5983 if test -z "$ac_cpp_err"; then
5984 eval "$as_ac_Header=yes"
5986 echo "$as_me: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5988 eval "$as_ac_Header=no"
5990 rm -f conftest.err conftest.$ac_ext
5992 echo "$as_me:5992: result: `eval echo '${'$as_ac_Header'}'`" >&5
5993 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5994 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5995 cat >>confdefs.h <<EOF
5996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6002 echo "$as_me:6002: checking for terminfo header" >&5
6003 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6004 if test "${cf_cv_term_header+set}" = set; then
6005 echo $ECHO_N "(cached) $ECHO_C" >&6
6008 case ${cf_cv_ncurses_header} in
6009 (*/ncurses.h|*/ncursesw.h)
6010 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6013 cf_term_header=term.h
6017 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6019 cat >conftest.$ac_ext <<_ACEOF
6020 #line 6020 "configure"
6021 #include "confdefs.h"
6023 #include <${cf_cv_ncurses_header:-curses.h}>
6029 int x = auto_left_margin
6034 rm -f conftest.$ac_objext
6035 if { (eval echo "$as_me:6035: \"$ac_compile\"") >&5
6036 (eval $ac_compile) 2>&5
6038 echo "$as_me:6038: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest.$ac_objext'
6041 { (eval echo "$as_me:6041: \"$ac_try\"") >&5
6044 echo "$as_me:6044: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6047 cf_cv_term_header="$cf_test"
6049 echo "$as_me: failed program was:" >&5
6050 cat conftest.$ac_ext >&5
6052 cf_cv_term_header=unknown
6055 rm -f conftest.$ac_objext conftest.$ac_ext
6056 test "$cf_cv_term_header" != unknown && break
6060 echo "$as_me:6060: result: $cf_cv_term_header" >&5
6061 echo "${ECHO_T}$cf_cv_term_header" >&6
6063 # Set definitions to allow ifdef'ing to accommodate subdirectories
6065 case $cf_cv_term_header in
6068 cat >>confdefs.h <<\EOF
6069 #define HAVE_TERM_H 1
6075 case $cf_cv_term_header in
6078 cat >>confdefs.h <<\EOF
6079 #define HAVE_NCURSES_TERM_H 1
6085 cat >>confdefs.h <<\EOF
6086 #define HAVE_NCURSESW_TERM_H 1
6092 echo "$as_me:6092: checking for ncurses version" >&5
6093 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6094 if test "${cf_cv_ncurses_version+set}" = set; then
6095 echo $ECHO_N "(cached) $ECHO_C" >&6
6098 cf_cv_ncurses_version=no
6101 if test "$cross_compiling" = yes; then
6103 # This will not work if the preprocessor splits the line after the
6104 # Autoconf token. The 'unproto' program does that.
6105 cat > conftest.$ac_ext <<EOF
6106 #include <${cf_cv_ncurses_header:-curses.h}>
6108 #ifdef NCURSES_VERSION
6109 Autoconf NCURSES_VERSION
6117 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6118 { (eval echo "$as_me:6118: \"$cf_try\"") >&5
6121 echo "$as_me:6121: \$? = $ac_status" >&5
6122 (exit $ac_status); }
6123 if test -f conftest.out ; then
6124 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6125 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6130 cat >conftest.$ac_ext <<_ACEOF
6131 #line 6131 "configure"
6132 #include "confdefs.h"
6134 #include <${cf_cv_ncurses_header:-curses.h}>
6138 FILE *fp = fopen("$cf_tempfile", "w");
6139 #ifdef NCURSES_VERSION
6140 # ifdef NCURSES_VERSION_PATCH
6141 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6143 fprintf(fp, "%s\n", NCURSES_VERSION);
6147 fprintf(fp, "old\n");
6152 ${cf_cv_main_return:-return}(0);
6155 rm -f conftest$ac_exeext
6156 if { (eval echo "$as_me:6156: \"$ac_link\"") >&5
6157 (eval $ac_link) 2>&5
6159 echo "$as_me:6159: \$? = $ac_status" >&5
6160 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6161 { (eval echo "$as_me:6161: \"$ac_try\"") >&5
6164 echo "$as_me:6164: \$? = $ac_status" >&5
6165 (exit $ac_status); }; }; then
6167 cf_cv_ncurses_version=`cat $cf_tempfile`
6169 echo "$as_me: program exited with status $ac_status" >&5
6170 echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6173 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6178 echo "$as_me:6178: result: $cf_cv_ncurses_version" >&5
6179 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6180 test "$cf_cv_ncurses_version" = no ||
6181 cat >>confdefs.h <<\EOF
6185 echo "$as_me:6185: checking if we have identified curses libraries" >&5
6186 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6187 cat >conftest.$ac_ext <<_ACEOF
6188 #line 6188 "configure"
6189 #include "confdefs.h"
6190 #include <${cf_cv_ncurses_header:-curses.h}>
6194 initscr(); tgoto("?", 0,0)
6199 rm -f conftest.$ac_objext conftest$ac_exeext
6200 if { (eval echo "$as_me:6200: \"$ac_link\"") >&5
6201 (eval $ac_link) 2>&5
6203 echo "$as_me:6203: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
6205 { ac_try='test -s conftest$ac_exeext'
6206 { (eval echo "$as_me:6206: \"$ac_try\"") >&5
6209 echo "$as_me:6209: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6213 echo "$as_me: failed program was:" >&5
6214 cat conftest.$ac_ext >&5
6217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6218 echo "$as_me:6218: result: $cf_result" >&5
6219 echo "${ECHO_T}$cf_result" >&6
6221 if test "$cf_result" = no ; then
6224 echo "$as_me:6224: checking for tgoto in -lmytinfo" >&5
6225 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6226 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6227 echo $ECHO_N "(cached) $ECHO_C" >&6
6229 ac_check_lib_save_LIBS=$LIBS
6230 LIBS="-lmytinfo $LIBS"
6231 cat >conftest.$ac_ext <<_ACEOF
6232 #line 6232 "configure"
6233 #include "confdefs.h"
6235 /* Override any gcc2 internal prototype to avoid an error. */
6239 /* We use char because int might match the return type of a gcc2
6240 builtin and then its argument prototype would still apply. */
6250 rm -f conftest.$ac_objext conftest$ac_exeext
6251 if { (eval echo "$as_me:6251: \"$ac_link\"") >&5
6252 (eval $ac_link) 2>&5
6254 echo "$as_me:6254: \$? = $ac_status" >&5
6255 (exit $ac_status); } &&
6256 { ac_try='test -s conftest$ac_exeext'
6257 { (eval echo "$as_me:6257: \"$ac_try\"") >&5
6260 echo "$as_me:6260: \$? = $ac_status" >&5
6261 (exit $ac_status); }; }; then
6262 ac_cv_lib_mytinfo_tgoto=yes
6264 echo "$as_me: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6266 ac_cv_lib_mytinfo_tgoto=no
6268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6269 LIBS=$ac_check_lib_save_LIBS
6271 echo "$as_me:6271: result: $ac_cv_lib_mytinfo_tgoto" >&5
6272 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6273 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6275 cf_add_libs="-lmytinfo"
6276 # Filter out duplicates - this happens with badly-designed ".pc" files...
6277 for cf_add_1lib in $LIBS
6279 for cf_add_2lib in $cf_add_libs
6281 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6287 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6295 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6296 # next (1998), and xcurses "newer" (2000). There is no header file for
6297 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6298 # term.h) for cur_colr
6299 if test "x$cf_cv_screen" = "xcurses_colr"
6301 echo "$as_me:6301: checking for initscr in -lcur_colr" >&5
6302 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6303 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6304 echo $ECHO_N "(cached) $ECHO_C" >&6
6306 ac_check_lib_save_LIBS=$LIBS
6307 LIBS="-lcur_colr $LIBS"
6308 cat >conftest.$ac_ext <<_ACEOF
6309 #line 6309 "configure"
6310 #include "confdefs.h"
6312 /* Override any gcc2 internal prototype to avoid an error. */
6316 /* We use char because int might match the return type of a gcc2
6317 builtin and then its argument prototype would still apply. */
6327 rm -f conftest.$ac_objext conftest$ac_exeext
6328 if { (eval echo "$as_me:6328: \"$ac_link\"") >&5
6329 (eval $ac_link) 2>&5
6331 echo "$as_me:6331: \$? = $ac_status" >&5
6332 (exit $ac_status); } &&
6333 { ac_try='test -s conftest$ac_exeext'
6334 { (eval echo "$as_me:6334: \"$ac_try\"") >&5
6337 echo "$as_me:6337: \$? = $ac_status" >&5
6338 (exit $ac_status); }; }; then
6339 ac_cv_lib_cur_colr_initscr=yes
6341 echo "$as_me: failed program was:" >&5
6342 cat conftest.$ac_ext >&5
6343 ac_cv_lib_cur_colr_initscr=no
6345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6346 LIBS=$ac_check_lib_save_LIBS
6348 echo "$as_me:6348: result: $ac_cv_lib_cur_colr_initscr" >&5
6349 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6350 if test $ac_cv_lib_cur_colr_initscr = yes; then
6352 cf_add_libs="-lcur_colr"
6353 # Filter out duplicates - this happens with badly-designed ".pc" files...
6354 for cf_add_1lib in $LIBS
6356 for cf_add_2lib in $cf_add_libs
6358 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6364 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6368 ac_cv_func_initscr=yes
6372 echo "$as_me:6372: checking for initscr in -lHcurses" >&5
6373 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6374 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6375 echo $ECHO_N "(cached) $ECHO_C" >&6
6377 ac_check_lib_save_LIBS=$LIBS
6378 LIBS="-lHcurses $LIBS"
6379 cat >conftest.$ac_ext <<_ACEOF
6380 #line 6380 "configure"
6381 #include "confdefs.h"
6383 /* Override any gcc2 internal prototype to avoid an error. */
6387 /* We use char because int might match the return type of a gcc2
6388 builtin and then its argument prototype would still apply. */
6398 rm -f conftest.$ac_objext conftest$ac_exeext
6399 if { (eval echo "$as_me:6399: \"$ac_link\"") >&5
6400 (eval $ac_link) 2>&5
6402 echo "$as_me:6402: \$? = $ac_status" >&5
6403 (exit $ac_status); } &&
6404 { ac_try='test -s conftest$ac_exeext'
6405 { (eval echo "$as_me:6405: \"$ac_try\"") >&5
6408 echo "$as_me:6408: \$? = $ac_status" >&5
6409 (exit $ac_status); }; }; then
6410 ac_cv_lib_Hcurses_initscr=yes
6412 echo "$as_me: failed program was:" >&5
6413 cat conftest.$ac_ext >&5
6414 ac_cv_lib_Hcurses_initscr=no
6416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6417 LIBS=$ac_check_lib_save_LIBS
6419 echo "$as_me:6419: result: $ac_cv_lib_Hcurses_initscr" >&5
6420 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6421 if test $ac_cv_lib_Hcurses_initscr = yes; then
6423 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6425 cf_add_libs="-lHcurses"
6426 # Filter out duplicates - this happens with badly-designed ".pc" files...
6427 for cf_add_1lib in $LIBS
6429 for cf_add_2lib in $cf_add_libs
6431 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6437 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6441 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6442 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6444 ac_cv_func_initscr=yes
6453 case `arch 2>/dev/null` in
6458 if test -n "/lib64" ; then
6459 for cf_add_libdir in /lib64
6461 if test $cf_add_libdir = /usr/lib ; then
6463 elif test -d $cf_add_libdir
6466 if test -n "$LDFLAGS$LIBS" ; then
6467 # a loop is needed to ensure we can add subdirs of existing dirs
6468 for cf_test_libdir in $LDFLAGS $LIBS ; do
6469 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6470 cf_have_libdir=yes; break
6474 if test "$cf_have_libdir" = no ; then
6475 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6477 echo "${as_me:-configure}:6477: testing adding $cf_add_libdir to library-path ..." 1>&5
6479 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6487 if test -n "/lib" ; then
6488 for cf_add_libdir in /lib
6490 if test $cf_add_libdir = /usr/lib ; then
6492 elif test -d $cf_add_libdir
6495 if test -n "$LDFLAGS$LIBS" ; then
6496 # a loop is needed to ensure we can add subdirs of existing dirs
6497 for cf_test_libdir in $LDFLAGS $LIBS ; do
6498 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6499 cf_have_libdir=yes; break
6503 if test "$cf_have_libdir" = no ; then
6504 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6506 echo "${as_me:-configure}:6506: testing adding $cf_add_libdir to library-path ..." 1>&5
6508 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6518 if test -n "/lib" ; then
6519 for cf_add_libdir in /lib
6521 if test $cf_add_libdir = /usr/lib ; then
6523 elif test -d $cf_add_libdir
6526 if test -n "$LDFLAGS$LIBS" ; then
6527 # a loop is needed to ensure we can add subdirs of existing dirs
6528 for cf_test_libdir in $LDFLAGS $LIBS ; do
6529 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6530 cf_have_libdir=yes; break
6534 if test "$cf_have_libdir" = no ; then
6535 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6537 echo "${as_me:-configure}:6537: testing adding $cf_add_libdir to library-path ..." 1>&5
6539 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6549 if test "x$cf_cv_screen" = "xcurses_5lib"
6551 if test -d /usr/5lib ; then
6553 if test -n "/usr/5lib" ; then
6554 for cf_add_libdir in /usr/5lib
6556 if test $cf_add_libdir = /usr/lib ; then
6558 elif test -d $cf_add_libdir
6561 if test -n "$LDFLAGS$LIBS" ; then
6562 # a loop is needed to ensure we can add subdirs of existing dirs
6563 for cf_test_libdir in $LDFLAGS $LIBS ; do
6564 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6565 cf_have_libdir=yes; break
6569 if test "$cf_have_libdir" = no ; then
6570 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6572 echo "${as_me:-configure}:6572: testing adding $cf_add_libdir to library-path ..." 1>&5
6574 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6580 cf_add_libs="-lcurses -ltermcap"
6581 # Filter out duplicates - this happens with badly-designed ".pc" files...
6582 for cf_add_1lib in $LIBS
6584 for cf_add_2lib in $cf_add_libs
6586 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6592 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6598 ac_cv_func_initscr=yes
6602 if test ".$ac_cv_func_initscr" != .yes ; then
6603 cf_save_LIBS="$LIBS"
6605 if test ".${cf_cv_ncurses_version:-no}" != .no
6607 cf_check_list="ncurses curses cursesX"
6609 cf_check_list="cursesX curses ncurses"
6612 # Check for library containing tgoto. Do this before curses library
6613 # because it may be needed to link the test-case for initscr.
6614 if test "x$cf_term_lib" = x
6616 echo "$as_me:6616: checking for tgoto" >&5
6617 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6618 if test "${ac_cv_func_tgoto+set}" = set; then
6619 echo $ECHO_N "(cached) $ECHO_C" >&6
6621 cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624 #define tgoto autoconf_temporary
6625 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6632 /* We use char because int might match the return type of a gcc2
6633 builtin and then its argument prototype would still apply. */
6640 /* The GNU C library defines stubs for functions which it implements
6641 to always fail with ENOSYS. Some functions are actually named
6642 something starting with __ and the normal name is an alias. */
6643 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6644 #error found stub for tgoto
6652 rm -f conftest.$ac_objext conftest$ac_exeext
6653 if { (eval echo "$as_me:6653: \"$ac_link\"") >&5
6654 (eval $ac_link) 2>&5
6656 echo "$as_me:6656: \$? = $ac_status" >&5
6657 (exit $ac_status); } &&
6658 { ac_try='test -s conftest$ac_exeext'
6659 { (eval echo "$as_me:6659: \"$ac_try\"") >&5
6662 echo "$as_me:6662: \$? = $ac_status" >&5
6663 (exit $ac_status); }; }; then
6664 ac_cv_func_tgoto=yes
6666 echo "$as_me: failed program was:" >&5
6667 cat conftest.$ac_ext >&5
6670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6672 echo "$as_me:6672: result: $ac_cv_func_tgoto" >&5
6673 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6674 if test $ac_cv_func_tgoto = yes; then
6675 cf_term_lib=predefined
6678 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6680 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6681 echo "$as_me:6681: checking for tgoto in -l$cf_term_lib" >&5
6682 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6683 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6684 echo $ECHO_N "(cached) $ECHO_C" >&6
6686 ac_check_lib_save_LIBS=$LIBS
6687 LIBS="-l$cf_term_lib $LIBS"
6688 cat >conftest.$ac_ext <<_ACEOF
6689 #line 6689 "configure"
6690 #include "confdefs.h"
6692 /* Override any gcc2 internal prototype to avoid an error. */
6696 /* We use char because int might match the return type of a gcc2
6697 builtin and then its argument prototype would still apply. */
6707 rm -f conftest.$ac_objext conftest$ac_exeext
6708 if { (eval echo "$as_me:6708: \"$ac_link\"") >&5
6709 (eval $ac_link) 2>&5
6711 echo "$as_me:6711: \$? = $ac_status" >&5
6712 (exit $ac_status); } &&
6713 { ac_try='test -s conftest$ac_exeext'
6714 { (eval echo "$as_me:6714: \"$ac_try\"") >&5
6717 echo "$as_me:6717: \$? = $ac_status" >&5
6718 (exit $ac_status); }; }; then
6719 eval "$as_ac_Lib=yes"
6721 echo "$as_me: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723 eval "$as_ac_Lib=no"
6725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6726 LIBS=$ac_check_lib_save_LIBS
6728 echo "$as_me:6728: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6729 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6730 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6732 : ${cf_nculib_root:=$cf_term_lib}
6743 # Check for library containing initscr
6744 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6745 if test "x$cf_curs_lib" = x
6747 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6749 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6750 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6751 echo "$as_me:6751: checking if we can link with $cf_curs_lib library" >&5
6752 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6753 cat >conftest.$ac_ext <<_ACEOF
6754 #line 6754 "configure"
6755 #include "confdefs.h"
6756 #include <${cf_cv_ncurses_header:-curses.h}>
6765 rm -f conftest.$ac_objext conftest$ac_exeext
6766 if { (eval echo "$as_me:6766: \"$ac_link\"") >&5
6767 (eval $ac_link) 2>&5
6769 echo "$as_me:6769: \$? = $ac_status" >&5
6770 (exit $ac_status); } &&
6771 { ac_try='test -s conftest$ac_exeext'
6772 { (eval echo "$as_me:6772: \"$ac_try\"") >&5
6775 echo "$as_me:6775: \$? = $ac_status" >&5
6776 (exit $ac_status); }; }; then
6779 echo "$as_me: failed program was:" >&5
6780 cat conftest.$ac_ext >&5
6783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6784 echo "$as_me:6784: result: $cf_result" >&5
6785 echo "${ECHO_T}$cf_result" >&6
6786 test $cf_result = yes && break
6787 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6789 elif test "$cf_term_lib" != predefined ; then
6790 echo "$as_me:6790: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6791 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6792 cat >conftest.$ac_ext <<_ACEOF
6793 #line 6793 "configure"
6794 #include "confdefs.h"
6795 #include <${cf_cv_ncurses_header:-curses.h}>
6799 initscr(); tgoto((char *)0, 0, 0);
6804 rm -f conftest.$ac_objext conftest$ac_exeext
6805 if { (eval echo "$as_me:6805: \"$ac_link\"") >&5
6806 (eval $ac_link) 2>&5
6808 echo "$as_me:6808: \$? = $ac_status" >&5
6809 (exit $ac_status); } &&
6810 { ac_try='test -s conftest$ac_exeext'
6811 { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6814 echo "$as_me:6814: \$? = $ac_status" >&5
6815 (exit $ac_status); }; }; then
6818 echo "$as_me: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6821 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6822 cat >conftest.$ac_ext <<_ACEOF
6823 #line 6823 "configure"
6824 #include "confdefs.h"
6825 #include <${cf_cv_ncurses_header:-curses.h}>
6834 rm -f conftest.$ac_objext conftest$ac_exeext
6835 if { (eval echo "$as_me:6835: \"$ac_link\"") >&5
6836 (eval $ac_link) 2>&5
6838 echo "$as_me:6838: \$? = $ac_status" >&5
6839 (exit $ac_status); } &&
6840 { ac_try='test -s conftest$ac_exeext'
6841 { (eval echo "$as_me:6841: \"$ac_try\"") >&5
6844 echo "$as_me:6844: \$? = $ac_status" >&5
6845 (exit $ac_status); }; }; then
6848 echo "$as_me: failed program was:" >&5
6849 cat conftest.$ac_ext >&5
6852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6856 echo "$as_me:6856: result: $cf_result" >&5
6857 echo "${ECHO_T}$cf_result" >&6
6858 test $cf_result != error && break
6862 test $cf_curs_lib = unknown && { { echo "$as_me:6862: error: no curses library found" >&5
6863 echo "$as_me: error: no curses library found" >&2;}
6864 { (exit 1); exit 1; }; }
6871 echo "$as_me:6871: checking for multibyte character support" >&5
6872 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6873 if test "${cf_cv_utf8_lib+set}" = set; then
6874 echo $ECHO_N "(cached) $ECHO_C" >&6
6877 cf_save_LIBS="$LIBS"
6878 cat >conftest.$ac_ext <<_ACEOF
6879 #line 6879 "configure"
6880 #include "confdefs.h"
6891 rm -f conftest.$ac_objext conftest$ac_exeext
6892 if { (eval echo "$as_me:6892: \"$ac_link\"") >&5
6893 (eval $ac_link) 2>&5
6895 echo "$as_me:6895: \$? = $ac_status" >&5
6896 (exit $ac_status); } &&
6897 { ac_try='test -s conftest$ac_exeext'
6898 { (eval echo "$as_me:6898: \"$ac_try\"") >&5
6901 echo "$as_me:6901: \$? = $ac_status" >&5
6902 (exit $ac_status); }; }; then
6905 echo "$as_me: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6908 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6909 # will be set on completion of the AC_TRY_LINK below.
6910 cf_cv_header_path_utf8=
6911 cf_cv_library_path_utf8=
6913 echo "${as_me:-configure}:6913: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6915 cf_save_LIBS="$LIBS"
6917 cat >conftest.$ac_ext <<_ACEOF
6918 #line 6918 "configure"
6919 #include "confdefs.h"
6921 #include <libutf8.h>
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932 (eval $ac_link) 2>&5
6934 echo "$as_me:6934: \$? = $ac_status" >&5
6935 (exit $ac_status); } &&
6936 { ac_try='test -s conftest$ac_exeext'
6937 { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6940 echo "$as_me:6940: \$? = $ac_status" >&5
6941 (exit $ac_status); }; }; then
6943 cf_cv_find_linkage_utf8=yes
6944 cf_cv_header_path_utf8=/usr/include
6945 cf_cv_library_path_utf8=/usr/lib
6948 echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6951 LIBS="-lutf8 $cf_save_LIBS"
6953 cat >conftest.$ac_ext <<_ACEOF
6954 #line 6954 "configure"
6955 #include "confdefs.h"
6957 #include <libutf8.h>
6966 rm -f conftest.$ac_objext conftest$ac_exeext
6967 if { (eval echo "$as_me:6967: \"$ac_link\"") >&5
6968 (eval $ac_link) 2>&5
6970 echo "$as_me:6970: \$? = $ac_status" >&5
6971 (exit $ac_status); } &&
6972 { ac_try='test -s conftest$ac_exeext'
6973 { (eval echo "$as_me:6973: \"$ac_try\"") >&5
6976 echo "$as_me:6976: \$? = $ac_status" >&5
6977 (exit $ac_status); }; }; then
6979 cf_cv_find_linkage_utf8=yes
6980 cf_cv_header_path_utf8=/usr/include
6981 cf_cv_library_path_utf8=/usr/lib
6982 cf_cv_library_file_utf8="-lutf8"
6985 echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6988 cf_cv_find_linkage_utf8=no
6989 LIBS="$cf_save_LIBS"
6991 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6993 echo "${as_me:-configure}:6993: testing find linkage for utf8 library ..." 1>&5
6995 echo "${as_me:-configure}:6995: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6997 cf_save_CPPFLAGS="$CPPFLAGS"
6998 cf_test_CPPFLAGS="$CPPFLAGS"
7002 # collect the current set of include-directories from compiler flags
7003 cf_header_path_list=""
7004 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7005 for cf_header_path in $CPPFLAGS $CFLAGS
7007 case $cf_header_path in
7009 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7011 test "x$cf_header_path" != "xNONE" && \
7012 test -d "$cf_header_path" && \
7014 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7015 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7016 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7017 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7018 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7019 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7022 cf_header_path_list="$cf_header_path_list $cf_search"
7028 # add the variations for the package we are looking for
7032 test "x$prefix" != "xNONE" && \
7033 test -d "$prefix" && \
7035 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7036 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7037 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7038 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7039 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7040 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7043 for cf_subdir_prefix in \
7052 test "x$cf_subdir_prefix" != "x$prefix" && \
7053 test -d "$cf_subdir_prefix" && \
7054 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7055 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7056 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7057 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7058 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7059 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7060 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7065 test "$includedir" != NONE && \
7066 test "$includedir" != "/usr/include" && \
7067 test -d "$includedir" && {
7068 test -d $includedir && cf_search="$cf_search $includedir"
7069 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7072 test "$oldincludedir" != NONE && \
7073 test "$oldincludedir" != "/usr/include" && \
7074 test -d "$oldincludedir" && {
7075 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7076 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7079 cf_search="$cf_search $cf_header_path_list"
7081 for cf_cv_header_path_utf8 in $cf_search
7083 if test -d $cf_cv_header_path_utf8 ; then
7084 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7086 echo "${as_me:-configure}:7086: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7088 CPPFLAGS="$cf_save_CPPFLAGS"
7090 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7091 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7093 cat >conftest.$ac_ext <<_ACEOF
7094 #line 7094 "configure"
7095 #include "confdefs.h"
7097 #include <libutf8.h>
7106 rm -f conftest.$ac_objext
7107 if { (eval echo "$as_me:7107: \"$ac_compile\"") >&5
7108 (eval $ac_compile) 2>&5
7110 echo "$as_me:7110: \$? = $ac_status" >&5
7111 (exit $ac_status); } &&
7112 { ac_try='test -s conftest.$ac_objext'
7113 { (eval echo "$as_me:7113: \"$ac_try\"") >&5
7116 echo "$as_me:7116: \$? = $ac_status" >&5
7117 (exit $ac_status); }; }; then
7119 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7121 echo "${as_me:-configure}:7121: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7123 cf_cv_find_linkage_utf8=maybe
7124 cf_test_CPPFLAGS="$CPPFLAGS"
7127 echo "$as_me: failed program was:" >&5
7128 cat conftest.$ac_ext >&5
7130 CPPFLAGS="$cf_save_CPPFLAGS"
7133 rm -f conftest.$ac_objext conftest.$ac_ext
7137 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7139 echo "${as_me:-configure}:7139: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7141 cf_save_LIBS="$LIBS"
7142 cf_save_LDFLAGS="$LDFLAGS"
7144 if test "$cf_cv_find_linkage_utf8" != yes ; then
7147 cf_library_path_list=""
7148 if test -n "${LDFLAGS}${LIBS}" ; then
7149 for cf_library_path in $LDFLAGS $LIBS
7151 case $cf_library_path in
7153 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7155 test "x$cf_library_path" != "xNONE" && \
7156 test -d "$cf_library_path" && \
7158 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7159 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7160 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7161 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7162 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7163 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7166 cf_library_path_list="$cf_library_path_list $cf_search"
7174 test "x$prefix" != "xNONE" && \
7175 test -d "$prefix" && \
7177 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7178 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7179 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7180 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7181 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7182 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7185 for cf_subdir_prefix in \
7194 test "x$cf_subdir_prefix" != "x$prefix" && \
7195 test -d "$cf_subdir_prefix" && \
7196 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7197 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7198 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7199 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7200 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7201 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7202 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7207 cf_search="$cf_library_path_list $cf_search"
7209 for cf_cv_library_path_utf8 in $cf_search
7211 if test -d $cf_cv_library_path_utf8 ; then
7212 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7214 echo "${as_me:-configure}:7214: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7216 CPPFLAGS="$cf_test_CPPFLAGS"
7217 LIBS="-lutf8 $cf_save_LIBS"
7218 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7219 cat >conftest.$ac_ext <<_ACEOF
7220 #line 7220 "configure"
7221 #include "confdefs.h"
7223 #include <libutf8.h>
7232 rm -f conftest.$ac_objext conftest$ac_exeext
7233 if { (eval echo "$as_me:7233: \"$ac_link\"") >&5
7234 (eval $ac_link) 2>&5
7236 echo "$as_me:7236: \$? = $ac_status" >&5
7237 (exit $ac_status); } &&
7238 { ac_try='test -s conftest$ac_exeext'
7239 { (eval echo "$as_me:7239: \"$ac_try\"") >&5
7242 echo "$as_me:7242: \$? = $ac_status" >&5
7243 (exit $ac_status); }; }; then
7245 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7247 echo "${as_me:-configure}:7247: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7249 cf_cv_find_linkage_utf8=yes
7250 cf_cv_library_file_utf8="-lutf8"
7253 echo "$as_me: failed program was:" >&5
7254 cat conftest.$ac_ext >&5
7256 CPPFLAGS="$cf_save_CPPFLAGS"
7257 LIBS="$cf_save_LIBS"
7258 LDFLAGS="$cf_save_LDFLAGS"
7261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7264 CPPFLAGS="$cf_save_CPPFLAGS"
7265 LDFLAGS="$cf_save_LDFLAGS"
7269 cf_cv_find_linkage_utf8=no
7273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7278 LIBS="$cf_save_LIBS"
7280 if test "$cf_cv_find_linkage_utf8" = yes ; then
7281 cf_cv_utf8_lib=add-on
7287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7289 echo "$as_me:7289: result: $cf_cv_utf8_lib" >&5
7290 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7292 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7294 if test "$cf_cv_utf8_lib" = "add-on" ; then
7296 cat >>confdefs.h <<\EOF
7297 #define HAVE_LIBUTF8_H 1
7300 if test -n "$cf_cv_header_path_utf8" ; then
7301 for cf_add_incdir in $cf_cv_header_path_utf8
7303 while test $cf_add_incdir != /usr/include
7305 if test -d $cf_add_incdir
7308 if test -n "$CFLAGS$CPPFLAGS" ; then
7309 # a loop is needed to ensure we can add subdirs of existing dirs
7310 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7311 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7312 cf_have_incdir=yes; break
7317 if test "$cf_have_incdir" = no ; then
7318 if test "$cf_add_incdir" = /usr/local/include ; then
7319 if test "$GCC" = yes
7321 cf_save_CPPFLAGS=$CPPFLAGS
7323 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7324 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7326 cat >conftest.$ac_ext <<_ACEOF
7327 #line 7327 "configure"
7328 #include "confdefs.h"
7338 rm -f conftest.$ac_objext
7339 if { (eval echo "$as_me:7339: \"$ac_compile\"") >&5
7340 (eval $ac_compile) 2>&5
7342 echo "$as_me:7342: \$? = $ac_status" >&5
7343 (exit $ac_status); } &&
7344 { ac_try='test -s conftest.$ac_objext'
7345 { (eval echo "$as_me:7345: \"$ac_try\"") >&5
7348 echo "$as_me:7348: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7352 echo "$as_me: failed program was:" >&5
7353 cat conftest.$ac_ext >&5
7356 rm -f conftest.$ac_objext conftest.$ac_ext
7357 CPPFLAGS=$cf_save_CPPFLAGS
7362 if test "$cf_have_incdir" = no ; then
7363 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7365 echo "${as_me:-configure}:7365: testing adding $cf_add_incdir to include-path ..." 1>&5
7367 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7369 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7370 test "$cf_top_incdir" = "$cf_add_incdir" && break
7371 cf_add_incdir="$cf_top_incdir"
7382 if test -n "$cf_cv_library_path_utf8" ; then
7383 for cf_add_libdir in $cf_cv_library_path_utf8
7385 if test $cf_add_libdir = /usr/lib ; then
7387 elif test -d $cf_add_libdir
7390 if test -n "$LDFLAGS$LIBS" ; then
7391 # a loop is needed to ensure we can add subdirs of existing dirs
7392 for cf_test_libdir in $LDFLAGS $LIBS ; do
7393 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7394 cf_have_libdir=yes; break
7398 if test "$cf_have_libdir" = no ; then
7399 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7401 echo "${as_me:-configure}:7401: testing adding $cf_add_libdir to library-path ..." 1>&5
7403 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7409 cf_add_libs="$cf_cv_library_file_utf8"
7410 # Filter out duplicates - this happens with badly-designed ".pc" files...
7411 for cf_add_1lib in $LIBS
7413 for cf_add_2lib in $cf_add_libs
7415 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7421 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7427 cf_ncuconfig_root=$cf_cv_screen
7428 cf_have_ncuconfig=no
7430 if test "x${PKG_CONFIG:=none}" != xnone; then
7431 echo "$as_me:7431: checking pkg-config for $cf_ncuconfig_root" >&5
7432 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7433 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7434 echo "$as_me:7434: result: yes" >&5
7435 echo "${ECHO_T}yes" >&6
7437 echo "$as_me:7437: checking if the $cf_ncuconfig_root package files work" >&5
7438 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7439 cf_have_ncuconfig=unknown
7441 cf_save_CPPFLAGS="$CPPFLAGS"
7442 cf_save_LIBS="$LIBS"
7447 cf_new_extra_cppflags=
7449 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7451 case $cf_fix_cppflags in
7453 case $cf_add_cflags in
7454 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7455 case $cf_add_cflags in
7457 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7459 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7460 && test -z "${cf_tst_cflags}" \
7461 && cf_fix_cppflags=yes
7463 if test $cf_fix_cppflags = yes ; then
7465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7469 elif test "${cf_tst_cflags}" = "\"'" ; then
7471 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7472 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7482 case $cf_add_cflags in
7484 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7486 CPPFLAGS=`echo "$CPPFLAGS" | \
7487 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7488 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7493 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7494 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7501 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7502 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7509 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7510 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7512 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7514 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7515 && test -z "${cf_tst_cflags}" \
7516 && cf_fix_cppflags=no
7521 if test -n "$cf_new_cflags" ; then
7523 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7524 CFLAGS="${CFLAGS}$cf_new_cflags"
7528 if test -n "$cf_new_cppflags" ; then
7530 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7531 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7535 if test -n "$cf_new_extra_cppflags" ; then
7537 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7538 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7542 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7543 # Filter out duplicates - this happens with badly-designed ".pc" files...
7544 for cf_add_1lib in $LIBS
7546 for cf_add_2lib in $cf_add_libs
7548 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7554 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7558 cat >conftest.$ac_ext <<_ACEOF
7559 #line 7559 "configure"
7560 #include "confdefs.h"
7561 #include <${cf_cv_ncurses_header:-curses.h}>
7565 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7570 rm -f conftest.$ac_objext conftest$ac_exeext
7571 if { (eval echo "$as_me:7571: \"$ac_link\"") >&5
7572 (eval $ac_link) 2>&5
7574 echo "$as_me:7574: \$? = $ac_status" >&5
7575 (exit $ac_status); } &&
7576 { ac_try='test -s conftest$ac_exeext'
7577 { (eval echo "$as_me:7577: \"$ac_try\"") >&5
7580 echo "$as_me:7580: \$? = $ac_status" >&5
7581 (exit $ac_status); }; }; then
7582 if test "$cross_compiling" = yes; then
7583 cf_have_ncuconfig=maybe
7585 cat >conftest.$ac_ext <<_ACEOF
7586 #line 7586 "configure"
7587 #include "confdefs.h"
7588 #include <${cf_cv_ncurses_header:-curses.h}>
7590 { char *xx = curses_version(); return (xx == 0); }
7592 rm -f conftest$ac_exeext
7593 if { (eval echo "$as_me:7593: \"$ac_link\"") >&5
7594 (eval $ac_link) 2>&5
7596 echo "$as_me:7596: \$? = $ac_status" >&5
7597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7598 { (eval echo "$as_me:7598: \"$ac_try\"") >&5
7601 echo "$as_me:7601: \$? = $ac_status" >&5
7602 (exit $ac_status); }; }; then
7603 cf_have_ncuconfig=yes
7605 echo "$as_me: program exited with status $ac_status" >&5
7606 echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 cf_have_ncuconfig=no
7610 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7613 echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 cf_have_ncuconfig=no
7617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7618 echo "$as_me:7618: result: $cf_have_ncuconfig" >&5
7619 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7620 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7621 if test "$cf_have_ncuconfig" != "yes"
7623 CPPFLAGS="$cf_save_CPPFLAGS"
7624 LIBS="$cf_save_LIBS"
7625 NCURSES_CONFIG_PKG=none
7628 cat >>confdefs.h <<\EOF
7632 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7634 echo "$as_me:7634: checking for terminfo header" >&5
7635 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7636 if test "${cf_cv_term_header+set}" = set; then
7637 echo $ECHO_N "(cached) $ECHO_C" >&6
7640 case ${cf_cv_ncurses_header} in
7641 (*/ncurses.h|*/ncursesw.h)
7642 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7645 cf_term_header=term.h
7649 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7651 cat >conftest.$ac_ext <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7655 #include <${cf_cv_ncurses_header:-curses.h}>
7661 int x = auto_left_margin
7666 rm -f conftest.$ac_objext
7667 if { (eval echo "$as_me:7667: \"$ac_compile\"") >&5
7668 (eval $ac_compile) 2>&5
7670 echo "$as_me:7670: \$? = $ac_status" >&5
7671 (exit $ac_status); } &&
7672 { ac_try='test -s conftest.$ac_objext'
7673 { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit $ac_status); }; }; then
7679 cf_cv_term_header="$cf_test"
7681 echo "$as_me: failed program was:" >&5
7682 cat conftest.$ac_ext >&5
7684 cf_cv_term_header=unknown
7687 rm -f conftest.$ac_objext conftest.$ac_ext
7688 test "$cf_cv_term_header" != unknown && break
7692 echo "$as_me:7692: result: $cf_cv_term_header" >&5
7693 echo "${ECHO_T}$cf_cv_term_header" >&6
7695 # Set definitions to allow ifdef'ing to accommodate subdirectories
7697 case $cf_cv_term_header in
7700 cat >>confdefs.h <<\EOF
7701 #define HAVE_TERM_H 1
7707 case $cf_cv_term_header in
7710 cat >>confdefs.h <<\EOF
7711 #define HAVE_NCURSES_TERM_H 1
7717 cat >>confdefs.h <<\EOF
7718 #define HAVE_NCURSESW_TERM_H 1
7727 echo "$as_me:7727: result: no" >&5
7728 echo "${ECHO_T}no" >&6
7729 NCURSES_CONFIG_PKG=none
7732 NCURSES_CONFIG_PKG=none
7735 if test "x$cf_have_ncuconfig" = "xno"; then
7736 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7738 if test -n "$ac_tool_prefix"; then
7739 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7741 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7742 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7743 echo "$as_me:7743: checking for $ac_word" >&5
7744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7745 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7746 echo $ECHO_N "(cached) $ECHO_C" >&6
7748 if test -n "$NCURSES_CONFIG"; then
7749 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7751 ac_save_IFS=$IFS; IFS=$ac_path_separator
7753 for ac_dir in $ac_dummy; do
7755 test -z "$ac_dir" && ac_dir=.
7756 $as_executable_p "$ac_dir/$ac_word" || continue
7757 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7758 echo "$as_me:7758: found $ac_dir/$ac_word" >&5
7764 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7765 if test -n "$NCURSES_CONFIG"; then
7766 echo "$as_me:7766: result: $NCURSES_CONFIG" >&5
7767 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7769 echo "$as_me:7769: result: no" >&5
7770 echo "${ECHO_T}no" >&6
7773 test -n "$NCURSES_CONFIG" && break
7776 if test -z "$NCURSES_CONFIG"; then
7777 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7778 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7780 # Extract the first word of "$ac_prog", so it can be a program name with args.
7781 set dummy $ac_prog; ac_word=$2
7782 echo "$as_me:7782: checking for $ac_word" >&5
7783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7784 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7785 echo $ECHO_N "(cached) $ECHO_C" >&6
7787 if test -n "$ac_ct_NCURSES_CONFIG"; then
7788 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7790 ac_save_IFS=$IFS; IFS=$ac_path_separator
7792 for ac_dir in $ac_dummy; do
7794 test -z "$ac_dir" && ac_dir=.
7795 $as_executable_p "$ac_dir/$ac_word" || continue
7796 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7797 echo "$as_me:7797: found $ac_dir/$ac_word" >&5
7803 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7804 if test -n "$ac_ct_NCURSES_CONFIG"; then
7805 echo "$as_me:7805: result: $ac_ct_NCURSES_CONFIG" >&5
7806 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7808 echo "$as_me:7808: result: no" >&5
7809 echo "${ECHO_T}no" >&6
7812 test -n "$ac_ct_NCURSES_CONFIG" && break
7814 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7816 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7819 if test "$NCURSES_CONFIG" != none ; then
7824 cf_new_extra_cppflags=
7826 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7828 case $cf_fix_cppflags in
7830 case $cf_add_cflags in
7831 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7832 case $cf_add_cflags in
7834 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7836 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7837 && test -z "${cf_tst_cflags}" \
7838 && cf_fix_cppflags=yes
7840 if test $cf_fix_cppflags = yes ; then
7842 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7843 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7846 elif test "${cf_tst_cflags}" = "\"'" ; then
7848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7859 case $cf_add_cflags in
7861 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7863 CPPFLAGS=`echo "$CPPFLAGS" | \
7864 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7865 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7870 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7871 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7878 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7879 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7886 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7887 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7889 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7891 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7892 && test -z "${cf_tst_cflags}" \
7893 && cf_fix_cppflags=no
7898 if test -n "$cf_new_cflags" ; then
7900 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7901 CFLAGS="${CFLAGS}$cf_new_cflags"
7905 if test -n "$cf_new_cppflags" ; then
7907 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7908 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7912 if test -n "$cf_new_extra_cppflags" ; then
7914 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7915 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7919 cf_add_libs="`$NCURSES_CONFIG --libs`"
7920 # Filter out duplicates - this happens with badly-designed ".pc" files...
7921 for cf_add_1lib in $LIBS
7923 for cf_add_2lib in $cf_add_libs
7925 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7931 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7935 # even with config script, some packages use no-override for curses.h
7937 echo "$as_me:7937: checking if we have identified curses headers" >&5
7938 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7939 if test "${cf_cv_ncurses_header+set}" = set; then
7940 echo $ECHO_N "(cached) $ECHO_C" >&6
7943 cf_cv_ncurses_header=none
7945 ncurses.h $cf_cv_screen/ncurses.h \
7946 curses.h $cf_cv_screen/curses.h
7948 cat >conftest.$ac_ext <<_ACEOF
7949 #line 7949 "configure"
7950 #include "confdefs.h"
7951 #include <${cf_header}>
7955 initscr(); tgoto("?", 0,0)
7960 rm -f conftest.$ac_objext
7961 if { (eval echo "$as_me:7961: \"$ac_compile\"") >&5
7962 (eval $ac_compile) 2>&5
7964 echo "$as_me:7964: \$? = $ac_status" >&5
7965 (exit $ac_status); } &&
7966 { ac_try='test -s conftest.$ac_objext'
7967 { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7970 echo "$as_me:7970: \$? = $ac_status" >&5
7971 (exit $ac_status); }; }; then
7972 cf_cv_ncurses_header=$cf_header; break
7974 echo "$as_me: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7977 rm -f conftest.$ac_objext conftest.$ac_ext
7981 echo "$as_me:7981: result: $cf_cv_ncurses_header" >&5
7982 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7984 if test "$cf_cv_ncurses_header" = none ; then
7985 { { echo "$as_me:7985: error: No curses header-files found" >&5
7986 echo "$as_me: error: No curses header-files found" >&2;}
7987 { (exit 1); exit 1; }; }
7990 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7992 for ac_header in $cf_cv_ncurses_header
7994 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7995 echo "$as_me:7995: checking for $ac_header" >&5
7996 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7997 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7998 echo $ECHO_N "(cached) $ECHO_C" >&6
8000 cat >conftest.$ac_ext <<_ACEOF
8001 #line 8001 "configure"
8002 #include "confdefs.h"
8003 #include <$ac_header>
8005 if { (eval echo "$as_me:8005: \"$ac_cpp conftest.$ac_ext\"") >&5
8006 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8008 egrep -v '^ *\+' conftest.er1 >conftest.err
8010 cat conftest.err >&5
8011 echo "$as_me:8011: \$? = $ac_status" >&5
8012 (exit $ac_status); } >/dev/null; then
8013 if test -s conftest.err; then
8014 ac_cpp_err=$ac_c_preproc_warn_flag
8021 if test -z "$ac_cpp_err"; then
8022 eval "$as_ac_Header=yes"
8024 echo "$as_me: failed program was:" >&5
8025 cat conftest.$ac_ext >&5
8026 eval "$as_ac_Header=no"
8028 rm -f conftest.err conftest.$ac_ext
8030 echo "$as_me:8030: result: `eval echo '${'$as_ac_Header'}'`" >&5
8031 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8032 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8033 cat >>confdefs.h <<EOF
8034 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8040 cat >>confdefs.h <<\EOF
8044 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8046 cat >>confdefs.h <<EOF
8047 #define $cf_nculib_ROOT 1
8050 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8054 cf_ncuhdr_root=$cf_cv_screen
8056 test -n "$cf_cv_curses_dir" && \
8057 test "$cf_cv_curses_dir" != "no" && { \
8059 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8060 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8062 while test $cf_add_incdir != /usr/include
8064 if test -d $cf_add_incdir
8067 if test -n "$CFLAGS$CPPFLAGS" ; then
8068 # a loop is needed to ensure we can add subdirs of existing dirs
8069 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8070 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8071 cf_have_incdir=yes; break
8076 if test "$cf_have_incdir" = no ; then
8077 if test "$cf_add_incdir" = /usr/local/include ; then
8078 if test "$GCC" = yes
8080 cf_save_CPPFLAGS=$CPPFLAGS
8082 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8083 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8085 cat >conftest.$ac_ext <<_ACEOF
8086 #line 8086 "configure"
8087 #include "confdefs.h"
8097 rm -f conftest.$ac_objext
8098 if { (eval echo "$as_me:8098: \"$ac_compile\"") >&5
8099 (eval $ac_compile) 2>&5
8101 echo "$as_me:8101: \$? = $ac_status" >&5
8102 (exit $ac_status); } &&
8103 { ac_try='test -s conftest.$ac_objext'
8104 { (eval echo "$as_me:8104: \"$ac_try\"") >&5
8107 echo "$as_me:8107: \$? = $ac_status" >&5
8108 (exit $ac_status); }; }; then
8111 echo "$as_me: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8115 rm -f conftest.$ac_objext conftest.$ac_ext
8116 CPPFLAGS=$cf_save_CPPFLAGS
8121 if test "$cf_have_incdir" = no ; then
8122 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8124 echo "${as_me:-configure}:8124: testing adding $cf_add_incdir to include-path ..." 1>&5
8126 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8128 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8129 test "$cf_top_incdir" = "$cf_add_incdir" && break
8130 cf_add_incdir="$cf_top_incdir"
8143 echo "$as_me:8143: checking for $cf_ncuhdr_root header in include-path" >&5
8144 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8145 if test "${cf_cv_ncurses_h+set}" = set; then
8146 echo $ECHO_N "(cached) $ECHO_C" >&6
8149 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8150 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8151 for cf_header in $cf_header_list
8154 cat >conftest.$ac_ext <<_ACEOF
8155 #line 8155 "configure"
8156 #include "confdefs.h"
8158 #include <$cf_header>
8163 #ifdef NCURSES_VERSION
8165 printf("%s\n", NCURSES_VERSION);
8178 rm -f conftest.$ac_objext
8179 if { (eval echo "$as_me:8179: \"$ac_compile\"") >&5
8180 (eval $ac_compile) 2>&5
8182 echo "$as_me:8182: \$? = $ac_status" >&5
8183 (exit $ac_status); } &&
8184 { ac_try='test -s conftest.$ac_objext'
8185 { (eval echo "$as_me:8185: \"$ac_try\"") >&5
8188 echo "$as_me:8188: \$? = $ac_status" >&5
8189 (exit $ac_status); }; }; then
8190 cf_cv_ncurses_h=$cf_header
8193 echo "$as_me: failed program was:" >&5
8194 cat conftest.$ac_ext >&5
8197 rm -f conftest.$ac_objext conftest.$ac_ext
8199 test "$cf_cv_ncurses_h" != no && break
8203 echo "$as_me:8203: result: $cf_cv_ncurses_h" >&5
8204 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8206 if test "$cf_cv_ncurses_h" != no ; then
8207 cf_cv_ncurses_header=$cf_cv_ncurses_h
8210 echo "$as_me:8210: checking for $cf_ncuhdr_root include-path" >&5
8211 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8212 if test "${cf_cv_ncurses_h2+set}" = set; then
8213 echo $ECHO_N "(cached) $ECHO_C" >&6
8216 test -n "$verbose" && echo
8220 # collect the current set of include-directories from compiler flags
8221 cf_header_path_list=""
8222 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8223 for cf_header_path in $CPPFLAGS $CFLAGS
8225 case $cf_header_path in
8227 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8229 test "x$cf_header_path" != "xNONE" && \
8230 test -d "$cf_header_path" && \
8232 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8233 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8234 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8235 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8236 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8237 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"
8240 cf_header_path_list="$cf_header_path_list $cf_search"
8246 # add the variations for the package we are looking for
8250 test "x$prefix" != "xNONE" && \
8251 test -d "$prefix" && \
8253 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8254 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8255 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8256 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8257 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8258 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8261 for cf_subdir_prefix in \
8270 test "x$cf_subdir_prefix" != "x$prefix" && \
8271 test -d "$cf_subdir_prefix" && \
8272 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8273 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8274 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8275 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8276 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8277 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8278 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"
8283 test "$includedir" != NONE && \
8284 test "$includedir" != "/usr/include" && \
8285 test -d "$includedir" && {
8286 test -d $includedir && cf_search="$cf_search $includedir"
8287 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8290 test "$oldincludedir" != NONE && \
8291 test "$oldincludedir" != "/usr/include" && \
8292 test -d "$oldincludedir" && {
8293 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8294 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8297 cf_search="$cf_search $cf_header_path_list"
8299 test -n "$verbose" && echo search path $cf_search
8300 cf_save2_CPPFLAGS="$CPPFLAGS"
8301 for cf_incdir in $cf_search
8304 if test -n "$cf_incdir" ; then
8305 for cf_add_incdir in $cf_incdir
8307 while test $cf_add_incdir != /usr/include
8309 if test -d $cf_add_incdir
8312 if test -n "$CFLAGS$CPPFLAGS" ; then
8313 # a loop is needed to ensure we can add subdirs of existing dirs
8314 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8315 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8316 cf_have_incdir=yes; break
8321 if test "$cf_have_incdir" = no ; then
8322 if test "$cf_add_incdir" = /usr/local/include ; then
8323 if test "$GCC" = yes
8325 cf_save_CPPFLAGS=$CPPFLAGS
8327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8328 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8330 cat >conftest.$ac_ext <<_ACEOF
8331 #line 8331 "configure"
8332 #include "confdefs.h"
8342 rm -f conftest.$ac_objext
8343 if { (eval echo "$as_me:8343: \"$ac_compile\"") >&5
8344 (eval $ac_compile) 2>&5
8346 echo "$as_me:8346: \$? = $ac_status" >&5
8347 (exit $ac_status); } &&
8348 { ac_try='test -s conftest.$ac_objext'
8349 { (eval echo "$as_me:8349: \"$ac_try\"") >&5
8352 echo "$as_me:8352: \$? = $ac_status" >&5
8353 (exit $ac_status); }; }; then
8356 echo "$as_me: failed program was:" >&5
8357 cat conftest.$ac_ext >&5
8360 rm -f conftest.$ac_objext conftest.$ac_ext
8361 CPPFLAGS=$cf_save_CPPFLAGS
8366 if test "$cf_have_incdir" = no ; then
8367 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8369 echo "${as_me:-configure}:8369: testing adding $cf_add_incdir to include-path ..." 1>&5
8371 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8373 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8374 test "$cf_top_incdir" = "$cf_add_incdir" && break
8375 cf_add_incdir="$cf_top_incdir"
8391 cat >conftest.$ac_ext <<_ACEOF
8392 #line 8392 "configure"
8393 #include "confdefs.h"
8395 #include <$cf_header>
8400 #ifdef NCURSES_VERSION
8402 printf("%s\n", NCURSES_VERSION);
8415 rm -f conftest.$ac_objext
8416 if { (eval echo "$as_me:8416: \"$ac_compile\"") >&5
8417 (eval $ac_compile) 2>&5
8419 echo "$as_me:8419: \$? = $ac_status" >&5
8420 (exit $ac_status); } &&
8421 { ac_try='test -s conftest.$ac_objext'
8422 { (eval echo "$as_me:8422: \"$ac_try\"") >&5
8425 echo "$as_me:8425: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
8427 cf_cv_ncurses_h2=$cf_header
8430 echo "$as_me: failed program was:" >&5
8431 cat conftest.$ac_ext >&5
8434 rm -f conftest.$ac_objext conftest.$ac_ext
8436 if test "$cf_cv_ncurses_h2" != no ; then
8437 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8438 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8441 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8443 CPPFLAGS="$cf_save2_CPPFLAGS"
8444 test "$cf_cv_ncurses_h2" != no && break
8446 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8446: error: not found" >&5
8447 echo "$as_me: error: not found" >&2;}
8448 { (exit 1); exit 1; }; }
8451 echo "$as_me:8451: result: $cf_cv_ncurses_h2" >&5
8452 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8454 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8455 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8456 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8457 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8460 if test -n "$cf_1st_incdir" ; then
8461 for cf_add_incdir in $cf_1st_incdir
8463 while test $cf_add_incdir != /usr/include
8465 if test -d $cf_add_incdir
8468 if test -n "$CFLAGS$CPPFLAGS" ; then
8469 # a loop is needed to ensure we can add subdirs of existing dirs
8470 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8471 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8472 cf_have_incdir=yes; break
8477 if test "$cf_have_incdir" = no ; then
8478 if test "$cf_add_incdir" = /usr/local/include ; then
8479 if test "$GCC" = yes
8481 cf_save_CPPFLAGS=$CPPFLAGS
8483 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8484 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8486 cat >conftest.$ac_ext <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8498 rm -f conftest.$ac_objext
8499 if { (eval echo "$as_me:8499: \"$ac_compile\"") >&5
8500 (eval $ac_compile) 2>&5
8502 echo "$as_me:8502: \$? = $ac_status" >&5
8503 (exit $ac_status); } &&
8504 { ac_try='test -s conftest.$ac_objext'
8505 { (eval echo "$as_me:8505: \"$ac_try\"") >&5
8508 echo "$as_me:8508: \$? = $ac_status" >&5
8509 (exit $ac_status); }; }; then
8512 echo "$as_me: failed program was:" >&5
8513 cat conftest.$ac_ext >&5
8516 rm -f conftest.$ac_objext conftest.$ac_ext
8517 CPPFLAGS=$cf_save_CPPFLAGS
8522 if test "$cf_have_incdir" = no ; then
8523 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8525 echo "${as_me:-configure}:8525: testing adding $cf_add_incdir to include-path ..." 1>&5
8527 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8529 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8530 test "$cf_top_incdir" = "$cf_add_incdir" && break
8531 cf_add_incdir="$cf_top_incdir"
8544 # Set definitions to allow ifdef'ing for ncurses.h
8546 case $cf_cv_ncurses_header in
8549 cat >>confdefs.h <<\EOF
8550 #define HAVE_NCURSES_H 1
8556 case $cf_cv_ncurses_header in
8557 (ncurses/curses.h|ncurses/ncurses.h)
8559 cat >>confdefs.h <<\EOF
8560 #define HAVE_NCURSES_NCURSES_H 1
8564 (ncursesw/curses.h|ncursesw/ncurses.h)
8566 cat >>confdefs.h <<\EOF
8567 #define HAVE_NCURSESW_NCURSES_H 1
8573 echo "$as_me:8573: checking for terminfo header" >&5
8574 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8575 if test "${cf_cv_term_header+set}" = set; then
8576 echo $ECHO_N "(cached) $ECHO_C" >&6
8579 case ${cf_cv_ncurses_header} in
8580 (*/ncurses.h|*/ncursesw.h)
8581 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8584 cf_term_header=term.h
8588 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8590 cat >conftest.$ac_ext <<_ACEOF
8591 #line 8591 "configure"
8592 #include "confdefs.h"
8594 #include <${cf_cv_ncurses_header:-curses.h}>
8600 int x = auto_left_margin
8605 rm -f conftest.$ac_objext
8606 if { (eval echo "$as_me:8606: \"$ac_compile\"") >&5
8607 (eval $ac_compile) 2>&5
8609 echo "$as_me:8609: \$? = $ac_status" >&5
8610 (exit $ac_status); } &&
8611 { ac_try='test -s conftest.$ac_objext'
8612 { (eval echo "$as_me:8612: \"$ac_try\"") >&5
8615 echo "$as_me:8615: \$? = $ac_status" >&5
8616 (exit $ac_status); }; }; then
8618 cf_cv_term_header="$cf_test"
8620 echo "$as_me: failed program was:" >&5
8621 cat conftest.$ac_ext >&5
8623 cf_cv_term_header=unknown
8626 rm -f conftest.$ac_objext conftest.$ac_ext
8627 test "$cf_cv_term_header" != unknown && break
8631 echo "$as_me:8631: result: $cf_cv_term_header" >&5
8632 echo "${ECHO_T}$cf_cv_term_header" >&6
8634 # Set definitions to allow ifdef'ing to accommodate subdirectories
8636 case $cf_cv_term_header in
8639 cat >>confdefs.h <<\EOF
8640 #define HAVE_TERM_H 1
8646 case $cf_cv_term_header in
8649 cat >>confdefs.h <<\EOF
8650 #define HAVE_NCURSES_TERM_H 1
8656 cat >>confdefs.h <<\EOF
8657 #define HAVE_NCURSESW_TERM_H 1
8663 # some applications need this, but should check for NCURSES_VERSION
8665 cat >>confdefs.h <<\EOF
8669 echo "$as_me:8669: checking for ncurses version" >&5
8670 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8671 if test "${cf_cv_ncurses_version+set}" = set; then
8672 echo $ECHO_N "(cached) $ECHO_C" >&6
8675 cf_cv_ncurses_version=no
8678 if test "$cross_compiling" = yes; then
8680 # This will not work if the preprocessor splits the line after the
8681 # Autoconf token. The 'unproto' program does that.
8682 cat > conftest.$ac_ext <<EOF
8683 #include <${cf_cv_ncurses_header:-curses.h}>
8685 #ifdef NCURSES_VERSION
8686 Autoconf NCURSES_VERSION
8694 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8695 { (eval echo "$as_me:8695: \"$cf_try\"") >&5
8698 echo "$as_me:8698: \$? = $ac_status" >&5
8699 (exit $ac_status); }
8700 if test -f conftest.out ; then
8701 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8702 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8707 cat >conftest.$ac_ext <<_ACEOF
8708 #line 8708 "configure"
8709 #include "confdefs.h"
8711 #include <${cf_cv_ncurses_header:-curses.h}>
8715 FILE *fp = fopen("$cf_tempfile", "w");
8716 #ifdef NCURSES_VERSION
8717 # ifdef NCURSES_VERSION_PATCH
8718 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8720 fprintf(fp, "%s\n", NCURSES_VERSION);
8724 fprintf(fp, "old\n");
8729 ${cf_cv_main_return:-return}(0);
8732 rm -f conftest$ac_exeext
8733 if { (eval echo "$as_me:8733: \"$ac_link\"") >&5
8734 (eval $ac_link) 2>&5
8736 echo "$as_me:8736: \$? = $ac_status" >&5
8737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8738 { (eval echo "$as_me:8738: \"$ac_try\"") >&5
8741 echo "$as_me:8741: \$? = $ac_status" >&5
8742 (exit $ac_status); }; }; then
8744 cf_cv_ncurses_version=`cat $cf_tempfile`
8746 echo "$as_me: program exited with status $ac_status" >&5
8747 echo "$as_me: failed program was:" >&5
8748 cat conftest.$ac_ext >&5
8750 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8755 echo "$as_me:8755: result: $cf_cv_ncurses_version" >&5
8756 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8757 test "$cf_cv_ncurses_version" = no ||
8758 cat >>confdefs.h <<\EOF
8762 cf_nculib_root=$cf_cv_screen
8763 # This works, except for the special case where we find gpm, but
8764 # ncurses is in a nonstandard location via $LIBS, and we really want
8767 cf_ncurses_SAVE="$LIBS"
8768 echo "$as_me:8768: checking for Gpm_Open in -lgpm" >&5
8769 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8770 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8771 echo $ECHO_N "(cached) $ECHO_C" >&6
8773 ac_check_lib_save_LIBS=$LIBS
8775 cat >conftest.$ac_ext <<_ACEOF
8776 #line 8776 "configure"
8777 #include "confdefs.h"
8779 /* Override any gcc2 internal prototype to avoid an error. */
8783 /* We use char because int might match the return type of a gcc2
8784 builtin and then its argument prototype would still apply. */
8794 rm -f conftest.$ac_objext conftest$ac_exeext
8795 if { (eval echo "$as_me:8795: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest$ac_exeext'
8801 { (eval echo "$as_me:8801: \"$ac_try\"") >&5
8804 echo "$as_me:8804: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_cv_lib_gpm_Gpm_Open=yes
8808 echo "$as_me: failed program was:" >&5
8809 cat conftest.$ac_ext >&5
8810 ac_cv_lib_gpm_Gpm_Open=no
8812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8813 LIBS=$ac_check_lib_save_LIBS
8815 echo "$as_me:8815: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8816 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8817 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8818 echo "$as_me:8818: checking for initscr in -lgpm" >&5
8819 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8820 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8821 echo $ECHO_N "(cached) $ECHO_C" >&6
8823 ac_check_lib_save_LIBS=$LIBS
8825 cat >conftest.$ac_ext <<_ACEOF
8826 #line 8826 "configure"
8827 #include "confdefs.h"
8829 /* Override any gcc2 internal prototype to avoid an error. */
8833 /* We use char because int might match the return type of a gcc2
8834 builtin and then its argument prototype would still apply. */
8844 rm -f conftest.$ac_objext conftest$ac_exeext
8845 if { (eval echo "$as_me:8845: \"$ac_link\"") >&5
8846 (eval $ac_link) 2>&5
8848 echo "$as_me:8848: \$? = $ac_status" >&5
8849 (exit $ac_status); } &&
8850 { ac_try='test -s conftest$ac_exeext'
8851 { (eval echo "$as_me:8851: \"$ac_try\"") >&5
8854 echo "$as_me:8854: \$? = $ac_status" >&5
8855 (exit $ac_status); }; }; then
8856 ac_cv_lib_gpm_initscr=yes
8858 echo "$as_me: failed program was:" >&5
8859 cat conftest.$ac_ext >&5
8860 ac_cv_lib_gpm_initscr=no
8862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8863 LIBS=$ac_check_lib_save_LIBS
8865 echo "$as_me:8865: result: $ac_cv_lib_gpm_initscr" >&5
8866 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8867 if test $ac_cv_lib_gpm_initscr = yes; then
8868 LIBS="$cf_ncurses_SAVE"
8870 cf_ncurses_LIBS="-lgpm"
8877 # This is only necessary if you are linking against an obsolete
8878 # version of ncurses (but it should do no harm, since it's static).
8879 if test "$cf_nculib_root" = ncurses ; then
8880 echo "$as_me:8880: checking for tgoto in -lmytinfo" >&5
8881 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8882 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8883 echo $ECHO_N "(cached) $ECHO_C" >&6
8885 ac_check_lib_save_LIBS=$LIBS
8886 LIBS="-lmytinfo $LIBS"
8887 cat >conftest.$ac_ext <<_ACEOF
8888 #line 8888 "configure"
8889 #include "confdefs.h"
8891 /* Override any gcc2 internal prototype to avoid an error. */
8895 /* We use char because int might match the return type of a gcc2
8896 builtin and then its argument prototype would still apply. */
8906 rm -f conftest.$ac_objext conftest$ac_exeext
8907 if { (eval echo "$as_me:8907: \"$ac_link\"") >&5
8908 (eval $ac_link) 2>&5
8910 echo "$as_me:8910: \$? = $ac_status" >&5
8911 (exit $ac_status); } &&
8912 { ac_try='test -s conftest$ac_exeext'
8913 { (eval echo "$as_me:8913: \"$ac_try\"") >&5
8916 echo "$as_me:8916: \$? = $ac_status" >&5
8917 (exit $ac_status); }; }; then
8918 ac_cv_lib_mytinfo_tgoto=yes
8920 echo "$as_me: failed program was:" >&5
8921 cat conftest.$ac_ext >&5
8922 ac_cv_lib_mytinfo_tgoto=no
8924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8925 LIBS=$ac_check_lib_save_LIBS
8927 echo "$as_me:8927: result: $ac_cv_lib_mytinfo_tgoto" >&5
8928 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8929 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8930 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8937 cf_add_libs="$cf_ncurses_LIBS"
8938 # Filter out duplicates - this happens with badly-designed ".pc" files...
8939 for cf_add_1lib in $LIBS
8941 for cf_add_2lib in $cf_add_libs
8943 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8949 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8953 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8956 cf_add_libs="-l$cf_nculib_root"
8957 # Filter out duplicates - this happens with badly-designed ".pc" files...
8958 for cf_add_1lib in $LIBS
8960 for cf_add_2lib in $cf_add_libs
8962 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8968 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8974 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8976 echo "$as_me:8976: checking for initscr" >&5
8977 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8978 if test "${ac_cv_func_initscr+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
8981 cat >conftest.$ac_ext <<_ACEOF
8982 #line 8982 "configure"
8983 #include "confdefs.h"
8984 #define initscr autoconf_temporary
8985 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8992 /* We use char because int might match the return type of a gcc2
8993 builtin and then its argument prototype would still apply. */
8994 char initscr (void);
9000 /* The GNU C library defines stubs for functions which it implements
9001 to always fail with ENOSYS. Some functions are actually named
9002 something starting with __ and the normal name is an alias. */
9003 #if defined (__stub_initscr) || defined (__stub___initscr)
9004 #error found stub for initscr
9012 rm -f conftest.$ac_objext conftest$ac_exeext
9013 if { (eval echo "$as_me:9013: \"$ac_link\"") >&5
9014 (eval $ac_link) 2>&5
9016 echo "$as_me:9016: \$? = $ac_status" >&5
9017 (exit $ac_status); } &&
9018 { ac_try='test -s conftest$ac_exeext'
9019 { (eval echo "$as_me:9019: \"$ac_try\"") >&5
9022 echo "$as_me:9022: \$? = $ac_status" >&5
9023 (exit $ac_status); }; }; then
9024 ac_cv_func_initscr=yes
9026 echo "$as_me: failed program was:" >&5
9027 cat conftest.$ac_ext >&5
9028 ac_cv_func_initscr=no
9030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9032 echo "$as_me:9032: result: $ac_cv_func_initscr" >&5
9033 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9034 if test $ac_cv_func_initscr = yes; then
9035 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9038 cf_save_LIBS="$LIBS"
9039 echo "$as_me:9039: checking for initscr in -l$cf_nculib_root" >&5
9040 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9041 LIBS="-l$cf_nculib_root $LIBS"
9042 cat >conftest.$ac_ext <<_ACEOF
9043 #line 9043 "configure"
9044 #include "confdefs.h"
9045 #include <${cf_cv_ncurses_header:-curses.h}>
9054 rm -f conftest.$ac_objext conftest$ac_exeext
9055 if { (eval echo "$as_me:9055: \"$ac_link\"") >&5
9056 (eval $ac_link) 2>&5
9058 echo "$as_me:9058: \$? = $ac_status" >&5
9059 (exit $ac_status); } &&
9060 { ac_try='test -s conftest$ac_exeext'
9061 { (eval echo "$as_me:9061: \"$ac_try\"") >&5
9064 echo "$as_me:9064: \$? = $ac_status" >&5
9065 (exit $ac_status); }; }; then
9066 echo "$as_me:9066: result: yes" >&5
9067 echo "${ECHO_T}yes" >&6
9068 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9071 echo "$as_me: failed program was:" >&5
9072 cat conftest.$ac_ext >&5
9073 echo "$as_me:9073: result: no" >&5
9074 echo "${ECHO_T}no" >&6
9077 cf_library_path_list=""
9078 if test -n "${LDFLAGS}${LIBS}" ; then
9079 for cf_library_path in $LDFLAGS $LIBS
9081 case $cf_library_path in
9083 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9085 test "x$cf_library_path" != "xNONE" && \
9086 test -d "$cf_library_path" && \
9088 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9089 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9090 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9091 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9092 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9093 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"
9096 cf_library_path_list="$cf_library_path_list $cf_search"
9104 test "x$prefix" != "xNONE" && \
9105 test -d "$prefix" && \
9107 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9108 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9109 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9110 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9111 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9112 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9115 for cf_subdir_prefix in \
9124 test "x$cf_subdir_prefix" != "x$prefix" && \
9125 test -d "$cf_subdir_prefix" && \
9126 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9127 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9128 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9129 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9130 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9131 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9132 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"
9137 cf_search="$cf_library_path_list $cf_search"
9139 for cf_libdir in $cf_search
9141 echo "$as_me:9141: checking for -l$cf_nculib_root in $cf_libdir" >&5
9142 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9143 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9144 cat >conftest.$ac_ext <<_ACEOF
9145 #line 9145 "configure"
9146 #include "confdefs.h"
9147 #include <${cf_cv_ncurses_header:-curses.h}>
9156 rm -f conftest.$ac_objext conftest$ac_exeext
9157 if { (eval echo "$as_me:9157: \"$ac_link\"") >&5
9158 (eval $ac_link) 2>&5
9160 echo "$as_me:9160: \$? = $ac_status" >&5
9161 (exit $ac_status); } &&
9162 { ac_try='test -s conftest$ac_exeext'
9163 { (eval echo "$as_me:9163: \"$ac_try\"") >&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit $ac_status); }; }; then
9168 echo "$as_me:9168: result: yes" >&5
9169 echo "${ECHO_T}yes" >&6
9170 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9173 echo "$as_me: failed program was:" >&5
9174 cat conftest.$ac_ext >&5
9175 echo "$as_me:9175: result: no" >&5
9176 echo "${ECHO_T}no" >&6
9177 LIBS="$cf_save_LIBS"
9179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9187 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9189 if test $cf_found_library = no ; then
9190 { { echo "$as_me:9190: error: Cannot link $cf_nculib_root library" >&5
9191 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9192 { (exit 1); exit 1; }; }
9197 if test -n "$cf_ncurses_LIBS" ; then
9198 echo "$as_me:9198: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9199 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9200 cf_ncurses_SAVE="$LIBS"
9201 for p in $cf_ncurses_LIBS ; do
9202 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9203 if test "$q" != "$LIBS" ; then
9207 cat >conftest.$ac_ext <<_ACEOF
9208 #line 9208 "configure"
9209 #include "confdefs.h"
9210 #include <${cf_cv_ncurses_header:-curses.h}>
9214 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9219 rm -f conftest.$ac_objext conftest$ac_exeext
9220 if { (eval echo "$as_me:9220: \"$ac_link\"") >&5
9221 (eval $ac_link) 2>&5
9223 echo "$as_me:9223: \$? = $ac_status" >&5
9224 (exit $ac_status); } &&
9225 { ac_try='test -s conftest$ac_exeext'
9226 { (eval echo "$as_me:9226: \"$ac_try\"") >&5
9229 echo "$as_me:9229: \$? = $ac_status" >&5
9230 (exit $ac_status); }; }; then
9231 echo "$as_me:9231: result: yes" >&5
9232 echo "${ECHO_T}yes" >&6
9234 echo "$as_me: failed program was:" >&5
9235 cat conftest.$ac_ext >&5
9236 echo "$as_me:9236: result: no" >&5
9237 echo "${ECHO_T}no" >&6
9238 LIBS="$cf_ncurses_SAVE"
9240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9243 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9245 cat >>confdefs.h <<EOF
9246 #define $cf_nculib_ROOT 1
9257 cf_ncuconfig_root=$cf_cv_screen
9258 cf_have_ncuconfig=no
9260 if test "x${PKG_CONFIG:=none}" != xnone; then
9261 echo "$as_me:9261: checking pkg-config for $cf_ncuconfig_root" >&5
9262 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9263 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9264 echo "$as_me:9264: result: yes" >&5
9265 echo "${ECHO_T}yes" >&6
9267 echo "$as_me:9267: checking if the $cf_ncuconfig_root package files work" >&5
9268 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9269 cf_have_ncuconfig=unknown
9271 cf_save_CPPFLAGS="$CPPFLAGS"
9272 cf_save_LIBS="$LIBS"
9277 cf_new_extra_cppflags=
9279 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9281 case $cf_fix_cppflags in
9283 case $cf_add_cflags in
9284 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9285 case $cf_add_cflags in
9287 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9289 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9290 && test -z "${cf_tst_cflags}" \
9291 && cf_fix_cppflags=yes
9293 if test $cf_fix_cppflags = yes ; then
9295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9299 elif test "${cf_tst_cflags}" = "\"'" ; then
9301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9312 case $cf_add_cflags in
9314 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9316 CPPFLAGS=`echo "$CPPFLAGS" | \
9317 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9318 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9323 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9324 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9331 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9332 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9339 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9340 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9342 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9344 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9345 && test -z "${cf_tst_cflags}" \
9346 && cf_fix_cppflags=no
9351 if test -n "$cf_new_cflags" ; then
9353 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9354 CFLAGS="${CFLAGS}$cf_new_cflags"
9358 if test -n "$cf_new_cppflags" ; then
9360 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9361 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9365 if test -n "$cf_new_extra_cppflags" ; then
9367 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9368 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9372 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9373 # Filter out duplicates - this happens with badly-designed ".pc" files...
9374 for cf_add_1lib in $LIBS
9376 for cf_add_2lib in $cf_add_libs
9378 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9384 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9388 cat >conftest.$ac_ext <<_ACEOF
9389 #line 9389 "configure"
9390 #include "confdefs.h"
9391 #include <${cf_cv_ncurses_header:-curses.h}>
9395 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9400 rm -f conftest.$ac_objext conftest$ac_exeext
9401 if { (eval echo "$as_me:9401: \"$ac_link\"") >&5
9402 (eval $ac_link) 2>&5
9404 echo "$as_me:9404: \$? = $ac_status" >&5
9405 (exit $ac_status); } &&
9406 { ac_try='test -s conftest$ac_exeext'
9407 { (eval echo "$as_me:9407: \"$ac_try\"") >&5
9410 echo "$as_me:9410: \$? = $ac_status" >&5
9411 (exit $ac_status); }; }; then
9412 if test "$cross_compiling" = yes; then
9413 cf_have_ncuconfig=maybe
9415 cat >conftest.$ac_ext <<_ACEOF
9416 #line 9416 "configure"
9417 #include "confdefs.h"
9418 #include <${cf_cv_ncurses_header:-curses.h}>
9420 { char *xx = curses_version(); return (xx == 0); }
9422 rm -f conftest$ac_exeext
9423 if { (eval echo "$as_me:9423: \"$ac_link\"") >&5
9424 (eval $ac_link) 2>&5
9426 echo "$as_me:9426: \$? = $ac_status" >&5
9427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9428 { (eval echo "$as_me:9428: \"$ac_try\"") >&5
9431 echo "$as_me:9431: \$? = $ac_status" >&5
9432 (exit $ac_status); }; }; then
9433 cf_have_ncuconfig=yes
9435 echo "$as_me: program exited with status $ac_status" >&5
9436 echo "$as_me: failed program was:" >&5
9437 cat conftest.$ac_ext >&5
9438 cf_have_ncuconfig=no
9440 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9443 echo "$as_me: failed program was:" >&5
9444 cat conftest.$ac_ext >&5
9445 cf_have_ncuconfig=no
9447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9448 echo "$as_me:9448: result: $cf_have_ncuconfig" >&5
9449 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9450 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9451 if test "$cf_have_ncuconfig" != "yes"
9453 CPPFLAGS="$cf_save_CPPFLAGS"
9454 LIBS="$cf_save_LIBS"
9455 NCURSES_CONFIG_PKG=none
9458 cat >>confdefs.h <<\EOF
9462 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9464 echo "$as_me:9464: checking for terminfo header" >&5
9465 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9466 if test "${cf_cv_term_header+set}" = set; then
9467 echo $ECHO_N "(cached) $ECHO_C" >&6
9470 case ${cf_cv_ncurses_header} in
9471 (*/ncurses.h|*/ncursesw.h)
9472 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9475 cf_term_header=term.h
9479 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9481 cat >conftest.$ac_ext <<_ACEOF
9482 #line 9482 "configure"
9483 #include "confdefs.h"
9485 #include <${cf_cv_ncurses_header:-curses.h}>
9491 int x = auto_left_margin
9496 rm -f conftest.$ac_objext
9497 if { (eval echo "$as_me:9497: \"$ac_compile\"") >&5
9498 (eval $ac_compile) 2>&5
9500 echo "$as_me:9500: \$? = $ac_status" >&5
9501 (exit $ac_status); } &&
9502 { ac_try='test -s conftest.$ac_objext'
9503 { (eval echo "$as_me:9503: \"$ac_try\"") >&5
9506 echo "$as_me:9506: \$? = $ac_status" >&5
9507 (exit $ac_status); }; }; then
9509 cf_cv_term_header="$cf_test"
9511 echo "$as_me: failed program was:" >&5
9512 cat conftest.$ac_ext >&5
9514 cf_cv_term_header=unknown
9517 rm -f conftest.$ac_objext conftest.$ac_ext
9518 test "$cf_cv_term_header" != unknown && break
9522 echo "$as_me:9522: result: $cf_cv_term_header" >&5
9523 echo "${ECHO_T}$cf_cv_term_header" >&6
9525 # Set definitions to allow ifdef'ing to accommodate subdirectories
9527 case $cf_cv_term_header in
9530 cat >>confdefs.h <<\EOF
9531 #define HAVE_TERM_H 1
9537 case $cf_cv_term_header in
9540 cat >>confdefs.h <<\EOF
9541 #define HAVE_NCURSES_TERM_H 1
9547 cat >>confdefs.h <<\EOF
9548 #define HAVE_NCURSESW_TERM_H 1
9557 echo "$as_me:9557: result: no" >&5
9558 echo "${ECHO_T}no" >&6
9559 NCURSES_CONFIG_PKG=none
9562 NCURSES_CONFIG_PKG=none
9565 if test "x$cf_have_ncuconfig" = "xno"; then
9566 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9568 if test -n "$ac_tool_prefix"; then
9569 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9571 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9572 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9573 echo "$as_me:9573: checking for $ac_word" >&5
9574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9575 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9576 echo $ECHO_N "(cached) $ECHO_C" >&6
9578 if test -n "$NCURSES_CONFIG"; then
9579 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9581 ac_save_IFS=$IFS; IFS=$ac_path_separator
9583 for ac_dir in $ac_dummy; do
9585 test -z "$ac_dir" && ac_dir=.
9586 $as_executable_p "$ac_dir/$ac_word" || continue
9587 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9588 echo "$as_me:9588: found $ac_dir/$ac_word" >&5
9594 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9595 if test -n "$NCURSES_CONFIG"; then
9596 echo "$as_me:9596: result: $NCURSES_CONFIG" >&5
9597 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9599 echo "$as_me:9599: result: no" >&5
9600 echo "${ECHO_T}no" >&6
9603 test -n "$NCURSES_CONFIG" && break
9606 if test -z "$NCURSES_CONFIG"; then
9607 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9608 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9610 # Extract the first word of "$ac_prog", so it can be a program name with args.
9611 set dummy $ac_prog; ac_word=$2
9612 echo "$as_me:9612: checking for $ac_word" >&5
9613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9614 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9617 if test -n "$ac_ct_NCURSES_CONFIG"; then
9618 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9620 ac_save_IFS=$IFS; IFS=$ac_path_separator
9622 for ac_dir in $ac_dummy; do
9624 test -z "$ac_dir" && ac_dir=.
9625 $as_executable_p "$ac_dir/$ac_word" || continue
9626 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9627 echo "$as_me:9627: found $ac_dir/$ac_word" >&5
9633 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9634 if test -n "$ac_ct_NCURSES_CONFIG"; then
9635 echo "$as_me:9635: result: $ac_ct_NCURSES_CONFIG" >&5
9636 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9638 echo "$as_me:9638: result: no" >&5
9639 echo "${ECHO_T}no" >&6
9642 test -n "$ac_ct_NCURSES_CONFIG" && break
9644 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9646 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9649 if test "$NCURSES_CONFIG" != none ; then
9654 cf_new_extra_cppflags=
9656 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9658 case $cf_fix_cppflags in
9660 case $cf_add_cflags in
9661 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9662 case $cf_add_cflags in
9664 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9666 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9667 && test -z "${cf_tst_cflags}" \
9668 && cf_fix_cppflags=yes
9670 if test $cf_fix_cppflags = yes ; then
9672 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9673 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9676 elif test "${cf_tst_cflags}" = "\"'" ; then
9678 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9679 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9689 case $cf_add_cflags in
9691 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9693 CPPFLAGS=`echo "$CPPFLAGS" | \
9694 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9695 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9700 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9701 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9708 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9709 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9716 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9717 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9719 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9721 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9722 && test -z "${cf_tst_cflags}" \
9723 && cf_fix_cppflags=no
9728 if test -n "$cf_new_cflags" ; then
9730 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9731 CFLAGS="${CFLAGS}$cf_new_cflags"
9735 if test -n "$cf_new_cppflags" ; then
9737 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9738 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9742 if test -n "$cf_new_extra_cppflags" ; then
9744 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9745 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9749 cf_add_libs="`$NCURSES_CONFIG --libs`"
9750 # Filter out duplicates - this happens with badly-designed ".pc" files...
9751 for cf_add_1lib in $LIBS
9753 for cf_add_2lib in $cf_add_libs
9755 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9761 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9765 # even with config script, some packages use no-override for curses.h
9767 echo "$as_me:9767: checking if we have identified curses headers" >&5
9768 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9769 if test "${cf_cv_ncurses_header+set}" = set; then
9770 echo $ECHO_N "(cached) $ECHO_C" >&6
9773 cf_cv_ncurses_header=none
9775 ncurses.h $cf_cv_screen/ncurses.h \
9776 curses.h $cf_cv_screen/curses.h
9778 cat >conftest.$ac_ext <<_ACEOF
9779 #line 9779 "configure"
9780 #include "confdefs.h"
9781 #include <${cf_header}>
9785 initscr(); tgoto("?", 0,0)
9790 rm -f conftest.$ac_objext
9791 if { (eval echo "$as_me:9791: \"$ac_compile\"") >&5
9792 (eval $ac_compile) 2>&5
9794 echo "$as_me:9794: \$? = $ac_status" >&5
9795 (exit $ac_status); } &&
9796 { ac_try='test -s conftest.$ac_objext'
9797 { (eval echo "$as_me:9797: \"$ac_try\"") >&5
9800 echo "$as_me:9800: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
9802 cf_cv_ncurses_header=$cf_header; break
9804 echo "$as_me: failed program was:" >&5
9805 cat conftest.$ac_ext >&5
9807 rm -f conftest.$ac_objext conftest.$ac_ext
9811 echo "$as_me:9811: result: $cf_cv_ncurses_header" >&5
9812 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9814 if test "$cf_cv_ncurses_header" = none ; then
9815 { { echo "$as_me:9815: error: No curses header-files found" >&5
9816 echo "$as_me: error: No curses header-files found" >&2;}
9817 { (exit 1); exit 1; }; }
9820 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9822 for ac_header in $cf_cv_ncurses_header
9824 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9825 echo "$as_me:9825: checking for $ac_header" >&5
9826 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9827 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
9830 cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9833 #include <$ac_header>
9835 if { (eval echo "$as_me:9835: \"$ac_cpp conftest.$ac_ext\"") >&5
9836 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9838 egrep -v '^ *\+' conftest.er1 >conftest.err
9840 cat conftest.err >&5
9841 echo "$as_me:9841: \$? = $ac_status" >&5
9842 (exit $ac_status); } >/dev/null; then
9843 if test -s conftest.err; then
9844 ac_cpp_err=$ac_c_preproc_warn_flag
9851 if test -z "$ac_cpp_err"; then
9852 eval "$as_ac_Header=yes"
9854 echo "$as_me: failed program was:" >&5
9855 cat conftest.$ac_ext >&5
9856 eval "$as_ac_Header=no"
9858 rm -f conftest.err conftest.$ac_ext
9860 echo "$as_me:9860: result: `eval echo '${'$as_ac_Header'}'`" >&5
9861 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9862 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9863 cat >>confdefs.h <<EOF
9864 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9870 cat >>confdefs.h <<\EOF
9874 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9876 cat >>confdefs.h <<EOF
9877 #define $cf_nculib_ROOT 1
9880 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9884 cf_ncuhdr_root=$cf_cv_screen
9886 test -n "$cf_cv_curses_dir" && \
9887 test "$cf_cv_curses_dir" != "no" && { \
9889 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9890 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9892 while test $cf_add_incdir != /usr/include
9894 if test -d $cf_add_incdir
9897 if test -n "$CFLAGS$CPPFLAGS" ; then
9898 # a loop is needed to ensure we can add subdirs of existing dirs
9899 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9900 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9901 cf_have_incdir=yes; break
9906 if test "$cf_have_incdir" = no ; then
9907 if test "$cf_add_incdir" = /usr/local/include ; then
9908 if test "$GCC" = yes
9910 cf_save_CPPFLAGS=$CPPFLAGS
9912 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9913 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9915 cat >conftest.$ac_ext <<_ACEOF
9916 #line 9916 "configure"
9917 #include "confdefs.h"
9927 rm -f conftest.$ac_objext
9928 if { (eval echo "$as_me:9928: \"$ac_compile\"") >&5
9929 (eval $ac_compile) 2>&5
9931 echo "$as_me:9931: \$? = $ac_status" >&5
9932 (exit $ac_status); } &&
9933 { ac_try='test -s conftest.$ac_objext'
9934 { (eval echo "$as_me:9934: \"$ac_try\"") >&5
9937 echo "$as_me:9937: \$? = $ac_status" >&5
9938 (exit $ac_status); }; }; then
9941 echo "$as_me: failed program was:" >&5
9942 cat conftest.$ac_ext >&5
9945 rm -f conftest.$ac_objext conftest.$ac_ext
9946 CPPFLAGS=$cf_save_CPPFLAGS
9951 if test "$cf_have_incdir" = no ; then
9952 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9954 echo "${as_me:-configure}:9954: testing adding $cf_add_incdir to include-path ..." 1>&5
9956 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9958 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9959 test "$cf_top_incdir" = "$cf_add_incdir" && break
9960 cf_add_incdir="$cf_top_incdir"
9973 echo "$as_me:9973: checking for $cf_ncuhdr_root header in include-path" >&5
9974 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9975 if test "${cf_cv_ncurses_h+set}" = set; then
9976 echo $ECHO_N "(cached) $ECHO_C" >&6
9979 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9980 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9981 for cf_header in $cf_header_list
9984 cat >conftest.$ac_ext <<_ACEOF
9985 #line 9985 "configure"
9986 #include "confdefs.h"
9988 #include <$cf_header>
9993 #ifdef NCURSES_VERSION
9995 printf("%s\n", NCURSES_VERSION);
10008 rm -f conftest.$ac_objext
10009 if { (eval echo "$as_me:10009: \"$ac_compile\"") >&5
10010 (eval $ac_compile) 2>&5
10012 echo "$as_me:10012: \$? = $ac_status" >&5
10013 (exit $ac_status); } &&
10014 { ac_try='test -s conftest.$ac_objext'
10015 { (eval echo "$as_me:10015: \"$ac_try\"") >&5
10016 (eval $ac_try) 2>&5
10018 echo "$as_me:10018: \$? = $ac_status" >&5
10019 (exit $ac_status); }; }; then
10020 cf_cv_ncurses_h=$cf_header
10023 echo "$as_me: failed program was:" >&5
10024 cat conftest.$ac_ext >&5
10027 rm -f conftest.$ac_objext conftest.$ac_ext
10029 test "$cf_cv_ncurses_h" != no && break
10033 echo "$as_me:10033: result: $cf_cv_ncurses_h" >&5
10034 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10036 if test "$cf_cv_ncurses_h" != no ; then
10037 cf_cv_ncurses_header=$cf_cv_ncurses_h
10040 echo "$as_me:10040: checking for $cf_ncuhdr_root include-path" >&5
10041 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10042 if test "${cf_cv_ncurses_h2+set}" = set; then
10043 echo $ECHO_N "(cached) $ECHO_C" >&6
10046 test -n "$verbose" && echo
10050 # collect the current set of include-directories from compiler flags
10051 cf_header_path_list=""
10052 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10053 for cf_header_path in $CPPFLAGS $CFLAGS
10055 case $cf_header_path in
10057 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10059 test "x$cf_header_path" != "xNONE" && \
10060 test -d "$cf_header_path" && \
10062 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10063 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10064 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10065 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10066 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10067 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"
10070 cf_header_path_list="$cf_header_path_list $cf_search"
10076 # add the variations for the package we are looking for
10080 test "x$prefix" != "xNONE" && \
10081 test -d "$prefix" && \
10083 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10084 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10085 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10086 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10087 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10088 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10091 for cf_subdir_prefix in \
10100 test "x$cf_subdir_prefix" != "x$prefix" && \
10101 test -d "$cf_subdir_prefix" && \
10102 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10103 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10104 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10105 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10106 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10107 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10108 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"
10113 test "$includedir" != NONE && \
10114 test "$includedir" != "/usr/include" && \
10115 test -d "$includedir" && {
10116 test -d $includedir && cf_search="$cf_search $includedir"
10117 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10120 test "$oldincludedir" != NONE && \
10121 test "$oldincludedir" != "/usr/include" && \
10122 test -d "$oldincludedir" && {
10123 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10124 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10127 cf_search="$cf_search $cf_header_path_list"
10129 test -n "$verbose" && echo search path $cf_search
10130 cf_save2_CPPFLAGS="$CPPFLAGS"
10131 for cf_incdir in $cf_search
10134 if test -n "$cf_incdir" ; then
10135 for cf_add_incdir in $cf_incdir
10137 while test $cf_add_incdir != /usr/include
10139 if test -d $cf_add_incdir
10142 if test -n "$CFLAGS$CPPFLAGS" ; then
10143 # a loop is needed to ensure we can add subdirs of existing dirs
10144 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10145 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10146 cf_have_incdir=yes; break
10151 if test "$cf_have_incdir" = no ; then
10152 if test "$cf_add_incdir" = /usr/local/include ; then
10153 if test "$GCC" = yes
10155 cf_save_CPPFLAGS=$CPPFLAGS
10157 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10158 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10160 cat >conftest.$ac_ext <<_ACEOF
10161 #line 10161 "configure"
10162 #include "confdefs.h"
10172 rm -f conftest.$ac_objext
10173 if { (eval echo "$as_me:10173: \"$ac_compile\"") >&5
10174 (eval $ac_compile) 2>&5
10176 echo "$as_me:10176: \$? = $ac_status" >&5
10177 (exit $ac_status); } &&
10178 { ac_try='test -s conftest.$ac_objext'
10179 { (eval echo "$as_me:10179: \"$ac_try\"") >&5
10180 (eval $ac_try) 2>&5
10182 echo "$as_me:10182: \$? = $ac_status" >&5
10183 (exit $ac_status); }; }; then
10186 echo "$as_me: failed program was:" >&5
10187 cat conftest.$ac_ext >&5
10190 rm -f conftest.$ac_objext conftest.$ac_ext
10191 CPPFLAGS=$cf_save_CPPFLAGS
10196 if test "$cf_have_incdir" = no ; then
10197 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10199 echo "${as_me:-configure}:10199: testing adding $cf_add_incdir to include-path ..." 1>&5
10201 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10203 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10204 test "$cf_top_incdir" = "$cf_add_incdir" && break
10205 cf_add_incdir="$cf_top_incdir"
10221 cat >conftest.$ac_ext <<_ACEOF
10222 #line 10222 "configure"
10223 #include "confdefs.h"
10225 #include <$cf_header>
10230 #ifdef NCURSES_VERSION
10232 printf("%s\n", NCURSES_VERSION);
10245 rm -f conftest.$ac_objext
10246 if { (eval echo "$as_me:10246: \"$ac_compile\"") >&5
10247 (eval $ac_compile) 2>&5
10249 echo "$as_me:10249: \$? = $ac_status" >&5
10250 (exit $ac_status); } &&
10251 { ac_try='test -s conftest.$ac_objext'
10252 { (eval echo "$as_me:10252: \"$ac_try\"") >&5
10253 (eval $ac_try) 2>&5
10255 echo "$as_me:10255: \$? = $ac_status" >&5
10256 (exit $ac_status); }; }; then
10257 cf_cv_ncurses_h2=$cf_header
10260 echo "$as_me: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262 cf_cv_ncurses_h2=no
10264 rm -f conftest.$ac_objext conftest.$ac_ext
10266 if test "$cf_cv_ncurses_h2" != no ; then
10267 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10268 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10271 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10273 CPPFLAGS="$cf_save2_CPPFLAGS"
10274 test "$cf_cv_ncurses_h2" != no && break
10276 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10276: error: not found" >&5
10277 echo "$as_me: error: not found" >&2;}
10278 { (exit 1); exit 1; }; }
10281 echo "$as_me:10281: result: $cf_cv_ncurses_h2" >&5
10282 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10284 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10285 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10286 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10287 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10290 if test -n "$cf_1st_incdir" ; then
10291 for cf_add_incdir in $cf_1st_incdir
10293 while test $cf_add_incdir != /usr/include
10295 if test -d $cf_add_incdir
10298 if test -n "$CFLAGS$CPPFLAGS" ; then
10299 # a loop is needed to ensure we can add subdirs of existing dirs
10300 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10301 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10302 cf_have_incdir=yes; break
10307 if test "$cf_have_incdir" = no ; then
10308 if test "$cf_add_incdir" = /usr/local/include ; then
10309 if test "$GCC" = yes
10311 cf_save_CPPFLAGS=$CPPFLAGS
10313 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10314 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10316 cat >conftest.$ac_ext <<_ACEOF
10317 #line 10317 "configure"
10318 #include "confdefs.h"
10328 rm -f conftest.$ac_objext
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330 (eval $ac_compile) 2>&5
10332 echo "$as_me:10332: \$? = $ac_status" >&5
10333 (exit $ac_status); } &&
10334 { ac_try='test -s conftest.$ac_objext'
10335 { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336 (eval $ac_try) 2>&5
10338 echo "$as_me:10338: \$? = $ac_status" >&5
10339 (exit $ac_status); }; }; then
10342 echo "$as_me: failed program was:" >&5
10343 cat conftest.$ac_ext >&5
10346 rm -f conftest.$ac_objext conftest.$ac_ext
10347 CPPFLAGS=$cf_save_CPPFLAGS
10352 if test "$cf_have_incdir" = no ; then
10353 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10355 echo "${as_me:-configure}:10355: testing adding $cf_add_incdir to include-path ..." 1>&5
10357 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10359 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10360 test "$cf_top_incdir" = "$cf_add_incdir" && break
10361 cf_add_incdir="$cf_top_incdir"
10374 # Set definitions to allow ifdef'ing for ncurses.h
10376 case $cf_cv_ncurses_header in
10379 cat >>confdefs.h <<\EOF
10380 #define HAVE_NCURSES_H 1
10386 case $cf_cv_ncurses_header in
10387 (ncurses/curses.h|ncurses/ncurses.h)
10389 cat >>confdefs.h <<\EOF
10390 #define HAVE_NCURSES_NCURSES_H 1
10394 (ncursesw/curses.h|ncursesw/ncurses.h)
10396 cat >>confdefs.h <<\EOF
10397 #define HAVE_NCURSESW_NCURSES_H 1
10403 echo "$as_me:10403: checking for terminfo header" >&5
10404 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10405 if test "${cf_cv_term_header+set}" = set; then
10406 echo $ECHO_N "(cached) $ECHO_C" >&6
10409 case ${cf_cv_ncurses_header} in
10410 (*/ncurses.h|*/ncursesw.h)
10411 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10414 cf_term_header=term.h
10418 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10420 cat >conftest.$ac_ext <<_ACEOF
10421 #line 10421 "configure"
10422 #include "confdefs.h"
10424 #include <${cf_cv_ncurses_header:-curses.h}>
10425 #include <$cf_test>
10430 int x = auto_left_margin
10435 rm -f conftest.$ac_objext
10436 if { (eval echo "$as_me:10436: \"$ac_compile\"") >&5
10437 (eval $ac_compile) 2>&5
10439 echo "$as_me:10439: \$? = $ac_status" >&5
10440 (exit $ac_status); } &&
10441 { ac_try='test -s conftest.$ac_objext'
10442 { (eval echo "$as_me:10442: \"$ac_try\"") >&5
10443 (eval $ac_try) 2>&5
10445 echo "$as_me:10445: \$? = $ac_status" >&5
10446 (exit $ac_status); }; }; then
10448 cf_cv_term_header="$cf_test"
10450 echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10453 cf_cv_term_header=unknown
10456 rm -f conftest.$ac_objext conftest.$ac_ext
10457 test "$cf_cv_term_header" != unknown && break
10461 echo "$as_me:10461: result: $cf_cv_term_header" >&5
10462 echo "${ECHO_T}$cf_cv_term_header" >&6
10464 # Set definitions to allow ifdef'ing to accommodate subdirectories
10466 case $cf_cv_term_header in
10469 cat >>confdefs.h <<\EOF
10470 #define HAVE_TERM_H 1
10476 case $cf_cv_term_header in
10479 cat >>confdefs.h <<\EOF
10480 #define HAVE_NCURSES_TERM_H 1
10486 cat >>confdefs.h <<\EOF
10487 #define HAVE_NCURSESW_TERM_H 1
10493 # some applications need this, but should check for NCURSES_VERSION
10495 cat >>confdefs.h <<\EOF
10499 echo "$as_me:10499: checking for ncurses version" >&5
10500 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10501 if test "${cf_cv_ncurses_version+set}" = set; then
10502 echo $ECHO_N "(cached) $ECHO_C" >&6
10505 cf_cv_ncurses_version=no
10508 if test "$cross_compiling" = yes; then
10510 # This will not work if the preprocessor splits the line after the
10511 # Autoconf token. The 'unproto' program does that.
10512 cat > conftest.$ac_ext <<EOF
10513 #include <${cf_cv_ncurses_header:-curses.h}>
10515 #ifdef NCURSES_VERSION
10516 Autoconf NCURSES_VERSION
10524 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10525 { (eval echo "$as_me:10525: \"$cf_try\"") >&5
10526 (eval $cf_try) 2>&5
10528 echo "$as_me:10528: \$? = $ac_status" >&5
10529 (exit $ac_status); }
10530 if test -f conftest.out ; then
10531 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10532 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10537 cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10541 #include <${cf_cv_ncurses_header:-curses.h}>
10545 FILE *fp = fopen("$cf_tempfile", "w");
10546 #ifdef NCURSES_VERSION
10547 # ifdef NCURSES_VERSION_PATCH
10548 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10550 fprintf(fp, "%s\n", NCURSES_VERSION);
10553 # ifdef __NCURSES_H
10554 fprintf(fp, "old\n");
10559 ${cf_cv_main_return:-return}(0);
10562 rm -f conftest$ac_exeext
10563 if { (eval echo "$as_me:10563: \"$ac_link\"") >&5
10564 (eval $ac_link) 2>&5
10566 echo "$as_me:10566: \$? = $ac_status" >&5
10567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10568 { (eval echo "$as_me:10568: \"$ac_try\"") >&5
10569 (eval $ac_try) 2>&5
10571 echo "$as_me:10571: \$? = $ac_status" >&5
10572 (exit $ac_status); }; }; then
10574 cf_cv_ncurses_version=`cat $cf_tempfile`
10576 echo "$as_me: program exited with status $ac_status" >&5
10577 echo "$as_me: failed program was:" >&5
10578 cat conftest.$ac_ext >&5
10580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10585 echo "$as_me:10585: result: $cf_cv_ncurses_version" >&5
10586 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10587 test "$cf_cv_ncurses_version" = no ||
10588 cat >>confdefs.h <<\EOF
10592 cf_nculib_root=$cf_cv_screen
10593 # This works, except for the special case where we find gpm, but
10594 # ncurses is in a nonstandard location via $LIBS, and we really want
10597 cf_ncurses_SAVE="$LIBS"
10598 echo "$as_me:10598: checking for Gpm_Open in -lgpm" >&5
10599 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10600 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10601 echo $ECHO_N "(cached) $ECHO_C" >&6
10603 ac_check_lib_save_LIBS=$LIBS
10605 cat >conftest.$ac_ext <<_ACEOF
10606 #line 10606 "configure"
10607 #include "confdefs.h"
10609 /* Override any gcc2 internal prototype to avoid an error. */
10613 /* We use char because int might match the return type of a gcc2
10614 builtin and then its argument prototype would still apply. */
10624 rm -f conftest.$ac_objext conftest$ac_exeext
10625 if { (eval echo "$as_me:10625: \"$ac_link\"") >&5
10626 (eval $ac_link) 2>&5
10628 echo "$as_me:10628: \$? = $ac_status" >&5
10629 (exit $ac_status); } &&
10630 { ac_try='test -s conftest$ac_exeext'
10631 { (eval echo "$as_me:10631: \"$ac_try\"") >&5
10632 (eval $ac_try) 2>&5
10634 echo "$as_me:10634: \$? = $ac_status" >&5
10635 (exit $ac_status); }; }; then
10636 ac_cv_lib_gpm_Gpm_Open=yes
10638 echo "$as_me: failed program was:" >&5
10639 cat conftest.$ac_ext >&5
10640 ac_cv_lib_gpm_Gpm_Open=no
10642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10643 LIBS=$ac_check_lib_save_LIBS
10645 echo "$as_me:10645: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10646 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10647 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10648 echo "$as_me:10648: checking for initscr in -lgpm" >&5
10649 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10650 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10651 echo $ECHO_N "(cached) $ECHO_C" >&6
10653 ac_check_lib_save_LIBS=$LIBS
10655 cat >conftest.$ac_ext <<_ACEOF
10656 #line 10656 "configure"
10657 #include "confdefs.h"
10659 /* Override any gcc2 internal prototype to avoid an error. */
10663 /* We use char because int might match the return type of a gcc2
10664 builtin and then its argument prototype would still apply. */
10674 rm -f conftest.$ac_objext conftest$ac_exeext
10675 if { (eval echo "$as_me:10675: \"$ac_link\"") >&5
10676 (eval $ac_link) 2>&5
10678 echo "$as_me:10678: \$? = $ac_status" >&5
10679 (exit $ac_status); } &&
10680 { ac_try='test -s conftest$ac_exeext'
10681 { (eval echo "$as_me:10681: \"$ac_try\"") >&5
10682 (eval $ac_try) 2>&5
10684 echo "$as_me:10684: \$? = $ac_status" >&5
10685 (exit $ac_status); }; }; then
10686 ac_cv_lib_gpm_initscr=yes
10688 echo "$as_me: failed program was:" >&5
10689 cat conftest.$ac_ext >&5
10690 ac_cv_lib_gpm_initscr=no
10692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10693 LIBS=$ac_check_lib_save_LIBS
10695 echo "$as_me:10695: result: $ac_cv_lib_gpm_initscr" >&5
10696 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10697 if test $ac_cv_lib_gpm_initscr = yes; then
10698 LIBS="$cf_ncurses_SAVE"
10700 cf_ncurses_LIBS="-lgpm"
10707 # This is only necessary if you are linking against an obsolete
10708 # version of ncurses (but it should do no harm, since it's static).
10709 if test "$cf_nculib_root" = ncurses ; then
10710 echo "$as_me:10710: checking for tgoto in -lmytinfo" >&5
10711 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10712 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10713 echo $ECHO_N "(cached) $ECHO_C" >&6
10715 ac_check_lib_save_LIBS=$LIBS
10716 LIBS="-lmytinfo $LIBS"
10717 cat >conftest.$ac_ext <<_ACEOF
10718 #line 10718 "configure"
10719 #include "confdefs.h"
10721 /* Override any gcc2 internal prototype to avoid an error. */
10725 /* We use char because int might match the return type of a gcc2
10726 builtin and then its argument prototype would still apply. */
10736 rm -f conftest.$ac_objext conftest$ac_exeext
10737 if { (eval echo "$as_me:10737: \"$ac_link\"") >&5
10738 (eval $ac_link) 2>&5
10740 echo "$as_me:10740: \$? = $ac_status" >&5
10741 (exit $ac_status); } &&
10742 { ac_try='test -s conftest$ac_exeext'
10743 { (eval echo "$as_me:10743: \"$ac_try\"") >&5
10744 (eval $ac_try) 2>&5
10746 echo "$as_me:10746: \$? = $ac_status" >&5
10747 (exit $ac_status); }; }; then
10748 ac_cv_lib_mytinfo_tgoto=yes
10750 echo "$as_me: failed program was:" >&5
10751 cat conftest.$ac_ext >&5
10752 ac_cv_lib_mytinfo_tgoto=no
10754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10755 LIBS=$ac_check_lib_save_LIBS
10757 echo "$as_me:10757: result: $ac_cv_lib_mytinfo_tgoto" >&5
10758 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10759 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10760 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10767 cf_add_libs="$cf_ncurses_LIBS"
10768 # Filter out duplicates - this happens with badly-designed ".pc" files...
10769 for cf_add_1lib in $LIBS
10771 for cf_add_2lib in $cf_add_libs
10773 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10779 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10781 LIBS="$cf_add_libs"
10783 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10786 cf_add_libs="-l$cf_nculib_root"
10787 # Filter out duplicates - this happens with badly-designed ".pc" files...
10788 for cf_add_1lib in $LIBS
10790 for cf_add_2lib in $cf_add_libs
10792 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10798 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10800 LIBS="$cf_add_libs"
10804 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10806 echo "$as_me:10806: checking for initscr" >&5
10807 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10808 if test "${ac_cv_func_initscr+set}" = set; then
10809 echo $ECHO_N "(cached) $ECHO_C" >&6
10811 cat >conftest.$ac_ext <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814 #define initscr autoconf_temporary
10815 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10822 /* We use char because int might match the return type of a gcc2
10823 builtin and then its argument prototype would still apply. */
10824 char initscr (void);
10830 /* The GNU C library defines stubs for functions which it implements
10831 to always fail with ENOSYS. Some functions are actually named
10832 something starting with __ and the normal name is an alias. */
10833 #if defined (__stub_initscr) || defined (__stub___initscr)
10834 #error found stub for initscr
10842 rm -f conftest.$ac_objext conftest$ac_exeext
10843 if { (eval echo "$as_me:10843: \"$ac_link\"") >&5
10844 (eval $ac_link) 2>&5
10846 echo "$as_me:10846: \$? = $ac_status" >&5
10847 (exit $ac_status); } &&
10848 { ac_try='test -s conftest$ac_exeext'
10849 { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850 (eval $ac_try) 2>&5
10852 echo "$as_me:10852: \$? = $ac_status" >&5
10853 (exit $ac_status); }; }; then
10854 ac_cv_func_initscr=yes
10856 echo "$as_me: failed program was:" >&5
10857 cat conftest.$ac_ext >&5
10858 ac_cv_func_initscr=no
10860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10862 echo "$as_me:10862: result: $ac_cv_func_initscr" >&5
10863 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10864 if test $ac_cv_func_initscr = yes; then
10865 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10868 cf_save_LIBS="$LIBS"
10869 echo "$as_me:10869: checking for initscr in -l$cf_nculib_root" >&5
10870 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10871 LIBS="-l$cf_nculib_root $LIBS"
10872 cat >conftest.$ac_ext <<_ACEOF
10873 #line 10873 "configure"
10874 #include "confdefs.h"
10875 #include <${cf_cv_ncurses_header:-curses.h}>
10884 rm -f conftest.$ac_objext conftest$ac_exeext
10885 if { (eval echo "$as_me:10885: \"$ac_link\"") >&5
10886 (eval $ac_link) 2>&5
10888 echo "$as_me:10888: \$? = $ac_status" >&5
10889 (exit $ac_status); } &&
10890 { ac_try='test -s conftest$ac_exeext'
10891 { (eval echo "$as_me:10891: \"$ac_try\"") >&5
10892 (eval $ac_try) 2>&5
10894 echo "$as_me:10894: \$? = $ac_status" >&5
10895 (exit $ac_status); }; }; then
10896 echo "$as_me:10896: result: yes" >&5
10897 echo "${ECHO_T}yes" >&6
10898 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10901 echo "$as_me: failed program was:" >&5
10902 cat conftest.$ac_ext >&5
10903 echo "$as_me:10903: result: no" >&5
10904 echo "${ECHO_T}no" >&6
10907 cf_library_path_list=""
10908 if test -n "${LDFLAGS}${LIBS}" ; then
10909 for cf_library_path in $LDFLAGS $LIBS
10911 case $cf_library_path in
10913 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10915 test "x$cf_library_path" != "xNONE" && \
10916 test -d "$cf_library_path" && \
10918 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10919 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10920 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10921 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10922 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10923 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"
10926 cf_library_path_list="$cf_library_path_list $cf_search"
10934 test "x$prefix" != "xNONE" && \
10935 test -d "$prefix" && \
10937 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10938 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10939 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10940 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10941 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10942 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10945 for cf_subdir_prefix in \
10954 test "x$cf_subdir_prefix" != "x$prefix" && \
10955 test -d "$cf_subdir_prefix" && \
10956 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10957 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10958 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10959 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10960 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10961 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10962 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"
10967 cf_search="$cf_library_path_list $cf_search"
10969 for cf_libdir in $cf_search
10971 echo "$as_me:10971: checking for -l$cf_nculib_root in $cf_libdir" >&5
10972 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10973 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10974 cat >conftest.$ac_ext <<_ACEOF
10975 #line 10975 "configure"
10976 #include "confdefs.h"
10977 #include <${cf_cv_ncurses_header:-curses.h}>
10986 rm -f conftest.$ac_objext conftest$ac_exeext
10987 if { (eval echo "$as_me:10987: \"$ac_link\"") >&5
10988 (eval $ac_link) 2>&5
10990 echo "$as_me:10990: \$? = $ac_status" >&5
10991 (exit $ac_status); } &&
10992 { ac_try='test -s conftest$ac_exeext'
10993 { (eval echo "$as_me:10993: \"$ac_try\"") >&5
10994 (eval $ac_try) 2>&5
10996 echo "$as_me:10996: \$? = $ac_status" >&5
10997 (exit $ac_status); }; }; then
10998 echo "$as_me:10998: result: yes" >&5
10999 echo "${ECHO_T}yes" >&6
11000 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11003 echo "$as_me: failed program was:" >&5
11004 cat conftest.$ac_ext >&5
11005 echo "$as_me:11005: result: no" >&5
11006 echo "${ECHO_T}no" >&6
11007 LIBS="$cf_save_LIBS"
11009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11017 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11019 if test $cf_found_library = no ; then
11020 { { echo "$as_me:11020: error: Cannot link $cf_nculib_root library" >&5
11021 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11022 { (exit 1); exit 1; }; }
11027 if test -n "$cf_ncurses_LIBS" ; then
11028 echo "$as_me:11028: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11029 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11030 cf_ncurses_SAVE="$LIBS"
11031 for p in $cf_ncurses_LIBS ; do
11032 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11033 if test "$q" != "$LIBS" ; then
11037 cat >conftest.$ac_ext <<_ACEOF
11038 #line 11038 "configure"
11039 #include "confdefs.h"
11040 #include <${cf_cv_ncurses_header:-curses.h}>
11044 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11049 rm -f conftest.$ac_objext conftest$ac_exeext
11050 if { (eval echo "$as_me:11050: \"$ac_link\"") >&5
11051 (eval $ac_link) 2>&5
11053 echo "$as_me:11053: \$? = $ac_status" >&5
11054 (exit $ac_status); } &&
11055 { ac_try='test -s conftest$ac_exeext'
11056 { (eval echo "$as_me:11056: \"$ac_try\"") >&5
11057 (eval $ac_try) 2>&5
11059 echo "$as_me:11059: \$? = $ac_status" >&5
11060 (exit $ac_status); }; }; then
11061 echo "$as_me:11061: result: yes" >&5
11062 echo "${ECHO_T}yes" >&6
11064 echo "$as_me: failed program was:" >&5
11065 cat conftest.$ac_ext >&5
11066 echo "$as_me:11066: result: no" >&5
11067 echo "${ECHO_T}no" >&6
11068 LIBS="$cf_ncurses_SAVE"
11070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11073 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11075 cat >>confdefs.h <<EOF
11076 #define $cf_nculib_ROOT 1
11081 NCURSES_CONFIG=none
11086 echo "$as_me:11086: checking for X" >&5
11087 echo $ECHO_N "checking for X... $ECHO_C" >&6
11089 # Check whether --with-x or --without-x was given.
11090 if test "${with_x+set}" = set; then
11094 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11095 if test "x$with_x" = xno; then
11096 # The user explicitly disabled X.
11099 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11100 # Both variables are already set.
11103 if test "${ac_cv_have_x+set}" = set; then
11104 echo $ECHO_N "(cached) $ECHO_C" >&6
11106 # One or both of the vars are not set, and there is no cached value.
11107 ac_x_includes=no ac_x_libraries=no
11108 rm -fr conftest.dir
11109 if mkdir conftest.dir; then
11111 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11112 cat >Imakefile <<'EOF'
11114 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11116 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11117 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11118 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11119 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11120 for ac_extension in a so sl dylib dll; do
11121 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11122 test -f $ac_im_libdir/libX11.$ac_extension; then
11123 ac_im_usrlibdir=$ac_im_libdir; break
11126 # Screen out bogus values from the imake configuration. They are
11127 # bogus both because they are the default anyway, and because
11128 # using them would break gcc on systems where it needs fixed includes.
11129 case $ac_im_incroot in
11131 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11133 case $ac_im_usrlibdir in
11134 /usr/lib | /lib) ;;
11135 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11139 rm -fr conftest.dir
11142 # Standard set of common directories for X headers.
11143 # Check X11 before X11Rn because it is often a symlink to the current release.
11157 /usr/local/X11/include
11158 /usr/local/X11R7/include
11159 /usr/local/X11R6/include
11160 /usr/local/X11R5/include
11161 /usr/local/X11R4/include
11163 /usr/local/include/X11
11164 /usr/local/include/X11R7
11165 /usr/local/include/X11R6
11166 /usr/local/include/X11R5
11167 /usr/local/include/X11R4
11171 /usr/XFree86/include/X11
11175 /usr/unsupported/include
11176 /usr/athena/include
11177 /usr/local/x11r5/include
11178 /usr/lpp/Xamples/include
11180 /usr/openwin/include
11181 /usr/openwin/share/include'
11183 if test "$ac_x_includes" = no; then
11184 # Guess where to find include files, by looking for Intrinsic.h.
11185 # First, try using that file with no special directory specified.
11186 cat >conftest.$ac_ext <<_ACEOF
11187 #line 11187 "configure"
11188 #include "confdefs.h"
11189 #include <X11/Intrinsic.h>
11191 if { (eval echo "$as_me:11191: \"$ac_cpp conftest.$ac_ext\"") >&5
11192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11194 egrep -v '^ *\+' conftest.er1 >conftest.err
11196 cat conftest.err >&5
11197 echo "$as_me:11197: \$? = $ac_status" >&5
11198 (exit $ac_status); } >/dev/null; then
11199 if test -s conftest.err; then
11200 ac_cpp_err=$ac_c_preproc_warn_flag
11207 if test -z "$ac_cpp_err"; then
11208 # We can compile using X headers with no special include directory.
11211 echo "$as_me: failed program was:" >&5
11212 cat conftest.$ac_ext >&5
11213 for ac_dir in $ac_x_header_dirs; do
11214 if test -r "$ac_dir/X11/Intrinsic.h"; then
11215 ac_x_includes=$ac_dir
11220 rm -f conftest.err conftest.$ac_ext
11221 fi # $ac_x_includes = no
11223 if test "$ac_x_libraries" = no; then
11224 # Check for the libraries.
11225 # See if we find them without any special options.
11226 # Don't add to $LIBS permanently.
11229 cat >conftest.$ac_ext <<_ACEOF
11230 #line 11230 "configure"
11231 #include "confdefs.h"
11232 #include <X11/Intrinsic.h>
11241 rm -f conftest.$ac_objext conftest$ac_exeext
11242 if { (eval echo "$as_me:11242: \"$ac_link\"") >&5
11243 (eval $ac_link) 2>&5
11245 echo "$as_me:11245: \$? = $ac_status" >&5
11246 (exit $ac_status); } &&
11247 { ac_try='test -s conftest$ac_exeext'
11248 { (eval echo "$as_me:11248: \"$ac_try\"") >&5
11249 (eval $ac_try) 2>&5
11251 echo "$as_me:11251: \$? = $ac_status" >&5
11252 (exit $ac_status); }; }; then
11254 # We can link X programs with no special library path.
11257 echo "$as_me: failed program was:" >&5
11258 cat conftest.$ac_ext >&5
11260 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11262 # Don't even attempt the hair of trying to link an X program!
11263 for ac_extension in a so sl dylib dll; do
11264 if test -r $ac_dir/libXt.$ac_extension; then
11265 ac_x_libraries=$ac_dir
11271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11272 fi # $ac_x_libraries = no
11274 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11275 # Didn't find X anywhere. Cache the known absence of X.
11276 ac_cv_have_x="have_x=no"
11278 # Record where we found X for the cache.
11279 ac_cv_have_x="have_x=yes \
11280 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11285 eval "$ac_cv_have_x"
11288 if test "$have_x" != yes; then
11289 echo "$as_me:11289: result: $have_x" >&5
11290 echo "${ECHO_T}$have_x" >&6
11293 # If each of the values was on the command line, it overrides each guess.
11294 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11295 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11296 # Update the cache value to reflect the command line values.
11297 ac_cv_have_x="have_x=yes \
11298 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11299 echo "$as_me:11299: result: libraries $x_libraries, headers $x_includes" >&5
11300 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11303 if test "$no_x" = yes; then
11304 # Not all programs may use this symbol, but it does not hurt to define it.
11306 cat >>confdefs.h <<\EOF
11307 #define X_DISPLAY_MISSING 1
11310 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11312 if test -n "$x_includes"; then
11313 X_CFLAGS="$X_CFLAGS -I$x_includes"
11316 # It would also be nice to do this for all -L options, not just this one.
11317 if test -n "$x_libraries"; then
11318 X_LIBS="$X_LIBS -L$x_libraries"
11319 # For Solaris; some versions of Sun CC require a space after -R and
11320 # others require no space. Words are not sufficient . . . .
11321 case `(uname -sr) 2>/dev/null` in
11323 echo "$as_me:11323: checking whether -R must be followed by a space" >&5
11324 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11325 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11326 cat >conftest.$ac_ext <<_ACEOF
11327 #line 11327 "configure"
11328 #include "confdefs.h"
11338 rm -f conftest.$ac_objext conftest$ac_exeext
11339 if { (eval echo "$as_me:11339: \"$ac_link\"") >&5
11340 (eval $ac_link) 2>&5
11342 echo "$as_me:11342: \$? = $ac_status" >&5
11343 (exit $ac_status); } &&
11344 { ac_try='test -s conftest$ac_exeext'
11345 { (eval echo "$as_me:11345: \"$ac_try\"") >&5
11346 (eval $ac_try) 2>&5
11348 echo "$as_me:11348: \$? = $ac_status" >&5
11349 (exit $ac_status); }; }; then
11352 echo "$as_me: failed program was:" >&5
11353 cat conftest.$ac_ext >&5
11356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11357 if test $ac_R_nospace = yes; then
11358 echo "$as_me:11358: result: no" >&5
11359 echo "${ECHO_T}no" >&6
11360 X_LIBS="$X_LIBS -R$x_libraries"
11362 LIBS="$ac_xsave_LIBS -R $x_libraries"
11363 cat >conftest.$ac_ext <<_ACEOF
11364 #line 11364 "configure"
11365 #include "confdefs.h"
11375 rm -f conftest.$ac_objext conftest$ac_exeext
11376 if { (eval echo "$as_me:11376: \"$ac_link\"") >&5
11377 (eval $ac_link) 2>&5
11379 echo "$as_me:11379: \$? = $ac_status" >&5
11380 (exit $ac_status); } &&
11381 { ac_try='test -s conftest$ac_exeext'
11382 { (eval echo "$as_me:11382: \"$ac_try\"") >&5
11383 (eval $ac_try) 2>&5
11385 echo "$as_me:11385: \$? = $ac_status" >&5
11386 (exit $ac_status); }; }; then
11389 echo "$as_me: failed program was:" >&5
11390 cat conftest.$ac_ext >&5
11393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11394 if test $ac_R_space = yes; then
11395 echo "$as_me:11395: result: yes" >&5
11396 echo "${ECHO_T}yes" >&6
11397 X_LIBS="$X_LIBS -R $x_libraries"
11399 echo "$as_me:11399: result: neither works" >&5
11400 echo "${ECHO_T}neither works" >&6
11403 LIBS=$ac_xsave_LIBS
11407 # Check for system-dependent libraries X programs must link with.
11408 # Do this before checking for the system-independent R6 libraries
11409 # (-lICE), since we may need -lsocket or whatever for X linking.
11411 if test "$ISC" = yes; then
11412 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11414 # Martyn Johnson says this is needed for Ultrix, if the X
11415 # libraries were built with DECnet support. And Karl Berry says
11416 # the Alpha needs dnet_stub (dnet does not exist).
11417 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11418 cat >conftest.$ac_ext <<_ACEOF
11419 #line 11419 "configure"
11420 #include "confdefs.h"
11422 /* Override any gcc2 internal prototype to avoid an error. */
11426 /* We use char because int might match the return type of a gcc2
11427 builtin and then its argument prototype would still apply. */
11428 char XOpenDisplay ();
11437 rm -f conftest.$ac_objext conftest$ac_exeext
11438 if { (eval echo "$as_me:11438: \"$ac_link\"") >&5
11439 (eval $ac_link) 2>&5
11441 echo "$as_me:11441: \$? = $ac_status" >&5
11442 (exit $ac_status); } &&
11443 { ac_try='test -s conftest$ac_exeext'
11444 { (eval echo "$as_me:11444: \"$ac_try\"") >&5
11445 (eval $ac_try) 2>&5
11447 echo "$as_me:11447: \$? = $ac_status" >&5
11448 (exit $ac_status); }; }; then
11451 echo "$as_me: failed program was:" >&5
11452 cat conftest.$ac_ext >&5
11453 echo "$as_me:11453: checking for dnet_ntoa in -ldnet" >&5
11454 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11455 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
11458 ac_check_lib_save_LIBS=$LIBS
11459 LIBS="-ldnet $LIBS"
11460 cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11464 /* Override any gcc2 internal prototype to avoid an error. */
11468 /* We use char because int might match the return type of a gcc2
11469 builtin and then its argument prototype would still apply. */
11479 rm -f conftest.$ac_objext conftest$ac_exeext
11480 if { (eval echo "$as_me:11480: \"$ac_link\"") >&5
11481 (eval $ac_link) 2>&5
11483 echo "$as_me:11483: \$? = $ac_status" >&5
11484 (exit $ac_status); } &&
11485 { ac_try='test -s conftest$ac_exeext'
11486 { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487 (eval $ac_try) 2>&5
11489 echo "$as_me:11489: \$? = $ac_status" >&5
11490 (exit $ac_status); }; }; then
11491 ac_cv_lib_dnet_dnet_ntoa=yes
11493 echo "$as_me: failed program was:" >&5
11494 cat conftest.$ac_ext >&5
11495 ac_cv_lib_dnet_dnet_ntoa=no
11497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11498 LIBS=$ac_check_lib_save_LIBS
11500 echo "$as_me:11500: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11501 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11502 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11503 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11506 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11507 echo "$as_me:11507: checking for dnet_ntoa in -ldnet_stub" >&5
11508 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11509 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11510 echo $ECHO_N "(cached) $ECHO_C" >&6
11512 ac_check_lib_save_LIBS=$LIBS
11513 LIBS="-ldnet_stub $LIBS"
11514 cat >conftest.$ac_ext <<_ACEOF
11515 #line 11515 "configure"
11516 #include "confdefs.h"
11518 /* Override any gcc2 internal prototype to avoid an error. */
11522 /* We use char because int might match the return type of a gcc2
11523 builtin and then its argument prototype would still apply. */
11533 rm -f conftest.$ac_objext conftest$ac_exeext
11534 if { (eval echo "$as_me:11534: \"$ac_link\"") >&5
11535 (eval $ac_link) 2>&5
11537 echo "$as_me:11537: \$? = $ac_status" >&5
11538 (exit $ac_status); } &&
11539 { ac_try='test -s conftest$ac_exeext'
11540 { (eval echo "$as_me:11540: \"$ac_try\"") >&5
11541 (eval $ac_try) 2>&5
11543 echo "$as_me:11543: \$? = $ac_status" >&5
11544 (exit $ac_status); }; }; then
11545 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11547 echo "$as_me: failed program was:" >&5
11548 cat conftest.$ac_ext >&5
11549 ac_cv_lib_dnet_stub_dnet_ntoa=no
11551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11552 LIBS=$ac_check_lib_save_LIBS
11554 echo "$as_me:11554: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11555 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11556 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11557 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11563 LIBS="$ac_xsave_LIBS"
11565 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11566 # to get the SysV transport functions.
11567 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11569 # The nsl library prevents programs from opening the X display
11570 # on Irix 5.2, according to T.E. Dickey.
11571 # The functions gethostbyname, getservbyname, and inet_addr are
11572 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11573 echo "$as_me:11573: checking for gethostbyname" >&5
11574 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11575 if test "${ac_cv_func_gethostbyname+set}" = set; then
11576 echo $ECHO_N "(cached) $ECHO_C" >&6
11578 cat >conftest.$ac_ext <<_ACEOF
11579 #line 11579 "configure"
11580 #include "confdefs.h"
11581 #define gethostbyname autoconf_temporary
11582 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11583 #undef gethostbyname
11589 /* We use char because int might match the return type of a gcc2
11590 builtin and then its argument prototype would still apply. */
11591 char gethostbyname (void);
11597 /* The GNU C library defines stubs for functions which it implements
11598 to always fail with ENOSYS. Some functions are actually named
11599 something starting with __ and the normal name is an alias. */
11600 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11601 #error found stub for gethostbyname
11604 return gethostbyname ();
11609 rm -f conftest.$ac_objext conftest$ac_exeext
11610 if { (eval echo "$as_me:11610: \"$ac_link\"") >&5
11611 (eval $ac_link) 2>&5
11613 echo "$as_me:11613: \$? = $ac_status" >&5
11614 (exit $ac_status); } &&
11615 { ac_try='test -s conftest$ac_exeext'
11616 { (eval echo "$as_me:11616: \"$ac_try\"") >&5
11617 (eval $ac_try) 2>&5
11619 echo "$as_me:11619: \$? = $ac_status" >&5
11620 (exit $ac_status); }; }; then
11621 ac_cv_func_gethostbyname=yes
11623 echo "$as_me: failed program was:" >&5
11624 cat conftest.$ac_ext >&5
11625 ac_cv_func_gethostbyname=no
11627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11629 echo "$as_me:11629: result: $ac_cv_func_gethostbyname" >&5
11630 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11632 if test $ac_cv_func_gethostbyname = no; then
11633 echo "$as_me:11633: checking for gethostbyname in -lnsl" >&5
11634 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11635 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11636 echo $ECHO_N "(cached) $ECHO_C" >&6
11638 ac_check_lib_save_LIBS=$LIBS
11640 cat >conftest.$ac_ext <<_ACEOF
11641 #line 11641 "configure"
11642 #include "confdefs.h"
11644 /* Override any gcc2 internal prototype to avoid an error. */
11648 /* We use char because int might match the return type of a gcc2
11649 builtin and then its argument prototype would still apply. */
11650 char gethostbyname ();
11659 rm -f conftest.$ac_objext conftest$ac_exeext
11660 if { (eval echo "$as_me:11660: \"$ac_link\"") >&5
11661 (eval $ac_link) 2>&5
11663 echo "$as_me:11663: \$? = $ac_status" >&5
11664 (exit $ac_status); } &&
11665 { ac_try='test -s conftest$ac_exeext'
11666 { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667 (eval $ac_try) 2>&5
11669 echo "$as_me:11669: \$? = $ac_status" >&5
11670 (exit $ac_status); }; }; then
11671 ac_cv_lib_nsl_gethostbyname=yes
11673 echo "$as_me: failed program was:" >&5
11674 cat conftest.$ac_ext >&5
11675 ac_cv_lib_nsl_gethostbyname=no
11677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11678 LIBS=$ac_check_lib_save_LIBS
11680 echo "$as_me:11680: result: $ac_cv_lib_nsl_gethostbyname" >&5
11681 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11682 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11683 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11686 if test $ac_cv_lib_nsl_gethostbyname = no; then
11687 echo "$as_me:11687: checking for gethostbyname in -lbsd" >&5
11688 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11689 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11690 echo $ECHO_N "(cached) $ECHO_C" >&6
11692 ac_check_lib_save_LIBS=$LIBS
11694 cat >conftest.$ac_ext <<_ACEOF
11695 #line 11695 "configure"
11696 #include "confdefs.h"
11698 /* Override any gcc2 internal prototype to avoid an error. */
11702 /* We use char because int might match the return type of a gcc2
11703 builtin and then its argument prototype would still apply. */
11704 char gethostbyname ();
11713 rm -f conftest.$ac_objext conftest$ac_exeext
11714 if { (eval echo "$as_me:11714: \"$ac_link\"") >&5
11715 (eval $ac_link) 2>&5
11717 echo "$as_me:11717: \$? = $ac_status" >&5
11718 (exit $ac_status); } &&
11719 { ac_try='test -s conftest$ac_exeext'
11720 { (eval echo "$as_me:11720: \"$ac_try\"") >&5
11721 (eval $ac_try) 2>&5
11723 echo "$as_me:11723: \$? = $ac_status" >&5
11724 (exit $ac_status); }; }; then
11725 ac_cv_lib_bsd_gethostbyname=yes
11727 echo "$as_me: failed program was:" >&5
11728 cat conftest.$ac_ext >&5
11729 ac_cv_lib_bsd_gethostbyname=no
11731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11732 LIBS=$ac_check_lib_save_LIBS
11734 echo "$as_me:11734: result: $ac_cv_lib_bsd_gethostbyname" >&5
11735 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11736 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11737 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11743 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11744 # socket/setsockopt and other routines are undefined under SCO ODT
11745 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11746 # on later versions), says Simon Leinen: it contains gethostby*
11747 # variants that don't use the nameserver (or something). -lsocket
11748 # must be given before -lnsl if both are needed. We assume that
11749 # if connect needs -lnsl, so does gethostbyname.
11750 echo "$as_me:11750: checking for connect" >&5
11751 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11752 if test "${ac_cv_func_connect+set}" = set; then
11753 echo $ECHO_N "(cached) $ECHO_C" >&6
11755 cat >conftest.$ac_ext <<_ACEOF
11756 #line 11756 "configure"
11757 #include "confdefs.h"
11758 #define connect autoconf_temporary
11759 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11766 /* We use char because int might match the return type of a gcc2
11767 builtin and then its argument prototype would still apply. */
11768 char connect (void);
11774 /* The GNU C library defines stubs for functions which it implements
11775 to always fail with ENOSYS. Some functions are actually named
11776 something starting with __ and the normal name is an alias. */
11777 #if defined (__stub_connect) || defined (__stub___connect)
11778 #error found stub for connect
11786 rm -f conftest.$ac_objext conftest$ac_exeext
11787 if { (eval echo "$as_me:11787: \"$ac_link\"") >&5
11788 (eval $ac_link) 2>&5
11790 echo "$as_me:11790: \$? = $ac_status" >&5
11791 (exit $ac_status); } &&
11792 { ac_try='test -s conftest$ac_exeext'
11793 { (eval echo "$as_me:11793: \"$ac_try\"") >&5
11794 (eval $ac_try) 2>&5
11796 echo "$as_me:11796: \$? = $ac_status" >&5
11797 (exit $ac_status); }; }; then
11798 ac_cv_func_connect=yes
11800 echo "$as_me: failed program was:" >&5
11801 cat conftest.$ac_ext >&5
11802 ac_cv_func_connect=no
11804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11806 echo "$as_me:11806: result: $ac_cv_func_connect" >&5
11807 echo "${ECHO_T}$ac_cv_func_connect" >&6
11809 if test $ac_cv_func_connect = no; then
11810 echo "$as_me:11810: checking for connect in -lsocket" >&5
11811 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11812 if test "${ac_cv_lib_socket_connect+set}" = set; then
11813 echo $ECHO_N "(cached) $ECHO_C" >&6
11815 ac_check_lib_save_LIBS=$LIBS
11816 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11817 cat >conftest.$ac_ext <<_ACEOF
11818 #line 11818 "configure"
11819 #include "confdefs.h"
11821 /* Override any gcc2 internal prototype to avoid an error. */
11825 /* We use char because int might match the return type of a gcc2
11826 builtin and then its argument prototype would still apply. */
11836 rm -f conftest.$ac_objext conftest$ac_exeext
11837 if { (eval echo "$as_me:11837: \"$ac_link\"") >&5
11838 (eval $ac_link) 2>&5
11840 echo "$as_me:11840: \$? = $ac_status" >&5
11841 (exit $ac_status); } &&
11842 { ac_try='test -s conftest$ac_exeext'
11843 { (eval echo "$as_me:11843: \"$ac_try\"") >&5
11844 (eval $ac_try) 2>&5
11846 echo "$as_me:11846: \$? = $ac_status" >&5
11847 (exit $ac_status); }; }; then
11848 ac_cv_lib_socket_connect=yes
11850 echo "$as_me: failed program was:" >&5
11851 cat conftest.$ac_ext >&5
11852 ac_cv_lib_socket_connect=no
11854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11855 LIBS=$ac_check_lib_save_LIBS
11857 echo "$as_me:11857: result: $ac_cv_lib_socket_connect" >&5
11858 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11859 if test $ac_cv_lib_socket_connect = yes; then
11860 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11865 # Guillermo Gomez says -lposix is necessary on A/UX.
11866 echo "$as_me:11866: checking for remove" >&5
11867 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11868 if test "${ac_cv_func_remove+set}" = set; then
11869 echo $ECHO_N "(cached) $ECHO_C" >&6
11871 cat >conftest.$ac_ext <<_ACEOF
11872 #line 11872 "configure"
11873 #include "confdefs.h"
11874 #define remove autoconf_temporary
11875 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11882 /* We use char because int might match the return type of a gcc2
11883 builtin and then its argument prototype would still apply. */
11884 char remove (void);
11890 /* The GNU C library defines stubs for functions which it implements
11891 to always fail with ENOSYS. Some functions are actually named
11892 something starting with __ and the normal name is an alias. */
11893 #if defined (__stub_remove) || defined (__stub___remove)
11894 #error found stub for remove
11902 rm -f conftest.$ac_objext conftest$ac_exeext
11903 if { (eval echo "$as_me:11903: \"$ac_link\"") >&5
11904 (eval $ac_link) 2>&5
11906 echo "$as_me:11906: \$? = $ac_status" >&5
11907 (exit $ac_status); } &&
11908 { ac_try='test -s conftest$ac_exeext'
11909 { (eval echo "$as_me:11909: \"$ac_try\"") >&5
11910 (eval $ac_try) 2>&5
11912 echo "$as_me:11912: \$? = $ac_status" >&5
11913 (exit $ac_status); }; }; then
11914 ac_cv_func_remove=yes
11916 echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 ac_cv_func_remove=no
11920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11922 echo "$as_me:11922: result: $ac_cv_func_remove" >&5
11923 echo "${ECHO_T}$ac_cv_func_remove" >&6
11925 if test $ac_cv_func_remove = no; then
11926 echo "$as_me:11926: checking for remove in -lposix" >&5
11927 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11928 if test "${ac_cv_lib_posix_remove+set}" = set; then
11929 echo $ECHO_N "(cached) $ECHO_C" >&6
11931 ac_check_lib_save_LIBS=$LIBS
11932 LIBS="-lposix $LIBS"
11933 cat >conftest.$ac_ext <<_ACEOF
11934 #line 11934 "configure"
11935 #include "confdefs.h"
11937 /* Override any gcc2 internal prototype to avoid an error. */
11941 /* We use char because int might match the return type of a gcc2
11942 builtin and then its argument prototype would still apply. */
11952 rm -f conftest.$ac_objext conftest$ac_exeext
11953 if { (eval echo "$as_me:11953: \"$ac_link\"") >&5
11954 (eval $ac_link) 2>&5
11956 echo "$as_me:11956: \$? = $ac_status" >&5
11957 (exit $ac_status); } &&
11958 { ac_try='test -s conftest$ac_exeext'
11959 { (eval echo "$as_me:11959: \"$ac_try\"") >&5
11960 (eval $ac_try) 2>&5
11962 echo "$as_me:11962: \$? = $ac_status" >&5
11963 (exit $ac_status); }; }; then
11964 ac_cv_lib_posix_remove=yes
11966 echo "$as_me: failed program was:" >&5
11967 cat conftest.$ac_ext >&5
11968 ac_cv_lib_posix_remove=no
11970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11971 LIBS=$ac_check_lib_save_LIBS
11973 echo "$as_me:11973: result: $ac_cv_lib_posix_remove" >&5
11974 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11975 if test $ac_cv_lib_posix_remove = yes; then
11976 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11981 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11982 echo "$as_me:11982: checking for shmat" >&5
11983 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11984 if test "${ac_cv_func_shmat+set}" = set; then
11985 echo $ECHO_N "(cached) $ECHO_C" >&6
11987 cat >conftest.$ac_ext <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
11990 #define shmat autoconf_temporary
11991 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11998 /* We use char because int might match the return type of a gcc2
11999 builtin and then its argument prototype would still apply. */
12006 /* The GNU C library defines stubs for functions which it implements
12007 to always fail with ENOSYS. Some functions are actually named
12008 something starting with __ and the normal name is an alias. */
12009 #if defined (__stub_shmat) || defined (__stub___shmat)
12010 #error found stub for shmat
12018 rm -f conftest.$ac_objext conftest$ac_exeext
12019 if { (eval echo "$as_me:12019: \"$ac_link\"") >&5
12020 (eval $ac_link) 2>&5
12022 echo "$as_me:12022: \$? = $ac_status" >&5
12023 (exit $ac_status); } &&
12024 { ac_try='test -s conftest$ac_exeext'
12025 { (eval echo "$as_me:12025: \"$ac_try\"") >&5
12026 (eval $ac_try) 2>&5
12028 echo "$as_me:12028: \$? = $ac_status" >&5
12029 (exit $ac_status); }; }; then
12030 ac_cv_func_shmat=yes
12032 echo "$as_me: failed program was:" >&5
12033 cat conftest.$ac_ext >&5
12034 ac_cv_func_shmat=no
12036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12038 echo "$as_me:12038: result: $ac_cv_func_shmat" >&5
12039 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12041 if test $ac_cv_func_shmat = no; then
12042 echo "$as_me:12042: checking for shmat in -lipc" >&5
12043 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12044 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12045 echo $ECHO_N "(cached) $ECHO_C" >&6
12047 ac_check_lib_save_LIBS=$LIBS
12049 cat >conftest.$ac_ext <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12053 /* Override any gcc2 internal prototype to avoid an error. */
12057 /* We use char because int might match the return type of a gcc2
12058 builtin and then its argument prototype would still apply. */
12068 rm -f conftest.$ac_objext conftest$ac_exeext
12069 if { (eval echo "$as_me:12069: \"$ac_link\"") >&5
12070 (eval $ac_link) 2>&5
12072 echo "$as_me:12072: \$? = $ac_status" >&5
12073 (exit $ac_status); } &&
12074 { ac_try='test -s conftest$ac_exeext'
12075 { (eval echo "$as_me:12075: \"$ac_try\"") >&5
12076 (eval $ac_try) 2>&5
12078 echo "$as_me:12078: \$? = $ac_status" >&5
12079 (exit $ac_status); }; }; then
12080 ac_cv_lib_ipc_shmat=yes
12082 echo "$as_me: failed program was:" >&5
12083 cat conftest.$ac_ext >&5
12084 ac_cv_lib_ipc_shmat=no
12086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12087 LIBS=$ac_check_lib_save_LIBS
12089 echo "$as_me:12089: result: $ac_cv_lib_ipc_shmat" >&5
12090 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12091 if test $ac_cv_lib_ipc_shmat = yes; then
12092 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12098 # Check for libraries that X11R6 Xt/Xaw programs need.
12099 ac_save_LDFLAGS=$LDFLAGS
12100 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12101 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12102 # check for ICE first), but we must link in the order -lSM -lICE or
12103 # we get undefined symbols. So assume we have SM if we have ICE.
12104 # These have to be linked with before -lX11, unlike the other
12105 # libraries we check for below, so use a different variable.
12106 # John Interrante, Karl Berry
12107 echo "$as_me:12107: checking for IceConnectionNumber in -lICE" >&5
12108 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12109 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12110 echo $ECHO_N "(cached) $ECHO_C" >&6
12112 ac_check_lib_save_LIBS=$LIBS
12113 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12114 cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12118 /* Override any gcc2 internal prototype to avoid an error. */
12122 /* We use char because int might match the return type of a gcc2
12123 builtin and then its argument prototype would still apply. */
12124 char IceConnectionNumber ();
12128 IceConnectionNumber ();
12133 rm -f conftest.$ac_objext conftest$ac_exeext
12134 if { (eval echo "$as_me:12134: \"$ac_link\"") >&5
12135 (eval $ac_link) 2>&5
12137 echo "$as_me:12137: \$? = $ac_status" >&5
12138 (exit $ac_status); } &&
12139 { ac_try='test -s conftest$ac_exeext'
12140 { (eval echo "$as_me:12140: \"$ac_try\"") >&5
12141 (eval $ac_try) 2>&5
12143 echo "$as_me:12143: \$? = $ac_status" >&5
12144 (exit $ac_status); }; }; then
12145 ac_cv_lib_ICE_IceConnectionNumber=yes
12147 echo "$as_me: failed program was:" >&5
12148 cat conftest.$ac_ext >&5
12149 ac_cv_lib_ICE_IceConnectionNumber=no
12151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12152 LIBS=$ac_check_lib_save_LIBS
12154 echo "$as_me:12154: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12155 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12156 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12157 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12160 LDFLAGS=$ac_save_LDFLAGS
12164 cf_x_athena=${cf_x_athena:-Xaw}
12166 echo "$as_me:12166: checking if you want to link with Xaw 3d library" >&5
12167 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12170 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12171 if test "${with_Xaw3d+set}" = set; then
12172 withval="$with_Xaw3d"
12175 if test "$withval" = yes ; then
12177 echo "$as_me:12177: result: yes" >&5
12178 echo "${ECHO_T}yes" >&6
12180 echo "$as_me:12180: result: no" >&5
12181 echo "${ECHO_T}no" >&6
12184 echo "$as_me:12184: checking if you want to link with Xaw 3d xft library" >&5
12185 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12188 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12189 if test "${with_Xaw3dxft+set}" = set; then
12190 withval="$with_Xaw3dxft"
12193 if test "$withval" = yes ; then
12194 cf_x_athena=Xaw3dxft
12195 echo "$as_me:12195: result: yes" >&5
12196 echo "${ECHO_T}yes" >&6
12198 echo "$as_me:12198: result: no" >&5
12199 echo "${ECHO_T}no" >&6
12202 echo "$as_me:12202: checking if you want to link with neXT Athena library" >&5
12203 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12206 # Check whether --with-neXtaw or --without-neXtaw was given.
12207 if test "${with_neXtaw+set}" = set; then
12208 withval="$with_neXtaw"
12211 if test "$withval" = yes ; then
12213 echo "$as_me:12213: result: yes" >&5
12214 echo "${ECHO_T}yes" >&6
12216 echo "$as_me:12216: result: no" >&5
12217 echo "${ECHO_T}no" >&6
12220 echo "$as_me:12220: checking if you want to link with Athena-Plus library" >&5
12221 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12224 # Check whether --with-XawPlus or --without-XawPlus was given.
12225 if test "${with_XawPlus+set}" = set; then
12226 withval="$with_XawPlus"
12229 if test "$withval" = yes ; then
12230 cf_x_athena=XawPlus
12231 echo "$as_me:12231: result: yes" >&5
12232 echo "${ECHO_T}yes" >&6
12234 echo "$as_me:12234: result: no" >&5
12235 echo "${ECHO_T}no" >&6
12240 if test "$PKG_CONFIG" != none ; then
12242 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12243 for cf_athena_pkg in \
12246 ${cf_x_athena}-devel \
12247 lib${cf_x_athena} \
12248 lib${cf_x_athena}-devel
12251 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12252 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12254 echo "${as_me:-configure}:12254: testing found package $cf_athena_pkg ..." 1>&5
12256 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12257 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12258 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12260 echo "${as_me:-configure}:12260: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12262 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12264 echo "${as_me:-configure}:12264: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12269 cf_new_extra_cppflags=
12271 for cf_add_cflags in $cf_pkgconfig_incs
12273 case $cf_fix_cppflags in
12275 case $cf_add_cflags in
12276 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12277 case $cf_add_cflags in
12279 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12281 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12282 && test -z "${cf_tst_cflags}" \
12283 && cf_fix_cppflags=yes
12285 if test $cf_fix_cppflags = yes ; then
12287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12291 elif test "${cf_tst_cflags}" = "\"'" ; then
12293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12300 case "$CPPFLAGS" in
12304 case $cf_add_cflags in
12306 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12308 CPPFLAGS=`echo "$CPPFLAGS" | \
12309 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12310 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12315 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12316 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12323 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12324 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12331 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12332 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12334 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12336 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12337 && test -z "${cf_tst_cflags}" \
12338 && cf_fix_cppflags=no
12343 if test -n "$cf_new_cflags" ; then
12345 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12346 CFLAGS="${CFLAGS}$cf_new_cflags"
12350 if test -n "$cf_new_cppflags" ; then
12352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12353 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12357 if test -n "$cf_new_extra_cppflags" ; then
12359 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12360 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12364 cf_add_libs="$cf_pkgconfig_libs"
12365 # Filter out duplicates - this happens with badly-designed ".pc" files...
12366 for cf_add_1lib in $LIBS
12368 for cf_add_2lib in $cf_add_libs
12370 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12376 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12378 LIBS="$cf_add_libs"
12380 cf_x_athena_lib="$cf_pkgconfig_libs"
12382 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12384 cat >>confdefs.h <<EOF
12385 #define $cf_x_athena_LIBS 1
12388 for cf_trim_lib in Xmu Xt X11
12391 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12392 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12393 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12395 echo "${as_me:-configure}:12395: testing ..trimmed $LIBS ..." 1>&5
12401 echo "$as_me:12401: checking for usable $cf_x_athena/Xmu package" >&5
12402 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12403 if test "${cf_cv_xaw_compat+set}" = set; then
12404 echo $ECHO_N "(cached) $ECHO_C" >&6
12407 cat >conftest.$ac_ext <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12411 #include <X11/Xmu/CharSet.h>
12417 int check = XmuCompareISOLatin1("big", "small")
12423 rm -f conftest.$ac_objext conftest$ac_exeext
12424 if { (eval echo "$as_me:12424: \"$ac_link\"") >&5
12425 (eval $ac_link) 2>&5
12427 echo "$as_me:12427: \$? = $ac_status" >&5
12428 (exit $ac_status); } &&
12429 { ac_try='test -s conftest$ac_exeext'
12430 { (eval echo "$as_me:12430: \"$ac_try\"") >&5
12431 (eval $ac_try) 2>&5
12433 echo "$as_me:12433: \$? = $ac_status" >&5
12434 (exit $ac_status); }; }; then
12435 cf_cv_xaw_compat=yes
12437 echo "$as_me: failed program was:" >&5
12438 cat conftest.$ac_ext >&5
12439 cf_cv_xaw_compat=no
12441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12443 echo "$as_me:12443: result: $cf_cv_xaw_compat" >&5
12444 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12446 if test "$cf_cv_xaw_compat" = no
12448 # workaround for broken ".pc" files...
12449 case "$cf_x_athena_lib" in
12453 test -n "$verbose" && echo " work around broken package" 1>&6
12455 echo "${as_me:-configure}:12455: testing work around broken package ..." 1>&5
12457 cf_save_xmu="$LIBS"
12458 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12460 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12461 test -n "$verbose" && echo " found package xmu" 1>&6
12463 echo "${as_me:-configure}:12463: testing found package xmu ..." 1>&5
12465 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12466 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12467 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12469 echo "${as_me:-configure}:12469: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12471 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12473 echo "${as_me:-configure}:12473: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12478 cf_new_extra_cppflags=
12480 for cf_add_cflags in $cf_pkgconfig_incs
12482 case $cf_fix_cppflags in
12484 case $cf_add_cflags in
12485 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12486 case $cf_add_cflags in
12488 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12491 && test -z "${cf_tst_cflags}" \
12492 && cf_fix_cppflags=yes
12494 if test $cf_fix_cppflags = yes ; then
12496 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12497 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12500 elif test "${cf_tst_cflags}" = "\"'" ; then
12502 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12503 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12509 case "$CPPFLAGS" in
12513 case $cf_add_cflags in
12515 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12517 CPPFLAGS=`echo "$CPPFLAGS" | \
12518 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12519 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12524 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12525 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12532 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12533 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12543 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12545 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12546 && test -z "${cf_tst_cflags}" \
12547 && cf_fix_cppflags=no
12552 if test -n "$cf_new_cflags" ; then
12554 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12555 CFLAGS="${CFLAGS}$cf_new_cflags"
12559 if test -n "$cf_new_cppflags" ; then
12561 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12562 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12566 if test -n "$cf_new_extra_cppflags" ; then
12568 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12569 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12573 cf_add_libs="$cf_pkgconfig_libs"
12574 # Filter out duplicates - this happens with badly-designed ".pc" files...
12575 for cf_add_1lib in $LIBS
12577 for cf_add_2lib in $cf_add_libs
12579 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12585 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12587 LIBS="$cf_add_libs"
12589 LIBS="$cf_save_xmu"
12591 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12593 echo "${as_me:-configure}:12593: testing ...before $LIBS ..." 1>&5
12595 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12596 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12598 echo "${as_me:-configure}:12598: testing ...after $LIBS ..." 1>&5
12604 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12606 echo "${as_me:-configure}:12606: testing ...before $LIBS ..." 1>&5
12608 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12609 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12611 echo "${as_me:-configure}:12611: testing ...after $LIBS ..." 1>&5
12615 for cf_trim_lib in Xmu Xt X11
12618 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12619 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12620 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12622 echo "${as_me:-configure}:12622: testing ..trimmed $LIBS ..." 1>&5
12642 if test -z "$cf_x_athena_lib" ; then
12644 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12645 test -n "$verbose" && echo " found package Xext" 1>&6
12647 echo "${as_me:-configure}:12647: testing found package Xext ..." 1>&5
12649 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12650 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12651 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12653 echo "${as_me:-configure}:12653: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12655 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12657 echo "${as_me:-configure}:12657: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12662 cf_new_extra_cppflags=
12664 for cf_add_cflags in $cf_pkgconfig_incs
12666 case $cf_fix_cppflags in
12668 case $cf_add_cflags in
12669 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12670 case $cf_add_cflags in
12672 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12674 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12675 && test -z "${cf_tst_cflags}" \
12676 && cf_fix_cppflags=yes
12678 if test $cf_fix_cppflags = yes ; then
12680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12684 elif test "${cf_tst_cflags}" = "\"'" ; then
12686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12693 case "$CPPFLAGS" in
12697 case $cf_add_cflags in
12699 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12701 CPPFLAGS=`echo "$CPPFLAGS" | \
12702 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12703 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12708 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12709 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12716 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12717 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12727 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12729 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12730 && test -z "${cf_tst_cflags}" \
12731 && cf_fix_cppflags=no
12736 if test -n "$cf_new_cflags" ; then
12738 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12739 CFLAGS="${CFLAGS}$cf_new_cflags"
12743 if test -n "$cf_new_cppflags" ; then
12745 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12746 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12750 if test -n "$cf_new_extra_cppflags" ; then
12752 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12753 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12757 cf_add_libs="$cf_pkgconfig_libs"
12758 # Filter out duplicates - this happens with badly-designed ".pc" files...
12759 for cf_add_1lib in $LIBS
12761 for cf_add_2lib in $cf_add_libs
12763 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12769 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12771 LIBS="$cf_add_libs"
12778 echo "$as_me:12778: checking for XextCreateExtension in -lXext" >&5
12779 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12780 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12781 echo $ECHO_N "(cached) $ECHO_C" >&6
12783 ac_check_lib_save_LIBS=$LIBS
12784 LIBS="-lXext $LIBS"
12785 cat >conftest.$ac_ext <<_ACEOF
12786 #line 12786 "configure"
12787 #include "confdefs.h"
12789 /* Override any gcc2 internal prototype to avoid an error. */
12793 /* We use char because int might match the return type of a gcc2
12794 builtin and then its argument prototype would still apply. */
12795 char XextCreateExtension ();
12799 XextCreateExtension ();
12804 rm -f conftest.$ac_objext conftest$ac_exeext
12805 if { (eval echo "$as_me:12805: \"$ac_link\"") >&5
12806 (eval $ac_link) 2>&5
12808 echo "$as_me:12808: \$? = $ac_status" >&5
12809 (exit $ac_status); } &&
12810 { ac_try='test -s conftest$ac_exeext'
12811 { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12814 echo "$as_me:12814: \$? = $ac_status" >&5
12815 (exit $ac_status); }; }; then
12816 ac_cv_lib_Xext_XextCreateExtension=yes
12818 echo "$as_me: failed program was:" >&5
12819 cat conftest.$ac_ext >&5
12820 ac_cv_lib_Xext_XextCreateExtension=no
12822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12823 LIBS=$ac_check_lib_save_LIBS
12825 echo "$as_me:12825: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12826 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12827 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12829 cf_add_libs="-lXext"
12830 # Filter out duplicates - this happens with badly-designed ".pc" files...
12831 for cf_add_1lib in $LIBS
12833 for cf_add_2lib in $cf_add_libs
12835 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12841 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12843 LIBS="$cf_add_libs"
12849 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12850 # in some cases has installed dummy files in the former, other cases replaced
12851 # it with a link to the new location). This complicates the configure script.
12852 # Check for that pitfall, and recover using pkg-config
12854 # If none of these are set, the configuration is almost certainly broken.
12855 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12858 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12859 test -n "$verbose" && echo " found package x11" 1>&6
12861 echo "${as_me:-configure}:12861: testing found package x11 ..." 1>&5
12863 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12864 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12865 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12867 echo "${as_me:-configure}:12867: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12869 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12871 echo "${as_me:-configure}:12871: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12876 cf_new_extra_cppflags=
12878 for cf_add_cflags in $cf_pkgconfig_incs
12880 case $cf_fix_cppflags in
12882 case $cf_add_cflags in
12883 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12884 case $cf_add_cflags in
12886 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12888 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12889 && test -z "${cf_tst_cflags}" \
12890 && cf_fix_cppflags=yes
12892 if test $cf_fix_cppflags = yes ; then
12894 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12895 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12898 elif test "${cf_tst_cflags}" = "\"'" ; then
12900 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12901 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12907 case "$CPPFLAGS" in
12911 case $cf_add_cflags in
12913 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12915 CPPFLAGS=`echo "$CPPFLAGS" | \
12916 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12917 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12922 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12923 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12930 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12931 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12938 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12939 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12941 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12943 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12944 && test -z "${cf_tst_cflags}" \
12945 && cf_fix_cppflags=no
12950 if test -n "$cf_new_cflags" ; then
12952 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12953 CFLAGS="${CFLAGS}$cf_new_cflags"
12957 if test -n "$cf_new_cppflags" ; then
12959 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12960 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12964 if test -n "$cf_new_extra_cppflags" ; then
12966 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12967 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12971 cf_add_libs="$cf_pkgconfig_libs"
12972 # Filter out duplicates - this happens with badly-designed ".pc" files...
12973 for cf_add_1lib in $LIBS
12975 for cf_add_2lib in $cf_add_libs
12977 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12985 LIBS="$cf_add_libs"
12991 { echo "$as_me:12991: WARNING: unable to find X11 library" >&5
12992 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12995 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12996 test -n "$verbose" && echo " found package ice" 1>&6
12998 echo "${as_me:-configure}:12998: testing found package ice ..." 1>&5
13000 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13001 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13002 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13004 echo "${as_me:-configure}:13004: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13006 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13008 echo "${as_me:-configure}:13008: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13013 cf_new_extra_cppflags=
13015 for cf_add_cflags in $cf_pkgconfig_incs
13017 case $cf_fix_cppflags in
13019 case $cf_add_cflags in
13020 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13021 case $cf_add_cflags in
13023 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13025 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13026 && test -z "${cf_tst_cflags}" \
13027 && cf_fix_cppflags=yes
13029 if test $cf_fix_cppflags = yes ; then
13031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13035 elif test "${cf_tst_cflags}" = "\"'" ; then
13037 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13038 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13044 case "$CPPFLAGS" in
13048 case $cf_add_cflags in
13050 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13052 CPPFLAGS=`echo "$CPPFLAGS" | \
13053 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13054 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13059 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13060 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13067 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13068 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13075 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13076 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13078 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13080 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13081 && test -z "${cf_tst_cflags}" \
13082 && cf_fix_cppflags=no
13087 if test -n "$cf_new_cflags" ; then
13089 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13090 CFLAGS="${CFLAGS}$cf_new_cflags"
13094 if test -n "$cf_new_cppflags" ; then
13096 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13097 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13101 if test -n "$cf_new_extra_cppflags" ; then
13103 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13104 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13108 cf_add_libs="$cf_pkgconfig_libs"
13109 # Filter out duplicates - this happens with badly-designed ".pc" files...
13110 for cf_add_1lib in $LIBS
13112 for cf_add_2lib in $cf_add_libs
13114 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13120 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13122 LIBS="$cf_add_libs"
13128 { echo "$as_me:13128: WARNING: unable to find ICE library" >&5
13129 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13132 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13133 test -n "$verbose" && echo " found package sm" 1>&6
13135 echo "${as_me:-configure}:13135: testing found package sm ..." 1>&5
13137 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13138 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13139 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13141 echo "${as_me:-configure}:13141: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13143 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13145 echo "${as_me:-configure}:13145: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13150 cf_new_extra_cppflags=
13152 for cf_add_cflags in $cf_pkgconfig_incs
13154 case $cf_fix_cppflags in
13156 case $cf_add_cflags in
13157 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13158 case $cf_add_cflags in
13160 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13162 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13163 && test -z "${cf_tst_cflags}" \
13164 && cf_fix_cppflags=yes
13166 if test $cf_fix_cppflags = yes ; then
13168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13172 elif test "${cf_tst_cflags}" = "\"'" ; then
13174 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13175 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13181 case "$CPPFLAGS" in
13185 case $cf_add_cflags in
13187 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13189 CPPFLAGS=`echo "$CPPFLAGS" | \
13190 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13191 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13196 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13197 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13204 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13205 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13215 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13218 && test -z "${cf_tst_cflags}" \
13219 && cf_fix_cppflags=no
13224 if test -n "$cf_new_cflags" ; then
13226 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13227 CFLAGS="${CFLAGS}$cf_new_cflags"
13231 if test -n "$cf_new_cppflags" ; then
13233 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13234 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13238 if test -n "$cf_new_extra_cppflags" ; then
13240 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13241 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13245 cf_add_libs="$cf_pkgconfig_libs"
13246 # Filter out duplicates - this happens with badly-designed ".pc" files...
13247 for cf_add_1lib in $LIBS
13249 for cf_add_2lib in $cf_add_libs
13251 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13259 LIBS="$cf_add_libs"
13265 { echo "$as_me:13265: WARNING: unable to find SM library" >&5
13266 echo "$as_me: WARNING: unable to find SM library" >&2;}
13269 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13270 test -n "$verbose" && echo " found package xt" 1>&6
13272 echo "${as_me:-configure}:13272: testing found package xt ..." 1>&5
13274 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13275 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13276 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13278 echo "${as_me:-configure}:13278: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13280 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13282 echo "${as_me:-configure}:13282: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13287 cf_new_extra_cppflags=
13289 for cf_add_cflags in $cf_pkgconfig_incs
13291 case $cf_fix_cppflags in
13293 case $cf_add_cflags in
13294 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13295 case $cf_add_cflags in
13297 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13300 && test -z "${cf_tst_cflags}" \
13301 && cf_fix_cppflags=yes
13303 if test $cf_fix_cppflags = yes ; then
13305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13309 elif test "${cf_tst_cflags}" = "\"'" ; then
13311 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13312 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13318 case "$CPPFLAGS" in
13322 case $cf_add_cflags in
13324 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13326 CPPFLAGS=`echo "$CPPFLAGS" | \
13327 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13328 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13333 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13334 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13341 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13342 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13349 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13350 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13352 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13354 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13355 && test -z "${cf_tst_cflags}" \
13356 && cf_fix_cppflags=no
13361 if test -n "$cf_new_cflags" ; then
13363 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13364 CFLAGS="${CFLAGS}$cf_new_cflags"
13368 if test -n "$cf_new_cppflags" ; then
13370 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13371 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13375 if test -n "$cf_new_extra_cppflags" ; then
13377 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13378 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13382 cf_add_libs="$cf_pkgconfig_libs"
13383 # Filter out duplicates - this happens with badly-designed ".pc" files...
13384 for cf_add_1lib in $LIBS
13386 for cf_add_2lib in $cf_add_libs
13388 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13394 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13396 LIBS="$cf_add_libs"
13402 { echo "$as_me:13402: WARNING: unable to find Xt library" >&5
13403 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13410 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13411 test -n "$verbose" && echo " found package xt" 1>&6
13413 echo "${as_me:-configure}:13413: testing found package xt ..." 1>&5
13415 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13416 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13417 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13419 echo "${as_me:-configure}:13419: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13421 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13423 echo "${as_me:-configure}:13423: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13428 cf_new_extra_cppflags=
13430 for cf_add_cflags in $cf_pkgconfig_incs
13432 case $cf_fix_cppflags in
13434 case $cf_add_cflags in
13435 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13436 case $cf_add_cflags in
13438 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13440 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13441 && test -z "${cf_tst_cflags}" \
13442 && cf_fix_cppflags=yes
13444 if test $cf_fix_cppflags = yes ; then
13446 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13447 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13450 elif test "${cf_tst_cflags}" = "\"'" ; then
13452 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13453 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13459 case "$CPPFLAGS" in
13463 case $cf_add_cflags in
13465 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13467 CPPFLAGS=`echo "$CPPFLAGS" | \
13468 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13469 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13474 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13475 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13482 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13483 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13490 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13491 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13493 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13496 && test -z "${cf_tst_cflags}" \
13497 && cf_fix_cppflags=no
13502 if test -n "$cf_new_cflags" ; then
13504 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13505 CFLAGS="${CFLAGS}$cf_new_cflags"
13509 if test -n "$cf_new_cppflags" ; then
13511 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13512 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13516 if test -n "$cf_new_extra_cppflags" ; then
13518 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13519 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13523 cf_add_libs="$cf_pkgconfig_libs"
13524 # Filter out duplicates - this happens with badly-designed ".pc" files...
13525 for cf_add_1lib in $LIBS
13527 for cf_add_2lib in $cf_add_libs
13529 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13535 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13537 LIBS="$cf_add_libs"
13543 # we have an "xt" package, but it may omit Xt's dependency on X11
13544 echo "$as_me:13544: checking for usable X dependency" >&5
13545 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13546 if test "${cf_cv_xt_x11_compat+set}" = set; then
13547 echo $ECHO_N "(cached) $ECHO_C" >&6
13550 cat >conftest.$ac_ext <<_ACEOF
13551 #line 13551 "configure"
13552 #include "confdefs.h"
13554 #include <X11/Xlib.h>
13560 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13561 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13562 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13563 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13569 rm -f conftest.$ac_objext conftest$ac_exeext
13570 if { (eval echo "$as_me:13570: \"$ac_link\"") >&5
13571 (eval $ac_link) 2>&5
13573 echo "$as_me:13573: \$? = $ac_status" >&5
13574 (exit $ac_status); } &&
13575 { ac_try='test -s conftest$ac_exeext'
13576 { (eval echo "$as_me:13576: \"$ac_try\"") >&5
13577 (eval $ac_try) 2>&5
13579 echo "$as_me:13579: \$? = $ac_status" >&5
13580 (exit $ac_status); }; }; then
13581 cf_cv_xt_x11_compat=yes
13583 echo "$as_me: failed program was:" >&5
13584 cat conftest.$ac_ext >&5
13585 cf_cv_xt_x11_compat=no
13587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13589 echo "$as_me:13589: result: $cf_cv_xt_x11_compat" >&5
13590 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13591 if test "$cf_cv_xt_x11_compat" = no
13593 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13595 echo "${as_me:-configure}:13595: testing work around broken X11 dependency ..." 1>&5
13597 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13599 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13600 test -n "$verbose" && echo " found package x11" 1>&6
13602 echo "${as_me:-configure}:13602: testing found package x11 ..." 1>&5
13604 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13605 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13606 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13608 echo "${as_me:-configure}:13608: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13610 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13612 echo "${as_me:-configure}:13612: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13617 cf_new_extra_cppflags=
13619 for cf_add_cflags in $cf_pkgconfig_incs
13621 case $cf_fix_cppflags in
13623 case $cf_add_cflags in
13624 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13625 case $cf_add_cflags in
13627 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13629 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13630 && test -z "${cf_tst_cflags}" \
13631 && cf_fix_cppflags=yes
13633 if test $cf_fix_cppflags = yes ; then
13635 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13636 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13639 elif test "${cf_tst_cflags}" = "\"'" ; then
13641 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13642 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13648 case "$CPPFLAGS" in
13652 case $cf_add_cflags in
13654 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13656 CPPFLAGS=`echo "$CPPFLAGS" | \
13657 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13658 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13663 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13664 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13671 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13672 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13679 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13680 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13682 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13684 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13685 && test -z "${cf_tst_cflags}" \
13686 && cf_fix_cppflags=no
13691 if test -n "$cf_new_cflags" ; then
13693 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13694 CFLAGS="${CFLAGS}$cf_new_cflags"
13698 if test -n "$cf_new_cppflags" ; then
13700 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13701 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13705 if test -n "$cf_new_extra_cppflags" ; then
13707 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13708 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13712 cf_add_libs="$cf_pkgconfig_libs"
13713 # Filter out duplicates - this happens with badly-designed ".pc" files...
13714 for cf_add_1lib in $LIBS
13716 for cf_add_2lib in $cf_add_libs
13718 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13724 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13726 LIBS="$cf_add_libs"
13733 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13735 echo "${as_me:-configure}:13735: testing ...before $LIBS ..." 1>&5
13737 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13738 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13740 echo "${as_me:-configure}:13740: testing ...after $LIBS ..." 1>&5
13748 echo "$as_me:13748: checking for usable X Toolkit package" >&5
13749 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13750 if test "${cf_cv_xt_ice_compat+set}" = set; then
13751 echo $ECHO_N "(cached) $ECHO_C" >&6
13754 cat >conftest.$ac_ext <<_ACEOF
13755 #line 13755 "configure"
13756 #include "confdefs.h"
13758 #include <X11/Shell.h>
13763 int num = IceConnectionNumber(0)
13769 rm -f conftest.$ac_objext conftest$ac_exeext
13770 if { (eval echo "$as_me:13770: \"$ac_link\"") >&5
13771 (eval $ac_link) 2>&5
13773 echo "$as_me:13773: \$? = $ac_status" >&5
13774 (exit $ac_status); } &&
13775 { ac_try='test -s conftest$ac_exeext'
13776 { (eval echo "$as_me:13776: \"$ac_try\"") >&5
13777 (eval $ac_try) 2>&5
13779 echo "$as_me:13779: \$? = $ac_status" >&5
13780 (exit $ac_status); }; }; then
13781 cf_cv_xt_ice_compat=yes
13783 echo "$as_me: failed program was:" >&5
13784 cat conftest.$ac_ext >&5
13785 cf_cv_xt_ice_compat=no
13787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13789 echo "$as_me:13789: result: $cf_cv_xt_ice_compat" >&5
13790 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13792 if test "$cf_cv_xt_ice_compat" = no
13794 # workaround for broken ".pc" files used for X Toolkit.
13795 case "x$X_PRE_LIBS" in
13801 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13803 echo "${as_me:-configure}:13803: testing work around broken ICE dependency ..." 1>&5
13805 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13806 test -n "$verbose" && echo " found package ice" 1>&6
13808 echo "${as_me:-configure}:13808: testing found package ice ..." 1>&5
13810 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13811 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13812 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13814 echo "${as_me:-configure}:13814: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13816 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13818 echo "${as_me:-configure}:13818: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13823 cf_new_extra_cppflags=
13825 for cf_add_cflags in $cf_pkgconfig_incs
13827 case $cf_fix_cppflags in
13829 case $cf_add_cflags in
13830 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13831 case $cf_add_cflags in
13833 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13835 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13836 && test -z "${cf_tst_cflags}" \
13837 && cf_fix_cppflags=yes
13839 if test $cf_fix_cppflags = yes ; then
13841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13845 elif test "${cf_tst_cflags}" = "\"'" ; then
13847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13854 case "$CPPFLAGS" in
13858 case $cf_add_cflags in
13860 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13862 CPPFLAGS=`echo "$CPPFLAGS" | \
13863 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13864 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13869 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13870 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13877 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13878 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13885 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13886 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13888 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13891 && test -z "${cf_tst_cflags}" \
13892 && cf_fix_cppflags=no
13897 if test -n "$cf_new_cflags" ; then
13899 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13900 CFLAGS="${CFLAGS}$cf_new_cflags"
13904 if test -n "$cf_new_cppflags" ; then
13906 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13907 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13911 if test -n "$cf_new_extra_cppflags" ; then
13913 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13914 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13918 cf_add_libs="$cf_pkgconfig_libs"
13919 # Filter out duplicates - this happens with badly-designed ".pc" files...
13920 for cf_add_1lib in $LIBS
13922 for cf_add_2lib in $cf_add_libs
13924 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13930 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13932 LIBS="$cf_add_libs"
13934 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13935 test -n "$verbose" && echo " found package sm" 1>&6
13937 echo "${as_me:-configure}:13937: testing found package sm ..." 1>&5
13939 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13940 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13941 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13943 echo "${as_me:-configure}:13943: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13945 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13947 echo "${as_me:-configure}:13947: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13952 cf_new_extra_cppflags=
13954 for cf_add_cflags in $cf_pkgconfig_incs
13956 case $cf_fix_cppflags in
13958 case $cf_add_cflags in
13959 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13960 case $cf_add_cflags in
13962 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13964 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13965 && test -z "${cf_tst_cflags}" \
13966 && cf_fix_cppflags=yes
13968 if test $cf_fix_cppflags = yes ; then
13970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13974 elif test "${cf_tst_cflags}" = "\"'" ; then
13976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13983 case "$CPPFLAGS" in
13987 case $cf_add_cflags in
13989 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13991 CPPFLAGS=`echo "$CPPFLAGS" | \
13992 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13993 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13998 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13999 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14006 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14007 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14017 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14020 && test -z "${cf_tst_cflags}" \
14021 && cf_fix_cppflags=no
14026 if test -n "$cf_new_cflags" ; then
14028 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14029 CFLAGS="${CFLAGS}$cf_new_cflags"
14033 if test -n "$cf_new_cppflags" ; then
14035 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14036 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14040 if test -n "$cf_new_extra_cppflags" ; then
14042 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14043 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14047 cf_add_libs="$cf_pkgconfig_libs"
14048 # Filter out duplicates - this happens with badly-designed ".pc" files...
14049 for cf_add_1lib in $LIBS
14051 for cf_add_2lib in $cf_add_libs
14053 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14059 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14061 LIBS="$cf_add_libs"
14074 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14076 echo "${as_me:-configure}:14076: testing ...before $LIBS ..." 1>&5
14078 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14079 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14081 echo "${as_me:-configure}:14081: testing ...after $LIBS ..." 1>&5
14097 LDFLAGS="$X_LIBS $LDFLAGS"
14099 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14101 echo "${as_me:-configure}:14101: testing checking additions to CFLAGS ..." 1>&5
14103 cf_check_cflags="$CFLAGS"
14104 cf_check_cppflags="$CPPFLAGS"
14109 cf_new_extra_cppflags=
14111 for cf_add_cflags in $X_CFLAGS
14113 case $cf_fix_cppflags in
14115 case $cf_add_cflags in
14116 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14117 case $cf_add_cflags in
14119 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14122 && test -z "${cf_tst_cflags}" \
14123 && cf_fix_cppflags=yes
14125 if test $cf_fix_cppflags = yes ; then
14127 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14128 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14131 elif test "${cf_tst_cflags}" = "\"'" ; then
14133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14140 case "$CPPFLAGS" in
14144 case $cf_add_cflags in
14146 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14148 CPPFLAGS=`echo "$CPPFLAGS" | \
14149 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14150 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14155 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14156 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14163 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14164 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14174 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14176 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14177 && test -z "${cf_tst_cflags}" \
14178 && cf_fix_cppflags=no
14183 if test -n "$cf_new_cflags" ; then
14184 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14186 echo "${as_me:-configure}:14186: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14188 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14189 CFLAGS="${CFLAGS}$cf_new_cflags"
14193 if test -n "$cf_new_cppflags" ; then
14194 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14196 echo "${as_me:-configure}:14196: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14199 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14203 if test -n "$cf_new_extra_cppflags" ; then
14204 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14206 echo "${as_me:-configure}:14206: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14208 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14209 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14213 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14214 cat >conftest.$ac_ext <<_ACEOF
14215 #line 14215 "configure"
14216 #include "confdefs.h"
14221 printf("Hello world");
14226 rm -f conftest.$ac_objext conftest$ac_exeext
14227 if { (eval echo "$as_me:14227: \"$ac_link\"") >&5
14228 (eval $ac_link) 2>&5
14230 echo "$as_me:14230: \$? = $ac_status" >&5
14231 (exit $ac_status); } &&
14232 { ac_try='test -s conftest$ac_exeext'
14233 { (eval echo "$as_me:14233: \"$ac_try\"") >&5
14234 (eval $ac_try) 2>&5
14236 echo "$as_me:14236: \$? = $ac_status" >&5
14237 (exit $ac_status); }; }; then
14240 echo "$as_me: failed program was:" >&5
14241 cat conftest.$ac_ext >&5
14242 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14244 echo "${as_me:-configure}:14244: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14246 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14247 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14249 echo "${as_me:-configure}:14249: testing but keeping change to \$CPPFLAGS ..." 1>&5
14252 CFLAGS="$cf_check_flags"
14254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14257 echo "$as_me:14257: checking for XOpenDisplay" >&5
14258 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14259 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14260 echo $ECHO_N "(cached) $ECHO_C" >&6
14262 cat >conftest.$ac_ext <<_ACEOF
14263 #line 14263 "configure"
14264 #include "confdefs.h"
14265 #define XOpenDisplay autoconf_temporary
14266 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14267 #undef XOpenDisplay
14273 /* We use char because int might match the return type of a gcc2
14274 builtin and then its argument prototype would still apply. */
14275 char XOpenDisplay (void);
14281 /* The GNU C library defines stubs for functions which it implements
14282 to always fail with ENOSYS. Some functions are actually named
14283 something starting with __ and the normal name is an alias. */
14284 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14285 #error found stub for XOpenDisplay
14288 return XOpenDisplay ();
14293 rm -f conftest.$ac_objext conftest$ac_exeext
14294 if { (eval echo "$as_me:14294: \"$ac_link\"") >&5
14295 (eval $ac_link) 2>&5
14297 echo "$as_me:14297: \$? = $ac_status" >&5
14298 (exit $ac_status); } &&
14299 { ac_try='test -s conftest$ac_exeext'
14300 { (eval echo "$as_me:14300: \"$ac_try\"") >&5
14301 (eval $ac_try) 2>&5
14303 echo "$as_me:14303: \$? = $ac_status" >&5
14304 (exit $ac_status); }; }; then
14305 ac_cv_func_XOpenDisplay=yes
14307 echo "$as_me: failed program was:" >&5
14308 cat conftest.$ac_ext >&5
14309 ac_cv_func_XOpenDisplay=no
14311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14313 echo "$as_me:14313: result: $ac_cv_func_XOpenDisplay" >&5
14314 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14315 if test $ac_cv_func_XOpenDisplay = yes; then
14319 echo "$as_me:14319: checking for XOpenDisplay in -lX11" >&5
14320 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14321 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14322 echo $ECHO_N "(cached) $ECHO_C" >&6
14324 ac_check_lib_save_LIBS=$LIBS
14325 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14326 cat >conftest.$ac_ext <<_ACEOF
14327 #line 14327 "configure"
14328 #include "confdefs.h"
14330 /* Override any gcc2 internal prototype to avoid an error. */
14334 /* We use char because int might match the return type of a gcc2
14335 builtin and then its argument prototype would still apply. */
14336 char XOpenDisplay ();
14345 rm -f conftest.$ac_objext conftest$ac_exeext
14346 if { (eval echo "$as_me:14346: \"$ac_link\"") >&5
14347 (eval $ac_link) 2>&5
14349 echo "$as_me:14349: \$? = $ac_status" >&5
14350 (exit $ac_status); } &&
14351 { ac_try='test -s conftest$ac_exeext'
14352 { (eval echo "$as_me:14352: \"$ac_try\"") >&5
14353 (eval $ac_try) 2>&5
14355 echo "$as_me:14355: \$? = $ac_status" >&5
14356 (exit $ac_status); }; }; then
14357 ac_cv_lib_X11_XOpenDisplay=yes
14359 echo "$as_me: failed program was:" >&5
14360 cat conftest.$ac_ext >&5
14361 ac_cv_lib_X11_XOpenDisplay=no
14363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14364 LIBS=$ac_check_lib_save_LIBS
14366 echo "$as_me:14366: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14367 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14368 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14370 cf_add_libs="-lX11"
14371 # Filter out duplicates - this happens with badly-designed ".pc" files...
14372 for cf_add_1lib in $LIBS
14374 for cf_add_2lib in $cf_add_libs
14376 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14382 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14384 LIBS="$cf_add_libs"
14390 echo "$as_me:14390: checking for XtAppInitialize" >&5
14391 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14392 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14393 echo $ECHO_N "(cached) $ECHO_C" >&6
14395 cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398 #define XtAppInitialize autoconf_temporary
14399 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14400 #undef XtAppInitialize
14406 /* We use char because int might match the return type of a gcc2
14407 builtin and then its argument prototype would still apply. */
14408 char XtAppInitialize (void);
14414 /* The GNU C library defines stubs for functions which it implements
14415 to always fail with ENOSYS. Some functions are actually named
14416 something starting with __ and the normal name is an alias. */
14417 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14418 #error found stub for XtAppInitialize
14421 return XtAppInitialize ();
14426 rm -f conftest.$ac_objext conftest$ac_exeext
14427 if { (eval echo "$as_me:14427: \"$ac_link\"") >&5
14428 (eval $ac_link) 2>&5
14430 echo "$as_me:14430: \$? = $ac_status" >&5
14431 (exit $ac_status); } &&
14432 { ac_try='test -s conftest$ac_exeext'
14433 { (eval echo "$as_me:14433: \"$ac_try\"") >&5
14434 (eval $ac_try) 2>&5
14436 echo "$as_me:14436: \$? = $ac_status" >&5
14437 (exit $ac_status); }; }; then
14438 ac_cv_func_XtAppInitialize=yes
14440 echo "$as_me: failed program was:" >&5
14441 cat conftest.$ac_ext >&5
14442 ac_cv_func_XtAppInitialize=no
14444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14446 echo "$as_me:14446: result: $ac_cv_func_XtAppInitialize" >&5
14447 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14448 if test $ac_cv_func_XtAppInitialize = yes; then
14452 echo "$as_me:14452: checking for XtAppInitialize in -lXt" >&5
14453 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14454 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
14457 ac_check_lib_save_LIBS=$LIBS
14458 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14459 cat >conftest.$ac_ext <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14463 /* Override any gcc2 internal prototype to avoid an error. */
14467 /* We use char because int might match the return type of a gcc2
14468 builtin and then its argument prototype would still apply. */
14469 char XtAppInitialize ();
14473 XtAppInitialize ();
14478 rm -f conftest.$ac_objext conftest$ac_exeext
14479 if { (eval echo "$as_me:14479: \"$ac_link\"") >&5
14480 (eval $ac_link) 2>&5
14482 echo "$as_me:14482: \$? = $ac_status" >&5
14483 (exit $ac_status); } &&
14484 { ac_try='test -s conftest$ac_exeext'
14485 { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486 (eval $ac_try) 2>&5
14488 echo "$as_me:14488: \$? = $ac_status" >&5
14489 (exit $ac_status); }; }; then
14490 ac_cv_lib_Xt_XtAppInitialize=yes
14492 echo "$as_me: failed program was:" >&5
14493 cat conftest.$ac_ext >&5
14494 ac_cv_lib_Xt_XtAppInitialize=no
14496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14497 LIBS=$ac_check_lib_save_LIBS
14499 echo "$as_me:14499: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14500 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14501 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14503 cat >>confdefs.h <<\EOF
14504 #define HAVE_LIBXT 1
14508 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14515 if test $cf_have_X_LIBS = no ; then
14516 { echo "$as_me:14516: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14517 test program. You will have to check and add the proper libraries by hand
14519 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14520 test program. You will have to check and add the proper libraries by hand
14521 to makefile." >&2;}
14524 cf_x_athena_root=$cf_x_athena
14527 for cf_path in default \
14528 /usr/contrib/X11R6 \
14529 /usr/contrib/X11R5 \
14533 if test -z "$cf_x_athena_inc" ; then
14534 cf_save="$CPPFLAGS"
14535 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14536 if test $cf_path != default ; then
14537 CPPFLAGS="$cf_save"
14539 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14540 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14542 echo "$as_me:14542: checking for $cf_test in $cf_path" >&5
14543 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14545 echo "$as_me:14545: checking for $cf_test" >&5
14546 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14548 cat >conftest.$ac_ext <<_ACEOF
14549 #line 14549 "configure"
14550 #include "confdefs.h"
14552 #include <X11/Intrinsic.h>
14553 #include <$cf_test>
14562 rm -f conftest.$ac_objext
14563 if { (eval echo "$as_me:14563: \"$ac_compile\"") >&5
14564 (eval $ac_compile) 2>&5
14566 echo "$as_me:14566: \$? = $ac_status" >&5
14567 (exit $ac_status); } &&
14568 { ac_try='test -s conftest.$ac_objext'
14569 { (eval echo "$as_me:14569: \"$ac_try\"") >&5
14570 (eval $ac_try) 2>&5
14572 echo "$as_me:14572: \$? = $ac_status" >&5
14573 (exit $ac_status); }; }; then
14576 echo "$as_me: failed program was:" >&5
14577 cat conftest.$ac_ext >&5
14580 rm -f conftest.$ac_objext conftest.$ac_ext
14581 echo "$as_me:14581: result: $cf_result" >&5
14582 echo "${ECHO_T}$cf_result" >&6
14583 if test "$cf_result" = yes ; then
14584 cf_x_athena_inc=$cf_path
14587 CPPFLAGS="$cf_save"
14592 if test -z "$cf_x_athena_inc" ; then
14593 { echo "$as_me:14593: WARNING: Unable to successfully find Athena header files with test program" >&5
14594 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14595 elif test "$cf_x_athena_inc" != default ; then
14597 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14598 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14602 cf_x_athena_root=$cf_x_athena
14605 for cf_path in default \
14606 /usr/contrib/X11R6 \
14607 /usr/contrib/X11R5 \
14612 ${cf_x_athena_root} \
14613 ${cf_x_athena_root}7 \
14614 ${cf_x_athena_root}6
14617 "-l$cf_lib -lXmu" \
14618 "-l$cf_lib -lXpm -lXmu" \
14619 "-l${cf_lib}_s -lXmu_s"
14621 if test -z "$cf_x_athena_lib" ; then
14623 cf_test=XawSimpleMenuAddGlobalActions
14624 if test $cf_path != default ; then
14626 cf_add_libs="-L$cf_path/lib $cf_libs"
14627 # Filter out duplicates - this happens with badly-designed ".pc" files...
14628 for cf_add_1lib in $LIBS
14630 for cf_add_2lib in $cf_add_libs
14632 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14638 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14640 LIBS="$cf_add_libs"
14642 echo "$as_me:14642: checking for $cf_libs in $cf_path" >&5
14643 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14646 cf_add_libs="$cf_libs"
14647 # Filter out duplicates - this happens with badly-designed ".pc" files...
14648 for cf_add_1lib in $LIBS
14650 for cf_add_2lib in $cf_add_libs
14652 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14658 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14660 LIBS="$cf_add_libs"
14662 echo "$as_me:14662: checking for $cf_test in $cf_libs" >&5
14663 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14665 cat >conftest.$ac_ext <<_ACEOF
14666 #line 14666 "configure"
14667 #include "confdefs.h"
14669 #include <X11/Intrinsic.h>
14670 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14676 $cf_test((XtAppContext) 0)
14681 rm -f conftest.$ac_objext conftest$ac_exeext
14682 if { (eval echo "$as_me:14682: \"$ac_link\"") >&5
14683 (eval $ac_link) 2>&5
14685 echo "$as_me:14685: \$? = $ac_status" >&5
14686 (exit $ac_status); } &&
14687 { ac_try='test -s conftest$ac_exeext'
14688 { (eval echo "$as_me:14688: \"$ac_try\"") >&5
14689 (eval $ac_try) 2>&5
14691 echo "$as_me:14691: \$? = $ac_status" >&5
14692 (exit $ac_status); }; }; then
14695 echo "$as_me: failed program was:" >&5
14696 cat conftest.$ac_ext >&5
14699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14700 echo "$as_me:14700: result: $cf_result" >&5
14701 echo "${ECHO_T}$cf_result" >&6
14702 if test "$cf_result" = yes ; then
14703 cf_x_athena_lib="$cf_libs"
14709 test -n "$cf_x_athena_lib" && break
14713 if test -z "$cf_x_athena_lib" ; then
14714 { { echo "$as_me:14714: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14715 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14716 { (exit 1); exit 1; }; }
14719 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14721 cat >>confdefs.h <<EOF
14722 #define $cf_x_athena_LIBS 1
14727 if test -n "$ac_tool_prefix"; then
14728 for ac_prog in xcurses-config
14730 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14731 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14732 echo "$as_me:14732: checking for $ac_word" >&5
14733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14734 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14737 if test -n "$XCURSES_CONFIG"; then
14738 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14740 ac_save_IFS=$IFS; IFS=$ac_path_separator
14742 for ac_dir in $ac_dummy; do
14744 test -z "$ac_dir" && ac_dir=.
14745 $as_executable_p "$ac_dir/$ac_word" || continue
14746 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14747 echo "$as_me:14747: found $ac_dir/$ac_word" >&5
14753 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14754 if test -n "$XCURSES_CONFIG"; then
14755 echo "$as_me:14755: result: $XCURSES_CONFIG" >&5
14756 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14758 echo "$as_me:14758: result: no" >&5
14759 echo "${ECHO_T}no" >&6
14762 test -n "$XCURSES_CONFIG" && break
14765 if test -z "$XCURSES_CONFIG"; then
14766 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14767 for ac_prog in xcurses-config
14769 # Extract the first word of "$ac_prog", so it can be a program name with args.
14770 set dummy $ac_prog; ac_word=$2
14771 echo "$as_me:14771: checking for $ac_word" >&5
14772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14773 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14774 echo $ECHO_N "(cached) $ECHO_C" >&6
14776 if test -n "$ac_ct_XCURSES_CONFIG"; then
14777 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14779 ac_save_IFS=$IFS; IFS=$ac_path_separator
14781 for ac_dir in $ac_dummy; do
14783 test -z "$ac_dir" && ac_dir=.
14784 $as_executable_p "$ac_dir/$ac_word" || continue
14785 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14786 echo "$as_me:14786: found $ac_dir/$ac_word" >&5
14792 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14793 if test -n "$ac_ct_XCURSES_CONFIG"; then
14794 echo "$as_me:14794: result: $ac_ct_XCURSES_CONFIG" >&5
14795 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14797 echo "$as_me:14797: result: no" >&5
14798 echo "${ECHO_T}no" >&6
14801 test -n "$ac_ct_XCURSES_CONFIG" && break
14803 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14805 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14808 if test "$XCURSES_CONFIG" != none ; then
14813 cf_new_extra_cppflags=
14815 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14817 case $cf_fix_cppflags in
14819 case $cf_add_cflags in
14820 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14821 case $cf_add_cflags in
14823 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14825 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14826 && test -z "${cf_tst_cflags}" \
14827 && cf_fix_cppflags=yes
14829 if test $cf_fix_cppflags = yes ; then
14831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14835 elif test "${cf_tst_cflags}" = "\"'" ; then
14837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14844 case "$CPPFLAGS" in
14848 case $cf_add_cflags in
14850 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14852 CPPFLAGS=`echo "$CPPFLAGS" | \
14853 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14854 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14859 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14860 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14867 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14868 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14878 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14880 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14881 && test -z "${cf_tst_cflags}" \
14882 && cf_fix_cppflags=no
14887 if test -n "$cf_new_cflags" ; then
14889 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14890 CFLAGS="${CFLAGS}$cf_new_cflags"
14894 if test -n "$cf_new_cppflags" ; then
14896 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14897 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14901 if test -n "$cf_new_extra_cppflags" ; then
14903 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14904 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14908 cf_add_libs="`$XCURSES_CONFIG --libs`"
14909 # Filter out duplicates - this happens with badly-designed ".pc" files...
14910 for cf_add_1lib in $LIBS
14912 for cf_add_2lib in $cf_add_libs
14914 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14920 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14922 LIBS="$cf_add_libs"
14924 cf_cv_lib_XCurses=yes
14928 LDFLAGS="$LDFLAGS $X_LIBS"
14930 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14932 echo "${as_me:-configure}:14932: testing checking additions to CFLAGS ..." 1>&5
14934 cf_check_cflags="$CFLAGS"
14935 cf_check_cppflags="$CPPFLAGS"
14940 cf_new_extra_cppflags=
14942 for cf_add_cflags in $X_CFLAGS
14944 case $cf_fix_cppflags in
14946 case $cf_add_cflags in
14947 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14948 case $cf_add_cflags in
14950 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14952 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14953 && test -z "${cf_tst_cflags}" \
14954 && cf_fix_cppflags=yes
14956 if test $cf_fix_cppflags = yes ; then
14958 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14959 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14962 elif test "${cf_tst_cflags}" = "\"'" ; then
14964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14971 case "$CPPFLAGS" in
14975 case $cf_add_cflags in
14977 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14979 CPPFLAGS=`echo "$CPPFLAGS" | \
14980 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14981 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14986 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14987 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14994 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14995 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15002 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15003 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15005 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15007 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15008 && test -z "${cf_tst_cflags}" \
15009 && cf_fix_cppflags=no
15014 if test -n "$cf_new_cflags" ; then
15015 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15017 echo "${as_me:-configure}:15017: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15019 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15020 CFLAGS="${CFLAGS}$cf_new_cflags"
15024 if test -n "$cf_new_cppflags" ; then
15025 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15027 echo "${as_me:-configure}:15027: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15029 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15030 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15034 if test -n "$cf_new_extra_cppflags" ; then
15035 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15037 echo "${as_me:-configure}:15037: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15039 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15040 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15044 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15045 cat >conftest.$ac_ext <<_ACEOF
15046 #line 15046 "configure"
15047 #include "confdefs.h"
15052 printf("Hello world");
15057 rm -f conftest.$ac_objext conftest$ac_exeext
15058 if { (eval echo "$as_me:15058: \"$ac_link\"") >&5
15059 (eval $ac_link) 2>&5
15061 echo "$as_me:15061: \$? = $ac_status" >&5
15062 (exit $ac_status); } &&
15063 { ac_try='test -s conftest$ac_exeext'
15064 { (eval echo "$as_me:15064: \"$ac_try\"") >&5
15065 (eval $ac_try) 2>&5
15067 echo "$as_me:15067: \$? = $ac_status" >&5
15068 (exit $ac_status); }; }; then
15071 echo "$as_me: failed program was:" >&5
15072 cat conftest.$ac_ext >&5
15073 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15075 echo "${as_me:-configure}:15075: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15077 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15078 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15080 echo "${as_me:-configure}:15080: testing but keeping change to \$CPPFLAGS ..." 1>&5
15083 CFLAGS="$cf_check_flags"
15085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15088 echo "$as_me:15088: checking for XOpenDisplay in -lX11" >&5
15089 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15090 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15091 echo $ECHO_N "(cached) $ECHO_C" >&6
15093 ac_check_lib_save_LIBS=$LIBS
15094 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15095 cat >conftest.$ac_ext <<_ACEOF
15096 #line 15096 "configure"
15097 #include "confdefs.h"
15099 /* Override any gcc2 internal prototype to avoid an error. */
15103 /* We use char because int might match the return type of a gcc2
15104 builtin and then its argument prototype would still apply. */
15105 char XOpenDisplay ();
15114 rm -f conftest.$ac_objext conftest$ac_exeext
15115 if { (eval echo "$as_me:15115: \"$ac_link\"") >&5
15116 (eval $ac_link) 2>&5
15118 echo "$as_me:15118: \$? = $ac_status" >&5
15119 (exit $ac_status); } &&
15120 { ac_try='test -s conftest$ac_exeext'
15121 { (eval echo "$as_me:15121: \"$ac_try\"") >&5
15122 (eval $ac_try) 2>&5
15124 echo "$as_me:15124: \$? = $ac_status" >&5
15125 (exit $ac_status); }; }; then
15126 ac_cv_lib_X11_XOpenDisplay=yes
15128 echo "$as_me: failed program was:" >&5
15129 cat conftest.$ac_ext >&5
15130 ac_cv_lib_X11_XOpenDisplay=no
15132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15133 LIBS=$ac_check_lib_save_LIBS
15135 echo "$as_me:15135: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15136 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15137 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15139 cf_add_libs="-lX11"
15140 # Filter out duplicates - this happens with badly-designed ".pc" files...
15141 for cf_add_1lib in $LIBS
15143 for cf_add_2lib in $cf_add_libs
15145 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15151 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15153 LIBS="$cf_add_libs"
15157 echo "$as_me:15157: checking for XCurses library" >&5
15158 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15159 if test "${cf_cv_lib_XCurses+set}" = set; then
15160 echo $ECHO_N "(cached) $ECHO_C" >&6
15163 cf_add_libs="-lXCurses"
15164 # Filter out duplicates - this happens with badly-designed ".pc" files...
15165 for cf_add_1lib in $LIBS
15167 for cf_add_2lib in $cf_add_libs
15169 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15175 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15177 LIBS="$cf_add_libs"
15179 cat >conftest.$ac_ext <<_ACEOF
15180 #line 15180 "configure"
15181 #include "confdefs.h"
15183 #include <xcurses.h>
15184 char *XCursesProgramName = "test";
15194 rm -f conftest.$ac_objext conftest$ac_exeext
15195 if { (eval echo "$as_me:15195: \"$ac_link\"") >&5
15196 (eval $ac_link) 2>&5
15198 echo "$as_me:15198: \$? = $ac_status" >&5
15199 (exit $ac_status); } &&
15200 { ac_try='test -s conftest$ac_exeext'
15201 { (eval echo "$as_me:15201: \"$ac_try\"") >&5
15202 (eval $ac_try) 2>&5
15204 echo "$as_me:15204: \$? = $ac_status" >&5
15205 (exit $ac_status); }; }; then
15206 cf_cv_lib_XCurses=yes
15208 echo "$as_me: failed program was:" >&5
15209 cat conftest.$ac_ext >&5
15210 cf_cv_lib_XCurses=no
15212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15215 echo "$as_me:15215: result: $cf_cv_lib_XCurses" >&5
15216 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15220 if test $cf_cv_lib_XCurses = yes ; then
15222 cat >>confdefs.h <<\EOF
15226 cat >>confdefs.h <<\EOF
15230 echo "$as_me:15230: checking for xcurses.h" >&5
15231 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15232 if test "${ac_cv_header_xcurses_h+set}" = set; then
15233 echo $ECHO_N "(cached) $ECHO_C" >&6
15235 cat >conftest.$ac_ext <<_ACEOF
15236 #line 15236 "configure"
15237 #include "confdefs.h"
15238 #include <xcurses.h>
15240 if { (eval echo "$as_me:15240: \"$ac_cpp conftest.$ac_ext\"") >&5
15241 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15243 egrep -v '^ *\+' conftest.er1 >conftest.err
15245 cat conftest.err >&5
15246 echo "$as_me:15246: \$? = $ac_status" >&5
15247 (exit $ac_status); } >/dev/null; then
15248 if test -s conftest.err; then
15249 ac_cpp_err=$ac_c_preproc_warn_flag
15256 if test -z "$ac_cpp_err"; then
15257 ac_cv_header_xcurses_h=yes
15259 echo "$as_me: failed program was:" >&5
15260 cat conftest.$ac_ext >&5
15261 ac_cv_header_xcurses_h=no
15263 rm -f conftest.err conftest.$ac_ext
15265 echo "$as_me:15265: result: $ac_cv_header_xcurses_h" >&5
15266 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15267 if test $ac_cv_header_xcurses_h = yes; then
15269 cat >>confdefs.h <<\EOF
15270 #define HAVE_XCURSES 1
15276 { { echo "$as_me:15276: error: Cannot link with XCurses" >&5
15277 echo "$as_me: error: Cannot link with XCurses" >&2;}
15278 { (exit 1); exit 1; }; }
15283 { { echo "$as_me:15283: error: unexpected screen-value: $cf_cv_screen" >&5
15284 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15285 { (exit 1); exit 1; }; }
15289 : ${cf_nculib_root:=$cf_cv_screen}
15290 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15291 echo "$as_me:15291: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15292 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15293 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15294 echo $ECHO_N "(cached) $ECHO_C" >&6
15296 ac_check_lib_save_LIBS=$LIBS
15297 LIBS="-l$cf_nculib_root $LIBS"
15298 cat >conftest.$ac_ext <<_ACEOF
15299 #line 15299 "configure"
15300 #include "confdefs.h"
15302 /* Override any gcc2 internal prototype to avoid an error. */
15306 /* We use char because int might match the return type of a gcc2
15307 builtin and then its argument prototype would still apply. */
15308 char _nc_init_pthreads ();
15312 _nc_init_pthreads ();
15317 rm -f conftest.$ac_objext conftest$ac_exeext
15318 if { (eval echo "$as_me:15318: \"$ac_link\"") >&5
15319 (eval $ac_link) 2>&5
15321 echo "$as_me:15321: \$? = $ac_status" >&5
15322 (exit $ac_status); } &&
15323 { ac_try='test -s conftest$ac_exeext'
15324 { (eval echo "$as_me:15324: \"$ac_try\"") >&5
15325 (eval $ac_try) 2>&5
15327 echo "$as_me:15327: \$? = $ac_status" >&5
15328 (exit $ac_status); }; }; then
15329 eval "$as_ac_Lib=yes"
15331 echo "$as_me: failed program was:" >&5
15332 cat conftest.$ac_ext >&5
15333 eval "$as_ac_Lib=no"
15335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15336 LIBS=$ac_check_lib_save_LIBS
15338 echo "$as_me:15338: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15339 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15340 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15341 cf_cv_ncurses_pthreads=yes
15343 cf_cv_ncurses_pthreads=no
15346 if test "$cf_cv_ncurses_pthreads" = yes
15349 cf_add_libs="-lpthread"
15350 # Filter out duplicates - this happens with badly-designed ".pc" files...
15351 for cf_add_1lib in $LIBS
15353 for cf_add_2lib in $cf_add_libs
15355 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15361 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15363 LIBS="$cf_add_libs"
15367 case $cf_cv_screen in
15369 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15373 echo "$as_me:15373: checking for X11 rgb file" >&5
15374 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15376 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15377 if test "${with_x11_rgb+set}" = set; then
15378 withval="$with_x11_rgb"
15384 if test "x$RGB_PATH" = xauto
15386 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15388 /opt/local/share/X11/rgb.txt \
15389 /opt/X11/share/X11/rgb.txt \
15390 /usr/share/X11/rgb.txt \
15391 /usr/X11/share/X11/rgb.txt \
15392 /usr/X11/lib/X11/rgb.txt \
15393 /usr/lib/X11/rgb.txt \
15395 /usr/pkg/lib/X11/rgb.txt \
15396 /usr/X11R7/lib/X11/rgb.txt \
15397 /usr/X11R6/lib/X11/rgb.txt \
15398 /usr/X11R5/lib/X11/rgb.txt \
15399 /usr/X11R4/lib/X11/rgb.txt \
15400 /usr/local/lib/X11/rgb.txt \
15401 /usr/local/share/X11/rgb.txt \
15402 /usr/lib64/X11/rgb.txt
15404 if test -f "$cf_path" ; then
15405 RGB_PATH="$cf_path"
15412 if test "x$prefix" != xNONE; then
15413 cf_path_syntax="$prefix"
15415 cf_path_syntax="$ac_default_prefix"
15418 case ".$cf_path" in
15419 (.\$\(*\)*|.\'*\'*)
15423 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15425 (.\${*prefix}*|.\${*dir}*)
15426 eval cf_path="$cf_path"
15427 case ".$cf_path" in
15429 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15434 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15437 { { echo "$as_me:15437: error: expected a pathname, not \"$cf_path\"" >&5
15438 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15439 { (exit 1); exit 1; }; }
15445 echo "$as_me:15445: result: $RGB_PATH" >&5
15446 echo "${ECHO_T}$RGB_PATH" >&6
15448 cat >>confdefs.h <<EOF
15449 #define RGB_PATH "$cf_path"
15453 if test "$RGB_PATH" = no
15460 case $cf_cv_screen in
15462 cf_default_panel=no
15465 cf_default_tinfo=no
15467 (xcurses|bsdcurses)
15468 cf_default_panel=no
15471 cf_default_tinfo=yes
15474 cf_default_panel=yes
15475 cf_default_form=yes
15476 cf_default_menu=yes
15477 cf_default_tinfo=yes
15478 case $cf_cv_screen in
15480 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15486 echo "$as_me:15486: checking if you want to check for panel functions" >&5
15487 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15489 # Check whether --enable-panel or --disable-panel was given.
15490 if test "${enable_panel+set}" = set; then
15491 enableval="$enable_panel"
15492 test "$enableval" != no && enableval=yes
15493 if test "$enableval" != "yes" ; then
15496 cf_enable_panel=$cf_default_panel
15500 cf_enable_panel=$cf_default_panel
15503 echo "$as_me:15503: result: $cf_enable_panel" >&5
15504 echo "${ECHO_T}$cf_enable_panel" >&6
15505 if test $cf_enable_panel = yes
15508 cf_have_curses_lib=no
15510 : ${NCURSES_CONFIG_PKG:=none}
15511 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15513 elif test "x${PKG_CONFIG:=none}" != xnone; then
15514 echo "$as_me:15514: checking pkg-config for panel$cf_cv_libtype" >&5
15515 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15516 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15517 echo "$as_me:15517: result: yes" >&5
15518 echo "${ECHO_T}yes" >&6
15520 echo "$as_me:15520: checking if the panel$cf_cv_libtype package files work" >&5
15521 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15523 cf_save_CPPFLAGS="$CPPFLAGS"
15524 cf_save_LIBS="$LIBS"
15529 cf_new_extra_cppflags=
15531 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15533 case $cf_fix_cppflags in
15535 case $cf_add_cflags in
15536 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15537 case $cf_add_cflags in
15539 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15542 && test -z "${cf_tst_cflags}" \
15543 && cf_fix_cppflags=yes
15545 if test $cf_fix_cppflags = yes ; then
15547 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15548 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15551 elif test "${cf_tst_cflags}" = "\"'" ; then
15553 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15554 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15560 case "$CPPFLAGS" in
15564 case $cf_add_cflags in
15566 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15568 CPPFLAGS=`echo "$CPPFLAGS" | \
15569 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15570 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15575 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15576 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15583 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15584 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15591 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15592 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15594 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15596 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15597 && test -z "${cf_tst_cflags}" \
15598 && cf_fix_cppflags=no
15603 if test -n "$cf_new_cflags" ; then
15605 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15606 CFLAGS="${CFLAGS}$cf_new_cflags"
15610 if test -n "$cf_new_cppflags" ; then
15612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15613 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15617 if test -n "$cf_new_extra_cppflags" ; then
15619 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15620 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15624 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15625 # Filter out duplicates - this happens with badly-designed ".pc" files...
15626 for cf_add_1lib in $LIBS
15628 for cf_add_2lib in $cf_add_libs
15630 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15636 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15638 LIBS="$cf_add_libs"
15640 cat >conftest.$ac_ext <<_ACEOF
15641 #line 15641 "configure"
15642 #include "confdefs.h"
15647 (void) new_panel ( 0 );
15652 rm -f conftest.$ac_objext conftest$ac_exeext
15653 if { (eval echo "$as_me:15653: \"$ac_link\"") >&5
15654 (eval $ac_link) 2>&5
15656 echo "$as_me:15656: \$? = $ac_status" >&5
15657 (exit $ac_status); } &&
15658 { ac_try='test -s conftest$ac_exeext'
15659 { (eval echo "$as_me:15659: \"$ac_try\"") >&5
15660 (eval $ac_try) 2>&5
15662 echo "$as_me:15662: \$? = $ac_status" >&5
15663 (exit $ac_status); }; }; then
15664 if test "$cross_compiling" = yes; then
15665 cf_have_curses_lib=maybe
15667 cat >conftest.$ac_ext <<_ACEOF
15668 #line 15668 "configure"
15669 #include "confdefs.h"
15672 { (void) new_panel ( 0 ); return 0; }
15674 rm -f conftest$ac_exeext
15675 if { (eval echo "$as_me:15675: \"$ac_link\"") >&5
15676 (eval $ac_link) 2>&5
15678 echo "$as_me:15678: \$? = $ac_status" >&5
15679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15680 { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681 (eval $ac_try) 2>&5
15683 echo "$as_me:15683: \$? = $ac_status" >&5
15684 (exit $ac_status); }; }; then
15685 cf_have_curses_lib=yes
15687 echo "$as_me: program exited with status $ac_status" >&5
15688 echo "$as_me: failed program was:" >&5
15689 cat conftest.$ac_ext >&5
15690 cf_have_curses_lib=no
15692 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15695 echo "$as_me: failed program was:" >&5
15696 cat conftest.$ac_ext >&5
15697 cf_have_curses_lib=no
15699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15700 echo "$as_me:15700: result: $cf_have_curses_lib" >&5
15701 echo "${ECHO_T}$cf_have_curses_lib" >&6
15702 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15703 if test "$cf_have_curses_lib" != "yes"
15705 CPPFLAGS="$cf_save_CPPFLAGS"
15706 LIBS="$cf_save_LIBS"
15709 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15711 cat >>confdefs.h <<EOF
15712 #define $cf_upper 1
15718 if test "$cf_have_curses_lib" = no; then
15719 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15720 echo "$as_me:15720: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15721 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15722 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15723 echo $ECHO_N "(cached) $ECHO_C" >&6
15725 ac_check_lib_save_LIBS=$LIBS
15726 LIBS="-lpanel$cf_cv_libtype $LIBS"
15727 cat >conftest.$ac_ext <<_ACEOF
15728 #line 15728 "configure"
15729 #include "confdefs.h"
15731 /* Override any gcc2 internal prototype to avoid an error. */
15735 /* We use char because int might match the return type of a gcc2
15736 builtin and then its argument prototype would still apply. */
15746 rm -f conftest.$ac_objext conftest$ac_exeext
15747 if { (eval echo "$as_me:15747: \"$ac_link\"") >&5
15748 (eval $ac_link) 2>&5
15750 echo "$as_me:15750: \$? = $ac_status" >&5
15751 (exit $ac_status); } &&
15752 { ac_try='test -s conftest$ac_exeext'
15753 { (eval echo "$as_me:15753: \"$ac_try\"") >&5
15754 (eval $ac_try) 2>&5
15756 echo "$as_me:15756: \$? = $ac_status" >&5
15757 (exit $ac_status); }; }; then
15758 eval "$as_ac_Lib=yes"
15760 echo "$as_me: failed program was:" >&5
15761 cat conftest.$ac_ext >&5
15762 eval "$as_ac_Lib=no"
15764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15765 LIBS=$ac_check_lib_save_LIBS
15767 echo "$as_me:15767: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15768 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15769 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15771 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15773 cf_add_libs="-lpanel$cf_cv_libtype"
15774 # Filter out duplicates - this happens with badly-designed ".pc" files...
15775 for cf_add_1lib in $LIBS
15777 for cf_add_2lib in $cf_add_libs
15779 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15785 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15787 LIBS="$cf_add_libs"
15789 cat >>confdefs.h <<EOF
15790 #define $cf_upper 1
15797 cf_curses_headers="$cf_curses_headers panel.h"
15800 echo "$as_me:15800: checking if you want to check for menu functions" >&5
15801 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15803 # Check whether --enable-menu or --disable-menu was given.
15804 if test "${enable_menu+set}" = set; then
15805 enableval="$enable_menu"
15806 test "$enableval" != no && enableval=yes
15807 if test "$enableval" != "yes" ; then
15810 cf_enable_menu=$cf_default_menu
15814 cf_enable_menu=$cf_default_menu
15817 echo "$as_me:15817: result: $cf_enable_menu" >&5
15818 echo "${ECHO_T}$cf_enable_menu" >&6
15819 if test $cf_enable_menu = yes
15821 case $cf_cv_screen in
15826 echo "$as_me:15826: checking for NetBSD menu.h" >&5
15827 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15828 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15829 echo $ECHO_N "(cached) $ECHO_C" >&6
15832 cat >conftest.$ac_ext <<_ACEOF
15833 #line 15833 "configure"
15834 #include "confdefs.h"
15836 #include <${cf_cv_ncurses_header:-curses.h}>
15844 int y = menu->max_item_width;
15850 rm -f conftest.$ac_objext
15851 if { (eval echo "$as_me:15851: \"$ac_compile\"") >&5
15852 (eval $ac_compile) 2>&5
15854 echo "$as_me:15854: \$? = $ac_status" >&5
15855 (exit $ac_status); } &&
15856 { ac_try='test -s conftest.$ac_objext'
15857 { (eval echo "$as_me:15857: \"$ac_try\"") >&5
15858 (eval $ac_try) 2>&5
15860 echo "$as_me:15860: \$? = $ac_status" >&5
15861 (exit $ac_status); }; }; then
15862 cf_cv_netbsd_menu_h=yes
15865 echo "$as_me: failed program was:" >&5
15866 cat conftest.$ac_ext >&5
15867 cf_cv_netbsd_menu_h=no
15869 rm -f conftest.$ac_objext conftest.$ac_ext
15872 echo "$as_me:15872: result: $cf_cv_netbsd_menu_h" >&5
15873 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15875 test "$cf_cv_netbsd_menu_h" = yes &&
15876 cat >>confdefs.h <<\EOF
15877 #define HAVE_NETBSD_MENU_H 1
15883 cf_have_curses_lib=no
15885 : ${NCURSES_CONFIG_PKG:=none}
15886 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15888 elif test "x${PKG_CONFIG:=none}" != xnone; then
15889 echo "$as_me:15889: checking pkg-config for menu$cf_cv_libtype" >&5
15890 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15891 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15892 echo "$as_me:15892: result: yes" >&5
15893 echo "${ECHO_T}yes" >&6
15895 echo "$as_me:15895: checking if the menu$cf_cv_libtype package files work" >&5
15896 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
15898 cf_save_CPPFLAGS="$CPPFLAGS"
15899 cf_save_LIBS="$LIBS"
15904 cf_new_extra_cppflags=
15906 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
15908 case $cf_fix_cppflags in
15910 case $cf_add_cflags in
15911 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15912 case $cf_add_cflags in
15914 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15916 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15917 && test -z "${cf_tst_cflags}" \
15918 && cf_fix_cppflags=yes
15920 if test $cf_fix_cppflags = yes ; then
15922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15926 elif test "${cf_tst_cflags}" = "\"'" ; then
15928 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15929 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15935 case "$CPPFLAGS" in
15939 case $cf_add_cflags in
15941 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15943 CPPFLAGS=`echo "$CPPFLAGS" | \
15944 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15945 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15950 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15951 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15958 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15959 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15966 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15967 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15969 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15971 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15972 && test -z "${cf_tst_cflags}" \
15973 && cf_fix_cppflags=no
15978 if test -n "$cf_new_cflags" ; then
15980 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15981 CFLAGS="${CFLAGS}$cf_new_cflags"
15985 if test -n "$cf_new_cppflags" ; then
15987 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15988 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15992 if test -n "$cf_new_extra_cppflags" ; then
15994 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15995 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15999 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
16000 # Filter out duplicates - this happens with badly-designed ".pc" files...
16001 for cf_add_1lib in $LIBS
16003 for cf_add_2lib in $cf_add_libs
16005 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16011 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16013 LIBS="$cf_add_libs"
16015 cat >conftest.$ac_ext <<_ACEOF
16016 #line 16016 "configure"
16017 #include "confdefs.h"
16022 (void) menu_driver ( 0,0 );
16027 rm -f conftest.$ac_objext conftest$ac_exeext
16028 if { (eval echo "$as_me:16028: \"$ac_link\"") >&5
16029 (eval $ac_link) 2>&5
16031 echo "$as_me:16031: \$? = $ac_status" >&5
16032 (exit $ac_status); } &&
16033 { ac_try='test -s conftest$ac_exeext'
16034 { (eval echo "$as_me:16034: \"$ac_try\"") >&5
16035 (eval $ac_try) 2>&5
16037 echo "$as_me:16037: \$? = $ac_status" >&5
16038 (exit $ac_status); }; }; then
16039 if test "$cross_compiling" = yes; then
16040 cf_have_curses_lib=maybe
16042 cat >conftest.$ac_ext <<_ACEOF
16043 #line 16043 "configure"
16044 #include "confdefs.h"
16047 { (void) menu_driver ( 0,0 ); return 0; }
16049 rm -f conftest$ac_exeext
16050 if { (eval echo "$as_me:16050: \"$ac_link\"") >&5
16051 (eval $ac_link) 2>&5
16053 echo "$as_me:16053: \$? = $ac_status" >&5
16054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16055 { (eval echo "$as_me:16055: \"$ac_try\"") >&5
16056 (eval $ac_try) 2>&5
16058 echo "$as_me:16058: \$? = $ac_status" >&5
16059 (exit $ac_status); }; }; then
16060 cf_have_curses_lib=yes
16062 echo "$as_me: program exited with status $ac_status" >&5
16063 echo "$as_me: failed program was:" >&5
16064 cat conftest.$ac_ext >&5
16065 cf_have_curses_lib=no
16067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16070 echo "$as_me: failed program was:" >&5
16071 cat conftest.$ac_ext >&5
16072 cf_have_curses_lib=no
16074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16075 echo "$as_me:16075: result: $cf_have_curses_lib" >&5
16076 echo "${ECHO_T}$cf_have_curses_lib" >&6
16077 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16078 if test "$cf_have_curses_lib" != "yes"
16080 CPPFLAGS="$cf_save_CPPFLAGS"
16081 LIBS="$cf_save_LIBS"
16084 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16086 cat >>confdefs.h <<EOF
16087 #define $cf_upper 1
16093 if test "$cf_have_curses_lib" = no; then
16094 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16095 echo "$as_me:16095: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16096 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16097 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16098 echo $ECHO_N "(cached) $ECHO_C" >&6
16100 ac_check_lib_save_LIBS=$LIBS
16101 LIBS="-lmenu$cf_cv_libtype $LIBS"
16102 cat >conftest.$ac_ext <<_ACEOF
16103 #line 16103 "configure"
16104 #include "confdefs.h"
16106 /* Override any gcc2 internal prototype to avoid an error. */
16110 /* We use char because int might match the return type of a gcc2
16111 builtin and then its argument prototype would still apply. */
16112 char menu_driver ();
16121 rm -f conftest.$ac_objext conftest$ac_exeext
16122 if { (eval echo "$as_me:16122: \"$ac_link\"") >&5
16123 (eval $ac_link) 2>&5
16125 echo "$as_me:16125: \$? = $ac_status" >&5
16126 (exit $ac_status); } &&
16127 { ac_try='test -s conftest$ac_exeext'
16128 { (eval echo "$as_me:16128: \"$ac_try\"") >&5
16129 (eval $ac_try) 2>&5
16131 echo "$as_me:16131: \$? = $ac_status" >&5
16132 (exit $ac_status); }; }; then
16133 eval "$as_ac_Lib=yes"
16135 echo "$as_me: failed program was:" >&5
16136 cat conftest.$ac_ext >&5
16137 eval "$as_ac_Lib=no"
16139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16140 LIBS=$ac_check_lib_save_LIBS
16142 echo "$as_me:16142: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16143 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16144 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16146 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16148 cf_add_libs="-lmenu$cf_cv_libtype"
16149 # Filter out duplicates - this happens with badly-designed ".pc" files...
16150 for cf_add_1lib in $LIBS
16152 for cf_add_2lib in $cf_add_libs
16154 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16160 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16162 LIBS="$cf_add_libs"
16164 cat >>confdefs.h <<EOF
16165 #define $cf_upper 1
16172 cf_curses_headers="$cf_curses_headers menu.h"
16175 echo "$as_me:16175: checking if you want to check for form functions" >&5
16176 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16178 # Check whether --enable-form or --disable-form was given.
16179 if test "${enable_form+set}" = set; then
16180 enableval="$enable_form"
16181 test "$enableval" != no && enableval=yes
16182 if test "$enableval" != "yes" ; then
16185 cf_enable_form=$cf_default_form
16189 cf_enable_form=$cf_default_form
16192 echo "$as_me:16192: result: $cf_enable_form" >&5
16193 echo "${ECHO_T}$cf_enable_form" >&6
16194 if test $cf_enable_form = yes
16196 case $cf_cv_screen in
16201 echo "$as_me:16201: checking for NetBSD form.h" >&5
16202 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16203 if test "${cf_cv_netbsd_form_h+set}" = set; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
16207 cat >conftest.$ac_ext <<_ACEOF
16208 #line 16208 "configure"
16209 #include "confdefs.h"
16211 #include <${cf_cv_ncurses_header:-curses.h}>
16219 int y = current_field(form)->cursor_ypos;
16220 int x = current_field(form)->cursor_xpos;
16226 rm -f conftest.$ac_objext
16227 if { (eval echo "$as_me:16227: \"$ac_compile\"") >&5
16228 (eval $ac_compile) 2>&5
16230 echo "$as_me:16230: \$? = $ac_status" >&5
16231 (exit $ac_status); } &&
16232 { ac_try='test -s conftest.$ac_objext'
16233 { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234 (eval $ac_try) 2>&5
16236 echo "$as_me:16236: \$? = $ac_status" >&5
16237 (exit $ac_status); }; }; then
16238 cf_cv_netbsd_form_h=yes
16241 echo "$as_me: failed program was:" >&5
16242 cat conftest.$ac_ext >&5
16243 cf_cv_netbsd_form_h=no
16245 rm -f conftest.$ac_objext conftest.$ac_ext
16248 echo "$as_me:16248: result: $cf_cv_netbsd_form_h" >&5
16249 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16251 test "$cf_cv_netbsd_form_h" = yes &&
16252 cat >>confdefs.h <<\EOF
16253 #define HAVE_NETBSD_FORM_H 1
16259 cf_have_curses_lib=no
16261 : ${NCURSES_CONFIG_PKG:=none}
16262 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16264 elif test "x${PKG_CONFIG:=none}" != xnone; then
16265 echo "$as_me:16265: checking pkg-config for form$cf_cv_libtype" >&5
16266 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16267 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16268 echo "$as_me:16268: result: yes" >&5
16269 echo "${ECHO_T}yes" >&6
16271 echo "$as_me:16271: checking if the form$cf_cv_libtype package files work" >&5
16272 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16274 cf_save_CPPFLAGS="$CPPFLAGS"
16275 cf_save_LIBS="$LIBS"
16280 cf_new_extra_cppflags=
16282 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16284 case $cf_fix_cppflags in
16286 case $cf_add_cflags in
16287 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16288 case $cf_add_cflags in
16290 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16292 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16293 && test -z "${cf_tst_cflags}" \
16294 && cf_fix_cppflags=yes
16296 if test $cf_fix_cppflags = yes ; then
16298 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16299 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16302 elif test "${cf_tst_cflags}" = "\"'" ; then
16304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16311 case "$CPPFLAGS" in
16315 case $cf_add_cflags in
16317 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16319 CPPFLAGS=`echo "$CPPFLAGS" | \
16320 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16321 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16326 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16327 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16334 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16335 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16342 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16343 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16345 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16347 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16348 && test -z "${cf_tst_cflags}" \
16349 && cf_fix_cppflags=no
16354 if test -n "$cf_new_cflags" ; then
16356 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16357 CFLAGS="${CFLAGS}$cf_new_cflags"
16361 if test -n "$cf_new_cppflags" ; then
16363 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16364 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16368 if test -n "$cf_new_extra_cppflags" ; then
16370 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16371 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16375 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16376 # Filter out duplicates - this happens with badly-designed ".pc" files...
16377 for cf_add_1lib in $LIBS
16379 for cf_add_2lib in $cf_add_libs
16381 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16387 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16389 LIBS="$cf_add_libs"
16391 cat >conftest.$ac_ext <<_ACEOF
16392 #line 16392 "configure"
16393 #include "confdefs.h"
16398 (void) form_driver ( 0,0 );
16403 rm -f conftest.$ac_objext conftest$ac_exeext
16404 if { (eval echo "$as_me:16404: \"$ac_link\"") >&5
16405 (eval $ac_link) 2>&5
16407 echo "$as_me:16407: \$? = $ac_status" >&5
16408 (exit $ac_status); } &&
16409 { ac_try='test -s conftest$ac_exeext'
16410 { (eval echo "$as_me:16410: \"$ac_try\"") >&5
16411 (eval $ac_try) 2>&5
16413 echo "$as_me:16413: \$? = $ac_status" >&5
16414 (exit $ac_status); }; }; then
16415 if test "$cross_compiling" = yes; then
16416 cf_have_curses_lib=maybe
16418 cat >conftest.$ac_ext <<_ACEOF
16419 #line 16419 "configure"
16420 #include "confdefs.h"
16423 { (void) form_driver ( 0,0 ); return 0; }
16425 rm -f conftest$ac_exeext
16426 if { (eval echo "$as_me:16426: \"$ac_link\"") >&5
16427 (eval $ac_link) 2>&5
16429 echo "$as_me:16429: \$? = $ac_status" >&5
16430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16431 { (eval echo "$as_me:16431: \"$ac_try\"") >&5
16432 (eval $ac_try) 2>&5
16434 echo "$as_me:16434: \$? = $ac_status" >&5
16435 (exit $ac_status); }; }; then
16436 cf_have_curses_lib=yes
16438 echo "$as_me: program exited with status $ac_status" >&5
16439 echo "$as_me: failed program was:" >&5
16440 cat conftest.$ac_ext >&5
16441 cf_have_curses_lib=no
16443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16446 echo "$as_me: failed program was:" >&5
16447 cat conftest.$ac_ext >&5
16448 cf_have_curses_lib=no
16450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16451 echo "$as_me:16451: result: $cf_have_curses_lib" >&5
16452 echo "${ECHO_T}$cf_have_curses_lib" >&6
16453 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16454 if test "$cf_have_curses_lib" != "yes"
16456 CPPFLAGS="$cf_save_CPPFLAGS"
16457 LIBS="$cf_save_LIBS"
16460 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16462 cat >>confdefs.h <<EOF
16463 #define $cf_upper 1
16469 if test "$cf_have_curses_lib" = no; then
16470 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16471 echo "$as_me:16471: checking for form_driver in -lform$cf_cv_libtype" >&5
16472 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16473 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16474 echo $ECHO_N "(cached) $ECHO_C" >&6
16476 ac_check_lib_save_LIBS=$LIBS
16477 LIBS="-lform$cf_cv_libtype $LIBS"
16478 cat >conftest.$ac_ext <<_ACEOF
16479 #line 16479 "configure"
16480 #include "confdefs.h"
16482 /* Override any gcc2 internal prototype to avoid an error. */
16486 /* We use char because int might match the return type of a gcc2
16487 builtin and then its argument prototype would still apply. */
16488 char form_driver ();
16497 rm -f conftest.$ac_objext conftest$ac_exeext
16498 if { (eval echo "$as_me:16498: \"$ac_link\"") >&5
16499 (eval $ac_link) 2>&5
16501 echo "$as_me:16501: \$? = $ac_status" >&5
16502 (exit $ac_status); } &&
16503 { ac_try='test -s conftest$ac_exeext'
16504 { (eval echo "$as_me:16504: \"$ac_try\"") >&5
16505 (eval $ac_try) 2>&5
16507 echo "$as_me:16507: \$? = $ac_status" >&5
16508 (exit $ac_status); }; }; then
16509 eval "$as_ac_Lib=yes"
16511 echo "$as_me: failed program was:" >&5
16512 cat conftest.$ac_ext >&5
16513 eval "$as_ac_Lib=no"
16515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16516 LIBS=$ac_check_lib_save_LIBS
16518 echo "$as_me:16518: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16519 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16520 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16522 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16524 cf_add_libs="-lform$cf_cv_libtype"
16525 # Filter out duplicates - this happens with badly-designed ".pc" files...
16526 for cf_add_1lib in $LIBS
16528 for cf_add_2lib in $cf_add_libs
16530 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16536 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16538 LIBS="$cf_add_libs"
16540 cat >>confdefs.h <<EOF
16541 #define $cf_upper 1
16548 cf_curses_headers="$cf_curses_headers form.h"
16551 # look for curses-related headers
16553 for ac_header in $cf_curses_headers
16555 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16556 echo "$as_me:16556: checking for $ac_header" >&5
16557 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16559 echo $ECHO_N "(cached) $ECHO_C" >&6
16561 cat >conftest.$ac_ext <<_ACEOF
16562 #line 16562 "configure"
16563 #include "confdefs.h"
16564 #include <$ac_header>
16566 if { (eval echo "$as_me:16566: \"$ac_cpp conftest.$ac_ext\"") >&5
16567 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16569 egrep -v '^ *\+' conftest.er1 >conftest.err
16571 cat conftest.err >&5
16572 echo "$as_me:16572: \$? = $ac_status" >&5
16573 (exit $ac_status); } >/dev/null; then
16574 if test -s conftest.err; then
16575 ac_cpp_err=$ac_c_preproc_warn_flag
16582 if test -z "$ac_cpp_err"; then
16583 eval "$as_ac_Header=yes"
16585 echo "$as_me: failed program was:" >&5
16586 cat conftest.$ac_ext >&5
16587 eval "$as_ac_Header=no"
16589 rm -f conftest.err conftest.$ac_ext
16591 echo "$as_me:16591: result: `eval echo '${'$as_ac_Header'}'`" >&5
16592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16593 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16594 cat >>confdefs.h <<EOF
16595 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16601 echo "$as_me:16601: checking for ANSI C header files" >&5
16602 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16603 if test "${ac_cv_header_stdc+set}" = set; then
16604 echo $ECHO_N "(cached) $ECHO_C" >&6
16606 cat >conftest.$ac_ext <<_ACEOF
16607 #line 16607 "configure"
16608 #include "confdefs.h"
16609 #include <stdlib.h>
16610 #include <stdarg.h>
16611 #include <string.h>
16615 if { (eval echo "$as_me:16615: \"$ac_cpp conftest.$ac_ext\"") >&5
16616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16618 egrep -v '^ *\+' conftest.er1 >conftest.err
16620 cat conftest.err >&5
16621 echo "$as_me:16621: \$? = $ac_status" >&5
16622 (exit $ac_status); } >/dev/null; then
16623 if test -s conftest.err; then
16624 ac_cpp_err=$ac_c_preproc_warn_flag
16631 if test -z "$ac_cpp_err"; then
16632 ac_cv_header_stdc=yes
16634 echo "$as_me: failed program was:" >&5
16635 cat conftest.$ac_ext >&5
16636 ac_cv_header_stdc=no
16638 rm -f conftest.err conftest.$ac_ext
16640 if test $ac_cv_header_stdc = yes; then
16641 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16642 cat >conftest.$ac_ext <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645 #include <string.h>
16648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16649 egrep "memchr" >/dev/null 2>&1; then
16652 ac_cv_header_stdc=no
16658 if test $ac_cv_header_stdc = yes; then
16659 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16660 cat >conftest.$ac_ext <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663 #include <stdlib.h>
16666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16667 egrep "free" >/dev/null 2>&1; then
16670 ac_cv_header_stdc=no
16676 if test $ac_cv_header_stdc = yes; then
16677 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16678 if test "$cross_compiling" = yes; then
16681 cat >conftest.$ac_ext <<_ACEOF
16682 #line 16682 "configure"
16683 #include "confdefs.h"
16685 #if ((' ' & 0x0FF) == 0x020)
16686 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16687 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16689 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16690 || ('j' <= (c) && (c) <= 'r') \
16691 || ('s' <= (c) && (c) <= 'z'))
16692 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16695 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16700 for (i = 0; i < 256; i++)
16701 if (XOR (islower (i), ISLOWER (i))
16702 || toupper (i) != TOUPPER (i))
16703 $ac_main_return(2);
16704 $ac_main_return (0);
16707 rm -f conftest$ac_exeext
16708 if { (eval echo "$as_me:16708: \"$ac_link\"") >&5
16709 (eval $ac_link) 2>&5
16711 echo "$as_me:16711: \$? = $ac_status" >&5
16712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16713 { (eval echo "$as_me:16713: \"$ac_try\"") >&5
16714 (eval $ac_try) 2>&5
16716 echo "$as_me:16716: \$? = $ac_status" >&5
16717 (exit $ac_status); }; }; then
16720 echo "$as_me: program exited with status $ac_status" >&5
16721 echo "$as_me: failed program was:" >&5
16722 cat conftest.$ac_ext >&5
16723 ac_cv_header_stdc=no
16725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16729 echo "$as_me:16729: result: $ac_cv_header_stdc" >&5
16730 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16731 if test $ac_cv_header_stdc = yes; then
16733 cat >>confdefs.h <<\EOF
16734 #define STDC_HEADERS 1
16739 echo "$as_me:16739: checking whether time.h and sys/time.h may both be included" >&5
16740 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16741 if test "${ac_cv_header_time+set}" = set; then
16742 echo $ECHO_N "(cached) $ECHO_C" >&6
16744 cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747 #include <sys/types.h>
16748 #include <sys/time.h>
16754 if ((struct tm *) 0)
16760 rm -f conftest.$ac_objext
16761 if { (eval echo "$as_me:16761: \"$ac_compile\"") >&5
16762 (eval $ac_compile) 2>&5
16764 echo "$as_me:16764: \$? = $ac_status" >&5
16765 (exit $ac_status); } &&
16766 { ac_try='test -s conftest.$ac_objext'
16767 { (eval echo "$as_me:16767: \"$ac_try\"") >&5
16768 (eval $ac_try) 2>&5
16770 echo "$as_me:16770: \$? = $ac_status" >&5
16771 (exit $ac_status); }; }; then
16772 ac_cv_header_time=yes
16774 echo "$as_me: failed program was:" >&5
16775 cat conftest.$ac_ext >&5
16776 ac_cv_header_time=no
16778 rm -f conftest.$ac_objext conftest.$ac_ext
16780 echo "$as_me:16780: result: $ac_cv_header_time" >&5
16781 echo "${ECHO_T}$ac_cv_header_time" >&6
16782 if test $ac_cv_header_time = yes; then
16784 cat >>confdefs.h <<\EOF
16785 #define TIME_WITH_SYS_TIME 1
16803 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16804 echo "$as_me:16804: checking for $ac_header" >&5
16805 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16806 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16807 echo $ECHO_N "(cached) $ECHO_C" >&6
16809 cat >conftest.$ac_ext <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812 #include <$ac_header>
16814 if { (eval echo "$as_me:16814: \"$ac_cpp conftest.$ac_ext\"") >&5
16815 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16817 egrep -v '^ *\+' conftest.er1 >conftest.err
16819 cat conftest.err >&5
16820 echo "$as_me:16820: \$? = $ac_status" >&5
16821 (exit $ac_status); } >/dev/null; then
16822 if test -s conftest.err; then
16823 ac_cpp_err=$ac_c_preproc_warn_flag
16830 if test -z "$ac_cpp_err"; then
16831 eval "$as_ac_Header=yes"
16833 echo "$as_me: failed program was:" >&5
16834 cat conftest.$ac_ext >&5
16835 eval "$as_ac_Header=no"
16837 rm -f conftest.err conftest.$ac_ext
16839 echo "$as_me:16839: result: `eval echo '${'$as_ac_Header'}'`" >&5
16840 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16841 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16842 cat >>confdefs.h <<EOF
16843 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16849 for ac_header in unistd.h getopt.h
16851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16852 echo "$as_me:16852: checking for $ac_header" >&5
16853 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16855 echo $ECHO_N "(cached) $ECHO_C" >&6
16857 cat >conftest.$ac_ext <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860 #include <$ac_header>
16862 if { (eval echo "$as_me:16862: \"$ac_cpp conftest.$ac_ext\"") >&5
16863 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16865 egrep -v '^ *\+' conftest.er1 >conftest.err
16867 cat conftest.err >&5
16868 echo "$as_me:16868: \$? = $ac_status" >&5
16869 (exit $ac_status); } >/dev/null; then
16870 if test -s conftest.err; then
16871 ac_cpp_err=$ac_c_preproc_warn_flag
16878 if test -z "$ac_cpp_err"; then
16879 eval "$as_ac_Header=yes"
16881 echo "$as_me: failed program was:" >&5
16882 cat conftest.$ac_ext >&5
16883 eval "$as_ac_Header=no"
16885 rm -f conftest.err conftest.$ac_ext
16887 echo "$as_me:16887: result: `eval echo '${'$as_ac_Header'}'`" >&5
16888 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16889 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16890 cat >>confdefs.h <<EOF
16891 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16897 echo "$as_me:16897: checking for header declaring getopt variables" >&5
16898 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16899 if test "${cf_cv_getopt_header+set}" = set; then
16900 echo $ECHO_N "(cached) $ECHO_C" >&6
16903 cf_cv_getopt_header=none
16904 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16906 cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16910 #include <$cf_header>
16914 int x = optind; char *y = optarg
16919 rm -f conftest.$ac_objext
16920 if { (eval echo "$as_me:16920: \"$ac_compile\"") >&5
16921 (eval $ac_compile) 2>&5
16923 echo "$as_me:16923: \$? = $ac_status" >&5
16924 (exit $ac_status); } &&
16925 { ac_try='test -s conftest.$ac_objext'
16926 { (eval echo "$as_me:16926: \"$ac_try\"") >&5
16927 (eval $ac_try) 2>&5
16929 echo "$as_me:16929: \$? = $ac_status" >&5
16930 (exit $ac_status); }; }; then
16931 cf_cv_getopt_header=$cf_header
16934 echo "$as_me: failed program was:" >&5
16935 cat conftest.$ac_ext >&5
16937 rm -f conftest.$ac_objext conftest.$ac_ext
16941 echo "$as_me:16941: result: $cf_cv_getopt_header" >&5
16942 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16943 if test $cf_cv_getopt_header != none ; then
16945 cat >>confdefs.h <<\EOF
16946 #define HAVE_GETOPT_HEADER 1
16950 if test $cf_cv_getopt_header = getopt.h ; then
16952 cat >>confdefs.h <<\EOF
16953 #define NEED_GETOPT_H 1
16965 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16966 echo "$as_me:16966: checking for $ac_func" >&5
16967 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16968 if eval "test \"\${$as_ac_var+set}\" = set"; then
16969 echo $ECHO_N "(cached) $ECHO_C" >&6
16971 cat >conftest.$ac_ext <<_ACEOF
16972 #line 16972 "configure"
16973 #include "confdefs.h"
16974 #define $ac_func autoconf_temporary
16975 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16982 /* We use char because int might match the return type of a gcc2
16983 builtin and then its argument prototype would still apply. */
16984 char $ac_func (void);
16990 /* The GNU C library defines stubs for functions which it implements
16991 to always fail with ENOSYS. Some functions are actually named
16992 something starting with __ and the normal name is an alias. */
16993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16994 #error found stub for $ac_func
16997 return $ac_func ();
17002 rm -f conftest.$ac_objext conftest$ac_exeext
17003 if { (eval echo "$as_me:17003: \"$ac_link\"") >&5
17004 (eval $ac_link) 2>&5
17006 echo "$as_me:17006: \$? = $ac_status" >&5
17007 (exit $ac_status); } &&
17008 { ac_try='test -s conftest$ac_exeext'
17009 { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010 (eval $ac_try) 2>&5
17012 echo "$as_me:17012: \$? = $ac_status" >&5
17013 (exit $ac_status); }; }; then
17014 eval "$as_ac_var=yes"
17016 echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 eval "$as_ac_var=no"
17020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17022 echo "$as_me:17022: result: `eval echo '${'$as_ac_var'}'`" >&5
17023 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17024 if test `eval echo '${'$as_ac_var'}'` = yes; then
17025 cat >>confdefs.h <<EOF
17026 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17032 # use a compile-check to work with ncurses*-config and subdirectory includes
17033 echo "$as_me:17033: checking if we can use termcap.h" >&5
17034 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17035 if test "${cf_cv_have_termcap_h+set}" = set; then
17036 echo $ECHO_N "(cached) $ECHO_C" >&6
17039 cat >conftest.$ac_ext <<_ACEOF
17040 #line 17040 "configure"
17041 #include "confdefs.h"
17043 #include <curses.h>
17044 #ifdef NCURSES_VERSION
17045 #undef NCURSES_VERSION
17047 #include <termcap.h>
17048 #ifndef NCURSES_VERSION
17049 #error wrong header
17060 rm -f conftest.$ac_objext
17061 if { (eval echo "$as_me:17061: \"$ac_compile\"") >&5
17062 (eval $ac_compile) 2>&5
17064 echo "$as_me:17064: \$? = $ac_status" >&5
17065 (exit $ac_status); } &&
17066 { ac_try='test -s conftest.$ac_objext'
17067 { (eval echo "$as_me:17067: \"$ac_try\"") >&5
17068 (eval $ac_try) 2>&5
17070 echo "$as_me:17070: \$? = $ac_status" >&5
17071 (exit $ac_status); }; }; then
17072 cf_cv_have_termcap_h=yes
17074 echo "$as_me: failed program was:" >&5
17075 cat conftest.$ac_ext >&5
17076 cf_cv_have_termcap_h=no
17078 rm -f conftest.$ac_objext conftest.$ac_ext
17080 echo "$as_me:17080: result: $cf_cv_have_termcap_h" >&5
17081 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17082 if test "x$cf_cv_have_termcap_h" = xyes
17084 cat >>confdefs.h <<\EOF
17085 #define HAVE_TERMCAP_H 1
17089 echo "$as_me:17089: checking if we can use ncurses/termcap.h" >&5
17090 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17091 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17092 echo $ECHO_N "(cached) $ECHO_C" >&6
17095 cat >conftest.$ac_ext <<_ACEOF
17096 #line 17096 "configure"
17097 #include "confdefs.h"
17099 #include <ncurses/curses.h>
17100 #ifdef NCURSES_VERSION
17101 #undef NCURSES_VERSION
17103 #include <ncurses/termcap.h>
17104 #ifndef NCURSES_VERSION
17105 #error wrong header
17116 rm -f conftest.$ac_objext
17117 if { (eval echo "$as_me:17117: \"$ac_compile\"") >&5
17118 (eval $ac_compile) 2>&5
17120 echo "$as_me:17120: \$? = $ac_status" >&5
17121 (exit $ac_status); } &&
17122 { ac_try='test -s conftest.$ac_objext'
17123 { (eval echo "$as_me:17123: \"$ac_try\"") >&5
17124 (eval $ac_try) 2>&5
17126 echo "$as_me:17126: \$? = $ac_status" >&5
17127 (exit $ac_status); }; }; then
17128 cf_cv_have_ncurses_termcap_h=yes
17130 echo "$as_me: failed program was:" >&5
17131 cat conftest.$ac_ext >&5
17132 cf_cv_have_ncurses_termcap_h=no
17134 rm -f conftest.$ac_objext conftest.$ac_ext
17136 echo "$as_me:17136: result: $cf_cv_have_ncurses_termcap_h" >&5
17137 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17138 test "x$cf_cv_have_ncurses_termcap_h" = xyes && cat >>confdefs.h <<\EOF
17139 #define HAVE_NCURSES_TERMCAP_H 1
17144 if test "x$ac_cv_func_getopt" = xno; then
17145 { { echo "$as_me:17145: error: getopt is required for building programs" >&5
17146 echo "$as_me: error: getopt is required for building programs" >&2;}
17147 { (exit 1); exit 1; }; }
17150 if test "$cf_enable_widec" = yes; then
17163 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17164 echo "$as_me:17164: checking for $ac_func" >&5
17165 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17166 if eval "test \"\${$as_ac_var+set}\" = set"; then
17167 echo $ECHO_N "(cached) $ECHO_C" >&6
17169 cat >conftest.$ac_ext <<_ACEOF
17170 #line 17170 "configure"
17171 #include "confdefs.h"
17172 #define $ac_func autoconf_temporary
17173 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17180 /* We use char because int might match the return type of a gcc2
17181 builtin and then its argument prototype would still apply. */
17182 char $ac_func (void);
17188 /* The GNU C library defines stubs for functions which it implements
17189 to always fail with ENOSYS. Some functions are actually named
17190 something starting with __ and the normal name is an alias. */
17191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17192 #error found stub for $ac_func
17195 return $ac_func ();
17200 rm -f conftest.$ac_objext conftest$ac_exeext
17201 if { (eval echo "$as_me:17201: \"$ac_link\"") >&5
17202 (eval $ac_link) 2>&5
17204 echo "$as_me:17204: \$? = $ac_status" >&5
17205 (exit $ac_status); } &&
17206 { ac_try='test -s conftest$ac_exeext'
17207 { (eval echo "$as_me:17207: \"$ac_try\"") >&5
17208 (eval $ac_try) 2>&5
17210 echo "$as_me:17210: \$? = $ac_status" >&5
17211 (exit $ac_status); }; }; then
17212 eval "$as_ac_var=yes"
17214 echo "$as_me: failed program was:" >&5
17215 cat conftest.$ac_ext >&5
17216 eval "$as_ac_var=no"
17218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17220 echo "$as_me:17220: result: `eval echo '${'$as_ac_var'}'`" >&5
17221 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17222 if test `eval echo '${'$as_ac_var'}'` = yes; then
17223 cat >>confdefs.h <<EOF
17224 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17232 echo "$as_me:17232: checking definition to turn on extended curses functions" >&5
17233 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17234 if test "${cf_cv_need_xopen_extension+set}" = set; then
17235 echo $ECHO_N "(cached) $ECHO_C" >&6
17238 cf_cv_need_xopen_extension=unknown
17239 cat >conftest.$ac_ext <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17243 #include <stdlib.h>
17244 #include <${cf_cv_ncurses_header:-curses.h}>
17249 #if defined(NCURSES_VERSION_PATCH)
17250 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17254 #ifdef NCURSES_VERSION
17256 int check2 = curs_set((int)sizeof(check));
17258 long x = winnstr(stdscr, "", 0);
17260 getbegyx(stdscr, y1, x1)
17265 rm -f conftest.$ac_objext conftest$ac_exeext
17266 if { (eval echo "$as_me:17266: \"$ac_link\"") >&5
17267 (eval $ac_link) 2>&5
17269 echo "$as_me:17269: \$? = $ac_status" >&5
17270 (exit $ac_status); } &&
17271 { ac_try='test -s conftest$ac_exeext'
17272 { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273 (eval $ac_try) 2>&5
17275 echo "$as_me:17275: \$? = $ac_status" >&5
17276 (exit $ac_status); }; }; then
17277 cf_cv_need_xopen_extension=none
17279 echo "$as_me: failed program was:" >&5
17280 cat conftest.$ac_ext >&5
17282 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17284 cat >conftest.$ac_ext <<_ACEOF
17285 #line 17285 "configure"
17286 #include "confdefs.h"
17288 #define $cf_try_xopen_extension 1
17289 #include <stdlib.h>
17290 #include <${cf_cv_ncurses_header:-curses.h}>
17295 #ifdef NCURSES_VERSION
17297 int check2 = curs_set((int)sizeof(check));
17299 long x = winnstr(stdscr, "", 0);
17301 getbegyx(stdscr, y1, x1)
17306 rm -f conftest.$ac_objext conftest$ac_exeext
17307 if { (eval echo "$as_me:17307: \"$ac_link\"") >&5
17308 (eval $ac_link) 2>&5
17310 echo "$as_me:17310: \$? = $ac_status" >&5
17311 (exit $ac_status); } &&
17312 { ac_try='test -s conftest$ac_exeext'
17313 { (eval echo "$as_me:17313: \"$ac_try\"") >&5
17314 (eval $ac_try) 2>&5
17316 echo "$as_me:17316: \$? = $ac_status" >&5
17317 (exit $ac_status); }; }; then
17318 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17320 echo "$as_me: failed program was:" >&5
17321 cat conftest.$ac_ext >&5
17323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17330 echo "$as_me:17330: result: $cf_cv_need_xopen_extension" >&5
17331 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17333 case $cf_cv_need_xopen_extension in
17336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17337 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17342 echo "$as_me:17342: checking for term.h" >&5
17343 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17344 if test "${cf_cv_term_header+set}" = set; then
17345 echo $ECHO_N "(cached) $ECHO_C" >&6
17348 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17349 # for <term.h> if we do not find the variant.
17351 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17353 case ${cf_cv_ncurses_header:-curses.h} in
17355 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17356 cf_header_list="$cf_header_item $cf_header_list"
17360 for cf_header in $cf_header_list
17362 cat >conftest.$ac_ext <<_ACEOF
17363 #line 17363 "configure"
17364 #include "confdefs.h"
17366 #include <${cf_cv_ncurses_header:-curses.h}>
17367 #include <${cf_header}>
17376 rm -f conftest.$ac_objext
17377 if { (eval echo "$as_me:17377: \"$ac_compile\"") >&5
17378 (eval $ac_compile) 2>&5
17380 echo "$as_me:17380: \$? = $ac_status" >&5
17381 (exit $ac_status); } &&
17382 { ac_try='test -s conftest.$ac_objext'
17383 { (eval echo "$as_me:17383: \"$ac_try\"") >&5
17384 (eval $ac_try) 2>&5
17386 echo "$as_me:17386: \$? = $ac_status" >&5
17387 (exit $ac_status); }; }; then
17388 cf_cv_term_header=$cf_header
17391 echo "$as_me: failed program was:" >&5
17392 cat conftest.$ac_ext >&5
17393 cf_cv_term_header=no
17395 rm -f conftest.$ac_objext conftest.$ac_ext
17398 case $cf_cv_term_header in
17400 # If curses is ncurses, some packagers still mess it up by trying to make
17401 # us use GNU termcap. This handles the most common case.
17402 for cf_header in ncurses/term.h ncursesw/term.h
17404 cat >conftest.$ac_ext <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17408 #include <${cf_cv_ncurses_header:-curses.h}>
17409 #ifdef NCURSES_VERSION
17410 #include <${cf_header}>
17422 rm -f conftest.$ac_objext
17423 if { (eval echo "$as_me:17423: \"$ac_compile\"") >&5
17424 (eval $ac_compile) 2>&5
17426 echo "$as_me:17426: \$? = $ac_status" >&5
17427 (exit $ac_status); } &&
17428 { ac_try='test -s conftest.$ac_objext'
17429 { (eval echo "$as_me:17429: \"$ac_try\"") >&5
17430 (eval $ac_try) 2>&5
17432 echo "$as_me:17432: \$? = $ac_status" >&5
17433 (exit $ac_status); }; }; then
17434 cf_cv_term_header=$cf_header
17437 echo "$as_me: failed program was:" >&5
17438 cat conftest.$ac_ext >&5
17439 cf_cv_term_header=no
17441 rm -f conftest.$ac_objext conftest.$ac_ext
17447 echo "$as_me:17447: result: $cf_cv_term_header" >&5
17448 echo "${ECHO_T}$cf_cv_term_header" >&6
17450 case $cf_cv_term_header in
17453 cat >>confdefs.h <<\EOF
17454 #define HAVE_TERM_H 1
17460 cat >>confdefs.h <<\EOF
17461 #define HAVE_NCURSES_TERM_H 1
17467 cat >>confdefs.h <<\EOF
17468 #define HAVE_NCURSESW_TERM_H 1
17474 echo "$as_me:17474: checking for unctrl.h" >&5
17475 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17476 if test "${cf_cv_unctrl_header+set}" = set; then
17477 echo $ECHO_N "(cached) $ECHO_C" >&6
17480 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17481 # for <unctrl.h> if we do not find the variant.
17483 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17485 case ${cf_cv_ncurses_header:-curses.h} in
17487 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17488 cf_header_list="$cf_header_item $cf_header_list"
17492 for cf_header in $cf_header_list
17494 cat >conftest.$ac_ext <<_ACEOF
17495 #line 17495 "configure"
17496 #include "confdefs.h"
17498 #include <${cf_cv_ncurses_header:-curses.h}>
17499 #include <${cf_header}>
17508 rm -f conftest.$ac_objext
17509 if { (eval echo "$as_me:17509: \"$ac_compile\"") >&5
17510 (eval $ac_compile) 2>&5
17512 echo "$as_me:17512: \$? = $ac_status" >&5
17513 (exit $ac_status); } &&
17514 { ac_try='test -s conftest.$ac_objext'
17515 { (eval echo "$as_me:17515: \"$ac_try\"") >&5
17516 (eval $ac_try) 2>&5
17518 echo "$as_me:17518: \$? = $ac_status" >&5
17519 (exit $ac_status); }; }; then
17520 cf_cv_unctrl_header=$cf_header
17523 echo "$as_me: failed program was:" >&5
17524 cat conftest.$ac_ext >&5
17525 cf_cv_unctrl_header=no
17527 rm -f conftest.$ac_objext conftest.$ac_ext
17531 echo "$as_me:17531: result: $cf_cv_unctrl_header" >&5
17532 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17534 case $cf_cv_unctrl_header in
17536 { echo "$as_me:17536: WARNING: unctrl.h header not found" >&5
17537 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17541 case $cf_cv_unctrl_header in
17544 cat >>confdefs.h <<\EOF
17545 #define HAVE_UNCTRL_H 1
17551 cat >>confdefs.h <<\EOF
17552 #define HAVE_NCURSES_UNCTRL_H 1
17556 (ncursesw/unctrl.h)
17558 cat >>confdefs.h <<\EOF
17559 #define HAVE_NCURSESW_UNCTRL_H 1
17567 assume_default_colors \
17582 init_extended_color \
17590 reset_color_pairs \
17605 use_default_colors \
17607 use_extended_names \
17623 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17625 echo "$as_me:17625: checking for ${cf_func}" >&5
17626 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17628 echo "${as_me:-configure}:17628: testing ${cf_func} ..." 1>&5
17630 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17631 echo $ECHO_N "(cached) $ECHO_C" >&6
17634 eval cf_result='$ac_cv_func_'$cf_func
17635 if test ".$cf_result" != ".no"; then
17636 cat >conftest.$ac_ext <<_ACEOF
17637 #line 17637 "configure"
17638 #include "confdefs.h"
17640 #ifdef HAVE_XCURSES
17641 #include <xcurses.h>
17642 char * XCursesProgramName = "test";
17644 #include <${cf_cv_ncurses_header:-curses.h}>
17645 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17646 #include <ncursesw/term.h>
17647 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17648 #include <ncurses/term.h>
17649 #elif defined(HAVE_TERM_H)
17659 long foo = (long)(&${cf_func});
17660 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17661 if (foo + 1234L > 5678L)
17662 ${cf_cv_main_return:-return}(foo != 0);
17669 rm -f conftest.$ac_objext conftest$ac_exeext
17670 if { (eval echo "$as_me:17670: \"$ac_link\"") >&5
17671 (eval $ac_link) 2>&5
17673 echo "$as_me:17673: \$? = $ac_status" >&5
17674 (exit $ac_status); } &&
17675 { ac_try='test -s conftest$ac_exeext'
17676 { (eval echo "$as_me:17676: \"$ac_try\"") >&5
17677 (eval $ac_try) 2>&5
17679 echo "$as_me:17679: \$? = $ac_status" >&5
17680 (exit $ac_status); }; }; then
17683 echo "$as_me: failed program was:" >&5
17684 cat conftest.$ac_ext >&5
17687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17689 eval 'cf_cv_func_'$cf_func'=$cf_result'
17693 # use the computed/retrieved cache-value:
17694 eval 'cf_result=$cf_cv_func_'$cf_func
17695 echo "$as_me:17695: result: $cf_result" >&5
17696 echo "${ECHO_T}$cf_result" >&6
17697 if test $cf_result != no; then
17698 cat >>confdefs.h <<EOF
17699 #define HAVE_${cf_tr_func} 1
17705 for cf_func in tputs
17708 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17710 echo "$as_me:17710: checking for ${cf_func}" >&5
17711 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17713 echo "${as_me:-configure}:17713: testing ${cf_func} ..." 1>&5
17715 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17716 echo $ECHO_N "(cached) $ECHO_C" >&6
17719 eval cf_result='$ac_cv_func_'$cf_func
17720 if test ".$cf_result" != ".no"; then
17721 cat >conftest.$ac_ext <<_ACEOF
17722 #line 17722 "configure"
17723 #include "confdefs.h"
17725 #ifdef HAVE_XCURSES
17726 #include <xcurses.h>
17727 char * XCursesProgramName = "test";
17729 #include <${cf_cv_ncurses_header:-curses.h}>
17730 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17731 #include <ncursesw/term.h>
17732 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17733 #include <ncurses/term.h>
17734 #elif defined(HAVE_TERM_H)
17744 long foo = (long)(&${cf_func});
17745 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17746 if (foo + 1234L > 5678L)
17747 ${cf_cv_main_return:-return}(foo != 0);
17754 rm -f conftest.$ac_objext conftest$ac_exeext
17755 if { (eval echo "$as_me:17755: \"$ac_link\"") >&5
17756 (eval $ac_link) 2>&5
17758 echo "$as_me:17758: \$? = $ac_status" >&5
17759 (exit $ac_status); } &&
17760 { ac_try='test -s conftest$ac_exeext'
17761 { (eval echo "$as_me:17761: \"$ac_try\"") >&5
17762 (eval $ac_try) 2>&5
17764 echo "$as_me:17764: \$? = $ac_status" >&5
17765 (exit $ac_status); }; }; then
17768 echo "$as_me: failed program was:" >&5
17769 cat conftest.$ac_ext >&5
17772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17774 eval 'cf_cv_func_'$cf_func'=$cf_result'
17778 # use the computed/retrieved cache-value:
17779 eval 'cf_result=$cf_cv_func_'$cf_func
17780 echo "$as_me:17780: result: $cf_result" >&5
17781 echo "${ECHO_T}$cf_result" >&6
17782 if test $cf_result != no; then
17783 cat >>confdefs.h <<EOF
17784 #define HAVE_${cf_tr_func} 1
17790 if test x$cf_cv_func_tputs = xyes
17793 for cf_arg in int char
17795 for cf_ret in int void
17797 if test $cf_ret = void
17799 cf_return="/* nothing */"
17801 cf_return="return value"
17803 cat >conftest.$ac_ext <<_ACEOF
17804 #line 17804 "configure"
17805 #include "confdefs.h"
17807 #include <${cf_cv_ncurses_header:-curses.h}>
17808 #include <$cf_cv_term_header>
17810 static $cf_ret outc($cf_arg value) { $cf_return; }
17816 tputs("hello", 0, outc);
17817 ${cf_cv_main_return:-return}(0);
17823 rm -f conftest.$ac_objext
17824 if { (eval echo "$as_me:17824: \"$ac_compile\"") >&5
17825 (eval $ac_compile) 2>&5
17827 echo "$as_me:17827: \$? = $ac_status" >&5
17828 (exit $ac_status); } &&
17829 { ac_try='test -s conftest.$ac_objext'
17830 { (eval echo "$as_me:17830: \"$ac_try\"") >&5
17831 (eval $ac_try) 2>&5
17833 echo "$as_me:17833: \$? = $ac_status" >&5
17834 (exit $ac_status); }; }; then
17836 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17838 echo "${as_me:-configure}:17838: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17840 cat >>confdefs.h <<EOF
17841 #define TPUTS_ARG $cf_arg
17842 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17843 #define TPUTS_RETURN(value) $cf_return
17849 echo "$as_me: failed program was:" >&5
17850 cat conftest.$ac_ext >&5
17852 rm -f conftest.$ac_objext conftest.$ac_ext
17854 test $cf_done = yes && break
17858 echo "$as_me:17858: checking for ncurses extended functions" >&5
17859 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17860 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17861 echo $ECHO_N "(cached) $ECHO_C" >&6
17864 cat >conftest.$ac_ext <<_ACEOF
17865 #line 17865 "configure"
17866 #include "confdefs.h"
17868 #include <${cf_cv_ncurses_header:-curses.h}>
17873 int x = NCURSES_EXT_FUNCS
17879 rm -f conftest.$ac_objext
17880 if { (eval echo "$as_me:17880: \"$ac_compile\"") >&5
17881 (eval $ac_compile) 2>&5
17883 echo "$as_me:17883: \$? = $ac_status" >&5
17884 (exit $ac_status); } &&
17885 { ac_try='test -s conftest.$ac_objext'
17886 { (eval echo "$as_me:17886: \"$ac_try\"") >&5
17887 (eval $ac_try) 2>&5
17889 echo "$as_me:17889: \$? = $ac_status" >&5
17890 (exit $ac_status); }; }; then
17891 cf_cv_ncurses_ext_funcs=defined
17893 echo "$as_me: failed program was:" >&5
17894 cat conftest.$ac_ext >&5
17896 cat >conftest.$ac_ext <<_ACEOF
17897 #line 17897 "configure"
17898 #include "confdefs.h"
17900 #include <${cf_cv_ncurses_header:-curses.h}>
17905 (void) assume_default_colors (0, 0);
17906 (void) curses_version ();
17907 (void) define_key (0, 0);
17908 (void) is_term_resized (0, 0);
17909 (void) key_defined (0);
17910 (void) keybound (0, 0);
17911 (void) keyok (0, 0);
17912 (void) resize_term (0, 0);
17913 (void) resizeterm (0, 0);
17914 (void) use_default_colors ();
17915 (void) use_extended_names (0);
17916 (void) wresize (0, 0, 0);
17921 rm -f conftest.$ac_objext conftest$ac_exeext
17922 if { (eval echo "$as_me:17922: \"$ac_link\"") >&5
17923 (eval $ac_link) 2>&5
17925 echo "$as_me:17925: \$? = $ac_status" >&5
17926 (exit $ac_status); } &&
17927 { ac_try='test -s conftest$ac_exeext'
17928 { (eval echo "$as_me:17928: \"$ac_try\"") >&5
17929 (eval $ac_try) 2>&5
17931 echo "$as_me:17931: \$? = $ac_status" >&5
17932 (exit $ac_status); }; }; then
17933 cf_cv_ncurses_ext_funcs=yes
17935 echo "$as_me: failed program was:" >&5
17936 cat conftest.$ac_ext >&5
17937 cf_cv_ncurses_ext_funcs=no
17939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17942 rm -f conftest.$ac_objext conftest.$ac_ext
17945 echo "$as_me:17945: result: $cf_cv_ncurses_ext_funcs" >&5
17946 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
17947 test "$cf_cv_ncurses_ext_funcs" = yes &&
17948 cat >>confdefs.h <<\EOF
17949 #define NCURSES_EXT_FUNCS 1
17952 if test "$cf_enable_widec" = yes
17954 # workaround for systems with ncurses before 20111029, due to change of
17955 # feature test macro from _XPG5 to _XOPEN_SOURCE
17956 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
17959 echo "$as_me:17959: checking if _XPG5 should be defined to enable wide-characters" >&5
17960 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
17962 cat >conftest.$ac_ext <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17966 #include <${cf_cv_ncurses_header:-curses.h}>
17975 rm -f conftest.$ac_objext
17976 if { (eval echo "$as_me:17976: \"$ac_compile\"") >&5
17977 (eval $ac_compile) 2>&5
17979 echo "$as_me:17979: \$? = $ac_status" >&5
17980 (exit $ac_status); } &&
17981 { ac_try='test -s conftest.$ac_objext'
17982 { (eval echo "$as_me:17982: \"$ac_try\"") >&5
17983 (eval $ac_try) 2>&5
17985 echo "$as_me:17985: \$? = $ac_status" >&5
17986 (exit $ac_status); }; }; then
17989 echo "$as_me: failed program was:" >&5
17990 cat conftest.$ac_ext >&5
17991 cf_save_cppflags="$CPPFLAGS"
17992 CPPFLAGS="$CPPFLAGS -D_XPG5"
17993 cat >conftest.$ac_ext <<_ACEOF
17994 #line 17994 "configure"
17995 #include "confdefs.h"
17997 #include <${cf_cv_ncurses_header:-curses.h}>
18006 rm -f conftest.$ac_objext
18007 if { (eval echo "$as_me:18007: \"$ac_compile\"") >&5
18008 (eval $ac_compile) 2>&5
18010 echo "$as_me:18010: \$? = $ac_status" >&5
18011 (exit $ac_status); } &&
18012 { ac_try='test -s conftest.$ac_objext'
18013 { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014 (eval $ac_try) 2>&5
18016 echo "$as_me:18016: \$? = $ac_status" >&5
18017 (exit $ac_status); }; }; then
18020 echo "$as_me: failed program was:" >&5
18021 cat conftest.$ac_ext >&5
18023 rm -f conftest.$ac_objext conftest.$ac_ext
18024 CPPFLAGS="$cf_save_cppflags"
18026 rm -f conftest.$ac_objext conftest.$ac_ext
18027 echo "$as_me:18027: result: $cf_define_xpg5" >&5
18028 echo "${ECHO_T}$cf_define_xpg5" >&6
18030 if test "$cf_define_xpg5" = yes
18032 CPPFLAGS="$CPPFLAGS -D_XPG5"
18036 echo "$as_me:18036: checking for wide-character functions" >&5
18037 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18038 if test "${cf_cv_widechar_funcs+set}" = set; then
18039 echo $ECHO_N "(cached) $ECHO_C" >&6
18042 cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18046 #include <${cf_cv_ncurses_header:-curses.h}>
18051 static wchar_t src_wchar[2];
18052 static cchar_t dst_cchar;
18053 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18059 rm -f conftest.$ac_objext conftest$ac_exeext
18060 if { (eval echo "$as_me:18060: \"$ac_link\"") >&5
18061 (eval $ac_link) 2>&5
18063 echo "$as_me:18063: \$? = $ac_status" >&5
18064 (exit $ac_status); } &&
18065 { ac_try='test -s conftest$ac_exeext'
18066 { (eval echo "$as_me:18066: \"$ac_try\"") >&5
18067 (eval $ac_try) 2>&5
18069 echo "$as_me:18069: \$? = $ac_status" >&5
18070 (exit $ac_status); }; }; then
18071 cf_cv_widechar_funcs=yes
18073 echo "$as_me: failed program was:" >&5
18074 cat conftest.$ac_ext >&5
18075 cf_cv_widechar_funcs=no
18077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18080 echo "$as_me:18080: result: $cf_cv_widechar_funcs" >&5
18081 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18082 if test "$cf_cv_widechar_funcs" != no ; then
18084 cat >>confdefs.h <<\EOF
18085 #define USE_WIDEC_SUPPORT 1
18089 cat >>confdefs.h <<\EOF
18090 #define USE_WIDEC_SUPPORT 0
18095 cat >>confdefs.h <<\EOF
18096 #define USE_WIDEC_SUPPORT 0
18101 echo "$as_me:18101: checking if $cf_cv_screen library uses pthreads" >&5
18102 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18103 if test "${cf_cv_use_pthreads+set}" = set; then
18104 echo $ECHO_N "(cached) $ECHO_C" >&6
18107 cat >conftest.$ac_ext <<_ACEOF
18108 #line 18108 "configure"
18109 #include "confdefs.h"
18111 #include <${cf_cv_ncurses_header:-curses.h}>
18112 extern void _nc_init_pthreads(void);
18119 _nc_init_pthreads();
18125 rm -f conftest.$ac_objext conftest$ac_exeext
18126 if { (eval echo "$as_me:18126: \"$ac_link\"") >&5
18127 (eval $ac_link) 2>&5
18129 echo "$as_me:18129: \$? = $ac_status" >&5
18130 (exit $ac_status); } &&
18131 { ac_try='test -s conftest$ac_exeext'
18132 { (eval echo "$as_me:18132: \"$ac_try\"") >&5
18133 (eval $ac_try) 2>&5
18135 echo "$as_me:18135: \$? = $ac_status" >&5
18136 (exit $ac_status); }; }; then
18137 cf_cv_use_pthreads=yes
18139 echo "$as_me: failed program was:" >&5
18140 cat conftest.$ac_ext >&5
18141 cf_cv_use_pthreads=no
18143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18146 echo "$as_me:18146: result: $cf_cv_use_pthreads" >&5
18147 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18148 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
18149 #define USE_PTHREADS 1
18152 echo "$as_me:18152: checking if sys/time.h works with sys/select.h" >&5
18153 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18154 if test "${cf_cv_sys_time_select+set}" = set; then
18155 echo $ECHO_N "(cached) $ECHO_C" >&6
18158 cat >conftest.$ac_ext <<_ACEOF
18159 #line 18159 "configure"
18160 #include "confdefs.h"
18162 #include <sys/types.h>
18163 #ifdef HAVE_SYS_TIME_H
18164 #include <sys/time.h>
18166 #ifdef HAVE_SYS_SELECT_H
18167 #include <sys/select.h>
18178 rm -f conftest.$ac_objext
18179 if { (eval echo "$as_me:18179: \"$ac_compile\"") >&5
18180 (eval $ac_compile) 2>&5
18182 echo "$as_me:18182: \$? = $ac_status" >&5
18183 (exit $ac_status); } &&
18184 { ac_try='test -s conftest.$ac_objext'
18185 { (eval echo "$as_me:18185: \"$ac_try\"") >&5
18186 (eval $ac_try) 2>&5
18188 echo "$as_me:18188: \$? = $ac_status" >&5
18189 (exit $ac_status); }; }; then
18190 cf_cv_sys_time_select=yes
18192 echo "$as_me: failed program was:" >&5
18193 cat conftest.$ac_ext >&5
18194 cf_cv_sys_time_select=no
18196 rm -f conftest.$ac_objext conftest.$ac_ext
18200 echo "$as_me:18200: result: $cf_cv_sys_time_select" >&5
18201 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18202 test "$cf_cv_sys_time_select" = yes &&
18203 cat >>confdefs.h <<\EOF
18204 #define HAVE_SYS_TIME_SELECT 1
18207 # special check for test/ditto.c
18209 echo "$as_me:18209: checking for openpty in -lutil" >&5
18210 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18211 if test "${ac_cv_lib_util_openpty+set}" = set; then
18212 echo $ECHO_N "(cached) $ECHO_C" >&6
18214 ac_check_lib_save_LIBS=$LIBS
18215 LIBS="-lutil $LIBS"
18216 cat >conftest.$ac_ext <<_ACEOF
18217 #line 18217 "configure"
18218 #include "confdefs.h"
18220 /* Override any gcc2 internal prototype to avoid an error. */
18224 /* We use char because int might match the return type of a gcc2
18225 builtin and then its argument prototype would still apply. */
18235 rm -f conftest.$ac_objext conftest$ac_exeext
18236 if { (eval echo "$as_me:18236: \"$ac_link\"") >&5
18237 (eval $ac_link) 2>&5
18239 echo "$as_me:18239: \$? = $ac_status" >&5
18240 (exit $ac_status); } &&
18241 { ac_try='test -s conftest$ac_exeext'
18242 { (eval echo "$as_me:18242: \"$ac_try\"") >&5
18243 (eval $ac_try) 2>&5
18245 echo "$as_me:18245: \$? = $ac_status" >&5
18246 (exit $ac_status); }; }; then
18247 ac_cv_lib_util_openpty=yes
18249 echo "$as_me: failed program was:" >&5
18250 cat conftest.$ac_ext >&5
18251 ac_cv_lib_util_openpty=no
18253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18254 LIBS=$ac_check_lib_save_LIBS
18256 echo "$as_me:18256: result: $ac_cv_lib_util_openpty" >&5
18257 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18258 if test $ac_cv_lib_util_openpty = yes; then
18264 echo "$as_me:18264: checking for openpty header" >&5
18265 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18266 if test "${cf_cv_func_openpty+set}" = set; then
18267 echo $ECHO_N "(cached) $ECHO_C" >&6
18270 cf_save_LIBS="$LIBS"
18271 test $cf_cv_lib_util = yes && {
18272 cf_add_libs="-lutil"
18273 # Filter out duplicates - this happens with badly-designed ".pc" files...
18274 for cf_add_1lib in $LIBS
18276 for cf_add_2lib in $cf_add_libs
18278 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18284 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18286 LIBS="$cf_add_libs"
18288 for cf_header in pty.h libutil.h util.h
18290 cat >conftest.$ac_ext <<_ACEOF
18291 #line 18291 "configure"
18292 #include "confdefs.h"
18294 #include <$cf_header>
18300 int x = openpty((int *)0, (int *)0, (char *)0,
18301 (struct termios *)0, (struct winsize *)0);
18307 rm -f conftest.$ac_objext conftest$ac_exeext
18308 if { (eval echo "$as_me:18308: \"$ac_link\"") >&5
18309 (eval $ac_link) 2>&5
18311 echo "$as_me:18311: \$? = $ac_status" >&5
18312 (exit $ac_status); } &&
18313 { ac_try='test -s conftest$ac_exeext'
18314 { (eval echo "$as_me:18314: \"$ac_try\"") >&5
18315 (eval $ac_try) 2>&5
18317 echo "$as_me:18317: \$? = $ac_status" >&5
18318 (exit $ac_status); }; }; then
18320 cf_cv_func_openpty=$cf_header
18324 echo "$as_me: failed program was:" >&5
18325 cat conftest.$ac_ext >&5
18327 cf_cv_func_openpty=no
18330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18332 LIBS="$cf_save_LIBS"
18335 echo "$as_me:18335: result: $cf_cv_func_openpty" >&5
18336 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18338 if test "$cf_cv_func_openpty" != no ; then
18340 cat >>confdefs.h <<EOF
18341 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18344 cat >>confdefs.h <<\EOF
18345 #define USE_XTERM_PTY 1
18348 if test "x$cf_cv_lib_util" = xyes ; then
18350 cf_add_libs="-lutil"
18351 # Filter out duplicates - this happens with badly-designed ".pc" files...
18352 for cf_add_1lib in $TEST_LIBS
18354 for cf_add_2lib in $cf_add_libs
18356 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18364 TEST_LIBS="$cf_add_libs"
18369 echo "$as_me:18369: checking for function curses_version" >&5
18370 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18371 if test "${cf_cv_func_curses_version+set}" = set; then
18372 echo $ECHO_N "(cached) $ECHO_C" >&6
18375 if test "$cross_compiling" = yes; then
18376 cf_cv_func_curses_version=unknown
18378 cat >conftest.$ac_ext <<_ACEOF
18379 #line 18379 "configure"
18380 #include "confdefs.h"
18382 #include <${cf_cv_ncurses_header:-curses.h}>
18386 sprintf(temp, "%s\n", curses_version());
18387 ${cf_cv_main_return:-return}(0);
18391 rm -f conftest$ac_exeext
18392 if { (eval echo "$as_me:18392: \"$ac_link\"") >&5
18393 (eval $ac_link) 2>&5
18395 echo "$as_me:18395: \$? = $ac_status" >&5
18396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18397 { (eval echo "$as_me:18397: \"$ac_try\"") >&5
18398 (eval $ac_try) 2>&5
18400 echo "$as_me:18400: \$? = $ac_status" >&5
18401 (exit $ac_status); }; }; then
18402 cf_cv_func_curses_version=yes
18405 echo "$as_me: program exited with status $ac_status" >&5
18406 echo "$as_me: failed program was:" >&5
18407 cat conftest.$ac_ext >&5
18408 cf_cv_func_curses_version=no
18411 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18415 echo "$as_me:18415: result: $cf_cv_func_curses_version" >&5
18416 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18417 test "$cf_cv_func_curses_version" = yes &&
18418 cat >>confdefs.h <<\EOF
18419 #define HAVE_CURSES_VERSION 1
18422 echo "$as_me:18422: checking for alternate character set array" >&5
18423 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18424 if test "${cf_cv_curses_acs_map+set}" = set; then
18425 echo $ECHO_N "(cached) $ECHO_C" >&6
18428 cf_cv_curses_acs_map=unknown
18429 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18431 cat >conftest.$ac_ext <<_ACEOF
18432 #line 18432 "configure"
18433 #include "confdefs.h"
18435 #include <${cf_cv_ncurses_header:-curses.h}>
18441 $name['k'] = ACS_PLUS
18447 rm -f conftest.$ac_objext conftest$ac_exeext
18448 if { (eval echo "$as_me:18448: \"$ac_link\"") >&5
18449 (eval $ac_link) 2>&5
18451 echo "$as_me:18451: \$? = $ac_status" >&5
18452 (exit $ac_status); } &&
18453 { ac_try='test -s conftest$ac_exeext'
18454 { (eval echo "$as_me:18454: \"$ac_try\"") >&5
18455 (eval $ac_try) 2>&5
18457 echo "$as_me:18457: \$? = $ac_status" >&5
18458 (exit $ac_status); }; }; then
18459 cf_cv_curses_acs_map=$name; break
18461 echo "$as_me: failed program was:" >&5
18462 cat conftest.$ac_ext >&5
18464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18468 echo "$as_me:18468: result: $cf_cv_curses_acs_map" >&5
18469 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18471 test "$cf_cv_curses_acs_map" != unknown &&
18472 cat >>confdefs.h <<EOF
18473 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18476 if test "$cf_enable_widec" = yes; then
18478 echo "$as_me:18478: checking for wide alternate character set array" >&5
18479 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18480 if test "${cf_cv_curses_wacs_map+set}" = set; then
18481 echo $ECHO_N "(cached) $ECHO_C" >&6
18484 cf_cv_curses_wacs_map=unknown
18485 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18487 cat >conftest.$ac_ext <<_ACEOF
18488 #line 18488 "configure"
18489 #include "confdefs.h"
18491 #ifndef _XOPEN_SOURCE_EXTENDED
18492 #define _XOPEN_SOURCE_EXTENDED
18494 #include <${cf_cv_ncurses_header:-curses.h}>
18498 void *foo = &($name['k'])
18503 rm -f conftest.$ac_objext conftest$ac_exeext
18504 if { (eval echo "$as_me:18504: \"$ac_link\"") >&5
18505 (eval $ac_link) 2>&5
18507 echo "$as_me:18507: \$? = $ac_status" >&5
18508 (exit $ac_status); } &&
18509 { ac_try='test -s conftest$ac_exeext'
18510 { (eval echo "$as_me:18510: \"$ac_try\"") >&5
18511 (eval $ac_try) 2>&5
18513 echo "$as_me:18513: \$? = $ac_status" >&5
18514 (exit $ac_status); }; }; then
18515 cf_cv_curses_wacs_map=$name
18518 echo "$as_me: failed program was:" >&5
18519 cat conftest.$ac_ext >&5
18521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18524 echo "$as_me:18524: result: $cf_cv_curses_wacs_map" >&5
18525 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18527 test "$cf_cv_curses_wacs_map" != unknown &&
18528 cat >>confdefs.h <<EOF
18529 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18532 echo "$as_me:18532: checking for wide alternate character constants" >&5
18533 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18534 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18535 echo $ECHO_N "(cached) $ECHO_C" >&6
18538 cf_cv_curses_wacs_symbols=no
18539 if test "$cf_cv_curses_wacs_map" != unknown
18541 cat >conftest.$ac_ext <<_ACEOF
18542 #line 18542 "configure"
18543 #include "confdefs.h"
18545 #ifndef _XOPEN_SOURCE_EXTENDED
18546 #define _XOPEN_SOURCE_EXTENDED
18548 #include <${cf_cv_ncurses_header:-curses.h}>
18552 cchar_t *foo = WACS_PLUS;
18553 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18558 rm -f conftest.$ac_objext conftest$ac_exeext
18559 if { (eval echo "$as_me:18559: \"$ac_link\"") >&5
18560 (eval $ac_link) 2>&5
18562 echo "$as_me:18562: \$? = $ac_status" >&5
18563 (exit $ac_status); } &&
18564 { ac_try='test -s conftest$ac_exeext'
18565 { (eval echo "$as_me:18565: \"$ac_try\"") >&5
18566 (eval $ac_try) 2>&5
18568 echo "$as_me:18568: \$? = $ac_status" >&5
18569 (exit $ac_status); }; }; then
18570 cf_cv_curses_wacs_symbols=yes
18572 echo "$as_me: failed program was:" >&5
18573 cat conftest.$ac_ext >&5
18575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18577 cat >conftest.$ac_ext <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18581 #ifndef _XOPEN_SOURCE_EXTENDED
18582 #define _XOPEN_SOURCE_EXTENDED
18584 #include <${cf_cv_ncurses_header:-curses.h}>
18588 cchar_t *foo = WACS_PLUS
18593 rm -f conftest.$ac_objext conftest$ac_exeext
18594 if { (eval echo "$as_me:18594: \"$ac_link\"") >&5
18595 (eval $ac_link) 2>&5
18597 echo "$as_me:18597: \$? = $ac_status" >&5
18598 (exit $ac_status); } &&
18599 { ac_try='test -s conftest$ac_exeext'
18600 { (eval echo "$as_me:18600: \"$ac_try\"") >&5
18601 (eval $ac_try) 2>&5
18603 echo "$as_me:18603: \$? = $ac_status" >&5
18604 (exit $ac_status); }; }; then
18605 cf_cv_curses_wacs_symbols=yes
18607 echo "$as_me: failed program was:" >&5
18608 cat conftest.$ac_ext >&5
18610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18614 echo "$as_me:18614: result: $cf_cv_curses_wacs_symbols" >&5
18615 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18617 test "$cf_cv_curses_wacs_symbols" != no &&
18618 cat >>confdefs.h <<\EOF
18619 #define CURSES_WACS_SYMBOLS 1
18624 echo "$as_me:18624: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18625 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18626 cat >conftest.$ac_ext <<_ACEOF
18627 #line 18627 "configure"
18628 #include "confdefs.h"
18630 #ifndef _XOPEN_SOURCE_EXTENDED
18631 #define _XOPEN_SOURCE_EXTENDED
18633 #include <${cf_cv_ncurses_header:-curses.h}>
18644 rm -f conftest.$ac_objext
18645 if { (eval echo "$as_me:18645: \"$ac_compile\"") >&5
18646 (eval $ac_compile) 2>&5
18648 echo "$as_me:18648: \$? = $ac_status" >&5
18649 (exit $ac_status); } &&
18650 { ac_try='test -s conftest.$ac_objext'
18651 { (eval echo "$as_me:18651: \"$ac_try\"") >&5
18652 (eval $ac_try) 2>&5
18654 echo "$as_me:18654: \$? = $ac_status" >&5
18655 (exit $ac_status); }; }; then
18658 echo "$as_me: failed program was:" >&5
18659 cat conftest.$ac_ext >&5
18662 rm -f conftest.$ac_objext conftest.$ac_ext
18663 echo "$as_me:18663: result: $cf_result" >&5
18664 echo "${ECHO_T}$cf_result" >&6
18665 if test $cf_result = yes ; then
18667 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18669 cat >>confdefs.h <<EOF
18670 #define $cf_result 1
18675 cat >>confdefs.h <<EOF
18676 #define attr_t long
18681 if test "$cf_enable_widec" = yes; then
18683 # This is needed on Tru64 5.0 to declare mbstate_t
18684 echo "$as_me:18684: checking if we must include wchar.h to declare mbstate_t" >&5
18685 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18686 if test "${cf_cv_mbstate_t+set}" = set; then
18687 echo $ECHO_N "(cached) $ECHO_C" >&6
18690 cat >conftest.$ac_ext <<_ACEOF
18691 #line 18691 "configure"
18692 #include "confdefs.h"
18694 #include <stdlib.h>
18695 #include <stdarg.h>
18697 #ifdef HAVE_LIBUTF8_H
18698 #include <libutf8.h>
18708 rm -f conftest.$ac_objext
18709 if { (eval echo "$as_me:18709: \"$ac_compile\"") >&5
18710 (eval $ac_compile) 2>&5
18712 echo "$as_me:18712: \$? = $ac_status" >&5
18713 (exit $ac_status); } &&
18714 { ac_try='test -s conftest.$ac_objext'
18715 { (eval echo "$as_me:18715: \"$ac_try\"") >&5
18716 (eval $ac_try) 2>&5
18718 echo "$as_me:18718: \$? = $ac_status" >&5
18719 (exit $ac_status); }; }; then
18722 echo "$as_me: failed program was:" >&5
18723 cat conftest.$ac_ext >&5
18724 cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18728 #include <stdlib.h>
18729 #include <stdarg.h>
18732 #ifdef HAVE_LIBUTF8_H
18733 #include <libutf8.h>
18743 rm -f conftest.$ac_objext
18744 if { (eval echo "$as_me:18744: \"$ac_compile\"") >&5
18745 (eval $ac_compile) 2>&5
18747 echo "$as_me:18747: \$? = $ac_status" >&5
18748 (exit $ac_status); } &&
18749 { ac_try='test -s conftest.$ac_objext'
18750 { (eval echo "$as_me:18750: \"$ac_try\"") >&5
18751 (eval $ac_try) 2>&5
18753 echo "$as_me:18753: \$? = $ac_status" >&5
18754 (exit $ac_status); }; }; then
18755 cf_cv_mbstate_t=yes
18757 echo "$as_me: failed program was:" >&5
18758 cat conftest.$ac_ext >&5
18759 cf_cv_mbstate_t=unknown
18761 rm -f conftest.$ac_objext conftest.$ac_ext
18763 rm -f conftest.$ac_objext conftest.$ac_ext
18765 echo "$as_me:18765: result: $cf_cv_mbstate_t" >&5
18766 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18768 if test "$cf_cv_mbstate_t" = yes ; then
18770 cat >>confdefs.h <<\EOF
18771 #define NEED_WCHAR_H 1
18777 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18778 if test "$cf_cv_mbstate_t" = unknown ; then
18779 NCURSES_MBSTATE_T=1
18782 # if we find mbstate_t in either place, use substitution to provide a fallback.
18783 if test "$cf_cv_mbstate_t" != unknown ; then
18784 NCURSES_OK_MBSTATE_T=1
18787 # This is needed on Tru64 5.0 to declare wchar_t
18788 echo "$as_me:18788: checking if we must include wchar.h to declare wchar_t" >&5
18789 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18790 if test "${cf_cv_wchar_t+set}" = set; then
18791 echo $ECHO_N "(cached) $ECHO_C" >&6
18794 cat >conftest.$ac_ext <<_ACEOF
18795 #line 18795 "configure"
18796 #include "confdefs.h"
18798 #include <stdlib.h>
18799 #include <stdarg.h>
18801 #ifdef HAVE_LIBUTF8_H
18802 #include <libutf8.h>
18812 rm -f conftest.$ac_objext
18813 if { (eval echo "$as_me:18813: \"$ac_compile\"") >&5
18814 (eval $ac_compile) 2>&5
18816 echo "$as_me:18816: \$? = $ac_status" >&5
18817 (exit $ac_status); } &&
18818 { ac_try='test -s conftest.$ac_objext'
18819 { (eval echo "$as_me:18819: \"$ac_try\"") >&5
18820 (eval $ac_try) 2>&5
18822 echo "$as_me:18822: \$? = $ac_status" >&5
18823 (exit $ac_status); }; }; then
18826 echo "$as_me: failed program was:" >&5
18827 cat conftest.$ac_ext >&5
18828 cat >conftest.$ac_ext <<_ACEOF
18829 #line 18829 "configure"
18830 #include "confdefs.h"
18832 #include <stdlib.h>
18833 #include <stdarg.h>
18836 #ifdef HAVE_LIBUTF8_H
18837 #include <libutf8.h>
18847 rm -f conftest.$ac_objext
18848 if { (eval echo "$as_me:18848: \"$ac_compile\"") >&5
18849 (eval $ac_compile) 2>&5
18851 echo "$as_me:18851: \$? = $ac_status" >&5
18852 (exit $ac_status); } &&
18853 { ac_try='test -s conftest.$ac_objext'
18854 { (eval echo "$as_me:18854: \"$ac_try\"") >&5
18855 (eval $ac_try) 2>&5
18857 echo "$as_me:18857: \$? = $ac_status" >&5
18858 (exit $ac_status); }; }; then
18861 echo "$as_me: failed program was:" >&5
18862 cat conftest.$ac_ext >&5
18863 cf_cv_wchar_t=unknown
18865 rm -f conftest.$ac_objext conftest.$ac_ext
18867 rm -f conftest.$ac_objext conftest.$ac_ext
18869 echo "$as_me:18869: result: $cf_cv_wchar_t" >&5
18870 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18872 if test "$cf_cv_wchar_t" = yes ; then
18874 cat >>confdefs.h <<\EOF
18875 #define NEED_WCHAR_H 1
18881 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18882 if test "$cf_cv_wchar_t" = unknown ; then
18886 # if we find wchar_t in either place, use substitution to provide a fallback.
18887 if test "$cf_cv_wchar_t" != unknown ; then
18888 NCURSES_OK_WCHAR_T=1
18891 # This is needed on Tru64 5.0 to declare wint_t
18892 echo "$as_me:18892: checking if we must include wchar.h to declare wint_t" >&5
18893 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18894 if test "${cf_cv_wint_t+set}" = set; then
18895 echo $ECHO_N "(cached) $ECHO_C" >&6
18898 cat >conftest.$ac_ext <<_ACEOF
18899 #line 18899 "configure"
18900 #include "confdefs.h"
18902 #include <stdlib.h>
18903 #include <stdarg.h>
18905 #ifdef HAVE_LIBUTF8_H
18906 #include <libutf8.h>
18916 rm -f conftest.$ac_objext
18917 if { (eval echo "$as_me:18917: \"$ac_compile\"") >&5
18918 (eval $ac_compile) 2>&5
18920 echo "$as_me:18920: \$? = $ac_status" >&5
18921 (exit $ac_status); } &&
18922 { ac_try='test -s conftest.$ac_objext'
18923 { (eval echo "$as_me:18923: \"$ac_try\"") >&5
18924 (eval $ac_try) 2>&5
18926 echo "$as_me:18926: \$? = $ac_status" >&5
18927 (exit $ac_status); }; }; then
18930 echo "$as_me: failed program was:" >&5
18931 cat conftest.$ac_ext >&5
18932 cat >conftest.$ac_ext <<_ACEOF
18933 #line 18933 "configure"
18934 #include "confdefs.h"
18936 #include <stdlib.h>
18937 #include <stdarg.h>
18940 #ifdef HAVE_LIBUTF8_H
18941 #include <libutf8.h>
18951 rm -f conftest.$ac_objext
18952 if { (eval echo "$as_me:18952: \"$ac_compile\"") >&5
18953 (eval $ac_compile) 2>&5
18955 echo "$as_me:18955: \$? = $ac_status" >&5
18956 (exit $ac_status); } &&
18957 { ac_try='test -s conftest.$ac_objext'
18958 { (eval echo "$as_me:18958: \"$ac_try\"") >&5
18959 (eval $ac_try) 2>&5
18961 echo "$as_me:18961: \$? = $ac_status" >&5
18962 (exit $ac_status); }; }; then
18965 echo "$as_me: failed program was:" >&5
18966 cat conftest.$ac_ext >&5
18967 cf_cv_wint_t=unknown
18969 rm -f conftest.$ac_objext conftest.$ac_ext
18971 rm -f conftest.$ac_objext conftest.$ac_ext
18973 echo "$as_me:18973: result: $cf_cv_wint_t" >&5
18974 echo "${ECHO_T}$cf_cv_wint_t" >&6
18976 if test "$cf_cv_wint_t" = yes ; then
18978 cat >>confdefs.h <<\EOF
18979 #define NEED_WCHAR_H 1
18985 # if we do not find wint_t in either place, use substitution to provide a fallback.
18986 if test "$cf_cv_wint_t" = unknown ; then
18990 # if we find wint_t in either place, use substitution to provide a fallback.
18991 if test "$cf_cv_wint_t" != unknown ; then
18992 NCURSES_OK_WINT_T=1
18995 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
18997 echo "$as_me:18997: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18998 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18999 cat >conftest.$ac_ext <<_ACEOF
19000 #line 19000 "configure"
19001 #include "confdefs.h"
19003 #ifndef _XOPEN_SOURCE_EXTENDED
19004 #define _XOPEN_SOURCE_EXTENDED
19006 #include <${cf_cv_ncurses_header:-curses.h}>
19017 rm -f conftest.$ac_objext
19018 if { (eval echo "$as_me:19018: \"$ac_compile\"") >&5
19019 (eval $ac_compile) 2>&5
19021 echo "$as_me:19021: \$? = $ac_status" >&5
19022 (exit $ac_status); } &&
19023 { ac_try='test -s conftest.$ac_objext'
19024 { (eval echo "$as_me:19024: \"$ac_try\"") >&5
19025 (eval $ac_try) 2>&5
19027 echo "$as_me:19027: \$? = $ac_status" >&5
19028 (exit $ac_status); }; }; then
19031 echo "$as_me: failed program was:" >&5
19032 cat conftest.$ac_ext >&5
19035 rm -f conftest.$ac_objext conftest.$ac_ext
19036 echo "$as_me:19036: result: $cf_result" >&5
19037 echo "${ECHO_T}$cf_result" >&6
19038 if test $cf_result = yes ; then
19040 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19042 cat >>confdefs.h <<EOF
19043 #define $cf_result 1
19048 cat >>confdefs.h <<EOF
19049 #define mbstate_t long
19056 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19058 echo "$as_me:19058: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19059 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19060 cat >conftest.$ac_ext <<_ACEOF
19061 #line 19061 "configure"
19062 #include "confdefs.h"
19064 #ifndef _XOPEN_SOURCE_EXTENDED
19065 #define _XOPEN_SOURCE_EXTENDED
19067 #include <${cf_cv_ncurses_header:-curses.h}>
19078 rm -f conftest.$ac_objext
19079 if { (eval echo "$as_me:19079: \"$ac_compile\"") >&5
19080 (eval $ac_compile) 2>&5
19082 echo "$as_me:19082: \$? = $ac_status" >&5
19083 (exit $ac_status); } &&
19084 { ac_try='test -s conftest.$ac_objext'
19085 { (eval echo "$as_me:19085: \"$ac_try\"") >&5
19086 (eval $ac_try) 2>&5
19088 echo "$as_me:19088: \$? = $ac_status" >&5
19089 (exit $ac_status); }; }; then
19092 echo "$as_me: failed program was:" >&5
19093 cat conftest.$ac_ext >&5
19096 rm -f conftest.$ac_objext conftest.$ac_ext
19097 echo "$as_me:19097: result: $cf_result" >&5
19098 echo "${ECHO_T}$cf_result" >&6
19099 if test $cf_result = yes ; then
19101 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19103 cat >>confdefs.h <<EOF
19104 #define $cf_result 1
19109 cat >>confdefs.h <<EOF
19110 #define wchar_t long
19117 if test "$NCURSES_OK_WINT_T" = 0 ; then
19119 echo "$as_me:19119: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19120 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19121 cat >conftest.$ac_ext <<_ACEOF
19122 #line 19122 "configure"
19123 #include "confdefs.h"
19125 #ifndef _XOPEN_SOURCE_EXTENDED
19126 #define _XOPEN_SOURCE_EXTENDED
19128 #include <${cf_cv_ncurses_header:-curses.h}>
19139 rm -f conftest.$ac_objext
19140 if { (eval echo "$as_me:19140: \"$ac_compile\"") >&5
19141 (eval $ac_compile) 2>&5
19143 echo "$as_me:19143: \$? = $ac_status" >&5
19144 (exit $ac_status); } &&
19145 { ac_try='test -s conftest.$ac_objext'
19146 { (eval echo "$as_me:19146: \"$ac_try\"") >&5
19147 (eval $ac_try) 2>&5
19149 echo "$as_me:19149: \$? = $ac_status" >&5
19150 (exit $ac_status); }; }; then
19153 echo "$as_me: failed program was:" >&5
19154 cat conftest.$ac_ext >&5
19157 rm -f conftest.$ac_objext conftest.$ac_ext
19158 echo "$as_me:19158: result: $cf_result" >&5
19159 echo "${ECHO_T}$cf_result" >&6
19160 if test $cf_result = yes ; then
19162 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19164 cat >>confdefs.h <<EOF
19165 #define $cf_result 1
19170 cat >>confdefs.h <<EOF
19171 #define wint_t long
19187 echo "$as_me:19187: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19188 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19190 cat >conftest.$ac_ext <<_ACEOF
19191 #line 19191 "configure"
19192 #include "confdefs.h"
19194 #ifdef HAVE_XCURSES
19195 #include <xcurses.h>
19196 char * XCursesProgramName = "test";
19198 #include <${cf_cv_ncurses_header:-curses.h}>
19199 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19200 #include <ncursesw/term.h>
19201 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19202 #include <ncurses/term.h>
19203 #elif defined(HAVE_TERM_H)
19212 void *foo = &($cf_data)
19218 rm -f conftest.$ac_objext
19219 if { (eval echo "$as_me:19219: \"$ac_compile\"") >&5
19220 (eval $ac_compile) 2>&5
19222 echo "$as_me:19222: \$? = $ac_status" >&5
19223 (exit $ac_status); } &&
19224 { ac_try='test -s conftest.$ac_objext'
19225 { (eval echo "$as_me:19225: \"$ac_try\"") >&5
19226 (eval $ac_try) 2>&5
19228 echo "$as_me:19228: \$? = $ac_status" >&5
19229 (exit $ac_status); }; }; then
19233 echo "$as_me: failed program was:" >&5
19234 cat conftest.$ac_ext >&5
19237 rm -f conftest.$ac_objext conftest.$ac_ext
19238 echo "$as_me:19238: result: $cf_result" >&5
19239 echo "${ECHO_T}$cf_result" >&6
19241 if test $cf_result = yes ; then
19243 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19245 cat >>confdefs.h <<EOF
19246 #define $cf_result 1
19250 echo "$as_me:19250: checking for data $cf_data in library" >&5
19251 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19252 # BSD linkers insist on making weak linkage, but resolve at runtime.
19253 if test "$cross_compiling" = yes; then
19256 cat >conftest.$ac_ext <<_ACEOF
19257 #line 19257 "configure"
19258 #include "confdefs.h"
19260 #ifdef HAVE_XCURSES
19261 #include <xcurses.h>
19262 char * XCursesProgramName = "test";
19264 #include <${cf_cv_ncurses_header:-curses.h}>
19265 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19266 #include <ncursesw/term.h>
19267 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19268 #include <ncurses/term.h>
19269 #elif defined(HAVE_TERM_H)
19274 extern char $cf_data;
19280 void *foo = &($cf_data);
19281 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19282 ${cf_cv_main_return:-return}(foo == 0);
19289 rm -f conftest.$ac_objext conftest$ac_exeext
19290 if { (eval echo "$as_me:19290: \"$ac_link\"") >&5
19291 (eval $ac_link) 2>&5
19293 echo "$as_me:19293: \$? = $ac_status" >&5
19294 (exit $ac_status); } &&
19295 { ac_try='test -s conftest$ac_exeext'
19296 { (eval echo "$as_me:19296: \"$ac_try\"") >&5
19297 (eval $ac_try) 2>&5
19299 echo "$as_me:19299: \$? = $ac_status" >&5
19300 (exit $ac_status); }; }; then
19303 echo "$as_me: failed program was:" >&5
19304 cat conftest.$ac_ext >&5
19307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19310 cat >conftest.$ac_ext <<_ACEOF
19311 #line 19311 "configure"
19312 #include "confdefs.h"
19314 #ifdef HAVE_XCURSES
19315 #include <xcurses.h>
19316 char * XCursesProgramName = "test";
19318 #include <${cf_cv_ncurses_header:-curses.h}>
19319 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19320 #include <ncursesw/term.h>
19321 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19322 #include <ncurses/term.h>
19323 #elif defined(HAVE_TERM_H)
19328 extern char $cf_data;
19331 void *foo = &($cf_data);
19332 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19333 ${cf_cv_main_return:-return}(foo == 0);
19336 rm -f conftest$ac_exeext
19337 if { (eval echo "$as_me:19337: \"$ac_link\"") >&5
19338 (eval $ac_link) 2>&5
19340 echo "$as_me:19340: \$? = $ac_status" >&5
19341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19342 { (eval echo "$as_me:19342: \"$ac_try\"") >&5
19343 (eval $ac_try) 2>&5
19345 echo "$as_me:19345: \$? = $ac_status" >&5
19346 (exit $ac_status); }; }; then
19350 echo "$as_me: program exited with status $ac_status" >&5
19351 echo "$as_me: failed program was:" >&5
19352 cat conftest.$ac_ext >&5
19355 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19357 echo "$as_me:19357: result: $cf_result" >&5
19358 echo "${ECHO_T}$cf_result" >&6
19359 if test $cf_result = yes ; then
19361 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19363 cat >>confdefs.h <<EOF
19364 #define $cf_result 1
19367 # do not exit loop here, since we prefer system's declarations
19372 if ( test "$GCC" = yes || test "$GXX" = yes )
19374 echo "$as_me:19374: checking if you want to turn on gcc warnings" >&5
19375 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19377 # Check whether --enable-warnings or --disable-warnings was given.
19378 if test "${enable_warnings+set}" = set; then
19379 enableval="$enable_warnings"
19380 test "$enableval" != yes && enableval=no
19381 if test "$enableval" != "no" ; then
19391 echo "$as_me:19391: result: $with_warnings" >&5
19392 echo "${ECHO_T}$with_warnings" >&6
19393 if test "$with_warnings" = "yes"
19396 if test "$GCC" = yes
19398 cat > conftest.i <<EOF
19400 #define GCC_PRINTF 0
19403 #define GCC_SCANF 0
19405 #ifndef GCC_NORETURN
19406 #define GCC_NORETURN /* nothing */
19409 #define GCC_UNUSED /* nothing */
19412 if test "$GCC" = yes
19414 { echo "$as_me:19414: checking for $CC __attribute__ directives..." >&5
19415 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19416 cat > conftest.$ac_ext <<EOF
19417 #line 19417 "${as_me:-configure}"
19418 #include "confdefs.h"
19419 #include "conftest.h"
19420 #include "conftest.i"
19422 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19424 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19427 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19429 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19431 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19432 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19433 extern void foo(void) GCC_NORETURN;
19434 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19436 cf_printf_attribute=no
19437 cf_scanf_attribute=no
19438 for cf_attribute in scanf printf unused noreturn
19441 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19443 cf_directive="__attribute__(($cf_attribute))"
19444 echo "checking for $CC $cf_directive" 1>&5
19446 case $cf_attribute in
19448 cf_printf_attribute=yes
19449 cat >conftest.h <<EOF
19450 #define GCC_$cf_ATTRIBUTE 1
19454 cf_scanf_attribute=yes
19455 cat >conftest.h <<EOF
19456 #define GCC_$cf_ATTRIBUTE 1
19460 cat >conftest.h <<EOF
19461 #define GCC_$cf_ATTRIBUTE $cf_directive
19466 if { (eval echo "$as_me:19466: \"$ac_compile\"") >&5
19467 (eval $ac_compile) 2>&5
19469 echo "$as_me:19469: \$? = $ac_status" >&5
19470 (exit $ac_status); }; then
19471 test -n "$verbose" && echo "$as_me:19471: result: ... $cf_attribute" >&5
19472 echo "${ECHO_T}... $cf_attribute" >&6
19473 cat conftest.h >>confdefs.h
19474 case $cf_attribute in
19477 cat >>confdefs.h <<EOF
19478 #define GCC_NORETURN $cf_directive
19483 cf_value='/* nothing */'
19484 if test "$cf_printf_attribute" != no ; then
19485 cf_value='__attribute__((format(printf,fmt,var)))'
19487 cat >>confdefs.h <<\EOF
19488 #define GCC_PRINTF 1
19493 cat >>confdefs.h <<EOF
19494 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19499 cf_value='/* nothing */'
19500 if test "$cf_scanf_attribute" != no ; then
19501 cf_value='__attribute__((format(scanf,fmt,var)))'
19503 cat >>confdefs.h <<\EOF
19504 #define GCC_SCANF 1
19509 cat >>confdefs.h <<EOF
19510 #define GCC_SCANFLIKE(fmt,var) $cf_value
19516 cat >>confdefs.h <<EOF
19517 #define GCC_UNUSED $cf_directive
19525 fgrep define conftest.i >>confdefs.h
19532 if test "$GCC" = yes ; then
19535 echo "$as_me:19535: checking if this is really Intel C compiler" >&5
19536 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
19537 cf_save_CFLAGS="$CFLAGS"
19538 CFLAGS="$CFLAGS -no-gcc"
19539 cat >conftest.$ac_ext <<_ACEOF
19540 #line 19540 "configure"
19541 #include "confdefs.h"
19547 #ifdef __INTEL_COMPILER
19556 rm -f conftest.$ac_objext
19557 if { (eval echo "$as_me:19557: \"$ac_compile\"") >&5
19558 (eval $ac_compile) 2>&5
19560 echo "$as_me:19560: \$? = $ac_status" >&5
19561 (exit $ac_status); } &&
19562 { ac_try='test -s conftest.$ac_objext'
19563 { (eval echo "$as_me:19563: \"$ac_try\"") >&5
19564 (eval $ac_try) 2>&5
19566 echo "$as_me:19566: \$? = $ac_status" >&5
19567 (exit $ac_status); }; }; then
19569 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
19572 echo "$as_me: failed program was:" >&5
19573 cat conftest.$ac_ext >&5
19575 rm -f conftest.$ac_objext conftest.$ac_ext
19576 CFLAGS="$cf_save_CFLAGS"
19577 echo "$as_me:19577: result: $INTEL_COMPILER" >&5
19578 echo "${ECHO_T}$INTEL_COMPILER" >&6
19585 if test "$GCC" = yes ; then
19586 echo "$as_me:19586: checking if this is really Clang C compiler" >&5
19587 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
19588 cf_save_CFLAGS="$CFLAGS"
19589 CFLAGS="$CFLAGS -Qunused-arguments"
19590 cat >conftest.$ac_ext <<_ACEOF
19591 #line 19591 "configure"
19592 #include "confdefs.h"
19607 rm -f conftest.$ac_objext
19608 if { (eval echo "$as_me:19608: \"$ac_compile\"") >&5
19609 (eval $ac_compile) 2>&5
19611 echo "$as_me:19611: \$? = $ac_status" >&5
19612 (exit $ac_status); } &&
19613 { ac_try='test -s conftest.$ac_objext'
19614 { (eval echo "$as_me:19614: \"$ac_try\"") >&5
19615 (eval $ac_try) 2>&5
19617 echo "$as_me:19617: \$? = $ac_status" >&5
19618 (exit $ac_status); }; }; then
19620 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
19623 echo "$as_me: failed program was:" >&5
19624 cat conftest.$ac_ext >&5
19626 rm -f conftest.$ac_objext conftest.$ac_ext
19627 CFLAGS="$cf_save_CFLAGS"
19628 echo "$as_me:19628: result: $CLANG_COMPILER" >&5
19629 echo "${ECHO_T}$CLANG_COMPILER" >&6
19632 cat > conftest.$ac_ext <<EOF
19633 #line 19633 "${as_me:-configure}"
19634 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19637 if test "$INTEL_COMPILER" = yes
19639 # The "-wdXXX" options suppress warnings:
19640 # remark #1419: external declaration in primary source file
19641 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19642 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19643 # remark #193: zero used for undefined preprocessing identifier
19644 # remark #593: variable "curs_sb_left_arrow" was set but never used
19645 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19646 # remark #869: parameter "tw" was never referenced
19647 # remark #981: operands are evaluated in unspecified order
19648 # warning #279: controlling expression is constant
19650 { echo "$as_me:19650: checking for $CC warning options..." >&5
19651 echo "$as_me: checking for $CC warning options..." >&6;}
19652 cf_save_CFLAGS="$CFLAGS"
19653 EXTRA_CFLAGS="-Wall"
19665 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19666 if { (eval echo "$as_me:19666: \"$ac_compile\"") >&5
19667 (eval $ac_compile) 2>&5
19669 echo "$as_me:19669: \$? = $ac_status" >&5
19670 (exit $ac_status); }; then
19671 test -n "$verbose" && echo "$as_me:19671: result: ... -$cf_opt" >&5
19672 echo "${ECHO_T}... -$cf_opt" >&6
19673 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19676 CFLAGS="$cf_save_CFLAGS"
19678 elif test "$GCC" = yes
19680 { echo "$as_me:19680: checking for $CC warning options..." >&5
19681 echo "$as_me: checking for $CC warning options..." >&6;}
19682 cf_save_CFLAGS="$CFLAGS"
19685 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19686 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19687 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19688 for cf_opt in W Wall \
19689 Wbad-function-cast \
19692 Wdeclaration-after-statement \
19695 Wmissing-declarations \
19696 Wmissing-prototypes \
19700 Wstrict-prototypes \
19701 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19703 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19704 if { (eval echo "$as_me:19704: \"$ac_compile\"") >&5
19705 (eval $ac_compile) 2>&5
19707 echo "$as_me:19707: \$? = $ac_status" >&5
19708 (exit $ac_status); }; then
19709 test -n "$verbose" && echo "$as_me:19709: result: ... -$cf_opt" >&5
19710 echo "${ECHO_T}... -$cf_opt" >&6
19714 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19715 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19719 case $GCC_VERSION in
19721 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19723 echo "${as_me:-configure}:19723: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19729 case $GCC_VERSION in
19731 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19733 echo "${as_me:-configure}:19733: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19739 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19742 CFLAGS="$cf_save_CFLAGS"
19749 echo "$as_me:19749: checking if you want to use dmalloc for testing" >&5
19750 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19752 # Check whether --with-dmalloc or --without-dmalloc was given.
19753 if test "${with_dmalloc+set}" = set; then
19754 withval="$with_dmalloc"
19756 cat >>confdefs.h <<EOF
19757 #define USE_DMALLOC 1
19760 : ${with_cflags:=-g}
19761 : ${with_no_leaks:=yes}
19766 echo "$as_me:19766: result: ${with_dmalloc:-no}" >&5
19767 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19769 case .$with_cflags in
19779 cf_new_extra_cppflags=
19781 for cf_add_cflags in -g
19783 case $cf_fix_cppflags in
19785 case $cf_add_cflags in
19786 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19787 case $cf_add_cflags in
19789 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19792 && test -z "${cf_tst_cflags}" \
19793 && cf_fix_cppflags=yes
19795 if test $cf_fix_cppflags = yes ; then
19797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19801 elif test "${cf_tst_cflags}" = "\"'" ; then
19803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19810 case "$CPPFLAGS" in
19814 case $cf_add_cflags in
19816 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19818 CPPFLAGS=`echo "$CPPFLAGS" | \
19819 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19820 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19825 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19826 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19833 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19834 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19844 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19847 && test -z "${cf_tst_cflags}" \
19848 && cf_fix_cppflags=no
19853 if test -n "$cf_new_cflags" ; then
19855 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19856 CFLAGS="${CFLAGS}$cf_new_cflags"
19860 if test -n "$cf_new_cppflags" ; then
19862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19863 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19867 if test -n "$cf_new_extra_cppflags" ; then
19869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19879 if test "$with_dmalloc" = yes ; then
19880 echo "$as_me:19880: checking for dmalloc.h" >&5
19881 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19882 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19883 echo $ECHO_N "(cached) $ECHO_C" >&6
19885 cat >conftest.$ac_ext <<_ACEOF
19886 #line 19886 "configure"
19887 #include "confdefs.h"
19888 #include <dmalloc.h>
19890 if { (eval echo "$as_me:19890: \"$ac_cpp conftest.$ac_ext\"") >&5
19891 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19893 egrep -v '^ *\+' conftest.er1 >conftest.err
19895 cat conftest.err >&5
19896 echo "$as_me:19896: \$? = $ac_status" >&5
19897 (exit $ac_status); } >/dev/null; then
19898 if test -s conftest.err; then
19899 ac_cpp_err=$ac_c_preproc_warn_flag
19906 if test -z "$ac_cpp_err"; then
19907 ac_cv_header_dmalloc_h=yes
19909 echo "$as_me: failed program was:" >&5
19910 cat conftest.$ac_ext >&5
19911 ac_cv_header_dmalloc_h=no
19913 rm -f conftest.err conftest.$ac_ext
19915 echo "$as_me:19915: result: $ac_cv_header_dmalloc_h" >&5
19916 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19917 if test $ac_cv_header_dmalloc_h = yes; then
19919 echo "$as_me:19919: checking for dmalloc_debug in -ldmalloc" >&5
19920 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19921 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19922 echo $ECHO_N "(cached) $ECHO_C" >&6
19924 ac_check_lib_save_LIBS=$LIBS
19925 LIBS="-ldmalloc $LIBS"
19926 cat >conftest.$ac_ext <<_ACEOF
19927 #line 19927 "configure"
19928 #include "confdefs.h"
19930 /* Override any gcc2 internal prototype to avoid an error. */
19934 /* We use char because int might match the return type of a gcc2
19935 builtin and then its argument prototype would still apply. */
19936 char dmalloc_debug ();
19945 rm -f conftest.$ac_objext conftest$ac_exeext
19946 if { (eval echo "$as_me:19946: \"$ac_link\"") >&5
19947 (eval $ac_link) 2>&5
19949 echo "$as_me:19949: \$? = $ac_status" >&5
19950 (exit $ac_status); } &&
19951 { ac_try='test -s conftest$ac_exeext'
19952 { (eval echo "$as_me:19952: \"$ac_try\"") >&5
19953 (eval $ac_try) 2>&5
19955 echo "$as_me:19955: \$? = $ac_status" >&5
19956 (exit $ac_status); }; }; then
19957 ac_cv_lib_dmalloc_dmalloc_debug=yes
19959 echo "$as_me: failed program was:" >&5
19960 cat conftest.$ac_ext >&5
19961 ac_cv_lib_dmalloc_dmalloc_debug=no
19963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19964 LIBS=$ac_check_lib_save_LIBS
19966 echo "$as_me:19966: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19967 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19968 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19969 cat >>confdefs.h <<EOF
19970 #define HAVE_LIBDMALLOC 1
19973 LIBS="-ldmalloc $LIBS"
19981 echo "$as_me:19981: checking if you want to use dbmalloc for testing" >&5
19982 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19984 # Check whether --with-dbmalloc or --without-dbmalloc was given.
19985 if test "${with_dbmalloc+set}" = set; then
19986 withval="$with_dbmalloc"
19988 cat >>confdefs.h <<EOF
19989 #define USE_DBMALLOC 1
19992 : ${with_cflags:=-g}
19993 : ${with_no_leaks:=yes}
19998 echo "$as_me:19998: result: ${with_dbmalloc:-no}" >&5
19999 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
20001 case .$with_cflags in
20011 cf_new_extra_cppflags=
20013 for cf_add_cflags in -g
20015 case $cf_fix_cppflags in
20017 case $cf_add_cflags in
20018 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20019 case $cf_add_cflags in
20021 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20023 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20024 && test -z "${cf_tst_cflags}" \
20025 && cf_fix_cppflags=yes
20027 if test $cf_fix_cppflags = yes ; then
20029 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20030 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20033 elif test "${cf_tst_cflags}" = "\"'" ; then
20035 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20036 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20042 case "$CPPFLAGS" in
20046 case $cf_add_cflags in
20048 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20050 CPPFLAGS=`echo "$CPPFLAGS" | \
20051 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20052 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20057 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20058 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20065 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20066 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20076 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20078 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20079 && test -z "${cf_tst_cflags}" \
20080 && cf_fix_cppflags=no
20085 if test -n "$cf_new_cflags" ; then
20087 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20088 CFLAGS="${CFLAGS}$cf_new_cflags"
20092 if test -n "$cf_new_cppflags" ; then
20094 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20095 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20099 if test -n "$cf_new_extra_cppflags" ; then
20101 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20102 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20111 if test "$with_dbmalloc" = yes ; then
20112 echo "$as_me:20112: checking for dbmalloc.h" >&5
20113 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20114 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20115 echo $ECHO_N "(cached) $ECHO_C" >&6
20117 cat >conftest.$ac_ext <<_ACEOF
20118 #line 20118 "configure"
20119 #include "confdefs.h"
20120 #include <dbmalloc.h>
20122 if { (eval echo "$as_me:20122: \"$ac_cpp conftest.$ac_ext\"") >&5
20123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20125 egrep -v '^ *\+' conftest.er1 >conftest.err
20127 cat conftest.err >&5
20128 echo "$as_me:20128: \$? = $ac_status" >&5
20129 (exit $ac_status); } >/dev/null; then
20130 if test -s conftest.err; then
20131 ac_cpp_err=$ac_c_preproc_warn_flag
20138 if test -z "$ac_cpp_err"; then
20139 ac_cv_header_dbmalloc_h=yes
20141 echo "$as_me: failed program was:" >&5
20142 cat conftest.$ac_ext >&5
20143 ac_cv_header_dbmalloc_h=no
20145 rm -f conftest.err conftest.$ac_ext
20147 echo "$as_me:20147: result: $ac_cv_header_dbmalloc_h" >&5
20148 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20149 if test $ac_cv_header_dbmalloc_h = yes; then
20151 echo "$as_me:20151: checking for debug_malloc in -ldbmalloc" >&5
20152 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20153 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20154 echo $ECHO_N "(cached) $ECHO_C" >&6
20156 ac_check_lib_save_LIBS=$LIBS
20157 LIBS="-ldbmalloc $LIBS"
20158 cat >conftest.$ac_ext <<_ACEOF
20159 #line 20159 "configure"
20160 #include "confdefs.h"
20162 /* Override any gcc2 internal prototype to avoid an error. */
20166 /* We use char because int might match the return type of a gcc2
20167 builtin and then its argument prototype would still apply. */
20168 char debug_malloc ();
20177 rm -f conftest.$ac_objext conftest$ac_exeext
20178 if { (eval echo "$as_me:20178: \"$ac_link\"") >&5
20179 (eval $ac_link) 2>&5
20181 echo "$as_me:20181: \$? = $ac_status" >&5
20182 (exit $ac_status); } &&
20183 { ac_try='test -s conftest$ac_exeext'
20184 { (eval echo "$as_me:20184: \"$ac_try\"") >&5
20185 (eval $ac_try) 2>&5
20187 echo "$as_me:20187: \$? = $ac_status" >&5
20188 (exit $ac_status); }; }; then
20189 ac_cv_lib_dbmalloc_debug_malloc=yes
20191 echo "$as_me: failed program was:" >&5
20192 cat conftest.$ac_ext >&5
20193 ac_cv_lib_dbmalloc_debug_malloc=no
20195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20196 LIBS=$ac_check_lib_save_LIBS
20198 echo "$as_me:20198: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20199 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20200 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20201 cat >>confdefs.h <<EOF
20202 #define HAVE_LIBDBMALLOC 1
20205 LIBS="-ldbmalloc $LIBS"
20213 echo "$as_me:20213: checking if you want to use valgrind for testing" >&5
20214 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20216 # Check whether --with-valgrind or --without-valgrind was given.
20217 if test "${with_valgrind+set}" = set; then
20218 withval="$with_valgrind"
20220 cat >>confdefs.h <<EOF
20221 #define USE_VALGRIND 1
20224 : ${with_cflags:=-g}
20225 : ${with_no_leaks:=yes}
20230 echo "$as_me:20230: result: ${with_valgrind:-no}" >&5
20231 echo "${ECHO_T}${with_valgrind:-no}" >&6
20233 case .$with_cflags in
20243 cf_new_extra_cppflags=
20245 for cf_add_cflags in -g
20247 case $cf_fix_cppflags in
20249 case $cf_add_cflags in
20250 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20251 case $cf_add_cflags in
20253 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20255 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20256 && test -z "${cf_tst_cflags}" \
20257 && cf_fix_cppflags=yes
20259 if test $cf_fix_cppflags = yes ; then
20261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20265 elif test "${cf_tst_cflags}" = "\"'" ; then
20267 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20268 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20274 case "$CPPFLAGS" in
20278 case $cf_add_cflags in
20280 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20282 CPPFLAGS=`echo "$CPPFLAGS" | \
20283 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20284 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20289 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20290 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20297 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20298 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20308 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20310 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20311 && test -z "${cf_tst_cflags}" \
20312 && cf_fix_cppflags=no
20317 if test -n "$cf_new_cflags" ; then
20319 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20320 CFLAGS="${CFLAGS}$cf_new_cflags"
20324 if test -n "$cf_new_cppflags" ; then
20326 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20327 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20331 if test -n "$cf_new_extra_cppflags" ; then
20333 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20334 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20343 echo "$as_me:20343: checking if you want to perform memory-leak testing" >&5
20344 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20346 # Check whether --enable-leaks or --disable-leaks was given.
20347 if test "${enable_leaks+set}" = set; then
20348 enableval="$enable_leaks"
20349 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20351 : ${with_no_leaks:=no}
20353 echo "$as_me:20353: result: $with_no_leaks" >&5
20354 echo "${ECHO_T}$with_no_leaks" >&6
20356 if test "$with_no_leaks" = yes ; then
20358 cat >>confdefs.h <<\EOF
20362 cat >>confdefs.h <<\EOF
20363 #define YY_NO_LEAKS 1
20369 if test "x$cf_cv_enable_rpath" != xno
20371 echo "$as_me:20371: checking for an rpath option" >&5
20372 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20373 case $cf_cv_system_name in
20375 if test "$GCC" = yes; then
20376 LD_RPATH_OPT="-Wl,-rpath,"
20378 LD_RPATH_OPT="-rpath "
20381 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20382 LD_RPATH_OPT="-Wl,-rpath,"
20384 (openbsd[2-9].*|mirbsd*)
20385 LD_RPATH_OPT="-Wl,-rpath,"
20388 LD_RPATH_OPT="-rpath "
20391 LD_RPATH_OPT="-Wl,-rpath,"
20394 LD_RPATH_OPT="-rpath "
20402 echo "$as_me:20402: result: $LD_RPATH_OPT" >&5
20403 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20405 case "x$LD_RPATH_OPT" in
20407 echo "$as_me:20407: checking if we need a space after rpath option" >&5
20408 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20409 cf_save_LIBS="$LIBS"
20411 cf_add_libs="${LD_RPATH_OPT}$libdir"
20412 # Filter out duplicates - this happens with badly-designed ".pc" files...
20413 for cf_add_1lib in $LIBS
20415 for cf_add_2lib in $cf_add_libs
20417 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20423 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20425 LIBS="$cf_add_libs"
20427 cat >conftest.$ac_ext <<_ACEOF
20428 #line 20428 "configure"
20429 #include "confdefs.h"
20439 rm -f conftest.$ac_objext conftest$ac_exeext
20440 if { (eval echo "$as_me:20440: \"$ac_link\"") >&5
20441 (eval $ac_link) 2>&5
20443 echo "$as_me:20443: \$? = $ac_status" >&5
20444 (exit $ac_status); } &&
20445 { ac_try='test -s conftest$ac_exeext'
20446 { (eval echo "$as_me:20446: \"$ac_try\"") >&5
20447 (eval $ac_try) 2>&5
20449 echo "$as_me:20449: \$? = $ac_status" >&5
20450 (exit $ac_status); }; }; then
20453 echo "$as_me: failed program was:" >&5
20454 cat conftest.$ac_ext >&5
20457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20458 LIBS="$cf_save_LIBS"
20459 echo "$as_me:20459: result: $cf_rpath_space" >&5
20460 echo "${ECHO_T}$cf_rpath_space" >&6
20461 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20466 echo "$as_me:20466: checking if rpath-hack should be disabled" >&5
20467 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20469 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20470 if test "${enable_rpath_hack+set}" = set; then
20471 enableval="$enable_rpath_hack"
20472 test "$enableval" != no && enableval=yes
20473 if test "$enableval" != "yes" ; then
20474 cf_disable_rpath_hack=yes
20476 cf_disable_rpath_hack=no
20480 cf_disable_rpath_hack=no
20483 echo "$as_me:20483: result: $cf_disable_rpath_hack" >&5
20484 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20485 if test "$cf_disable_rpath_hack" = no ; then
20487 echo "$as_me:20487: checking for updated LDFLAGS" >&5
20488 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20489 if test -n "$LD_RPATH_OPT" ; then
20490 echo "$as_me:20490: result: maybe" >&5
20491 echo "${ECHO_T}maybe" >&6
20495 # Extract the first word of "$ac_prog", so it can be a program name with args.
20496 set dummy $ac_prog; ac_word=$2
20497 echo "$as_me:20497: checking for $ac_word" >&5
20498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20499 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20500 echo $ECHO_N "(cached) $ECHO_C" >&6
20502 if test -n "$cf_ldd_prog"; then
20503 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20505 ac_save_IFS=$IFS; IFS=$ac_path_separator
20507 for ac_dir in $ac_dummy; do
20509 test -z "$ac_dir" && ac_dir=.
20510 $as_executable_p "$ac_dir/$ac_word" || continue
20511 ac_cv_prog_cf_ldd_prog="$ac_prog"
20512 echo "$as_me:20512: found $ac_dir/$ac_word" >&5
20518 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20519 if test -n "$cf_ldd_prog"; then
20520 echo "$as_me:20520: result: $cf_ldd_prog" >&5
20521 echo "${ECHO_T}$cf_ldd_prog" >&6
20523 echo "$as_me:20523: result: no" >&5
20524 echo "${ECHO_T}no" >&6
20527 test -n "$cf_ldd_prog" && break
20529 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20531 cf_rpath_list="/usr/lib /lib"
20532 if test "$cf_ldd_prog" != no
20536 cat >conftest.$ac_ext <<_ACEOF
20537 #line 20537 "configure"
20538 #include "confdefs.h"
20548 rm -f conftest.$ac_objext conftest$ac_exeext
20549 if { (eval echo "$as_me:20549: \"$ac_link\"") >&5
20550 (eval $ac_link) 2>&5
20552 echo "$as_me:20552: \$? = $ac_status" >&5
20553 (exit $ac_status); } &&
20554 { ac_try='test -s conftest$ac_exeext'
20555 { (eval echo "$as_me:20555: \"$ac_try\"") >&5
20556 (eval $ac_try) 2>&5
20558 echo "$as_me:20558: \$? = $ac_status" >&5
20559 (exit $ac_status); }; }; then
20560 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20561 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20563 echo "$as_me: failed program was:" >&5
20564 cat conftest.$ac_ext >&5
20566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20568 # If we passed the link-test, but get a "not found" on a given library,
20569 # this could be due to inept reconfiguration of gcc to make it only
20570 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20571 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20572 # /usr/local libraries.
20573 if test -n "$cf_rpath_oops"
20575 for cf_rpath_src in $cf_rpath_oops
20577 for cf_rpath_dir in \
20582 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20584 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20586 echo "${as_me:-configure}:20586: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20588 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20596 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20598 echo "${as_me:-configure}:20598: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20600 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20602 echo "${as_me:-configure}:20602: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20605 for cf_rpath_src in $LDFLAGS
20607 case $cf_rpath_src in
20610 # check if this refers to a directory which we will ignore
20612 if test -n "$cf_rpath_list"
20614 for cf_rpath_item in $cf_rpath_list
20616 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20624 if test "$cf_rpath_skip" = no
20626 # transform the option
20627 if test "$LD_RPATH_OPT" = "-R " ; then
20628 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20630 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20633 # if we have not already added this, add it now
20634 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20635 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20637 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20639 echo "${as_me:-configure}:20639: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20641 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20646 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20648 LDFLAGS=$cf_rpath_dst
20650 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20652 echo "${as_me:-configure}:20652: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20654 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20656 echo "${as_me:-configure}:20656: testing ...checking LIBS $LIBS ..." 1>&5
20659 for cf_rpath_src in $LIBS
20661 case $cf_rpath_src in
20664 # check if this refers to a directory which we will ignore
20666 if test -n "$cf_rpath_list"
20668 for cf_rpath_item in $cf_rpath_list
20670 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20678 if test "$cf_rpath_skip" = no
20680 # transform the option
20681 if test "$LD_RPATH_OPT" = "-R " ; then
20682 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20684 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20687 # if we have not already added this, add it now
20688 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20689 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20691 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20693 echo "${as_me:-configure}:20693: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20695 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20700 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20704 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20706 echo "${as_me:-configure}:20706: testing ...checked LIBS $LIBS ..." 1>&5
20708 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20710 echo "${as_me:-configure}:20710: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20713 echo "$as_me:20713: result: no" >&5
20714 echo "${ECHO_T}no" >&6
20722 ac_config_files="$ac_config_files Makefile"
20723 ac_config_commands="$ac_config_commands default"
20724 cat >confcache <<\_ACEOF
20725 # This file is a shell script that caches the results of configure
20726 # tests run on this system so they can be shared between configure
20727 # scripts and configure runs, see configure's option --config-cache.
20728 # It is not useful on other systems. If it contains results you don't
20729 # want to keep, you may remove or edit it.
20731 # config.status only pays attention to the cache file if you give it
20732 # the --recheck option to rerun configure.
20734 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20735 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20736 # following values.
20740 # The following way of writing the cache mishandles newlines in values,
20741 # but we know of no workaround that is simple, portable, and efficient.
20742 # So, don't put newlines in cache variables' values.
20743 # Ultrix sh set writes to stderr and can't be redirected directly,
20744 # and sets the high bit in the cache file unless we assign to the vars.
20747 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20749 # `set' does not quote correctly, so add quotes (double-quote
20750 # substitution turns \\\\ into \\, and sed turns \\ into \).
20753 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20756 # `set' quotes correctly as required by POSIX, so do not add quotes.
20758 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20765 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20767 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20769 if cmp -s $cache_file confcache; then :; else
20770 if test -w $cache_file; then
20771 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20772 cat confcache >$cache_file
20774 echo "not updating unwritable cache $cache_file"
20779 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20780 # Let make expand exec_prefix.
20781 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20783 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20784 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20785 # trailing colons and then remove the whole line if VPATH becomes empty
20786 # (actually we leave an empty line to preserve line numbers).
20787 if test "x$srcdir" = x.; then
20788 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20789 s/:*\$(srcdir):*/:/;
20790 s/:*\${srcdir}:*/:/;
20792 s/^\([^=]*=[ ]*\):*/\1/;
20798 DEFS=-DHAVE_CONFIG_H
20800 : ${CONFIG_STATUS=./config.status}
20801 ac_clean_files_save=$ac_clean_files
20802 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20803 { echo "$as_me:20803: creating $CONFIG_STATUS" >&5
20804 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20805 cat >$CONFIG_STATUS <<_ACEOF
20807 # Generated automatically by configure.
20808 # Run this file to recreate the current configuration.
20809 # Compiler output produced by configure, useful for debugging
20810 # configure, is in config.log if it exists.
20813 SHELL=\${CONFIG_SHELL-$SHELL}
20814 ac_cs_invocation="\$0 \$@"
20818 cat >>$CONFIG_STATUS <<\_ACEOF
20819 # Be Bourne compatible
20820 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20823 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20827 # Name of the executable.
20828 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20830 if expr a : '\(a\)' >/dev/null 2>&1; then
20836 rm -f conf$$ conf$$.exe conf$$.file
20838 if ln -s conf$$.file conf$$ 2>/dev/null; then
20839 # We could just check for DJGPP; but this test a) works b) is more generic
20840 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20841 if test -f conf$$.exe; then
20842 # Don't use ln at all; we don't have any links
20847 elif ln conf$$.file conf$$ 2>/dev/null; then
20852 rm -f conf$$ conf$$.exe conf$$.file
20854 as_executable_p="test -f"
20856 # Support unset when possible.
20857 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20864 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20865 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20866 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20867 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20868 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20869 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20870 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20871 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20874 # We need space, tab and new line, in precisely that order.
20880 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20886 # Files that config.status was made for.
20887 if test -n "$ac_config_files"; then
20888 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20891 if test -n "$ac_config_headers"; then
20892 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20895 if test -n "$ac_config_links"; then
20896 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20899 if test -n "$ac_config_commands"; then
20900 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20903 cat >>$CONFIG_STATUS <<\EOF
20906 \`$as_me' instantiates files from templates according to the
20907 current configuration.
20909 Usage: $0 [OPTIONS] [FILE]...
20911 -h, --help print this help, then exit
20912 -V, --version print version number, then exit
20913 -d, --debug don't remove temporary files
20914 --recheck update $as_me by reconfiguring in the same conditions
20915 --file=FILE[:TEMPLATE]
20916 instantiate the configuration file FILE
20917 --header=FILE[:TEMPLATE]
20918 instantiate the configuration header FILE
20920 Configuration files:
20923 Configuration headers:
20926 Configuration commands:
20929 Report bugs to <dickey@invisible-island.net>."
20932 cat >>$CONFIG_STATUS <<EOF
20935 configured by $0, generated by GNU Autoconf 2.52.20190828,
20936 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20938 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20939 Free Software Foundation, Inc.
20940 This config.status script is free software; the Free Software Foundation
20941 gives unlimited permission to copy, distribute and modify it."
20946 cat >>$CONFIG_STATUS <<\EOF
20947 # If no file are specified by the user, then we need to provide default
20948 # value. By we need to know if files were specified by the user.
20954 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20955 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20957 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20961 *) # This is not an option, so the user has probably given explicit
20963 ac_need_defaults=false;;
20967 # Handling of the options.
20969 cat >>$CONFIG_STATUS <<EOF
20970 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20971 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20972 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20974 cat >>$CONFIG_STATUS <<\EOF
20975 --version | --vers* | -V )
20976 echo "$ac_cs_version"; exit 0 ;;
20978 # Conflict between --help and --header
20979 { { echo "$as_me:20979: error: ambiguous option: $1
20980 Try \`$0 --help' for more information." >&5
20981 echo "$as_me: error: ambiguous option: $1
20982 Try \`$0 --help' for more information." >&2;}
20983 { (exit 1); exit 1; }; };;
20984 --help | --hel | -h )
20985 echo "$ac_cs_usage"; exit 0 ;;
20986 --debug | --d* | -d )
20988 --file | --fil | --fi | --f )
20990 CONFIG_FILES="$CONFIG_FILES $1"
20991 ac_need_defaults=false;;
20992 --header | --heade | --head | --hea )
20994 CONFIG_HEADERS="$CONFIG_HEADERS $1"
20995 ac_need_defaults=false;;
20997 # This is an error.
20998 -*) { { echo "$as_me:20998: error: unrecognized option: $1
20999 Try \`$0 --help' for more information." >&5
21000 echo "$as_me: error: unrecognized option: $1
21001 Try \`$0 --help' for more information." >&2;}
21002 { (exit 1); exit 1; }; } ;;
21004 *) ac_config_targets="$ac_config_targets $1" ;;
21013 ## ----------------------- ##
21014 ## Running config.status. ##
21015 ## ----------------------- ##
21017 This file was extended by $as_me 2.52.20190828, executed with
21018 CONFIG_FILES = $CONFIG_FILES
21019 CONFIG_HEADERS = $CONFIG_HEADERS
21020 CONFIG_LINKS = $CONFIG_LINKS
21021 CONFIG_COMMANDS = $CONFIG_COMMANDS
21022 > $ac_cs_invocation
21023 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21028 cat >>$CONFIG_STATUS <<EOF
21030 # INIT-COMMANDS section.
21040 cat >>$CONFIG_STATUS <<\EOF
21041 for ac_config_target in $ac_config_targets
21043 case "$ac_config_target" in
21044 # Handling of arguments.
21045 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21046 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21047 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
21048 *) { { echo "$as_me:21048: error: invalid argument: $ac_config_target" >&5
21049 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21050 { (exit 1); exit 1; }; };;
21054 # If the user did not use the arguments to specify the items to instantiate,
21055 # then the envvar interface is used. Set only those that are not.
21056 # We use the long form for the default assignment because of an extremely
21057 # bizarre bug on SunOS 4.1.3.
21058 if $ac_need_defaults; then
21059 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21060 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21061 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21064 # Create a temporary directory, and hook for its removal unless debugging.
21067 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21068 trap '{ (exit 1); exit 1; }' 1 2 13 15
21071 # Create a (secure) tmp directory for tmp files.
21074 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21075 test -n "$tmp" && test -d "$tmp"
21078 tmp=$TMPDIR/cs$$-$RANDOM
21079 (umask 077 && mkdir $tmp)
21082 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21083 { (exit 1); exit 1; }
21088 cat >>$CONFIG_STATUS <<EOF
21091 # CONFIG_FILES section.
21094 # No need to generate the scripts if there are no CONFIG_FILES.
21095 # This happens for instance when ./config.status config.h
21096 if test -n "\$CONFIG_FILES"; then
21097 # Protect against being on the right side of a sed subst in config.status.
21098 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21099 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21100 s,@SHELL@,$SHELL,;t t
21101 s,@exec_prefix@,$exec_prefix,;t t
21102 s,@prefix@,$prefix,;t t
21103 s,@program_transform_name@,$program_transform_name,;t t
21104 s,@bindir@,$bindir,;t t
21105 s,@sbindir@,$sbindir,;t t
21106 s,@libexecdir@,$libexecdir,;t t
21107 s,@datarootdir@,$datarootdir,;t t
21108 s,@datadir@,$datadir,;t t
21109 s,@sysconfdir@,$sysconfdir,;t t
21110 s,@sharedstatedir@,$sharedstatedir,;t t
21111 s,@localstatedir@,$localstatedir,;t t
21112 s,@runstatedir@,$runstatedir,;t t
21113 s,@libdir@,$libdir,;t t
21114 s,@includedir@,$includedir,;t t
21115 s,@oldincludedir@,$oldincludedir,;t t
21116 s,@infodir@,$infodir,;t t
21117 s,@mandir@,$mandir,;t t
21118 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21119 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21120 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21121 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21122 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21123 s,@build_alias@,$build_alias,;t t
21124 s,@host_alias@,$host_alias,;t t
21125 s,@target_alias@,$target_alias,;t t
21126 s,@ECHO_C@,$ECHO_C,;t t
21127 s,@ECHO_N@,$ECHO_N,;t t
21128 s,@ECHO_T@,$ECHO_T,;t t
21129 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21130 s,@DEFS@,$DEFS,;t t
21131 s,@LIBS@,$LIBS,;t t
21132 s,@build@,$build,;t t
21133 s,@build_cpu@,$build_cpu,;t t
21134 s,@build_vendor@,$build_vendor,;t t
21135 s,@build_os@,$build_os,;t t
21136 s,@host@,$host,;t t
21137 s,@host_cpu@,$host_cpu,;t t
21138 s,@host_vendor@,$host_vendor,;t t
21139 s,@host_os@,$host_os,;t t
21140 s,@SET_MAKE@,$SET_MAKE,;t t
21142 s,@CFLAGS@,$CFLAGS,;t t
21143 s,@LDFLAGS@,$LDFLAGS,;t t
21144 s,@CPPFLAGS@,$CPPFLAGS,;t t
21145 s,@ac_ct_CC@,$ac_ct_CC,;t t
21146 s,@EXEEXT@,$EXEEXT,;t t
21147 s,@OBJEXT@,$OBJEXT,;t t
21148 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21151 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21152 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21153 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21154 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21155 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21156 s,@LINT@,$LINT,;t t
21157 s,@LINT_OPTS@,$LINT_OPTS,;t t
21158 s,@CTAGS@,$CTAGS,;t t
21159 s,@ETAGS@,$ETAGS,;t t
21160 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21161 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21162 s,@MATH_LIB@,$MATH_LIB,;t t
21163 s,@top_builddir@,$top_builddir,;t t
21164 s,@CC_G_OPT@,$CC_G_OPT,;t t
21165 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21166 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21167 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21168 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21170 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21171 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21172 s,@LD_MODEL@,$LD_MODEL,;t t
21173 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21174 s,@LIBTOOL@,$LIBTOOL,;t t
21175 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21176 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21177 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21178 s,@LIB_LINK@,$LIB_LINK,;t t
21179 s,@LINK_TESTS@,$LINK_TESTS,;t t
21180 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21181 s,@PACKAGE@,$PACKAGE,;t t
21182 s,@PTHREAD@,$PTHREAD,;t t
21183 s,@TEST_ARGS@,$TEST_ARGS,;t t
21184 s,@TEST_DEPS@,$TEST_DEPS,;t t
21185 s,@TEST_LIBS@,$TEST_LIBS,;t t
21186 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21187 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21188 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21189 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21190 s,@includesubdir@,$includesubdir,;t t
21191 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21192 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21193 s,@ECHO_LT@,$ECHO_LT,;t t
21194 s,@ECHO_LD@,$ECHO_LD,;t t
21195 s,@RULE_CC@,$RULE_CC,;t t
21196 s,@SHOW_CC@,$SHOW_CC,;t t
21197 s,@ECHO_CC@,$ECHO_CC,;t t
21198 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21199 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21200 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21201 s,@X_CFLAGS@,$X_CFLAGS,;t t
21202 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21203 s,@X_LIBS@,$X_LIBS,;t t
21204 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21205 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21206 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21207 s,@RGB_PATH@,$RGB_PATH,;t t
21208 s,@no_x11_rgb@,$no_x11_rgb,;t t
21209 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21210 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21211 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21216 cat >>$CONFIG_STATUS <<\EOF
21217 # Split the substitutions into bite-sized pieces for seds with
21218 # small command number limits, like on Digital OSF/1 and HP-UX.
21219 ac_max_sed_lines=48
21220 ac_sed_frag=1 # Number of current file.
21221 ac_beg=1 # First line for current file.
21222 ac_end=$ac_max_sed_lines # Line after last line for current file.
21225 while $ac_more_lines; do
21226 if test $ac_beg -gt 1; then
21227 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21229 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21231 if test ! -s $tmp/subs.frag; then
21232 ac_more_lines=false
21234 # The purpose of the label and of the branching condition is to
21235 # speed up the sed processing (if there are no `@' at all, there
21236 # is no need to browse any of the substitutions).
21237 # These are the two extra sed commands mentioned above.
21239 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21240 # It is possible to make a multiline substitution using escaped newlines.
21241 # Ensure that we do not split the substitution between script fragments.
21243 ac_END=`expr $ac_end + $ac_max_sed_lines`
21244 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21245 if test -s $tmp/subs.next; then
21246 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21247 if test ! -s $tmp/subs.edit; then
21248 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21249 if test ! -s $tmp/subs.edit; then
21250 if test $ac_beg -gt 1; then
21251 ac_end=`expr $ac_end - 1`
21258 if test -z "$ac_sed_cmds"; then
21259 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21261 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21263 ac_sed_frag=`expr $ac_sed_frag + 1`
21265 ac_end=`expr $ac_end + $ac_max_sed_lines`
21268 if test -z "$ac_sed_cmds"; then
21271 fi # test -n "$CONFIG_FILES"
21274 cat >>$CONFIG_STATUS <<\EOF
21275 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21276 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21278 - | *:- | *:-:* ) # input from stdin
21280 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21281 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21282 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21283 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21284 * ) ac_file_in=$ac_file.in ;;
21287 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21288 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21289 X"$ac_file" : 'X\(//\)[^/]' \| \
21290 X"$ac_file" : 'X\(//\)$' \| \
21291 X"$ac_file" : 'X\(/\)' \| \
21292 . : '\(.\)' 2>/dev/null ||
21294 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21295 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21296 /^X\(\/\/\)$/{ s//\1/; q; }
21297 /^X\(\/\).*/{ s//\1/; q; }
21299 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21300 { case "$ac_dir" in
21301 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21305 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21306 case $as_mkdir_dir in
21307 # Skip DOS drivespec
21308 ?:) as_incr_dir=$as_mkdir_dir ;;
21310 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21311 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21316 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21317 # A "../" for each directory in $ac_dir_suffix.
21318 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21320 ac_dir_suffix= ac_dots=
21325 if test -z "$ac_dots"; then
21328 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21330 [\\/]* | ?:[\\/]* )
21331 ac_srcdir=$srcdir$ac_dir_suffix;
21332 ac_top_srcdir=$srcdir ;;
21333 *) # Relative path.
21334 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21335 ac_top_srcdir=$ac_dots$srcdir ;;
21339 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21340 *) ac_INSTALL=$ac_dots$INSTALL ;;
21343 if test x"$ac_file" != x-; then
21344 { echo "$as_me:21344: creating $ac_file" >&5
21345 echo "$as_me: creating $ac_file" >&6;}
21348 # Let's still pretend it is `configure' which instantiates (i.e., don't
21349 # use $as_me), people would be surprised to read:
21350 # /* config.h. Generated automatically by config.status. */
21351 configure_input="Generated automatically from `echo $ac_file_in |
21352 sed 's,.*/,,'` by configure."
21354 # First look for the input files in the build tree, otherwise in the
21356 ac_file_inputs=`IFS=:
21357 for f in $ac_file_in; do
21359 -) echo $tmp/stdin ;;
21361 # Absolute (can't be DOS-style, as IFS=:)
21362 test -f "$f" || { { echo "$as_me:21362: error: cannot find input file: $f" >&5
21363 echo "$as_me: error: cannot find input file: $f" >&2;}
21364 { (exit 1); exit 1; }; }
21367 if test -f "$f"; then
21370 elif test -f "$srcdir/$f"; then
21375 { { echo "$as_me:21375: error: cannot find input file: $f" >&5
21376 echo "$as_me: error: cannot find input file: $f" >&2;}
21377 { (exit 1); exit 1; }; }
21380 done` || { (exit 1); exit 1; }
21382 cat >>$CONFIG_STATUS <<\EOF
21383 ac_warn_datarootdir=no
21384 if test x"$ac_file" != x-; then
21385 for ac_item in $ac_file_inputs
21387 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21388 if test -n "$ac_seen"; then
21389 ac_used=`grep '@datarootdir@' $ac_item`
21390 if test -z "$ac_used"; then
21391 { echo "$as_me:21391: WARNING: datarootdir was used implicitly but not set:
21393 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21395 ac_warn_datarootdir=yes
21398 ac_seen=`grep '${datarootdir}' $ac_item`
21399 if test -n "$ac_seen"; then
21400 { echo "$as_me:21400: WARNING: datarootdir was used explicitly but not set:
21402 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21404 ac_warn_datarootdir=yes
21409 if test "x$ac_warn_datarootdir" = xyes; then
21410 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21414 cat >>$CONFIG_STATUS <<EOF
21418 cat >>$CONFIG_STATUS <<\EOF
21420 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21421 s,@configure_input@,$configure_input,;t t
21422 s,@srcdir@,$ac_srcdir,;t t
21423 s,@top_srcdir@,$ac_top_srcdir,;t t
21424 s,@INSTALL@,$ac_INSTALL,;t t
21425 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21427 if test x"$ac_file" != x-; then
21428 cp $tmp/out $ac_file
21430 for ac_name in prefix exec_prefix datarootdir
21432 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21433 if test -n "$ac_seen"; then
21434 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21435 if test -z "$ac_init"; then
21436 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21437 { echo "$as_me:21437: WARNING: Variable $ac_name is used but was not set:
21439 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21444 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21445 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21446 if test -s $tmp/out; then
21447 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21448 { echo "$as_me:21448: WARNING: Some variables may not be substituted:
21450 echo "$as_me: WARNING: Some variables may not be substituted:
21460 cat >>$CONFIG_STATUS <<\EOF
21463 # CONFIG_HEADER section.
21466 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21467 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21469 # ac_d sets the value in "#define NAME VALUE" lines.
21470 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21471 ac_dB='[ ].*$,\1#\2'
21474 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21475 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21476 ac_iB='\([ ]\),\1#\2define\3'
21479 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21480 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21481 ac_uB='$,\1#\2define\3'
21485 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21486 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21488 - | *:- | *:-:* ) # input from stdin
21490 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21491 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21492 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21493 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21494 * ) ac_file_in=$ac_file.in ;;
21497 test x"$ac_file" != x- && { echo "$as_me:21497: creating $ac_file" >&5
21498 echo "$as_me: creating $ac_file" >&6;}
21500 # First look for the input files in the build tree, otherwise in the
21502 ac_file_inputs=`IFS=:
21503 for f in $ac_file_in; do
21505 -) echo $tmp/stdin ;;
21507 # Absolute (can't be DOS-style, as IFS=:)
21508 test -f "$f" || { { echo "$as_me:21508: error: cannot find input file: $f" >&5
21509 echo "$as_me: error: cannot find input file: $f" >&2;}
21510 { (exit 1); exit 1; }; }
21513 if test -f "$f"; then
21516 elif test -f "$srcdir/$f"; then
21521 { { echo "$as_me:21521: error: cannot find input file: $f" >&5
21522 echo "$as_me: error: cannot find input file: $f" >&2;}
21523 { (exit 1); exit 1; }; }
21526 done` || { (exit 1); exit 1; }
21527 # Remove the trailing spaces.
21528 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21532 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21533 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21534 # be either 'cat' or 'sort'.
21535 cat confdefs.h | uniq >conftest.vals
21537 # Break up conftest.vals because some shells have a limit on
21538 # the size of here documents, and old seds have small limits too.
21540 rm -f conftest.tail
21541 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21542 while grep . conftest.vals >/dev/null
21544 # Write chunks of a limited-size here document to conftest.frag.
21545 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21546 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21547 echo 'CEOF' >> $CONFIG_STATUS
21548 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21549 rm -f conftest.vals
21550 mv conftest.tail conftest.vals
21552 rm -f conftest.vals
21554 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21556 echo ' cat >> conftest.edit <<CEOF
21557 /@DEFS@/r conftest.frag
21560 sed -f conftest.edit $tmp/in > $tmp/out
21562 mv $tmp/out $tmp/in
21563 rm -f conftest.edit conftest.frag
21564 ' >> $CONFIG_STATUS
21566 cat >>$CONFIG_STATUS <<\EOF
21567 # Let's still pretend it is `configure' which instantiates (i.e., don't
21568 # use $as_me), people would be surprised to read:
21569 # /* config.h. Generated automatically by config.status. */
21570 if test x"$ac_file" = x-; then
21571 echo "/* Generated automatically by configure. */" >$tmp/config.h
21573 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21575 cat $tmp/in >>$tmp/config.h
21577 if test x"$ac_file" != x-; then
21578 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21579 { echo "$as_me:21579: $ac_file is unchanged" >&5
21580 echo "$as_me: $ac_file is unchanged" >&6;}
21582 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21583 X"$ac_file" : 'X\(//\)[^/]' \| \
21584 X"$ac_file" : 'X\(//\)$' \| \
21585 X"$ac_file" : 'X\(/\)' \| \
21586 . : '\(.\)' 2>/dev/null ||
21588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21589 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21590 /^X\(\/\/\)$/{ s//\1/; q; }
21591 /^X\(\/\).*/{ s//\1/; q; }
21593 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21594 { case "$ac_dir" in
21595 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21599 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21600 case $as_mkdir_dir in
21601 # Skip DOS drivespec
21602 ?:) as_incr_dir=$as_mkdir_dir ;;
21604 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21605 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21612 mv $tmp/config.h $ac_file
21616 rm -f $tmp/config.h
21620 cat >>$CONFIG_STATUS <<\EOF
21622 # CONFIG_COMMANDS section.
21624 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21625 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21626 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21633 if test ! -d $srcdir/$cf_dir; then
21635 elif test -f $srcdir/$cf_dir/programs; then
21636 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21640 cat >>Makefile <<TEST_EOF
21642 # These rules are generated so we do not rely on suffix rules, which do not
21643 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21644 # some, and the '\$x' confuses others).
21647 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21650 cat >>Makefile <<TEST_EOF
21652 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21653 \$(srcdir)/test.priv.h \\
21656 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21660 if test -f ../config.guess && test -f ../config.sub
21662 cat >>Makefile <<TEST_EOF
21664 # if we used CF_INHERIT for getting these files, we can remove them
21666 rm -f config.guess config.sub
21674 cat >>$CONFIG_STATUS <<\EOF
21676 { (exit 0); exit 0; }
21678 chmod +x $CONFIG_STATUS
21679 ac_clean_files=$ac_clean_files_save
21681 # configure is writing to config.log, and then calls config.status.
21682 # config.status does its own redirection, appending to config.log.
21683 # Unfortunately, on DOS this fails, as config.log is still kept open
21684 # by configure, so config.status won't be able to write to it; its
21685 # output is simply discarded. So we exec the FD to /dev/null,
21686 # effectively closing config.log, so it can be properly (re)opened and
21687 # appended to by config.status. When coming back to configure, we
21688 # need to make the FD available again.
21689 if test "$no_create" != yes; then
21692 $SHELL $CONFIG_STATUS || ac_cs_success=false
21694 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21695 # would make configure fail if this is the last instruction.
21696 $ac_cs_success || { (exit 1); exit 1; }