2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20181006.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 runstatedir='${localstatedir}/run'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
149 # Identity of this package.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
168 # Accept the important Cygnus configure options, so we can diagnose typos.
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
190 cache_file=config.cache ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir=$ac_optarg ;;
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212 eval "enable_$ac_feature=no" ;;
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225 eval "enable_$ac_feature='$ac_optarg'" ;;
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
240 -help | --help | --hel | --he | -h)
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
264 -libdir | --libdir | --libdi | --libd)
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
285 -runstatedir | --runstatedir | --runstatedi | --runstated \
286 | --runstate | --runstat | --runsta | --runst \
287 | --runs | --run | --ru)
288 ac_prev=runstatedir ;;
289 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
290 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
291 | --runs=* | --run=* | --ru=*)
292 runstatedir=$ac_optarg ;;
294 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
296 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
300 # Obsolete; use --without-fp.
303 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
307 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
311 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313 | --oldin | --oldi | --old | --ol | --o)
314 ac_prev=oldincludedir ;;
315 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318 oldincludedir=$ac_optarg ;;
320 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
322 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
325 -program-prefix | --program-prefix | --program-prefi | --program-pref \
326 | --program-pre | --program-pr | --program-p)
327 ac_prev=program_prefix ;;
328 -program-prefix=* | --program-prefix=* | --program-prefi=* \
329 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330 program_prefix=$ac_optarg ;;
332 -program-suffix | --program-suffix | --program-suffi | --program-suff \
333 | --program-suf | --program-su | --program-s)
334 ac_prev=program_suffix ;;
335 -program-suffix=* | --program-suffix=* | --program-suffi=* \
336 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337 program_suffix=$ac_optarg ;;
339 -program-transform-name | --program-transform-name \
340 | --program-transform-nam | --program-transform-na \
341 | --program-transform-n | --program-transform- \
342 | --program-transform | --program-transfor \
343 | --program-transfo | --program-transf \
344 | --program-trans | --program-tran \
345 | --progr-tra | --program-tr | --program-t)
346 ac_prev=program_transform_name ;;
347 -program-transform-name=* | --program-transform-name=* \
348 | --program-transform-nam=* | --program-transform-na=* \
349 | --program-transform-n=* | --program-transform-=* \
350 | --program-transform=* | --program-transfor=* \
351 | --program-transfo=* | --program-transf=* \
352 | --program-trans=* | --program-tran=* \
353 | --progr-tra=* | --program-tr=* | --program-t=*)
354 program_transform_name=$ac_optarg ;;
356 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357 | -silent | --silent | --silen | --sile | --sil)
360 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
362 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
364 sbindir=$ac_optarg ;;
366 -sharedstatedir | --sharedstatedir | --sharedstatedi \
367 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368 | --sharedst | --shareds | --shared | --share | --shar \
370 ac_prev=sharedstatedir ;;
371 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
375 sharedstatedir=$ac_optarg ;;
377 -site | --site | --sit)
379 -site=* | --site=* | --sit=*)
382 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
384 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
387 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388 | --syscon | --sysco | --sysc | --sys | --sy)
389 ac_prev=sysconfdir ;;
390 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392 sysconfdir=$ac_optarg ;;
394 -target | --target | --targe | --targ | --tar | --ta | --t)
395 ac_prev=target_alias ;;
396 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397 target_alias=$ac_optarg ;;
399 -v | -verbose | --verbose | --verbos | --verbo | --verb)
402 -version | --version | --versio | --versi | --vers | -V)
406 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
407 # Reject names that are not valid shell variable names.
408 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid package name: $ac_package" >&2
410 { (exit 1); exit 1; }; }
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416 eval "with_$ac_package='$ac_optarg'" ;;
418 -without-* | --without-*)
419 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
420 # Reject names that are not valid shell variable names.
421 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
422 { echo "$as_me: error: invalid package name: $ac_package" >&2
423 { (exit 1); exit 1; }; }
424 ac_package=`echo $ac_package | sed 's/-/_/g'`
425 eval "with_$ac_package=no" ;;
428 # Obsolete; use --with-x.
431 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432 | --x-incl | --x-inc | --x-in | --x-i)
433 ac_prev=x_includes ;;
434 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436 x_includes=$ac_optarg ;;
438 -x-libraries | --x-libraries | --x-librarie | --x-librari \
439 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440 ac_prev=x_libraries ;;
441 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443 x_libraries=$ac_optarg ;;
445 -*) { echo "$as_me: error: unrecognized option: $ac_option
446 Try \`$0 --help' for more information." >&2
447 { (exit 1); exit 1; }; }
451 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
452 # Reject names that are not valid shell variable names.
453 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
454 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
455 { (exit 1); exit 1; }; }
456 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
457 eval "$ac_envvar='$ac_optarg'"
461 # FIXME: should be removed in autoconf 3.0.
462 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
463 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
464 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
465 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
471 if test -n "$ac_prev"; then
472 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
473 { echo "$as_me: error: missing argument to $ac_option" >&2
474 { (exit 1); exit 1; }; }
477 # Be sure to have absolute paths.
478 for ac_var in exec_prefix prefix
480 eval ac_val=$`echo $ac_var`
482 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
483 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
484 { (exit 1); exit 1; }; };;
488 # Be sure to have absolute paths.
489 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
490 localstatedir libdir includedir oldincludedir infodir mandir
492 eval ac_val=$`echo $ac_var`
494 [\\/$]* | ?:[\\/]* ) ;;
495 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
496 { (exit 1); exit 1; }; };;
500 # There might be people who depend on the old broken behavior: `$host'
501 # used to hold the argument of --host etc.
506 # FIXME: should be removed in autoconf 3.0.
507 if test "x$host_alias" != x; then
508 if test "x$build_alias" = x; then
509 cross_compiling=maybe
510 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
511 If a cross compiler is detected then cross compile mode will be used." >&2
512 elif test "x$build_alias" != "x$host_alias"; then
518 test -n "$host_alias" && ac_tool_prefix=$host_alias-
520 test "$silent" = yes && exec 6>/dev/null
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524 ac_srcdir_defaulted=yes
525 # Try the directory containing this script, then its parent.
527 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
528 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530 if test ! -r $srcdir/$ac_unique_file; then
534 ac_srcdir_defaulted=no
536 if test ! -r $srcdir/$ac_unique_file; then
537 if test "$ac_srcdir_defaulted" = yes; then
538 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
539 { (exit 1); exit 1; }; }
541 { echo "$as_me: error: cannot find sources in $srcdir" >&2
542 { (exit 1); exit 1; }; }
545 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
546 ac_env_build_alias_set=${build_alias+set}
547 ac_env_build_alias_value=$build_alias
548 ac_cv_env_build_alias_set=${build_alias+set}
549 ac_cv_env_build_alias_value=$build_alias
550 ac_env_host_alias_set=${host_alias+set}
551 ac_env_host_alias_value=$host_alias
552 ac_cv_env_host_alias_set=${host_alias+set}
553 ac_cv_env_host_alias_value=$host_alias
554 ac_env_target_alias_set=${target_alias+set}
555 ac_env_target_alias_value=$target_alias
556 ac_cv_env_target_alias_set=${target_alias+set}
557 ac_cv_env_target_alias_value=$target_alias
558 ac_env_CC_set=${CC+set}
560 ac_cv_env_CC_set=${CC+set}
561 ac_cv_env_CC_value=$CC
562 ac_env_CFLAGS_set=${CFLAGS+set}
563 ac_env_CFLAGS_value=$CFLAGS
564 ac_cv_env_CFLAGS_set=${CFLAGS+set}
565 ac_cv_env_CFLAGS_value=$CFLAGS
566 ac_env_LDFLAGS_set=${LDFLAGS+set}
567 ac_env_LDFLAGS_value=$LDFLAGS
568 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_cv_env_LDFLAGS_value=$LDFLAGS
570 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
571 ac_env_CPPFLAGS_value=$CPPFLAGS
572 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
574 ac_env_CPP_set=${CPP+set}
575 ac_env_CPP_value=$CPP
576 ac_cv_env_CPP_set=${CPP+set}
577 ac_cv_env_CPP_value=$CPP
580 # Report the --help message.
582 if test "$ac_init_help" = "long"; then
583 # Omit some internal or obsolete options to make the list less imposing.
584 # This message is too long to be a string in the A/UX 3.1 sh.
586 \`configure' configures this package to adapt to many kinds of systems.
588 Usage: $0 [OPTION]... [VAR=VALUE]...
590 To assign environment variables (e.g., CC, CFLAGS...), specify them as
591 VAR=VALUE. See below for descriptions of some of the useful variables.
593 Defaults for the options are specified in brackets.
596 -h, --help display this help and exit
597 --help=short display options specific to this package
598 --help=recursive display the short help of all the included packages
599 -V, --version display version information and exit
600 -q, --quiet, --silent do not print \`checking...' messages
601 --cache-file=FILE cache test results in FILE [disabled]
602 -C, --config-cache alias for \`--cache-file=config.cache'
603 -n, --no-create do not create output files
604 --srcdir=DIR find the sources in DIR [configure dir or \`..']
609 Installation directories:
610 --prefix=PREFIX install architecture-independent files in PREFIX
612 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
615 By default, \`make install' will install all the files in
616 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
617 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
618 for instance \`--prefix=\$HOME'.
620 For better control, use the options below.
622 Fine tuning of the installation directories:
623 --bindir=DIR user executables [EPREFIX/bin]
624 --sbindir=DIR system admin executables [EPREFIX/sbin]
625 --libexecdir=DIR program executables [EPREFIX/libexec]
626 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
627 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
628 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
629 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
630 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
631 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
632 --libdir=DIR object code libraries [EPREFIX/lib]
633 --includedir=DIR C header files [PREFIX/include]
634 --oldincludedir=DIR C header files for non-gcc [/usr/include]
635 --infodir=DIR info documentation [DATAROOTDIR/info]
636 --mandir=DIR man documentation [DATAROOTDIR/man]
642 --program-prefix=PREFIX prepend PREFIX to installed program names
643 --program-suffix=SUFFIX append SUFFIX to installed program names
644 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
647 --x-includes=DIR X include files are in DIR
648 --x-libraries=DIR X library files are in DIR
651 --build=BUILD configure for building on BUILD [guessed]
652 --host=HOST build programs to run on HOST [BUILD]
656 if test -n "$ac_init_help"; then
661 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
662 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
665 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
666 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
669 --disable-stripping do not strip (debug info) installed executables
670 --enable-string-hacks work around bogus compiler/loader warnings
671 --with-pkg-config{=path} enable/disable use of pkg-config
672 --disable-echo do not display "compiling" commands
673 Curses Version-dependent Options:
674 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
675 --disable-widec disable checks for wide-character functions
676 --with-curses-dir=DIR directory in which (n)curses is installed
677 --with-screen=XXX use specified curses-libraries
678 --with-ncursesw use wide ncurses-libraries
679 --with-ncurses use ncurses-libraries
680 --with-pdcurses compile/link with pdcurses X11 library
681 --with-curses-colr compile/link with HPUX 10.x color-curses
682 --with-curses-5lib compile/link with SunOS 5lib curses
683 --with-Xaw3d link with Xaw 3d library
684 --with-Xaw3dxft link with Xaw 3d xft library
685 --with-neXtaw link with neXT Athena library
686 --with-XawPlus link with Athena-Plus library
687 --with-x use the X Window System
688 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
689 --disable-panel disable checks for panel functions
690 --disable-menu disable checks for menu functions
691 --disable-form disable checks for form functions
692 Testing/development Options:
693 --enable-warnings test: turn on gcc compiler warnings
694 --with-dmalloc test: use Gray Watson's dmalloc library
695 --with-dbmalloc test: use Conor Cahill's dbmalloc library
696 --with-valgrind test: use valgrind
697 --disable-leaks test: free permanent memory, analyze leaks
698 --disable-rpath-hack don't add rpath options for additional libraries
700 Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
709 Use these variables to override the choices made by `configure' or to help
710 it to find libraries and programs with nonstandard names/locations.
715 if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
751 test -n "$ac_init_help" && exit 0
752 if $ac_init_version; then
755 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756 Free Software Foundation, Inc.
757 This configure script is free software; the Free Software Foundation
758 gives unlimited permission to copy, distribute and modify it.
764 This file contains any messages produced by compilers while
765 running configure, to aid debugging if configure makes a mistake.
767 It was created by $as_me, which was
768 generated by GNU Autoconf 2.52.20181006. Invocation command line was
779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
808 # Keep a trace of the command line.
809 # Strip out --no-create and --no-recursion so they do not pile up.
810 # Also quote any args containing shell meta-characters.
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
827 # Get rid of the leading space.
830 # When interrupted or exit'd, cleanup temporary files, and complete
831 # config.log. We remove comments because anyway the quotes in there
832 # would cause problems or look ugly.
834 # Save into config.log some information that might help in debugging.
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
840 # The following way of writing the cache mishandles newlines in values,
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
871 for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 # confdefs.h avoids OS command line length limits that DEFS can exceed.
877 rm -rf conftest* confdefs.h
878 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
881 # Let the site file select an alternate cache file if it wants to.
882 # Prefer explicitly selected file to automatically selected ones.
883 if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
890 for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
892 { echo "$as_me:892: loading site script $ac_site_file" >&5
893 echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
899 if test -r "$cache_file"; then
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
903 { echo "$as_me:903: loading cache $cache_file" >&5
904 echo "$as_me: loading cache $cache_file" >&6;}
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 { echo "$as_me:911: creating cache $cache_file" >&5
912 echo "$as_me: creating cache $cache_file" >&6;}
916 # Check that the precious variables saved in the cache have kept the same
918 ac_cache_corrupted=false
919 for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
928 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
936 if test "x$ac_old_val" != "x$ac_new_val"; then
937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
938 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
939 { echo "$as_me:939: former value: $ac_old_val" >&5
940 echo "$as_me: former value: $ac_old_val" >&2;}
941 { echo "$as_me:941: current value: $ac_new_val" >&5
942 echo "$as_me: current value: $ac_new_val" >&2;}
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 if $ac_cache_corrupted; then
960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
961 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
963 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
972 ac_main_return=return
974 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
975 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
977 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
978 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
980 echo "#! $SHELL" >conftest.sh
981 echo "exit 0" >>conftest.sh
983 if { (echo "$as_me:983: PATH=\".;.\"; conftest.sh") >&5
984 (PATH=".;."; conftest.sh) 2>&5
986 echo "$as_me:986: \$? = $ac_status" >&5
987 (exit $ac_status); }; then
988 ac_path_separator=';'
992 PATH_SEPARATOR="$ac_path_separator"
995 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
997 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
999 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1002 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1003 if test -f $ac_dir/install-sh; then
1005 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 elif test -f $ac_dir/install.sh; then
1009 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 elif test -f $ac_dir/shtool; then
1013 ac_install_sh="$ac_aux_dir/shtool install -c"
1017 if test -z "$ac_aux_dir"; then
1018 { { echo "$as_me:1018: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1019 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1020 { (exit 1); exit 1; }; }
1022 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1023 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1024 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026 # Make sure we can run config.sub.
1027 $ac_config_sub sun4 >/dev/null 2>&1 ||
1028 { { echo "$as_me:1028: error: cannot run $ac_config_sub" >&5
1029 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1030 { (exit 1); exit 1; }; }
1032 echo "$as_me:1032: checking build system type" >&5
1033 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1034 if test "${ac_cv_build+set}" = set; then
1035 echo $ECHO_N "(cached) $ECHO_C" >&6
1037 ac_cv_build_alias=$build_alias
1038 test -z "$ac_cv_build_alias" &&
1039 ac_cv_build_alias=`$ac_config_guess`
1040 test -z "$ac_cv_build_alias" &&
1041 { { echo "$as_me:1041: error: cannot guess build type; you must specify one" >&5
1042 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1043 { (exit 1); exit 1; }; }
1044 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1045 { { echo "$as_me:1045: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1046 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1047 { (exit 1); exit 1; }; }
1050 echo "$as_me:1050: result: $ac_cv_build" >&5
1051 echo "${ECHO_T}$ac_cv_build" >&6
1053 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1054 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1055 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 system_name="$host_os"
1081 system_name="`(uname -s -r) 2>/dev/null`"
1082 if test -z "$system_name" ; then
1083 system_name="`(hostname) 2>/dev/null`"
1086 test -n "$system_name" &&
1087 cat >>confdefs.h <<EOF
1088 #define SYSTEM_NAME "$system_name"
1091 if test "${cf_cv_system_name+set}" = set; then
1092 echo $ECHO_N "(cached) $ECHO_C" >&6
1094 cf_cv_system_name="$system_name"
1097 test -z "$system_name" && system_name="$cf_cv_system_name"
1098 test -n "$cf_cv_system_name" && echo "$as_me:1098: result: Configuring for $cf_cv_system_name" >&5
1099 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1101 if test ".$system_name" != ".$cf_cv_system_name" ; then
1102 echo "$as_me:1102: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1103 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1104 { { echo "$as_me:1104: error: \"Please remove config.cache and try again.\"" >&5
1105 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1106 { (exit 1); exit 1; }; }
1109 test "$program_prefix" != NONE &&
1110 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1111 # Use a double $ so make ignores it.
1112 test "$program_suffix" != NONE &&
1113 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1114 # Double any \ or $. echo might interpret backslashes.
1115 # By default was `s,x,x', remove it if useless.
1116 cat <<\_ACEOF >conftest.sed
1117 s/[\\$]/&&/g;s/;s,x,x,$//
1119 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1122 echo "$as_me:1122: checking whether ${MAKE-make} sets \${MAKE}" >&5
1123 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1124 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1125 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1126 echo $ECHO_N "(cached) $ECHO_C" >&6
1128 cat >conftest.make <<\EOF
1130 @echo 'ac_maketemp="${MAKE}"'
1132 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1133 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1134 if test -n "$ac_maketemp"; then
1135 eval ac_cv_prog_make_${ac_make}_set=yes
1137 eval ac_cv_prog_make_${ac_make}_set=no
1141 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1142 echo "$as_me:1142: result: yes" >&5
1143 echo "${ECHO_T}yes" >&6
1146 echo "$as_me:1146: result: no" >&5
1147 echo "${ECHO_T}no" >&6
1148 SET_MAKE="MAKE=${MAKE-make}"
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return=return
1157 if test -n "$ac_tool_prefix"; then
1158 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1159 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1160 echo "$as_me:1160: checking for $ac_word" >&5
1161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1162 if test "${ac_cv_prog_CC+set}" = set; then
1163 echo $ECHO_N "(cached) $ECHO_C" >&6
1165 if test -n "$CC"; then
1166 ac_cv_prog_CC="$CC" # Let the user override the test.
1168 ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 $as_executable_p "$ac_dir/$ac_word" || continue
1174 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1175 echo "$as_me:1175: found $ac_dir/$ac_word" >&5
1182 if test -n "$CC"; then
1183 echo "$as_me:1183: result: $CC" >&5
1184 echo "${ECHO_T}$CC" >&6
1186 echo "$as_me:1186: result: no" >&5
1187 echo "${ECHO_T}no" >&6
1191 if test -z "$ac_cv_prog_CC"; then
1193 # Extract the first word of "gcc", so it can be a program name with args.
1194 set dummy gcc; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1198 echo $ECHO_N "(cached) $ECHO_C" >&6
1200 if test -n "$ac_ct_CC"; then
1201 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1203 ac_save_IFS=$IFS; IFS=$ac_path_separator
1205 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_ac_ct_CC="gcc"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1216 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1217 if test -n "$ac_ct_CC"; then
1218 echo "$as_me:1218: result: $ac_ct_CC" >&5
1219 echo "${ECHO_T}$ac_ct_CC" >&6
1221 echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1230 if test -z "$CC"; then
1231 if test -n "$ac_tool_prefix"; then
1232 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1233 set dummy ${ac_tool_prefix}cc; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_prog_CC+set}" = set; then
1237 echo $ECHO_N "(cached) $ECHO_C" >&6
1239 if test -n "$CC"; then
1240 ac_cv_prog_CC="$CC" # Let the user override the test.
1242 ac_save_IFS=$IFS; IFS=$ac_path_separator
1244 for ac_dir in $ac_dummy; do
1246 test -z "$ac_dir" && ac_dir=.
1247 $as_executable_p "$ac_dir/$ac_word" || continue
1248 ac_cv_prog_CC="${ac_tool_prefix}cc"
1249 echo "$as_me:1249: found $ac_dir/$ac_word" >&5
1256 if test -n "$CC"; then
1257 echo "$as_me:1257: result: $CC" >&5
1258 echo "${ECHO_T}$CC" >&6
1260 echo "$as_me:1260: result: no" >&5
1261 echo "${ECHO_T}no" >&6
1265 if test -z "$ac_cv_prog_CC"; then
1267 # Extract the first word of "cc", so it can be a program name with args.
1268 set dummy cc; ac_word=$2
1269 echo "$as_me:1269: checking for $ac_word" >&5
1270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1272 echo $ECHO_N "(cached) $ECHO_C" >&6
1274 if test -n "$ac_ct_CC"; then
1275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1277 ac_save_IFS=$IFS; IFS=$ac_path_separator
1279 for ac_dir in $ac_dummy; do
1281 test -z "$ac_dir" && ac_dir=.
1282 $as_executable_p "$ac_dir/$ac_word" || continue
1283 ac_cv_prog_ac_ct_CC="cc"
1284 echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1290 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1291 if test -n "$ac_ct_CC"; then
1292 echo "$as_me:1292: result: $ac_ct_CC" >&5
1293 echo "${ECHO_T}$ac_ct_CC" >&6
1295 echo "$as_me:1295: result: no" >&5
1296 echo "${ECHO_T}no" >&6
1305 if test -z "$CC"; then
1306 # Extract the first word of "cc", so it can be a program name with args.
1307 set dummy cc; ac_word=$2
1308 echo "$as_me:1308: checking for $ac_word" >&5
1309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1310 if test "${ac_cv_prog_CC+set}" = set; then
1311 echo $ECHO_N "(cached) $ECHO_C" >&6
1313 if test -n "$CC"; then
1314 ac_cv_prog_CC="$CC" # Let the user override the test.
1317 ac_save_IFS=$IFS; IFS=$ac_path_separator
1319 for ac_dir in $ac_dummy; do
1321 test -z "$ac_dir" && ac_dir=.
1322 $as_executable_p "$ac_dir/$ac_word" || continue
1323 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1324 ac_prog_rejected=yes
1328 echo "$as_me:1328: found $ac_dir/$ac_word" >&5
1332 if test $ac_prog_rejected = yes; then
1333 # We found a bogon in the path, so make sure we never use it.
1334 set dummy $ac_cv_prog_CC
1336 if test $# != 0; then
1337 # We chose a different compiler from the bogus one.
1338 # However, it has the same basename, so the bogon will be chosen
1339 # first if we set CC to just the basename; use the full file name.
1341 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1349 if test -n "$CC"; then
1350 echo "$as_me:1350: result: $CC" >&5
1351 echo "${ECHO_T}$CC" >&6
1353 echo "$as_me:1353: result: no" >&5
1354 echo "${ECHO_T}no" >&6
1358 if test -z "$CC"; then
1359 if test -n "$ac_tool_prefix"; then
1362 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1363 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1364 echo "$as_me:1364: checking for $ac_word" >&5
1365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1366 if test "${ac_cv_prog_CC+set}" = set; then
1367 echo $ECHO_N "(cached) $ECHO_C" >&6
1369 if test -n "$CC"; then
1370 ac_cv_prog_CC="$CC" # Let the user override the test.
1372 ac_save_IFS=$IFS; IFS=$ac_path_separator
1374 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 $as_executable_p "$ac_dir/$ac_word" || continue
1378 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1379 echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1386 if test -n "$CC"; then
1387 echo "$as_me:1387: result: $CC" >&5
1388 echo "${ECHO_T}$CC" >&6
1390 echo "$as_me:1390: result: no" >&5
1391 echo "${ECHO_T}no" >&6
1394 test -n "$CC" && break
1397 if test -z "$CC"; then
1401 # Extract the first word of "$ac_prog", so it can be a program name with args.
1402 set dummy $ac_prog; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1406 echo $ECHO_N "(cached) $ECHO_C" >&6
1408 if test -n "$ac_ct_CC"; then
1409 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1411 ac_save_IFS=$IFS; IFS=$ac_path_separator
1413 for ac_dir in $ac_dummy; do
1415 test -z "$ac_dir" && ac_dir=.
1416 $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_ac_ct_CC="$ac_prog"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1424 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1425 if test -n "$ac_ct_CC"; then
1426 echo "$as_me:1426: result: $ac_ct_CC" >&5
1427 echo "${ECHO_T}$ac_ct_CC" >&6
1429 echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1433 test -n "$ac_ct_CC" && break
1441 test -z "$CC" && { { echo "$as_me:1441: error: no acceptable cc found in \$PATH" >&5
1442 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1443 { (exit 1); exit 1; }; }
1445 # Provide some information about the compiler.
1446 echo "$as_me:1446:" \
1447 "checking for C compiler version" >&5
1448 ac_compiler=`set X $ac_compile; echo $2`
1449 { (eval echo "$as_me:1449: \"$ac_compiler --version </dev/null >&5\"") >&5
1450 (eval $ac_compiler --version </dev/null >&5) 2>&5
1452 echo "$as_me:1452: \$? = $ac_status" >&5
1453 (exit $ac_status); }
1454 { (eval echo "$as_me:1454: \"$ac_compiler -v </dev/null >&5\"") >&5
1455 (eval $ac_compiler -v </dev/null >&5) 2>&5
1457 echo "$as_me:1457: \$? = $ac_status" >&5
1458 (exit $ac_status); }
1459 { (eval echo "$as_me:1459: \"$ac_compiler -V </dev/null >&5\"") >&5
1460 (eval $ac_compiler -V </dev/null >&5) 2>&5
1462 echo "$as_me:1462: \$? = $ac_status" >&5
1463 (exit $ac_status); }
1465 cat >conftest.$ac_ext <<_ACEOF
1466 #line 1466 "configure"
1467 #include "confdefs.h"
1477 ac_clean_files_save=$ac_clean_files
1478 ac_clean_files="$ac_clean_files a.out a.exe"
1479 # Try to create an executable without -o first, disregard a.out.
1480 # It will help us diagnose broken compilers, and finding out an intuition
1482 echo "$as_me:1482: checking for C compiler default output" >&5
1483 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1484 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1485 if { (eval echo "$as_me:1485: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1488 echo "$as_me:1488: \$? = $ac_status" >&5
1489 (exit $ac_status); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1494 ls a.out conftest 2>/dev/null;
1495 ls a.* conftest.* 2>/dev/null`; do
1497 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1498 a.out ) # We found the default executable, but exeext='' is most
1501 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1502 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 echo "$as_me: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 { { echo "$as_me:1511: error: C compiler cannot create executables" >&5
1512 echo "$as_me: error: C compiler cannot create executables" >&2;}
1513 { (exit 77); exit 77; }; }
1516 ac_exeext=$ac_cv_exeext
1517 echo "$as_me:1517: result: $ac_file" >&5
1518 echo "${ECHO_T}$ac_file" >&6
1520 # Check the compiler produces executables we can run. If not, either
1521 # the compiler is broken, or we cross compile.
1522 echo "$as_me:1522: checking whether the C compiler works" >&5
1523 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1524 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1525 # If not cross compiling, check that we can run a simple program.
1526 if test "$cross_compiling" != yes; then
1527 if { ac_try='./$ac_file'
1528 { (eval echo "$as_me:1528: \"$ac_try\"") >&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; }; then
1535 if test "$cross_compiling" = maybe; then
1538 { { echo "$as_me:1538: error: cannot run C compiled programs.
1539 If you meant to cross compile, use \`--host'." >&5
1540 echo "$as_me: error: cannot run C compiled programs.
1541 If you meant to cross compile, use \`--host'." >&2;}
1542 { (exit 1); exit 1; }; }
1546 echo "$as_me:1546: result: yes" >&5
1547 echo "${ECHO_T}yes" >&6
1549 rm -f a.out a.exe conftest$ac_cv_exeext
1550 ac_clean_files=$ac_clean_files_save
1551 # Check the compiler produces executables we can run. If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether we are cross compiling" >&5
1554 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1555 echo "$as_me:1555: result: $cross_compiling" >&5
1556 echo "${ECHO_T}$cross_compiling" >&6
1558 echo "$as_me:1558: checking for executable suffix" >&5
1559 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1560 if { (eval echo "$as_me:1560: \"$ac_link\"") >&5
1561 (eval $ac_link) 2>&5
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit $ac_status); }; then
1565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1566 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1567 # work properly (i.e., refer to `conftest.exe'), while it won't with
1569 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1571 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1572 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 { { echo "$as_me:1579: error: cannot compute EXEEXT: cannot compile and link" >&5
1580 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1581 { (exit 1); exit 1; }; }
1584 rm -f conftest$ac_cv_exeext
1585 echo "$as_me:1585: result: $ac_cv_exeext" >&5
1586 echo "${ECHO_T}$ac_cv_exeext" >&6
1588 rm -f conftest.$ac_ext
1589 EXEEXT=$ac_cv_exeext
1591 echo "$as_me:1591: checking for object suffix" >&5
1592 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1593 if test "${ac_cv_objext+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
1596 cat >conftest.$ac_ext <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1608 rm -f conftest.o conftest.obj
1609 if { (eval echo "$as_me:1609: \"$ac_compile\"") >&5
1610 (eval $ac_compile) 2>&5
1612 echo "$as_me:1612: \$? = $ac_status" >&5
1613 (exit $ac_status); }; then
1614 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1616 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1617 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1622 echo "$as_me: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 { { echo "$as_me:1624: error: cannot compute OBJEXT: cannot compile" >&5
1625 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1626 { (exit 1); exit 1; }; }
1629 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1631 echo "$as_me:1631: result: $ac_cv_objext" >&5
1632 echo "${ECHO_T}$ac_cv_objext" >&6
1633 OBJEXT=$ac_cv_objext
1635 echo "$as_me:1635: checking whether we are using the GNU C compiler" >&5
1636 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1637 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657 (eval $ac_compile) 2>&5
1659 echo "$as_me:1659: \$? = $ac_status" >&5
1660 (exit $ac_status); } &&
1661 { ac_try='test -s conftest.$ac_objext'
1662 { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1665 echo "$as_me:1665: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1669 echo "$as_me: failed program was:" >&5
1670 cat conftest.$ac_ext >&5
1673 rm -f conftest.$ac_objext conftest.$ac_ext
1674 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1677 echo "$as_me:1677: result: $ac_cv_c_compiler_gnu" >&5
1678 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1679 GCC=`test $ac_compiler_gnu = yes && echo yes`
1680 ac_test_CFLAGS=${CFLAGS+set}
1681 ac_save_CFLAGS=$CFLAGS
1683 echo "$as_me:1683: checking whether $CC accepts -g" >&5
1684 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1685 if test "${ac_cv_prog_cc_g+set}" = set; then
1686 echo $ECHO_N "(cached) $ECHO_C" >&6
1688 cat >conftest.$ac_ext <<_ACEOF
1689 #line 1689 "configure"
1690 #include "confdefs.h"
1700 rm -f conftest.$ac_objext
1701 if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5
1702 (eval $ac_compile) 2>&5
1704 echo "$as_me:1704: \$? = $ac_status" >&5
1705 (exit $ac_status); } &&
1706 { ac_try='test -s conftest.$ac_objext'
1707 { (eval echo "$as_me:1707: \"$ac_try\"") >&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit $ac_status); }; }; then
1714 echo "$as_me: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1718 rm -f conftest.$ac_objext conftest.$ac_ext
1720 echo "$as_me:1720: result: $ac_cv_prog_cc_g" >&5
1721 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1722 if test "$ac_test_CFLAGS" = set; then
1723 CFLAGS=$ac_save_CFLAGS
1724 elif test $ac_cv_prog_cc_g = yes; then
1725 if test "$GCC" = yes; then
1731 if test "$GCC" = yes; then
1737 # Some people use a C++ compiler to compile C. Since we use `exit',
1738 # in C++ we need to declare it. In case someone uses the same compiler
1739 # for both compiling C and C++ we need to have the C++ compiler decide
1740 # the declaration of exit, since it's the most demanding environment.
1741 cat >conftest.$ac_ext <<_ACEOF
1746 rm -f conftest.$ac_objext
1747 if { (eval echo "$as_me:1747: \"$ac_compile\"") >&5
1748 (eval $ac_compile) 2>&5
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit $ac_status); } &&
1752 { ac_try='test -s conftest.$ac_objext'
1753 { (eval echo "$as_me:1753: \"$ac_try\"") >&5
1756 echo "$as_me:1756: \$? = $ac_status" >&5
1757 (exit $ac_status); }; }; then
1758 for ac_declaration in \
1760 '#include <stdlib.h>' \
1761 'extern "C" void std::exit (int) throw (); using std::exit;' \
1762 'extern "C" void std::exit (int); using std::exit;' \
1763 'extern "C" void exit (int) throw ();' \
1764 'extern "C" void exit (int);' \
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1780 rm -f conftest.$ac_objext
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782 (eval $ac_compile) 2>&5
1784 echo "$as_me:1784: \$? = $ac_status" >&5
1785 (exit $ac_status); } &&
1786 { ac_try='test -s conftest.$ac_objext'
1787 { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1790 echo "$as_me:1790: \$? = $ac_status" >&5
1791 (exit $ac_status); }; }; then
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1798 rm -f conftest.$ac_objext conftest.$ac_ext
1799 cat >conftest.$ac_ext <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813 (eval $ac_compile) 2>&5
1815 echo "$as_me:1815: \$? = $ac_status" >&5
1816 (exit $ac_status); } &&
1817 { ac_try='test -s conftest.$ac_objext'
1818 { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1821 echo "$as_me:1821: \$? = $ac_status" >&5
1822 (exit $ac_status); }; }; then
1825 echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1828 rm -f conftest.$ac_objext conftest.$ac_ext
1831 if test -n "$ac_declaration"; then
1832 echo '#ifdef __cplusplus' >>confdefs.h
1833 echo $ac_declaration >>confdefs.h
1834 echo '#endif' >>confdefs.h
1838 echo "$as_me: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1841 rm -f conftest.$ac_objext conftest.$ac_ext
1843 ac_cpp='$CPP $CPPFLAGS'
1844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847 ac_main_return=return
1850 if test "$GCC" = yes ; then
1851 echo "$as_me:1851: checking version of $CC" >&5
1852 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1853 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1854 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1855 echo "$as_me:1855: result: $GCC_VERSION" >&5
1856 echo "${ECHO_T}$GCC_VERSION" >&6
1859 echo "$as_me:1859: checking for $CC option to accept ANSI C" >&5
1860 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1861 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1862 echo $ECHO_N "(cached) $ECHO_C" >&6
1864 ac_cv_prog_cc_stdc=no
1866 cat >conftest.$ac_ext <<_ACEOF
1867 #line 1867 "configure"
1868 #include "confdefs.h"
1871 #include <sys/types.h>
1872 #include <sys/stat.h>
1873 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1874 struct buf { int x; };
1875 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1876 static char *e (p, i)
1882 static char *f (char * (*g) (char **, int), char **p, ...)
1887 s = g (p, va_arg (v,int));
1891 int test (int i, double x);
1892 struct s1 {int (*f) (int a);};
1893 struct s2 {int (*f) (double a);};
1894 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1900 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1905 # Don't try gcc -ansi; that turns off useful extensions and
1906 # breaks some systems' header files.
1907 # AIX -qlanglvl=ansi
1908 # Ultrix and OSF/1 -std1
1909 # HP-UX 10.20 and later -Ae
1910 # HP-UX older versions -Aa -D_HPUX_SOURCE
1911 # SVR4 -Xc -D__EXTENSIONS__
1912 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1914 CC="$ac_save_CC $ac_arg"
1915 rm -f conftest.$ac_objext
1916 if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
1917 (eval $ac_compile) 2>&5
1919 echo "$as_me:1919: \$? = $ac_status" >&5
1920 (exit $ac_status); } &&
1921 { ac_try='test -s conftest.$ac_objext'
1922 { (eval echo "$as_me:1922: \"$ac_try\"") >&5
1925 echo "$as_me:1925: \$? = $ac_status" >&5
1926 (exit $ac_status); }; }; then
1927 ac_cv_prog_cc_stdc=$ac_arg
1930 echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1933 rm -f conftest.$ac_objext
1935 rm -f conftest.$ac_ext conftest.$ac_objext
1940 case "x$ac_cv_prog_cc_stdc" in
1942 echo "$as_me:1942: result: none needed" >&5
1943 echo "${ECHO_T}none needed" >&6 ;;
1945 echo "$as_me:1945: result: $ac_cv_prog_cc_stdc" >&5
1946 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1947 CC="$CC $ac_cv_prog_cc_stdc" ;;
1950 # This should have been defined by AC_PROG_CC
1953 echo "$as_me:1953: checking \$CFLAGS variable" >&5
1954 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
1957 echo "$as_me:1957: result: broken" >&5
1958 echo "${ECHO_T}broken" >&6
1959 { echo "$as_me:1959: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
1960 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1963 for cf_arg in $cf_flags
1969 cf_new_extra_cppflags=
1971 for cf_add_cflags in $cf_arg
1973 case $cf_fix_cppflags in
1975 case $cf_add_cflags in
1976 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1977 case $cf_add_cflags in
1979 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1981 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1982 && test -z "${cf_tst_cflags}" \
1983 && cf_fix_cppflags=yes
1985 if test $cf_fix_cppflags = yes ; then
1987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1991 elif test "${cf_tst_cflags}" = "\"'" ; then
1993 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1994 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2004 case $cf_add_cflags in
2006 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2008 CPPFLAGS=`echo "$CPPFLAGS" | \
2009 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2010 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2015 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2016 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2023 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2024 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2034 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2037 && test -z "${cf_tst_cflags}" \
2038 && cf_fix_cppflags=no
2043 if test -n "$cf_new_cflags" ; then
2045 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2046 CFLAGS="${CFLAGS}$cf_new_cflags"
2050 if test -n "$cf_new_cppflags" ; then
2052 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2053 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2057 if test -n "$cf_new_extra_cppflags" ; then
2059 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2060 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2067 echo "$as_me:2067: result: ok" >&5
2068 echo "${ECHO_T}ok" >&6
2072 echo "$as_me:2072: checking \$CC variable" >&5
2073 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2076 echo "$as_me:2076: result: broken" >&5
2077 echo "${ECHO_T}broken" >&6
2078 { echo "$as_me:2078: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2079 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2081 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2082 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2084 for cf_arg in $cf_flags
2092 cf_new_extra_cppflags=
2094 for cf_add_cflags in $cf_arg
2096 case $cf_fix_cppflags in
2098 case $cf_add_cflags in
2099 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2100 case $cf_add_cflags in
2102 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2105 && test -z "${cf_tst_cflags}" \
2106 && cf_fix_cppflags=yes
2108 if test $cf_fix_cppflags = yes ; then
2110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2114 elif test "${cf_tst_cflags}" = "\"'" ; then
2116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2127 case $cf_add_cflags in
2129 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2131 CPPFLAGS=`echo "$CPPFLAGS" | \
2132 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2133 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2138 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2139 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2146 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2147 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=no
2166 if test -n "$cf_new_cflags" ; then
2168 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2169 CFLAGS="${CFLAGS}$cf_new_cflags"
2173 if test -n "$cf_new_cppflags" ; then
2175 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2176 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2180 if test -n "$cf_new_extra_cppflags" ; then
2182 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2183 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2193 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2195 echo "${as_me:-configure}:2195: testing resulting CC: '$CC' ..." 1>&5
2197 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2199 echo "${as_me:-configure}:2199: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2201 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2203 echo "${as_me:-configure}:2203: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2207 echo "$as_me:2207: result: ok" >&5
2208 echo "${ECHO_T}ok" >&6
2212 echo "$as_me:2212: checking for inline" >&5
2213 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2214 if test "${ac_cv_c_inline+set}" = set; then
2215 echo $ECHO_N "(cached) $ECHO_C" >&6
2218 for ac_kw in inline __inline__ __inline; do
2219 cat >conftest.$ac_ext <<_ACEOF
2220 #line 2220 "configure"
2221 #include "confdefs.h"
2223 static $ac_kw int static_foo () {return 0; }
2224 $ac_kw int foo () {return 0; }
2228 rm -f conftest.$ac_objext
2229 if { (eval echo "$as_me:2229: \"$ac_compile\"") >&5
2230 (eval $ac_compile) 2>&5
2232 echo "$as_me:2232: \$? = $ac_status" >&5
2233 (exit $ac_status); } &&
2234 { ac_try='test -s conftest.$ac_objext'
2235 { (eval echo "$as_me:2235: \"$ac_try\"") >&5
2238 echo "$as_me:2238: \$? = $ac_status" >&5
2239 (exit $ac_status); }; }; then
2240 ac_cv_c_inline=$ac_kw; break
2242 echo "$as_me: failed program was:" >&5
2243 cat conftest.$ac_ext >&5
2245 rm -f conftest.$ac_objext conftest.$ac_ext
2249 echo "$as_me:2249: result: $ac_cv_c_inline" >&5
2250 echo "${ECHO_T}$ac_cv_c_inline" >&6
2251 case $ac_cv_c_inline in
2254 cat >>confdefs.h <<\EOF
2258 *) cat >>confdefs.h <<EOF
2259 #define inline $ac_cv_c_inline
2265 ac_cpp='$CPP $CPPFLAGS'
2266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2269 ac_main_return=return
2270 echo "$as_me:2270: checking how to run the C preprocessor" >&5
2271 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2272 # On Suns, sometimes $CPP names a directory.
2273 if test -n "$CPP" && test -d "$CPP"; then
2276 if test -z "$CPP"; then
2277 if test "${ac_cv_prog_CPP+set}" = set; then
2278 echo $ECHO_N "(cached) $ECHO_C" >&6
2280 # Double quotes because CPP needs to be expanded
2281 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2284 for ac_c_preproc_warn_flag in '' yes
2286 # Use a header file that comes with gcc, so configuring glibc
2287 # with a fresh cross-compiler works.
2288 # On the NeXT, cc -E runs the code through the compiler's parser,
2289 # not just through cpp. "Syntax error" is here to catch this case.
2290 cat >conftest.$ac_ext <<_ACEOF
2291 #line 2291 "configure"
2292 #include "confdefs.h"
2296 if { (eval echo "$as_me:2296: \"$ac_cpp conftest.$ac_ext\"") >&5
2297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2299 egrep -v '^ *\+' conftest.er1 >conftest.err
2301 cat conftest.err >&5
2302 echo "$as_me:2302: \$? = $ac_status" >&5
2303 (exit $ac_status); } >/dev/null; then
2304 if test -s conftest.err; then
2305 ac_cpp_err=$ac_c_preproc_warn_flag
2312 if test -z "$ac_cpp_err"; then
2315 echo "$as_me: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 # Broken: fails on valid input.
2320 rm -f conftest.err conftest.$ac_ext
2322 # OK, works on sane cases. Now check whether non-existent headers
2323 # can be detected and how.
2324 cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <ac_nonexistent.h>
2329 if { (eval echo "$as_me:2329: \"$ac_cpp conftest.$ac_ext\"") >&5
2330 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2332 egrep -v '^ *\+' conftest.er1 >conftest.err
2334 cat conftest.err >&5
2335 echo "$as_me:2335: \$? = $ac_status" >&5
2336 (exit $ac_status); } >/dev/null; then
2337 if test -s conftest.err; then
2338 ac_cpp_err=$ac_c_preproc_warn_flag
2345 if test -z "$ac_cpp_err"; then
2346 # Broken: success on invalid input.
2349 echo "$as_me: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 # Passes both tests.
2355 rm -f conftest.err conftest.$ac_ext
2358 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2359 rm -f conftest.err conftest.$ac_ext
2360 if $ac_preproc_ok; then
2372 echo "$as_me:2372: result: $CPP" >&5
2373 echo "${ECHO_T}$CPP" >&6
2375 for ac_c_preproc_warn_flag in '' yes
2377 # Use a header file that comes with gcc, so configuring glibc
2378 # with a fresh cross-compiler works.
2379 # On the NeXT, cc -E runs the code through the compiler's parser,
2380 # not just through cpp. "Syntax error" is here to catch this case.
2381 cat >conftest.$ac_ext <<_ACEOF
2382 #line 2382 "configure"
2383 #include "confdefs.h"
2387 if { (eval echo "$as_me:2387: \"$ac_cpp conftest.$ac_ext\"") >&5
2388 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2390 egrep -v '^ *\+' conftest.er1 >conftest.err
2392 cat conftest.err >&5
2393 echo "$as_me:2393: \$? = $ac_status" >&5
2394 (exit $ac_status); } >/dev/null; then
2395 if test -s conftest.err; then
2396 ac_cpp_err=$ac_c_preproc_warn_flag
2403 if test -z "$ac_cpp_err"; then
2406 echo "$as_me: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 # Broken: fails on valid input.
2411 rm -f conftest.err conftest.$ac_ext
2413 # OK, works on sane cases. Now check whether non-existent headers
2414 # can be detected and how.
2415 cat >conftest.$ac_ext <<_ACEOF
2416 #line 2416 "configure"
2417 #include "confdefs.h"
2418 #include <ac_nonexistent.h>
2420 if { (eval echo "$as_me:2420: \"$ac_cpp conftest.$ac_ext\"") >&5
2421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2423 egrep -v '^ *\+' conftest.er1 >conftest.err
2425 cat conftest.err >&5
2426 echo "$as_me:2426: \$? = $ac_status" >&5
2427 (exit $ac_status); } >/dev/null; then
2428 if test -s conftest.err; then
2429 ac_cpp_err=$ac_c_preproc_warn_flag
2436 if test -z "$ac_cpp_err"; then
2437 # Broken: success on invalid input.
2440 echo "$as_me: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 # Passes both tests.
2446 rm -f conftest.err conftest.$ac_ext
2449 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2450 rm -f conftest.err conftest.$ac_ext
2451 if $ac_preproc_ok; then
2454 { { echo "$as_me:2454: error: C preprocessor \"$CPP\" fails sanity check" >&5
2455 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2456 { (exit 1); exit 1; }; }
2460 ac_cpp='$CPP $CPPFLAGS'
2461 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2462 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2464 ac_main_return=return
2466 for ac_prog in mawk gawk nawk awk
2468 # Extract the first word of "$ac_prog", so it can be a program name with args.
2469 set dummy $ac_prog; ac_word=$2
2470 echo "$as_me:2470: checking for $ac_word" >&5
2471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2472 if test "${ac_cv_prog_AWK+set}" = set; then
2473 echo $ECHO_N "(cached) $ECHO_C" >&6
2475 if test -n "$AWK"; then
2476 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2478 ac_save_IFS=$IFS; IFS=$ac_path_separator
2480 for ac_dir in $ac_dummy; do
2482 test -z "$ac_dir" && ac_dir=.
2483 $as_executable_p "$ac_dir/$ac_word" || continue
2484 ac_cv_prog_AWK="$ac_prog"
2485 echo "$as_me:2485: found $ac_dir/$ac_word" >&5
2492 if test -n "$AWK"; then
2493 echo "$as_me:2493: result: $AWK" >&5
2494 echo "${ECHO_T}$AWK" >&6
2496 echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2500 test -n "$AWK" && break
2503 # Find a good install program. We prefer a C program (faster),
2504 # so one script is as good as another. But avoid the broken or
2505 # incompatible versions:
2506 # SysV /etc/install, /usr/sbin/install
2507 # SunOS /usr/etc/install
2508 # IRIX /sbin/install
2510 # AmigaOS /C/install, which installs bootblocks on floppy discs
2511 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2512 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2513 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2514 # ./install, which can be erroneously created by make from ./install.sh.
2515 echo "$as_me:2515: checking for a BSD compatible install" >&5
2516 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2517 if test -z "$INSTALL"; then
2518 if test "${ac_cv_path_install+set}" = set; then
2519 echo $ECHO_N "(cached) $ECHO_C" >&6
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2522 for ac_dir in $PATH; do
2524 # Account for people who put trailing slashes in PATH elements.
2526 / | ./ | .// | /cC/* \
2527 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2530 # OSF1 and SCO ODT 3.0 have their own names for install.
2531 # Don't use installbsd from OSF since it installs stuff as root
2533 for ac_prog in ginstall scoinst install; do
2534 if $as_executable_p "$ac_dir/$ac_prog"; then
2535 if test $ac_prog = install &&
2536 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2537 # AIX install. It has an incompatible calling convention.
2539 elif test $ac_prog = install &&
2540 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2541 # program-specific install script used by HP pwplus--don't use.
2544 ac_cv_path_install="$ac_dir/$ac_prog -c"
2554 if test "${ac_cv_path_install+set}" = set; then
2555 INSTALL=$ac_cv_path_install
2557 # As a last resort, use the slow shell script. We don't cache a
2558 # path for INSTALL within a source directory, because that will
2559 # break other packages using the cache if that directory is
2560 # removed, or if the path is relative.
2561 INSTALL=$ac_install_sh
2564 echo "$as_me:2564: result: $INSTALL" >&5
2565 echo "${ECHO_T}$INSTALL" >&6
2567 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2568 # It thinks the first close brace ends the variable substitution.
2569 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2571 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2573 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2579 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2580 test -z "$cf_dir" && cf_dir=.
2581 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2585 echo "$as_me:2585: checking if you want to install stripped executables" >&5
2586 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2588 # Check whether --enable-stripping or --disable-stripping was given.
2589 if test "${enable_stripping+set}" = set; then
2590 enableval="$enable_stripping"
2591 test "$enableval" != no && enableval=yes
2592 if test "$enableval" != "yes" ; then
2602 echo "$as_me:2602: result: $with_stripping" >&5
2603 echo "${ECHO_T}$with_stripping" >&6
2605 if test "$with_stripping" = yes
2612 : ${INSTALL:=install}
2613 echo "$as_me:2613: checking if install accepts -p option" >&5
2614 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2615 if test "${cf_cv_install_p+set}" = set; then
2616 echo $ECHO_N "(cached) $ECHO_C" >&6
2623 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2625 if test -f conftest.out/conftest.in
2627 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2628 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2629 if test -s conftest.err
2644 echo "$as_me:2644: result: $cf_cv_install_p" >&5
2645 echo "${ECHO_T}$cf_cv_install_p" >&6
2647 echo "$as_me:2647: checking if install needs to be told about ownership" >&5
2648 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2649 case `$ac_config_guess` in
2658 echo "$as_me:2658: result: $with_install_o" >&5
2659 echo "${ECHO_T}$with_install_o" >&6
2660 if test "x$with_install_o" = xyes
2662 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2667 for ac_prog in lint cppcheck splint
2669 # Extract the first word of "$ac_prog", so it can be a program name with args.
2670 set dummy $ac_prog; ac_word=$2
2671 echo "$as_me:2671: checking for $ac_word" >&5
2672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2673 if test "${ac_cv_prog_LINT+set}" = set; then
2674 echo $ECHO_N "(cached) $ECHO_C" >&6
2676 if test -n "$LINT"; then
2677 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2679 ac_save_IFS=$IFS; IFS=$ac_path_separator
2681 for ac_dir in $ac_dummy; do
2683 test -z "$ac_dir" && ac_dir=.
2684 $as_executable_p "$ac_dir/$ac_word" || continue
2685 ac_cv_prog_LINT="$ac_prog"
2686 echo "$as_me:2686: found $ac_dir/$ac_word" >&5
2692 LINT=$ac_cv_prog_LINT
2693 if test -n "$LINT"; then
2694 echo "$as_me:2694: result: $LINT" >&5
2695 echo "${ECHO_T}$LINT" >&6
2697 echo "$as_me:2697: result: no" >&5
2698 echo "${ECHO_T}no" >&6
2701 test -n "$LINT" && break
2704 echo "$as_me:2704: checking if filesystem supports mixed-case filenames" >&5
2705 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2706 if test "${cf_cv_mixedcase+set}" = set; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
2710 if test "$cross_compiling" = yes ; then
2711 case $target_alias in
2712 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2720 rm -f conftest CONFTEST
2722 if test -f CONFTEST ; then
2727 rm -f conftest CONFTEST
2731 echo "$as_me:2731: result: $cf_cv_mixedcase" >&5
2732 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2733 test "$cf_cv_mixedcase" = yes &&
2734 cat >>confdefs.h <<\EOF
2735 #define MIXEDCASE_FILENAMES 1
2738 for ac_prog in exctags ctags
2740 # Extract the first word of "$ac_prog", so it can be a program name with args.
2741 set dummy $ac_prog; ac_word=$2
2742 echo "$as_me:2742: checking for $ac_word" >&5
2743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2744 if test "${ac_cv_prog_CTAGS+set}" = set; then
2745 echo $ECHO_N "(cached) $ECHO_C" >&6
2747 if test -n "$CTAGS"; then
2748 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2750 ac_save_IFS=$IFS; IFS=$ac_path_separator
2752 for ac_dir in $ac_dummy; do
2754 test -z "$ac_dir" && ac_dir=.
2755 $as_executable_p "$ac_dir/$ac_word" || continue
2756 ac_cv_prog_CTAGS="$ac_prog"
2757 echo "$as_me:2757: found $ac_dir/$ac_word" >&5
2763 CTAGS=$ac_cv_prog_CTAGS
2764 if test -n "$CTAGS"; then
2765 echo "$as_me:2765: result: $CTAGS" >&5
2766 echo "${ECHO_T}$CTAGS" >&6
2768 echo "$as_me:2768: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2772 test -n "$CTAGS" && break
2775 for ac_prog in exetags etags
2777 # Extract the first word of "$ac_prog", so it can be a program name with args.
2778 set dummy $ac_prog; ac_word=$2
2779 echo "$as_me:2779: checking for $ac_word" >&5
2780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2781 if test "${ac_cv_prog_ETAGS+set}" = set; then
2782 echo $ECHO_N "(cached) $ECHO_C" >&6
2784 if test -n "$ETAGS"; then
2785 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2787 ac_save_IFS=$IFS; IFS=$ac_path_separator
2789 for ac_dir in $ac_dummy; do
2791 test -z "$ac_dir" && ac_dir=.
2792 $as_executable_p "$ac_dir/$ac_word" || continue
2793 ac_cv_prog_ETAGS="$ac_prog"
2794 echo "$as_me:2794: found $ac_dir/$ac_word" >&5
2800 ETAGS=$ac_cv_prog_ETAGS
2801 if test -n "$ETAGS"; then
2802 echo "$as_me:2802: result: $ETAGS" >&5
2803 echo "${ECHO_T}$ETAGS" >&6
2805 echo "$as_me:2805: result: no" >&5
2806 echo "${ECHO_T}no" >&6
2809 test -n "$ETAGS" && break
2812 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2813 set dummy ${CTAGS:-ctags}; ac_word=$2
2814 echo "$as_me:2814: checking for $ac_word" >&5
2815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2816 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2817 echo $ECHO_N "(cached) $ECHO_C" >&6
2819 if test -n "$MAKE_LOWER_TAGS"; then
2820 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2822 ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 for ac_dir in $ac_dummy; do
2826 test -z "$ac_dir" && ac_dir=.
2827 $as_executable_p "$ac_dir/$ac_word" || continue
2828 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2829 echo "$as_me:2829: found $ac_dir/$ac_word" >&5
2833 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2836 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2837 if test -n "$MAKE_LOWER_TAGS"; then
2838 echo "$as_me:2838: result: $MAKE_LOWER_TAGS" >&5
2839 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2841 echo "$as_me:2841: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2845 if test "$cf_cv_mixedcase" = yes ; then
2846 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2847 set dummy ${ETAGS:-etags}; ac_word=$2
2848 echo "$as_me:2848: checking for $ac_word" >&5
2849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2853 if test -n "$MAKE_UPPER_TAGS"; then
2854 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2856 ac_save_IFS=$IFS; IFS=$ac_path_separator
2858 for ac_dir in $ac_dummy; do
2860 test -z "$ac_dir" && ac_dir=.
2861 $as_executable_p "$ac_dir/$ac_word" || continue
2862 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2863 echo "$as_me:2863: found $ac_dir/$ac_word" >&5
2867 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2870 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2871 if test -n "$MAKE_UPPER_TAGS"; then
2872 echo "$as_me:2872: result: $MAKE_UPPER_TAGS" >&5
2873 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2875 echo "$as_me:2875: result: no" >&5
2876 echo "${ECHO_T}no" >&6
2883 if test "$MAKE_UPPER_TAGS" = yes ; then
2889 if test "$MAKE_LOWER_TAGS" = yes ; then
2895 echo "$as_me:2895: checking if -lm needed for math functions" >&5
2896 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2897 if test "${cf_cv_need_libm+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2901 cat >conftest.$ac_ext <<_ACEOF
2902 #line 2902 "configure"
2903 #include "confdefs.h"
2912 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2917 rm -f conftest.$ac_objext conftest$ac_exeext
2918 if { (eval echo "$as_me:2918: \"$ac_link\"") >&5
2919 (eval $ac_link) 2>&5
2921 echo "$as_me:2921: \$? = $ac_status" >&5
2922 (exit $ac_status); } &&
2923 { ac_try='test -s conftest$ac_exeext'
2924 { (eval echo "$as_me:2924: \"$ac_try\"") >&5
2927 echo "$as_me:2927: \$? = $ac_status" >&5
2928 (exit $ac_status); }; }; then
2931 echo "$as_me: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2937 echo "$as_me:2937: result: $cf_cv_need_libm" >&5
2938 echo "${ECHO_T}$cf_cv_need_libm" >&6
2939 if test "$cf_cv_need_libm" = yes
2947 CC_SHARED_OPTS=unknown
2948 CPPFLAGS="$CPPFLAGS"
2950 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2951 DFT_UPR_MODEL="NORMAL"
2964 PACKAGE="ncurses-examples"
2970 TINFO_LIBS='$(LIBS_CURSES)'
2971 cf_cv_abi_version=""
2972 cf_cv_rel_version=""
2978 if test "$GCC" = yes
2980 cat > conftest.i <<EOF
2982 #define GCC_PRINTF 0
2987 #ifndef GCC_NORETURN
2988 #define GCC_NORETURN /* nothing */
2991 #define GCC_UNUSED /* nothing */
2994 if test "$GCC" = yes
2996 { echo "$as_me:2996: checking for $CC __attribute__ directives..." >&5
2997 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2998 cat > conftest.$ac_ext <<EOF
2999 #line 2999 "${as_me:-configure}"
3000 #include "confdefs.h"
3001 #include "conftest.h"
3002 #include "conftest.i"
3004 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3006 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3009 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3011 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3013 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3014 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3015 extern void foo(void) GCC_NORETURN;
3016 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3018 cf_printf_attribute=no
3019 cf_scanf_attribute=no
3020 for cf_attribute in scanf printf unused noreturn
3023 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3025 cf_directive="__attribute__(($cf_attribute))"
3026 echo "checking for $CC $cf_directive" 1>&5
3028 case $cf_attribute in
3030 cf_printf_attribute=yes
3031 cat >conftest.h <<EOF
3032 #define GCC_$cf_ATTRIBUTE 1
3036 cf_scanf_attribute=yes
3037 cat >conftest.h <<EOF
3038 #define GCC_$cf_ATTRIBUTE 1
3042 cat >conftest.h <<EOF
3043 #define GCC_$cf_ATTRIBUTE $cf_directive
3048 if { (eval echo "$as_me:3048: \"$ac_compile\"") >&5
3049 (eval $ac_compile) 2>&5
3051 echo "$as_me:3051: \$? = $ac_status" >&5
3052 (exit $ac_status); }; then
3053 test -n "$verbose" && echo "$as_me:3053: result: ... $cf_attribute" >&5
3054 echo "${ECHO_T}... $cf_attribute" >&6
3055 cat conftest.h >>confdefs.h
3056 case $cf_attribute in
3059 cat >>confdefs.h <<EOF
3060 #define GCC_NORETURN $cf_directive
3065 cf_value='/* nothing */'
3066 if test "$cf_printf_attribute" != no ; then
3067 cf_value='__attribute__((format(printf,fmt,var)))'
3069 cat >>confdefs.h <<\EOF
3070 #define GCC_PRINTF 1
3075 cat >>confdefs.h <<EOF
3076 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3081 cf_value='/* nothing */'
3082 if test "$cf_scanf_attribute" != no ; then
3083 cf_value='__attribute__((format(scanf,fmt,var)))'
3085 cat >>confdefs.h <<\EOF
3091 cat >>confdefs.h <<EOF
3092 #define GCC_SCANFLIKE(fmt,var) $cf_value
3098 cat >>confdefs.h <<EOF
3099 #define GCC_UNUSED $cf_directive
3107 fgrep define conftest.i >>confdefs.h
3112 echo "$as_me:3112: checking if you want to work around bogus compiler/loader warnings" >&5
3113 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3115 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3116 if test "${enable_string_hacks+set}" = set; then
3117 enableval="$enable_string_hacks"
3118 with_string_hacks=$enableval
3120 with_string_hacks=no
3122 echo "$as_me:3122: result: $with_string_hacks" >&5
3123 echo "${ECHO_T}$with_string_hacks" >&6
3125 if test "x$with_string_hacks" = "xyes"; then
3127 cat >>confdefs.h <<\EOF
3128 #define USE_STRING_HACKS 1
3131 { echo "$as_me:3131: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3132 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3133 echo "$as_me:3133: checking for strlcat" >&5
3134 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3135 if test "${ac_cv_func_strlcat+set}" = set; then
3136 echo $ECHO_N "(cached) $ECHO_C" >&6
3138 cat >conftest.$ac_ext <<_ACEOF
3139 #line 3139 "configure"
3140 #include "confdefs.h"
3141 #define strlcat autoconf_temporary
3142 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3149 /* We use char because int might match the return type of a gcc2
3150 builtin and then its argument prototype would still apply. */
3151 char strlcat (void);
3157 /* The GNU C library defines stubs for functions which it implements
3158 to always fail with ENOSYS. Some functions are actually named
3159 something starting with __ and the normal name is an alias. */
3160 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3161 #error found stub for strlcat
3169 rm -f conftest.$ac_objext conftest$ac_exeext
3170 if { (eval echo "$as_me:3170: \"$ac_link\"") >&5
3171 (eval $ac_link) 2>&5
3173 echo "$as_me:3173: \$? = $ac_status" >&5
3174 (exit $ac_status); } &&
3175 { ac_try='test -s conftest$ac_exeext'
3176 { (eval echo "$as_me:3176: \"$ac_try\"") >&5
3179 echo "$as_me:3179: \$? = $ac_status" >&5
3180 (exit $ac_status); }; }; then
3181 ac_cv_func_strlcat=yes
3183 echo "$as_me: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3185 ac_cv_func_strlcat=no
3187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3189 echo "$as_me:3189: result: $ac_cv_func_strlcat" >&5
3190 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3191 if test $ac_cv_func_strlcat = yes; then
3193 cat >>confdefs.h <<\EOF
3194 #define HAVE_STRLCAT 1
3199 echo "$as_me:3199: checking for strlcat in -lbsd" >&5
3200 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3201 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3202 echo $ECHO_N "(cached) $ECHO_C" >&6
3204 ac_check_lib_save_LIBS=$LIBS
3206 cat >conftest.$ac_ext <<_ACEOF
3207 #line 3207 "configure"
3208 #include "confdefs.h"
3210 /* Override any gcc2 internal prototype to avoid an error. */
3214 /* We use char because int might match the return type of a gcc2
3215 builtin and then its argument prototype would still apply. */
3225 rm -f conftest.$ac_objext conftest$ac_exeext
3226 if { (eval echo "$as_me:3226: \"$ac_link\"") >&5
3227 (eval $ac_link) 2>&5
3229 echo "$as_me:3229: \$? = $ac_status" >&5
3230 (exit $ac_status); } &&
3231 { ac_try='test -s conftest$ac_exeext'
3232 { (eval echo "$as_me:3232: \"$ac_try\"") >&5
3235 echo "$as_me:3235: \$? = $ac_status" >&5
3236 (exit $ac_status); }; }; then
3237 ac_cv_lib_bsd_strlcat=yes
3239 echo "$as_me: failed program was:" >&5
3240 cat conftest.$ac_ext >&5
3241 ac_cv_lib_bsd_strlcat=no
3243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3244 LIBS=$ac_check_lib_save_LIBS
3246 echo "$as_me:3246: result: $ac_cv_lib_bsd_strlcat" >&5
3247 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3248 if test $ac_cv_lib_bsd_strlcat = yes; then
3251 # Filter out duplicates - this happens with badly-designed ".pc" files...
3252 for cf_add_1lib in $LIBS
3254 for cf_add_2lib in $cf_add_libs
3256 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3262 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3266 for ac_header in bsd/string.h
3268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3269 echo "$as_me:3269: checking for $ac_header" >&5
3270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3272 echo $ECHO_N "(cached) $ECHO_C" >&6
3274 cat >conftest.$ac_ext <<_ACEOF
3275 #line 3275 "configure"
3276 #include "confdefs.h"
3277 #include <$ac_header>
3279 if { (eval echo "$as_me:3279: \"$ac_cpp conftest.$ac_ext\"") >&5
3280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3282 egrep -v '^ *\+' conftest.er1 >conftest.err
3284 cat conftest.err >&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit $ac_status); } >/dev/null; then
3287 if test -s conftest.err; then
3288 ac_cpp_err=$ac_c_preproc_warn_flag
3295 if test -z "$ac_cpp_err"; then
3296 eval "$as_ac_Header=yes"
3298 echo "$as_me: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 eval "$as_ac_Header=no"
3302 rm -f conftest.err conftest.$ac_ext
3304 echo "$as_me:3304: result: `eval echo '${'$as_ac_Header'}'`" >&5
3305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3307 cat >>confdefs.h <<EOF
3308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3314 cat >>confdefs.h <<\EOF
3315 #define HAVE_STRLCAT 1
3322 for ac_func in strlcpy snprintf
3324 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3325 echo "$as_me:3325: checking for $ac_func" >&5
3326 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3327 if eval "test \"\${$as_ac_var+set}\" = set"; then
3328 echo $ECHO_N "(cached) $ECHO_C" >&6
3330 cat >conftest.$ac_ext <<_ACEOF
3331 #line 3331 "configure"
3332 #include "confdefs.h"
3333 #define $ac_func autoconf_temporary
3334 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3341 /* We use char because int might match the return type of a gcc2
3342 builtin and then its argument prototype would still apply. */
3343 char $ac_func (void);
3349 /* The GNU C library defines stubs for functions which it implements
3350 to always fail with ENOSYS. Some functions are actually named
3351 something starting with __ and the normal name is an alias. */
3352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3353 #error found stub for $ac_func
3361 rm -f conftest.$ac_objext conftest$ac_exeext
3362 if { (eval echo "$as_me:3362: \"$ac_link\"") >&5
3363 (eval $ac_link) 2>&5
3365 echo "$as_me:3365: \$? = $ac_status" >&5
3366 (exit $ac_status); } &&
3367 { ac_try='test -s conftest$ac_exeext'
3368 { (eval echo "$as_me:3368: \"$ac_try\"") >&5
3371 echo "$as_me:3371: \$? = $ac_status" >&5
3372 (exit $ac_status); }; }; then
3373 eval "$as_ac_var=yes"
3375 echo "$as_me: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 eval "$as_ac_var=no"
3379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3381 echo "$as_me:3381: result: `eval echo '${'$as_ac_var'}'`" >&5
3382 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3383 if test `eval echo '${'$as_ac_var'}'` = yes; then
3384 cat >>confdefs.h <<EOF
3385 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
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.
11155 /usr/local/X11/include
11156 /usr/local/X11R6/include
11157 /usr/local/X11R5/include
11158 /usr/local/X11R4/include
11160 /usr/local/include/X11
11161 /usr/local/include/X11R6
11162 /usr/local/include/X11R5
11163 /usr/local/include/X11R4
11167 /usr/XFree86/include/X11
11171 /usr/unsupported/include
11172 /usr/athena/include
11173 /usr/local/x11r5/include
11174 /usr/lpp/Xamples/include
11176 /usr/openwin/include
11177 /usr/openwin/share/include'
11179 if test "$ac_x_includes" = no; then
11180 # Guess where to find include files, by looking for Intrinsic.h.
11181 # First, try using that file with no special directory specified.
11182 cat >conftest.$ac_ext <<_ACEOF
11183 #line 11183 "configure"
11184 #include "confdefs.h"
11185 #include <X11/Intrinsic.h>
11187 if { (eval echo "$as_me:11187: \"$ac_cpp conftest.$ac_ext\"") >&5
11188 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11190 egrep -v '^ *\+' conftest.er1 >conftest.err
11192 cat conftest.err >&5
11193 echo "$as_me:11193: \$? = $ac_status" >&5
11194 (exit $ac_status); } >/dev/null; then
11195 if test -s conftest.err; then
11196 ac_cpp_err=$ac_c_preproc_warn_flag
11203 if test -z "$ac_cpp_err"; then
11204 # We can compile using X headers with no special include directory.
11207 echo "$as_me: failed program was:" >&5
11208 cat conftest.$ac_ext >&5
11209 for ac_dir in $ac_x_header_dirs; do
11210 if test -r "$ac_dir/X11/Intrinsic.h"; then
11211 ac_x_includes=$ac_dir
11216 rm -f conftest.err conftest.$ac_ext
11217 fi # $ac_x_includes = no
11219 if test "$ac_x_libraries" = no; then
11220 # Check for the libraries.
11221 # See if we find them without any special options.
11222 # Don't add to $LIBS permanently.
11225 cat >conftest.$ac_ext <<_ACEOF
11226 #line 11226 "configure"
11227 #include "confdefs.h"
11228 #include <X11/Intrinsic.h>
11237 rm -f conftest.$ac_objext conftest$ac_exeext
11238 if { (eval echo "$as_me:11238: \"$ac_link\"") >&5
11239 (eval $ac_link) 2>&5
11241 echo "$as_me:11241: \$? = $ac_status" >&5
11242 (exit $ac_status); } &&
11243 { ac_try='test -s conftest$ac_exeext'
11244 { (eval echo "$as_me:11244: \"$ac_try\"") >&5
11245 (eval $ac_try) 2>&5
11247 echo "$as_me:11247: \$? = $ac_status" >&5
11248 (exit $ac_status); }; }; then
11250 # We can link X programs with no special library path.
11253 echo "$as_me: failed program was:" >&5
11254 cat conftest.$ac_ext >&5
11256 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11258 # Don't even attempt the hair of trying to link an X program!
11259 for ac_extension in a so sl dylib dll; do
11260 if test -r $ac_dir/libXt.$ac_extension; then
11261 ac_x_libraries=$ac_dir
11267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11268 fi # $ac_x_libraries = no
11270 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11271 # Didn't find X anywhere. Cache the known absence of X.
11272 ac_cv_have_x="have_x=no"
11274 # Record where we found X for the cache.
11275 ac_cv_have_x="have_x=yes \
11276 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11281 eval "$ac_cv_have_x"
11284 if test "$have_x" != yes; then
11285 echo "$as_me:11285: result: $have_x" >&5
11286 echo "${ECHO_T}$have_x" >&6
11289 # If each of the values was on the command line, it overrides each guess.
11290 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11291 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11292 # Update the cache value to reflect the command line values.
11293 ac_cv_have_x="have_x=yes \
11294 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11295 echo "$as_me:11295: result: libraries $x_libraries, headers $x_includes" >&5
11296 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11299 if test "$no_x" = yes; then
11300 # Not all programs may use this symbol, but it does not hurt to define it.
11302 cat >>confdefs.h <<\EOF
11303 #define X_DISPLAY_MISSING 1
11306 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11308 if test -n "$x_includes"; then
11309 X_CFLAGS="$X_CFLAGS -I$x_includes"
11312 # It would also be nice to do this for all -L options, not just this one.
11313 if test -n "$x_libraries"; then
11314 X_LIBS="$X_LIBS -L$x_libraries"
11315 # For Solaris; some versions of Sun CC require a space after -R and
11316 # others require no space. Words are not sufficient . . . .
11317 case `(uname -sr) 2>/dev/null` in
11319 echo "$as_me:11319: checking whether -R must be followed by a space" >&5
11320 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11321 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11322 cat >conftest.$ac_ext <<_ACEOF
11323 #line 11323 "configure"
11324 #include "confdefs.h"
11334 rm -f conftest.$ac_objext conftest$ac_exeext
11335 if { (eval echo "$as_me:11335: \"$ac_link\"") >&5
11336 (eval $ac_link) 2>&5
11338 echo "$as_me:11338: \$? = $ac_status" >&5
11339 (exit $ac_status); } &&
11340 { ac_try='test -s conftest$ac_exeext'
11341 { (eval echo "$as_me:11341: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11344 echo "$as_me:11344: \$? = $ac_status" >&5
11345 (exit $ac_status); }; }; then
11348 echo "$as_me: failed program was:" >&5
11349 cat conftest.$ac_ext >&5
11352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11353 if test $ac_R_nospace = yes; then
11354 echo "$as_me:11354: result: no" >&5
11355 echo "${ECHO_T}no" >&6
11356 X_LIBS="$X_LIBS -R$x_libraries"
11358 LIBS="$ac_xsave_LIBS -R $x_libraries"
11359 cat >conftest.$ac_ext <<_ACEOF
11360 #line 11360 "configure"
11361 #include "confdefs.h"
11371 rm -f conftest.$ac_objext conftest$ac_exeext
11372 if { (eval echo "$as_me:11372: \"$ac_link\"") >&5
11373 (eval $ac_link) 2>&5
11375 echo "$as_me:11375: \$? = $ac_status" >&5
11376 (exit $ac_status); } &&
11377 { ac_try='test -s conftest$ac_exeext'
11378 { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379 (eval $ac_try) 2>&5
11381 echo "$as_me:11381: \$? = $ac_status" >&5
11382 (exit $ac_status); }; }; then
11385 echo "$as_me: failed program was:" >&5
11386 cat conftest.$ac_ext >&5
11389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11390 if test $ac_R_space = yes; then
11391 echo "$as_me:11391: result: yes" >&5
11392 echo "${ECHO_T}yes" >&6
11393 X_LIBS="$X_LIBS -R $x_libraries"
11395 echo "$as_me:11395: result: neither works" >&5
11396 echo "${ECHO_T}neither works" >&6
11399 LIBS=$ac_xsave_LIBS
11403 # Check for system-dependent libraries X programs must link with.
11404 # Do this before checking for the system-independent R6 libraries
11405 # (-lICE), since we may need -lsocket or whatever for X linking.
11407 if test "$ISC" = yes; then
11408 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11410 # Martyn Johnson says this is needed for Ultrix, if the X
11411 # libraries were built with DECnet support. And Karl Berry says
11412 # the Alpha needs dnet_stub (dnet does not exist).
11413 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11414 cat >conftest.$ac_ext <<_ACEOF
11415 #line 11415 "configure"
11416 #include "confdefs.h"
11418 /* Override any gcc2 internal prototype to avoid an error. */
11422 /* We use char because int might match the return type of a gcc2
11423 builtin and then its argument prototype would still apply. */
11424 char XOpenDisplay ();
11433 rm -f conftest.$ac_objext conftest$ac_exeext
11434 if { (eval echo "$as_me:11434: \"$ac_link\"") >&5
11435 (eval $ac_link) 2>&5
11437 echo "$as_me:11437: \$? = $ac_status" >&5
11438 (exit $ac_status); } &&
11439 { ac_try='test -s conftest$ac_exeext'
11440 { (eval echo "$as_me:11440: \"$ac_try\"") >&5
11441 (eval $ac_try) 2>&5
11443 echo "$as_me:11443: \$? = $ac_status" >&5
11444 (exit $ac_status); }; }; then
11447 echo "$as_me: failed program was:" >&5
11448 cat conftest.$ac_ext >&5
11449 echo "$as_me:11449: checking for dnet_ntoa in -ldnet" >&5
11450 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11451 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11452 echo $ECHO_N "(cached) $ECHO_C" >&6
11454 ac_check_lib_save_LIBS=$LIBS
11455 LIBS="-ldnet $LIBS"
11456 cat >conftest.$ac_ext <<_ACEOF
11457 #line 11457 "configure"
11458 #include "confdefs.h"
11460 /* Override any gcc2 internal prototype to avoid an error. */
11464 /* We use char because int might match the return type of a gcc2
11465 builtin and then its argument prototype would still apply. */
11475 rm -f conftest.$ac_objext conftest$ac_exeext
11476 if { (eval echo "$as_me:11476: \"$ac_link\"") >&5
11477 (eval $ac_link) 2>&5
11479 echo "$as_me:11479: \$? = $ac_status" >&5
11480 (exit $ac_status); } &&
11481 { ac_try='test -s conftest$ac_exeext'
11482 { (eval echo "$as_me:11482: \"$ac_try\"") >&5
11483 (eval $ac_try) 2>&5
11485 echo "$as_me:11485: \$? = $ac_status" >&5
11486 (exit $ac_status); }; }; then
11487 ac_cv_lib_dnet_dnet_ntoa=yes
11489 echo "$as_me: failed program was:" >&5
11490 cat conftest.$ac_ext >&5
11491 ac_cv_lib_dnet_dnet_ntoa=no
11493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11494 LIBS=$ac_check_lib_save_LIBS
11496 echo "$as_me:11496: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11497 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11498 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11499 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11502 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11503 echo "$as_me:11503: checking for dnet_ntoa in -ldnet_stub" >&5
11504 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11505 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11506 echo $ECHO_N "(cached) $ECHO_C" >&6
11508 ac_check_lib_save_LIBS=$LIBS
11509 LIBS="-ldnet_stub $LIBS"
11510 cat >conftest.$ac_ext <<_ACEOF
11511 #line 11511 "configure"
11512 #include "confdefs.h"
11514 /* Override any gcc2 internal prototype to avoid an error. */
11518 /* We use char because int might match the return type of a gcc2
11519 builtin and then its argument prototype would still apply. */
11529 rm -f conftest.$ac_objext conftest$ac_exeext
11530 if { (eval echo "$as_me:11530: \"$ac_link\"") >&5
11531 (eval $ac_link) 2>&5
11533 echo "$as_me:11533: \$? = $ac_status" >&5
11534 (exit $ac_status); } &&
11535 { ac_try='test -s conftest$ac_exeext'
11536 { (eval echo "$as_me:11536: \"$ac_try\"") >&5
11537 (eval $ac_try) 2>&5
11539 echo "$as_me:11539: \$? = $ac_status" >&5
11540 (exit $ac_status); }; }; then
11541 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11543 echo "$as_me: failed program was:" >&5
11544 cat conftest.$ac_ext >&5
11545 ac_cv_lib_dnet_stub_dnet_ntoa=no
11547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11548 LIBS=$ac_check_lib_save_LIBS
11550 echo "$as_me:11550: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11551 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11552 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11553 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11559 LIBS="$ac_xsave_LIBS"
11561 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11562 # to get the SysV transport functions.
11563 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11565 # The nsl library prevents programs from opening the X display
11566 # on Irix 5.2, according to T.E. Dickey.
11567 # The functions gethostbyname, getservbyname, and inet_addr are
11568 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11569 echo "$as_me:11569: checking for gethostbyname" >&5
11570 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11571 if test "${ac_cv_func_gethostbyname+set}" = set; then
11572 echo $ECHO_N "(cached) $ECHO_C" >&6
11574 cat >conftest.$ac_ext <<_ACEOF
11575 #line 11575 "configure"
11576 #include "confdefs.h"
11577 #define gethostbyname autoconf_temporary
11578 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11579 #undef gethostbyname
11585 /* We use char because int might match the return type of a gcc2
11586 builtin and then its argument prototype would still apply. */
11587 char gethostbyname (void);
11593 /* The GNU C library defines stubs for functions which it implements
11594 to always fail with ENOSYS. Some functions are actually named
11595 something starting with __ and the normal name is an alias. */
11596 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11597 #error found stub for gethostbyname
11600 return gethostbyname ();
11605 rm -f conftest.$ac_objext conftest$ac_exeext
11606 if { (eval echo "$as_me:11606: \"$ac_link\"") >&5
11607 (eval $ac_link) 2>&5
11609 echo "$as_me:11609: \$? = $ac_status" >&5
11610 (exit $ac_status); } &&
11611 { ac_try='test -s conftest$ac_exeext'
11612 { (eval echo "$as_me:11612: \"$ac_try\"") >&5
11613 (eval $ac_try) 2>&5
11615 echo "$as_me:11615: \$? = $ac_status" >&5
11616 (exit $ac_status); }; }; then
11617 ac_cv_func_gethostbyname=yes
11619 echo "$as_me: failed program was:" >&5
11620 cat conftest.$ac_ext >&5
11621 ac_cv_func_gethostbyname=no
11623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11625 echo "$as_me:11625: result: $ac_cv_func_gethostbyname" >&5
11626 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11628 if test $ac_cv_func_gethostbyname = no; then
11629 echo "$as_me:11629: checking for gethostbyname in -lnsl" >&5
11630 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11631 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11632 echo $ECHO_N "(cached) $ECHO_C" >&6
11634 ac_check_lib_save_LIBS=$LIBS
11636 cat >conftest.$ac_ext <<_ACEOF
11637 #line 11637 "configure"
11638 #include "confdefs.h"
11640 /* Override any gcc2 internal prototype to avoid an error. */
11644 /* We use char because int might match the return type of a gcc2
11645 builtin and then its argument prototype would still apply. */
11646 char gethostbyname ();
11655 rm -f conftest.$ac_objext conftest$ac_exeext
11656 if { (eval echo "$as_me:11656: \"$ac_link\"") >&5
11657 (eval $ac_link) 2>&5
11659 echo "$as_me:11659: \$? = $ac_status" >&5
11660 (exit $ac_status); } &&
11661 { ac_try='test -s conftest$ac_exeext'
11662 { (eval echo "$as_me:11662: \"$ac_try\"") >&5
11663 (eval $ac_try) 2>&5
11665 echo "$as_me:11665: \$? = $ac_status" >&5
11666 (exit $ac_status); }; }; then
11667 ac_cv_lib_nsl_gethostbyname=yes
11669 echo "$as_me: failed program was:" >&5
11670 cat conftest.$ac_ext >&5
11671 ac_cv_lib_nsl_gethostbyname=no
11673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11674 LIBS=$ac_check_lib_save_LIBS
11676 echo "$as_me:11676: result: $ac_cv_lib_nsl_gethostbyname" >&5
11677 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11678 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11679 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11682 if test $ac_cv_lib_nsl_gethostbyname = no; then
11683 echo "$as_me:11683: checking for gethostbyname in -lbsd" >&5
11684 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11685 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11688 ac_check_lib_save_LIBS=$LIBS
11690 cat >conftest.$ac_ext <<_ACEOF
11691 #line 11691 "configure"
11692 #include "confdefs.h"
11694 /* Override any gcc2 internal prototype to avoid an error. */
11698 /* We use char because int might match the return type of a gcc2
11699 builtin and then its argument prototype would still apply. */
11700 char gethostbyname ();
11709 rm -f conftest.$ac_objext conftest$ac_exeext
11710 if { (eval echo "$as_me:11710: \"$ac_link\"") >&5
11711 (eval $ac_link) 2>&5
11713 echo "$as_me:11713: \$? = $ac_status" >&5
11714 (exit $ac_status); } &&
11715 { ac_try='test -s conftest$ac_exeext'
11716 { (eval echo "$as_me:11716: \"$ac_try\"") >&5
11717 (eval $ac_try) 2>&5
11719 echo "$as_me:11719: \$? = $ac_status" >&5
11720 (exit $ac_status); }; }; then
11721 ac_cv_lib_bsd_gethostbyname=yes
11723 echo "$as_me: failed program was:" >&5
11724 cat conftest.$ac_ext >&5
11725 ac_cv_lib_bsd_gethostbyname=no
11727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11728 LIBS=$ac_check_lib_save_LIBS
11730 echo "$as_me:11730: result: $ac_cv_lib_bsd_gethostbyname" >&5
11731 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11732 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11733 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11739 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11740 # socket/setsockopt and other routines are undefined under SCO ODT
11741 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11742 # on later versions), says Simon Leinen: it contains gethostby*
11743 # variants that don't use the nameserver (or something). -lsocket
11744 # must be given before -lnsl if both are needed. We assume that
11745 # if connect needs -lnsl, so does gethostbyname.
11746 echo "$as_me:11746: checking for connect" >&5
11747 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11748 if test "${ac_cv_func_connect+set}" = set; then
11749 echo $ECHO_N "(cached) $ECHO_C" >&6
11751 cat >conftest.$ac_ext <<_ACEOF
11752 #line 11752 "configure"
11753 #include "confdefs.h"
11754 #define connect autoconf_temporary
11755 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11762 /* We use char because int might match the return type of a gcc2
11763 builtin and then its argument prototype would still apply. */
11764 char connect (void);
11770 /* The GNU C library defines stubs for functions which it implements
11771 to always fail with ENOSYS. Some functions are actually named
11772 something starting with __ and the normal name is an alias. */
11773 #if defined (__stub_connect) || defined (__stub___connect)
11774 #error found stub for connect
11782 rm -f conftest.$ac_objext conftest$ac_exeext
11783 if { (eval echo "$as_me:11783: \"$ac_link\"") >&5
11784 (eval $ac_link) 2>&5
11786 echo "$as_me:11786: \$? = $ac_status" >&5
11787 (exit $ac_status); } &&
11788 { ac_try='test -s conftest$ac_exeext'
11789 { (eval echo "$as_me:11789: \"$ac_try\"") >&5
11790 (eval $ac_try) 2>&5
11792 echo "$as_me:11792: \$? = $ac_status" >&5
11793 (exit $ac_status); }; }; then
11794 ac_cv_func_connect=yes
11796 echo "$as_me: failed program was:" >&5
11797 cat conftest.$ac_ext >&5
11798 ac_cv_func_connect=no
11800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11802 echo "$as_me:11802: result: $ac_cv_func_connect" >&5
11803 echo "${ECHO_T}$ac_cv_func_connect" >&6
11805 if test $ac_cv_func_connect = no; then
11806 echo "$as_me:11806: checking for connect in -lsocket" >&5
11807 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11808 if test "${ac_cv_lib_socket_connect+set}" = set; then
11809 echo $ECHO_N "(cached) $ECHO_C" >&6
11811 ac_check_lib_save_LIBS=$LIBS
11812 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11813 cat >conftest.$ac_ext <<_ACEOF
11814 #line 11814 "configure"
11815 #include "confdefs.h"
11817 /* Override any gcc2 internal prototype to avoid an error. */
11821 /* We use char because int might match the return type of a gcc2
11822 builtin and then its argument prototype would still apply. */
11832 rm -f conftest.$ac_objext conftest$ac_exeext
11833 if { (eval echo "$as_me:11833: \"$ac_link\"") >&5
11834 (eval $ac_link) 2>&5
11836 echo "$as_me:11836: \$? = $ac_status" >&5
11837 (exit $ac_status); } &&
11838 { ac_try='test -s conftest$ac_exeext'
11839 { (eval echo "$as_me:11839: \"$ac_try\"") >&5
11840 (eval $ac_try) 2>&5
11842 echo "$as_me:11842: \$? = $ac_status" >&5
11843 (exit $ac_status); }; }; then
11844 ac_cv_lib_socket_connect=yes
11846 echo "$as_me: failed program was:" >&5
11847 cat conftest.$ac_ext >&5
11848 ac_cv_lib_socket_connect=no
11850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11851 LIBS=$ac_check_lib_save_LIBS
11853 echo "$as_me:11853: result: $ac_cv_lib_socket_connect" >&5
11854 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11855 if test $ac_cv_lib_socket_connect = yes; then
11856 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11861 # Guillermo Gomez says -lposix is necessary on A/UX.
11862 echo "$as_me:11862: checking for remove" >&5
11863 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11864 if test "${ac_cv_func_remove+set}" = set; then
11865 echo $ECHO_N "(cached) $ECHO_C" >&6
11867 cat >conftest.$ac_ext <<_ACEOF
11868 #line 11868 "configure"
11869 #include "confdefs.h"
11870 #define remove autoconf_temporary
11871 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11878 /* We use char because int might match the return type of a gcc2
11879 builtin and then its argument prototype would still apply. */
11880 char remove (void);
11886 /* The GNU C library defines stubs for functions which it implements
11887 to always fail with ENOSYS. Some functions are actually named
11888 something starting with __ and the normal name is an alias. */
11889 #if defined (__stub_remove) || defined (__stub___remove)
11890 #error found stub for remove
11898 rm -f conftest.$ac_objext conftest$ac_exeext
11899 if { (eval echo "$as_me:11899: \"$ac_link\"") >&5
11900 (eval $ac_link) 2>&5
11902 echo "$as_me:11902: \$? = $ac_status" >&5
11903 (exit $ac_status); } &&
11904 { ac_try='test -s conftest$ac_exeext'
11905 { (eval echo "$as_me:11905: \"$ac_try\"") >&5
11906 (eval $ac_try) 2>&5
11908 echo "$as_me:11908: \$? = $ac_status" >&5
11909 (exit $ac_status); }; }; then
11910 ac_cv_func_remove=yes
11912 echo "$as_me: failed program was:" >&5
11913 cat conftest.$ac_ext >&5
11914 ac_cv_func_remove=no
11916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11918 echo "$as_me:11918: result: $ac_cv_func_remove" >&5
11919 echo "${ECHO_T}$ac_cv_func_remove" >&6
11921 if test $ac_cv_func_remove = no; then
11922 echo "$as_me:11922: checking for remove in -lposix" >&5
11923 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11924 if test "${ac_cv_lib_posix_remove+set}" = set; then
11925 echo $ECHO_N "(cached) $ECHO_C" >&6
11927 ac_check_lib_save_LIBS=$LIBS
11928 LIBS="-lposix $LIBS"
11929 cat >conftest.$ac_ext <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11933 /* Override any gcc2 internal prototype to avoid an error. */
11937 /* We use char because int might match the return type of a gcc2
11938 builtin and then its argument prototype would still apply. */
11948 rm -f conftest.$ac_objext conftest$ac_exeext
11949 if { (eval echo "$as_me:11949: \"$ac_link\"") >&5
11950 (eval $ac_link) 2>&5
11952 echo "$as_me:11952: \$? = $ac_status" >&5
11953 (exit $ac_status); } &&
11954 { ac_try='test -s conftest$ac_exeext'
11955 { (eval echo "$as_me:11955: \"$ac_try\"") >&5
11956 (eval $ac_try) 2>&5
11958 echo "$as_me:11958: \$? = $ac_status" >&5
11959 (exit $ac_status); }; }; then
11960 ac_cv_lib_posix_remove=yes
11962 echo "$as_me: failed program was:" >&5
11963 cat conftest.$ac_ext >&5
11964 ac_cv_lib_posix_remove=no
11966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11967 LIBS=$ac_check_lib_save_LIBS
11969 echo "$as_me:11969: result: $ac_cv_lib_posix_remove" >&5
11970 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11971 if test $ac_cv_lib_posix_remove = yes; then
11972 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11977 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11978 echo "$as_me:11978: checking for shmat" >&5
11979 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11980 if test "${ac_cv_func_shmat+set}" = set; then
11981 echo $ECHO_N "(cached) $ECHO_C" >&6
11983 cat >conftest.$ac_ext <<_ACEOF
11984 #line 11984 "configure"
11985 #include "confdefs.h"
11986 #define shmat autoconf_temporary
11987 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11994 /* We use char because int might match the return type of a gcc2
11995 builtin and then its argument prototype would still apply. */
12002 /* The GNU C library defines stubs for functions which it implements
12003 to always fail with ENOSYS. Some functions are actually named
12004 something starting with __ and the normal name is an alias. */
12005 #if defined (__stub_shmat) || defined (__stub___shmat)
12006 #error found stub for shmat
12014 rm -f conftest.$ac_objext conftest$ac_exeext
12015 if { (eval echo "$as_me:12015: \"$ac_link\"") >&5
12016 (eval $ac_link) 2>&5
12018 echo "$as_me:12018: \$? = $ac_status" >&5
12019 (exit $ac_status); } &&
12020 { ac_try='test -s conftest$ac_exeext'
12021 { (eval echo "$as_me:12021: \"$ac_try\"") >&5
12022 (eval $ac_try) 2>&5
12024 echo "$as_me:12024: \$? = $ac_status" >&5
12025 (exit $ac_status); }; }; then
12026 ac_cv_func_shmat=yes
12028 echo "$as_me: failed program was:" >&5
12029 cat conftest.$ac_ext >&5
12030 ac_cv_func_shmat=no
12032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12034 echo "$as_me:12034: result: $ac_cv_func_shmat" >&5
12035 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12037 if test $ac_cv_func_shmat = no; then
12038 echo "$as_me:12038: checking for shmat in -lipc" >&5
12039 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12040 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12041 echo $ECHO_N "(cached) $ECHO_C" >&6
12043 ac_check_lib_save_LIBS=$LIBS
12045 cat >conftest.$ac_ext <<_ACEOF
12046 #line 12046 "configure"
12047 #include "confdefs.h"
12049 /* Override any gcc2 internal prototype to avoid an error. */
12053 /* We use char because int might match the return type of a gcc2
12054 builtin and then its argument prototype would still apply. */
12064 rm -f conftest.$ac_objext conftest$ac_exeext
12065 if { (eval echo "$as_me:12065: \"$ac_link\"") >&5
12066 (eval $ac_link) 2>&5
12068 echo "$as_me:12068: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
12070 { ac_try='test -s conftest$ac_exeext'
12071 { (eval echo "$as_me:12071: \"$ac_try\"") >&5
12072 (eval $ac_try) 2>&5
12074 echo "$as_me:12074: \$? = $ac_status" >&5
12075 (exit $ac_status); }; }; then
12076 ac_cv_lib_ipc_shmat=yes
12078 echo "$as_me: failed program was:" >&5
12079 cat conftest.$ac_ext >&5
12080 ac_cv_lib_ipc_shmat=no
12082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12083 LIBS=$ac_check_lib_save_LIBS
12085 echo "$as_me:12085: result: $ac_cv_lib_ipc_shmat" >&5
12086 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12087 if test $ac_cv_lib_ipc_shmat = yes; then
12088 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12094 # Check for libraries that X11R6 Xt/Xaw programs need.
12095 ac_save_LDFLAGS=$LDFLAGS
12096 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12097 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12098 # check for ICE first), but we must link in the order -lSM -lICE or
12099 # we get undefined symbols. So assume we have SM if we have ICE.
12100 # These have to be linked with before -lX11, unlike the other
12101 # libraries we check for below, so use a different variable.
12102 # John Interrante, Karl Berry
12103 echo "$as_me:12103: checking for IceConnectionNumber in -lICE" >&5
12104 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12105 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12106 echo $ECHO_N "(cached) $ECHO_C" >&6
12108 ac_check_lib_save_LIBS=$LIBS
12109 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12110 cat >conftest.$ac_ext <<_ACEOF
12111 #line 12111 "configure"
12112 #include "confdefs.h"
12114 /* Override any gcc2 internal prototype to avoid an error. */
12118 /* We use char because int might match the return type of a gcc2
12119 builtin and then its argument prototype would still apply. */
12120 char IceConnectionNumber ();
12124 IceConnectionNumber ();
12129 rm -f conftest.$ac_objext conftest$ac_exeext
12130 if { (eval echo "$as_me:12130: \"$ac_link\"") >&5
12131 (eval $ac_link) 2>&5
12133 echo "$as_me:12133: \$? = $ac_status" >&5
12134 (exit $ac_status); } &&
12135 { ac_try='test -s conftest$ac_exeext'
12136 { (eval echo "$as_me:12136: \"$ac_try\"") >&5
12137 (eval $ac_try) 2>&5
12139 echo "$as_me:12139: \$? = $ac_status" >&5
12140 (exit $ac_status); }; }; then
12141 ac_cv_lib_ICE_IceConnectionNumber=yes
12143 echo "$as_me: failed program was:" >&5
12144 cat conftest.$ac_ext >&5
12145 ac_cv_lib_ICE_IceConnectionNumber=no
12147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12148 LIBS=$ac_check_lib_save_LIBS
12150 echo "$as_me:12150: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12151 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12152 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12153 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12156 LDFLAGS=$ac_save_LDFLAGS
12160 cf_x_athena=${cf_x_athena:-Xaw}
12162 echo "$as_me:12162: checking if you want to link with Xaw 3d library" >&5
12163 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12166 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12167 if test "${with_Xaw3d+set}" = set; then
12168 withval="$with_Xaw3d"
12171 if test "$withval" = yes ; then
12173 echo "$as_me:12173: result: yes" >&5
12174 echo "${ECHO_T}yes" >&6
12176 echo "$as_me:12176: result: no" >&5
12177 echo "${ECHO_T}no" >&6
12180 echo "$as_me:12180: checking if you want to link with Xaw 3d xft library" >&5
12181 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12184 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12185 if test "${with_Xaw3dxft+set}" = set; then
12186 withval="$with_Xaw3dxft"
12189 if test "$withval" = yes ; then
12190 cf_x_athena=Xaw3dxft
12191 echo "$as_me:12191: result: yes" >&5
12192 echo "${ECHO_T}yes" >&6
12194 echo "$as_me:12194: result: no" >&5
12195 echo "${ECHO_T}no" >&6
12198 echo "$as_me:12198: checking if you want to link with neXT Athena library" >&5
12199 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12202 # Check whether --with-neXtaw or --without-neXtaw was given.
12203 if test "${with_neXtaw+set}" = set; then
12204 withval="$with_neXtaw"
12207 if test "$withval" = yes ; then
12209 echo "$as_me:12209: result: yes" >&5
12210 echo "${ECHO_T}yes" >&6
12212 echo "$as_me:12212: result: no" >&5
12213 echo "${ECHO_T}no" >&6
12216 echo "$as_me:12216: checking if you want to link with Athena-Plus library" >&5
12217 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12220 # Check whether --with-XawPlus or --without-XawPlus was given.
12221 if test "${with_XawPlus+set}" = set; then
12222 withval="$with_XawPlus"
12225 if test "$withval" = yes ; then
12226 cf_x_athena=XawPlus
12227 echo "$as_me:12227: result: yes" >&5
12228 echo "${ECHO_T}yes" >&6
12230 echo "$as_me:12230: result: no" >&5
12231 echo "${ECHO_T}no" >&6
12236 if test "$PKG_CONFIG" != none ; then
12238 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12239 for cf_athena_pkg in \
12242 ${cf_x_athena}-devel \
12243 lib${cf_x_athena} \
12244 lib${cf_x_athena}-devel
12247 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12248 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12250 echo "${as_me:-configure}:12250: testing found package $cf_athena_pkg ..." 1>&5
12252 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12253 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12254 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12256 echo "${as_me:-configure}:12256: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12258 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12260 echo "${as_me:-configure}:12260: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12265 cf_new_extra_cppflags=
12267 for cf_add_cflags in $cf_pkgconfig_incs
12269 case $cf_fix_cppflags in
12271 case $cf_add_cflags in
12272 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12273 case $cf_add_cflags in
12275 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12278 && test -z "${cf_tst_cflags}" \
12279 && cf_fix_cppflags=yes
12281 if test $cf_fix_cppflags = yes ; then
12283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12287 elif test "${cf_tst_cflags}" = "\"'" ; then
12289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12296 case "$CPPFLAGS" in
12300 case $cf_add_cflags in
12302 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12304 CPPFLAGS=`echo "$CPPFLAGS" | \
12305 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12306 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12311 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12312 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12319 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12320 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12327 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12328 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12330 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12332 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12333 && test -z "${cf_tst_cflags}" \
12334 && cf_fix_cppflags=no
12339 if test -n "$cf_new_cflags" ; then
12341 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12342 CFLAGS="${CFLAGS}$cf_new_cflags"
12346 if test -n "$cf_new_cppflags" ; then
12348 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12349 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12353 if test -n "$cf_new_extra_cppflags" ; then
12355 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12356 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12360 cf_add_libs="$cf_pkgconfig_libs"
12361 # Filter out duplicates - this happens with badly-designed ".pc" files...
12362 for cf_add_1lib in $LIBS
12364 for cf_add_2lib in $cf_add_libs
12366 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12372 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12374 LIBS="$cf_add_libs"
12376 cf_x_athena_lib="$cf_pkgconfig_libs"
12378 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12380 cat >>confdefs.h <<EOF
12381 #define $cf_x_athena_LIBS 1
12384 for cf_trim_lib in Xmu Xt X11
12387 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12388 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12389 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12391 echo "${as_me:-configure}:12391: testing ..trimmed $LIBS ..." 1>&5
12397 echo "$as_me:12397: checking for usable $cf_x_athena/Xmu package" >&5
12398 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12399 if test "${cf_cv_xaw_compat+set}" = set; then
12400 echo $ECHO_N "(cached) $ECHO_C" >&6
12403 cat >conftest.$ac_ext <<_ACEOF
12404 #line 12404 "configure"
12405 #include "confdefs.h"
12407 #include <X11/Xmu/CharSet.h>
12413 int check = XmuCompareISOLatin1("big", "small")
12419 rm -f conftest.$ac_objext conftest$ac_exeext
12420 if { (eval echo "$as_me:12420: \"$ac_link\"") >&5
12421 (eval $ac_link) 2>&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit $ac_status); } &&
12425 { ac_try='test -s conftest$ac_exeext'
12426 { (eval echo "$as_me:12426: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12429 echo "$as_me:12429: \$? = $ac_status" >&5
12430 (exit $ac_status); }; }; then
12431 cf_cv_xaw_compat=yes
12433 echo "$as_me: failed program was:" >&5
12434 cat conftest.$ac_ext >&5
12435 cf_cv_xaw_compat=no
12437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12439 echo "$as_me:12439: result: $cf_cv_xaw_compat" >&5
12440 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12442 if test "$cf_cv_xaw_compat" = no
12444 # workaround for broken ".pc" files...
12445 case "$cf_x_athena_lib" in
12449 test -n "$verbose" && echo " work around broken package" 1>&6
12451 echo "${as_me:-configure}:12451: testing work around broken package ..." 1>&5
12453 cf_save_xmu="$LIBS"
12454 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12456 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12457 test -n "$verbose" && echo " found package xmu" 1>&6
12459 echo "${as_me:-configure}:12459: testing found package xmu ..." 1>&5
12461 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12462 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12463 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12465 echo "${as_me:-configure}:12465: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12467 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12469 echo "${as_me:-configure}:12469: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12474 cf_new_extra_cppflags=
12476 for cf_add_cflags in $cf_pkgconfig_incs
12478 case $cf_fix_cppflags in
12480 case $cf_add_cflags in
12481 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12482 case $cf_add_cflags in
12484 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12486 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12487 && test -z "${cf_tst_cflags}" \
12488 && cf_fix_cppflags=yes
12490 if test $cf_fix_cppflags = yes ; then
12492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12496 elif test "${cf_tst_cflags}" = "\"'" ; then
12498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12505 case "$CPPFLAGS" in
12509 case $cf_add_cflags in
12511 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12513 CPPFLAGS=`echo "$CPPFLAGS" | \
12514 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12515 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12520 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12521 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12528 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12529 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12539 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12542 && test -z "${cf_tst_cflags}" \
12543 && cf_fix_cppflags=no
12548 if test -n "$cf_new_cflags" ; then
12550 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12551 CFLAGS="${CFLAGS}$cf_new_cflags"
12555 if test -n "$cf_new_cppflags" ; then
12557 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12558 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12562 if test -n "$cf_new_extra_cppflags" ; then
12564 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12565 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12569 cf_add_libs="$cf_pkgconfig_libs"
12570 # Filter out duplicates - this happens with badly-designed ".pc" files...
12571 for cf_add_1lib in $LIBS
12573 for cf_add_2lib in $cf_add_libs
12575 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12581 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12583 LIBS="$cf_add_libs"
12585 LIBS="$cf_save_xmu"
12587 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12589 echo "${as_me:-configure}:12589: testing ...before $LIBS ..." 1>&5
12591 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12592 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12594 echo "${as_me:-configure}:12594: testing ...after $LIBS ..." 1>&5
12600 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12602 echo "${as_me:-configure}:12602: testing ...before $LIBS ..." 1>&5
12604 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12605 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12607 echo "${as_me:-configure}:12607: testing ...after $LIBS ..." 1>&5
12611 for cf_trim_lib in Xmu Xt X11
12614 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12615 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12616 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12618 echo "${as_me:-configure}:12618: testing ..trimmed $LIBS ..." 1>&5
12638 if test -z "$cf_x_athena_lib" ; then
12640 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12641 test -n "$verbose" && echo " found package Xext" 1>&6
12643 echo "${as_me:-configure}:12643: testing found package Xext ..." 1>&5
12645 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12646 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12647 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12649 echo "${as_me:-configure}:12649: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12651 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12653 echo "${as_me:-configure}:12653: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12658 cf_new_extra_cppflags=
12660 for cf_add_cflags in $cf_pkgconfig_incs
12662 case $cf_fix_cppflags in
12664 case $cf_add_cflags in
12665 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12666 case $cf_add_cflags in
12668 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12670 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12671 && test -z "${cf_tst_cflags}" \
12672 && cf_fix_cppflags=yes
12674 if test $cf_fix_cppflags = yes ; then
12676 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12677 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12680 elif test "${cf_tst_cflags}" = "\"'" ; then
12682 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12683 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12689 case "$CPPFLAGS" in
12693 case $cf_add_cflags in
12695 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12697 CPPFLAGS=`echo "$CPPFLAGS" | \
12698 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12699 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12704 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12705 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12712 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12713 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12720 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12721 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12723 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12725 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12726 && test -z "${cf_tst_cflags}" \
12727 && cf_fix_cppflags=no
12732 if test -n "$cf_new_cflags" ; then
12734 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12735 CFLAGS="${CFLAGS}$cf_new_cflags"
12739 if test -n "$cf_new_cppflags" ; then
12741 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12742 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12746 if test -n "$cf_new_extra_cppflags" ; then
12748 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12749 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12753 cf_add_libs="$cf_pkgconfig_libs"
12754 # Filter out duplicates - this happens with badly-designed ".pc" files...
12755 for cf_add_1lib in $LIBS
12757 for cf_add_2lib in $cf_add_libs
12759 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12767 LIBS="$cf_add_libs"
12774 echo "$as_me:12774: checking for XextCreateExtension in -lXext" >&5
12775 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12776 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12777 echo $ECHO_N "(cached) $ECHO_C" >&6
12779 ac_check_lib_save_LIBS=$LIBS
12780 LIBS="-lXext $LIBS"
12781 cat >conftest.$ac_ext <<_ACEOF
12782 #line 12782 "configure"
12783 #include "confdefs.h"
12785 /* Override any gcc2 internal prototype to avoid an error. */
12789 /* We use char because int might match the return type of a gcc2
12790 builtin and then its argument prototype would still apply. */
12791 char XextCreateExtension ();
12795 XextCreateExtension ();
12800 rm -f conftest.$ac_objext conftest$ac_exeext
12801 if { (eval echo "$as_me:12801: \"$ac_link\"") >&5
12802 (eval $ac_link) 2>&5
12804 echo "$as_me:12804: \$? = $ac_status" >&5
12805 (exit $ac_status); } &&
12806 { ac_try='test -s conftest$ac_exeext'
12807 { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12810 echo "$as_me:12810: \$? = $ac_status" >&5
12811 (exit $ac_status); }; }; then
12812 ac_cv_lib_Xext_XextCreateExtension=yes
12814 echo "$as_me: failed program was:" >&5
12815 cat conftest.$ac_ext >&5
12816 ac_cv_lib_Xext_XextCreateExtension=no
12818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12819 LIBS=$ac_check_lib_save_LIBS
12821 echo "$as_me:12821: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12822 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12823 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12825 cf_add_libs="-lXext"
12826 # Filter out duplicates - this happens with badly-designed ".pc" files...
12827 for cf_add_1lib in $LIBS
12829 for cf_add_2lib in $cf_add_libs
12831 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12837 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12839 LIBS="$cf_add_libs"
12845 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12846 # in some cases has installed dummy files in the former, other cases replaced
12847 # it with a link to the new location). This complicates the configure script.
12848 # Check for that pitfall, and recover using pkg-config
12850 # If none of these are set, the configuration is almost certainly broken.
12851 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12854 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12855 test -n "$verbose" && echo " found package x11" 1>&6
12857 echo "${as_me:-configure}:12857: testing found package x11 ..." 1>&5
12859 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12860 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12861 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12863 echo "${as_me:-configure}:12863: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12865 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12867 echo "${as_me:-configure}:12867: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12872 cf_new_extra_cppflags=
12874 for cf_add_cflags in $cf_pkgconfig_incs
12876 case $cf_fix_cppflags in
12878 case $cf_add_cflags in
12879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12880 case $cf_add_cflags in
12882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12885 && test -z "${cf_tst_cflags}" \
12886 && cf_fix_cppflags=yes
12888 if test $cf_fix_cppflags = yes ; then
12890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12894 elif test "${cf_tst_cflags}" = "\"'" ; then
12896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12903 case "$CPPFLAGS" in
12907 case $cf_add_cflags in
12909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12911 CPPFLAGS=`echo "$CPPFLAGS" | \
12912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12940 && test -z "${cf_tst_cflags}" \
12941 && cf_fix_cppflags=no
12946 if test -n "$cf_new_cflags" ; then
12948 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12949 CFLAGS="${CFLAGS}$cf_new_cflags"
12953 if test -n "$cf_new_cppflags" ; then
12955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12956 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12960 if test -n "$cf_new_extra_cppflags" ; then
12962 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12963 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12967 cf_add_libs="$cf_pkgconfig_libs"
12968 # Filter out duplicates - this happens with badly-designed ".pc" files...
12969 for cf_add_1lib in $LIBS
12971 for cf_add_2lib in $cf_add_libs
12973 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12981 LIBS="$cf_add_libs"
12987 { echo "$as_me:12987: WARNING: unable to find X11 library" >&5
12988 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12991 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12992 test -n "$verbose" && echo " found package ice" 1>&6
12994 echo "${as_me:-configure}:12994: testing found package ice ..." 1>&5
12996 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12997 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12998 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13000 echo "${as_me:-configure}:13000: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13002 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13004 echo "${as_me:-configure}:13004: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13009 cf_new_extra_cppflags=
13011 for cf_add_cflags in $cf_pkgconfig_incs
13013 case $cf_fix_cppflags in
13015 case $cf_add_cflags in
13016 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13017 case $cf_add_cflags in
13019 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13021 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13022 && test -z "${cf_tst_cflags}" \
13023 && cf_fix_cppflags=yes
13025 if test $cf_fix_cppflags = yes ; then
13027 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13028 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13031 elif test "${cf_tst_cflags}" = "\"'" ; then
13033 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13034 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13040 case "$CPPFLAGS" in
13044 case $cf_add_cflags in
13046 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13048 CPPFLAGS=`echo "$CPPFLAGS" | \
13049 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13050 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13055 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13056 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13063 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13064 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13071 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13072 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13074 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13076 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13077 && test -z "${cf_tst_cflags}" \
13078 && cf_fix_cppflags=no
13083 if test -n "$cf_new_cflags" ; then
13085 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13086 CFLAGS="${CFLAGS}$cf_new_cflags"
13090 if test -n "$cf_new_cppflags" ; then
13092 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13093 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13097 if test -n "$cf_new_extra_cppflags" ; then
13099 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13100 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13104 cf_add_libs="$cf_pkgconfig_libs"
13105 # Filter out duplicates - this happens with badly-designed ".pc" files...
13106 for cf_add_1lib in $LIBS
13108 for cf_add_2lib in $cf_add_libs
13110 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13116 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13118 LIBS="$cf_add_libs"
13124 { echo "$as_me:13124: WARNING: unable to find ICE library" >&5
13125 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13128 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13129 test -n "$verbose" && echo " found package sm" 1>&6
13131 echo "${as_me:-configure}:13131: testing found package sm ..." 1>&5
13133 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13134 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13135 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13137 echo "${as_me:-configure}:13137: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13139 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13141 echo "${as_me:-configure}:13141: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13146 cf_new_extra_cppflags=
13148 for cf_add_cflags in $cf_pkgconfig_incs
13150 case $cf_fix_cppflags in
13152 case $cf_add_cflags in
13153 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13154 case $cf_add_cflags in
13156 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13158 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13159 && test -z "${cf_tst_cflags}" \
13160 && cf_fix_cppflags=yes
13162 if test $cf_fix_cppflags = yes ; then
13164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13168 elif test "${cf_tst_cflags}" = "\"'" ; then
13170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13177 case "$CPPFLAGS" in
13181 case $cf_add_cflags in
13183 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13185 CPPFLAGS=`echo "$CPPFLAGS" | \
13186 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13187 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13192 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13193 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13200 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13201 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13208 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13209 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13211 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13214 && test -z "${cf_tst_cflags}" \
13215 && cf_fix_cppflags=no
13220 if test -n "$cf_new_cflags" ; then
13222 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13223 CFLAGS="${CFLAGS}$cf_new_cflags"
13227 if test -n "$cf_new_cppflags" ; then
13229 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13230 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13234 if test -n "$cf_new_extra_cppflags" ; then
13236 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13237 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13241 cf_add_libs="$cf_pkgconfig_libs"
13242 # Filter out duplicates - this happens with badly-designed ".pc" files...
13243 for cf_add_1lib in $LIBS
13245 for cf_add_2lib in $cf_add_libs
13247 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13253 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13255 LIBS="$cf_add_libs"
13261 { echo "$as_me:13261: WARNING: unable to find SM library" >&5
13262 echo "$as_me: WARNING: unable to find SM library" >&2;}
13265 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13266 test -n "$verbose" && echo " found package xt" 1>&6
13268 echo "${as_me:-configure}:13268: testing found package xt ..." 1>&5
13270 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13271 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13272 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13274 echo "${as_me:-configure}:13274: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13276 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13278 echo "${as_me:-configure}:13278: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13283 cf_new_extra_cppflags=
13285 for cf_add_cflags in $cf_pkgconfig_incs
13287 case $cf_fix_cppflags in
13289 case $cf_add_cflags in
13290 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13291 case $cf_add_cflags in
13293 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13296 && test -z "${cf_tst_cflags}" \
13297 && cf_fix_cppflags=yes
13299 if test $cf_fix_cppflags = yes ; then
13301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13305 elif test "${cf_tst_cflags}" = "\"'" ; then
13307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13314 case "$CPPFLAGS" in
13318 case $cf_add_cflags in
13320 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13322 CPPFLAGS=`echo "$CPPFLAGS" | \
13323 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13324 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13329 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13330 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13337 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13338 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13345 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13346 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13348 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13351 && test -z "${cf_tst_cflags}" \
13352 && cf_fix_cppflags=no
13357 if test -n "$cf_new_cflags" ; then
13359 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13360 CFLAGS="${CFLAGS}$cf_new_cflags"
13364 if test -n "$cf_new_cppflags" ; then
13366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13367 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13371 if test -n "$cf_new_extra_cppflags" ; then
13373 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13374 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13378 cf_add_libs="$cf_pkgconfig_libs"
13379 # Filter out duplicates - this happens with badly-designed ".pc" files...
13380 for cf_add_1lib in $LIBS
13382 for cf_add_2lib in $cf_add_libs
13384 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13390 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13392 LIBS="$cf_add_libs"
13398 { echo "$as_me:13398: WARNING: unable to find Xt library" >&5
13399 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13406 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13407 test -n "$verbose" && echo " found package xt" 1>&6
13409 echo "${as_me:-configure}:13409: testing found package xt ..." 1>&5
13411 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13412 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13413 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13415 echo "${as_me:-configure}:13415: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13417 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13419 echo "${as_me:-configure}:13419: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13424 cf_new_extra_cppflags=
13426 for cf_add_cflags in $cf_pkgconfig_incs
13428 case $cf_fix_cppflags in
13430 case $cf_add_cflags in
13431 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13432 case $cf_add_cflags in
13434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13437 && test -z "${cf_tst_cflags}" \
13438 && cf_fix_cppflags=yes
13440 if test $cf_fix_cppflags = yes ; then
13442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13446 elif test "${cf_tst_cflags}" = "\"'" ; then
13448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13455 case "$CPPFLAGS" in
13459 case $cf_add_cflags in
13461 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13463 CPPFLAGS=`echo "$CPPFLAGS" | \
13464 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13465 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13470 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13471 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13478 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13479 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13492 && test -z "${cf_tst_cflags}" \
13493 && cf_fix_cppflags=no
13498 if test -n "$cf_new_cflags" ; then
13500 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13501 CFLAGS="${CFLAGS}$cf_new_cflags"
13505 if test -n "$cf_new_cppflags" ; then
13507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13508 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13512 if test -n "$cf_new_extra_cppflags" ; then
13514 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13515 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13519 cf_add_libs="$cf_pkgconfig_libs"
13520 # Filter out duplicates - this happens with badly-designed ".pc" files...
13521 for cf_add_1lib in $LIBS
13523 for cf_add_2lib in $cf_add_libs
13525 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13531 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13533 LIBS="$cf_add_libs"
13539 # we have an "xt" package, but it may omit Xt's dependency on X11
13540 echo "$as_me:13540: checking for usable X dependency" >&5
13541 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13542 if test "${cf_cv_xt_x11_compat+set}" = set; then
13543 echo $ECHO_N "(cached) $ECHO_C" >&6
13546 cat >conftest.$ac_ext <<_ACEOF
13547 #line 13547 "configure"
13548 #include "confdefs.h"
13550 #include <X11/Xlib.h>
13556 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13557 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13558 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13559 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13565 rm -f conftest.$ac_objext conftest$ac_exeext
13566 if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13567 (eval $ac_link) 2>&5
13569 echo "$as_me:13569: \$? = $ac_status" >&5
13570 (exit $ac_status); } &&
13571 { ac_try='test -s conftest$ac_exeext'
13572 { (eval echo "$as_me:13572: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit $ac_status); }; }; then
13577 cf_cv_xt_x11_compat=yes
13579 echo "$as_me: failed program was:" >&5
13580 cat conftest.$ac_ext >&5
13581 cf_cv_xt_x11_compat=no
13583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13585 echo "$as_me:13585: result: $cf_cv_xt_x11_compat" >&5
13586 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13587 if test "$cf_cv_xt_x11_compat" = no
13589 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13591 echo "${as_me:-configure}:13591: testing work around broken X11 dependency ..." 1>&5
13593 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13595 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13596 test -n "$verbose" && echo " found package x11" 1>&6
13598 echo "${as_me:-configure}:13598: testing found package x11 ..." 1>&5
13600 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13601 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13602 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13604 echo "${as_me:-configure}:13604: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13606 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13608 echo "${as_me:-configure}:13608: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13613 cf_new_extra_cppflags=
13615 for cf_add_cflags in $cf_pkgconfig_incs
13617 case $cf_fix_cppflags in
13619 case $cf_add_cflags in
13620 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13621 case $cf_add_cflags in
13623 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13625 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13626 && test -z "${cf_tst_cflags}" \
13627 && cf_fix_cppflags=yes
13629 if test $cf_fix_cppflags = yes ; then
13631 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13632 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13635 elif test "${cf_tst_cflags}" = "\"'" ; then
13637 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13638 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13644 case "$CPPFLAGS" in
13648 case $cf_add_cflags in
13650 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13652 CPPFLAGS=`echo "$CPPFLAGS" | \
13653 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13654 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13659 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13660 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13667 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13668 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13675 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13676 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13678 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13680 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13681 && test -z "${cf_tst_cflags}" \
13682 && cf_fix_cppflags=no
13687 if test -n "$cf_new_cflags" ; then
13689 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13690 CFLAGS="${CFLAGS}$cf_new_cflags"
13694 if test -n "$cf_new_cppflags" ; then
13696 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13697 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13701 if test -n "$cf_new_extra_cppflags" ; then
13703 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13704 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13708 cf_add_libs="$cf_pkgconfig_libs"
13709 # Filter out duplicates - this happens with badly-designed ".pc" files...
13710 for cf_add_1lib in $LIBS
13712 for cf_add_2lib in $cf_add_libs
13714 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13720 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13722 LIBS="$cf_add_libs"
13729 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13731 echo "${as_me:-configure}:13731: testing ...before $LIBS ..." 1>&5
13733 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13734 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13736 echo "${as_me:-configure}:13736: testing ...after $LIBS ..." 1>&5
13744 echo "$as_me:13744: checking for usable X Toolkit package" >&5
13745 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13746 if test "${cf_cv_xt_ice_compat+set}" = set; then
13747 echo $ECHO_N "(cached) $ECHO_C" >&6
13750 cat >conftest.$ac_ext <<_ACEOF
13751 #line 13751 "configure"
13752 #include "confdefs.h"
13754 #include <X11/Shell.h>
13759 int num = IceConnectionNumber(0)
13765 rm -f conftest.$ac_objext conftest$ac_exeext
13766 if { (eval echo "$as_me:13766: \"$ac_link\"") >&5
13767 (eval $ac_link) 2>&5
13769 echo "$as_me:13769: \$? = $ac_status" >&5
13770 (exit $ac_status); } &&
13771 { ac_try='test -s conftest$ac_exeext'
13772 { (eval echo "$as_me:13772: \"$ac_try\"") >&5
13773 (eval $ac_try) 2>&5
13775 echo "$as_me:13775: \$? = $ac_status" >&5
13776 (exit $ac_status); }; }; then
13777 cf_cv_xt_ice_compat=yes
13779 echo "$as_me: failed program was:" >&5
13780 cat conftest.$ac_ext >&5
13781 cf_cv_xt_ice_compat=no
13783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13785 echo "$as_me:13785: result: $cf_cv_xt_ice_compat" >&5
13786 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13788 if test "$cf_cv_xt_ice_compat" = no
13790 # workaround for broken ".pc" files used for X Toolkit.
13791 case "x$X_PRE_LIBS" in
13797 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13799 echo "${as_me:-configure}:13799: testing work around broken ICE dependency ..." 1>&5
13801 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13802 test -n "$verbose" && echo " found package ice" 1>&6
13804 echo "${as_me:-configure}:13804: testing found package ice ..." 1>&5
13806 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13807 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13808 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13810 echo "${as_me:-configure}:13810: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13812 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13814 echo "${as_me:-configure}:13814: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13819 cf_new_extra_cppflags=
13821 for cf_add_cflags in $cf_pkgconfig_incs
13823 case $cf_fix_cppflags in
13825 case $cf_add_cflags in
13826 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13827 case $cf_add_cflags in
13829 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13831 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13832 && test -z "${cf_tst_cflags}" \
13833 && cf_fix_cppflags=yes
13835 if test $cf_fix_cppflags = yes ; then
13837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13841 elif test "${cf_tst_cflags}" = "\"'" ; then
13843 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13844 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13850 case "$CPPFLAGS" in
13854 case $cf_add_cflags in
13856 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13858 CPPFLAGS=`echo "$CPPFLAGS" | \
13859 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13860 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13865 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13866 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13873 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13874 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13881 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13882 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13884 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13886 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13887 && test -z "${cf_tst_cflags}" \
13888 && cf_fix_cppflags=no
13893 if test -n "$cf_new_cflags" ; then
13895 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13896 CFLAGS="${CFLAGS}$cf_new_cflags"
13900 if test -n "$cf_new_cppflags" ; then
13902 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13903 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13907 if test -n "$cf_new_extra_cppflags" ; then
13909 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13910 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13914 cf_add_libs="$cf_pkgconfig_libs"
13915 # Filter out duplicates - this happens with badly-designed ".pc" files...
13916 for cf_add_1lib in $LIBS
13918 for cf_add_2lib in $cf_add_libs
13920 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13926 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13928 LIBS="$cf_add_libs"
13930 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13931 test -n "$verbose" && echo " found package sm" 1>&6
13933 echo "${as_me:-configure}:13933: testing found package sm ..." 1>&5
13935 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13936 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13937 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13939 echo "${as_me:-configure}:13939: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13941 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13943 echo "${as_me:-configure}:13943: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13948 cf_new_extra_cppflags=
13950 for cf_add_cflags in $cf_pkgconfig_incs
13952 case $cf_fix_cppflags in
13954 case $cf_add_cflags in
13955 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13956 case $cf_add_cflags in
13958 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13960 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13961 && test -z "${cf_tst_cflags}" \
13962 && cf_fix_cppflags=yes
13964 if test $cf_fix_cppflags = yes ; then
13966 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13967 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13970 elif test "${cf_tst_cflags}" = "\"'" ; then
13972 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13973 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13979 case "$CPPFLAGS" in
13983 case $cf_add_cflags in
13985 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13987 CPPFLAGS=`echo "$CPPFLAGS" | \
13988 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13989 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13994 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13995 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14002 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14003 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14010 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14011 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14013 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14015 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14016 && test -z "${cf_tst_cflags}" \
14017 && cf_fix_cppflags=no
14022 if test -n "$cf_new_cflags" ; then
14024 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14025 CFLAGS="${CFLAGS}$cf_new_cflags"
14029 if test -n "$cf_new_cppflags" ; then
14031 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14032 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14036 if test -n "$cf_new_extra_cppflags" ; then
14038 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14039 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14043 cf_add_libs="$cf_pkgconfig_libs"
14044 # Filter out duplicates - this happens with badly-designed ".pc" files...
14045 for cf_add_1lib in $LIBS
14047 for cf_add_2lib in $cf_add_libs
14049 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14055 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14057 LIBS="$cf_add_libs"
14070 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14072 echo "${as_me:-configure}:14072: testing ...before $LIBS ..." 1>&5
14074 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14075 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14077 echo "${as_me:-configure}:14077: testing ...after $LIBS ..." 1>&5
14093 LDFLAGS="$X_LIBS $LDFLAGS"
14095 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14097 echo "${as_me:-configure}:14097: testing checking additions to CFLAGS ..." 1>&5
14099 cf_check_cflags="$CFLAGS"
14100 cf_check_cppflags="$CPPFLAGS"
14105 cf_new_extra_cppflags=
14107 for cf_add_cflags in $X_CFLAGS
14109 case $cf_fix_cppflags in
14111 case $cf_add_cflags in
14112 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14113 case $cf_add_cflags in
14115 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14117 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14118 && test -z "${cf_tst_cflags}" \
14119 && cf_fix_cppflags=yes
14121 if test $cf_fix_cppflags = yes ; then
14123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14127 elif test "${cf_tst_cflags}" = "\"'" ; then
14129 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14130 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14136 case "$CPPFLAGS" in
14140 case $cf_add_cflags in
14142 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14144 CPPFLAGS=`echo "$CPPFLAGS" | \
14145 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14146 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14151 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14152 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14159 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14160 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14167 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14168 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14170 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14173 && test -z "${cf_tst_cflags}" \
14174 && cf_fix_cppflags=no
14179 if test -n "$cf_new_cflags" ; then
14180 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14182 echo "${as_me:-configure}:14182: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14184 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14185 CFLAGS="${CFLAGS}$cf_new_cflags"
14189 if test -n "$cf_new_cppflags" ; then
14190 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14192 echo "${as_me:-configure}:14192: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14194 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14195 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14199 if test -n "$cf_new_extra_cppflags" ; then
14200 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14202 echo "${as_me:-configure}:14202: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14204 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14205 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14209 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14210 cat >conftest.$ac_ext <<_ACEOF
14211 #line 14211 "configure"
14212 #include "confdefs.h"
14217 printf("Hello world");
14222 rm -f conftest.$ac_objext conftest$ac_exeext
14223 if { (eval echo "$as_me:14223: \"$ac_link\"") >&5
14224 (eval $ac_link) 2>&5
14226 echo "$as_me:14226: \$? = $ac_status" >&5
14227 (exit $ac_status); } &&
14228 { ac_try='test -s conftest$ac_exeext'
14229 { (eval echo "$as_me:14229: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14232 echo "$as_me:14232: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }; then
14236 echo "$as_me: failed program was:" >&5
14237 cat conftest.$ac_ext >&5
14238 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14240 echo "${as_me:-configure}:14240: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14242 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14243 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14245 echo "${as_me:-configure}:14245: testing but keeping change to \$CPPFLAGS ..." 1>&5
14248 CFLAGS="$cf_check_flags"
14250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14253 echo "$as_me:14253: checking for XOpenDisplay" >&5
14254 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14255 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14256 echo $ECHO_N "(cached) $ECHO_C" >&6
14258 cat >conftest.$ac_ext <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14261 #define XOpenDisplay autoconf_temporary
14262 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14263 #undef XOpenDisplay
14269 /* We use char because int might match the return type of a gcc2
14270 builtin and then its argument prototype would still apply. */
14271 char XOpenDisplay (void);
14277 /* The GNU C library defines stubs for functions which it implements
14278 to always fail with ENOSYS. Some functions are actually named
14279 something starting with __ and the normal name is an alias. */
14280 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14281 #error found stub for XOpenDisplay
14284 return XOpenDisplay ();
14289 rm -f conftest.$ac_objext conftest$ac_exeext
14290 if { (eval echo "$as_me:14290: \"$ac_link\"") >&5
14291 (eval $ac_link) 2>&5
14293 echo "$as_me:14293: \$? = $ac_status" >&5
14294 (exit $ac_status); } &&
14295 { ac_try='test -s conftest$ac_exeext'
14296 { (eval echo "$as_me:14296: \"$ac_try\"") >&5
14297 (eval $ac_try) 2>&5
14299 echo "$as_me:14299: \$? = $ac_status" >&5
14300 (exit $ac_status); }; }; then
14301 ac_cv_func_XOpenDisplay=yes
14303 echo "$as_me: failed program was:" >&5
14304 cat conftest.$ac_ext >&5
14305 ac_cv_func_XOpenDisplay=no
14307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14309 echo "$as_me:14309: result: $ac_cv_func_XOpenDisplay" >&5
14310 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14311 if test $ac_cv_func_XOpenDisplay = yes; then
14315 echo "$as_me:14315: checking for XOpenDisplay in -lX11" >&5
14316 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14317 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14318 echo $ECHO_N "(cached) $ECHO_C" >&6
14320 ac_check_lib_save_LIBS=$LIBS
14321 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14322 cat >conftest.$ac_ext <<_ACEOF
14323 #line 14323 "configure"
14324 #include "confdefs.h"
14326 /* Override any gcc2 internal prototype to avoid an error. */
14330 /* We use char because int might match the return type of a gcc2
14331 builtin and then its argument prototype would still apply. */
14332 char XOpenDisplay ();
14341 rm -f conftest.$ac_objext conftest$ac_exeext
14342 if { (eval echo "$as_me:14342: \"$ac_link\"") >&5
14343 (eval $ac_link) 2>&5
14345 echo "$as_me:14345: \$? = $ac_status" >&5
14346 (exit $ac_status); } &&
14347 { ac_try='test -s conftest$ac_exeext'
14348 { (eval echo "$as_me:14348: \"$ac_try\"") >&5
14349 (eval $ac_try) 2>&5
14351 echo "$as_me:14351: \$? = $ac_status" >&5
14352 (exit $ac_status); }; }; then
14353 ac_cv_lib_X11_XOpenDisplay=yes
14355 echo "$as_me: failed program was:" >&5
14356 cat conftest.$ac_ext >&5
14357 ac_cv_lib_X11_XOpenDisplay=no
14359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14360 LIBS=$ac_check_lib_save_LIBS
14362 echo "$as_me:14362: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14363 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14364 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14366 cf_add_libs="-lX11"
14367 # Filter out duplicates - this happens with badly-designed ".pc" files...
14368 for cf_add_1lib in $LIBS
14370 for cf_add_2lib in $cf_add_libs
14372 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14378 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14380 LIBS="$cf_add_libs"
14386 echo "$as_me:14386: checking for XtAppInitialize" >&5
14387 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14388 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14389 echo $ECHO_N "(cached) $ECHO_C" >&6
14391 cat >conftest.$ac_ext <<_ACEOF
14392 #line 14392 "configure"
14393 #include "confdefs.h"
14394 #define XtAppInitialize autoconf_temporary
14395 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14396 #undef XtAppInitialize
14402 /* We use char because int might match the return type of a gcc2
14403 builtin and then its argument prototype would still apply. */
14404 char XtAppInitialize (void);
14410 /* The GNU C library defines stubs for functions which it implements
14411 to always fail with ENOSYS. Some functions are actually named
14412 something starting with __ and the normal name is an alias. */
14413 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14414 #error found stub for XtAppInitialize
14417 return XtAppInitialize ();
14422 rm -f conftest.$ac_objext conftest$ac_exeext
14423 if { (eval echo "$as_me:14423: \"$ac_link\"") >&5
14424 (eval $ac_link) 2>&5
14426 echo "$as_me:14426: \$? = $ac_status" >&5
14427 (exit $ac_status); } &&
14428 { ac_try='test -s conftest$ac_exeext'
14429 { (eval echo "$as_me:14429: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14432 echo "$as_me:14432: \$? = $ac_status" >&5
14433 (exit $ac_status); }; }; then
14434 ac_cv_func_XtAppInitialize=yes
14436 echo "$as_me: failed program was:" >&5
14437 cat conftest.$ac_ext >&5
14438 ac_cv_func_XtAppInitialize=no
14440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14442 echo "$as_me:14442: result: $ac_cv_func_XtAppInitialize" >&5
14443 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14444 if test $ac_cv_func_XtAppInitialize = yes; then
14448 echo "$as_me:14448: checking for XtAppInitialize in -lXt" >&5
14449 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14450 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14451 echo $ECHO_N "(cached) $ECHO_C" >&6
14453 ac_check_lib_save_LIBS=$LIBS
14454 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14455 cat >conftest.$ac_ext <<_ACEOF
14456 #line 14456 "configure"
14457 #include "confdefs.h"
14459 /* Override any gcc2 internal prototype to avoid an error. */
14463 /* We use char because int might match the return type of a gcc2
14464 builtin and then its argument prototype would still apply. */
14465 char XtAppInitialize ();
14469 XtAppInitialize ();
14474 rm -f conftest.$ac_objext conftest$ac_exeext
14475 if { (eval echo "$as_me:14475: \"$ac_link\"") >&5
14476 (eval $ac_link) 2>&5
14478 echo "$as_me:14478: \$? = $ac_status" >&5
14479 (exit $ac_status); } &&
14480 { ac_try='test -s conftest$ac_exeext'
14481 { (eval echo "$as_me:14481: \"$ac_try\"") >&5
14482 (eval $ac_try) 2>&5
14484 echo "$as_me:14484: \$? = $ac_status" >&5
14485 (exit $ac_status); }; }; then
14486 ac_cv_lib_Xt_XtAppInitialize=yes
14488 echo "$as_me: failed program was:" >&5
14489 cat conftest.$ac_ext >&5
14490 ac_cv_lib_Xt_XtAppInitialize=no
14492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14493 LIBS=$ac_check_lib_save_LIBS
14495 echo "$as_me:14495: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14496 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14497 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14499 cat >>confdefs.h <<\EOF
14500 #define HAVE_LIBXT 1
14504 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14511 if test $cf_have_X_LIBS = no ; then
14512 { echo "$as_me:14512: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14513 test program. You will have to check and add the proper libraries by hand
14515 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14516 test program. You will have to check and add the proper libraries by hand
14517 to makefile." >&2;}
14520 cf_x_athena_root=$cf_x_athena
14523 for cf_path in default \
14524 /usr/contrib/X11R6 \
14525 /usr/contrib/X11R5 \
14529 if test -z "$cf_x_athena_inc" ; then
14530 cf_save="$CPPFLAGS"
14531 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14532 if test $cf_path != default ; then
14533 CPPFLAGS="$cf_save"
14535 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14536 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14538 echo "$as_me:14538: checking for $cf_test in $cf_path" >&5
14539 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14541 echo "$as_me:14541: checking for $cf_test" >&5
14542 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14544 cat >conftest.$ac_ext <<_ACEOF
14545 #line 14545 "configure"
14546 #include "confdefs.h"
14548 #include <X11/Intrinsic.h>
14549 #include <$cf_test>
14558 rm -f conftest.$ac_objext
14559 if { (eval echo "$as_me:14559: \"$ac_compile\"") >&5
14560 (eval $ac_compile) 2>&5
14562 echo "$as_me:14562: \$? = $ac_status" >&5
14563 (exit $ac_status); } &&
14564 { ac_try='test -s conftest.$ac_objext'
14565 { (eval echo "$as_me:14565: \"$ac_try\"") >&5
14566 (eval $ac_try) 2>&5
14568 echo "$as_me:14568: \$? = $ac_status" >&5
14569 (exit $ac_status); }; }; then
14572 echo "$as_me: failed program was:" >&5
14573 cat conftest.$ac_ext >&5
14576 rm -f conftest.$ac_objext conftest.$ac_ext
14577 echo "$as_me:14577: result: $cf_result" >&5
14578 echo "${ECHO_T}$cf_result" >&6
14579 if test "$cf_result" = yes ; then
14580 cf_x_athena_inc=$cf_path
14583 CPPFLAGS="$cf_save"
14588 if test -z "$cf_x_athena_inc" ; then
14589 { echo "$as_me:14589: WARNING: Unable to successfully find Athena header files with test program" >&5
14590 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14591 elif test "$cf_x_athena_inc" != default ; then
14593 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14594 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14598 cf_x_athena_root=$cf_x_athena
14601 for cf_path in default \
14602 /usr/contrib/X11R6 \
14603 /usr/contrib/X11R5 \
14608 ${cf_x_athena_root} \
14609 ${cf_x_athena_root}7 \
14610 ${cf_x_athena_root}6
14613 "-l$cf_lib -lXmu" \
14614 "-l$cf_lib -lXpm -lXmu" \
14615 "-l${cf_lib}_s -lXmu_s"
14617 if test -z "$cf_x_athena_lib" ; then
14619 cf_test=XawSimpleMenuAddGlobalActions
14620 if test $cf_path != default ; then
14622 cf_add_libs="-L$cf_path/lib $cf_libs"
14623 # Filter out duplicates - this happens with badly-designed ".pc" files...
14624 for cf_add_1lib in $LIBS
14626 for cf_add_2lib in $cf_add_libs
14628 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14634 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14636 LIBS="$cf_add_libs"
14638 echo "$as_me:14638: checking for $cf_libs in $cf_path" >&5
14639 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14642 cf_add_libs="$cf_libs"
14643 # Filter out duplicates - this happens with badly-designed ".pc" files...
14644 for cf_add_1lib in $LIBS
14646 for cf_add_2lib in $cf_add_libs
14648 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14654 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14656 LIBS="$cf_add_libs"
14658 echo "$as_me:14658: checking for $cf_test in $cf_libs" >&5
14659 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14661 cat >conftest.$ac_ext <<_ACEOF
14662 #line 14662 "configure"
14663 #include "confdefs.h"
14665 #include <X11/Intrinsic.h>
14666 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14672 $cf_test((XtAppContext) 0)
14677 rm -f conftest.$ac_objext conftest$ac_exeext
14678 if { (eval echo "$as_me:14678: \"$ac_link\"") >&5
14679 (eval $ac_link) 2>&5
14681 echo "$as_me:14681: \$? = $ac_status" >&5
14682 (exit $ac_status); } &&
14683 { ac_try='test -s conftest$ac_exeext'
14684 { (eval echo "$as_me:14684: \"$ac_try\"") >&5
14685 (eval $ac_try) 2>&5
14687 echo "$as_me:14687: \$? = $ac_status" >&5
14688 (exit $ac_status); }; }; then
14691 echo "$as_me: failed program was:" >&5
14692 cat conftest.$ac_ext >&5
14695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14696 echo "$as_me:14696: result: $cf_result" >&5
14697 echo "${ECHO_T}$cf_result" >&6
14698 if test "$cf_result" = yes ; then
14699 cf_x_athena_lib="$cf_libs"
14705 test -n "$cf_x_athena_lib" && break
14709 if test -z "$cf_x_athena_lib" ; then
14710 { { echo "$as_me:14710: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14711 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14712 { (exit 1); exit 1; }; }
14715 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14717 cat >>confdefs.h <<EOF
14718 #define $cf_x_athena_LIBS 1
14723 if test -n "$ac_tool_prefix"; then
14724 for ac_prog in xcurses-config
14726 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14727 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14728 echo "$as_me:14728: checking for $ac_word" >&5
14729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14730 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14731 echo $ECHO_N "(cached) $ECHO_C" >&6
14733 if test -n "$XCURSES_CONFIG"; then
14734 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14736 ac_save_IFS=$IFS; IFS=$ac_path_separator
14738 for ac_dir in $ac_dummy; do
14740 test -z "$ac_dir" && ac_dir=.
14741 $as_executable_p "$ac_dir/$ac_word" || continue
14742 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14743 echo "$as_me:14743: found $ac_dir/$ac_word" >&5
14749 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14750 if test -n "$XCURSES_CONFIG"; then
14751 echo "$as_me:14751: result: $XCURSES_CONFIG" >&5
14752 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14754 echo "$as_me:14754: result: no" >&5
14755 echo "${ECHO_T}no" >&6
14758 test -n "$XCURSES_CONFIG" && break
14761 if test -z "$XCURSES_CONFIG"; then
14762 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14763 for ac_prog in xcurses-config
14765 # Extract the first word of "$ac_prog", so it can be a program name with args.
14766 set dummy $ac_prog; ac_word=$2
14767 echo "$as_me:14767: checking for $ac_word" >&5
14768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14769 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
14772 if test -n "$ac_ct_XCURSES_CONFIG"; then
14773 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14775 ac_save_IFS=$IFS; IFS=$ac_path_separator
14777 for ac_dir in $ac_dummy; do
14779 test -z "$ac_dir" && ac_dir=.
14780 $as_executable_p "$ac_dir/$ac_word" || continue
14781 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14782 echo "$as_me:14782: found $ac_dir/$ac_word" >&5
14788 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14789 if test -n "$ac_ct_XCURSES_CONFIG"; then
14790 echo "$as_me:14790: result: $ac_ct_XCURSES_CONFIG" >&5
14791 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14793 echo "$as_me:14793: result: no" >&5
14794 echo "${ECHO_T}no" >&6
14797 test -n "$ac_ct_XCURSES_CONFIG" && break
14799 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14801 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14804 if test "$XCURSES_CONFIG" != none ; then
14809 cf_new_extra_cppflags=
14811 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14813 case $cf_fix_cppflags in
14815 case $cf_add_cflags in
14816 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14817 case $cf_add_cflags in
14819 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14822 && test -z "${cf_tst_cflags}" \
14823 && cf_fix_cppflags=yes
14825 if test $cf_fix_cppflags = yes ; then
14827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14831 elif test "${cf_tst_cflags}" = "\"'" ; then
14833 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14834 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14840 case "$CPPFLAGS" in
14844 case $cf_add_cflags in
14846 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14848 CPPFLAGS=`echo "$CPPFLAGS" | \
14849 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14850 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14855 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14856 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14863 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14864 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14874 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14876 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14877 && test -z "${cf_tst_cflags}" \
14878 && cf_fix_cppflags=no
14883 if test -n "$cf_new_cflags" ; then
14885 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14886 CFLAGS="${CFLAGS}$cf_new_cflags"
14890 if test -n "$cf_new_cppflags" ; then
14892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14893 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14897 if test -n "$cf_new_extra_cppflags" ; then
14899 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14900 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14904 cf_add_libs="`$XCURSES_CONFIG --libs`"
14905 # Filter out duplicates - this happens with badly-designed ".pc" files...
14906 for cf_add_1lib in $LIBS
14908 for cf_add_2lib in $cf_add_libs
14910 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14916 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14918 LIBS="$cf_add_libs"
14920 cf_cv_lib_XCurses=yes
14924 LDFLAGS="$LDFLAGS $X_LIBS"
14926 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14928 echo "${as_me:-configure}:14928: testing checking additions to CFLAGS ..." 1>&5
14930 cf_check_cflags="$CFLAGS"
14931 cf_check_cppflags="$CPPFLAGS"
14936 cf_new_extra_cppflags=
14938 for cf_add_cflags in $X_CFLAGS
14940 case $cf_fix_cppflags in
14942 case $cf_add_cflags in
14943 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14944 case $cf_add_cflags in
14946 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14948 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14949 && test -z "${cf_tst_cflags}" \
14950 && cf_fix_cppflags=yes
14952 if test $cf_fix_cppflags = yes ; then
14954 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14955 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14958 elif test "${cf_tst_cflags}" = "\"'" ; then
14960 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14961 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14967 case "$CPPFLAGS" in
14971 case $cf_add_cflags in
14973 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14975 CPPFLAGS=`echo "$CPPFLAGS" | \
14976 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14977 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14982 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14983 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14990 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14991 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14998 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14999 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15001 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15004 && test -z "${cf_tst_cflags}" \
15005 && cf_fix_cppflags=no
15010 if test -n "$cf_new_cflags" ; then
15011 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15013 echo "${as_me:-configure}:15013: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15015 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15016 CFLAGS="${CFLAGS}$cf_new_cflags"
15020 if test -n "$cf_new_cppflags" ; then
15021 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15023 echo "${as_me:-configure}:15023: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15025 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15026 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15030 if test -n "$cf_new_extra_cppflags" ; then
15031 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15033 echo "${as_me:-configure}:15033: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15035 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15036 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15040 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15041 cat >conftest.$ac_ext <<_ACEOF
15042 #line 15042 "configure"
15043 #include "confdefs.h"
15048 printf("Hello world");
15053 rm -f conftest.$ac_objext conftest$ac_exeext
15054 if { (eval echo "$as_me:15054: \"$ac_link\"") >&5
15055 (eval $ac_link) 2>&5
15057 echo "$as_me:15057: \$? = $ac_status" >&5
15058 (exit $ac_status); } &&
15059 { ac_try='test -s conftest$ac_exeext'
15060 { (eval echo "$as_me:15060: \"$ac_try\"") >&5
15061 (eval $ac_try) 2>&5
15063 echo "$as_me:15063: \$? = $ac_status" >&5
15064 (exit $ac_status); }; }; then
15067 echo "$as_me: failed program was:" >&5
15068 cat conftest.$ac_ext >&5
15069 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15071 echo "${as_me:-configure}:15071: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15073 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15074 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15076 echo "${as_me:-configure}:15076: testing but keeping change to \$CPPFLAGS ..." 1>&5
15079 CFLAGS="$cf_check_flags"
15081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15084 echo "$as_me:15084: checking for XOpenDisplay in -lX11" >&5
15085 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15086 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15087 echo $ECHO_N "(cached) $ECHO_C" >&6
15089 ac_check_lib_save_LIBS=$LIBS
15090 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15091 cat >conftest.$ac_ext <<_ACEOF
15092 #line 15092 "configure"
15093 #include "confdefs.h"
15095 /* Override any gcc2 internal prototype to avoid an error. */
15099 /* We use char because int might match the return type of a gcc2
15100 builtin and then its argument prototype would still apply. */
15101 char XOpenDisplay ();
15110 rm -f conftest.$ac_objext conftest$ac_exeext
15111 if { (eval echo "$as_me:15111: \"$ac_link\"") >&5
15112 (eval $ac_link) 2>&5
15114 echo "$as_me:15114: \$? = $ac_status" >&5
15115 (exit $ac_status); } &&
15116 { ac_try='test -s conftest$ac_exeext'
15117 { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118 (eval $ac_try) 2>&5
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit $ac_status); }; }; then
15122 ac_cv_lib_X11_XOpenDisplay=yes
15124 echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 ac_cv_lib_X11_XOpenDisplay=no
15128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15129 LIBS=$ac_check_lib_save_LIBS
15131 echo "$as_me:15131: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15132 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15133 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15135 cf_add_libs="-lX11"
15136 # Filter out duplicates - this happens with badly-designed ".pc" files...
15137 for cf_add_1lib in $LIBS
15139 for cf_add_2lib in $cf_add_libs
15141 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15147 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15149 LIBS="$cf_add_libs"
15153 echo "$as_me:15153: checking for XCurses library" >&5
15154 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15155 if test "${cf_cv_lib_XCurses+set}" = set; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15159 cf_add_libs="-lXCurses"
15160 # Filter out duplicates - this happens with badly-designed ".pc" files...
15161 for cf_add_1lib in $LIBS
15163 for cf_add_2lib in $cf_add_libs
15165 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15171 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15173 LIBS="$cf_add_libs"
15175 cat >conftest.$ac_ext <<_ACEOF
15176 #line 15176 "configure"
15177 #include "confdefs.h"
15179 #include <xcurses.h>
15180 char *XCursesProgramName = "test";
15190 rm -f conftest.$ac_objext conftest$ac_exeext
15191 if { (eval echo "$as_me:15191: \"$ac_link\"") >&5
15192 (eval $ac_link) 2>&5
15194 echo "$as_me:15194: \$? = $ac_status" >&5
15195 (exit $ac_status); } &&
15196 { ac_try='test -s conftest$ac_exeext'
15197 { (eval echo "$as_me:15197: \"$ac_try\"") >&5
15198 (eval $ac_try) 2>&5
15200 echo "$as_me:15200: \$? = $ac_status" >&5
15201 (exit $ac_status); }; }; then
15202 cf_cv_lib_XCurses=yes
15204 echo "$as_me: failed program was:" >&5
15205 cat conftest.$ac_ext >&5
15206 cf_cv_lib_XCurses=no
15208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15211 echo "$as_me:15211: result: $cf_cv_lib_XCurses" >&5
15212 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15216 if test $cf_cv_lib_XCurses = yes ; then
15218 cat >>confdefs.h <<\EOF
15222 cat >>confdefs.h <<\EOF
15226 echo "$as_me:15226: checking for xcurses.h" >&5
15227 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15228 if test "${ac_cv_header_xcurses_h+set}" = set; then
15229 echo $ECHO_N "(cached) $ECHO_C" >&6
15231 cat >conftest.$ac_ext <<_ACEOF
15232 #line 15232 "configure"
15233 #include "confdefs.h"
15234 #include <xcurses.h>
15236 if { (eval echo "$as_me:15236: \"$ac_cpp conftest.$ac_ext\"") >&5
15237 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15239 egrep -v '^ *\+' conftest.er1 >conftest.err
15241 cat conftest.err >&5
15242 echo "$as_me:15242: \$? = $ac_status" >&5
15243 (exit $ac_status); } >/dev/null; then
15244 if test -s conftest.err; then
15245 ac_cpp_err=$ac_c_preproc_warn_flag
15252 if test -z "$ac_cpp_err"; then
15253 ac_cv_header_xcurses_h=yes
15255 echo "$as_me: failed program was:" >&5
15256 cat conftest.$ac_ext >&5
15257 ac_cv_header_xcurses_h=no
15259 rm -f conftest.err conftest.$ac_ext
15261 echo "$as_me:15261: result: $ac_cv_header_xcurses_h" >&5
15262 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15263 if test $ac_cv_header_xcurses_h = yes; then
15265 cat >>confdefs.h <<\EOF
15266 #define HAVE_XCURSES 1
15272 { { echo "$as_me:15272: error: Cannot link with XCurses" >&5
15273 echo "$as_me: error: Cannot link with XCurses" >&2;}
15274 { (exit 1); exit 1; }; }
15279 { { echo "$as_me:15279: error: unexpected screen-value: $cf_cv_screen" >&5
15280 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15281 { (exit 1); exit 1; }; }
15285 : ${cf_nculib_root:=$cf_cv_screen}
15286 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15287 echo "$as_me:15287: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15288 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15289 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15290 echo $ECHO_N "(cached) $ECHO_C" >&6
15292 ac_check_lib_save_LIBS=$LIBS
15293 LIBS="-l$cf_nculib_root $LIBS"
15294 cat >conftest.$ac_ext <<_ACEOF
15295 #line 15295 "configure"
15296 #include "confdefs.h"
15298 /* Override any gcc2 internal prototype to avoid an error. */
15302 /* We use char because int might match the return type of a gcc2
15303 builtin and then its argument prototype would still apply. */
15304 char _nc_init_pthreads ();
15308 _nc_init_pthreads ();
15313 rm -f conftest.$ac_objext conftest$ac_exeext
15314 if { (eval echo "$as_me:15314: \"$ac_link\"") >&5
15315 (eval $ac_link) 2>&5
15317 echo "$as_me:15317: \$? = $ac_status" >&5
15318 (exit $ac_status); } &&
15319 { ac_try='test -s conftest$ac_exeext'
15320 { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15321 (eval $ac_try) 2>&5
15323 echo "$as_me:15323: \$? = $ac_status" >&5
15324 (exit $ac_status); }; }; then
15325 eval "$as_ac_Lib=yes"
15327 echo "$as_me: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15329 eval "$as_ac_Lib=no"
15331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15332 LIBS=$ac_check_lib_save_LIBS
15334 echo "$as_me:15334: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15335 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15336 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15337 cf_cv_ncurses_pthreads=yes
15339 cf_cv_ncurses_pthreads=no
15342 if test "$cf_cv_ncurses_pthreads" = yes
15345 cf_add_libs="-lpthread"
15346 # Filter out duplicates - this happens with badly-designed ".pc" files...
15347 for cf_add_1lib in $LIBS
15349 for cf_add_2lib in $cf_add_libs
15351 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15359 LIBS="$cf_add_libs"
15363 case $cf_cv_screen in
15365 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15369 echo "$as_me:15369: checking for X11 rgb file" >&5
15370 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15372 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15373 if test "${with_x11_rgb+set}" = set; then
15374 withval="$with_x11_rgb"
15380 if test "x$RGB_PATH" = xauto
15382 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15384 /opt/local/share/X11/rgb.txt \
15385 /opt/X11/share/X11/rgb.txt \
15386 /usr/share/X11/rgb.txt \
15387 /usr/X11/share/X11/rgb.txt \
15388 /usr/X11/lib/X11/rgb.txt \
15389 /usr/lib/X11/rgb.txt \
15391 /usr/pkg/lib/X11/rgb.txt \
15392 /usr/X11R7/lib/X11/rgb.txt \
15393 /usr/X11R6/lib/X11/rgb.txt \
15394 /usr/X11R5/lib/X11/rgb.txt \
15395 /usr/X11R4/lib/X11/rgb.txt \
15396 /usr/local/lib/X11/rgb.txt \
15397 /usr/local/share/X11/rgb.txt \
15398 /usr/lib64/X11/rgb.txt
15400 if test -f "$cf_path" ; then
15401 RGB_PATH="$cf_path"
15408 if test "x$prefix" != xNONE; then
15409 cf_path_syntax="$prefix"
15411 cf_path_syntax="$ac_default_prefix"
15414 case ".$cf_path" in
15415 (.\$\(*\)*|.\'*\'*)
15419 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15421 (.\${*prefix}*|.\${*dir}*)
15422 eval cf_path="$cf_path"
15423 case ".$cf_path" in
15425 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15430 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15433 { { echo "$as_me:15433: error: expected a pathname, not \"$cf_path\"" >&5
15434 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15435 { (exit 1); exit 1; }; }
15441 echo "$as_me:15441: result: $RGB_PATH" >&5
15442 echo "${ECHO_T}$RGB_PATH" >&6
15444 cat >>confdefs.h <<EOF
15445 #define RGB_PATH "$cf_path"
15449 if test "$RGB_PATH" = no
15456 case $cf_cv_screen in
15458 cf_default_panel=no
15461 cf_default_tinfo=no
15463 (xcurses|bsdcurses)
15464 cf_default_panel=no
15467 cf_default_tinfo=yes
15470 cf_default_panel=yes
15471 cf_default_form=yes
15472 cf_default_menu=yes
15473 cf_default_tinfo=yes
15474 case $cf_cv_screen in
15476 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15482 echo "$as_me:15482: checking if you want to check for panel functions" >&5
15483 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15485 # Check whether --enable-panel or --disable-panel was given.
15486 if test "${enable_panel+set}" = set; then
15487 enableval="$enable_panel"
15488 test "$enableval" != no && enableval=yes
15489 if test "$enableval" != "yes" ; then
15492 cf_enable_panel=$cf_default_panel
15496 cf_enable_panel=$cf_default_panel
15499 echo "$as_me:15499: result: $cf_enable_panel" >&5
15500 echo "${ECHO_T}$cf_enable_panel" >&6
15501 if test $cf_enable_panel = yes
15504 cf_have_curses_lib=no
15506 : ${NCURSES_CONFIG_PKG:=none}
15507 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15509 elif test "x${PKG_CONFIG:=none}" != xnone; then
15510 echo "$as_me:15510: checking pkg-config for panel$cf_cv_libtype" >&5
15511 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15512 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15513 echo "$as_me:15513: result: yes" >&5
15514 echo "${ECHO_T}yes" >&6
15516 echo "$as_me:15516: checking if the panel$cf_cv_libtype package files work" >&5
15517 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15519 cf_save_CPPFLAGS="$CPPFLAGS"
15520 cf_save_LIBS="$LIBS"
15525 cf_new_extra_cppflags=
15527 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15529 case $cf_fix_cppflags in
15531 case $cf_add_cflags in
15532 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15533 case $cf_add_cflags in
15535 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15537 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15538 && test -z "${cf_tst_cflags}" \
15539 && cf_fix_cppflags=yes
15541 if test $cf_fix_cppflags = yes ; then
15543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15547 elif test "${cf_tst_cflags}" = "\"'" ; then
15549 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15550 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15556 case "$CPPFLAGS" in
15560 case $cf_add_cflags in
15562 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15564 CPPFLAGS=`echo "$CPPFLAGS" | \
15565 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15566 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15571 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15572 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15579 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15580 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15587 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15588 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15590 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15592 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15593 && test -z "${cf_tst_cflags}" \
15594 && cf_fix_cppflags=no
15599 if test -n "$cf_new_cflags" ; then
15601 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15602 CFLAGS="${CFLAGS}$cf_new_cflags"
15606 if test -n "$cf_new_cppflags" ; then
15608 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15609 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15613 if test -n "$cf_new_extra_cppflags" ; then
15615 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15616 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15620 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15621 # Filter out duplicates - this happens with badly-designed ".pc" files...
15622 for cf_add_1lib in $LIBS
15624 for cf_add_2lib in $cf_add_libs
15626 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15632 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15634 LIBS="$cf_add_libs"
15636 cat >conftest.$ac_ext <<_ACEOF
15637 #line 15637 "configure"
15638 #include "confdefs.h"
15643 (void) new_panel ( 0 );
15648 rm -f conftest.$ac_objext conftest$ac_exeext
15649 if { (eval echo "$as_me:15649: \"$ac_link\"") >&5
15650 (eval $ac_link) 2>&5
15652 echo "$as_me:15652: \$? = $ac_status" >&5
15653 (exit $ac_status); } &&
15654 { ac_try='test -s conftest$ac_exeext'
15655 { (eval echo "$as_me:15655: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15658 echo "$as_me:15658: \$? = $ac_status" >&5
15659 (exit $ac_status); }; }; then
15660 if test "$cross_compiling" = yes; then
15661 cf_have_curses_lib=maybe
15663 cat >conftest.$ac_ext <<_ACEOF
15664 #line 15664 "configure"
15665 #include "confdefs.h"
15668 { (void) new_panel ( 0 ); return 0; }
15670 rm -f conftest$ac_exeext
15671 if { (eval echo "$as_me:15671: \"$ac_link\"") >&5
15672 (eval $ac_link) 2>&5
15674 echo "$as_me:15674: \$? = $ac_status" >&5
15675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15676 { (eval echo "$as_me:15676: \"$ac_try\"") >&5
15677 (eval $ac_try) 2>&5
15679 echo "$as_me:15679: \$? = $ac_status" >&5
15680 (exit $ac_status); }; }; then
15681 cf_have_curses_lib=yes
15683 echo "$as_me: program exited with status $ac_status" >&5
15684 echo "$as_me: failed program was:" >&5
15685 cat conftest.$ac_ext >&5
15686 cf_have_curses_lib=no
15688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15691 echo "$as_me: failed program was:" >&5
15692 cat conftest.$ac_ext >&5
15693 cf_have_curses_lib=no
15695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15696 echo "$as_me:15696: result: $cf_have_curses_lib" >&5
15697 echo "${ECHO_T}$cf_have_curses_lib" >&6
15698 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15699 if test "$cf_have_curses_lib" != "yes"
15701 CPPFLAGS="$cf_save_CPPFLAGS"
15702 LIBS="$cf_save_LIBS"
15705 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15707 cat >>confdefs.h <<EOF
15708 #define $cf_upper 1
15714 if test "$cf_have_curses_lib" = no; then
15715 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15716 echo "$as_me:15716: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15717 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15718 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15719 echo $ECHO_N "(cached) $ECHO_C" >&6
15721 ac_check_lib_save_LIBS=$LIBS
15722 LIBS="-lpanel$cf_cv_libtype $LIBS"
15723 cat >conftest.$ac_ext <<_ACEOF
15724 #line 15724 "configure"
15725 #include "confdefs.h"
15727 /* Override any gcc2 internal prototype to avoid an error. */
15731 /* We use char because int might match the return type of a gcc2
15732 builtin and then its argument prototype would still apply. */
15742 rm -f conftest.$ac_objext conftest$ac_exeext
15743 if { (eval echo "$as_me:15743: \"$ac_link\"") >&5
15744 (eval $ac_link) 2>&5
15746 echo "$as_me:15746: \$? = $ac_status" >&5
15747 (exit $ac_status); } &&
15748 { ac_try='test -s conftest$ac_exeext'
15749 { (eval echo "$as_me:15749: \"$ac_try\"") >&5
15750 (eval $ac_try) 2>&5
15752 echo "$as_me:15752: \$? = $ac_status" >&5
15753 (exit $ac_status); }; }; then
15754 eval "$as_ac_Lib=yes"
15756 echo "$as_me: failed program was:" >&5
15757 cat conftest.$ac_ext >&5
15758 eval "$as_ac_Lib=no"
15760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15761 LIBS=$ac_check_lib_save_LIBS
15763 echo "$as_me:15763: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15764 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15765 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15767 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15769 cf_add_libs="-lpanel$cf_cv_libtype"
15770 # Filter out duplicates - this happens with badly-designed ".pc" files...
15771 for cf_add_1lib in $LIBS
15773 for cf_add_2lib in $cf_add_libs
15775 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15781 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15783 LIBS="$cf_add_libs"
15785 cat >>confdefs.h <<EOF
15786 #define $cf_upper 1
15793 cf_curses_headers="$cf_curses_headers panel.h"
15796 echo "$as_me:15796: checking if you want to check for menu functions" >&5
15797 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15799 # Check whether --enable-menu or --disable-menu was given.
15800 if test "${enable_menu+set}" = set; then
15801 enableval="$enable_menu"
15802 test "$enableval" != no && enableval=yes
15803 if test "$enableval" != "yes" ; then
15806 cf_enable_menu=$cf_default_menu
15810 cf_enable_menu=$cf_default_menu
15813 echo "$as_me:15813: result: $cf_enable_menu" >&5
15814 echo "${ECHO_T}$cf_enable_menu" >&6
15815 if test $cf_enable_menu = yes
15817 case $cf_cv_screen in
15822 echo "$as_me:15822: checking for NetBSD menu.h" >&5
15823 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15824 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15825 echo $ECHO_N "(cached) $ECHO_C" >&6
15828 cat >conftest.$ac_ext <<_ACEOF
15829 #line 15829 "configure"
15830 #include "confdefs.h"
15832 #include <${cf_cv_ncurses_header:-curses.h}>
15840 int y = menu->max_item_width;
15846 rm -f conftest.$ac_objext
15847 if { (eval echo "$as_me:15847: \"$ac_compile\"") >&5
15848 (eval $ac_compile) 2>&5
15850 echo "$as_me:15850: \$? = $ac_status" >&5
15851 (exit $ac_status); } &&
15852 { ac_try='test -s conftest.$ac_objext'
15853 { (eval echo "$as_me:15853: \"$ac_try\"") >&5
15854 (eval $ac_try) 2>&5
15856 echo "$as_me:15856: \$? = $ac_status" >&5
15857 (exit $ac_status); }; }; then
15858 cf_cv_netbsd_menu_h=yes
15861 echo "$as_me: failed program was:" >&5
15862 cat conftest.$ac_ext >&5
15863 cf_cv_netbsd_menu_h=no
15865 rm -f conftest.$ac_objext conftest.$ac_ext
15868 echo "$as_me:15868: result: $cf_cv_netbsd_menu_h" >&5
15869 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15871 test "$cf_cv_netbsd_menu_h" = yes &&
15872 cat >>confdefs.h <<\EOF
15873 #define HAVE_NETBSD_MENU_H 1
15879 cf_have_curses_lib=no
15881 : ${NCURSES_CONFIG_PKG:=none}
15882 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15884 elif test "x${PKG_CONFIG:=none}" != xnone; then
15885 echo "$as_me:15885: checking pkg-config for menu$cf_cv_libtype" >&5
15886 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15887 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15888 echo "$as_me:15888: result: yes" >&5
15889 echo "${ECHO_T}yes" >&6
15891 echo "$as_me:15891: checking if the menu$cf_cv_libtype package files work" >&5
15892 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
15894 cf_save_CPPFLAGS="$CPPFLAGS"
15895 cf_save_LIBS="$LIBS"
15900 cf_new_extra_cppflags=
15902 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
15904 case $cf_fix_cppflags in
15906 case $cf_add_cflags in
15907 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15908 case $cf_add_cflags in
15910 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15912 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15913 && test -z "${cf_tst_cflags}" \
15914 && cf_fix_cppflags=yes
15916 if test $cf_fix_cppflags = yes ; then
15918 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15919 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15922 elif test "${cf_tst_cflags}" = "\"'" ; then
15924 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15925 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15931 case "$CPPFLAGS" in
15935 case $cf_add_cflags in
15937 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15939 CPPFLAGS=`echo "$CPPFLAGS" | \
15940 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15941 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15946 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15947 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15954 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15955 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15965 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15967 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15968 && test -z "${cf_tst_cflags}" \
15969 && cf_fix_cppflags=no
15974 if test -n "$cf_new_cflags" ; then
15976 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15977 CFLAGS="${CFLAGS}$cf_new_cflags"
15981 if test -n "$cf_new_cppflags" ; then
15983 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15984 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15988 if test -n "$cf_new_extra_cppflags" ; then
15990 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15991 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15995 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
15996 # Filter out duplicates - this happens with badly-designed ".pc" files...
15997 for cf_add_1lib in $LIBS
15999 for cf_add_2lib in $cf_add_libs
16001 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16007 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16009 LIBS="$cf_add_libs"
16011 cat >conftest.$ac_ext <<_ACEOF
16012 #line 16012 "configure"
16013 #include "confdefs.h"
16018 (void) menu_driver ( 0,0 );
16023 rm -f conftest.$ac_objext conftest$ac_exeext
16024 if { (eval echo "$as_me:16024: \"$ac_link\"") >&5
16025 (eval $ac_link) 2>&5
16027 echo "$as_me:16027: \$? = $ac_status" >&5
16028 (exit $ac_status); } &&
16029 { ac_try='test -s conftest$ac_exeext'
16030 { (eval echo "$as_me:16030: \"$ac_try\"") >&5
16031 (eval $ac_try) 2>&5
16033 echo "$as_me:16033: \$? = $ac_status" >&5
16034 (exit $ac_status); }; }; then
16035 if test "$cross_compiling" = yes; then
16036 cf_have_curses_lib=maybe
16038 cat >conftest.$ac_ext <<_ACEOF
16039 #line 16039 "configure"
16040 #include "confdefs.h"
16043 { (void) menu_driver ( 0,0 ); return 0; }
16045 rm -f conftest$ac_exeext
16046 if { (eval echo "$as_me:16046: \"$ac_link\"") >&5
16047 (eval $ac_link) 2>&5
16049 echo "$as_me:16049: \$? = $ac_status" >&5
16050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16051 { (eval echo "$as_me:16051: \"$ac_try\"") >&5
16052 (eval $ac_try) 2>&5
16054 echo "$as_me:16054: \$? = $ac_status" >&5
16055 (exit $ac_status); }; }; then
16056 cf_have_curses_lib=yes
16058 echo "$as_me: program exited with status $ac_status" >&5
16059 echo "$as_me: failed program was:" >&5
16060 cat conftest.$ac_ext >&5
16061 cf_have_curses_lib=no
16063 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16066 echo "$as_me: failed program was:" >&5
16067 cat conftest.$ac_ext >&5
16068 cf_have_curses_lib=no
16070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16071 echo "$as_me:16071: result: $cf_have_curses_lib" >&5
16072 echo "${ECHO_T}$cf_have_curses_lib" >&6
16073 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16074 if test "$cf_have_curses_lib" != "yes"
16076 CPPFLAGS="$cf_save_CPPFLAGS"
16077 LIBS="$cf_save_LIBS"
16080 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16082 cat >>confdefs.h <<EOF
16083 #define $cf_upper 1
16089 if test "$cf_have_curses_lib" = no; then
16090 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16091 echo "$as_me:16091: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16092 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16093 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16094 echo $ECHO_N "(cached) $ECHO_C" >&6
16096 ac_check_lib_save_LIBS=$LIBS
16097 LIBS="-lmenu$cf_cv_libtype $LIBS"
16098 cat >conftest.$ac_ext <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16102 /* Override any gcc2 internal prototype to avoid an error. */
16106 /* We use char because int might match the return type of a gcc2
16107 builtin and then its argument prototype would still apply. */
16108 char menu_driver ();
16117 rm -f conftest.$ac_objext conftest$ac_exeext
16118 if { (eval echo "$as_me:16118: \"$ac_link\"") >&5
16119 (eval $ac_link) 2>&5
16121 echo "$as_me:16121: \$? = $ac_status" >&5
16122 (exit $ac_status); } &&
16123 { ac_try='test -s conftest$ac_exeext'
16124 { (eval echo "$as_me:16124: \"$ac_try\"") >&5
16125 (eval $ac_try) 2>&5
16127 echo "$as_me:16127: \$? = $ac_status" >&5
16128 (exit $ac_status); }; }; then
16129 eval "$as_ac_Lib=yes"
16131 echo "$as_me: failed program was:" >&5
16132 cat conftest.$ac_ext >&5
16133 eval "$as_ac_Lib=no"
16135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16136 LIBS=$ac_check_lib_save_LIBS
16138 echo "$as_me:16138: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16139 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16140 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16142 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16144 cf_add_libs="-lmenu$cf_cv_libtype"
16145 # Filter out duplicates - this happens with badly-designed ".pc" files...
16146 for cf_add_1lib in $LIBS
16148 for cf_add_2lib in $cf_add_libs
16150 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16156 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16158 LIBS="$cf_add_libs"
16160 cat >>confdefs.h <<EOF
16161 #define $cf_upper 1
16168 cf_curses_headers="$cf_curses_headers menu.h"
16171 echo "$as_me:16171: checking if you want to check for form functions" >&5
16172 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16174 # Check whether --enable-form or --disable-form was given.
16175 if test "${enable_form+set}" = set; then
16176 enableval="$enable_form"
16177 test "$enableval" != no && enableval=yes
16178 if test "$enableval" != "yes" ; then
16181 cf_enable_form=$cf_default_form
16185 cf_enable_form=$cf_default_form
16188 echo "$as_me:16188: result: $cf_enable_form" >&5
16189 echo "${ECHO_T}$cf_enable_form" >&6
16190 if test $cf_enable_form = yes
16192 case $cf_cv_screen in
16197 echo "$as_me:16197: checking for NetBSD form.h" >&5
16198 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16199 if test "${cf_cv_netbsd_form_h+set}" = set; then
16200 echo $ECHO_N "(cached) $ECHO_C" >&6
16203 cat >conftest.$ac_ext <<_ACEOF
16204 #line 16204 "configure"
16205 #include "confdefs.h"
16207 #include <${cf_cv_ncurses_header:-curses.h}>
16215 int y = current_field(form)->cursor_ypos;
16216 int x = current_field(form)->cursor_xpos;
16222 rm -f conftest.$ac_objext
16223 if { (eval echo "$as_me:16223: \"$ac_compile\"") >&5
16224 (eval $ac_compile) 2>&5
16226 echo "$as_me:16226: \$? = $ac_status" >&5
16227 (exit $ac_status); } &&
16228 { ac_try='test -s conftest.$ac_objext'
16229 { (eval echo "$as_me:16229: \"$ac_try\"") >&5
16230 (eval $ac_try) 2>&5
16232 echo "$as_me:16232: \$? = $ac_status" >&5
16233 (exit $ac_status); }; }; then
16234 cf_cv_netbsd_form_h=yes
16237 echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 cf_cv_netbsd_form_h=no
16241 rm -f conftest.$ac_objext conftest.$ac_ext
16244 echo "$as_me:16244: result: $cf_cv_netbsd_form_h" >&5
16245 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16247 test "$cf_cv_netbsd_form_h" = yes &&
16248 cat >>confdefs.h <<\EOF
16249 #define HAVE_NETBSD_FORM_H 1
16255 cf_have_curses_lib=no
16257 : ${NCURSES_CONFIG_PKG:=none}
16258 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16260 elif test "x${PKG_CONFIG:=none}" != xnone; then
16261 echo "$as_me:16261: checking pkg-config for form$cf_cv_libtype" >&5
16262 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16263 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16264 echo "$as_me:16264: result: yes" >&5
16265 echo "${ECHO_T}yes" >&6
16267 echo "$as_me:16267: checking if the form$cf_cv_libtype package files work" >&5
16268 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16270 cf_save_CPPFLAGS="$CPPFLAGS"
16271 cf_save_LIBS="$LIBS"
16276 cf_new_extra_cppflags=
16278 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16280 case $cf_fix_cppflags in
16282 case $cf_add_cflags in
16283 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16284 case $cf_add_cflags in
16286 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16288 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16289 && test -z "${cf_tst_cflags}" \
16290 && cf_fix_cppflags=yes
16292 if test $cf_fix_cppflags = yes ; then
16294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16298 elif test "${cf_tst_cflags}" = "\"'" ; then
16300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16307 case "$CPPFLAGS" in
16311 case $cf_add_cflags in
16313 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16315 CPPFLAGS=`echo "$CPPFLAGS" | \
16316 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16317 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16322 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16323 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16330 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16331 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16338 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16339 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16341 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16343 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16344 && test -z "${cf_tst_cflags}" \
16345 && cf_fix_cppflags=no
16350 if test -n "$cf_new_cflags" ; then
16352 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16353 CFLAGS="${CFLAGS}$cf_new_cflags"
16357 if test -n "$cf_new_cppflags" ; then
16359 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16360 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16364 if test -n "$cf_new_extra_cppflags" ; then
16366 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16367 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16371 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16372 # Filter out duplicates - this happens with badly-designed ".pc" files...
16373 for cf_add_1lib in $LIBS
16375 for cf_add_2lib in $cf_add_libs
16377 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16383 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16385 LIBS="$cf_add_libs"
16387 cat >conftest.$ac_ext <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16394 (void) form_driver ( 0,0 );
16399 rm -f conftest.$ac_objext conftest$ac_exeext
16400 if { (eval echo "$as_me:16400: \"$ac_link\"") >&5
16401 (eval $ac_link) 2>&5
16403 echo "$as_me:16403: \$? = $ac_status" >&5
16404 (exit $ac_status); } &&
16405 { ac_try='test -s conftest$ac_exeext'
16406 { (eval echo "$as_me:16406: \"$ac_try\"") >&5
16407 (eval $ac_try) 2>&5
16409 echo "$as_me:16409: \$? = $ac_status" >&5
16410 (exit $ac_status); }; }; then
16411 if test "$cross_compiling" = yes; then
16412 cf_have_curses_lib=maybe
16414 cat >conftest.$ac_ext <<_ACEOF
16415 #line 16415 "configure"
16416 #include "confdefs.h"
16419 { (void) form_driver ( 0,0 ); return 0; }
16421 rm -f conftest$ac_exeext
16422 if { (eval echo "$as_me:16422: \"$ac_link\"") >&5
16423 (eval $ac_link) 2>&5
16425 echo "$as_me:16425: \$? = $ac_status" >&5
16426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16427 { (eval echo "$as_me:16427: \"$ac_try\"") >&5
16428 (eval $ac_try) 2>&5
16430 echo "$as_me:16430: \$? = $ac_status" >&5
16431 (exit $ac_status); }; }; then
16432 cf_have_curses_lib=yes
16434 echo "$as_me: program exited with status $ac_status" >&5
16435 echo "$as_me: failed program was:" >&5
16436 cat conftest.$ac_ext >&5
16437 cf_have_curses_lib=no
16439 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16442 echo "$as_me: failed program was:" >&5
16443 cat conftest.$ac_ext >&5
16444 cf_have_curses_lib=no
16446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16447 echo "$as_me:16447: result: $cf_have_curses_lib" >&5
16448 echo "${ECHO_T}$cf_have_curses_lib" >&6
16449 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16450 if test "$cf_have_curses_lib" != "yes"
16452 CPPFLAGS="$cf_save_CPPFLAGS"
16453 LIBS="$cf_save_LIBS"
16456 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16458 cat >>confdefs.h <<EOF
16459 #define $cf_upper 1
16465 if test "$cf_have_curses_lib" = no; then
16466 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16467 echo "$as_me:16467: checking for form_driver in -lform$cf_cv_libtype" >&5
16468 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16469 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16470 echo $ECHO_N "(cached) $ECHO_C" >&6
16472 ac_check_lib_save_LIBS=$LIBS
16473 LIBS="-lform$cf_cv_libtype $LIBS"
16474 cat >conftest.$ac_ext <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16478 /* Override any gcc2 internal prototype to avoid an error. */
16482 /* We use char because int might match the return type of a gcc2
16483 builtin and then its argument prototype would still apply. */
16484 char form_driver ();
16493 rm -f conftest.$ac_objext conftest$ac_exeext
16494 if { (eval echo "$as_me:16494: \"$ac_link\"") >&5
16495 (eval $ac_link) 2>&5
16497 echo "$as_me:16497: \$? = $ac_status" >&5
16498 (exit $ac_status); } &&
16499 { ac_try='test -s conftest$ac_exeext'
16500 { (eval echo "$as_me:16500: \"$ac_try\"") >&5
16501 (eval $ac_try) 2>&5
16503 echo "$as_me:16503: \$? = $ac_status" >&5
16504 (exit $ac_status); }; }; then
16505 eval "$as_ac_Lib=yes"
16507 echo "$as_me: failed program was:" >&5
16508 cat conftest.$ac_ext >&5
16509 eval "$as_ac_Lib=no"
16511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16512 LIBS=$ac_check_lib_save_LIBS
16514 echo "$as_me:16514: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16515 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16516 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16518 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16520 cf_add_libs="-lform$cf_cv_libtype"
16521 # Filter out duplicates - this happens with badly-designed ".pc" files...
16522 for cf_add_1lib in $LIBS
16524 for cf_add_2lib in $cf_add_libs
16526 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16532 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16534 LIBS="$cf_add_libs"
16536 cat >>confdefs.h <<EOF
16537 #define $cf_upper 1
16544 cf_curses_headers="$cf_curses_headers form.h"
16547 # look for curses-related headers
16549 for ac_header in $cf_curses_headers
16551 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16552 echo "$as_me:16552: checking for $ac_header" >&5
16553 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16554 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16555 echo $ECHO_N "(cached) $ECHO_C" >&6
16557 cat >conftest.$ac_ext <<_ACEOF
16558 #line 16558 "configure"
16559 #include "confdefs.h"
16560 #include <$ac_header>
16562 if { (eval echo "$as_me:16562: \"$ac_cpp conftest.$ac_ext\"") >&5
16563 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16565 egrep -v '^ *\+' conftest.er1 >conftest.err
16567 cat conftest.err >&5
16568 echo "$as_me:16568: \$? = $ac_status" >&5
16569 (exit $ac_status); } >/dev/null; then
16570 if test -s conftest.err; then
16571 ac_cpp_err=$ac_c_preproc_warn_flag
16578 if test -z "$ac_cpp_err"; then
16579 eval "$as_ac_Header=yes"
16581 echo "$as_me: failed program was:" >&5
16582 cat conftest.$ac_ext >&5
16583 eval "$as_ac_Header=no"
16585 rm -f conftest.err conftest.$ac_ext
16587 echo "$as_me:16587: result: `eval echo '${'$as_ac_Header'}'`" >&5
16588 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16589 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16590 cat >>confdefs.h <<EOF
16591 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16597 echo "$as_me:16597: checking for ANSI C header files" >&5
16598 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16599 if test "${ac_cv_header_stdc+set}" = set; then
16600 echo $ECHO_N "(cached) $ECHO_C" >&6
16602 cat >conftest.$ac_ext <<_ACEOF
16603 #line 16603 "configure"
16604 #include "confdefs.h"
16605 #include <stdlib.h>
16606 #include <stdarg.h>
16607 #include <string.h>
16611 if { (eval echo "$as_me:16611: \"$ac_cpp conftest.$ac_ext\"") >&5
16612 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16614 egrep -v '^ *\+' conftest.er1 >conftest.err
16616 cat conftest.err >&5
16617 echo "$as_me:16617: \$? = $ac_status" >&5
16618 (exit $ac_status); } >/dev/null; then
16619 if test -s conftest.err; then
16620 ac_cpp_err=$ac_c_preproc_warn_flag
16627 if test -z "$ac_cpp_err"; then
16628 ac_cv_header_stdc=yes
16630 echo "$as_me: failed program was:" >&5
16631 cat conftest.$ac_ext >&5
16632 ac_cv_header_stdc=no
16634 rm -f conftest.err conftest.$ac_ext
16636 if test $ac_cv_header_stdc = yes; then
16637 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16638 cat >conftest.$ac_ext <<_ACEOF
16639 #line 16639 "configure"
16640 #include "confdefs.h"
16641 #include <string.h>
16644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16645 egrep "memchr" >/dev/null 2>&1; then
16648 ac_cv_header_stdc=no
16654 if test $ac_cv_header_stdc = yes; then
16655 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16656 cat >conftest.$ac_ext <<_ACEOF
16657 #line 16657 "configure"
16658 #include "confdefs.h"
16659 #include <stdlib.h>
16662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16663 egrep "free" >/dev/null 2>&1; then
16666 ac_cv_header_stdc=no
16672 if test $ac_cv_header_stdc = yes; then
16673 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16674 if test "$cross_compiling" = yes; then
16677 cat >conftest.$ac_ext <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16681 #if ((' ' & 0x0FF) == 0x020)
16682 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16683 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16685 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16686 || ('j' <= (c) && (c) <= 'r') \
16687 || ('s' <= (c) && (c) <= 'z'))
16688 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16691 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16696 for (i = 0; i < 256; i++)
16697 if (XOR (islower (i), ISLOWER (i))
16698 || toupper (i) != TOUPPER (i))
16699 $ac_main_return(2);
16700 $ac_main_return (0);
16703 rm -f conftest$ac_exeext
16704 if { (eval echo "$as_me:16704: \"$ac_link\"") >&5
16705 (eval $ac_link) 2>&5
16707 echo "$as_me:16707: \$? = $ac_status" >&5
16708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16709 { (eval echo "$as_me:16709: \"$ac_try\"") >&5
16710 (eval $ac_try) 2>&5
16712 echo "$as_me:16712: \$? = $ac_status" >&5
16713 (exit $ac_status); }; }; then
16716 echo "$as_me: program exited with status $ac_status" >&5
16717 echo "$as_me: failed program was:" >&5
16718 cat conftest.$ac_ext >&5
16719 ac_cv_header_stdc=no
16721 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16725 echo "$as_me:16725: result: $ac_cv_header_stdc" >&5
16726 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16727 if test $ac_cv_header_stdc = yes; then
16729 cat >>confdefs.h <<\EOF
16730 #define STDC_HEADERS 1
16735 echo "$as_me:16735: checking whether time.h and sys/time.h may both be included" >&5
16736 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16737 if test "${ac_cv_header_time+set}" = set; then
16738 echo $ECHO_N "(cached) $ECHO_C" >&6
16740 cat >conftest.$ac_ext <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16743 #include <sys/types.h>
16744 #include <sys/time.h>
16750 if ((struct tm *) 0)
16756 rm -f conftest.$ac_objext
16757 if { (eval echo "$as_me:16757: \"$ac_compile\"") >&5
16758 (eval $ac_compile) 2>&5
16760 echo "$as_me:16760: \$? = $ac_status" >&5
16761 (exit $ac_status); } &&
16762 { ac_try='test -s conftest.$ac_objext'
16763 { (eval echo "$as_me:16763: \"$ac_try\"") >&5
16764 (eval $ac_try) 2>&5
16766 echo "$as_me:16766: \$? = $ac_status" >&5
16767 (exit $ac_status); }; }; then
16768 ac_cv_header_time=yes
16770 echo "$as_me: failed program was:" >&5
16771 cat conftest.$ac_ext >&5
16772 ac_cv_header_time=no
16774 rm -f conftest.$ac_objext conftest.$ac_ext
16776 echo "$as_me:16776: result: $ac_cv_header_time" >&5
16777 echo "${ECHO_T}$ac_cv_header_time" >&6
16778 if test $ac_cv_header_time = yes; then
16780 cat >>confdefs.h <<\EOF
16781 #define TIME_WITH_SYS_TIME 1
16799 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16800 echo "$as_me:16800: checking for $ac_header" >&5
16801 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16802 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16803 echo $ECHO_N "(cached) $ECHO_C" >&6
16805 cat >conftest.$ac_ext <<_ACEOF
16806 #line 16806 "configure"
16807 #include "confdefs.h"
16808 #include <$ac_header>
16810 if { (eval echo "$as_me:16810: \"$ac_cpp conftest.$ac_ext\"") >&5
16811 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16813 egrep -v '^ *\+' conftest.er1 >conftest.err
16815 cat conftest.err >&5
16816 echo "$as_me:16816: \$? = $ac_status" >&5
16817 (exit $ac_status); } >/dev/null; then
16818 if test -s conftest.err; then
16819 ac_cpp_err=$ac_c_preproc_warn_flag
16826 if test -z "$ac_cpp_err"; then
16827 eval "$as_ac_Header=yes"
16829 echo "$as_me: failed program was:" >&5
16830 cat conftest.$ac_ext >&5
16831 eval "$as_ac_Header=no"
16833 rm -f conftest.err conftest.$ac_ext
16835 echo "$as_me:16835: result: `eval echo '${'$as_ac_Header'}'`" >&5
16836 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16837 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16838 cat >>confdefs.h <<EOF
16839 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16845 for ac_header in unistd.h getopt.h
16847 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16848 echo "$as_me:16848: checking for $ac_header" >&5
16849 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16850 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16851 echo $ECHO_N "(cached) $ECHO_C" >&6
16853 cat >conftest.$ac_ext <<_ACEOF
16854 #line 16854 "configure"
16855 #include "confdefs.h"
16856 #include <$ac_header>
16858 if { (eval echo "$as_me:16858: \"$ac_cpp conftest.$ac_ext\"") >&5
16859 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16861 egrep -v '^ *\+' conftest.er1 >conftest.err
16863 cat conftest.err >&5
16864 echo "$as_me:16864: \$? = $ac_status" >&5
16865 (exit $ac_status); } >/dev/null; then
16866 if test -s conftest.err; then
16867 ac_cpp_err=$ac_c_preproc_warn_flag
16874 if test -z "$ac_cpp_err"; then
16875 eval "$as_ac_Header=yes"
16877 echo "$as_me: failed program was:" >&5
16878 cat conftest.$ac_ext >&5
16879 eval "$as_ac_Header=no"
16881 rm -f conftest.err conftest.$ac_ext
16883 echo "$as_me:16883: result: `eval echo '${'$as_ac_Header'}'`" >&5
16884 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16885 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16886 cat >>confdefs.h <<EOF
16887 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16893 echo "$as_me:16893: checking for header declaring getopt variables" >&5
16894 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16895 if test "${cf_cv_getopt_header+set}" = set; then
16896 echo $ECHO_N "(cached) $ECHO_C" >&6
16899 cf_cv_getopt_header=none
16900 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16902 cat >conftest.$ac_ext <<_ACEOF
16903 #line 16903 "configure"
16904 #include "confdefs.h"
16906 #include <$cf_header>
16910 int x = optind; char *y = optarg
16915 rm -f conftest.$ac_objext
16916 if { (eval echo "$as_me:16916: \"$ac_compile\"") >&5
16917 (eval $ac_compile) 2>&5
16919 echo "$as_me:16919: \$? = $ac_status" >&5
16920 (exit $ac_status); } &&
16921 { ac_try='test -s conftest.$ac_objext'
16922 { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit $ac_status); }; }; then
16927 cf_cv_getopt_header=$cf_header
16930 echo "$as_me: failed program was:" >&5
16931 cat conftest.$ac_ext >&5
16933 rm -f conftest.$ac_objext conftest.$ac_ext
16937 echo "$as_me:16937: result: $cf_cv_getopt_header" >&5
16938 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16939 if test $cf_cv_getopt_header != none ; then
16941 cat >>confdefs.h <<\EOF
16942 #define HAVE_GETOPT_HEADER 1
16946 if test $cf_cv_getopt_header = getopt.h ; then
16948 cat >>confdefs.h <<\EOF
16949 #define NEED_GETOPT_H 1
16960 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16961 echo "$as_me:16961: checking for $ac_func" >&5
16962 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16963 if eval "test \"\${$as_ac_var+set}\" = set"; then
16964 echo $ECHO_N "(cached) $ECHO_C" >&6
16966 cat >conftest.$ac_ext <<_ACEOF
16967 #line 16967 "configure"
16968 #include "confdefs.h"
16969 #define $ac_func autoconf_temporary
16970 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16977 /* We use char because int might match the return type of a gcc2
16978 builtin and then its argument prototype would still apply. */
16979 char $ac_func (void);
16985 /* The GNU C library defines stubs for functions which it implements
16986 to always fail with ENOSYS. Some functions are actually named
16987 something starting with __ and the normal name is an alias. */
16988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16989 #error found stub for $ac_func
16992 return $ac_func ();
16997 rm -f conftest.$ac_objext conftest$ac_exeext
16998 if { (eval echo "$as_me:16998: \"$ac_link\"") >&5
16999 (eval $ac_link) 2>&5
17001 echo "$as_me:17001: \$? = $ac_status" >&5
17002 (exit $ac_status); } &&
17003 { ac_try='test -s conftest$ac_exeext'
17004 { (eval echo "$as_me:17004: \"$ac_try\"") >&5
17005 (eval $ac_try) 2>&5
17007 echo "$as_me:17007: \$? = $ac_status" >&5
17008 (exit $ac_status); }; }; then
17009 eval "$as_ac_var=yes"
17011 echo "$as_me: failed program was:" >&5
17012 cat conftest.$ac_ext >&5
17013 eval "$as_ac_var=no"
17015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17017 echo "$as_me:17017: result: `eval echo '${'$as_ac_var'}'`" >&5
17018 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17019 if test `eval echo '${'$as_ac_var'}'` = yes; then
17020 cat >>confdefs.h <<EOF
17021 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17027 # use a compile-check to work with ncurses*-config and subdirectory includes
17028 echo "$as_me:17028: checking if we can use termcap.h" >&5
17029 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17030 if test "${cf_cv_have_termcap_h+set}" = set; then
17031 echo $ECHO_N "(cached) $ECHO_C" >&6
17034 cat >conftest.$ac_ext <<_ACEOF
17035 #line 17035 "configure"
17036 #include "confdefs.h"
17038 #include <curses.h>
17039 #ifdef NCURSES_VERSION
17040 #undef NCURSES_VERSION
17042 #include <termcap.h>
17043 #ifndef NCURSES_VERSION
17044 #error wrong header
17055 rm -f conftest.$ac_objext
17056 if { (eval echo "$as_me:17056: \"$ac_compile\"") >&5
17057 (eval $ac_compile) 2>&5
17059 echo "$as_me:17059: \$? = $ac_status" >&5
17060 (exit $ac_status); } &&
17061 { ac_try='test -s conftest.$ac_objext'
17062 { (eval echo "$as_me:17062: \"$ac_try\"") >&5
17063 (eval $ac_try) 2>&5
17065 echo "$as_me:17065: \$? = $ac_status" >&5
17066 (exit $ac_status); }; }; then
17067 cf_cv_have_termcap_h=yes
17069 echo "$as_me: failed program was:" >&5
17070 cat conftest.$ac_ext >&5
17071 cf_cv_have_termcap_h=no
17073 rm -f conftest.$ac_objext conftest.$ac_ext
17075 echo "$as_me:17075: result: $cf_cv_have_termcap_h" >&5
17076 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17077 if test "x$cf_cv_have_termcap_h" = xyes
17079 cat >>confdefs.h <<\EOF
17080 #define HAVE_TERMCAP_H 1
17084 echo "$as_me:17084: checking if we can use ncurses/termcap.h" >&5
17085 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17086 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17087 echo $ECHO_N "(cached) $ECHO_C" >&6
17090 cat >conftest.$ac_ext <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17094 #include <ncurses/curses.h>
17095 #ifdef NCURSES_VERSION
17096 #undef NCURSES_VERSION
17098 #include <ncurses/termcap.h>
17099 #ifndef NCURSES_VERSION
17100 #error wrong header
17111 rm -f conftest.$ac_objext
17112 if { (eval echo "$as_me:17112: \"$ac_compile\"") >&5
17113 (eval $ac_compile) 2>&5
17115 echo "$as_me:17115: \$? = $ac_status" >&5
17116 (exit $ac_status); } &&
17117 { ac_try='test -s conftest.$ac_objext'
17118 { (eval echo "$as_me:17118: \"$ac_try\"") >&5
17119 (eval $ac_try) 2>&5
17121 echo "$as_me:17121: \$? = $ac_status" >&5
17122 (exit $ac_status); }; }; then
17123 cf_cv_have_ncurses_termcap_h=yes
17125 echo "$as_me: failed program was:" >&5
17126 cat conftest.$ac_ext >&5
17127 cf_cv_have_ncurses_termcap_h=no
17129 rm -f conftest.$ac_objext conftest.$ac_ext
17131 echo "$as_me:17131: result: $cf_cv_have_ncurses_termcap_h" >&5
17132 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17133 test "x$cf_cv_have_ncurses_termcap_h" = xyes && cat >>confdefs.h <<\EOF
17134 #define HAVE_NCURSES_TERMCAP_H 1
17139 if test "x$ac_cv_func_getopt" = xno; then
17140 { { echo "$as_me:17140: error: getopt is required for building programs" >&5
17141 echo "$as_me: error: getopt is required for building programs" >&2;}
17142 { (exit 1); exit 1; }; }
17145 if test "$cf_enable_widec" = yes; then
17158 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17159 echo "$as_me:17159: checking for $ac_func" >&5
17160 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17161 if eval "test \"\${$as_ac_var+set}\" = set"; then
17162 echo $ECHO_N "(cached) $ECHO_C" >&6
17164 cat >conftest.$ac_ext <<_ACEOF
17165 #line 17165 "configure"
17166 #include "confdefs.h"
17167 #define $ac_func autoconf_temporary
17168 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17175 /* We use char because int might match the return type of a gcc2
17176 builtin and then its argument prototype would still apply. */
17177 char $ac_func (void);
17183 /* The GNU C library defines stubs for functions which it implements
17184 to always fail with ENOSYS. Some functions are actually named
17185 something starting with __ and the normal name is an alias. */
17186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17187 #error found stub for $ac_func
17190 return $ac_func ();
17195 rm -f conftest.$ac_objext conftest$ac_exeext
17196 if { (eval echo "$as_me:17196: \"$ac_link\"") >&5
17197 (eval $ac_link) 2>&5
17199 echo "$as_me:17199: \$? = $ac_status" >&5
17200 (exit $ac_status); } &&
17201 { ac_try='test -s conftest$ac_exeext'
17202 { (eval echo "$as_me:17202: \"$ac_try\"") >&5
17203 (eval $ac_try) 2>&5
17205 echo "$as_me:17205: \$? = $ac_status" >&5
17206 (exit $ac_status); }; }; then
17207 eval "$as_ac_var=yes"
17209 echo "$as_me: failed program was:" >&5
17210 cat conftest.$ac_ext >&5
17211 eval "$as_ac_var=no"
17213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17215 echo "$as_me:17215: result: `eval echo '${'$as_ac_var'}'`" >&5
17216 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17217 if test `eval echo '${'$as_ac_var'}'` = yes; then
17218 cat >>confdefs.h <<EOF
17219 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17227 echo "$as_me:17227: checking definition to turn on extended curses functions" >&5
17228 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17229 if test "${cf_cv_need_xopen_extension+set}" = set; then
17230 echo $ECHO_N "(cached) $ECHO_C" >&6
17233 cf_cv_need_xopen_extension=unknown
17234 cat >conftest.$ac_ext <<_ACEOF
17235 #line 17235 "configure"
17236 #include "confdefs.h"
17238 #include <stdlib.h>
17239 #include <${cf_cv_ncurses_header:-curses.h}>
17244 #if defined(NCURSES_VERSION_PATCH)
17245 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17249 #ifdef NCURSES_VERSION
17251 int check2 = curs_set((int)sizeof(check));
17253 long x = winnstr(stdscr, "", 0);
17255 getbegyx(stdscr, y1, x1)
17260 rm -f conftest.$ac_objext conftest$ac_exeext
17261 if { (eval echo "$as_me:17261: \"$ac_link\"") >&5
17262 (eval $ac_link) 2>&5
17264 echo "$as_me:17264: \$? = $ac_status" >&5
17265 (exit $ac_status); } &&
17266 { ac_try='test -s conftest$ac_exeext'
17267 { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17270 echo "$as_me:17270: \$? = $ac_status" >&5
17271 (exit $ac_status); }; }; then
17272 cf_cv_need_xopen_extension=none
17274 echo "$as_me: failed program was:" >&5
17275 cat conftest.$ac_ext >&5
17277 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17279 cat >conftest.$ac_ext <<_ACEOF
17280 #line 17280 "configure"
17281 #include "confdefs.h"
17283 #define $cf_try_xopen_extension 1
17284 #include <stdlib.h>
17285 #include <${cf_cv_ncurses_header:-curses.h}>
17290 #ifdef NCURSES_VERSION
17292 int check2 = curs_set((int)sizeof(check));
17294 long x = winnstr(stdscr, "", 0);
17296 getbegyx(stdscr, y1, x1)
17301 rm -f conftest.$ac_objext conftest$ac_exeext
17302 if { (eval echo "$as_me:17302: \"$ac_link\"") >&5
17303 (eval $ac_link) 2>&5
17305 echo "$as_me:17305: \$? = $ac_status" >&5
17306 (exit $ac_status); } &&
17307 { ac_try='test -s conftest$ac_exeext'
17308 { (eval echo "$as_me:17308: \"$ac_try\"") >&5
17309 (eval $ac_try) 2>&5
17311 echo "$as_me:17311: \$? = $ac_status" >&5
17312 (exit $ac_status); }; }; then
17313 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17315 echo "$as_me: failed program was:" >&5
17316 cat conftest.$ac_ext >&5
17318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17325 echo "$as_me:17325: result: $cf_cv_need_xopen_extension" >&5
17326 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17328 case $cf_cv_need_xopen_extension in
17331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17332 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17337 echo "$as_me:17337: checking for term.h" >&5
17338 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17339 if test "${cf_cv_term_header+set}" = set; then
17340 echo $ECHO_N "(cached) $ECHO_C" >&6
17343 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17344 # for <term.h> if we do not find the variant.
17346 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17348 case ${cf_cv_ncurses_header:-curses.h} in
17350 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17351 cf_header_list="$cf_header_item $cf_header_list"
17355 for cf_header in $cf_header_list
17357 cat >conftest.$ac_ext <<_ACEOF
17358 #line 17358 "configure"
17359 #include "confdefs.h"
17361 #include <${cf_cv_ncurses_header:-curses.h}>
17362 #include <${cf_header}>
17371 rm -f conftest.$ac_objext
17372 if { (eval echo "$as_me:17372: \"$ac_compile\"") >&5
17373 (eval $ac_compile) 2>&5
17375 echo "$as_me:17375: \$? = $ac_status" >&5
17376 (exit $ac_status); } &&
17377 { ac_try='test -s conftest.$ac_objext'
17378 { (eval echo "$as_me:17378: \"$ac_try\"") >&5
17379 (eval $ac_try) 2>&5
17381 echo "$as_me:17381: \$? = $ac_status" >&5
17382 (exit $ac_status); }; }; then
17383 cf_cv_term_header=$cf_header
17386 echo "$as_me: failed program was:" >&5
17387 cat conftest.$ac_ext >&5
17388 cf_cv_term_header=no
17390 rm -f conftest.$ac_objext conftest.$ac_ext
17393 case $cf_cv_term_header in
17395 # If curses is ncurses, some packagers still mess it up by trying to make
17396 # us use GNU termcap. This handles the most common case.
17397 for cf_header in ncurses/term.h ncursesw/term.h
17399 cat >conftest.$ac_ext <<_ACEOF
17400 #line 17400 "configure"
17401 #include "confdefs.h"
17403 #include <${cf_cv_ncurses_header:-curses.h}>
17404 #ifdef NCURSES_VERSION
17405 #include <${cf_header}>
17417 rm -f conftest.$ac_objext
17418 if { (eval echo "$as_me:17418: \"$ac_compile\"") >&5
17419 (eval $ac_compile) 2>&5
17421 echo "$as_me:17421: \$? = $ac_status" >&5
17422 (exit $ac_status); } &&
17423 { ac_try='test -s conftest.$ac_objext'
17424 { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17427 echo "$as_me:17427: \$? = $ac_status" >&5
17428 (exit $ac_status); }; }; then
17429 cf_cv_term_header=$cf_header
17432 echo "$as_me: failed program was:" >&5
17433 cat conftest.$ac_ext >&5
17434 cf_cv_term_header=no
17436 rm -f conftest.$ac_objext conftest.$ac_ext
17442 echo "$as_me:17442: result: $cf_cv_term_header" >&5
17443 echo "${ECHO_T}$cf_cv_term_header" >&6
17445 case $cf_cv_term_header in
17448 cat >>confdefs.h <<\EOF
17449 #define HAVE_TERM_H 1
17455 cat >>confdefs.h <<\EOF
17456 #define HAVE_NCURSES_TERM_H 1
17462 cat >>confdefs.h <<\EOF
17463 #define HAVE_NCURSESW_TERM_H 1
17469 echo "$as_me:17469: checking for unctrl.h" >&5
17470 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17471 if test "${cf_cv_unctrl_header+set}" = set; then
17472 echo $ECHO_N "(cached) $ECHO_C" >&6
17475 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17476 # for <unctrl.h> if we do not find the variant.
17478 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17480 case ${cf_cv_ncurses_header:-curses.h} in
17482 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17483 cf_header_list="$cf_header_item $cf_header_list"
17487 for cf_header in $cf_header_list
17489 cat >conftest.$ac_ext <<_ACEOF
17490 #line 17490 "configure"
17491 #include "confdefs.h"
17493 #include <${cf_cv_ncurses_header:-curses.h}>
17494 #include <${cf_header}>
17503 rm -f conftest.$ac_objext
17504 if { (eval echo "$as_me:17504: \"$ac_compile\"") >&5
17505 (eval $ac_compile) 2>&5
17507 echo "$as_me:17507: \$? = $ac_status" >&5
17508 (exit $ac_status); } &&
17509 { ac_try='test -s conftest.$ac_objext'
17510 { (eval echo "$as_me:17510: \"$ac_try\"") >&5
17511 (eval $ac_try) 2>&5
17513 echo "$as_me:17513: \$? = $ac_status" >&5
17514 (exit $ac_status); }; }; then
17515 cf_cv_unctrl_header=$cf_header
17518 echo "$as_me: failed program was:" >&5
17519 cat conftest.$ac_ext >&5
17520 cf_cv_unctrl_header=no
17522 rm -f conftest.$ac_objext conftest.$ac_ext
17526 echo "$as_me:17526: result: $cf_cv_unctrl_header" >&5
17527 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17529 case $cf_cv_unctrl_header in
17531 { echo "$as_me:17531: WARNING: unctrl.h header not found" >&5
17532 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17536 case $cf_cv_unctrl_header in
17539 cat >>confdefs.h <<\EOF
17540 #define HAVE_UNCTRL_H 1
17546 cat >>confdefs.h <<\EOF
17547 #define HAVE_NCURSES_UNCTRL_H 1
17551 (ncursesw/unctrl.h)
17553 cat >>confdefs.h <<\EOF
17554 #define HAVE_NCURSESW_UNCTRL_H 1
17562 assume_default_colors \
17577 init_extended_color \
17585 reset_color_pairs \
17600 use_default_colors \
17602 use_extended_names \
17618 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17620 echo "$as_me:17620: checking for ${cf_func}" >&5
17621 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17623 echo "${as_me:-configure}:17623: testing ${cf_func} ..." 1>&5
17625 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17626 echo $ECHO_N "(cached) $ECHO_C" >&6
17629 eval cf_result='$ac_cv_func_'$cf_func
17630 if test ".$cf_result" != ".no"; then
17631 cat >conftest.$ac_ext <<_ACEOF
17632 #line 17632 "configure"
17633 #include "confdefs.h"
17635 #ifdef HAVE_XCURSES
17636 #include <xcurses.h>
17637 char * XCursesProgramName = "test";
17639 #include <${cf_cv_ncurses_header:-curses.h}>
17640 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17641 #include <ncursesw/term.h>
17642 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17643 #include <ncurses/term.h>
17644 #elif defined(HAVE_TERM_H)
17654 long foo = (long)(&${cf_func});
17655 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17656 if (foo + 1234L > 5678L)
17657 ${cf_cv_main_return:-return}(foo != 0);
17664 rm -f conftest.$ac_objext conftest$ac_exeext
17665 if { (eval echo "$as_me:17665: \"$ac_link\"") >&5
17666 (eval $ac_link) 2>&5
17668 echo "$as_me:17668: \$? = $ac_status" >&5
17669 (exit $ac_status); } &&
17670 { ac_try='test -s conftest$ac_exeext'
17671 { (eval echo "$as_me:17671: \"$ac_try\"") >&5
17672 (eval $ac_try) 2>&5
17674 echo "$as_me:17674: \$? = $ac_status" >&5
17675 (exit $ac_status); }; }; then
17678 echo "$as_me: failed program was:" >&5
17679 cat conftest.$ac_ext >&5
17682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17684 eval 'cf_cv_func_'$cf_func'=$cf_result'
17688 # use the computed/retrieved cache-value:
17689 eval 'cf_result=$cf_cv_func_'$cf_func
17690 echo "$as_me:17690: result: $cf_result" >&5
17691 echo "${ECHO_T}$cf_result" >&6
17692 if test $cf_result != no; then
17693 cat >>confdefs.h <<EOF
17694 #define HAVE_${cf_tr_func} 1
17700 for cf_func in tputs
17703 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17705 echo "$as_me:17705: checking for ${cf_func}" >&5
17706 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17708 echo "${as_me:-configure}:17708: testing ${cf_func} ..." 1>&5
17710 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17711 echo $ECHO_N "(cached) $ECHO_C" >&6
17714 eval cf_result='$ac_cv_func_'$cf_func
17715 if test ".$cf_result" != ".no"; then
17716 cat >conftest.$ac_ext <<_ACEOF
17717 #line 17717 "configure"
17718 #include "confdefs.h"
17720 #ifdef HAVE_XCURSES
17721 #include <xcurses.h>
17722 char * XCursesProgramName = "test";
17724 #include <${cf_cv_ncurses_header:-curses.h}>
17725 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17726 #include <ncursesw/term.h>
17727 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17728 #include <ncurses/term.h>
17729 #elif defined(HAVE_TERM_H)
17739 long foo = (long)(&${cf_func});
17740 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17741 if (foo + 1234L > 5678L)
17742 ${cf_cv_main_return:-return}(foo != 0);
17749 rm -f conftest.$ac_objext conftest$ac_exeext
17750 if { (eval echo "$as_me:17750: \"$ac_link\"") >&5
17751 (eval $ac_link) 2>&5
17753 echo "$as_me:17753: \$? = $ac_status" >&5
17754 (exit $ac_status); } &&
17755 { ac_try='test -s conftest$ac_exeext'
17756 { (eval echo "$as_me:17756: \"$ac_try\"") >&5
17757 (eval $ac_try) 2>&5
17759 echo "$as_me:17759: \$? = $ac_status" >&5
17760 (exit $ac_status); }; }; then
17763 echo "$as_me: failed program was:" >&5
17764 cat conftest.$ac_ext >&5
17767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17769 eval 'cf_cv_func_'$cf_func'=$cf_result'
17773 # use the computed/retrieved cache-value:
17774 eval 'cf_result=$cf_cv_func_'$cf_func
17775 echo "$as_me:17775: result: $cf_result" >&5
17776 echo "${ECHO_T}$cf_result" >&6
17777 if test $cf_result != no; then
17778 cat >>confdefs.h <<EOF
17779 #define HAVE_${cf_tr_func} 1
17785 if test x$cf_cv_func_tputs = xyes
17788 for cf_arg in int char
17790 for cf_ret in int void
17792 if test $cf_ret = void
17794 cf_return="/* nothing */"
17796 cf_return="return value"
17798 cat >conftest.$ac_ext <<_ACEOF
17799 #line 17799 "configure"
17800 #include "confdefs.h"
17802 #include <${cf_cv_ncurses_header:-curses.h}>
17803 #include <$cf_cv_term_header>
17805 static $cf_ret outc($cf_arg value) { $cf_return; }
17811 tputs("hello", 0, outc);
17812 ${cf_cv_main_return:-return}(0);
17818 rm -f conftest.$ac_objext
17819 if { (eval echo "$as_me:17819: \"$ac_compile\"") >&5
17820 (eval $ac_compile) 2>&5
17822 echo "$as_me:17822: \$? = $ac_status" >&5
17823 (exit $ac_status); } &&
17824 { ac_try='test -s conftest.$ac_objext'
17825 { (eval echo "$as_me:17825: \"$ac_try\"") >&5
17826 (eval $ac_try) 2>&5
17828 echo "$as_me:17828: \$? = $ac_status" >&5
17829 (exit $ac_status); }; }; then
17831 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17833 echo "${as_me:-configure}:17833: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17835 cat >>confdefs.h <<EOF
17836 #define TPUTS_ARG $cf_arg
17837 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17838 #define TPUTS_RETURN(value) $cf_return
17844 echo "$as_me: failed program was:" >&5
17845 cat conftest.$ac_ext >&5
17847 rm -f conftest.$ac_objext conftest.$ac_ext
17849 test $cf_done = yes && break
17853 echo "$as_me:17853: checking for ncurses extended functions" >&5
17854 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17855 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17856 echo $ECHO_N "(cached) $ECHO_C" >&6
17859 cat >conftest.$ac_ext <<_ACEOF
17860 #line 17860 "configure"
17861 #include "confdefs.h"
17863 #include <${cf_cv_ncurses_header:-curses.h}>
17868 int x = NCURSES_EXT_FUNCS
17874 rm -f conftest.$ac_objext
17875 if { (eval echo "$as_me:17875: \"$ac_compile\"") >&5
17876 (eval $ac_compile) 2>&5
17878 echo "$as_me:17878: \$? = $ac_status" >&5
17879 (exit $ac_status); } &&
17880 { ac_try='test -s conftest.$ac_objext'
17881 { (eval echo "$as_me:17881: \"$ac_try\"") >&5
17882 (eval $ac_try) 2>&5
17884 echo "$as_me:17884: \$? = $ac_status" >&5
17885 (exit $ac_status); }; }; then
17886 cf_cv_ncurses_ext_funcs=defined
17888 echo "$as_me: failed program was:" >&5
17889 cat conftest.$ac_ext >&5
17891 cat >conftest.$ac_ext <<_ACEOF
17892 #line 17892 "configure"
17893 #include "confdefs.h"
17895 #include <${cf_cv_ncurses_header:-curses.h}>
17900 (void) assume_default_colors (0, 0);
17901 (void) curses_version ();
17902 (void) define_key (0, 0);
17903 (void) is_term_resized (0, 0);
17904 (void) key_defined (0);
17905 (void) keybound (0, 0);
17906 (void) keyok (0, 0);
17907 (void) resize_term (0, 0);
17908 (void) resizeterm (0, 0);
17909 (void) use_default_colors ();
17910 (void) use_extended_names (0);
17911 (void) wresize (0, 0, 0);
17916 rm -f conftest.$ac_objext conftest$ac_exeext
17917 if { (eval echo "$as_me:17917: \"$ac_link\"") >&5
17918 (eval $ac_link) 2>&5
17920 echo "$as_me:17920: \$? = $ac_status" >&5
17921 (exit $ac_status); } &&
17922 { ac_try='test -s conftest$ac_exeext'
17923 { (eval echo "$as_me:17923: \"$ac_try\"") >&5
17924 (eval $ac_try) 2>&5
17926 echo "$as_me:17926: \$? = $ac_status" >&5
17927 (exit $ac_status); }; }; then
17928 cf_cv_ncurses_ext_funcs=yes
17930 echo "$as_me: failed program was:" >&5
17931 cat conftest.$ac_ext >&5
17932 cf_cv_ncurses_ext_funcs=no
17934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17937 rm -f conftest.$ac_objext conftest.$ac_ext
17940 echo "$as_me:17940: result: $cf_cv_ncurses_ext_funcs" >&5
17941 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
17942 test "$cf_cv_ncurses_ext_funcs" = yes &&
17943 cat >>confdefs.h <<\EOF
17944 #define NCURSES_EXT_FUNCS 1
17947 if test "$cf_enable_widec" = yes
17949 # workaround for systems with ncurses before 20111029, due to change of
17950 # feature test macro from _XPG5 to _XOPEN_SOURCE
17951 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
17954 echo "$as_me:17954: checking if _XPG5 should be defined to enable wide-characters" >&5
17955 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
17957 cat >conftest.$ac_ext <<_ACEOF
17958 #line 17958 "configure"
17959 #include "confdefs.h"
17961 #include <${cf_cv_ncurses_header:-curses.h}>
17970 rm -f conftest.$ac_objext
17971 if { (eval echo "$as_me:17971: \"$ac_compile\"") >&5
17972 (eval $ac_compile) 2>&5
17974 echo "$as_me:17974: \$? = $ac_status" >&5
17975 (exit $ac_status); } &&
17976 { ac_try='test -s conftest.$ac_objext'
17977 { (eval echo "$as_me:17977: \"$ac_try\"") >&5
17978 (eval $ac_try) 2>&5
17980 echo "$as_me:17980: \$? = $ac_status" >&5
17981 (exit $ac_status); }; }; then
17984 echo "$as_me: failed program was:" >&5
17985 cat conftest.$ac_ext >&5
17986 cf_save_cppflags="$CPPFLAGS"
17987 CPPFLAGS="$CPPFLAGS -D_XPG5"
17988 cat >conftest.$ac_ext <<_ACEOF
17989 #line 17989 "configure"
17990 #include "confdefs.h"
17992 #include <${cf_cv_ncurses_header:-curses.h}>
18001 rm -f conftest.$ac_objext
18002 if { (eval echo "$as_me:18002: \"$ac_compile\"") >&5
18003 (eval $ac_compile) 2>&5
18005 echo "$as_me:18005: \$? = $ac_status" >&5
18006 (exit $ac_status); } &&
18007 { ac_try='test -s conftest.$ac_objext'
18008 { (eval echo "$as_me:18008: \"$ac_try\"") >&5
18009 (eval $ac_try) 2>&5
18011 echo "$as_me:18011: \$? = $ac_status" >&5
18012 (exit $ac_status); }; }; then
18015 echo "$as_me: failed program was:" >&5
18016 cat conftest.$ac_ext >&5
18018 rm -f conftest.$ac_objext conftest.$ac_ext
18019 CPPFLAGS="$cf_save_cppflags"
18021 rm -f conftest.$ac_objext conftest.$ac_ext
18022 echo "$as_me:18022: result: $cf_define_xpg5" >&5
18023 echo "${ECHO_T}$cf_define_xpg5" >&6
18025 if test "$cf_define_xpg5" = yes
18027 CPPFLAGS="$CPPFLAGS -D_XPG5"
18031 echo "$as_me:18031: checking for wide-character functions" >&5
18032 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18033 if test "${cf_cv_widechar_funcs+set}" = set; then
18034 echo $ECHO_N "(cached) $ECHO_C" >&6
18037 cat >conftest.$ac_ext <<_ACEOF
18038 #line 18038 "configure"
18039 #include "confdefs.h"
18041 #include <${cf_cv_ncurses_header:-curses.h}>
18046 static wchar_t src_wchar[2];
18047 static cchar_t dst_cchar;
18048 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18054 rm -f conftest.$ac_objext conftest$ac_exeext
18055 if { (eval echo "$as_me:18055: \"$ac_link\"") >&5
18056 (eval $ac_link) 2>&5
18058 echo "$as_me:18058: \$? = $ac_status" >&5
18059 (exit $ac_status); } &&
18060 { ac_try='test -s conftest$ac_exeext'
18061 { (eval echo "$as_me:18061: \"$ac_try\"") >&5
18062 (eval $ac_try) 2>&5
18064 echo "$as_me:18064: \$? = $ac_status" >&5
18065 (exit $ac_status); }; }; then
18066 cf_cv_widechar_funcs=yes
18068 echo "$as_me: failed program was:" >&5
18069 cat conftest.$ac_ext >&5
18070 cf_cv_widechar_funcs=no
18072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18075 echo "$as_me:18075: result: $cf_cv_widechar_funcs" >&5
18076 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18077 if test "$cf_cv_widechar_funcs" != no ; then
18079 cat >>confdefs.h <<\EOF
18080 #define USE_WIDEC_SUPPORT 1
18084 cat >>confdefs.h <<\EOF
18085 #define USE_WIDEC_SUPPORT 0
18090 cat >>confdefs.h <<\EOF
18091 #define USE_WIDEC_SUPPORT 0
18096 echo "$as_me:18096: checking if $cf_cv_screen library uses pthreads" >&5
18097 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18098 if test "${cf_cv_use_pthreads+set}" = set; then
18099 echo $ECHO_N "(cached) $ECHO_C" >&6
18102 cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18106 #include <${cf_cv_ncurses_header:-curses.h}>
18107 extern void _nc_init_pthreads(void);
18114 _nc_init_pthreads();
18120 rm -f conftest.$ac_objext conftest$ac_exeext
18121 if { (eval echo "$as_me:18121: \"$ac_link\"") >&5
18122 (eval $ac_link) 2>&5
18124 echo "$as_me:18124: \$? = $ac_status" >&5
18125 (exit $ac_status); } &&
18126 { ac_try='test -s conftest$ac_exeext'
18127 { (eval echo "$as_me:18127: \"$ac_try\"") >&5
18128 (eval $ac_try) 2>&5
18130 echo "$as_me:18130: \$? = $ac_status" >&5
18131 (exit $ac_status); }; }; then
18132 cf_cv_use_pthreads=yes
18134 echo "$as_me: failed program was:" >&5
18135 cat conftest.$ac_ext >&5
18136 cf_cv_use_pthreads=no
18138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18141 echo "$as_me:18141: result: $cf_cv_use_pthreads" >&5
18142 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18143 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
18144 #define USE_PTHREADS 1
18147 echo "$as_me:18147: checking if sys/time.h works with sys/select.h" >&5
18148 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18149 if test "${cf_cv_sys_time_select+set}" = set; then
18150 echo $ECHO_N "(cached) $ECHO_C" >&6
18153 cat >conftest.$ac_ext <<_ACEOF
18154 #line 18154 "configure"
18155 #include "confdefs.h"
18157 #include <sys/types.h>
18158 #ifdef HAVE_SYS_TIME_H
18159 #include <sys/time.h>
18161 #ifdef HAVE_SYS_SELECT_H
18162 #include <sys/select.h>
18173 rm -f conftest.$ac_objext
18174 if { (eval echo "$as_me:18174: \"$ac_compile\"") >&5
18175 (eval $ac_compile) 2>&5
18177 echo "$as_me:18177: \$? = $ac_status" >&5
18178 (exit $ac_status); } &&
18179 { ac_try='test -s conftest.$ac_objext'
18180 { (eval echo "$as_me:18180: \"$ac_try\"") >&5
18181 (eval $ac_try) 2>&5
18183 echo "$as_me:18183: \$? = $ac_status" >&5
18184 (exit $ac_status); }; }; then
18185 cf_cv_sys_time_select=yes
18187 echo "$as_me: failed program was:" >&5
18188 cat conftest.$ac_ext >&5
18189 cf_cv_sys_time_select=no
18191 rm -f conftest.$ac_objext conftest.$ac_ext
18195 echo "$as_me:18195: result: $cf_cv_sys_time_select" >&5
18196 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18197 test "$cf_cv_sys_time_select" = yes &&
18198 cat >>confdefs.h <<\EOF
18199 #define HAVE_SYS_TIME_SELECT 1
18202 # special check for test/ditto.c
18204 echo "$as_me:18204: checking for openpty in -lutil" >&5
18205 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18206 if test "${ac_cv_lib_util_openpty+set}" = set; then
18207 echo $ECHO_N "(cached) $ECHO_C" >&6
18209 ac_check_lib_save_LIBS=$LIBS
18210 LIBS="-lutil $LIBS"
18211 cat >conftest.$ac_ext <<_ACEOF
18212 #line 18212 "configure"
18213 #include "confdefs.h"
18215 /* Override any gcc2 internal prototype to avoid an error. */
18219 /* We use char because int might match the return type of a gcc2
18220 builtin and then its argument prototype would still apply. */
18230 rm -f conftest.$ac_objext conftest$ac_exeext
18231 if { (eval echo "$as_me:18231: \"$ac_link\"") >&5
18232 (eval $ac_link) 2>&5
18234 echo "$as_me:18234: \$? = $ac_status" >&5
18235 (exit $ac_status); } &&
18236 { ac_try='test -s conftest$ac_exeext'
18237 { (eval echo "$as_me:18237: \"$ac_try\"") >&5
18238 (eval $ac_try) 2>&5
18240 echo "$as_me:18240: \$? = $ac_status" >&5
18241 (exit $ac_status); }; }; then
18242 ac_cv_lib_util_openpty=yes
18244 echo "$as_me: failed program was:" >&5
18245 cat conftest.$ac_ext >&5
18246 ac_cv_lib_util_openpty=no
18248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18249 LIBS=$ac_check_lib_save_LIBS
18251 echo "$as_me:18251: result: $ac_cv_lib_util_openpty" >&5
18252 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18253 if test $ac_cv_lib_util_openpty = yes; then
18259 echo "$as_me:18259: checking for openpty header" >&5
18260 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18261 if test "${cf_cv_func_openpty+set}" = set; then
18262 echo $ECHO_N "(cached) $ECHO_C" >&6
18265 cf_save_LIBS="$LIBS"
18266 test $cf_cv_lib_util = yes && {
18267 cf_add_libs="-lutil"
18268 # Filter out duplicates - this happens with badly-designed ".pc" files...
18269 for cf_add_1lib in $LIBS
18271 for cf_add_2lib in $cf_add_libs
18273 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18279 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18281 LIBS="$cf_add_libs"
18283 for cf_header in pty.h libutil.h util.h
18285 cat >conftest.$ac_ext <<_ACEOF
18286 #line 18286 "configure"
18287 #include "confdefs.h"
18289 #include <$cf_header>
18295 int x = openpty((int *)0, (int *)0, (char *)0,
18296 (struct termios *)0, (struct winsize *)0);
18302 rm -f conftest.$ac_objext conftest$ac_exeext
18303 if { (eval echo "$as_me:18303: \"$ac_link\"") >&5
18304 (eval $ac_link) 2>&5
18306 echo "$as_me:18306: \$? = $ac_status" >&5
18307 (exit $ac_status); } &&
18308 { ac_try='test -s conftest$ac_exeext'
18309 { (eval echo "$as_me:18309: \"$ac_try\"") >&5
18310 (eval $ac_try) 2>&5
18312 echo "$as_me:18312: \$? = $ac_status" >&5
18313 (exit $ac_status); }; }; then
18315 cf_cv_func_openpty=$cf_header
18319 echo "$as_me: failed program was:" >&5
18320 cat conftest.$ac_ext >&5
18322 cf_cv_func_openpty=no
18325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18327 LIBS="$cf_save_LIBS"
18330 echo "$as_me:18330: result: $cf_cv_func_openpty" >&5
18331 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18333 if test "$cf_cv_func_openpty" != no ; then
18335 cat >>confdefs.h <<EOF
18336 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18339 cat >>confdefs.h <<\EOF
18340 #define USE_XTERM_PTY 1
18343 if test "x$cf_cv_lib_util" = xyes ; then
18345 cf_add_libs="-lutil"
18346 # Filter out duplicates - this happens with badly-designed ".pc" files...
18347 for cf_add_1lib in $TEST_LIBS
18349 for cf_add_2lib in $cf_add_libs
18351 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18359 TEST_LIBS="$cf_add_libs"
18364 echo "$as_me:18364: checking for function curses_version" >&5
18365 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18366 if test "${cf_cv_func_curses_version+set}" = set; then
18367 echo $ECHO_N "(cached) $ECHO_C" >&6
18370 if test "$cross_compiling" = yes; then
18371 cf_cv_func_curses_version=unknown
18373 cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18377 #include <${cf_cv_ncurses_header:-curses.h}>
18381 sprintf(temp, "%s\n", curses_version());
18382 ${cf_cv_main_return:-return}(0);
18386 rm -f conftest$ac_exeext
18387 if { (eval echo "$as_me:18387: \"$ac_link\"") >&5
18388 (eval $ac_link) 2>&5
18390 echo "$as_me:18390: \$? = $ac_status" >&5
18391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18392 { (eval echo "$as_me:18392: \"$ac_try\"") >&5
18393 (eval $ac_try) 2>&5
18395 echo "$as_me:18395: \$? = $ac_status" >&5
18396 (exit $ac_status); }; }; then
18397 cf_cv_func_curses_version=yes
18400 echo "$as_me: program exited with status $ac_status" >&5
18401 echo "$as_me: failed program was:" >&5
18402 cat conftest.$ac_ext >&5
18403 cf_cv_func_curses_version=no
18406 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18410 echo "$as_me:18410: result: $cf_cv_func_curses_version" >&5
18411 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18412 test "$cf_cv_func_curses_version" = yes &&
18413 cat >>confdefs.h <<\EOF
18414 #define HAVE_CURSES_VERSION 1
18417 echo "$as_me:18417: checking for alternate character set array" >&5
18418 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18419 if test "${cf_cv_curses_acs_map+set}" = set; then
18420 echo $ECHO_N "(cached) $ECHO_C" >&6
18423 cf_cv_curses_acs_map=unknown
18424 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18426 cat >conftest.$ac_ext <<_ACEOF
18427 #line 18427 "configure"
18428 #include "confdefs.h"
18430 #include <${cf_cv_ncurses_header:-curses.h}>
18436 $name['k'] = ACS_PLUS
18442 rm -f conftest.$ac_objext conftest$ac_exeext
18443 if { (eval echo "$as_me:18443: \"$ac_link\"") >&5
18444 (eval $ac_link) 2>&5
18446 echo "$as_me:18446: \$? = $ac_status" >&5
18447 (exit $ac_status); } &&
18448 { ac_try='test -s conftest$ac_exeext'
18449 { (eval echo "$as_me:18449: \"$ac_try\"") >&5
18450 (eval $ac_try) 2>&5
18452 echo "$as_me:18452: \$? = $ac_status" >&5
18453 (exit $ac_status); }; }; then
18454 cf_cv_curses_acs_map=$name; break
18456 echo "$as_me: failed program was:" >&5
18457 cat conftest.$ac_ext >&5
18459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18463 echo "$as_me:18463: result: $cf_cv_curses_acs_map" >&5
18464 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18466 test "$cf_cv_curses_acs_map" != unknown &&
18467 cat >>confdefs.h <<EOF
18468 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18471 if test "$cf_enable_widec" = yes; then
18473 echo "$as_me:18473: checking for wide alternate character set array" >&5
18474 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18475 if test "${cf_cv_curses_wacs_map+set}" = set; then
18476 echo $ECHO_N "(cached) $ECHO_C" >&6
18479 cf_cv_curses_wacs_map=unknown
18480 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18482 cat >conftest.$ac_ext <<_ACEOF
18483 #line 18483 "configure"
18484 #include "confdefs.h"
18486 #ifndef _XOPEN_SOURCE_EXTENDED
18487 #define _XOPEN_SOURCE_EXTENDED
18489 #include <${cf_cv_ncurses_header:-curses.h}>
18493 void *foo = &($name['k'])
18498 rm -f conftest.$ac_objext conftest$ac_exeext
18499 if { (eval echo "$as_me:18499: \"$ac_link\"") >&5
18500 (eval $ac_link) 2>&5
18502 echo "$as_me:18502: \$? = $ac_status" >&5
18503 (exit $ac_status); } &&
18504 { ac_try='test -s conftest$ac_exeext'
18505 { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506 (eval $ac_try) 2>&5
18508 echo "$as_me:18508: \$? = $ac_status" >&5
18509 (exit $ac_status); }; }; then
18510 cf_cv_curses_wacs_map=$name
18513 echo "$as_me: failed program was:" >&5
18514 cat conftest.$ac_ext >&5
18516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18519 echo "$as_me:18519: result: $cf_cv_curses_wacs_map" >&5
18520 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18522 test "$cf_cv_curses_wacs_map" != unknown &&
18523 cat >>confdefs.h <<EOF
18524 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18527 echo "$as_me:18527: checking for wide alternate character constants" >&5
18528 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18529 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18530 echo $ECHO_N "(cached) $ECHO_C" >&6
18533 cf_cv_curses_wacs_symbols=no
18534 if test "$cf_cv_curses_wacs_map" != unknown
18536 cat >conftest.$ac_ext <<_ACEOF
18537 #line 18537 "configure"
18538 #include "confdefs.h"
18540 #ifndef _XOPEN_SOURCE_EXTENDED
18541 #define _XOPEN_SOURCE_EXTENDED
18543 #include <${cf_cv_ncurses_header:-curses.h}>
18547 cchar_t *foo = WACS_PLUS;
18548 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18553 rm -f conftest.$ac_objext conftest$ac_exeext
18554 if { (eval echo "$as_me:18554: \"$ac_link\"") >&5
18555 (eval $ac_link) 2>&5
18557 echo "$as_me:18557: \$? = $ac_status" >&5
18558 (exit $ac_status); } &&
18559 { ac_try='test -s conftest$ac_exeext'
18560 { (eval echo "$as_me:18560: \"$ac_try\"") >&5
18561 (eval $ac_try) 2>&5
18563 echo "$as_me:18563: \$? = $ac_status" >&5
18564 (exit $ac_status); }; }; then
18565 cf_cv_curses_wacs_symbols=yes
18567 echo "$as_me: failed program was:" >&5
18568 cat conftest.$ac_ext >&5
18570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18572 cat >conftest.$ac_ext <<_ACEOF
18573 #line 18573 "configure"
18574 #include "confdefs.h"
18576 #ifndef _XOPEN_SOURCE_EXTENDED
18577 #define _XOPEN_SOURCE_EXTENDED
18579 #include <${cf_cv_ncurses_header:-curses.h}>
18583 cchar_t *foo = WACS_PLUS
18588 rm -f conftest.$ac_objext conftest$ac_exeext
18589 if { (eval echo "$as_me:18589: \"$ac_link\"") >&5
18590 (eval $ac_link) 2>&5
18592 echo "$as_me:18592: \$? = $ac_status" >&5
18593 (exit $ac_status); } &&
18594 { ac_try='test -s conftest$ac_exeext'
18595 { (eval echo "$as_me:18595: \"$ac_try\"") >&5
18596 (eval $ac_try) 2>&5
18598 echo "$as_me:18598: \$? = $ac_status" >&5
18599 (exit $ac_status); }; }; then
18600 cf_cv_curses_wacs_symbols=yes
18602 echo "$as_me: failed program was:" >&5
18603 cat conftest.$ac_ext >&5
18605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18609 echo "$as_me:18609: result: $cf_cv_curses_wacs_symbols" >&5
18610 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18612 test "$cf_cv_curses_wacs_symbols" != no &&
18613 cat >>confdefs.h <<\EOF
18614 #define CURSES_WACS_SYMBOLS 1
18619 echo "$as_me:18619: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18620 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18621 cat >conftest.$ac_ext <<_ACEOF
18622 #line 18622 "configure"
18623 #include "confdefs.h"
18625 #ifndef _XOPEN_SOURCE_EXTENDED
18626 #define _XOPEN_SOURCE_EXTENDED
18628 #include <${cf_cv_ncurses_header:-curses.h}>
18639 rm -f conftest.$ac_objext
18640 if { (eval echo "$as_me:18640: \"$ac_compile\"") >&5
18641 (eval $ac_compile) 2>&5
18643 echo "$as_me:18643: \$? = $ac_status" >&5
18644 (exit $ac_status); } &&
18645 { ac_try='test -s conftest.$ac_objext'
18646 { (eval echo "$as_me:18646: \"$ac_try\"") >&5
18647 (eval $ac_try) 2>&5
18649 echo "$as_me:18649: \$? = $ac_status" >&5
18650 (exit $ac_status); }; }; then
18653 echo "$as_me: failed program was:" >&5
18654 cat conftest.$ac_ext >&5
18657 rm -f conftest.$ac_objext conftest.$ac_ext
18658 echo "$as_me:18658: result: $cf_result" >&5
18659 echo "${ECHO_T}$cf_result" >&6
18660 if test $cf_result = yes ; then
18662 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18664 cat >>confdefs.h <<EOF
18665 #define $cf_result 1
18670 cat >>confdefs.h <<EOF
18671 #define attr_t long
18676 if test "$cf_enable_widec" = yes; then
18678 # This is needed on Tru64 5.0 to declare mbstate_t
18679 echo "$as_me:18679: checking if we must include wchar.h to declare mbstate_t" >&5
18680 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18681 if test "${cf_cv_mbstate_t+set}" = set; then
18682 echo $ECHO_N "(cached) $ECHO_C" >&6
18685 cat >conftest.$ac_ext <<_ACEOF
18686 #line 18686 "configure"
18687 #include "confdefs.h"
18689 #include <stdlib.h>
18690 #include <stdarg.h>
18692 #ifdef HAVE_LIBUTF8_H
18693 #include <libutf8.h>
18703 rm -f conftest.$ac_objext
18704 if { (eval echo "$as_me:18704: \"$ac_compile\"") >&5
18705 (eval $ac_compile) 2>&5
18707 echo "$as_me:18707: \$? = $ac_status" >&5
18708 (exit $ac_status); } &&
18709 { ac_try='test -s conftest.$ac_objext'
18710 { (eval echo "$as_me:18710: \"$ac_try\"") >&5
18711 (eval $ac_try) 2>&5
18713 echo "$as_me:18713: \$? = $ac_status" >&5
18714 (exit $ac_status); }; }; then
18717 echo "$as_me: failed program was:" >&5
18718 cat conftest.$ac_ext >&5
18719 cat >conftest.$ac_ext <<_ACEOF
18720 #line 18720 "configure"
18721 #include "confdefs.h"
18723 #include <stdlib.h>
18724 #include <stdarg.h>
18727 #ifdef HAVE_LIBUTF8_H
18728 #include <libutf8.h>
18738 rm -f conftest.$ac_objext
18739 if { (eval echo "$as_me:18739: \"$ac_compile\"") >&5
18740 (eval $ac_compile) 2>&5
18742 echo "$as_me:18742: \$? = $ac_status" >&5
18743 (exit $ac_status); } &&
18744 { ac_try='test -s conftest.$ac_objext'
18745 { (eval echo "$as_me:18745: \"$ac_try\"") >&5
18746 (eval $ac_try) 2>&5
18748 echo "$as_me:18748: \$? = $ac_status" >&5
18749 (exit $ac_status); }; }; then
18750 cf_cv_mbstate_t=yes
18752 echo "$as_me: failed program was:" >&5
18753 cat conftest.$ac_ext >&5
18754 cf_cv_mbstate_t=unknown
18756 rm -f conftest.$ac_objext conftest.$ac_ext
18758 rm -f conftest.$ac_objext conftest.$ac_ext
18760 echo "$as_me:18760: result: $cf_cv_mbstate_t" >&5
18761 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18763 if test "$cf_cv_mbstate_t" = yes ; then
18765 cat >>confdefs.h <<\EOF
18766 #define NEED_WCHAR_H 1
18772 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18773 if test "$cf_cv_mbstate_t" = unknown ; then
18774 NCURSES_MBSTATE_T=1
18777 # if we find mbstate_t in either place, use substitution to provide a fallback.
18778 if test "$cf_cv_mbstate_t" != unknown ; then
18779 NCURSES_OK_MBSTATE_T=1
18782 # This is needed on Tru64 5.0 to declare wchar_t
18783 echo "$as_me:18783: checking if we must include wchar.h to declare wchar_t" >&5
18784 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18785 if test "${cf_cv_wchar_t+set}" = set; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18789 cat >conftest.$ac_ext <<_ACEOF
18790 #line 18790 "configure"
18791 #include "confdefs.h"
18793 #include <stdlib.h>
18794 #include <stdarg.h>
18796 #ifdef HAVE_LIBUTF8_H
18797 #include <libutf8.h>
18807 rm -f conftest.$ac_objext
18808 if { (eval echo "$as_me:18808: \"$ac_compile\"") >&5
18809 (eval $ac_compile) 2>&5
18811 echo "$as_me:18811: \$? = $ac_status" >&5
18812 (exit $ac_status); } &&
18813 { ac_try='test -s conftest.$ac_objext'
18814 { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815 (eval $ac_try) 2>&5
18817 echo "$as_me:18817: \$? = $ac_status" >&5
18818 (exit $ac_status); }; }; then
18821 echo "$as_me: failed program was:" >&5
18822 cat conftest.$ac_ext >&5
18823 cat >conftest.$ac_ext <<_ACEOF
18824 #line 18824 "configure"
18825 #include "confdefs.h"
18827 #include <stdlib.h>
18828 #include <stdarg.h>
18831 #ifdef HAVE_LIBUTF8_H
18832 #include <libutf8.h>
18842 rm -f conftest.$ac_objext
18843 if { (eval echo "$as_me:18843: \"$ac_compile\"") >&5
18844 (eval $ac_compile) 2>&5
18846 echo "$as_me:18846: \$? = $ac_status" >&5
18847 (exit $ac_status); } &&
18848 { ac_try='test -s conftest.$ac_objext'
18849 { (eval echo "$as_me:18849: \"$ac_try\"") >&5
18850 (eval $ac_try) 2>&5
18852 echo "$as_me:18852: \$? = $ac_status" >&5
18853 (exit $ac_status); }; }; then
18856 echo "$as_me: failed program was:" >&5
18857 cat conftest.$ac_ext >&5
18858 cf_cv_wchar_t=unknown
18860 rm -f conftest.$ac_objext conftest.$ac_ext
18862 rm -f conftest.$ac_objext conftest.$ac_ext
18864 echo "$as_me:18864: result: $cf_cv_wchar_t" >&5
18865 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18867 if test "$cf_cv_wchar_t" = yes ; then
18869 cat >>confdefs.h <<\EOF
18870 #define NEED_WCHAR_H 1
18876 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18877 if test "$cf_cv_wchar_t" = unknown ; then
18881 # if we find wchar_t in either place, use substitution to provide a fallback.
18882 if test "$cf_cv_wchar_t" != unknown ; then
18883 NCURSES_OK_WCHAR_T=1
18886 # This is needed on Tru64 5.0 to declare wint_t
18887 echo "$as_me:18887: checking if we must include wchar.h to declare wint_t" >&5
18888 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18889 if test "${cf_cv_wint_t+set}" = set; then
18890 echo $ECHO_N "(cached) $ECHO_C" >&6
18893 cat >conftest.$ac_ext <<_ACEOF
18894 #line 18894 "configure"
18895 #include "confdefs.h"
18897 #include <stdlib.h>
18898 #include <stdarg.h>
18900 #ifdef HAVE_LIBUTF8_H
18901 #include <libutf8.h>
18911 rm -f conftest.$ac_objext
18912 if { (eval echo "$as_me:18912: \"$ac_compile\"") >&5
18913 (eval $ac_compile) 2>&5
18915 echo "$as_me:18915: \$? = $ac_status" >&5
18916 (exit $ac_status); } &&
18917 { ac_try='test -s conftest.$ac_objext'
18918 { (eval echo "$as_me:18918: \"$ac_try\"") >&5
18919 (eval $ac_try) 2>&5
18921 echo "$as_me:18921: \$? = $ac_status" >&5
18922 (exit $ac_status); }; }; then
18925 echo "$as_me: failed program was:" >&5
18926 cat conftest.$ac_ext >&5
18927 cat >conftest.$ac_ext <<_ACEOF
18928 #line 18928 "configure"
18929 #include "confdefs.h"
18931 #include <stdlib.h>
18932 #include <stdarg.h>
18935 #ifdef HAVE_LIBUTF8_H
18936 #include <libutf8.h>
18946 rm -f conftest.$ac_objext
18947 if { (eval echo "$as_me:18947: \"$ac_compile\"") >&5
18948 (eval $ac_compile) 2>&5
18950 echo "$as_me:18950: \$? = $ac_status" >&5
18951 (exit $ac_status); } &&
18952 { ac_try='test -s conftest.$ac_objext'
18953 { (eval echo "$as_me:18953: \"$ac_try\"") >&5
18954 (eval $ac_try) 2>&5
18956 echo "$as_me:18956: \$? = $ac_status" >&5
18957 (exit $ac_status); }; }; then
18960 echo "$as_me: failed program was:" >&5
18961 cat conftest.$ac_ext >&5
18962 cf_cv_wint_t=unknown
18964 rm -f conftest.$ac_objext conftest.$ac_ext
18966 rm -f conftest.$ac_objext conftest.$ac_ext
18968 echo "$as_me:18968: result: $cf_cv_wint_t" >&5
18969 echo "${ECHO_T}$cf_cv_wint_t" >&6
18971 if test "$cf_cv_wint_t" = yes ; then
18973 cat >>confdefs.h <<\EOF
18974 #define NEED_WCHAR_H 1
18980 # if we do not find wint_t in either place, use substitution to provide a fallback.
18981 if test "$cf_cv_wint_t" = unknown ; then
18985 # if we find wint_t in either place, use substitution to provide a fallback.
18986 if test "$cf_cv_wint_t" != unknown ; then
18987 NCURSES_OK_WINT_T=1
18990 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
18992 echo "$as_me:18992: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18993 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18994 cat >conftest.$ac_ext <<_ACEOF
18995 #line 18995 "configure"
18996 #include "confdefs.h"
18998 #ifndef _XOPEN_SOURCE_EXTENDED
18999 #define _XOPEN_SOURCE_EXTENDED
19001 #include <${cf_cv_ncurses_header:-curses.h}>
19012 rm -f conftest.$ac_objext
19013 if { (eval echo "$as_me:19013: \"$ac_compile\"") >&5
19014 (eval $ac_compile) 2>&5
19016 echo "$as_me:19016: \$? = $ac_status" >&5
19017 (exit $ac_status); } &&
19018 { ac_try='test -s conftest.$ac_objext'
19019 { (eval echo "$as_me:19019: \"$ac_try\"") >&5
19020 (eval $ac_try) 2>&5
19022 echo "$as_me:19022: \$? = $ac_status" >&5
19023 (exit $ac_status); }; }; then
19026 echo "$as_me: failed program was:" >&5
19027 cat conftest.$ac_ext >&5
19030 rm -f conftest.$ac_objext conftest.$ac_ext
19031 echo "$as_me:19031: result: $cf_result" >&5
19032 echo "${ECHO_T}$cf_result" >&6
19033 if test $cf_result = yes ; then
19035 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19037 cat >>confdefs.h <<EOF
19038 #define $cf_result 1
19043 cat >>confdefs.h <<EOF
19044 #define mbstate_t long
19051 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19053 echo "$as_me:19053: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19054 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19055 cat >conftest.$ac_ext <<_ACEOF
19056 #line 19056 "configure"
19057 #include "confdefs.h"
19059 #ifndef _XOPEN_SOURCE_EXTENDED
19060 #define _XOPEN_SOURCE_EXTENDED
19062 #include <${cf_cv_ncurses_header:-curses.h}>
19073 rm -f conftest.$ac_objext
19074 if { (eval echo "$as_me:19074: \"$ac_compile\"") >&5
19075 (eval $ac_compile) 2>&5
19077 echo "$as_me:19077: \$? = $ac_status" >&5
19078 (exit $ac_status); } &&
19079 { ac_try='test -s conftest.$ac_objext'
19080 { (eval echo "$as_me:19080: \"$ac_try\"") >&5
19081 (eval $ac_try) 2>&5
19083 echo "$as_me:19083: \$? = $ac_status" >&5
19084 (exit $ac_status); }; }; then
19087 echo "$as_me: failed program was:" >&5
19088 cat conftest.$ac_ext >&5
19091 rm -f conftest.$ac_objext conftest.$ac_ext
19092 echo "$as_me:19092: result: $cf_result" >&5
19093 echo "${ECHO_T}$cf_result" >&6
19094 if test $cf_result = yes ; then
19096 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19098 cat >>confdefs.h <<EOF
19099 #define $cf_result 1
19104 cat >>confdefs.h <<EOF
19105 #define wchar_t long
19112 if test "$NCURSES_OK_WINT_T" = 0 ; then
19114 echo "$as_me:19114: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19115 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19116 cat >conftest.$ac_ext <<_ACEOF
19117 #line 19117 "configure"
19118 #include "confdefs.h"
19120 #ifndef _XOPEN_SOURCE_EXTENDED
19121 #define _XOPEN_SOURCE_EXTENDED
19123 #include <${cf_cv_ncurses_header:-curses.h}>
19134 rm -f conftest.$ac_objext
19135 if { (eval echo "$as_me:19135: \"$ac_compile\"") >&5
19136 (eval $ac_compile) 2>&5
19138 echo "$as_me:19138: \$? = $ac_status" >&5
19139 (exit $ac_status); } &&
19140 { ac_try='test -s conftest.$ac_objext'
19141 { (eval echo "$as_me:19141: \"$ac_try\"") >&5
19142 (eval $ac_try) 2>&5
19144 echo "$as_me:19144: \$? = $ac_status" >&5
19145 (exit $ac_status); }; }; then
19148 echo "$as_me: failed program was:" >&5
19149 cat conftest.$ac_ext >&5
19152 rm -f conftest.$ac_objext conftest.$ac_ext
19153 echo "$as_me:19153: result: $cf_result" >&5
19154 echo "${ECHO_T}$cf_result" >&6
19155 if test $cf_result = yes ; then
19157 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19159 cat >>confdefs.h <<EOF
19160 #define $cf_result 1
19165 cat >>confdefs.h <<EOF
19166 #define wint_t long
19181 echo "$as_me:19181: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19182 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19184 cat >conftest.$ac_ext <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19188 #ifdef HAVE_XCURSES
19189 #include <xcurses.h>
19190 char * XCursesProgramName = "test";
19192 #include <${cf_cv_ncurses_header:-curses.h}>
19193 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19194 #include <ncursesw/term.h>
19195 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19196 #include <ncurses/term.h>
19197 #elif defined(HAVE_TERM_H)
19206 void *foo = &($cf_data)
19212 rm -f conftest.$ac_objext
19213 if { (eval echo "$as_me:19213: \"$ac_compile\"") >&5
19214 (eval $ac_compile) 2>&5
19216 echo "$as_me:19216: \$? = $ac_status" >&5
19217 (exit $ac_status); } &&
19218 { ac_try='test -s conftest.$ac_objext'
19219 { (eval echo "$as_me:19219: \"$ac_try\"") >&5
19220 (eval $ac_try) 2>&5
19222 echo "$as_me:19222: \$? = $ac_status" >&5
19223 (exit $ac_status); }; }; then
19227 echo "$as_me: failed program was:" >&5
19228 cat conftest.$ac_ext >&5
19231 rm -f conftest.$ac_objext conftest.$ac_ext
19232 echo "$as_me:19232: result: $cf_result" >&5
19233 echo "${ECHO_T}$cf_result" >&6
19235 if test $cf_result = yes ; then
19237 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19239 cat >>confdefs.h <<EOF
19240 #define $cf_result 1
19244 echo "$as_me:19244: checking for data $cf_data in library" >&5
19245 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19246 # BSD linkers insist on making weak linkage, but resolve at runtime.
19247 if test "$cross_compiling" = yes; then
19250 cat >conftest.$ac_ext <<_ACEOF
19251 #line 19251 "configure"
19252 #include "confdefs.h"
19254 #ifdef HAVE_XCURSES
19255 #include <xcurses.h>
19256 char * XCursesProgramName = "test";
19258 #include <${cf_cv_ncurses_header:-curses.h}>
19259 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19260 #include <ncursesw/term.h>
19261 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19262 #include <ncurses/term.h>
19263 #elif defined(HAVE_TERM_H)
19268 extern char $cf_data;
19274 void *foo = &($cf_data);
19275 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19276 ${cf_cv_main_return:-return}(foo == 0);
19283 rm -f conftest.$ac_objext conftest$ac_exeext
19284 if { (eval echo "$as_me:19284: \"$ac_link\"") >&5
19285 (eval $ac_link) 2>&5
19287 echo "$as_me:19287: \$? = $ac_status" >&5
19288 (exit $ac_status); } &&
19289 { ac_try='test -s conftest$ac_exeext'
19290 { (eval echo "$as_me:19290: \"$ac_try\"") >&5
19291 (eval $ac_try) 2>&5
19293 echo "$as_me:19293: \$? = $ac_status" >&5
19294 (exit $ac_status); }; }; then
19297 echo "$as_me: failed program was:" >&5
19298 cat conftest.$ac_ext >&5
19301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19304 cat >conftest.$ac_ext <<_ACEOF
19305 #line 19305 "configure"
19306 #include "confdefs.h"
19308 #ifdef HAVE_XCURSES
19309 #include <xcurses.h>
19310 char * XCursesProgramName = "test";
19312 #include <${cf_cv_ncurses_header:-curses.h}>
19313 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19314 #include <ncursesw/term.h>
19315 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19316 #include <ncurses/term.h>
19317 #elif defined(HAVE_TERM_H)
19322 extern char $cf_data;
19325 void *foo = &($cf_data);
19326 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19327 ${cf_cv_main_return:-return}(foo == 0);
19330 rm -f conftest$ac_exeext
19331 if { (eval echo "$as_me:19331: \"$ac_link\"") >&5
19332 (eval $ac_link) 2>&5
19334 echo "$as_me:19334: \$? = $ac_status" >&5
19335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19336 { (eval echo "$as_me:19336: \"$ac_try\"") >&5
19337 (eval $ac_try) 2>&5
19339 echo "$as_me:19339: \$? = $ac_status" >&5
19340 (exit $ac_status); }; }; then
19344 echo "$as_me: program exited with status $ac_status" >&5
19345 echo "$as_me: failed program was:" >&5
19346 cat conftest.$ac_ext >&5
19349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19351 echo "$as_me:19351: result: $cf_result" >&5
19352 echo "${ECHO_T}$cf_result" >&6
19353 if test $cf_result = yes ; then
19355 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19357 cat >>confdefs.h <<EOF
19358 #define $cf_result 1
19361 # do not exit loop here, since we prefer system's declarations
19366 if ( test "$GCC" = yes || test "$GXX" = yes )
19368 echo "$as_me:19368: checking if you want to turn on gcc warnings" >&5
19369 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19371 # Check whether --enable-warnings or --disable-warnings was given.
19372 if test "${enable_warnings+set}" = set; then
19373 enableval="$enable_warnings"
19374 test "$enableval" != yes && enableval=no
19375 if test "$enableval" != "no" ; then
19385 echo "$as_me:19385: result: $with_warnings" >&5
19386 echo "${ECHO_T}$with_warnings" >&6
19387 if test "$with_warnings" = "yes"
19390 if test "$GCC" = yes
19392 cat > conftest.i <<EOF
19394 #define GCC_PRINTF 0
19397 #define GCC_SCANF 0
19399 #ifndef GCC_NORETURN
19400 #define GCC_NORETURN /* nothing */
19403 #define GCC_UNUSED /* nothing */
19406 if test "$GCC" = yes
19408 { echo "$as_me:19408: checking for $CC __attribute__ directives..." >&5
19409 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19410 cat > conftest.$ac_ext <<EOF
19411 #line 19411 "${as_me:-configure}"
19412 #include "confdefs.h"
19413 #include "conftest.h"
19414 #include "conftest.i"
19416 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19418 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19421 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19423 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19425 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19426 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19427 extern void foo(void) GCC_NORETURN;
19428 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19430 cf_printf_attribute=no
19431 cf_scanf_attribute=no
19432 for cf_attribute in scanf printf unused noreturn
19435 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19437 cf_directive="__attribute__(($cf_attribute))"
19438 echo "checking for $CC $cf_directive" 1>&5
19440 case $cf_attribute in
19442 cf_printf_attribute=yes
19443 cat >conftest.h <<EOF
19444 #define GCC_$cf_ATTRIBUTE 1
19448 cf_scanf_attribute=yes
19449 cat >conftest.h <<EOF
19450 #define GCC_$cf_ATTRIBUTE 1
19454 cat >conftest.h <<EOF
19455 #define GCC_$cf_ATTRIBUTE $cf_directive
19460 if { (eval echo "$as_me:19460: \"$ac_compile\"") >&5
19461 (eval $ac_compile) 2>&5
19463 echo "$as_me:19463: \$? = $ac_status" >&5
19464 (exit $ac_status); }; then
19465 test -n "$verbose" && echo "$as_me:19465: result: ... $cf_attribute" >&5
19466 echo "${ECHO_T}... $cf_attribute" >&6
19467 cat conftest.h >>confdefs.h
19468 case $cf_attribute in
19471 cat >>confdefs.h <<EOF
19472 #define GCC_NORETURN $cf_directive
19477 cf_value='/* nothing */'
19478 if test "$cf_printf_attribute" != no ; then
19479 cf_value='__attribute__((format(printf,fmt,var)))'
19481 cat >>confdefs.h <<\EOF
19482 #define GCC_PRINTF 1
19487 cat >>confdefs.h <<EOF
19488 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19493 cf_value='/* nothing */'
19494 if test "$cf_scanf_attribute" != no ; then
19495 cf_value='__attribute__((format(scanf,fmt,var)))'
19497 cat >>confdefs.h <<\EOF
19498 #define GCC_SCANF 1
19503 cat >>confdefs.h <<EOF
19504 #define GCC_SCANFLIKE(fmt,var) $cf_value
19510 cat >>confdefs.h <<EOF
19511 #define GCC_UNUSED $cf_directive
19519 fgrep define conftest.i >>confdefs.h
19526 if test "$GCC" = yes ; then
19529 echo "$as_me:19529: checking if this is really Intel C compiler" >&5
19530 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
19531 cf_save_CFLAGS="$CFLAGS"
19532 CFLAGS="$CFLAGS -no-gcc"
19533 cat >conftest.$ac_ext <<_ACEOF
19534 #line 19534 "configure"
19535 #include "confdefs.h"
19541 #ifdef __INTEL_COMPILER
19550 rm -f conftest.$ac_objext
19551 if { (eval echo "$as_me:19551: \"$ac_compile\"") >&5
19552 (eval $ac_compile) 2>&5
19554 echo "$as_me:19554: \$? = $ac_status" >&5
19555 (exit $ac_status); } &&
19556 { ac_try='test -s conftest.$ac_objext'
19557 { (eval echo "$as_me:19557: \"$ac_try\"") >&5
19558 (eval $ac_try) 2>&5
19560 echo "$as_me:19560: \$? = $ac_status" >&5
19561 (exit $ac_status); }; }; then
19563 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
19566 echo "$as_me: failed program was:" >&5
19567 cat conftest.$ac_ext >&5
19569 rm -f conftest.$ac_objext conftest.$ac_ext
19570 CFLAGS="$cf_save_CFLAGS"
19571 echo "$as_me:19571: result: $INTEL_COMPILER" >&5
19572 echo "${ECHO_T}$INTEL_COMPILER" >&6
19579 if test "$GCC" = yes ; then
19580 echo "$as_me:19580: checking if this is really Clang C compiler" >&5
19581 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
19582 cf_save_CFLAGS="$CFLAGS"
19583 CFLAGS="$CFLAGS -Qunused-arguments"
19584 cat >conftest.$ac_ext <<_ACEOF
19585 #line 19585 "configure"
19586 #include "confdefs.h"
19601 rm -f conftest.$ac_objext
19602 if { (eval echo "$as_me:19602: \"$ac_compile\"") >&5
19603 (eval $ac_compile) 2>&5
19605 echo "$as_me:19605: \$? = $ac_status" >&5
19606 (exit $ac_status); } &&
19607 { ac_try='test -s conftest.$ac_objext'
19608 { (eval echo "$as_me:19608: \"$ac_try\"") >&5
19609 (eval $ac_try) 2>&5
19611 echo "$as_me:19611: \$? = $ac_status" >&5
19612 (exit $ac_status); }; }; then
19614 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
19617 echo "$as_me: failed program was:" >&5
19618 cat conftest.$ac_ext >&5
19620 rm -f conftest.$ac_objext conftest.$ac_ext
19621 CFLAGS="$cf_save_CFLAGS"
19622 echo "$as_me:19622: result: $CLANG_COMPILER" >&5
19623 echo "${ECHO_T}$CLANG_COMPILER" >&6
19626 cat > conftest.$ac_ext <<EOF
19627 #line 19627 "${as_me:-configure}"
19628 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19631 if test "$INTEL_COMPILER" = yes
19633 # The "-wdXXX" options suppress warnings:
19634 # remark #1419: external declaration in primary source file
19635 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19636 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19637 # remark #193: zero used for undefined preprocessing identifier
19638 # remark #593: variable "curs_sb_left_arrow" was set but never used
19639 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19640 # remark #869: parameter "tw" was never referenced
19641 # remark #981: operands are evaluated in unspecified order
19642 # warning #279: controlling expression is constant
19644 { echo "$as_me:19644: checking for $CC warning options..." >&5
19645 echo "$as_me: checking for $CC warning options..." >&6;}
19646 cf_save_CFLAGS="$CFLAGS"
19647 EXTRA_CFLAGS="-Wall"
19659 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19660 if { (eval echo "$as_me:19660: \"$ac_compile\"") >&5
19661 (eval $ac_compile) 2>&5
19663 echo "$as_me:19663: \$? = $ac_status" >&5
19664 (exit $ac_status); }; then
19665 test -n "$verbose" && echo "$as_me:19665: result: ... -$cf_opt" >&5
19666 echo "${ECHO_T}... -$cf_opt" >&6
19667 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19670 CFLAGS="$cf_save_CFLAGS"
19672 elif test "$GCC" = yes
19674 { echo "$as_me:19674: checking for $CC warning options..." >&5
19675 echo "$as_me: checking for $CC warning options..." >&6;}
19676 cf_save_CFLAGS="$CFLAGS"
19679 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19680 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19681 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19682 for cf_opt in W Wall \
19683 Wbad-function-cast \
19686 Wdeclaration-after-statement \
19689 Wmissing-declarations \
19690 Wmissing-prototypes \
19694 Wstrict-prototypes \
19695 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19697 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19698 if { (eval echo "$as_me:19698: \"$ac_compile\"") >&5
19699 (eval $ac_compile) 2>&5
19701 echo "$as_me:19701: \$? = $ac_status" >&5
19702 (exit $ac_status); }; then
19703 test -n "$verbose" && echo "$as_me:19703: result: ... -$cf_opt" >&5
19704 echo "${ECHO_T}... -$cf_opt" >&6
19708 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19709 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19713 case $GCC_VERSION in
19715 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19717 echo "${as_me:-configure}:19717: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19723 case $GCC_VERSION in
19725 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19727 echo "${as_me:-configure}:19727: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19733 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19736 CFLAGS="$cf_save_CFLAGS"
19743 echo "$as_me:19743: checking if you want to use dmalloc for testing" >&5
19744 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19746 # Check whether --with-dmalloc or --without-dmalloc was given.
19747 if test "${with_dmalloc+set}" = set; then
19748 withval="$with_dmalloc"
19750 cat >>confdefs.h <<EOF
19751 #define USE_DMALLOC 1
19754 : ${with_cflags:=-g}
19755 : ${with_no_leaks:=yes}
19760 echo "$as_me:19760: result: ${with_dmalloc:-no}" >&5
19761 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19763 case .$with_cflags in
19773 cf_new_extra_cppflags=
19775 for cf_add_cflags in -g
19777 case $cf_fix_cppflags in
19779 case $cf_add_cflags in
19780 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19781 case $cf_add_cflags in
19783 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19786 && test -z "${cf_tst_cflags}" \
19787 && cf_fix_cppflags=yes
19789 if test $cf_fix_cppflags = yes ; then
19791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19795 elif test "${cf_tst_cflags}" = "\"'" ; 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"
19804 case "$CPPFLAGS" in
19808 case $cf_add_cflags in
19810 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19812 CPPFLAGS=`echo "$CPPFLAGS" | \
19813 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19814 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19819 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19820 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19827 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19828 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19838 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19841 && test -z "${cf_tst_cflags}" \
19842 && cf_fix_cppflags=no
19847 if test -n "$cf_new_cflags" ; then
19849 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19850 CFLAGS="${CFLAGS}$cf_new_cflags"
19854 if test -n "$cf_new_cppflags" ; then
19856 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19857 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19861 if test -n "$cf_new_extra_cppflags" ; then
19863 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19864 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19873 if test "$with_dmalloc" = yes ; then
19874 echo "$as_me:19874: checking for dmalloc.h" >&5
19875 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19876 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19877 echo $ECHO_N "(cached) $ECHO_C" >&6
19879 cat >conftest.$ac_ext <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19882 #include <dmalloc.h>
19884 if { (eval echo "$as_me:19884: \"$ac_cpp conftest.$ac_ext\"") >&5
19885 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19887 egrep -v '^ *\+' conftest.er1 >conftest.err
19889 cat conftest.err >&5
19890 echo "$as_me:19890: \$? = $ac_status" >&5
19891 (exit $ac_status); } >/dev/null; then
19892 if test -s conftest.err; then
19893 ac_cpp_err=$ac_c_preproc_warn_flag
19900 if test -z "$ac_cpp_err"; then
19901 ac_cv_header_dmalloc_h=yes
19903 echo "$as_me: failed program was:" >&5
19904 cat conftest.$ac_ext >&5
19905 ac_cv_header_dmalloc_h=no
19907 rm -f conftest.err conftest.$ac_ext
19909 echo "$as_me:19909: result: $ac_cv_header_dmalloc_h" >&5
19910 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19911 if test $ac_cv_header_dmalloc_h = yes; then
19913 echo "$as_me:19913: checking for dmalloc_debug in -ldmalloc" >&5
19914 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19915 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19916 echo $ECHO_N "(cached) $ECHO_C" >&6
19918 ac_check_lib_save_LIBS=$LIBS
19919 LIBS="-ldmalloc $LIBS"
19920 cat >conftest.$ac_ext <<_ACEOF
19921 #line 19921 "configure"
19922 #include "confdefs.h"
19924 /* Override any gcc2 internal prototype to avoid an error. */
19928 /* We use char because int might match the return type of a gcc2
19929 builtin and then its argument prototype would still apply. */
19930 char dmalloc_debug ();
19939 rm -f conftest.$ac_objext conftest$ac_exeext
19940 if { (eval echo "$as_me:19940: \"$ac_link\"") >&5
19941 (eval $ac_link) 2>&5
19943 echo "$as_me:19943: \$? = $ac_status" >&5
19944 (exit $ac_status); } &&
19945 { ac_try='test -s conftest$ac_exeext'
19946 { (eval echo "$as_me:19946: \"$ac_try\"") >&5
19947 (eval $ac_try) 2>&5
19949 echo "$as_me:19949: \$? = $ac_status" >&5
19950 (exit $ac_status); }; }; then
19951 ac_cv_lib_dmalloc_dmalloc_debug=yes
19953 echo "$as_me: failed program was:" >&5
19954 cat conftest.$ac_ext >&5
19955 ac_cv_lib_dmalloc_dmalloc_debug=no
19957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19958 LIBS=$ac_check_lib_save_LIBS
19960 echo "$as_me:19960: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19961 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19962 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19963 cat >>confdefs.h <<EOF
19964 #define HAVE_LIBDMALLOC 1
19967 LIBS="-ldmalloc $LIBS"
19975 echo "$as_me:19975: checking if you want to use dbmalloc for testing" >&5
19976 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19978 # Check whether --with-dbmalloc or --without-dbmalloc was given.
19979 if test "${with_dbmalloc+set}" = set; then
19980 withval="$with_dbmalloc"
19982 cat >>confdefs.h <<EOF
19983 #define USE_DBMALLOC 1
19986 : ${with_cflags:=-g}
19987 : ${with_no_leaks:=yes}
19992 echo "$as_me:19992: result: ${with_dbmalloc:-no}" >&5
19993 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
19995 case .$with_cflags in
20005 cf_new_extra_cppflags=
20007 for cf_add_cflags in -g
20009 case $cf_fix_cppflags in
20011 case $cf_add_cflags in
20012 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20013 case $cf_add_cflags in
20015 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20017 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20018 && test -z "${cf_tst_cflags}" \
20019 && cf_fix_cppflags=yes
20021 if test $cf_fix_cppflags = yes ; then
20023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20027 elif test "${cf_tst_cflags}" = "\"'" ; 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"
20036 case "$CPPFLAGS" in
20040 case $cf_add_cflags in
20042 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20044 CPPFLAGS=`echo "$CPPFLAGS" | \
20045 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20046 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20051 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20052 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20059 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20060 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20067 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20068 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20070 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20072 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20073 && test -z "${cf_tst_cflags}" \
20074 && cf_fix_cppflags=no
20079 if test -n "$cf_new_cflags" ; then
20081 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20082 CFLAGS="${CFLAGS}$cf_new_cflags"
20086 if test -n "$cf_new_cppflags" ; then
20088 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20089 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20093 if test -n "$cf_new_extra_cppflags" ; then
20095 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20096 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20105 if test "$with_dbmalloc" = yes ; then
20106 echo "$as_me:20106: checking for dbmalloc.h" >&5
20107 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20108 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20109 echo $ECHO_N "(cached) $ECHO_C" >&6
20111 cat >conftest.$ac_ext <<_ACEOF
20112 #line 20112 "configure"
20113 #include "confdefs.h"
20114 #include <dbmalloc.h>
20116 if { (eval echo "$as_me:20116: \"$ac_cpp conftest.$ac_ext\"") >&5
20117 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20119 egrep -v '^ *\+' conftest.er1 >conftest.err
20121 cat conftest.err >&5
20122 echo "$as_me:20122: \$? = $ac_status" >&5
20123 (exit $ac_status); } >/dev/null; then
20124 if test -s conftest.err; then
20125 ac_cpp_err=$ac_c_preproc_warn_flag
20132 if test -z "$ac_cpp_err"; then
20133 ac_cv_header_dbmalloc_h=yes
20135 echo "$as_me: failed program was:" >&5
20136 cat conftest.$ac_ext >&5
20137 ac_cv_header_dbmalloc_h=no
20139 rm -f conftest.err conftest.$ac_ext
20141 echo "$as_me:20141: result: $ac_cv_header_dbmalloc_h" >&5
20142 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20143 if test $ac_cv_header_dbmalloc_h = yes; then
20145 echo "$as_me:20145: checking for debug_malloc in -ldbmalloc" >&5
20146 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20147 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20148 echo $ECHO_N "(cached) $ECHO_C" >&6
20150 ac_check_lib_save_LIBS=$LIBS
20151 LIBS="-ldbmalloc $LIBS"
20152 cat >conftest.$ac_ext <<_ACEOF
20153 #line 20153 "configure"
20154 #include "confdefs.h"
20156 /* Override any gcc2 internal prototype to avoid an error. */
20160 /* We use char because int might match the return type of a gcc2
20161 builtin and then its argument prototype would still apply. */
20162 char debug_malloc ();
20171 rm -f conftest.$ac_objext conftest$ac_exeext
20172 if { (eval echo "$as_me:20172: \"$ac_link\"") >&5
20173 (eval $ac_link) 2>&5
20175 echo "$as_me:20175: \$? = $ac_status" >&5
20176 (exit $ac_status); } &&
20177 { ac_try='test -s conftest$ac_exeext'
20178 { (eval echo "$as_me:20178: \"$ac_try\"") >&5
20179 (eval $ac_try) 2>&5
20181 echo "$as_me:20181: \$? = $ac_status" >&5
20182 (exit $ac_status); }; }; then
20183 ac_cv_lib_dbmalloc_debug_malloc=yes
20185 echo "$as_me: failed program was:" >&5
20186 cat conftest.$ac_ext >&5
20187 ac_cv_lib_dbmalloc_debug_malloc=no
20189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20190 LIBS=$ac_check_lib_save_LIBS
20192 echo "$as_me:20192: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20193 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20194 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20195 cat >>confdefs.h <<EOF
20196 #define HAVE_LIBDBMALLOC 1
20199 LIBS="-ldbmalloc $LIBS"
20207 echo "$as_me:20207: checking if you want to use valgrind for testing" >&5
20208 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20210 # Check whether --with-valgrind or --without-valgrind was given.
20211 if test "${with_valgrind+set}" = set; then
20212 withval="$with_valgrind"
20214 cat >>confdefs.h <<EOF
20215 #define USE_VALGRIND 1
20218 : ${with_cflags:=-g}
20219 : ${with_no_leaks:=yes}
20224 echo "$as_me:20224: result: ${with_valgrind:-no}" >&5
20225 echo "${ECHO_T}${with_valgrind:-no}" >&6
20227 case .$with_cflags in
20237 cf_new_extra_cppflags=
20239 for cf_add_cflags in -g
20241 case $cf_fix_cppflags in
20243 case $cf_add_cflags in
20244 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20245 case $cf_add_cflags in
20247 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20249 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20250 && test -z "${cf_tst_cflags}" \
20251 && cf_fix_cppflags=yes
20253 if test $cf_fix_cppflags = yes ; then
20255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20259 elif test "${cf_tst_cflags}" = "\"'" ; 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"
20268 case "$CPPFLAGS" in
20272 case $cf_add_cflags in
20274 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20276 CPPFLAGS=`echo "$CPPFLAGS" | \
20277 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20278 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20283 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20284 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20291 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20292 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20302 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20304 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20305 && test -z "${cf_tst_cflags}" \
20306 && cf_fix_cppflags=no
20311 if test -n "$cf_new_cflags" ; then
20313 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20314 CFLAGS="${CFLAGS}$cf_new_cflags"
20318 if test -n "$cf_new_cppflags" ; then
20320 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20321 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20325 if test -n "$cf_new_extra_cppflags" ; then
20327 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20328 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20337 echo "$as_me:20337: checking if you want to perform memory-leak testing" >&5
20338 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20340 # Check whether --enable-leaks or --disable-leaks was given.
20341 if test "${enable_leaks+set}" = set; then
20342 enableval="$enable_leaks"
20343 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20345 : ${with_no_leaks:=no}
20347 echo "$as_me:20347: result: $with_no_leaks" >&5
20348 echo "${ECHO_T}$with_no_leaks" >&6
20350 if test "$with_no_leaks" = yes ; then
20352 cat >>confdefs.h <<\EOF
20356 cat >>confdefs.h <<\EOF
20357 #define YY_NO_LEAKS 1
20363 if test "x$cf_cv_enable_rpath" != xno
20365 echo "$as_me:20365: checking for an rpath option" >&5
20366 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20367 case $cf_cv_system_name in
20369 if test "$GCC" = yes; then
20370 LD_RPATH_OPT="-Wl,-rpath,"
20372 LD_RPATH_OPT="-rpath "
20375 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20376 LD_RPATH_OPT="-Wl,-rpath,"
20378 (openbsd[2-9].*|mirbsd*)
20379 LD_RPATH_OPT="-Wl,-rpath,"
20382 LD_RPATH_OPT="-rpath "
20385 LD_RPATH_OPT="-Wl,-rpath,"
20388 LD_RPATH_OPT="-rpath "
20396 echo "$as_me:20396: result: $LD_RPATH_OPT" >&5
20397 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20399 case "x$LD_RPATH_OPT" in
20401 echo "$as_me:20401: checking if we need a space after rpath option" >&5
20402 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20403 cf_save_LIBS="$LIBS"
20405 cf_add_libs="${LD_RPATH_OPT}$libdir"
20406 # Filter out duplicates - this happens with badly-designed ".pc" files...
20407 for cf_add_1lib in $LIBS
20409 for cf_add_2lib in $cf_add_libs
20411 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20417 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20419 LIBS="$cf_add_libs"
20421 cat >conftest.$ac_ext <<_ACEOF
20422 #line 20422 "configure"
20423 #include "confdefs.h"
20433 rm -f conftest.$ac_objext conftest$ac_exeext
20434 if { (eval echo "$as_me:20434: \"$ac_link\"") >&5
20435 (eval $ac_link) 2>&5
20437 echo "$as_me:20437: \$? = $ac_status" >&5
20438 (exit $ac_status); } &&
20439 { ac_try='test -s conftest$ac_exeext'
20440 { (eval echo "$as_me:20440: \"$ac_try\"") >&5
20441 (eval $ac_try) 2>&5
20443 echo "$as_me:20443: \$? = $ac_status" >&5
20444 (exit $ac_status); }; }; then
20447 echo "$as_me: failed program was:" >&5
20448 cat conftest.$ac_ext >&5
20451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20452 LIBS="$cf_save_LIBS"
20453 echo "$as_me:20453: result: $cf_rpath_space" >&5
20454 echo "${ECHO_T}$cf_rpath_space" >&6
20455 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20460 echo "$as_me:20460: checking if rpath-hack should be disabled" >&5
20461 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20463 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20464 if test "${enable_rpath_hack+set}" = set; then
20465 enableval="$enable_rpath_hack"
20466 test "$enableval" != no && enableval=yes
20467 if test "$enableval" != "yes" ; then
20468 cf_disable_rpath_hack=yes
20470 cf_disable_rpath_hack=no
20474 cf_disable_rpath_hack=no
20477 echo "$as_me:20477: result: $cf_disable_rpath_hack" >&5
20478 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20479 if test "$cf_disable_rpath_hack" = no ; then
20481 echo "$as_me:20481: checking for updated LDFLAGS" >&5
20482 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20483 if test -n "$LD_RPATH_OPT" ; then
20484 echo "$as_me:20484: result: maybe" >&5
20485 echo "${ECHO_T}maybe" >&6
20489 # Extract the first word of "$ac_prog", so it can be a program name with args.
20490 set dummy $ac_prog; ac_word=$2
20491 echo "$as_me:20491: checking for $ac_word" >&5
20492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20493 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20494 echo $ECHO_N "(cached) $ECHO_C" >&6
20496 if test -n "$cf_ldd_prog"; then
20497 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20499 ac_save_IFS=$IFS; IFS=$ac_path_separator
20501 for ac_dir in $ac_dummy; do
20503 test -z "$ac_dir" && ac_dir=.
20504 $as_executable_p "$ac_dir/$ac_word" || continue
20505 ac_cv_prog_cf_ldd_prog="$ac_prog"
20506 echo "$as_me:20506: found $ac_dir/$ac_word" >&5
20512 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20513 if test -n "$cf_ldd_prog"; then
20514 echo "$as_me:20514: result: $cf_ldd_prog" >&5
20515 echo "${ECHO_T}$cf_ldd_prog" >&6
20517 echo "$as_me:20517: result: no" >&5
20518 echo "${ECHO_T}no" >&6
20521 test -n "$cf_ldd_prog" && break
20523 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20525 cf_rpath_list="/usr/lib /lib"
20526 if test "$cf_ldd_prog" != no
20530 cat >conftest.$ac_ext <<_ACEOF
20531 #line 20531 "configure"
20532 #include "confdefs.h"
20542 rm -f conftest.$ac_objext conftest$ac_exeext
20543 if { (eval echo "$as_me:20543: \"$ac_link\"") >&5
20544 (eval $ac_link) 2>&5
20546 echo "$as_me:20546: \$? = $ac_status" >&5
20547 (exit $ac_status); } &&
20548 { ac_try='test -s conftest$ac_exeext'
20549 { (eval echo "$as_me:20549: \"$ac_try\"") >&5
20550 (eval $ac_try) 2>&5
20552 echo "$as_me:20552: \$? = $ac_status" >&5
20553 (exit $ac_status); }; }; then
20554 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20555 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20557 echo "$as_me: failed program was:" >&5
20558 cat conftest.$ac_ext >&5
20560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20562 # If we passed the link-test, but get a "not found" on a given library,
20563 # this could be due to inept reconfiguration of gcc to make it only
20564 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20565 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20566 # /usr/local libraries.
20567 if test -n "$cf_rpath_oops"
20569 for cf_rpath_src in $cf_rpath_oops
20571 for cf_rpath_dir in \
20576 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20578 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20580 echo "${as_me:-configure}:20580: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20582 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20590 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20592 echo "${as_me:-configure}:20592: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20594 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20596 echo "${as_me:-configure}:20596: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20599 for cf_rpath_src in $LDFLAGS
20601 case $cf_rpath_src in
20604 # check if this refers to a directory which we will ignore
20606 if test -n "$cf_rpath_list"
20608 for cf_rpath_item in $cf_rpath_list
20610 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20618 if test "$cf_rpath_skip" = no
20620 # transform the option
20621 if test "$LD_RPATH_OPT" = "-R " ; then
20622 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20624 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20627 # if we have not already added this, add it now
20628 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20629 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20631 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20633 echo "${as_me:-configure}:20633: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20635 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20640 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20642 LDFLAGS=$cf_rpath_dst
20644 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20646 echo "${as_me:-configure}:20646: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20648 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20650 echo "${as_me:-configure}:20650: testing ...checking LIBS $LIBS ..." 1>&5
20653 for cf_rpath_src in $LIBS
20655 case $cf_rpath_src in
20658 # check if this refers to a directory which we will ignore
20660 if test -n "$cf_rpath_list"
20662 for cf_rpath_item in $cf_rpath_list
20664 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20672 if test "$cf_rpath_skip" = no
20674 # transform the option
20675 if test "$LD_RPATH_OPT" = "-R " ; then
20676 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20678 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20681 # if we have not already added this, add it now
20682 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20683 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20685 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20687 echo "${as_me:-configure}:20687: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20689 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20694 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20698 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20700 echo "${as_me:-configure}:20700: testing ...checked LIBS $LIBS ..." 1>&5
20702 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20704 echo "${as_me:-configure}:20704: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20707 echo "$as_me:20707: result: no" >&5
20708 echo "${ECHO_T}no" >&6
20716 ac_config_files="$ac_config_files Makefile"
20717 ac_config_commands="$ac_config_commands default"
20718 cat >confcache <<\_ACEOF
20719 # This file is a shell script that caches the results of configure
20720 # tests run on this system so they can be shared between configure
20721 # scripts and configure runs, see configure's option --config-cache.
20722 # It is not useful on other systems. If it contains results you don't
20723 # want to keep, you may remove or edit it.
20725 # config.status only pays attention to the cache file if you give it
20726 # the --recheck option to rerun configure.
20728 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20729 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20730 # following values.
20734 # The following way of writing the cache mishandles newlines in values,
20735 # but we know of no workaround that is simple, portable, and efficient.
20736 # So, don't put newlines in cache variables' values.
20737 # Ultrix sh set writes to stderr and can't be redirected directly,
20738 # and sets the high bit in the cache file unless we assign to the vars.
20741 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20743 # `set' does not quote correctly, so add quotes (double-quote
20744 # substitution turns \\\\ into \\, and sed turns \\ into \).
20747 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20750 # `set' quotes correctly as required by POSIX, so do not add quotes.
20752 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20759 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20761 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20763 if cmp -s $cache_file confcache; then :; else
20764 if test -w $cache_file; then
20765 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20766 cat confcache >$cache_file
20768 echo "not updating unwritable cache $cache_file"
20773 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20774 # Let make expand exec_prefix.
20775 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20777 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20778 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20779 # trailing colons and then remove the whole line if VPATH becomes empty
20780 # (actually we leave an empty line to preserve line numbers).
20781 if test "x$srcdir" = x.; then
20782 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20783 s/:*\$(srcdir):*/:/;
20784 s/:*\${srcdir}:*/:/;
20786 s/^\([^=]*=[ ]*\):*/\1/;
20792 DEFS=-DHAVE_CONFIG_H
20794 : ${CONFIG_STATUS=./config.status}
20795 ac_clean_files_save=$ac_clean_files
20796 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20797 { echo "$as_me:20797: creating $CONFIG_STATUS" >&5
20798 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20799 cat >$CONFIG_STATUS <<_ACEOF
20801 # Generated automatically by configure.
20802 # Run this file to recreate the current configuration.
20803 # Compiler output produced by configure, useful for debugging
20804 # configure, is in config.log if it exists.
20807 SHELL=\${CONFIG_SHELL-$SHELL}
20808 ac_cs_invocation="\$0 \$@"
20812 cat >>$CONFIG_STATUS <<\_ACEOF
20813 # Be Bourne compatible
20814 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20817 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20821 # Name of the executable.
20822 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20824 if expr a : '\(a\)' >/dev/null 2>&1; then
20830 rm -f conf$$ conf$$.exe conf$$.file
20832 if ln -s conf$$.file conf$$ 2>/dev/null; then
20833 # We could just check for DJGPP; but this test a) works b) is more generic
20834 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20835 if test -f conf$$.exe; then
20836 # Don't use ln at all; we don't have any links
20841 elif ln conf$$.file conf$$ 2>/dev/null; then
20846 rm -f conf$$ conf$$.exe conf$$.file
20848 as_executable_p="test -f"
20850 # Support unset when possible.
20851 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20858 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20859 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20860 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20861 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20862 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20863 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20864 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20865 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20868 # We need space, tab and new line, in precisely that order.
20874 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20880 # Files that config.status was made for.
20881 if test -n "$ac_config_files"; then
20882 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20885 if test -n "$ac_config_headers"; then
20886 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20889 if test -n "$ac_config_links"; then
20890 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20893 if test -n "$ac_config_commands"; then
20894 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20897 cat >>$CONFIG_STATUS <<\EOF
20900 \`$as_me' instantiates files from templates according to the
20901 current configuration.
20903 Usage: $0 [OPTIONS] [FILE]...
20905 -h, --help print this help, then exit
20906 -V, --version print version number, then exit
20907 -d, --debug don't remove temporary files
20908 --recheck update $as_me by reconfiguring in the same conditions
20909 --file=FILE[:TEMPLATE]
20910 instantiate the configuration file FILE
20911 --header=FILE[:TEMPLATE]
20912 instantiate the configuration header FILE
20914 Configuration files:
20917 Configuration headers:
20920 Configuration commands:
20923 Report bugs to <dickey@invisible-island.net>."
20926 cat >>$CONFIG_STATUS <<EOF
20929 configured by $0, generated by GNU Autoconf 2.52.20181006,
20930 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20932 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20933 Free Software Foundation, Inc.
20934 This config.status script is free software; the Free Software Foundation
20935 gives unlimited permission to copy, distribute and modify it."
20940 cat >>$CONFIG_STATUS <<\EOF
20941 # If no file are specified by the user, then we need to provide default
20942 # value. By we need to know if files were specified by the user.
20948 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20949 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20951 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20955 *) # This is not an option, so the user has probably given explicit
20957 ac_need_defaults=false;;
20961 # Handling of the options.
20963 cat >>$CONFIG_STATUS <<EOF
20964 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20965 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20966 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20968 cat >>$CONFIG_STATUS <<\EOF
20969 --version | --vers* | -V )
20970 echo "$ac_cs_version"; exit 0 ;;
20972 # Conflict between --help and --header
20973 { { echo "$as_me:20973: error: ambiguous option: $1
20974 Try \`$0 --help' for more information." >&5
20975 echo "$as_me: error: ambiguous option: $1
20976 Try \`$0 --help' for more information." >&2;}
20977 { (exit 1); exit 1; }; };;
20978 --help | --hel | -h )
20979 echo "$ac_cs_usage"; exit 0 ;;
20980 --debug | --d* | -d )
20982 --file | --fil | --fi | --f )
20984 CONFIG_FILES="$CONFIG_FILES $1"
20985 ac_need_defaults=false;;
20986 --header | --heade | --head | --hea )
20988 CONFIG_HEADERS="$CONFIG_HEADERS $1"
20989 ac_need_defaults=false;;
20991 # This is an error.
20992 -*) { { echo "$as_me:20992: error: unrecognized option: $1
20993 Try \`$0 --help' for more information." >&5
20994 echo "$as_me: error: unrecognized option: $1
20995 Try \`$0 --help' for more information." >&2;}
20996 { (exit 1); exit 1; }; } ;;
20998 *) ac_config_targets="$ac_config_targets $1" ;;
21007 ## ----------------------- ##
21008 ## Running config.status. ##
21009 ## ----------------------- ##
21011 This file was extended by $as_me 2.52.20181006, executed with
21012 CONFIG_FILES = $CONFIG_FILES
21013 CONFIG_HEADERS = $CONFIG_HEADERS
21014 CONFIG_LINKS = $CONFIG_LINKS
21015 CONFIG_COMMANDS = $CONFIG_COMMANDS
21016 > $ac_cs_invocation
21017 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21022 cat >>$CONFIG_STATUS <<EOF
21024 # INIT-COMMANDS section.
21034 cat >>$CONFIG_STATUS <<\EOF
21035 for ac_config_target in $ac_config_targets
21037 case "$ac_config_target" in
21038 # Handling of arguments.
21039 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21040 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21041 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
21042 *) { { echo "$as_me:21042: error: invalid argument: $ac_config_target" >&5
21043 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21044 { (exit 1); exit 1; }; };;
21048 # If the user did not use the arguments to specify the items to instantiate,
21049 # then the envvar interface is used. Set only those that are not.
21050 # We use the long form for the default assignment because of an extremely
21051 # bizarre bug on SunOS 4.1.3.
21052 if $ac_need_defaults; then
21053 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21054 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21055 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21058 # Create a temporary directory, and hook for its removal unless debugging.
21061 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21062 trap '{ (exit 1); exit 1; }' 1 2 13 15
21065 # Create a (secure) tmp directory for tmp files.
21068 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21069 test -n "$tmp" && test -d "$tmp"
21072 tmp=$TMPDIR/cs$$-$RANDOM
21073 (umask 077 && mkdir $tmp)
21076 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21077 { (exit 1); exit 1; }
21082 cat >>$CONFIG_STATUS <<EOF
21085 # CONFIG_FILES section.
21088 # No need to generate the scripts if there are no CONFIG_FILES.
21089 # This happens for instance when ./config.status config.h
21090 if test -n "\$CONFIG_FILES"; then
21091 # Protect against being on the right side of a sed subst in config.status.
21092 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21093 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21094 s,@SHELL@,$SHELL,;t t
21095 s,@exec_prefix@,$exec_prefix,;t t
21096 s,@prefix@,$prefix,;t t
21097 s,@program_transform_name@,$program_transform_name,;t t
21098 s,@bindir@,$bindir,;t t
21099 s,@sbindir@,$sbindir,;t t
21100 s,@libexecdir@,$libexecdir,;t t
21101 s,@datarootdir@,$datarootdir,;t t
21102 s,@datadir@,$datadir,;t t
21103 s,@sysconfdir@,$sysconfdir,;t t
21104 s,@sharedstatedir@,$sharedstatedir,;t t
21105 s,@localstatedir@,$localstatedir,;t t
21106 s,@runstatedir@,$runstatedir,;t t
21107 s,@libdir@,$libdir,;t t
21108 s,@includedir@,$includedir,;t t
21109 s,@oldincludedir@,$oldincludedir,;t t
21110 s,@infodir@,$infodir,;t t
21111 s,@mandir@,$mandir,;t t
21112 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21113 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21114 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21115 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21116 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21117 s,@build_alias@,$build_alias,;t t
21118 s,@host_alias@,$host_alias,;t t
21119 s,@target_alias@,$target_alias,;t t
21120 s,@ECHO_C@,$ECHO_C,;t t
21121 s,@ECHO_N@,$ECHO_N,;t t
21122 s,@ECHO_T@,$ECHO_T,;t t
21123 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21124 s,@DEFS@,$DEFS,;t t
21125 s,@LIBS@,$LIBS,;t t
21126 s,@build@,$build,;t t
21127 s,@build_cpu@,$build_cpu,;t t
21128 s,@build_vendor@,$build_vendor,;t t
21129 s,@build_os@,$build_os,;t t
21130 s,@host@,$host,;t t
21131 s,@host_cpu@,$host_cpu,;t t
21132 s,@host_vendor@,$host_vendor,;t t
21133 s,@host_os@,$host_os,;t t
21134 s,@SET_MAKE@,$SET_MAKE,;t t
21136 s,@CFLAGS@,$CFLAGS,;t t
21137 s,@LDFLAGS@,$LDFLAGS,;t t
21138 s,@CPPFLAGS@,$CPPFLAGS,;t t
21139 s,@ac_ct_CC@,$ac_ct_CC,;t t
21140 s,@EXEEXT@,$EXEEXT,;t t
21141 s,@OBJEXT@,$OBJEXT,;t t
21142 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21145 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21146 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21147 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21148 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21149 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21150 s,@LINT@,$LINT,;t t
21151 s,@LINT_OPTS@,$LINT_OPTS,;t t
21152 s,@CTAGS@,$CTAGS,;t t
21153 s,@ETAGS@,$ETAGS,;t t
21154 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21155 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21156 s,@MATH_LIB@,$MATH_LIB,;t t
21157 s,@top_builddir@,$top_builddir,;t t
21158 s,@CC_G_OPT@,$CC_G_OPT,;t t
21159 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21160 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21161 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21162 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21164 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21165 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21166 s,@LD_MODEL@,$LD_MODEL,;t t
21167 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21168 s,@LIBTOOL@,$LIBTOOL,;t t
21169 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21170 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21171 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21172 s,@LIB_LINK@,$LIB_LINK,;t t
21173 s,@LINK_TESTS@,$LINK_TESTS,;t t
21174 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21175 s,@PACKAGE@,$PACKAGE,;t t
21176 s,@PTHREAD@,$PTHREAD,;t t
21177 s,@TEST_ARGS@,$TEST_ARGS,;t t
21178 s,@TEST_DEPS@,$TEST_DEPS,;t t
21179 s,@TEST_LIBS@,$TEST_LIBS,;t t
21180 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21181 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21182 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21183 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21184 s,@includesubdir@,$includesubdir,;t t
21185 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21186 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21187 s,@ECHO_LT@,$ECHO_LT,;t t
21188 s,@ECHO_LD@,$ECHO_LD,;t t
21189 s,@RULE_CC@,$RULE_CC,;t t
21190 s,@SHOW_CC@,$SHOW_CC,;t t
21191 s,@ECHO_CC@,$ECHO_CC,;t t
21192 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21193 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21194 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21195 s,@X_CFLAGS@,$X_CFLAGS,;t t
21196 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21197 s,@X_LIBS@,$X_LIBS,;t t
21198 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21199 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21200 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21201 s,@RGB_PATH@,$RGB_PATH,;t t
21202 s,@no_x11_rgb@,$no_x11_rgb,;t t
21203 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21204 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21205 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21210 cat >>$CONFIG_STATUS <<\EOF
21211 # Split the substitutions into bite-sized pieces for seds with
21212 # small command number limits, like on Digital OSF/1 and HP-UX.
21213 ac_max_sed_lines=48
21214 ac_sed_frag=1 # Number of current file.
21215 ac_beg=1 # First line for current file.
21216 ac_end=$ac_max_sed_lines # Line after last line for current file.
21219 while $ac_more_lines; do
21220 if test $ac_beg -gt 1; then
21221 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21223 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21225 if test ! -s $tmp/subs.frag; then
21226 ac_more_lines=false
21228 # The purpose of the label and of the branching condition is to
21229 # speed up the sed processing (if there are no `@' at all, there
21230 # is no need to browse any of the substitutions).
21231 # These are the two extra sed commands mentioned above.
21233 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21234 # It is possible to make a multiline substitution using escaped newlines.
21235 # Ensure that we do not split the substitution between script fragments.
21237 ac_END=`expr $ac_end + $ac_max_sed_lines`
21238 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21239 if test -s $tmp/subs.next; then
21240 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21241 if test ! -s $tmp/subs.edit; then
21242 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21243 if test ! -s $tmp/subs.edit; then
21244 if test $ac_beg -gt 1; then
21245 ac_end=`expr $ac_end - 1`
21252 if test -z "$ac_sed_cmds"; then
21253 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21255 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21257 ac_sed_frag=`expr $ac_sed_frag + 1`
21259 ac_end=`expr $ac_end + $ac_max_sed_lines`
21262 if test -z "$ac_sed_cmds"; then
21265 fi # test -n "$CONFIG_FILES"
21268 cat >>$CONFIG_STATUS <<\EOF
21269 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21270 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21272 - | *:- | *:-:* ) # input from stdin
21274 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21275 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21276 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21277 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21278 * ) ac_file_in=$ac_file.in ;;
21281 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21282 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21283 X"$ac_file" : 'X\(//\)[^/]' \| \
21284 X"$ac_file" : 'X\(//\)$' \| \
21285 X"$ac_file" : 'X\(/\)' \| \
21286 . : '\(.\)' 2>/dev/null ||
21288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21289 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21290 /^X\(\/\/\)$/{ s//\1/; q; }
21291 /^X\(\/\).*/{ s//\1/; q; }
21293 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21294 { case "$ac_dir" in
21295 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21299 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21300 case $as_mkdir_dir in
21301 # Skip DOS drivespec
21302 ?:) as_incr_dir=$as_mkdir_dir ;;
21304 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21305 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21310 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21311 # A "../" for each directory in $ac_dir_suffix.
21312 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21314 ac_dir_suffix= ac_dots=
21319 if test -z "$ac_dots"; then
21322 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21324 [\\/]* | ?:[\\/]* )
21325 ac_srcdir=$srcdir$ac_dir_suffix;
21326 ac_top_srcdir=$srcdir ;;
21327 *) # Relative path.
21328 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21329 ac_top_srcdir=$ac_dots$srcdir ;;
21333 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21334 *) ac_INSTALL=$ac_dots$INSTALL ;;
21337 if test x"$ac_file" != x-; then
21338 { echo "$as_me:21338: creating $ac_file" >&5
21339 echo "$as_me: creating $ac_file" >&6;}
21342 # Let's still pretend it is `configure' which instantiates (i.e., don't
21343 # use $as_me), people would be surprised to read:
21344 # /* config.h. Generated automatically by config.status. */
21345 configure_input="Generated automatically from `echo $ac_file_in |
21346 sed 's,.*/,,'` by configure."
21348 # First look for the input files in the build tree, otherwise in the
21350 ac_file_inputs=`IFS=:
21351 for f in $ac_file_in; do
21353 -) echo $tmp/stdin ;;
21355 # Absolute (can't be DOS-style, as IFS=:)
21356 test -f "$f" || { { echo "$as_me:21356: error: cannot find input file: $f" >&5
21357 echo "$as_me: error: cannot find input file: $f" >&2;}
21358 { (exit 1); exit 1; }; }
21361 if test -f "$f"; then
21364 elif test -f "$srcdir/$f"; then
21369 { { echo "$as_me:21369: error: cannot find input file: $f" >&5
21370 echo "$as_me: error: cannot find input file: $f" >&2;}
21371 { (exit 1); exit 1; }; }
21374 done` || { (exit 1); exit 1; }
21376 cat >>$CONFIG_STATUS <<\EOF
21377 ac_warn_datarootdir=no
21378 if test x"$ac_file" != x-; then
21379 for ac_item in $ac_file_inputs
21381 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21382 if test -n "$ac_seen"; then
21383 ac_used=`grep '@datarootdir@' $ac_item`
21384 if test -z "$ac_used"; then
21385 { echo "$as_me:21385: WARNING: datarootdir was used implicitly but not set:
21387 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21389 ac_warn_datarootdir=yes
21392 ac_seen=`grep '${datarootdir}' $ac_item`
21393 if test -n "$ac_seen"; then
21394 { echo "$as_me:21394: WARNING: datarootdir was used explicitly but not set:
21396 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21398 ac_warn_datarootdir=yes
21403 if test "x$ac_warn_datarootdir" = xyes; then
21404 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21408 cat >>$CONFIG_STATUS <<EOF
21412 cat >>$CONFIG_STATUS <<\EOF
21414 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21415 s,@configure_input@,$configure_input,;t t
21416 s,@srcdir@,$ac_srcdir,;t t
21417 s,@top_srcdir@,$ac_top_srcdir,;t t
21418 s,@INSTALL@,$ac_INSTALL,;t t
21419 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21421 if test x"$ac_file" != x-; then
21422 cp $tmp/out $ac_file
21424 for ac_name in prefix exec_prefix datarootdir
21426 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21427 if test -n "$ac_seen"; then
21428 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21429 if test -z "$ac_init"; then
21430 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21431 { echo "$as_me:21431: WARNING: Variable $ac_name is used but was not set:
21433 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21438 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21439 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21440 if test -s $tmp/out; then
21441 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21442 { echo "$as_me:21442: WARNING: Some variables may not be substituted:
21444 echo "$as_me: WARNING: Some variables may not be substituted:
21454 cat >>$CONFIG_STATUS <<\EOF
21457 # CONFIG_HEADER section.
21460 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21461 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21463 # ac_d sets the value in "#define NAME VALUE" lines.
21464 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21465 ac_dB='[ ].*$,\1#\2'
21468 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21469 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21470 ac_iB='\([ ]\),\1#\2define\3'
21473 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21474 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21475 ac_uB='$,\1#\2define\3'
21479 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21480 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21482 - | *:- | *:-:* ) # input from stdin
21484 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21485 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21486 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21487 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21488 * ) ac_file_in=$ac_file.in ;;
21491 test x"$ac_file" != x- && { echo "$as_me:21491: creating $ac_file" >&5
21492 echo "$as_me: creating $ac_file" >&6;}
21494 # First look for the input files in the build tree, otherwise in the
21496 ac_file_inputs=`IFS=:
21497 for f in $ac_file_in; do
21499 -) echo $tmp/stdin ;;
21501 # Absolute (can't be DOS-style, as IFS=:)
21502 test -f "$f" || { { echo "$as_me:21502: error: cannot find input file: $f" >&5
21503 echo "$as_me: error: cannot find input file: $f" >&2;}
21504 { (exit 1); exit 1; }; }
21507 if test -f "$f"; then
21510 elif test -f "$srcdir/$f"; then
21515 { { echo "$as_me:21515: error: cannot find input file: $f" >&5
21516 echo "$as_me: error: cannot find input file: $f" >&2;}
21517 { (exit 1); exit 1; }; }
21520 done` || { (exit 1); exit 1; }
21521 # Remove the trailing spaces.
21522 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21526 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21527 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21528 # be either 'cat' or 'sort'.
21529 cat confdefs.h | uniq >conftest.vals
21531 # Break up conftest.vals because some shells have a limit on
21532 # the size of here documents, and old seds have small limits too.
21534 rm -f conftest.tail
21535 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21536 while grep . conftest.vals >/dev/null
21538 # Write chunks of a limited-size here document to conftest.frag.
21539 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21540 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21541 echo 'CEOF' >> $CONFIG_STATUS
21542 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21543 rm -f conftest.vals
21544 mv conftest.tail conftest.vals
21546 rm -f conftest.vals
21548 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21550 echo ' cat >> conftest.edit <<CEOF
21551 /@DEFS@/r conftest.frag
21554 sed -f conftest.edit $tmp/in > $tmp/out
21556 mv $tmp/out $tmp/in
21557 rm -f conftest.edit conftest.frag
21558 ' >> $CONFIG_STATUS
21560 cat >>$CONFIG_STATUS <<\EOF
21561 # Let's still pretend it is `configure' which instantiates (i.e., don't
21562 # use $as_me), people would be surprised to read:
21563 # /* config.h. Generated automatically by config.status. */
21564 if test x"$ac_file" = x-; then
21565 echo "/* Generated automatically by configure. */" >$tmp/config.h
21567 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21569 cat $tmp/in >>$tmp/config.h
21571 if test x"$ac_file" != x-; then
21572 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21573 { echo "$as_me:21573: $ac_file is unchanged" >&5
21574 echo "$as_me: $ac_file is unchanged" >&6;}
21576 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21577 X"$ac_file" : 'X\(//\)[^/]' \| \
21578 X"$ac_file" : 'X\(//\)$' \| \
21579 X"$ac_file" : 'X\(/\)' \| \
21580 . : '\(.\)' 2>/dev/null ||
21582 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21583 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21584 /^X\(\/\/\)$/{ s//\1/; q; }
21585 /^X\(\/\).*/{ s//\1/; q; }
21587 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21588 { case "$ac_dir" in
21589 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21593 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21594 case $as_mkdir_dir in
21595 # Skip DOS drivespec
21596 ?:) as_incr_dir=$as_mkdir_dir ;;
21598 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21599 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21606 mv $tmp/config.h $ac_file
21610 rm -f $tmp/config.h
21614 cat >>$CONFIG_STATUS <<\EOF
21616 # CONFIG_COMMANDS section.
21618 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21619 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21620 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21627 if test ! -d $srcdir/$cf_dir; then
21629 elif test -f $srcdir/$cf_dir/programs; then
21630 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21634 cat >>Makefile <<TEST_EOF
21636 # These rules are generated so we do not rely on suffix rules, which do not
21637 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21638 # some, and the '\$x' confuses others).
21641 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21644 cat >>Makefile <<TEST_EOF
21646 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21647 \$(srcdir)/test.priv.h \\
21650 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21654 if test -f ../config.guess && test -f ../config.sub
21656 cat >>Makefile <<TEST_EOF
21658 # if we used CF_INHERIT for getting these files, we can remove them
21660 rm -f config.guess config.sub
21668 cat >>$CONFIG_STATUS <<\EOF
21670 { (exit 0); exit 0; }
21672 chmod +x $CONFIG_STATUS
21673 ac_clean_files=$ac_clean_files_save
21675 # configure is writing to config.log, and then calls config.status.
21676 # config.status does its own redirection, appending to config.log.
21677 # Unfortunately, on DOS this fails, as config.log is still kept open
21678 # by configure, so config.status won't be able to write to it; its
21679 # output is simply discarded. So we exec the FD to /dev/null,
21680 # effectively closing config.log, so it can be properly (re)opened and
21681 # appended to by config.status. When coming back to configure, we
21682 # need to make the FD available again.
21683 if test "$no_create" != yes; then
21686 $SHELL $CONFIG_STATUS || ac_cs_success=false
21688 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21689 # would make configure fail if this is the last instruction.
21690 $ac_cs_success || { (exit 1); exit 1; }