2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20190901.
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.20190901. Invocation command line was
779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
808 # Keep a trace of the command line.
809 # Strip out --no-create and --no-recursion so they do not pile up.
810 # Also quote any args containing shell meta-characters.
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
827 # Get rid of the leading space.
830 # When interrupted or exit'd, cleanup temporary files, and complete
831 # config.log. We remove comments because anyway the quotes in there
832 # would cause problems or look ugly.
834 # Save into config.log some information that might help in debugging.
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
840 # The following way of writing the cache mishandles newlines in values,
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
871 for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 # confdefs.h avoids OS command line length limits that DEFS can exceed.
877 rm -rf conftest* confdefs.h
878 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
881 # Let the site file select an alternate cache file if it wants to.
882 # Prefer explicitly selected file to automatically selected ones.
883 if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
890 for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
892 { echo "$as_me:892: loading site script $ac_site_file" >&5
893 echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
899 if test -r "$cache_file"; then
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
903 { echo "$as_me:903: loading cache $cache_file" >&5
904 echo "$as_me: loading cache $cache_file" >&6;}
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 { echo "$as_me:911: creating cache $cache_file" >&5
912 echo "$as_me: creating cache $cache_file" >&6;}
916 # Check that the precious variables saved in the cache have kept the same
918 ac_cache_corrupted=false
919 for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
928 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
936 if test "x$ac_old_val" != "x$ac_new_val"; then
937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
938 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
939 { echo "$as_me:939: former value: $ac_old_val" >&5
940 echo "$as_me: former value: $ac_old_val" >&2;}
941 { echo "$as_me:941: current value: $ac_new_val" >&5
942 echo "$as_me: current value: $ac_new_val" >&2;}
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 if $ac_cache_corrupted; then
960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
961 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
963 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
972 ac_main_return=return
974 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
975 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
977 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
978 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
980 echo "#! $SHELL" >conftest.sh
981 echo "exit 0" >>conftest.sh
983 if { (echo "$as_me:983: PATH=\".;.\"; conftest.sh") >&5
984 (PATH=".;."; conftest.sh) 2>&5
986 echo "$as_me:986: \$? = $ac_status" >&5
987 (exit $ac_status); }; then
988 ac_path_separator=';'
992 PATH_SEPARATOR="$ac_path_separator"
995 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
997 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
999 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1002 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1003 if test -f $ac_dir/install-sh; then
1005 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 elif test -f $ac_dir/install.sh; then
1009 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 elif test -f $ac_dir/shtool; then
1013 ac_install_sh="$ac_aux_dir/shtool install -c"
1017 if test -z "$ac_aux_dir"; then
1018 { { echo "$as_me:1018: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1019 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1020 { (exit 1); exit 1; }; }
1022 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1023 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1024 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026 # Make sure we can run config.sub.
1027 $ac_config_sub sun4 >/dev/null 2>&1 ||
1028 { { echo "$as_me:1028: error: cannot run $ac_config_sub" >&5
1029 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1030 { (exit 1); exit 1; }; }
1032 echo "$as_me:1032: checking build system type" >&5
1033 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1034 if test "${ac_cv_build+set}" = set; then
1035 echo $ECHO_N "(cached) $ECHO_C" >&6
1037 ac_cv_build_alias=$build_alias
1038 test -z "$ac_cv_build_alias" &&
1039 ac_cv_build_alias=`$ac_config_guess`
1040 test -z "$ac_cv_build_alias" &&
1041 { { echo "$as_me:1041: error: cannot guess build type; you must specify one" >&5
1042 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1043 { (exit 1); exit 1; }; }
1044 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1045 { { echo "$as_me:1045: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1046 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1047 { (exit 1); exit 1; }; }
1050 echo "$as_me:1050: result: $ac_cv_build" >&5
1051 echo "${ECHO_T}$ac_cv_build" >&6
1053 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1054 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1055 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 system_name="$host_os"
1081 system_name="`(uname -s -r) 2>/dev/null`"
1082 if test -z "$system_name" ; then
1083 system_name="`(hostname) 2>/dev/null`"
1086 test -n "$system_name" &&
1087 cat >>confdefs.h <<EOF
1088 #define SYSTEM_NAME "$system_name"
1091 if test "${cf_cv_system_name+set}" = set; then
1092 echo $ECHO_N "(cached) $ECHO_C" >&6
1094 cf_cv_system_name="$system_name"
1097 test -z "$system_name" && system_name="$cf_cv_system_name"
1098 test -n "$cf_cv_system_name" && echo "$as_me:1098: result: Configuring for $cf_cv_system_name" >&5
1099 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1101 if test ".$system_name" != ".$cf_cv_system_name" ; then
1102 echo "$as_me:1102: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1103 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1104 { { echo "$as_me:1104: error: \"Please remove config.cache and try again.\"" >&5
1105 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1106 { (exit 1); exit 1; }; }
1109 test "$program_prefix" != NONE &&
1110 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1111 # Use a double $ so make ignores it.
1112 test "$program_suffix" != NONE &&
1113 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1114 # Double any \ or $. echo might interpret backslashes.
1115 # By default was `s,x,x', remove it if useless.
1116 cat <<\_ACEOF >conftest.sed
1117 s/[\\$]/&&/g;s/;s,x,x,$//
1119 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1122 echo "$as_me:1122: checking whether ${MAKE-make} sets \${MAKE}" >&5
1123 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1124 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1125 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1126 echo $ECHO_N "(cached) $ECHO_C" >&6
1128 cat >conftest.make <<\EOF
1130 @echo 'ac_maketemp="${MAKE}"'
1132 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1133 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1134 if test -n "$ac_maketemp"; then
1135 eval ac_cv_prog_make_${ac_make}_set=yes
1137 eval ac_cv_prog_make_${ac_make}_set=no
1141 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1142 echo "$as_me:1142: result: yes" >&5
1143 echo "${ECHO_T}yes" >&6
1146 echo "$as_me:1146: result: no" >&5
1147 echo "${ECHO_T}no" >&6
1148 SET_MAKE="MAKE=${MAKE-make}"
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return=return
1157 if test -n "$ac_tool_prefix"; then
1158 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1159 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1160 echo "$as_me:1160: checking for $ac_word" >&5
1161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1162 if test "${ac_cv_prog_CC+set}" = set; then
1163 echo $ECHO_N "(cached) $ECHO_C" >&6
1165 if test -n "$CC"; then
1166 ac_cv_prog_CC="$CC" # Let the user override the test.
1168 ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 $as_executable_p "$ac_dir/$ac_word" || continue
1174 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1175 echo "$as_me:1175: found $ac_dir/$ac_word" >&5
1182 if test -n "$CC"; then
1183 echo "$as_me:1183: result: $CC" >&5
1184 echo "${ECHO_T}$CC" >&6
1186 echo "$as_me:1186: result: no" >&5
1187 echo "${ECHO_T}no" >&6
1191 if test -z "$ac_cv_prog_CC"; then
1193 # Extract the first word of "gcc", so it can be a program name with args.
1194 set dummy gcc; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1198 echo $ECHO_N "(cached) $ECHO_C" >&6
1200 if test -n "$ac_ct_CC"; then
1201 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1203 ac_save_IFS=$IFS; IFS=$ac_path_separator
1205 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_ac_ct_CC="gcc"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1216 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1217 if test -n "$ac_ct_CC"; then
1218 echo "$as_me:1218: result: $ac_ct_CC" >&5
1219 echo "${ECHO_T}$ac_ct_CC" >&6
1221 echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1230 if test -z "$CC"; then
1231 if test -n "$ac_tool_prefix"; then
1232 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1233 set dummy ${ac_tool_prefix}cc; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_prog_CC+set}" = set; then
1237 echo $ECHO_N "(cached) $ECHO_C" >&6
1239 if test -n "$CC"; then
1240 ac_cv_prog_CC="$CC" # Let the user override the test.
1242 ac_save_IFS=$IFS; IFS=$ac_path_separator
1244 for ac_dir in $ac_dummy; do
1246 test -z "$ac_dir" && ac_dir=.
1247 $as_executable_p "$ac_dir/$ac_word" || continue
1248 ac_cv_prog_CC="${ac_tool_prefix}cc"
1249 echo "$as_me:1249: found $ac_dir/$ac_word" >&5
1256 if test -n "$CC"; then
1257 echo "$as_me:1257: result: $CC" >&5
1258 echo "${ECHO_T}$CC" >&6
1260 echo "$as_me:1260: result: no" >&5
1261 echo "${ECHO_T}no" >&6
1265 if test -z "$ac_cv_prog_CC"; then
1267 # Extract the first word of "cc", so it can be a program name with args.
1268 set dummy cc; ac_word=$2
1269 echo "$as_me:1269: checking for $ac_word" >&5
1270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1272 echo $ECHO_N "(cached) $ECHO_C" >&6
1274 if test -n "$ac_ct_CC"; then
1275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1277 ac_save_IFS=$IFS; IFS=$ac_path_separator
1279 for ac_dir in $ac_dummy; do
1281 test -z "$ac_dir" && ac_dir=.
1282 $as_executable_p "$ac_dir/$ac_word" || continue
1283 ac_cv_prog_ac_ct_CC="cc"
1284 echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1290 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1291 if test -n "$ac_ct_CC"; then
1292 echo "$as_me:1292: result: $ac_ct_CC" >&5
1293 echo "${ECHO_T}$ac_ct_CC" >&6
1295 echo "$as_me:1295: result: no" >&5
1296 echo "${ECHO_T}no" >&6
1305 if test -z "$CC"; then
1306 # Extract the first word of "cc", so it can be a program name with args.
1307 set dummy cc; ac_word=$2
1308 echo "$as_me:1308: checking for $ac_word" >&5
1309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1310 if test "${ac_cv_prog_CC+set}" = set; then
1311 echo $ECHO_N "(cached) $ECHO_C" >&6
1313 if test -n "$CC"; then
1314 ac_cv_prog_CC="$CC" # Let the user override the test.
1317 ac_save_IFS=$IFS; IFS=$ac_path_separator
1319 for ac_dir in $ac_dummy; do
1321 test -z "$ac_dir" && ac_dir=.
1322 $as_executable_p "$ac_dir/$ac_word" || continue
1323 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1324 ac_prog_rejected=yes
1328 echo "$as_me:1328: found $ac_dir/$ac_word" >&5
1332 if test $ac_prog_rejected = yes; then
1333 # We found a bogon in the path, so make sure we never use it.
1334 set dummy $ac_cv_prog_CC
1336 if test $# != 0; then
1337 # We chose a different compiler from the bogus one.
1338 # However, it has the same basename, so the bogon will be chosen
1339 # first if we set CC to just the basename; use the full file name.
1341 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1349 if test -n "$CC"; then
1350 echo "$as_me:1350: result: $CC" >&5
1351 echo "${ECHO_T}$CC" >&6
1353 echo "$as_me:1353: result: no" >&5
1354 echo "${ECHO_T}no" >&6
1358 if test -z "$CC"; then
1359 if test -n "$ac_tool_prefix"; then
1362 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1363 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1364 echo "$as_me:1364: checking for $ac_word" >&5
1365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1366 if test "${ac_cv_prog_CC+set}" = set; then
1367 echo $ECHO_N "(cached) $ECHO_C" >&6
1369 if test -n "$CC"; then
1370 ac_cv_prog_CC="$CC" # Let the user override the test.
1372 ac_save_IFS=$IFS; IFS=$ac_path_separator
1374 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 $as_executable_p "$ac_dir/$ac_word" || continue
1378 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1379 echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1386 if test -n "$CC"; then
1387 echo "$as_me:1387: result: $CC" >&5
1388 echo "${ECHO_T}$CC" >&6
1390 echo "$as_me:1390: result: no" >&5
1391 echo "${ECHO_T}no" >&6
1394 test -n "$CC" && break
1397 if test -z "$CC"; then
1401 # Extract the first word of "$ac_prog", so it can be a program name with args.
1402 set dummy $ac_prog; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1406 echo $ECHO_N "(cached) $ECHO_C" >&6
1408 if test -n "$ac_ct_CC"; then
1409 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1411 ac_save_IFS=$IFS; IFS=$ac_path_separator
1413 for ac_dir in $ac_dummy; do
1415 test -z "$ac_dir" && ac_dir=.
1416 $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_ac_ct_CC="$ac_prog"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1424 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1425 if test -n "$ac_ct_CC"; then
1426 echo "$as_me:1426: result: $ac_ct_CC" >&5
1427 echo "${ECHO_T}$ac_ct_CC" >&6
1429 echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1433 test -n "$ac_ct_CC" && break
1441 test -z "$CC" && { { echo "$as_me:1441: error: no acceptable cc found in \$PATH" >&5
1442 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1443 { (exit 1); exit 1; }; }
1445 # Provide some information about the compiler.
1446 echo "$as_me:1446:" \
1447 "checking for C compiler version" >&5
1448 ac_compiler=`set X $ac_compile; echo $2`
1449 { (eval echo "$as_me:1449: \"$ac_compiler --version </dev/null >&5\"") >&5
1450 (eval $ac_compiler --version </dev/null >&5) 2>&5
1452 echo "$as_me:1452: \$? = $ac_status" >&5
1453 (exit $ac_status); }
1454 { (eval echo "$as_me:1454: \"$ac_compiler -v </dev/null >&5\"") >&5
1455 (eval $ac_compiler -v </dev/null >&5) 2>&5
1457 echo "$as_me:1457: \$? = $ac_status" >&5
1458 (exit $ac_status); }
1459 { (eval echo "$as_me:1459: \"$ac_compiler -V </dev/null >&5\"") >&5
1460 (eval $ac_compiler -V </dev/null >&5) 2>&5
1462 echo "$as_me:1462: \$? = $ac_status" >&5
1463 (exit $ac_status); }
1465 cat >conftest.$ac_ext <<_ACEOF
1466 #line 1466 "configure"
1467 #include "confdefs.h"
1477 ac_clean_files_save=$ac_clean_files
1478 ac_clean_files="$ac_clean_files a.out a.exe"
1479 # Try to create an executable without -o first, disregard a.out.
1480 # It will help us diagnose broken compilers, and finding out an intuition
1482 echo "$as_me:1482: checking for C compiler default output" >&5
1483 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1484 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1485 if { (eval echo "$as_me:1485: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1488 echo "$as_me:1488: \$? = $ac_status" >&5
1489 (exit $ac_status); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1494 ls a.out conftest 2>/dev/null;
1495 ls a.* conftest.* 2>/dev/null`; do
1497 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1498 a.out ) # We found the default executable, but exeext='' is most
1501 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1502 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 echo "$as_me: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 { { echo "$as_me:1511: error: C compiler cannot create executables" >&5
1512 echo "$as_me: error: C compiler cannot create executables" >&2;}
1513 { (exit 77); exit 77; }; }
1516 ac_exeext=$ac_cv_exeext
1517 echo "$as_me:1517: result: $ac_file" >&5
1518 echo "${ECHO_T}$ac_file" >&6
1520 # Check the compiler produces executables we can run. If not, either
1521 # the compiler is broken, or we cross compile.
1522 echo "$as_me:1522: checking whether the C compiler works" >&5
1523 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1524 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1525 # If not cross compiling, check that we can run a simple program.
1526 if test "$cross_compiling" != yes; then
1527 if { ac_try='./$ac_file'
1528 { (eval echo "$as_me:1528: \"$ac_try\"") >&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; }; then
1535 if test "$cross_compiling" = maybe; then
1538 { { echo "$as_me:1538: error: cannot run C compiled programs.
1539 If you meant to cross compile, use \`--host'." >&5
1540 echo "$as_me: error: cannot run C compiled programs.
1541 If you meant to cross compile, use \`--host'." >&2;}
1542 { (exit 1); exit 1; }; }
1546 echo "$as_me:1546: result: yes" >&5
1547 echo "${ECHO_T}yes" >&6
1549 rm -f a.out a.exe conftest$ac_cv_exeext
1550 ac_clean_files=$ac_clean_files_save
1551 # Check the compiler produces executables we can run. If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether we are cross compiling" >&5
1554 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1555 echo "$as_me:1555: result: $cross_compiling" >&5
1556 echo "${ECHO_T}$cross_compiling" >&6
1558 echo "$as_me:1558: checking for executable suffix" >&5
1559 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1560 if { (eval echo "$as_me:1560: \"$ac_link\"") >&5
1561 (eval $ac_link) 2>&5
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit $ac_status); }; then
1565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1566 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1567 # work properly (i.e., refer to `conftest.exe'), while it won't with
1569 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1571 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1572 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 { { echo "$as_me:1579: error: cannot compute EXEEXT: cannot compile and link" >&5
1580 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1581 { (exit 1); exit 1; }; }
1584 rm -f conftest$ac_cv_exeext
1585 echo "$as_me:1585: result: $ac_cv_exeext" >&5
1586 echo "${ECHO_T}$ac_cv_exeext" >&6
1588 rm -f conftest.$ac_ext
1589 EXEEXT=$ac_cv_exeext
1591 echo "$as_me:1591: checking for object suffix" >&5
1592 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1593 if test "${ac_cv_objext+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
1596 cat >conftest.$ac_ext <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1608 rm -f conftest.o conftest.obj
1609 if { (eval echo "$as_me:1609: \"$ac_compile\"") >&5
1610 (eval $ac_compile) 2>&5
1612 echo "$as_me:1612: \$? = $ac_status" >&5
1613 (exit $ac_status); }; then
1614 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1616 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1617 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1622 echo "$as_me: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 { { echo "$as_me:1624: error: cannot compute OBJEXT: cannot compile" >&5
1625 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1626 { (exit 1); exit 1; }; }
1629 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1631 echo "$as_me:1631: result: $ac_cv_objext" >&5
1632 echo "${ECHO_T}$ac_cv_objext" >&6
1633 OBJEXT=$ac_cv_objext
1635 echo "$as_me:1635: checking whether we are using the GNU C compiler" >&5
1636 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1637 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657 (eval $ac_compile) 2>&5
1659 echo "$as_me:1659: \$? = $ac_status" >&5
1660 (exit $ac_status); } &&
1661 { ac_try='test -s conftest.$ac_objext'
1662 { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1665 echo "$as_me:1665: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1669 echo "$as_me: failed program was:" >&5
1670 cat conftest.$ac_ext >&5
1673 rm -f conftest.$ac_objext conftest.$ac_ext
1674 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1677 echo "$as_me:1677: result: $ac_cv_c_compiler_gnu" >&5
1678 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1679 GCC=`test $ac_compiler_gnu = yes && echo yes`
1680 ac_test_CFLAGS=${CFLAGS+set}
1681 ac_save_CFLAGS=$CFLAGS
1683 echo "$as_me:1683: checking whether $CC accepts -g" >&5
1684 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1685 if test "${ac_cv_prog_cc_g+set}" = set; then
1686 echo $ECHO_N "(cached) $ECHO_C" >&6
1688 cat >conftest.$ac_ext <<_ACEOF
1689 #line 1689 "configure"
1690 #include "confdefs.h"
1700 rm -f conftest.$ac_objext
1701 if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5
1702 (eval $ac_compile) 2>&5
1704 echo "$as_me:1704: \$? = $ac_status" >&5
1705 (exit $ac_status); } &&
1706 { ac_try='test -s conftest.$ac_objext'
1707 { (eval echo "$as_me:1707: \"$ac_try\"") >&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit $ac_status); }; }; then
1714 echo "$as_me: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1718 rm -f conftest.$ac_objext conftest.$ac_ext
1720 echo "$as_me:1720: result: $ac_cv_prog_cc_g" >&5
1721 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1722 if test "$ac_test_CFLAGS" = set; then
1723 CFLAGS=$ac_save_CFLAGS
1724 elif test $ac_cv_prog_cc_g = yes; then
1725 if test "$GCC" = yes; then
1731 if test "$GCC" = yes; then
1737 # Some people use a C++ compiler to compile C. Since we use `exit',
1738 # in C++ we need to declare it. In case someone uses the same compiler
1739 # for both compiling C and C++ we need to have the C++ compiler decide
1740 # the declaration of exit, since it's the most demanding environment.
1741 cat >conftest.$ac_ext <<_ACEOF
1746 rm -f conftest.$ac_objext
1747 if { (eval echo "$as_me:1747: \"$ac_compile\"") >&5
1748 (eval $ac_compile) 2>&5
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit $ac_status); } &&
1752 { ac_try='test -s conftest.$ac_objext'
1753 { (eval echo "$as_me:1753: \"$ac_try\"") >&5
1756 echo "$as_me:1756: \$? = $ac_status" >&5
1757 (exit $ac_status); }; }; then
1758 for ac_declaration in \
1760 '#include <stdlib.h>' \
1761 'extern "C" void std::exit (int) throw (); using std::exit;' \
1762 'extern "C" void std::exit (int); using std::exit;' \
1763 'extern "C" void exit (int) throw ();' \
1764 'extern "C" void exit (int);' \
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1780 rm -f conftest.$ac_objext
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782 (eval $ac_compile) 2>&5
1784 echo "$as_me:1784: \$? = $ac_status" >&5
1785 (exit $ac_status); } &&
1786 { ac_try='test -s conftest.$ac_objext'
1787 { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1790 echo "$as_me:1790: \$? = $ac_status" >&5
1791 (exit $ac_status); }; }; then
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1798 rm -f conftest.$ac_objext conftest.$ac_ext
1799 cat >conftest.$ac_ext <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813 (eval $ac_compile) 2>&5
1815 echo "$as_me:1815: \$? = $ac_status" >&5
1816 (exit $ac_status); } &&
1817 { ac_try='test -s conftest.$ac_objext'
1818 { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1821 echo "$as_me:1821: \$? = $ac_status" >&5
1822 (exit $ac_status); }; }; then
1825 echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1828 rm -f conftest.$ac_objext conftest.$ac_ext
1831 if test -n "$ac_declaration"; then
1832 echo '#ifdef __cplusplus' >>confdefs.h
1833 echo $ac_declaration >>confdefs.h
1834 echo '#endif' >>confdefs.h
1838 echo "$as_me: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1841 rm -f conftest.$ac_objext conftest.$ac_ext
1843 ac_cpp='$CPP $CPPFLAGS'
1844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847 ac_main_return=return
1850 if test "$GCC" = yes ; then
1851 echo "$as_me:1851: checking version of $CC" >&5
1852 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1853 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1854 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1855 echo "$as_me:1855: result: $GCC_VERSION" >&5
1856 echo "${ECHO_T}$GCC_VERSION" >&6
1861 if test "$GCC" = yes ; then
1864 echo "$as_me:1864: checking if this is really Intel C compiler" >&5
1865 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1866 cf_save_CFLAGS="$CFLAGS"
1867 CFLAGS="$CFLAGS -no-gcc"
1868 cat >conftest.$ac_ext <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1876 #ifdef __INTEL_COMPILER
1885 rm -f conftest.$ac_objext
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887 (eval $ac_compile) 2>&5
1889 echo "$as_me:1889: \$? = $ac_status" >&5
1890 (exit $ac_status); } &&
1891 { ac_try='test -s conftest.$ac_objext'
1892 { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1895 echo "$as_me:1895: \$? = $ac_status" >&5
1896 (exit $ac_status); }; }; then
1898 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1901 echo "$as_me: failed program was:" >&5
1902 cat conftest.$ac_ext >&5
1904 rm -f conftest.$ac_objext conftest.$ac_ext
1905 CFLAGS="$cf_save_CFLAGS"
1906 echo "$as_me:1906: result: $INTEL_COMPILER" >&5
1907 echo "${ECHO_T}$INTEL_COMPILER" >&6
1914 if test "$GCC" = yes ; then
1915 echo "$as_me:1915: checking if this is really Clang C compiler" >&5
1916 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1917 cf_save_CFLAGS="$CFLAGS"
1918 CFLAGS="$CFLAGS -Qunused-arguments"
1919 cat >conftest.$ac_ext <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f conftest.$ac_objext
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit $ac_status); } &&
1942 { ac_try='test -s conftest.$ac_objext'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit $ac_status); }; }; then
1949 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
1952 echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 CFLAGS="$cf_save_CFLAGS"
1957 echo "$as_me:1957: result: $CLANG_COMPILER" >&5
1958 echo "${ECHO_T}$CLANG_COMPILER" >&6
1961 echo "$as_me:1961: checking for $CC option to accept ANSI C" >&5
1962 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1963 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1966 ac_cv_prog_cc_stdc=no
1968 cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1973 #include <sys/types.h>
1974 #include <sys/stat.h>
1975 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1976 struct buf { int x; };
1977 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1978 static char *e (p, i)
1984 static char *f (char * (*g) (char **, int), char **p, ...)
1989 s = g (p, va_arg (v,int));
1993 int test (int i, double x);
1994 struct s1 {int (*f) (int a);};
1995 struct s2 {int (*f) (double a);};
1996 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2002 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2007 # Don't try gcc -ansi; that turns off useful extensions and
2008 # breaks some systems' header files.
2009 # AIX -qlanglvl=ansi
2010 # Ultrix and OSF/1 -std1
2011 # HP-UX 10.20 and later -Ae
2012 # HP-UX older versions -Aa -D_HPUX_SOURCE
2013 # SVR4 -Xc -D__EXTENSIONS__
2014 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2016 CC="$ac_save_CC $ac_arg"
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019 (eval $ac_compile) 2>&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } &&
2023 { ac_try='test -s conftest.$ac_objext'
2024 { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2027 echo "$as_me:2027: \$? = $ac_status" >&5
2028 (exit $ac_status); }; }; then
2029 ac_cv_prog_cc_stdc=$ac_arg
2032 echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 rm -f conftest.$ac_objext
2037 rm -f conftest.$ac_ext conftest.$ac_objext
2042 case "x$ac_cv_prog_cc_stdc" in
2044 echo "$as_me:2044: result: none needed" >&5
2045 echo "${ECHO_T}none needed" >&6 ;;
2047 echo "$as_me:2047: result: $ac_cv_prog_cc_stdc" >&5
2048 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2049 CC="$CC $ac_cv_prog_cc_stdc" ;;
2052 # This should have been defined by AC_PROG_CC
2055 echo "$as_me:2055: checking \$CFLAGS variable" >&5
2056 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2059 echo "$as_me:2059: result: broken" >&5
2060 echo "${ECHO_T}broken" >&6
2061 { echo "$as_me:2061: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2062 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2065 for cf_arg in $cf_flags
2071 cf_new_extra_cppflags=
2073 for cf_add_cflags in $cf_arg
2075 case $cf_fix_cppflags in
2077 case $cf_add_cflags in
2078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2079 case $cf_add_cflags in
2081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2084 && test -z "${cf_tst_cflags}" \
2085 && cf_fix_cppflags=yes
2087 if test $cf_fix_cppflags = yes ; then
2089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2093 elif test "${cf_tst_cflags}" = "\"'" ; then
2095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2106 case $cf_add_cflags in
2108 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2110 CPPFLAGS=`echo "$CPPFLAGS" | \
2111 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2112 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2117 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2118 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2125 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2126 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2139 && test -z "${cf_tst_cflags}" \
2140 && cf_fix_cppflags=no
2145 if test -n "$cf_new_cflags" ; then
2147 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2148 CFLAGS="${CFLAGS}$cf_new_cflags"
2152 if test -n "$cf_new_cppflags" ; then
2154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2155 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2159 if test -n "$cf_new_extra_cppflags" ; then
2161 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2162 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2169 echo "$as_me:2169: result: ok" >&5
2170 echo "${ECHO_T}ok" >&6
2174 echo "$as_me:2174: checking \$CC variable" >&5
2175 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2178 echo "$as_me:2178: result: broken" >&5
2179 echo "${ECHO_T}broken" >&6
2180 { echo "$as_me:2180: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2181 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2183 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2184 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2186 for cf_arg in $cf_flags
2194 cf_new_extra_cppflags=
2196 for cf_add_cflags in $cf_arg
2198 case $cf_fix_cppflags in
2200 case $cf_add_cflags in
2201 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2202 case $cf_add_cflags in
2204 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2207 && test -z "${cf_tst_cflags}" \
2208 && cf_fix_cppflags=yes
2210 if test $cf_fix_cppflags = yes ; then
2212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2216 elif test "${cf_tst_cflags}" = "\"'" ; then
2218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2229 case $cf_add_cflags in
2231 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2233 CPPFLAGS=`echo "$CPPFLAGS" | \
2234 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2235 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2240 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2241 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2248 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2249 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2262 && test -z "${cf_tst_cflags}" \
2263 && cf_fix_cppflags=no
2268 if test -n "$cf_new_cflags" ; then
2270 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2271 CFLAGS="${CFLAGS}$cf_new_cflags"
2275 if test -n "$cf_new_cppflags" ; then
2277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2278 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2282 if test -n "$cf_new_extra_cppflags" ; then
2284 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2285 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2295 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2297 echo "${as_me:-configure}:2297: testing resulting CC: '$CC' ..." 1>&5
2299 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2301 echo "${as_me:-configure}:2301: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2303 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2305 echo "${as_me:-configure}:2305: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2309 echo "$as_me:2309: result: ok" >&5
2310 echo "${ECHO_T}ok" >&6
2314 echo "$as_me:2314: checking for inline" >&5
2315 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2316 if test "${ac_cv_c_inline+set}" = set; then
2317 echo $ECHO_N "(cached) $ECHO_C" >&6
2320 for ac_kw in inline __inline__ __inline; do
2321 cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2325 static $ac_kw int static_foo () {return 0; }
2326 $ac_kw int foo () {return 0; }
2330 rm -f conftest.$ac_objext
2331 if { (eval echo "$as_me:2331: \"$ac_compile\"") >&5
2332 (eval $ac_compile) 2>&5
2334 echo "$as_me:2334: \$? = $ac_status" >&5
2335 (exit $ac_status); } &&
2336 { ac_try='test -s conftest.$ac_objext'
2337 { (eval echo "$as_me:2337: \"$ac_try\"") >&5
2340 echo "$as_me:2340: \$? = $ac_status" >&5
2341 (exit $ac_status); }; }; then
2342 ac_cv_c_inline=$ac_kw; break
2344 echo "$as_me: failed program was:" >&5
2345 cat conftest.$ac_ext >&5
2347 rm -f conftest.$ac_objext conftest.$ac_ext
2351 echo "$as_me:2351: result: $ac_cv_c_inline" >&5
2352 echo "${ECHO_T}$ac_cv_c_inline" >&6
2353 case $ac_cv_c_inline in
2356 cat >>confdefs.h <<\EOF
2360 *) cat >>confdefs.h <<EOF
2361 #define inline $ac_cv_c_inline
2367 ac_cpp='$CPP $CPPFLAGS'
2368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2371 ac_main_return=return
2372 echo "$as_me:2372: checking how to run the C preprocessor" >&5
2373 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2374 # On Suns, sometimes $CPP names a directory.
2375 if test -n "$CPP" && test -d "$CPP"; then
2378 if test -z "$CPP"; then
2379 if test "${ac_cv_prog_CPP+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2382 # Double quotes because CPP needs to be expanded
2383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2386 for ac_c_preproc_warn_flag in '' yes
2388 # Use a header file that comes with gcc, so configuring glibc
2389 # with a fresh cross-compiler works.
2390 # On the NeXT, cc -E runs the code through the compiler's parser,
2391 # not just through cpp. "Syntax error" is here to catch this case.
2392 cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2398 if { (eval echo "$as_me:2398: \"$ac_cpp conftest.$ac_ext\"") >&5
2399 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2401 egrep -v '^ *\+' conftest.er1 >conftest.err
2403 cat conftest.err >&5
2404 echo "$as_me:2404: \$? = $ac_status" >&5
2405 (exit $ac_status); } >/dev/null; then
2406 if test -s conftest.err; then
2407 ac_cpp_err=$ac_c_preproc_warn_flag
2414 if test -z "$ac_cpp_err"; then
2417 echo "$as_me: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 # Broken: fails on valid input.
2422 rm -f conftest.err conftest.$ac_ext
2424 # OK, works on sane cases. Now check whether non-existent headers
2425 # can be detected and how.
2426 cat >conftest.$ac_ext <<_ACEOF
2427 #line 2427 "configure"
2428 #include "confdefs.h"
2429 #include <ac_nonexistent.h>
2431 if { (eval echo "$as_me:2431: \"$ac_cpp conftest.$ac_ext\"") >&5
2432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2434 egrep -v '^ *\+' conftest.er1 >conftest.err
2436 cat conftest.err >&5
2437 echo "$as_me:2437: \$? = $ac_status" >&5
2438 (exit $ac_status); } >/dev/null; then
2439 if test -s conftest.err; then
2440 ac_cpp_err=$ac_c_preproc_warn_flag
2447 if test -z "$ac_cpp_err"; then
2448 # Broken: success on invalid input.
2451 echo "$as_me: failed program was:" >&5
2452 cat conftest.$ac_ext >&5
2453 # Passes both tests.
2457 rm -f conftest.err conftest.$ac_ext
2460 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2461 rm -f conftest.err conftest.$ac_ext
2462 if $ac_preproc_ok; then
2474 echo "$as_me:2474: result: $CPP" >&5
2475 echo "${ECHO_T}$CPP" >&6
2477 for ac_c_preproc_warn_flag in '' yes
2479 # Use a header file that comes with gcc, so configuring glibc
2480 # with a fresh cross-compiler works.
2481 # On the NeXT, cc -E runs the code through the compiler's parser,
2482 # not just through cpp. "Syntax error" is here to catch this case.
2483 cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2489 if { (eval echo "$as_me:2489: \"$ac_cpp conftest.$ac_ext\"") >&5
2490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2492 egrep -v '^ *\+' conftest.er1 >conftest.err
2494 cat conftest.err >&5
2495 echo "$as_me:2495: \$? = $ac_status" >&5
2496 (exit $ac_status); } >/dev/null; then
2497 if test -s conftest.err; then
2498 ac_cpp_err=$ac_c_preproc_warn_flag
2505 if test -z "$ac_cpp_err"; then
2508 echo "$as_me: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 # Broken: fails on valid input.
2513 rm -f conftest.err conftest.$ac_ext
2515 # OK, works on sane cases. Now check whether non-existent headers
2516 # can be detected and how.
2517 cat >conftest.$ac_ext <<_ACEOF
2518 #line 2518 "configure"
2519 #include "confdefs.h"
2520 #include <ac_nonexistent.h>
2522 if { (eval echo "$as_me:2522: \"$ac_cpp conftest.$ac_ext\"") >&5
2523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2525 egrep -v '^ *\+' conftest.er1 >conftest.err
2527 cat conftest.err >&5
2528 echo "$as_me:2528: \$? = $ac_status" >&5
2529 (exit $ac_status); } >/dev/null; then
2530 if test -s conftest.err; then
2531 ac_cpp_err=$ac_c_preproc_warn_flag
2538 if test -z "$ac_cpp_err"; then
2539 # Broken: success on invalid input.
2542 echo "$as_me: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 # Passes both tests.
2548 rm -f conftest.err conftest.$ac_ext
2551 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2552 rm -f conftest.err conftest.$ac_ext
2553 if $ac_preproc_ok; then
2556 { { echo "$as_me:2556: error: C preprocessor \"$CPP\" fails sanity check" >&5
2557 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2558 { (exit 1); exit 1; }; }
2562 ac_cpp='$CPP $CPPFLAGS'
2563 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2564 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2565 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2566 ac_main_return=return
2568 for ac_prog in mawk gawk nawk awk
2570 # Extract the first word of "$ac_prog", so it can be a program name with args.
2571 set dummy $ac_prog; ac_word=$2
2572 echo "$as_me:2572: checking for $ac_word" >&5
2573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2574 if test "${ac_cv_prog_AWK+set}" = set; then
2575 echo $ECHO_N "(cached) $ECHO_C" >&6
2577 if test -n "$AWK"; then
2578 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2580 ac_save_IFS=$IFS; IFS=$ac_path_separator
2582 for ac_dir in $ac_dummy; do
2584 test -z "$ac_dir" && ac_dir=.
2585 $as_executable_p "$ac_dir/$ac_word" || continue
2586 ac_cv_prog_AWK="$ac_prog"
2587 echo "$as_me:2587: found $ac_dir/$ac_word" >&5
2594 if test -n "$AWK"; then
2595 echo "$as_me:2595: result: $AWK" >&5
2596 echo "${ECHO_T}$AWK" >&6
2598 echo "$as_me:2598: result: no" >&5
2599 echo "${ECHO_T}no" >&6
2602 test -n "$AWK" && break
2605 # Find a good install program. We prefer a C program (faster),
2606 # so one script is as good as another. But avoid the broken or
2607 # incompatible versions:
2608 # SysV /etc/install, /usr/sbin/install
2609 # SunOS /usr/etc/install
2610 # IRIX /sbin/install
2612 # AmigaOS /C/install, which installs bootblocks on floppy discs
2613 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2614 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2615 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2616 # ./install, which can be erroneously created by make from ./install.sh.
2617 echo "$as_me:2617: checking for a BSD compatible install" >&5
2618 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2619 if test -z "$INSTALL"; then
2620 if test "${ac_cv_path_install+set}" = set; then
2621 echo $ECHO_N "(cached) $ECHO_C" >&6
2623 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $PATH; do
2626 # Account for people who put trailing slashes in PATH elements.
2628 / | ./ | .// | /cC/* \
2629 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2632 # OSF1 and SCO ODT 3.0 have their own names for install.
2633 # Don't use installbsd from OSF since it installs stuff as root
2635 for ac_prog in ginstall scoinst install; do
2636 if $as_executable_p "$ac_dir/$ac_prog"; then
2637 if test $ac_prog = install &&
2638 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2639 # AIX install. It has an incompatible calling convention.
2641 elif test $ac_prog = install &&
2642 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2643 # program-specific install script used by HP pwplus--don't use.
2646 ac_cv_path_install="$ac_dir/$ac_prog -c"
2656 if test "${ac_cv_path_install+set}" = set; then
2657 INSTALL=$ac_cv_path_install
2659 # As a last resort, use the slow shell script. We don't cache a
2660 # path for INSTALL within a source directory, because that will
2661 # break other packages using the cache if that directory is
2662 # removed, or if the path is relative.
2663 INSTALL=$ac_install_sh
2666 echo "$as_me:2666: result: $INSTALL" >&5
2667 echo "${ECHO_T}$INSTALL" >&6
2669 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2670 # It thinks the first close brace ends the variable substitution.
2671 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2673 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2675 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2681 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2682 test -z "$cf_dir" && cf_dir=.
2683 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2687 echo "$as_me:2687: checking if you want to install stripped executables" >&5
2688 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2690 # Check whether --enable-stripping or --disable-stripping was given.
2691 if test "${enable_stripping+set}" = set; then
2692 enableval="$enable_stripping"
2693 test "$enableval" != no && enableval=yes
2694 if test "$enableval" != "yes" ; then
2704 echo "$as_me:2704: result: $with_stripping" >&5
2705 echo "${ECHO_T}$with_stripping" >&6
2707 if test "$with_stripping" = yes
2714 : ${INSTALL:=install}
2715 echo "$as_me:2715: checking if install accepts -p option" >&5
2716 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2717 if test "${cf_cv_install_p+set}" = set; then
2718 echo $ECHO_N "(cached) $ECHO_C" >&6
2725 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2727 if test -f conftest.out/conftest.in
2729 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2730 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2731 if test -s conftest.err
2746 echo "$as_me:2746: result: $cf_cv_install_p" >&5
2747 echo "${ECHO_T}$cf_cv_install_p" >&6
2749 echo "$as_me:2749: checking if install needs to be told about ownership" >&5
2750 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2751 case `$ac_config_guess` in
2760 echo "$as_me:2760: result: $with_install_o" >&5
2761 echo "${ECHO_T}$with_install_o" >&6
2762 if test "x$with_install_o" = xyes
2764 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2769 for ac_prog in lint cppcheck splint
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_LINT+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2778 if test -n "$LINT"; then
2779 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_LINT="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2794 LINT=$ac_cv_prog_LINT
2795 if test -n "$LINT"; then
2796 echo "$as_me:2796: result: $LINT" >&5
2797 echo "${ECHO_T}$LINT" >&6
2799 echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2803 test -n "$LINT" && break
2806 echo "$as_me:2806: checking if filesystem supports mixed-case filenames" >&5
2807 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2808 if test "${cf_cv_mixedcase+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2812 if test "$cross_compiling" = yes ; then
2813 case $target_alias in
2814 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2822 rm -f conftest CONFTEST
2824 if test -f CONFTEST ; then
2829 rm -f conftest CONFTEST
2833 echo "$as_me:2833: result: $cf_cv_mixedcase" >&5
2834 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2835 test "$cf_cv_mixedcase" = yes &&
2836 cat >>confdefs.h <<\EOF
2837 #define MIXEDCASE_FILENAMES 1
2840 for ac_prog in exctags ctags
2842 # Extract the first word of "$ac_prog", so it can be a program name with args.
2843 set dummy $ac_prog; ac_word=$2
2844 echo "$as_me:2844: checking for $ac_word" >&5
2845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2846 if test "${ac_cv_prog_CTAGS+set}" = set; then
2847 echo $ECHO_N "(cached) $ECHO_C" >&6
2849 if test -n "$CTAGS"; then
2850 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2852 ac_save_IFS=$IFS; IFS=$ac_path_separator
2854 for ac_dir in $ac_dummy; do
2856 test -z "$ac_dir" && ac_dir=.
2857 $as_executable_p "$ac_dir/$ac_word" || continue
2858 ac_cv_prog_CTAGS="$ac_prog"
2859 echo "$as_me:2859: found $ac_dir/$ac_word" >&5
2865 CTAGS=$ac_cv_prog_CTAGS
2866 if test -n "$CTAGS"; then
2867 echo "$as_me:2867: result: $CTAGS" >&5
2868 echo "${ECHO_T}$CTAGS" >&6
2870 echo "$as_me:2870: result: no" >&5
2871 echo "${ECHO_T}no" >&6
2874 test -n "$CTAGS" && break
2877 for ac_prog in exetags etags
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880 set dummy $ac_prog; ac_word=$2
2881 echo "$as_me:2881: checking for $ac_word" >&5
2882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2883 if test "${ac_cv_prog_ETAGS+set}" = set; then
2884 echo $ECHO_N "(cached) $ECHO_C" >&6
2886 if test -n "$ETAGS"; then
2887 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2889 ac_save_IFS=$IFS; IFS=$ac_path_separator
2891 for ac_dir in $ac_dummy; do
2893 test -z "$ac_dir" && ac_dir=.
2894 $as_executable_p "$ac_dir/$ac_word" || continue
2895 ac_cv_prog_ETAGS="$ac_prog"
2896 echo "$as_me:2896: found $ac_dir/$ac_word" >&5
2902 ETAGS=$ac_cv_prog_ETAGS
2903 if test -n "$ETAGS"; then
2904 echo "$as_me:2904: result: $ETAGS" >&5
2905 echo "${ECHO_T}$ETAGS" >&6
2907 echo "$as_me:2907: result: no" >&5
2908 echo "${ECHO_T}no" >&6
2911 test -n "$ETAGS" && break
2914 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2915 set dummy ${CTAGS:-ctags}; ac_word=$2
2916 echo "$as_me:2916: checking for $ac_word" >&5
2917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2918 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2919 echo $ECHO_N "(cached) $ECHO_C" >&6
2921 if test -n "$MAKE_LOWER_TAGS"; then
2922 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2924 ac_save_IFS=$IFS; IFS=$ac_path_separator
2926 for ac_dir in $ac_dummy; do
2928 test -z "$ac_dir" && ac_dir=.
2929 $as_executable_p "$ac_dir/$ac_word" || continue
2930 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2931 echo "$as_me:2931: found $ac_dir/$ac_word" >&5
2935 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2938 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2939 if test -n "$MAKE_LOWER_TAGS"; then
2940 echo "$as_me:2940: result: $MAKE_LOWER_TAGS" >&5
2941 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2943 echo "$as_me:2943: result: no" >&5
2944 echo "${ECHO_T}no" >&6
2947 if test "$cf_cv_mixedcase" = yes ; then
2948 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2949 set dummy ${ETAGS:-etags}; ac_word=$2
2950 echo "$as_me:2950: checking for $ac_word" >&5
2951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2952 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2953 echo $ECHO_N "(cached) $ECHO_C" >&6
2955 if test -n "$MAKE_UPPER_TAGS"; then
2956 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2958 ac_save_IFS=$IFS; IFS=$ac_path_separator
2960 for ac_dir in $ac_dummy; do
2962 test -z "$ac_dir" && ac_dir=.
2963 $as_executable_p "$ac_dir/$ac_word" || continue
2964 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2965 echo "$as_me:2965: found $ac_dir/$ac_word" >&5
2969 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2972 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2973 if test -n "$MAKE_UPPER_TAGS"; then
2974 echo "$as_me:2974: result: $MAKE_UPPER_TAGS" >&5
2975 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2977 echo "$as_me:2977: result: no" >&5
2978 echo "${ECHO_T}no" >&6
2985 if test "$MAKE_UPPER_TAGS" = yes ; then
2991 if test "$MAKE_LOWER_TAGS" = yes ; then
2997 echo "$as_me:2997: checking if -lm needed for math functions" >&5
2998 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2999 if test "${cf_cv_need_libm+set}" = set; then
3000 echo $ECHO_N "(cached) $ECHO_C" >&6
3003 cat >conftest.$ac_ext <<_ACEOF
3004 #line 3004 "configure"
3005 #include "confdefs.h"
3014 double x = rand(); printf("result = %g\n", pow(sin(x),x))
3019 rm -f conftest.$ac_objext conftest$ac_exeext
3020 if { (eval echo "$as_me:3020: \"$ac_link\"") >&5
3021 (eval $ac_link) 2>&5
3023 echo "$as_me:3023: \$? = $ac_status" >&5
3024 (exit $ac_status); } &&
3025 { ac_try='test -s conftest$ac_exeext'
3026 { (eval echo "$as_me:3026: \"$ac_try\"") >&5
3029 echo "$as_me:3029: \$? = $ac_status" >&5
3030 (exit $ac_status); }; }; then
3033 echo "$as_me: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3039 echo "$as_me:3039: result: $cf_cv_need_libm" >&5
3040 echo "${ECHO_T}$cf_cv_need_libm" >&6
3041 if test "$cf_cv_need_libm" = yes
3049 CC_SHARED_OPTS=unknown
3050 CPPFLAGS="$CPPFLAGS"
3052 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3053 DFT_UPR_MODEL="NORMAL"
3066 PACKAGE="ncurses-examples"
3072 TINFO_LIBS='$(LIBS_CURSES)'
3073 cf_cv_abi_version=""
3074 cf_cv_rel_version=""
3080 if test "$GCC" = yes
3082 cat > conftest.i <<EOF
3084 #define GCC_PRINTF 0
3089 #ifndef GCC_NORETURN
3090 #define GCC_NORETURN /* nothing */
3093 #define GCC_UNUSED /* nothing */
3096 if test "$GCC" = yes
3098 { echo "$as_me:3098: checking for $CC __attribute__ directives..." >&5
3099 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3100 cat > conftest.$ac_ext <<EOF
3101 #line 3101 "${as_me:-configure}"
3102 #include "confdefs.h"
3103 #include "conftest.h"
3104 #include "conftest.i"
3106 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3108 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3111 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3113 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3115 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3116 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3117 extern void foo(void) GCC_NORETURN;
3118 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3120 cf_printf_attribute=no
3121 cf_scanf_attribute=no
3122 for cf_attribute in scanf printf unused noreturn
3125 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3127 cf_directive="__attribute__(($cf_attribute))"
3128 echo "checking for $CC $cf_directive" 1>&5
3130 case $cf_attribute in
3132 cf_printf_attribute=yes
3133 cat >conftest.h <<EOF
3134 #define GCC_$cf_ATTRIBUTE 1
3138 cf_scanf_attribute=yes
3139 cat >conftest.h <<EOF
3140 #define GCC_$cf_ATTRIBUTE 1
3144 cat >conftest.h <<EOF
3145 #define GCC_$cf_ATTRIBUTE $cf_directive
3150 if { (eval echo "$as_me:3150: \"$ac_compile\"") >&5
3151 (eval $ac_compile) 2>&5
3153 echo "$as_me:3153: \$? = $ac_status" >&5
3154 (exit $ac_status); }; then
3155 test -n "$verbose" && echo "$as_me:3155: result: ... $cf_attribute" >&5
3156 echo "${ECHO_T}... $cf_attribute" >&6
3157 cat conftest.h >>confdefs.h
3158 case $cf_attribute in
3161 cat >>confdefs.h <<EOF
3162 #define GCC_NORETURN $cf_directive
3167 cf_value='/* nothing */'
3168 if test "$cf_printf_attribute" != no ; then
3169 cf_value='__attribute__((format(printf,fmt,var)))'
3171 cat >>confdefs.h <<\EOF
3172 #define GCC_PRINTF 1
3177 cat >>confdefs.h <<EOF
3178 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3183 cf_value='/* nothing */'
3184 if test "$cf_scanf_attribute" != no ; then
3185 cf_value='__attribute__((format(scanf,fmt,var)))'
3187 cat >>confdefs.h <<\EOF
3193 cat >>confdefs.h <<EOF
3194 #define GCC_SCANFLIKE(fmt,var) $cf_value
3200 cat >>confdefs.h <<EOF
3201 #define GCC_UNUSED $cf_directive
3209 fgrep define conftest.i >>confdefs.h
3214 echo "$as_me:3214: checking if you want to work around bogus compiler/loader warnings" >&5
3215 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3217 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3218 if test "${enable_string_hacks+set}" = set; then
3219 enableval="$enable_string_hacks"
3220 with_string_hacks=$enableval
3222 with_string_hacks=no
3224 echo "$as_me:3224: result: $with_string_hacks" >&5
3225 echo "${ECHO_T}$with_string_hacks" >&6
3227 if test "x$with_string_hacks" = "xyes"; then
3229 cat >>confdefs.h <<\EOF
3230 #define USE_STRING_HACKS 1
3233 { echo "$as_me:3233: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3234 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3235 echo "$as_me:3235: checking for strlcat" >&5
3236 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3237 if test "${ac_cv_func_strlcat+set}" = set; then
3238 echo $ECHO_N "(cached) $ECHO_C" >&6
3240 cat >conftest.$ac_ext <<_ACEOF
3241 #line 3241 "configure"
3242 #include "confdefs.h"
3243 #define strlcat autoconf_temporary
3244 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3251 /* We use char because int might match the return type of a gcc2
3252 builtin and then its argument prototype would still apply. */
3253 char strlcat (void);
3259 /* The GNU C library defines stubs for functions which it implements
3260 to always fail with ENOSYS. Some functions are actually named
3261 something starting with __ and the normal name is an alias. */
3262 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3263 #error found stub for strlcat
3271 rm -f conftest.$ac_objext conftest$ac_exeext
3272 if { (eval echo "$as_me:3272: \"$ac_link\"") >&5
3273 (eval $ac_link) 2>&5
3275 echo "$as_me:3275: \$? = $ac_status" >&5
3276 (exit $ac_status); } &&
3277 { ac_try='test -s conftest$ac_exeext'
3278 { (eval echo "$as_me:3278: \"$ac_try\"") >&5
3281 echo "$as_me:3281: \$? = $ac_status" >&5
3282 (exit $ac_status); }; }; then
3283 ac_cv_func_strlcat=yes
3285 echo "$as_me: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3287 ac_cv_func_strlcat=no
3289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3291 echo "$as_me:3291: result: $ac_cv_func_strlcat" >&5
3292 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3293 if test $ac_cv_func_strlcat = yes; then
3295 cat >>confdefs.h <<\EOF
3296 #define HAVE_STRLCAT 1
3301 echo "$as_me:3301: checking for strlcat in -lbsd" >&5
3302 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3303 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3304 echo $ECHO_N "(cached) $ECHO_C" >&6
3306 ac_check_lib_save_LIBS=$LIBS
3308 cat >conftest.$ac_ext <<_ACEOF
3309 #line 3309 "configure"
3310 #include "confdefs.h"
3312 /* Override any gcc2 internal prototype to avoid an error. */
3316 /* We use char because int might match the return type of a gcc2
3317 builtin and then its argument prototype would still apply. */
3327 rm -f conftest.$ac_objext conftest$ac_exeext
3328 if { (eval echo "$as_me:3328: \"$ac_link\"") >&5
3329 (eval $ac_link) 2>&5
3331 echo "$as_me:3331: \$? = $ac_status" >&5
3332 (exit $ac_status); } &&
3333 { ac_try='test -s conftest$ac_exeext'
3334 { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3337 echo "$as_me:3337: \$? = $ac_status" >&5
3338 (exit $ac_status); }; }; then
3339 ac_cv_lib_bsd_strlcat=yes
3341 echo "$as_me: failed program was:" >&5
3342 cat conftest.$ac_ext >&5
3343 ac_cv_lib_bsd_strlcat=no
3345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3346 LIBS=$ac_check_lib_save_LIBS
3348 echo "$as_me:3348: result: $ac_cv_lib_bsd_strlcat" >&5
3349 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3350 if test $ac_cv_lib_bsd_strlcat = yes; then
3353 # Filter out duplicates - this happens with badly-designed ".pc" files...
3354 for cf_add_1lib in $LIBS
3356 for cf_add_2lib in $cf_add_libs
3358 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3364 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3368 for ac_header in bsd/string.h
3370 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3371 echo "$as_me:3371: checking for $ac_header" >&5
3372 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3373 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3374 echo $ECHO_N "(cached) $ECHO_C" >&6
3376 cat >conftest.$ac_ext <<_ACEOF
3377 #line 3377 "configure"
3378 #include "confdefs.h"
3379 #include <$ac_header>
3381 if { (eval echo "$as_me:3381: \"$ac_cpp conftest.$ac_ext\"") >&5
3382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3384 egrep -v '^ *\+' conftest.er1 >conftest.err
3386 cat conftest.err >&5
3387 echo "$as_me:3387: \$? = $ac_status" >&5
3388 (exit $ac_status); } >/dev/null; then
3389 if test -s conftest.err; then
3390 ac_cpp_err=$ac_c_preproc_warn_flag
3397 if test -z "$ac_cpp_err"; then
3398 eval "$as_ac_Header=yes"
3400 echo "$as_me: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 eval "$as_ac_Header=no"
3404 rm -f conftest.err conftest.$ac_ext
3406 echo "$as_me:3406: result: `eval echo '${'$as_ac_Header'}'`" >&5
3407 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3408 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3409 cat >>confdefs.h <<EOF
3410 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3416 cat >>confdefs.h <<\EOF
3417 #define HAVE_STRLCAT 1
3424 for ac_func in strlcpy snprintf
3426 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3427 echo "$as_me:3427: checking for $ac_func" >&5
3428 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3429 if eval "test \"\${$as_ac_var+set}\" = set"; then
3430 echo $ECHO_N "(cached) $ECHO_C" >&6
3432 cat >conftest.$ac_ext <<_ACEOF
3433 #line 3433 "configure"
3434 #include "confdefs.h"
3435 #define $ac_func autoconf_temporary
3436 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3443 /* We use char because int might match the return type of a gcc2
3444 builtin and then its argument prototype would still apply. */
3445 char $ac_func (void);
3451 /* The GNU C library defines stubs for functions which it implements
3452 to always fail with ENOSYS. Some functions are actually named
3453 something starting with __ and the normal name is an alias. */
3454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3455 #error found stub for $ac_func
3463 rm -f conftest.$ac_objext conftest$ac_exeext
3464 if { (eval echo "$as_me:3464: \"$ac_link\"") >&5
3465 (eval $ac_link) 2>&5
3467 echo "$as_me:3467: \$? = $ac_status" >&5
3468 (exit $ac_status); } &&
3469 { ac_try='test -s conftest$ac_exeext'
3470 { (eval echo "$as_me:3470: \"$ac_try\"") >&5
3473 echo "$as_me:3473: \$? = $ac_status" >&5
3474 (exit $ac_status); }; }; then
3475 eval "$as_ac_var=yes"
3477 echo "$as_me: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 eval "$as_ac_var=no"
3481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3483 echo "$as_me:3483: result: `eval echo '${'$as_ac_var'}'`" >&5
3484 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3485 if test `eval echo '${'$as_ac_var'}'` = yes; then
3486 cat >>confdefs.h <<EOF
3487 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3495 echo "$as_me:3495: checking if the POSIX test-macros are already defined" >&5
3496 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3497 if test "${cf_cv_posix_visible+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
3501 cat >conftest.$ac_ext <<_ACEOF
3502 #line 3502 "configure"
3503 #include "confdefs.h"
3509 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3510 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3511 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3512 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3513 #error conflicting symbols found
3520 rm -f conftest.$ac_objext
3521 if { (eval echo "$as_me:3521: \"$ac_compile\"") >&5
3522 (eval $ac_compile) 2>&5
3524 echo "$as_me:3524: \$? = $ac_status" >&5
3525 (exit $ac_status); } &&
3526 { ac_try='test -s conftest.$ac_objext'
3527 { (eval echo "$as_me:3527: \"$ac_try\"") >&5
3530 echo "$as_me:3530: \$? = $ac_status" >&5
3531 (exit $ac_status); }; }; then
3532 cf_cv_posix_visible=no
3534 echo "$as_me: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3536 cf_cv_posix_visible=yes
3538 rm -f conftest.$ac_objext conftest.$ac_ext
3541 echo "$as_me:3541: result: $cf_cv_posix_visible" >&5
3542 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3544 if test "$cf_cv_posix_visible" = no; then
3547 cf_POSIX_C_SOURCE=199506L
3552 cf_xopen_source="-D_ALL_SOURCE"
3558 cf_xopen_source="-D_APPLE_C_SOURCE"
3561 cf_xopen_source="-D_DARWIN_C_SOURCE"
3564 (freebsd*|dragonfly*|midnightbsd*)
3565 # 5.x headers associate
3566 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3567 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3568 cf_POSIX_C_SOURCE=200112L
3570 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3573 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3576 cf_xopen_source="-D_HPUX_SOURCE"
3579 cf_xopen_source="-D_SGI_SOURCE"
3582 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3584 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3586 echo "$as_me:3586: checking if this is the GNU C library" >&5
3587 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3588 if test "${cf_cv_gnu_library+set}" = set; then
3589 echo $ECHO_N "(cached) $ECHO_C" >&6
3592 cat >conftest.$ac_ext <<_ACEOF
3593 #line 3593 "configure"
3594 #include "confdefs.h"
3595 #include <sys/types.h>
3600 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3602 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3605 # error not GNU C library
3611 rm -f conftest.$ac_objext
3612 if { (eval echo "$as_me:3612: \"$ac_compile\"") >&5
3613 (eval $ac_compile) 2>&5
3615 echo "$as_me:3615: \$? = $ac_status" >&5
3616 (exit $ac_status); } &&
3617 { ac_try='test -s conftest.$ac_objext'
3618 { (eval echo "$as_me:3618: \"$ac_try\"") >&5
3621 echo "$as_me:3621: \$? = $ac_status" >&5
3622 (exit $ac_status); }; }; then
3623 cf_cv_gnu_library=yes
3625 echo "$as_me: failed program was:" >&5
3626 cat conftest.$ac_ext >&5
3627 cf_cv_gnu_library=no
3629 rm -f conftest.$ac_objext conftest.$ac_ext
3632 echo "$as_me:3632: result: $cf_cv_gnu_library" >&5
3633 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3635 if test x$cf_cv_gnu_library = xyes; then
3637 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3638 # was changed to help a little. newlib incorporated the change about 4
3640 echo "$as_me:3640: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3641 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3642 if test "${cf_cv_gnu_library_219+set}" = set; then
3643 echo $ECHO_N "(cached) $ECHO_C" >&6
3648 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3649 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3651 cat >conftest.$ac_ext <<_ACEOF
3652 #line 3652 "configure"
3653 #include "confdefs.h"
3654 #include <sys/types.h>
3659 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3661 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3664 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3670 rm -f conftest.$ac_objext
3671 if { (eval echo "$as_me:3671: \"$ac_compile\"") >&5
3672 (eval $ac_compile) 2>&5
3674 echo "$as_me:3674: \$? = $ac_status" >&5
3675 (exit $ac_status); } &&
3676 { ac_try='test -s conftest.$ac_objext'
3677 { (eval echo "$as_me:3677: \"$ac_try\"") >&5
3680 echo "$as_me:3680: \$? = $ac_status" >&5
3681 (exit $ac_status); }; }; then
3682 cf_cv_gnu_library_219=yes
3684 echo "$as_me: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 cf_cv_gnu_library_219=no
3688 rm -f conftest.$ac_objext conftest.$ac_ext
3692 echo "$as_me:3692: result: $cf_cv_gnu_library_219" >&5
3693 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3695 if test "x$cf_cv_gnu_library_219" = xyes; then
3697 echo "$as_me:3697: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3698 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3699 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3700 echo $ECHO_N "(cached) $ECHO_C" >&6
3706 cf_new_extra_cppflags=
3708 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3710 case $cf_fix_cppflags in
3712 case $cf_add_cflags in
3713 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3714 case $cf_add_cflags in
3716 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3718 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3719 && test -z "${cf_tst_cflags}" \
3720 && cf_fix_cppflags=yes
3722 if test $cf_fix_cppflags = yes ; then
3724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3728 elif test "${cf_tst_cflags}" = "\"'" ; then
3730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3741 case $cf_add_cflags in
3743 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3745 CPPFLAGS=`echo "$CPPFLAGS" | \
3746 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3747 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3752 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3753 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3760 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3761 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3771 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3774 && test -z "${cf_tst_cflags}" \
3775 && cf_fix_cppflags=no
3780 if test -n "$cf_new_cflags" ; then
3782 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3783 CFLAGS="${CFLAGS}$cf_new_cflags"
3787 if test -n "$cf_new_cppflags" ; then
3789 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3790 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3794 if test -n "$cf_new_extra_cppflags" ; then
3796 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3797 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3801 cat >conftest.$ac_ext <<_ACEOF
3802 #line 3802 "configure"
3803 #include "confdefs.h"
3806 #include <sys/types.h>
3812 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3815 # error GNU C library is too old
3821 rm -f conftest.$ac_objext
3822 if { (eval echo "$as_me:3822: \"$ac_compile\"") >&5
3823 (eval $ac_compile) 2>&5
3825 echo "$as_me:3825: \$? = $ac_status" >&5
3826 (exit $ac_status); } &&
3827 { ac_try='test -s conftest.$ac_objext'
3828 { (eval echo "$as_me:3828: \"$ac_try\"") >&5
3831 echo "$as_me:3831: \$? = $ac_status" >&5
3832 (exit $ac_status); }; }; then
3833 cf_cv_gnu_dftsrc_219=yes
3835 echo "$as_me: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 cf_cv_gnu_dftsrc_219=no
3839 rm -f conftest.$ac_objext conftest.$ac_ext
3842 echo "$as_me:3842: result: $cf_cv_gnu_dftsrc_219" >&5
3843 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3844 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3846 cf_cv_gnu_dftsrc_219=maybe
3849 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3851 echo "$as_me:3851: checking if we must define _GNU_SOURCE" >&5
3852 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3853 if test "${cf_cv_gnu_source+set}" = set; then
3854 echo $ECHO_N "(cached) $ECHO_C" >&6
3857 cat >conftest.$ac_ext <<_ACEOF
3858 #line 3858 "configure"
3859 #include "confdefs.h"
3860 #include <sys/types.h>
3865 #ifndef _XOPEN_SOURCE
3866 #error expected _XOPEN_SOURCE to be defined
3872 rm -f conftest.$ac_objext
3873 if { (eval echo "$as_me:3873: \"$ac_compile\"") >&5
3874 (eval $ac_compile) 2>&5
3876 echo "$as_me:3876: \$? = $ac_status" >&5
3877 (exit $ac_status); } &&
3878 { ac_try='test -s conftest.$ac_objext'
3879 { (eval echo "$as_me:3879: \"$ac_try\"") >&5
3882 echo "$as_me:3882: \$? = $ac_status" >&5
3883 (exit $ac_status); }; }; then
3886 echo "$as_me: failed program was:" >&5
3887 cat conftest.$ac_ext >&5
3893 cf_new_extra_cppflags=
3895 for cf_add_cflags in -D_GNU_SOURCE
3897 case $cf_fix_cppflags in
3899 case $cf_add_cflags in
3900 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3901 case $cf_add_cflags in
3903 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3905 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3906 && test -z "${cf_tst_cflags}" \
3907 && cf_fix_cppflags=yes
3909 if test $cf_fix_cppflags = yes ; then
3911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3915 elif test "${cf_tst_cflags}" = "\"'" ; then
3917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3928 case $cf_add_cflags in
3930 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3932 CPPFLAGS=`echo "$CPPFLAGS" | \
3933 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3934 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3939 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3940 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3947 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3948 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3955 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3956 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3958 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3960 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3961 && test -z "${cf_tst_cflags}" \
3962 && cf_fix_cppflags=no
3967 if test -n "$cf_new_cflags" ; then
3969 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3970 CFLAGS="${CFLAGS}$cf_new_cflags"
3974 if test -n "$cf_new_cppflags" ; then
3976 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3977 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3981 if test -n "$cf_new_extra_cppflags" ; then
3983 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3984 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3988 cat >conftest.$ac_ext <<_ACEOF
3989 #line 3989 "configure"
3990 #include "confdefs.h"
3991 #include <sys/types.h>
3996 #ifdef _XOPEN_SOURCE
3997 #error expected _XOPEN_SOURCE to be undefined
4003 rm -f conftest.$ac_objext
4004 if { (eval echo "$as_me:4004: \"$ac_compile\"") >&5
4005 (eval $ac_compile) 2>&5
4007 echo "$as_me:4007: \$? = $ac_status" >&5
4008 (exit $ac_status); } &&
4009 { ac_try='test -s conftest.$ac_objext'
4010 { (eval echo "$as_me:4010: \"$ac_try\"") >&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit $ac_status); }; }; then
4017 echo "$as_me: failed program was:" >&5
4018 cat conftest.$ac_ext >&5
4019 cf_cv_gnu_source=yes
4021 rm -f conftest.$ac_objext conftest.$ac_ext
4025 rm -f conftest.$ac_objext conftest.$ac_ext
4028 echo "$as_me:4028: result: $cf_cv_gnu_source" >&5
4029 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4031 if test "$cf_cv_gnu_source" = yes
4033 echo "$as_me:4033: checking if we should also define _DEFAULT_SOURCE" >&5
4034 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4035 if test "${cf_cv_default_source+set}" = set; then
4036 echo $ECHO_N "(cached) $ECHO_C" >&6
4039 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4040 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4042 cat >conftest.$ac_ext <<_ACEOF
4043 #line 4043 "configure"
4044 #include "confdefs.h"
4045 #include <sys/types.h>
4050 #ifdef _DEFAULT_SOURCE
4051 #error expected _DEFAULT_SOURCE to be undefined
4057 rm -f conftest.$ac_objext
4058 if { (eval echo "$as_me:4058: \"$ac_compile\"") >&5
4059 (eval $ac_compile) 2>&5
4061 echo "$as_me:4061: \$? = $ac_status" >&5
4062 (exit $ac_status); } &&
4063 { ac_try='test -s conftest.$ac_objext'
4064 { (eval echo "$as_me:4064: \"$ac_try\"") >&5
4067 echo "$as_me:4067: \$? = $ac_status" >&5
4068 (exit $ac_status); }; }; then
4069 cf_cv_default_source=no
4071 echo "$as_me: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4073 cf_cv_default_source=yes
4075 rm -f conftest.$ac_objext conftest.$ac_ext
4078 echo "$as_me:4078: result: $cf_cv_default_source" >&5
4079 echo "${ECHO_T}$cf_cv_default_source" >&6
4080 if test "$cf_cv_default_source" = yes
4083 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4084 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4094 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4097 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4100 if test "$cf_cv_posix_visible" = no; then
4102 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4104 cf_save_CFLAGS="$CFLAGS"
4105 cf_save_CPPFLAGS="$CPPFLAGS"
4107 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4108 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4109 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4111 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4112 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4113 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4115 echo "$as_me:4115: checking if we should define _POSIX_C_SOURCE" >&5
4116 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4117 if test "${cf_cv_posix_c_source+set}" = set; then
4118 echo $ECHO_N "(cached) $ECHO_C" >&6
4121 echo "${as_me:-configure}:4121: testing if the symbol is already defined go no further ..." 1>&5
4123 cat >conftest.$ac_ext <<_ACEOF
4124 #line 4124 "configure"
4125 #include "confdefs.h"
4126 #include <sys/types.h>
4131 #ifndef _POSIX_C_SOURCE
4138 rm -f conftest.$ac_objext
4139 if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
4140 (eval $ac_compile) 2>&5
4142 echo "$as_me:4142: \$? = $ac_status" >&5
4143 (exit $ac_status); } &&
4144 { ac_try='test -s conftest.$ac_objext'
4145 { (eval echo "$as_me:4145: \"$ac_try\"") >&5
4148 echo "$as_me:4148: \$? = $ac_status" >&5
4149 (exit $ac_status); }; }; then
4150 cf_cv_posix_c_source=no
4152 echo "$as_me: failed program was:" >&5
4153 cat conftest.$ac_ext >&5
4154 cf_want_posix_source=no
4155 case .$cf_POSIX_C_SOURCE in
4157 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4160 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4161 cf_want_posix_source=yes
4164 cf_want_posix_source=yes
4167 if test "$cf_want_posix_source" = yes ; then
4168 cat >conftest.$ac_ext <<_ACEOF
4169 #line 4169 "configure"
4170 #include "confdefs.h"
4171 #include <sys/types.h>
4176 #ifdef _POSIX_SOURCE
4183 rm -f conftest.$ac_objext
4184 if { (eval echo "$as_me:4184: \"$ac_compile\"") >&5
4185 (eval $ac_compile) 2>&5
4187 echo "$as_me:4187: \$? = $ac_status" >&5
4188 (exit $ac_status); } &&
4189 { ac_try='test -s conftest.$ac_objext'
4190 { (eval echo "$as_me:4190: \"$ac_try\"") >&5
4193 echo "$as_me:4193: \$? = $ac_status" >&5
4194 (exit $ac_status); }; }; then
4197 echo "$as_me: failed program was:" >&5
4198 cat conftest.$ac_ext >&5
4199 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4201 rm -f conftest.$ac_objext conftest.$ac_ext
4204 echo "${as_me:-configure}:4204: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4206 CFLAGS="$cf_trim_CFLAGS"
4207 CPPFLAGS="$cf_trim_CPPFLAGS"
4209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4210 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4212 echo "${as_me:-configure}:4212: testing if the second compile does not leave our definition intact error ..." 1>&5
4214 cat >conftest.$ac_ext <<_ACEOF
4215 #line 4215 "configure"
4216 #include "confdefs.h"
4217 #include <sys/types.h>
4222 #ifndef _POSIX_C_SOURCE
4229 rm -f conftest.$ac_objext
4230 if { (eval echo "$as_me:4230: \"$ac_compile\"") >&5
4231 (eval $ac_compile) 2>&5
4233 echo "$as_me:4233: \$? = $ac_status" >&5
4234 (exit $ac_status); } &&
4235 { ac_try='test -s conftest.$ac_objext'
4236 { (eval echo "$as_me:4236: \"$ac_try\"") >&5
4239 echo "$as_me:4239: \$? = $ac_status" >&5
4240 (exit $ac_status); }; }; then
4243 echo "$as_me: failed program was:" >&5
4244 cat conftest.$ac_ext >&5
4245 cf_cv_posix_c_source=no
4247 rm -f conftest.$ac_objext conftest.$ac_ext
4248 CFLAGS="$cf_save_CFLAGS"
4249 CPPFLAGS="$cf_save_CPPFLAGS"
4252 rm -f conftest.$ac_objext conftest.$ac_ext
4255 echo "$as_me:4255: result: $cf_cv_posix_c_source" >&5
4256 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4258 if test "$cf_cv_posix_c_source" != no ; then
4259 CFLAGS="$cf_trim_CFLAGS"
4260 CPPFLAGS="$cf_trim_CPPFLAGS"
4265 cf_new_extra_cppflags=
4267 for cf_add_cflags in $cf_cv_posix_c_source
4269 case $cf_fix_cppflags in
4271 case $cf_add_cflags in
4272 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4273 case $cf_add_cflags in
4275 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4278 && test -z "${cf_tst_cflags}" \
4279 && cf_fix_cppflags=yes
4281 if test $cf_fix_cppflags = yes ; then
4283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4287 elif test "${cf_tst_cflags}" = "\"'" ; then
4289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4300 case $cf_add_cflags in
4302 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4304 CPPFLAGS=`echo "$CPPFLAGS" | \
4305 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4306 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4311 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4312 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4319 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4320 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4327 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4328 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4330 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4332 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4333 && test -z "${cf_tst_cflags}" \
4334 && cf_fix_cppflags=no
4339 if test -n "$cf_new_cflags" ; then
4341 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4342 CFLAGS="${CFLAGS}$cf_new_cflags"
4346 if test -n "$cf_new_cppflags" ; then
4348 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4349 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4353 if test -n "$cf_new_extra_cppflags" ; then
4355 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4356 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4362 fi # cf_cv_posix_visible
4366 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4369 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4370 cf_xopen_source="-D_BSD_SOURCE"
4374 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4377 cf_xopen_source="-D_OSF_SOURCE"
4380 cf_xopen_source="-D_QNX_SOURCE"
4383 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4386 cf_xopen_source="-D__EXTENSIONS__"
4387 cf_cv_xopen_source=broken
4389 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4395 echo "$as_me:4395: checking if we should define _XOPEN_SOURCE" >&5
4396 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4397 if test "${cf_cv_xopen_source+set}" = set; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6
4401 cat >conftest.$ac_ext <<_ACEOF
4402 #line 4402 "configure"
4403 #include "confdefs.h"
4407 #include <sys/types.h>
4413 #ifndef _XOPEN_SOURCE
4420 rm -f conftest.$ac_objext
4421 if { (eval echo "$as_me:4421: \"$ac_compile\"") >&5
4422 (eval $ac_compile) 2>&5
4424 echo "$as_me:4424: \$? = $ac_status" >&5
4425 (exit $ac_status); } &&
4426 { ac_try='test -s conftest.$ac_objext'
4427 { (eval echo "$as_me:4427: \"$ac_try\"") >&5
4430 echo "$as_me:4430: \$? = $ac_status" >&5
4431 (exit $ac_status); }; }; then
4432 cf_cv_xopen_source=no
4434 echo "$as_me: failed program was:" >&5
4435 cat conftest.$ac_ext >&5
4438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4439 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4441 cat >conftest.$ac_ext <<_ACEOF
4442 #line 4442 "configure"
4443 #include "confdefs.h"
4447 #include <sys/types.h>
4453 #ifdef _XOPEN_SOURCE
4460 rm -f conftest.$ac_objext
4461 if { (eval echo "$as_me:4461: \"$ac_compile\"") >&5
4462 (eval $ac_compile) 2>&5
4464 echo "$as_me:4464: \$? = $ac_status" >&5
4465 (exit $ac_status); } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:4467: \"$ac_try\"") >&5
4470 echo "$as_me:4470: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
4472 cf_cv_xopen_source=no
4474 echo "$as_me: failed program was:" >&5
4475 cat conftest.$ac_ext >&5
4476 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4478 rm -f conftest.$ac_objext conftest.$ac_ext
4482 rm -f conftest.$ac_objext conftest.$ac_ext
4485 echo "$as_me:4485: result: $cf_cv_xopen_source" >&5
4486 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4488 if test "$cf_cv_xopen_source" != no ; then
4490 CFLAGS=`echo "$CFLAGS" | \
4491 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4492 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4494 CPPFLAGS=`echo "$CPPFLAGS" | \
4495 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4496 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4498 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4503 cf_new_extra_cppflags=
4505 for cf_add_cflags in $cf_temp_xopen_source
4507 case $cf_fix_cppflags in
4509 case $cf_add_cflags in
4510 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4511 case $cf_add_cflags in
4513 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4515 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4516 && test -z "${cf_tst_cflags}" \
4517 && cf_fix_cppflags=yes
4519 if test $cf_fix_cppflags = yes ; then
4521 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4522 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4525 elif test "${cf_tst_cflags}" = "\"'" ; then
4527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4538 case $cf_add_cflags in
4540 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4542 CPPFLAGS=`echo "$CPPFLAGS" | \
4543 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4544 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4549 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4550 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4557 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4558 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4568 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4570 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4571 && test -z "${cf_tst_cflags}" \
4572 && cf_fix_cppflags=no
4577 if test -n "$cf_new_cflags" ; then
4579 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4580 CFLAGS="${CFLAGS}$cf_new_cflags"
4584 if test -n "$cf_new_cppflags" ; then
4586 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4587 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4591 if test -n "$cf_new_extra_cppflags" ; then
4593 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4594 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4600 if test "$cf_cv_posix_visible" = no; then
4602 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4604 cf_save_CFLAGS="$CFLAGS"
4605 cf_save_CPPFLAGS="$CPPFLAGS"
4607 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4608 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4609 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4611 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4612 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4613 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4615 echo "$as_me:4615: checking if we should define _POSIX_C_SOURCE" >&5
4616 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4617 if test "${cf_cv_posix_c_source+set}" = set; then
4618 echo $ECHO_N "(cached) $ECHO_C" >&6
4621 echo "${as_me:-configure}:4621: testing if the symbol is already defined go no further ..." 1>&5
4623 cat >conftest.$ac_ext <<_ACEOF
4624 #line 4624 "configure"
4625 #include "confdefs.h"
4626 #include <sys/types.h>
4631 #ifndef _POSIX_C_SOURCE
4638 rm -f conftest.$ac_objext
4639 if { (eval echo "$as_me:4639: \"$ac_compile\"") >&5
4640 (eval $ac_compile) 2>&5
4642 echo "$as_me:4642: \$? = $ac_status" >&5
4643 (exit $ac_status); } &&
4644 { ac_try='test -s conftest.$ac_objext'
4645 { (eval echo "$as_me:4645: \"$ac_try\"") >&5
4648 echo "$as_me:4648: \$? = $ac_status" >&5
4649 (exit $ac_status); }; }; then
4650 cf_cv_posix_c_source=no
4652 echo "$as_me: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 cf_want_posix_source=no
4655 case .$cf_POSIX_C_SOURCE in
4657 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4660 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4661 cf_want_posix_source=yes
4664 cf_want_posix_source=yes
4667 if test "$cf_want_posix_source" = yes ; then
4668 cat >conftest.$ac_ext <<_ACEOF
4669 #line 4669 "configure"
4670 #include "confdefs.h"
4671 #include <sys/types.h>
4676 #ifdef _POSIX_SOURCE
4683 rm -f conftest.$ac_objext
4684 if { (eval echo "$as_me:4684: \"$ac_compile\"") >&5
4685 (eval $ac_compile) 2>&5
4687 echo "$as_me:4687: \$? = $ac_status" >&5
4688 (exit $ac_status); } &&
4689 { ac_try='test -s conftest.$ac_objext'
4690 { (eval echo "$as_me:4690: \"$ac_try\"") >&5
4693 echo "$as_me:4693: \$? = $ac_status" >&5
4694 (exit $ac_status); }; }; then
4697 echo "$as_me: failed program was:" >&5
4698 cat conftest.$ac_ext >&5
4699 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4701 rm -f conftest.$ac_objext conftest.$ac_ext
4704 echo "${as_me:-configure}:4704: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4706 CFLAGS="$cf_trim_CFLAGS"
4707 CPPFLAGS="$cf_trim_CPPFLAGS"
4709 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4710 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4712 echo "${as_me:-configure}:4712: testing if the second compile does not leave our definition intact error ..." 1>&5
4714 cat >conftest.$ac_ext <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4717 #include <sys/types.h>
4722 #ifndef _POSIX_C_SOURCE
4729 rm -f conftest.$ac_objext
4730 if { (eval echo "$as_me:4730: \"$ac_compile\"") >&5
4731 (eval $ac_compile) 2>&5
4733 echo "$as_me:4733: \$? = $ac_status" >&5
4734 (exit $ac_status); } &&
4735 { ac_try='test -s conftest.$ac_objext'
4736 { (eval echo "$as_me:4736: \"$ac_try\"") >&5
4739 echo "$as_me:4739: \$? = $ac_status" >&5
4740 (exit $ac_status); }; }; then
4743 echo "$as_me: failed program was:" >&5
4744 cat conftest.$ac_ext >&5
4745 cf_cv_posix_c_source=no
4747 rm -f conftest.$ac_objext conftest.$ac_ext
4748 CFLAGS="$cf_save_CFLAGS"
4749 CPPFLAGS="$cf_save_CPPFLAGS"
4752 rm -f conftest.$ac_objext conftest.$ac_ext
4755 echo "$as_me:4755: result: $cf_cv_posix_c_source" >&5
4756 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4758 if test "$cf_cv_posix_c_source" != no ; then
4759 CFLAGS="$cf_trim_CFLAGS"
4760 CPPFLAGS="$cf_trim_CPPFLAGS"
4765 cf_new_extra_cppflags=
4767 for cf_add_cflags in $cf_cv_posix_c_source
4769 case $cf_fix_cppflags in
4771 case $cf_add_cflags in
4772 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4773 case $cf_add_cflags in
4775 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4777 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4778 && test -z "${cf_tst_cflags}" \
4779 && cf_fix_cppflags=yes
4781 if test $cf_fix_cppflags = yes ; then
4783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4787 elif test "${cf_tst_cflags}" = "\"'" ; then
4789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4800 case $cf_add_cflags in
4802 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4804 CPPFLAGS=`echo "$CPPFLAGS" | \
4805 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4806 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4811 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4812 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4819 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4820 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4830 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4833 && test -z "${cf_tst_cflags}" \
4834 && cf_fix_cppflags=no
4839 if test -n "$cf_new_cflags" ; then
4841 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4842 CFLAGS="${CFLAGS}$cf_new_cflags"
4846 if test -n "$cf_new_cppflags" ; then
4848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4849 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4853 if test -n "$cf_new_extra_cppflags" ; then
4855 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4856 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4862 fi # cf_cv_posix_visible
4867 if test -n "$cf_xopen_source" ; then
4872 cf_new_extra_cppflags=
4874 for cf_add_cflags in $cf_xopen_source
4876 case $cf_fix_cppflags in
4878 case $cf_add_cflags in
4879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4880 case $cf_add_cflags in
4882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4885 && test -z "${cf_tst_cflags}" \
4886 && cf_fix_cppflags=yes
4888 if test $cf_fix_cppflags = yes ; then
4890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4894 elif test "${cf_tst_cflags}" = "\"'" ; then
4896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4907 case $cf_add_cflags in
4909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4911 CPPFLAGS=`echo "$CPPFLAGS" | \
4912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4940 && test -z "${cf_tst_cflags}" \
4941 && cf_fix_cppflags=no
4946 if test -n "$cf_new_cflags" ; then
4947 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4949 echo "${as_me:-configure}:4949: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4951 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4952 CFLAGS="${CFLAGS}$cf_new_cflags"
4956 if test -n "$cf_new_cppflags" ; then
4957 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4959 echo "${as_me:-configure}:4959: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4961 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4962 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4966 if test -n "$cf_new_extra_cppflags" ; then
4967 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4969 echo "${as_me:-configure}:4969: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4971 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4972 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4978 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4979 echo "$as_me:4979: checking if _XOPEN_SOURCE really is set" >&5
4980 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4981 cat >conftest.$ac_ext <<_ACEOF
4982 #line 4982 "configure"
4983 #include "confdefs.h"
4989 #ifndef _XOPEN_SOURCE
4996 rm -f conftest.$ac_objext
4997 if { (eval echo "$as_me:4997: \"$ac_compile\"") >&5
4998 (eval $ac_compile) 2>&5
5000 echo "$as_me:5000: \$? = $ac_status" >&5
5001 (exit $ac_status); } &&
5002 { ac_try='test -s conftest.$ac_objext'
5003 { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5006 echo "$as_me:5006: \$? = $ac_status" >&5
5007 (exit $ac_status); }; }; then
5008 cf_XOPEN_SOURCE_set=yes
5010 echo "$as_me: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 cf_XOPEN_SOURCE_set=no
5014 rm -f conftest.$ac_objext conftest.$ac_ext
5015 echo "$as_me:5015: result: $cf_XOPEN_SOURCE_set" >&5
5016 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5017 if test $cf_XOPEN_SOURCE_set = yes
5019 cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5027 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5034 rm -f conftest.$ac_objext
5035 if { (eval echo "$as_me:5035: \"$ac_compile\"") >&5
5036 (eval $ac_compile) 2>&5
5038 echo "$as_me:5038: \$? = $ac_status" >&5
5039 (exit $ac_status); } &&
5040 { ac_try='test -s conftest.$ac_objext'
5041 { (eval echo "$as_me:5041: \"$ac_try\"") >&5
5044 echo "$as_me:5044: \$? = $ac_status" >&5
5045 (exit $ac_status); }; }; then
5046 cf_XOPEN_SOURCE_set_ok=yes
5048 echo "$as_me: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 cf_XOPEN_SOURCE_set_ok=no
5052 rm -f conftest.$ac_objext conftest.$ac_ext
5053 if test $cf_XOPEN_SOURCE_set_ok = no
5055 { echo "$as_me:5055: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5056 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5060 echo "$as_me:5060: checking if we should define _XOPEN_SOURCE" >&5
5061 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5062 if test "${cf_cv_xopen_source+set}" = set; then
5063 echo $ECHO_N "(cached) $ECHO_C" >&6
5066 cat >conftest.$ac_ext <<_ACEOF
5067 #line 5067 "configure"
5068 #include "confdefs.h"
5072 #include <sys/types.h>
5078 #ifndef _XOPEN_SOURCE
5085 rm -f conftest.$ac_objext
5086 if { (eval echo "$as_me:5086: \"$ac_compile\"") >&5
5087 (eval $ac_compile) 2>&5
5089 echo "$as_me:5089: \$? = $ac_status" >&5
5090 (exit $ac_status); } &&
5091 { ac_try='test -s conftest.$ac_objext'
5092 { (eval echo "$as_me:5092: \"$ac_try\"") >&5
5095 echo "$as_me:5095: \$? = $ac_status" >&5
5096 (exit $ac_status); }; }; then
5097 cf_cv_xopen_source=no
5099 echo "$as_me: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5104 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5106 cat >conftest.$ac_ext <<_ACEOF
5107 #line 5107 "configure"
5108 #include "confdefs.h"
5112 #include <sys/types.h>
5118 #ifdef _XOPEN_SOURCE
5125 rm -f conftest.$ac_objext
5126 if { (eval echo "$as_me:5126: \"$ac_compile\"") >&5
5127 (eval $ac_compile) 2>&5
5129 echo "$as_me:5129: \$? = $ac_status" >&5
5130 (exit $ac_status); } &&
5131 { ac_try='test -s conftest.$ac_objext'
5132 { (eval echo "$as_me:5132: \"$ac_try\"") >&5
5135 echo "$as_me:5135: \$? = $ac_status" >&5
5136 (exit $ac_status); }; }; then
5137 cf_cv_xopen_source=no
5139 echo "$as_me: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5143 rm -f conftest.$ac_objext conftest.$ac_ext
5147 rm -f conftest.$ac_objext conftest.$ac_ext
5150 echo "$as_me:5150: result: $cf_cv_xopen_source" >&5
5151 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5153 if test "$cf_cv_xopen_source" != no ; then
5155 CFLAGS=`echo "$CFLAGS" | \
5156 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5157 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5159 CPPFLAGS=`echo "$CPPFLAGS" | \
5160 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5161 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5163 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5168 cf_new_extra_cppflags=
5170 for cf_add_cflags in $cf_temp_xopen_source
5172 case $cf_fix_cppflags in
5174 case $cf_add_cflags in
5175 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5176 case $cf_add_cflags in
5178 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5180 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5181 && test -z "${cf_tst_cflags}" \
5182 && cf_fix_cppflags=yes
5184 if test $cf_fix_cppflags = yes ; then
5186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5190 elif test "${cf_tst_cflags}" = "\"'" ; then
5192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5203 case $cf_add_cflags in
5205 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5207 CPPFLAGS=`echo "$CPPFLAGS" | \
5208 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5209 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5214 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5215 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5222 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5223 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5233 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5235 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5236 && test -z "${cf_tst_cflags}" \
5237 && cf_fix_cppflags=no
5242 if test -n "$cf_new_cflags" ; then
5244 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5245 CFLAGS="${CFLAGS}$cf_new_cflags"
5249 if test -n "$cf_new_cppflags" ; then
5251 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5252 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5256 if test -n "$cf_new_extra_cppflags" ; then
5258 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5259 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5267 fi # cf_cv_posix_visible
5269 echo "$as_me:5269: checking for signal global datatype" >&5
5270 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5271 if test "${cf_cv_sig_atomic_t+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5276 "volatile sig_atomic_t" \
5280 cat >conftest.$ac_ext <<_ACEOF
5281 #line 5281 "configure"
5282 #include "confdefs.h"
5284 #include <sys/types.h>
5290 static void handler(int sig)
5297 signal(SIGINT, handler);
5303 rm -f conftest.$ac_objext
5304 if { (eval echo "$as_me:5304: \"$ac_compile\"") >&5
5305 (eval $ac_compile) 2>&5
5307 echo "$as_me:5307: \$? = $ac_status" >&5
5308 (exit $ac_status); } &&
5309 { ac_try='test -s conftest.$ac_objext'
5310 { (eval echo "$as_me:5310: \"$ac_try\"") >&5
5313 echo "$as_me:5313: \$? = $ac_status" >&5
5314 (exit $ac_status); }; }; then
5315 cf_cv_sig_atomic_t=$cf_type
5317 echo "$as_me: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 cf_cv_sig_atomic_t=no
5321 rm -f conftest.$ac_objext conftest.$ac_ext
5322 test "$cf_cv_sig_atomic_t" != no && break
5327 echo "$as_me:5327: result: $cf_cv_sig_atomic_t" >&5
5328 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5329 test "$cf_cv_sig_atomic_t" != no &&
5330 cat >>confdefs.h <<EOF
5331 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5334 # Work around breakage on OS X
5336 echo "$as_me:5336: checking if SIGWINCH is defined" >&5
5337 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5338 if test "${cf_cv_define_sigwinch+set}" = set; then
5339 echo $ECHO_N "(cached) $ECHO_C" >&6
5342 cat >conftest.$ac_ext <<_ACEOF
5343 #line 5343 "configure"
5344 #include "confdefs.h"
5346 #include <sys/types.h>
5347 #include <sys/signal.h>
5357 rm -f conftest.$ac_objext
5358 if { (eval echo "$as_me:5358: \"$ac_compile\"") >&5
5359 (eval $ac_compile) 2>&5
5361 echo "$as_me:5361: \$? = $ac_status" >&5
5362 (exit $ac_status); } &&
5363 { ac_try='test -s conftest.$ac_objext'
5364 { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5367 echo "$as_me:5367: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
5369 cf_cv_define_sigwinch=yes
5371 echo "$as_me: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5377 #undef _XOPEN_SOURCE
5378 #undef _POSIX_SOURCE
5379 #undef _POSIX_C_SOURCE
5380 #include <sys/types.h>
5381 #include <sys/signal.h>
5391 rm -f conftest.$ac_objext
5392 if { (eval echo "$as_me:5392: \"$ac_compile\"") >&5
5393 (eval $ac_compile) 2>&5
5395 echo "$as_me:5395: \$? = $ac_status" >&5
5396 (exit $ac_status); } &&
5397 { ac_try='test -s conftest.$ac_objext'
5398 { (eval echo "$as_me:5398: \"$ac_try\"") >&5
5401 echo "$as_me:5401: \$? = $ac_status" >&5
5402 (exit $ac_status); }; }; then
5403 cf_cv_define_sigwinch=maybe
5405 echo "$as_me: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
5407 cf_cv_define_sigwinch=no
5409 rm -f conftest.$ac_objext conftest.$ac_ext
5412 rm -f conftest.$ac_objext conftest.$ac_ext
5415 echo "$as_me:5415: result: $cf_cv_define_sigwinch" >&5
5416 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5418 if test "$cf_cv_define_sigwinch" = maybe ; then
5419 echo "$as_me:5419: checking for actual SIGWINCH definition" >&5
5420 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5421 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5425 cf_cv_fixup_sigwinch=unknown
5427 while test $cf_sigwinch != 1
5429 cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5433 #undef _XOPEN_SOURCE
5434 #undef _POSIX_SOURCE
5435 #undef _POSIX_C_SOURCE
5436 #include <sys/types.h>
5437 #include <sys/signal.h>
5443 #if SIGWINCH != $cf_sigwinch
5451 rm -f conftest.$ac_objext
5452 if { (eval echo "$as_me:5452: \"$ac_compile\"") >&5
5453 (eval $ac_compile) 2>&5
5455 echo "$as_me:5455: \$? = $ac_status" >&5
5456 (exit $ac_status); } &&
5457 { ac_try='test -s conftest.$ac_objext'
5458 { (eval echo "$as_me:5458: \"$ac_try\"") >&5
5461 echo "$as_me:5461: \$? = $ac_status" >&5
5462 (exit $ac_status); }; }; then
5463 cf_cv_fixup_sigwinch=$cf_sigwinch
5466 echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5469 rm -f conftest.$ac_objext conftest.$ac_ext
5471 cf_sigwinch=`expr $cf_sigwinch - 1`
5475 echo "$as_me:5475: result: $cf_cv_fixup_sigwinch" >&5
5476 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5478 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5479 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5483 # Checks for CODESET support.
5485 echo "$as_me:5485: checking for nl_langinfo and CODESET" >&5
5486 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5487 if test "${am_cv_langinfo_codeset+set}" = set; then
5488 echo $ECHO_N "(cached) $ECHO_C" >&6
5490 cat >conftest.$ac_ext <<_ACEOF
5491 #line 5491 "configure"
5492 #include "confdefs.h"
5493 #include <langinfo.h>
5497 char* cs = nl_langinfo(CODESET);
5502 rm -f conftest.$ac_objext conftest$ac_exeext
5503 if { (eval echo "$as_me:5503: \"$ac_link\"") >&5
5504 (eval $ac_link) 2>&5
5506 echo "$as_me:5506: \$? = $ac_status" >&5
5507 (exit $ac_status); } &&
5508 { ac_try='test -s conftest$ac_exeext'
5509 { (eval echo "$as_me:5509: \"$ac_try\"") >&5
5512 echo "$as_me:5512: \$? = $ac_status" >&5
5513 (exit $ac_status); }; }; then
5514 am_cv_langinfo_codeset=yes
5516 echo "$as_me: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 am_cv_langinfo_codeset=no
5520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5523 echo "$as_me:5523: result: $am_cv_langinfo_codeset" >&5
5524 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5525 if test $am_cv_langinfo_codeset = yes; then
5527 cat >>confdefs.h <<\EOF
5528 #define HAVE_LANGINFO_CODESET 1
5533 echo "$as_me:5533: checking if you want to use pkg-config" >&5
5534 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5536 # Check whether --with-pkg-config or --without-pkg-config was given.
5537 if test "${with_pkg_config+set}" = set; then
5538 withval="$with_pkg_config"
5539 cf_pkg_config=$withval
5543 echo "$as_me:5543: result: $cf_pkg_config" >&5
5544 echo "${ECHO_T}$cf_pkg_config" >&6
5546 case $cf_pkg_config in
5552 if test -n "$ac_tool_prefix"; then
5553 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5554 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5555 echo "$as_me:5555: checking for $ac_word" >&5
5556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5557 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5558 echo $ECHO_N "(cached) $ECHO_C" >&6
5562 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5565 ac_save_IFS=$IFS; IFS=$ac_path_separator
5567 for ac_dir in $ac_dummy; do
5569 test -z "$ac_dir" && ac_dir=.
5570 if $as_executable_p "$ac_dir/$ac_word"; then
5571 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5572 echo "$as_me:5572: found $ac_dir/$ac_word" >&5
5580 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5582 if test -n "$PKG_CONFIG"; then
5583 echo "$as_me:5583: result: $PKG_CONFIG" >&5
5584 echo "${ECHO_T}$PKG_CONFIG" >&6
5586 echo "$as_me:5586: result: no" >&5
5587 echo "${ECHO_T}no" >&6
5591 if test -z "$ac_cv_path_PKG_CONFIG"; then
5592 ac_pt_PKG_CONFIG=$PKG_CONFIG
5593 # Extract the first word of "pkg-config", so it can be a program name with args.
5594 set dummy pkg-config; ac_word=$2
5595 echo "$as_me:5595: checking for $ac_word" >&5
5596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5597 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5598 echo $ECHO_N "(cached) $ECHO_C" >&6
5600 case $ac_pt_PKG_CONFIG in
5602 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5605 ac_save_IFS=$IFS; IFS=$ac_path_separator
5607 for ac_dir in $ac_dummy; do
5609 test -z "$ac_dir" && ac_dir=.
5610 if $as_executable_p "$ac_dir/$ac_word"; then
5611 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5612 echo "$as_me:5612: found $ac_dir/$ac_word" >&5
5617 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5621 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5623 if test -n "$ac_pt_PKG_CONFIG"; then
5624 echo "$as_me:5624: result: $ac_pt_PKG_CONFIG" >&5
5625 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5627 echo "$as_me:5627: result: no" >&5
5628 echo "${ECHO_T}no" >&6
5631 PKG_CONFIG=$ac_pt_PKG_CONFIG
5633 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5642 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5643 if test "$PKG_CONFIG" != none ; then
5645 if test "x$prefix" != xNONE; then
5646 cf_path_syntax="$prefix"
5648 cf_path_syntax="$ac_default_prefix"
5651 case ".$PKG_CONFIG" in
5656 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5658 (.\${*prefix}*|.\${*dir}*)
5659 eval PKG_CONFIG="$PKG_CONFIG"
5660 case ".$PKG_CONFIG" in
5662 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5667 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5670 { { echo "$as_me:5670: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5671 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5672 { (exit 1); exit 1; }; }
5676 elif test "x$cf_pkg_config" != xno ; then
5677 { echo "$as_me:5677: WARNING: pkg-config is not installed" >&5
5678 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5681 echo "$as_me:5681: checking if you want to see long compiling messages" >&5
5682 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5684 # Check whether --enable-echo or --disable-echo was given.
5685 if test "${enable_echo+set}" = set; then
5686 enableval="$enable_echo"
5687 test "$enableval" != no && enableval=yes
5688 if test "$enableval" != "yes" ; then
5691 ECHO_LD='@echo linking $@;'
5692 RULE_CC='@echo compiling $<'
5693 SHOW_CC='@echo compiling $@'
5715 echo "$as_me:5715: result: $enableval" >&5
5716 echo "${ECHO_T}$enableval" >&6
5718 echo "$as_me:5718: checking for ncurses wrap-prefix" >&5
5719 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5721 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5722 if test "${with_ncurses_wrap_prefix+set}" = set; then
5723 withval="$with_ncurses_wrap_prefix"
5724 NCURSES_WRAP_PREFIX=$withval
5726 NCURSES_WRAP_PREFIX=_nc_
5728 echo "$as_me:5728: result: $NCURSES_WRAP_PREFIX" >&5
5729 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5731 echo "$as_me:5731: checking if you want to check for wide-character functions" >&5
5732 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5734 # Check whether --enable-widec or --disable-widec was given.
5735 if test "${enable_widec+set}" = set; then
5736 enableval="$enable_widec"
5737 test "$enableval" != no && enableval=yes
5738 if test "$enableval" != "yes" ; then
5748 echo "$as_me:5748: result: $cf_enable_widec" >&5
5749 echo "${ECHO_T}$cf_enable_widec" >&6
5751 echo "$as_me:5751: checking for specific curses-directory" >&5
5752 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5754 # Check whether --with-curses-dir or --without-curses-dir was given.
5755 if test "${with_curses_dir+set}" = set; then
5756 withval="$with_curses_dir"
5757 cf_cv_curses_dir=$withval
5761 echo "$as_me:5761: result: $cf_cv_curses_dir" >&5
5762 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5764 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5767 if test "x$prefix" != xNONE; then
5768 cf_path_syntax="$prefix"
5770 cf_path_syntax="$ac_default_prefix"
5778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5780 (.\${*prefix}*|.\${*dir}*)
5781 eval withval="$withval"
5784 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5789 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5792 { { echo "$as_me:5792: error: expected a pathname, not \"$withval\"" >&5
5793 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5794 { (exit 1); exit 1; }; }
5798 if test -d "$cf_cv_curses_dir"
5801 if test -n "$cf_cv_curses_dir/include" ; then
5802 for cf_add_incdir in $cf_cv_curses_dir/include
5804 while test $cf_add_incdir != /usr/include
5806 if test -d $cf_add_incdir
5809 if test -n "$CFLAGS$CPPFLAGS" ; then
5810 # a loop is needed to ensure we can add subdirs of existing dirs
5811 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5812 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5813 cf_have_incdir=yes; break
5818 if test "$cf_have_incdir" = no ; then
5819 if test "$cf_add_incdir" = /usr/local/include ; then
5820 if test "$GCC" = yes
5822 cf_save_CPPFLAGS=$CPPFLAGS
5824 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5825 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5827 cat >conftest.$ac_ext <<_ACEOF
5828 #line 5828 "configure"
5829 #include "confdefs.h"
5839 rm -f conftest.$ac_objext
5840 if { (eval echo "$as_me:5840: \"$ac_compile\"") >&5
5841 (eval $ac_compile) 2>&5
5843 echo "$as_me:5843: \$? = $ac_status" >&5
5844 (exit $ac_status); } &&
5845 { ac_try='test -s conftest.$ac_objext'
5846 { (eval echo "$as_me:5846: \"$ac_try\"") >&5
5849 echo "$as_me:5849: \$? = $ac_status" >&5
5850 (exit $ac_status); }; }; then
5853 echo "$as_me: failed program was:" >&5
5854 cat conftest.$ac_ext >&5
5857 rm -f conftest.$ac_objext conftest.$ac_ext
5858 CPPFLAGS=$cf_save_CPPFLAGS
5863 if test "$cf_have_incdir" = no ; then
5864 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5866 echo "${as_me:-configure}:5866: testing adding $cf_add_incdir to include-path ..." 1>&5
5868 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5870 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5871 test "$cf_top_incdir" = "$cf_add_incdir" && break
5872 cf_add_incdir="$cf_top_incdir"
5883 if test -n "$cf_cv_curses_dir/lib" ; then
5884 for cf_add_libdir in $cf_cv_curses_dir/lib
5886 if test $cf_add_libdir = /usr/lib ; then
5888 elif test -d $cf_add_libdir
5891 if test -n "$LDFLAGS$LIBS" ; then
5892 # a loop is needed to ensure we can add subdirs of existing dirs
5893 for cf_test_libdir in $LDFLAGS $LIBS ; do
5894 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5895 cf_have_libdir=yes; break
5899 if test "$cf_have_libdir" = no ; then
5900 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5902 echo "${as_me:-configure}:5902: testing adding $cf_add_libdir to library-path ..." 1>&5
5904 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5915 echo "$as_me:5915: checking for specified curses library type" >&5
5916 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5918 # Check whether --with-screen or --without-screen was given.
5919 if test "${with_screen+set}" = set; then
5920 withval="$with_screen"
5921 cf_cv_screen=$withval
5924 # Check whether --with-ncursesw or --without-ncursesw was given.
5925 if test "${with_ncursesw+set}" = set; then
5926 withval="$with_ncursesw"
5927 cf_cv_screen=ncursesw
5930 # Check whether --with-ncurses or --without-ncurses was given.
5931 if test "${with_ncurses+set}" = set; then
5932 withval="$with_ncurses"
5933 cf_cv_screen=ncurses
5936 # Check whether --with-pdcurses or --without-pdcurses was given.
5937 if test "${with_pdcurses+set}" = set; then
5938 withval="$with_pdcurses"
5939 cf_cv_screen=pdcurses
5942 # Check whether --with-curses-colr or --without-curses-colr was given.
5943 if test "${with_curses_colr+set}" = set; then
5944 withval="$with_curses_colr"
5945 cf_cv_screen=curses_colr
5948 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5949 if test "${with_curses_5lib+set}" = set; then
5950 withval="$with_curses_5lib"
5951 cf_cv_screen=curses_5lib
5959 echo "$as_me:5959: result: $cf_cv_screen" >&5
5960 echo "${ECHO_T}$cf_cv_screen" >&6
5962 case $cf_cv_screen in
5965 echo "$as_me:5965: checking for extra include directories" >&5
5966 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5967 if test "${cf_cv_curses_incdir+set}" = set; then
5968 echo $ECHO_N "(cached) $ECHO_C" >&6
5971 cf_cv_curses_incdir=no
5974 if test "x$cf_cv_screen" = "xcurses_colr"
5976 test -d /usr/include/curses_colr && \
5977 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5981 if test "x$cf_cv_screen" = "xcurses_5lib"
5983 test -d /usr/5lib && \
5984 test -d /usr/5include && \
5985 cf_cv_curses_incdir="-I/usr/5include"
5991 echo "$as_me:5991: result: $cf_cv_curses_incdir" >&5
5992 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5993 if test "$cf_cv_curses_incdir" != no
5996 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5997 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6001 echo "$as_me:6001: checking if we have identified curses headers" >&5
6002 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6003 if test "${cf_cv_ncurses_header+set}" = set; then
6004 echo $ECHO_N "(cached) $ECHO_C" >&6
6007 cf_cv_ncurses_header=none
6010 curses.h ncurses/ncurses.h ncurses/curses.h
6012 cat >conftest.$ac_ext <<_ACEOF
6013 #line 6013 "configure"
6014 #include "confdefs.h"
6015 #include <${cf_header}>
6019 initscr(); tgoto("?", 0,0)
6024 rm -f conftest.$ac_objext
6025 if { (eval echo "$as_me:6025: \"$ac_compile\"") >&5
6026 (eval $ac_compile) 2>&5
6028 echo "$as_me:6028: \$? = $ac_status" >&5
6029 (exit $ac_status); } &&
6030 { ac_try='test -s conftest.$ac_objext'
6031 { (eval echo "$as_me:6031: \"$ac_try\"") >&5
6034 echo "$as_me:6034: \$? = $ac_status" >&5
6035 (exit $ac_status); }; }; then
6036 cf_cv_ncurses_header=$cf_header; break
6038 echo "$as_me: failed program was:" >&5
6039 cat conftest.$ac_ext >&5
6041 rm -f conftest.$ac_objext conftest.$ac_ext
6045 echo "$as_me:6045: result: $cf_cv_ncurses_header" >&5
6046 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6048 if test "$cf_cv_ncurses_header" = none ; then
6049 { { echo "$as_me:6049: error: No curses header-files found" >&5
6050 echo "$as_me: error: No curses header-files found" >&2;}
6051 { (exit 1); exit 1; }; }
6054 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6056 for ac_header in $cf_cv_ncurses_header
6058 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6059 echo "$as_me:6059: checking for $ac_header" >&5
6060 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6061 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6062 echo $ECHO_N "(cached) $ECHO_C" >&6
6064 cat >conftest.$ac_ext <<_ACEOF
6065 #line 6065 "configure"
6066 #include "confdefs.h"
6067 #include <$ac_header>
6069 if { (eval echo "$as_me:6069: \"$ac_cpp conftest.$ac_ext\"") >&5
6070 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6072 egrep -v '^ *\+' conftest.er1 >conftest.err
6074 cat conftest.err >&5
6075 echo "$as_me:6075: \$? = $ac_status" >&5
6076 (exit $ac_status); } >/dev/null; then
6077 if test -s conftest.err; then
6078 ac_cpp_err=$ac_c_preproc_warn_flag
6085 if test -z "$ac_cpp_err"; then
6086 eval "$as_ac_Header=yes"
6088 echo "$as_me: failed program was:" >&5
6089 cat conftest.$ac_ext >&5
6090 eval "$as_ac_Header=no"
6092 rm -f conftest.err conftest.$ac_ext
6094 echo "$as_me:6094: result: `eval echo '${'$as_ac_Header'}'`" >&5
6095 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6096 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6097 cat >>confdefs.h <<EOF
6098 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6104 echo "$as_me:6104: checking for terminfo header" >&5
6105 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6106 if test "${cf_cv_term_header+set}" = set; then
6107 echo $ECHO_N "(cached) $ECHO_C" >&6
6110 case ${cf_cv_ncurses_header} in
6111 (*/ncurses.h|*/ncursesw.h)
6112 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6115 cf_term_header=term.h
6119 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6121 cat >conftest.$ac_ext <<_ACEOF
6122 #line 6122 "configure"
6123 #include "confdefs.h"
6125 #include <${cf_cv_ncurses_header:-curses.h}>
6131 int x = auto_left_margin
6136 rm -f conftest.$ac_objext
6137 if { (eval echo "$as_me:6137: \"$ac_compile\"") >&5
6138 (eval $ac_compile) 2>&5
6140 echo "$as_me:6140: \$? = $ac_status" >&5
6141 (exit $ac_status); } &&
6142 { ac_try='test -s conftest.$ac_objext'
6143 { (eval echo "$as_me:6143: \"$ac_try\"") >&5
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); }; }; then
6149 cf_cv_term_header="$cf_test"
6151 echo "$as_me: failed program was:" >&5
6152 cat conftest.$ac_ext >&5
6154 cf_cv_term_header=unknown
6157 rm -f conftest.$ac_objext conftest.$ac_ext
6158 test "$cf_cv_term_header" != unknown && break
6162 echo "$as_me:6162: result: $cf_cv_term_header" >&5
6163 echo "${ECHO_T}$cf_cv_term_header" >&6
6165 # Set definitions to allow ifdef'ing to accommodate subdirectories
6167 case $cf_cv_term_header in
6170 cat >>confdefs.h <<\EOF
6171 #define HAVE_TERM_H 1
6177 case $cf_cv_term_header in
6180 cat >>confdefs.h <<\EOF
6181 #define HAVE_NCURSES_TERM_H 1
6187 cat >>confdefs.h <<\EOF
6188 #define HAVE_NCURSESW_TERM_H 1
6194 echo "$as_me:6194: checking for ncurses version" >&5
6195 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6196 if test "${cf_cv_ncurses_version+set}" = set; then
6197 echo $ECHO_N "(cached) $ECHO_C" >&6
6200 cf_cv_ncurses_version=no
6203 if test "$cross_compiling" = yes; then
6205 # This will not work if the preprocessor splits the line after the
6206 # Autoconf token. The 'unproto' program does that.
6207 cat > conftest.$ac_ext <<EOF
6208 #include <${cf_cv_ncurses_header:-curses.h}>
6210 #ifdef NCURSES_VERSION
6211 Autoconf NCURSES_VERSION
6219 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6220 { (eval echo "$as_me:6220: \"$cf_try\"") >&5
6223 echo "$as_me:6223: \$? = $ac_status" >&5
6224 (exit $ac_status); }
6225 if test -f conftest.out ; then
6226 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6227 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6232 cat >conftest.$ac_ext <<_ACEOF
6233 #line 6233 "configure"
6234 #include "confdefs.h"
6236 #include <${cf_cv_ncurses_header:-curses.h}>
6240 FILE *fp = fopen("$cf_tempfile", "w");
6241 #ifdef NCURSES_VERSION
6242 # ifdef NCURSES_VERSION_PATCH
6243 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6245 fprintf(fp, "%s\n", NCURSES_VERSION);
6249 fprintf(fp, "old\n");
6254 ${cf_cv_main_return:-return}(0);
6257 rm -f conftest$ac_exeext
6258 if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
6259 (eval $ac_link) 2>&5
6261 echo "$as_me:6261: \$? = $ac_status" >&5
6262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6263 { (eval echo "$as_me:6263: \"$ac_try\"") >&5
6266 echo "$as_me:6266: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
6269 cf_cv_ncurses_version=`cat $cf_tempfile`
6271 echo "$as_me: program exited with status $ac_status" >&5
6272 echo "$as_me: failed program was:" >&5
6273 cat conftest.$ac_ext >&5
6275 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6280 echo "$as_me:6280: result: $cf_cv_ncurses_version" >&5
6281 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6282 test "$cf_cv_ncurses_version" = no ||
6283 cat >>confdefs.h <<\EOF
6287 echo "$as_me:6287: checking if we have identified curses libraries" >&5
6288 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6289 cat >conftest.$ac_ext <<_ACEOF
6290 #line 6290 "configure"
6291 #include "confdefs.h"
6292 #include <${cf_cv_ncurses_header:-curses.h}>
6296 initscr(); tgoto("?", 0,0)
6301 rm -f conftest.$ac_objext conftest$ac_exeext
6302 if { (eval echo "$as_me:6302: \"$ac_link\"") >&5
6303 (eval $ac_link) 2>&5
6305 echo "$as_me:6305: \$? = $ac_status" >&5
6306 (exit $ac_status); } &&
6307 { ac_try='test -s conftest$ac_exeext'
6308 { (eval echo "$as_me:6308: \"$ac_try\"") >&5
6311 echo "$as_me:6311: \$? = $ac_status" >&5
6312 (exit $ac_status); }; }; then
6315 echo "$as_me: failed program was:" >&5
6316 cat conftest.$ac_ext >&5
6319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6320 echo "$as_me:6320: result: $cf_result" >&5
6321 echo "${ECHO_T}$cf_result" >&6
6323 if test "$cf_result" = no ; then
6326 echo "$as_me:6326: checking for tgoto in -lmytinfo" >&5
6327 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6328 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6329 echo $ECHO_N "(cached) $ECHO_C" >&6
6331 ac_check_lib_save_LIBS=$LIBS
6332 LIBS="-lmytinfo $LIBS"
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6337 /* Override any gcc2 internal prototype to avoid an error. */
6341 /* We use char because int might match the return type of a gcc2
6342 builtin and then its argument prototype would still apply. */
6352 rm -f conftest.$ac_objext conftest$ac_exeext
6353 if { (eval echo "$as_me:6353: \"$ac_link\"") >&5
6354 (eval $ac_link) 2>&5
6356 echo "$as_me:6356: \$? = $ac_status" >&5
6357 (exit $ac_status); } &&
6358 { ac_try='test -s conftest$ac_exeext'
6359 { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6362 echo "$as_me:6362: \$? = $ac_status" >&5
6363 (exit $ac_status); }; }; then
6364 ac_cv_lib_mytinfo_tgoto=yes
6366 echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 ac_cv_lib_mytinfo_tgoto=no
6370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6371 LIBS=$ac_check_lib_save_LIBS
6373 echo "$as_me:6373: result: $ac_cv_lib_mytinfo_tgoto" >&5
6374 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6375 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6377 cf_add_libs="-lmytinfo"
6378 # Filter out duplicates - this happens with badly-designed ".pc" files...
6379 for cf_add_1lib in $LIBS
6381 for cf_add_2lib in $cf_add_libs
6383 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6389 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6397 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6398 # next (1998), and xcurses "newer" (2000). There is no header file for
6399 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6400 # term.h) for cur_colr
6401 if test "x$cf_cv_screen" = "xcurses_colr"
6403 echo "$as_me:6403: checking for initscr in -lcur_colr" >&5
6404 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6405 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6406 echo $ECHO_N "(cached) $ECHO_C" >&6
6408 ac_check_lib_save_LIBS=$LIBS
6409 LIBS="-lcur_colr $LIBS"
6410 cat >conftest.$ac_ext <<_ACEOF
6411 #line 6411 "configure"
6412 #include "confdefs.h"
6414 /* Override any gcc2 internal prototype to avoid an error. */
6418 /* We use char because int might match the return type of a gcc2
6419 builtin and then its argument prototype would still apply. */
6429 rm -f conftest.$ac_objext conftest$ac_exeext
6430 if { (eval echo "$as_me:6430: \"$ac_link\"") >&5
6431 (eval $ac_link) 2>&5
6433 echo "$as_me:6433: \$? = $ac_status" >&5
6434 (exit $ac_status); } &&
6435 { ac_try='test -s conftest$ac_exeext'
6436 { (eval echo "$as_me:6436: \"$ac_try\"") >&5
6439 echo "$as_me:6439: \$? = $ac_status" >&5
6440 (exit $ac_status); }; }; then
6441 ac_cv_lib_cur_colr_initscr=yes
6443 echo "$as_me: failed program was:" >&5
6444 cat conftest.$ac_ext >&5
6445 ac_cv_lib_cur_colr_initscr=no
6447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6448 LIBS=$ac_check_lib_save_LIBS
6450 echo "$as_me:6450: result: $ac_cv_lib_cur_colr_initscr" >&5
6451 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6452 if test $ac_cv_lib_cur_colr_initscr = yes; then
6454 cf_add_libs="-lcur_colr"
6455 # Filter out duplicates - this happens with badly-designed ".pc" files...
6456 for cf_add_1lib in $LIBS
6458 for cf_add_2lib in $cf_add_libs
6460 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6470 ac_cv_func_initscr=yes
6474 echo "$as_me:6474: checking for initscr in -lHcurses" >&5
6475 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6476 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6477 echo $ECHO_N "(cached) $ECHO_C" >&6
6479 ac_check_lib_save_LIBS=$LIBS
6480 LIBS="-lHcurses $LIBS"
6481 cat >conftest.$ac_ext <<_ACEOF
6482 #line 6482 "configure"
6483 #include "confdefs.h"
6485 /* Override any gcc2 internal prototype to avoid an error. */
6489 /* We use char because int might match the return type of a gcc2
6490 builtin and then its argument prototype would still apply. */
6500 rm -f conftest.$ac_objext conftest$ac_exeext
6501 if { (eval echo "$as_me:6501: \"$ac_link\"") >&5
6502 (eval $ac_link) 2>&5
6504 echo "$as_me:6504: \$? = $ac_status" >&5
6505 (exit $ac_status); } &&
6506 { ac_try='test -s conftest$ac_exeext'
6507 { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6510 echo "$as_me:6510: \$? = $ac_status" >&5
6511 (exit $ac_status); }; }; then
6512 ac_cv_lib_Hcurses_initscr=yes
6514 echo "$as_me: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 ac_cv_lib_Hcurses_initscr=no
6518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6519 LIBS=$ac_check_lib_save_LIBS
6521 echo "$as_me:6521: result: $ac_cv_lib_Hcurses_initscr" >&5
6522 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6523 if test $ac_cv_lib_Hcurses_initscr = yes; then
6525 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6527 cf_add_libs="-lHcurses"
6528 # Filter out duplicates - this happens with badly-designed ".pc" files...
6529 for cf_add_1lib in $LIBS
6531 for cf_add_2lib in $cf_add_libs
6533 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6539 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6544 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6546 ac_cv_func_initscr=yes
6555 case `arch 2>/dev/null` in
6560 if test -n "/lib64" ; then
6561 for cf_add_libdir in /lib64
6563 if test $cf_add_libdir = /usr/lib ; then
6565 elif test -d $cf_add_libdir
6568 if test -n "$LDFLAGS$LIBS" ; then
6569 # a loop is needed to ensure we can add subdirs of existing dirs
6570 for cf_test_libdir in $LDFLAGS $LIBS ; do
6571 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6572 cf_have_libdir=yes; break
6576 if test "$cf_have_libdir" = no ; then
6577 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6579 echo "${as_me:-configure}:6579: testing adding $cf_add_libdir to library-path ..." 1>&5
6581 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6589 if test -n "/lib" ; then
6590 for cf_add_libdir in /lib
6592 if test $cf_add_libdir = /usr/lib ; then
6594 elif test -d $cf_add_libdir
6597 if test -n "$LDFLAGS$LIBS" ; then
6598 # a loop is needed to ensure we can add subdirs of existing dirs
6599 for cf_test_libdir in $LDFLAGS $LIBS ; do
6600 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6601 cf_have_libdir=yes; break
6605 if test "$cf_have_libdir" = no ; then
6606 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6608 echo "${as_me:-configure}:6608: testing adding $cf_add_libdir to library-path ..." 1>&5
6610 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6620 if test -n "/lib" ; then
6621 for cf_add_libdir in /lib
6623 if test $cf_add_libdir = /usr/lib ; then
6625 elif test -d $cf_add_libdir
6628 if test -n "$LDFLAGS$LIBS" ; then
6629 # a loop is needed to ensure we can add subdirs of existing dirs
6630 for cf_test_libdir in $LDFLAGS $LIBS ; do
6631 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6632 cf_have_libdir=yes; break
6636 if test "$cf_have_libdir" = no ; then
6637 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6639 echo "${as_me:-configure}:6639: testing adding $cf_add_libdir to library-path ..." 1>&5
6641 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6651 if test "x$cf_cv_screen" = "xcurses_5lib"
6653 if test -d /usr/5lib ; then
6655 if test -n "/usr/5lib" ; then
6656 for cf_add_libdir in /usr/5lib
6658 if test $cf_add_libdir = /usr/lib ; then
6660 elif test -d $cf_add_libdir
6663 if test -n "$LDFLAGS$LIBS" ; then
6664 # a loop is needed to ensure we can add subdirs of existing dirs
6665 for cf_test_libdir in $LDFLAGS $LIBS ; do
6666 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6667 cf_have_libdir=yes; break
6671 if test "$cf_have_libdir" = no ; then
6672 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6674 echo "${as_me:-configure}:6674: testing adding $cf_add_libdir to library-path ..." 1>&5
6676 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6682 cf_add_libs="-lcurses -ltermcap"
6683 # Filter out duplicates - this happens with badly-designed ".pc" files...
6684 for cf_add_1lib in $LIBS
6686 for cf_add_2lib in $cf_add_libs
6688 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6694 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6700 ac_cv_func_initscr=yes
6704 if test ".$ac_cv_func_initscr" != .yes ; then
6705 cf_save_LIBS="$LIBS"
6707 if test ".${cf_cv_ncurses_version:-no}" != .no
6709 cf_check_list="ncurses curses cursesX"
6711 cf_check_list="cursesX curses ncurses"
6714 # Check for library containing tgoto. Do this before curses library
6715 # because it may be needed to link the test-case for initscr.
6716 if test "x$cf_term_lib" = x
6718 echo "$as_me:6718: checking for tgoto" >&5
6719 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6720 if test "${ac_cv_func_tgoto+set}" = set; then
6721 echo $ECHO_N "(cached) $ECHO_C" >&6
6723 cat >conftest.$ac_ext <<_ACEOF
6724 #line 6724 "configure"
6725 #include "confdefs.h"
6726 #define tgoto autoconf_temporary
6727 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6734 /* We use char because int might match the return type of a gcc2
6735 builtin and then its argument prototype would still apply. */
6742 /* The GNU C library defines stubs for functions which it implements
6743 to always fail with ENOSYS. Some functions are actually named
6744 something starting with __ and the normal name is an alias. */
6745 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6746 #error found stub for tgoto
6754 rm -f conftest.$ac_objext conftest$ac_exeext
6755 if { (eval echo "$as_me:6755: \"$ac_link\"") >&5
6756 (eval $ac_link) 2>&5
6758 echo "$as_me:6758: \$? = $ac_status" >&5
6759 (exit $ac_status); } &&
6760 { ac_try='test -s conftest$ac_exeext'
6761 { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit $ac_status); }; }; then
6766 ac_cv_func_tgoto=yes
6768 echo "$as_me: failed program was:" >&5
6769 cat conftest.$ac_ext >&5
6772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6774 echo "$as_me:6774: result: $ac_cv_func_tgoto" >&5
6775 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6776 if test $ac_cv_func_tgoto = yes; then
6777 cf_term_lib=predefined
6780 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6782 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6783 echo "$as_me:6783: checking for tgoto in -l$cf_term_lib" >&5
6784 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6785 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6786 echo $ECHO_N "(cached) $ECHO_C" >&6
6788 ac_check_lib_save_LIBS=$LIBS
6789 LIBS="-l$cf_term_lib $LIBS"
6790 cat >conftest.$ac_ext <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6794 /* Override any gcc2 internal prototype to avoid an error. */
6798 /* We use char because int might match the return type of a gcc2
6799 builtin and then its argument prototype would still apply. */
6809 rm -f conftest.$ac_objext conftest$ac_exeext
6810 if { (eval echo "$as_me:6810: \"$ac_link\"") >&5
6811 (eval $ac_link) 2>&5
6813 echo "$as_me:6813: \$? = $ac_status" >&5
6814 (exit $ac_status); } &&
6815 { ac_try='test -s conftest$ac_exeext'
6816 { (eval echo "$as_me:6816: \"$ac_try\"") >&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit $ac_status); }; }; then
6821 eval "$as_ac_Lib=yes"
6823 echo "$as_me: failed program was:" >&5
6824 cat conftest.$ac_ext >&5
6825 eval "$as_ac_Lib=no"
6827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6828 LIBS=$ac_check_lib_save_LIBS
6830 echo "$as_me:6830: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6831 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6832 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6834 : ${cf_nculib_root:=$cf_term_lib}
6845 # Check for library containing initscr
6846 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6847 if test "x$cf_curs_lib" = x
6849 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6851 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6852 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6853 echo "$as_me:6853: checking if we can link with $cf_curs_lib library" >&5
6854 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6855 cat >conftest.$ac_ext <<_ACEOF
6856 #line 6856 "configure"
6857 #include "confdefs.h"
6858 #include <${cf_cv_ncurses_header:-curses.h}>
6867 rm -f conftest.$ac_objext conftest$ac_exeext
6868 if { (eval echo "$as_me:6868: \"$ac_link\"") >&5
6869 (eval $ac_link) 2>&5
6871 echo "$as_me:6871: \$? = $ac_status" >&5
6872 (exit $ac_status); } &&
6873 { ac_try='test -s conftest$ac_exeext'
6874 { (eval echo "$as_me:6874: \"$ac_try\"") >&5
6877 echo "$as_me:6877: \$? = $ac_status" >&5
6878 (exit $ac_status); }; }; then
6881 echo "$as_me: failed program was:" >&5
6882 cat conftest.$ac_ext >&5
6885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6886 echo "$as_me:6886: result: $cf_result" >&5
6887 echo "${ECHO_T}$cf_result" >&6
6888 test $cf_result = yes && break
6889 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6891 elif test "$cf_term_lib" != predefined ; then
6892 echo "$as_me:6892: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6893 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6894 cat >conftest.$ac_ext <<_ACEOF
6895 #line 6895 "configure"
6896 #include "confdefs.h"
6897 #include <${cf_cv_ncurses_header:-curses.h}>
6901 initscr(); tgoto((char *)0, 0, 0);
6906 rm -f conftest.$ac_objext conftest$ac_exeext
6907 if { (eval echo "$as_me:6907: \"$ac_link\"") >&5
6908 (eval $ac_link) 2>&5
6910 echo "$as_me:6910: \$? = $ac_status" >&5
6911 (exit $ac_status); } &&
6912 { ac_try='test -s conftest$ac_exeext'
6913 { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit $ac_status); }; }; then
6920 echo "$as_me: failed program was:" >&5
6921 cat conftest.$ac_ext >&5
6923 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6924 cat >conftest.$ac_ext <<_ACEOF
6925 #line 6925 "configure"
6926 #include "confdefs.h"
6927 #include <${cf_cv_ncurses_header:-curses.h}>
6936 rm -f conftest.$ac_objext conftest$ac_exeext
6937 if { (eval echo "$as_me:6937: \"$ac_link\"") >&5
6938 (eval $ac_link) 2>&5
6940 echo "$as_me:6940: \$? = $ac_status" >&5
6941 (exit $ac_status); } &&
6942 { ac_try='test -s conftest$ac_exeext'
6943 { (eval echo "$as_me:6943: \"$ac_try\"") >&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); }; }; then
6950 echo "$as_me: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6958 echo "$as_me:6958: result: $cf_result" >&5
6959 echo "${ECHO_T}$cf_result" >&6
6960 test $cf_result != error && break
6964 test $cf_curs_lib = unknown && { { echo "$as_me:6964: error: no curses library found" >&5
6965 echo "$as_me: error: no curses library found" >&2;}
6966 { (exit 1); exit 1; }; }
6973 echo "$as_me:6973: checking for multibyte character support" >&5
6974 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6975 if test "${cf_cv_utf8_lib+set}" = set; then
6976 echo $ECHO_N "(cached) $ECHO_C" >&6
6979 cf_save_LIBS="$LIBS"
6980 cat >conftest.$ac_ext <<_ACEOF
6981 #line 6981 "configure"
6982 #include "confdefs.h"
6993 rm -f conftest.$ac_objext conftest$ac_exeext
6994 if { (eval echo "$as_me:6994: \"$ac_link\"") >&5
6995 (eval $ac_link) 2>&5
6997 echo "$as_me:6997: \$? = $ac_status" >&5
6998 (exit $ac_status); } &&
6999 { ac_try='test -s conftest$ac_exeext'
7000 { (eval echo "$as_me:7000: \"$ac_try\"") >&5
7003 echo "$as_me:7003: \$? = $ac_status" >&5
7004 (exit $ac_status); }; }; then
7007 echo "$as_me: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7010 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7011 # will be set on completion of the AC_TRY_LINK below.
7012 cf_cv_header_path_utf8=
7013 cf_cv_library_path_utf8=
7015 echo "${as_me:-configure}:7015: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7017 cf_save_LIBS="$LIBS"
7019 cat >conftest.$ac_ext <<_ACEOF
7020 #line 7020 "configure"
7021 #include "confdefs.h"
7023 #include <libutf8.h>
7032 rm -f conftest.$ac_objext conftest$ac_exeext
7033 if { (eval echo "$as_me:7033: \"$ac_link\"") >&5
7034 (eval $ac_link) 2>&5
7036 echo "$as_me:7036: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
7038 { ac_try='test -s conftest$ac_exeext'
7039 { (eval echo "$as_me:7039: \"$ac_try\"") >&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); }; }; then
7045 cf_cv_find_linkage_utf8=yes
7046 cf_cv_header_path_utf8=/usr/include
7047 cf_cv_library_path_utf8=/usr/lib
7050 echo "$as_me: failed program was:" >&5
7051 cat conftest.$ac_ext >&5
7053 LIBS="-lutf8 $cf_save_LIBS"
7055 cat >conftest.$ac_ext <<_ACEOF
7056 #line 7056 "configure"
7057 #include "confdefs.h"
7059 #include <libutf8.h>
7068 rm -f conftest.$ac_objext conftest$ac_exeext
7069 if { (eval echo "$as_me:7069: \"$ac_link\"") >&5
7070 (eval $ac_link) 2>&5
7072 echo "$as_me:7072: \$? = $ac_status" >&5
7073 (exit $ac_status); } &&
7074 { ac_try='test -s conftest$ac_exeext'
7075 { (eval echo "$as_me:7075: \"$ac_try\"") >&5
7078 echo "$as_me:7078: \$? = $ac_status" >&5
7079 (exit $ac_status); }; }; then
7081 cf_cv_find_linkage_utf8=yes
7082 cf_cv_header_path_utf8=/usr/include
7083 cf_cv_library_path_utf8=/usr/lib
7084 cf_cv_library_file_utf8="-lutf8"
7087 echo "$as_me: failed program was:" >&5
7088 cat conftest.$ac_ext >&5
7090 cf_cv_find_linkage_utf8=no
7091 LIBS="$cf_save_LIBS"
7093 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7095 echo "${as_me:-configure}:7095: testing find linkage for utf8 library ..." 1>&5
7097 echo "${as_me:-configure}:7097: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7099 cf_save_CPPFLAGS="$CPPFLAGS"
7100 cf_test_CPPFLAGS="$CPPFLAGS"
7104 # collect the current set of include-directories from compiler flags
7105 cf_header_path_list=""
7106 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7107 for cf_header_path in $CPPFLAGS $CFLAGS
7109 case $cf_header_path in
7111 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7113 test "x$cf_header_path" != "xNONE" && \
7114 test -d "$cf_header_path" && \
7116 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7117 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7118 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7119 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7120 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7121 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7124 cf_header_path_list="$cf_header_path_list $cf_search"
7130 # add the variations for the package we are looking for
7134 test "x$prefix" != "xNONE" && \
7135 test -d "$prefix" && \
7137 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7138 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7139 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7140 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7141 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7142 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7145 for cf_subdir_prefix in \
7154 test "x$cf_subdir_prefix" != "x$prefix" && \
7155 test -d "$cf_subdir_prefix" && \
7156 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7157 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7158 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7159 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7160 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7161 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7162 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7167 test "$includedir" != NONE && \
7168 test "$includedir" != "/usr/include" && \
7169 test -d "$includedir" && {
7170 test -d $includedir && cf_search="$cf_search $includedir"
7171 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7174 test "$oldincludedir" != NONE && \
7175 test "$oldincludedir" != "/usr/include" && \
7176 test -d "$oldincludedir" && {
7177 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7178 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7181 cf_search="$cf_search $cf_header_path_list"
7183 for cf_cv_header_path_utf8 in $cf_search
7185 if test -d $cf_cv_header_path_utf8 ; then
7186 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7188 echo "${as_me:-configure}:7188: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7190 CPPFLAGS="$cf_save_CPPFLAGS"
7192 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7193 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7195 cat >conftest.$ac_ext <<_ACEOF
7196 #line 7196 "configure"
7197 #include "confdefs.h"
7199 #include <libutf8.h>
7208 rm -f conftest.$ac_objext
7209 if { (eval echo "$as_me:7209: \"$ac_compile\"") >&5
7210 (eval $ac_compile) 2>&5
7212 echo "$as_me:7212: \$? = $ac_status" >&5
7213 (exit $ac_status); } &&
7214 { ac_try='test -s conftest.$ac_objext'
7215 { (eval echo "$as_me:7215: \"$ac_try\"") >&5
7218 echo "$as_me:7218: \$? = $ac_status" >&5
7219 (exit $ac_status); }; }; then
7221 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7223 echo "${as_me:-configure}:7223: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7225 cf_cv_find_linkage_utf8=maybe
7226 cf_test_CPPFLAGS="$CPPFLAGS"
7229 echo "$as_me: failed program was:" >&5
7230 cat conftest.$ac_ext >&5
7232 CPPFLAGS="$cf_save_CPPFLAGS"
7235 rm -f conftest.$ac_objext conftest.$ac_ext
7239 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7241 echo "${as_me:-configure}:7241: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7243 cf_save_LIBS="$LIBS"
7244 cf_save_LDFLAGS="$LDFLAGS"
7246 if test "$cf_cv_find_linkage_utf8" != yes ; then
7249 cf_library_path_list=""
7250 if test -n "${LDFLAGS}${LIBS}" ; then
7251 for cf_library_path in $LDFLAGS $LIBS
7253 case $cf_library_path in
7255 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7257 test "x$cf_library_path" != "xNONE" && \
7258 test -d "$cf_library_path" && \
7260 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7261 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7262 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7263 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7264 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7265 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7268 cf_library_path_list="$cf_library_path_list $cf_search"
7276 test "x$prefix" != "xNONE" && \
7277 test -d "$prefix" && \
7279 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7280 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7281 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7282 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7283 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7284 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7287 for cf_subdir_prefix in \
7296 test "x$cf_subdir_prefix" != "x$prefix" && \
7297 test -d "$cf_subdir_prefix" && \
7298 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7299 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7300 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7301 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7302 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7303 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7304 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7309 cf_search="$cf_library_path_list $cf_search"
7311 for cf_cv_library_path_utf8 in $cf_search
7313 if test -d $cf_cv_library_path_utf8 ; then
7314 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7316 echo "${as_me:-configure}:7316: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7318 CPPFLAGS="$cf_test_CPPFLAGS"
7319 LIBS="-lutf8 $cf_save_LIBS"
7320 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7321 cat >conftest.$ac_ext <<_ACEOF
7322 #line 7322 "configure"
7323 #include "confdefs.h"
7325 #include <libutf8.h>
7334 rm -f conftest.$ac_objext conftest$ac_exeext
7335 if { (eval echo "$as_me:7335: \"$ac_link\"") >&5
7336 (eval $ac_link) 2>&5
7338 echo "$as_me:7338: \$? = $ac_status" >&5
7339 (exit $ac_status); } &&
7340 { ac_try='test -s conftest$ac_exeext'
7341 { (eval echo "$as_me:7341: \"$ac_try\"") >&5
7344 echo "$as_me:7344: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
7347 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7349 echo "${as_me:-configure}:7349: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7351 cf_cv_find_linkage_utf8=yes
7352 cf_cv_library_file_utf8="-lutf8"
7355 echo "$as_me: failed program was:" >&5
7356 cat conftest.$ac_ext >&5
7358 CPPFLAGS="$cf_save_CPPFLAGS"
7359 LIBS="$cf_save_LIBS"
7360 LDFLAGS="$cf_save_LDFLAGS"
7363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7366 CPPFLAGS="$cf_save_CPPFLAGS"
7367 LDFLAGS="$cf_save_LDFLAGS"
7371 cf_cv_find_linkage_utf8=no
7375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7380 LIBS="$cf_save_LIBS"
7382 if test "$cf_cv_find_linkage_utf8" = yes ; then
7383 cf_cv_utf8_lib=add-on
7389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7391 echo "$as_me:7391: result: $cf_cv_utf8_lib" >&5
7392 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7394 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7396 if test "$cf_cv_utf8_lib" = "add-on" ; then
7398 cat >>confdefs.h <<\EOF
7399 #define HAVE_LIBUTF8_H 1
7402 if test -n "$cf_cv_header_path_utf8" ; then
7403 for cf_add_incdir in $cf_cv_header_path_utf8
7405 while test $cf_add_incdir != /usr/include
7407 if test -d $cf_add_incdir
7410 if test -n "$CFLAGS$CPPFLAGS" ; then
7411 # a loop is needed to ensure we can add subdirs of existing dirs
7412 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7413 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7414 cf_have_incdir=yes; break
7419 if test "$cf_have_incdir" = no ; then
7420 if test "$cf_add_incdir" = /usr/local/include ; then
7421 if test "$GCC" = yes
7423 cf_save_CPPFLAGS=$CPPFLAGS
7425 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7426 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7428 cat >conftest.$ac_ext <<_ACEOF
7429 #line 7429 "configure"
7430 #include "confdefs.h"
7440 rm -f conftest.$ac_objext
7441 if { (eval echo "$as_me:7441: \"$ac_compile\"") >&5
7442 (eval $ac_compile) 2>&5
7444 echo "$as_me:7444: \$? = $ac_status" >&5
7445 (exit $ac_status); } &&
7446 { ac_try='test -s conftest.$ac_objext'
7447 { (eval echo "$as_me:7447: \"$ac_try\"") >&5
7450 echo "$as_me:7450: \$? = $ac_status" >&5
7451 (exit $ac_status); }; }; then
7454 echo "$as_me: failed program was:" >&5
7455 cat conftest.$ac_ext >&5
7458 rm -f conftest.$ac_objext conftest.$ac_ext
7459 CPPFLAGS=$cf_save_CPPFLAGS
7464 if test "$cf_have_incdir" = no ; then
7465 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7467 echo "${as_me:-configure}:7467: testing adding $cf_add_incdir to include-path ..." 1>&5
7469 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7471 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7472 test "$cf_top_incdir" = "$cf_add_incdir" && break
7473 cf_add_incdir="$cf_top_incdir"
7484 if test -n "$cf_cv_library_path_utf8" ; then
7485 for cf_add_libdir in $cf_cv_library_path_utf8
7487 if test $cf_add_libdir = /usr/lib ; then
7489 elif test -d $cf_add_libdir
7492 if test -n "$LDFLAGS$LIBS" ; then
7493 # a loop is needed to ensure we can add subdirs of existing dirs
7494 for cf_test_libdir in $LDFLAGS $LIBS ; do
7495 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7496 cf_have_libdir=yes; break
7500 if test "$cf_have_libdir" = no ; then
7501 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7503 echo "${as_me:-configure}:7503: testing adding $cf_add_libdir to library-path ..." 1>&5
7505 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7511 cf_add_libs="$cf_cv_library_file_utf8"
7512 # Filter out duplicates - this happens with badly-designed ".pc" files...
7513 for cf_add_1lib in $LIBS
7515 for cf_add_2lib in $cf_add_libs
7517 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7523 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7529 cf_ncuconfig_root=$cf_cv_screen
7530 cf_have_ncuconfig=no
7532 if test "x${PKG_CONFIG:=none}" != xnone; then
7533 echo "$as_me:7533: checking pkg-config for $cf_ncuconfig_root" >&5
7534 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7535 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7536 echo "$as_me:7536: result: yes" >&5
7537 echo "${ECHO_T}yes" >&6
7539 echo "$as_me:7539: checking if the $cf_ncuconfig_root package files work" >&5
7540 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7541 cf_have_ncuconfig=unknown
7543 cf_save_CPPFLAGS="$CPPFLAGS"
7544 cf_save_LIBS="$LIBS"
7549 cf_new_extra_cppflags=
7551 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7553 case $cf_fix_cppflags in
7555 case $cf_add_cflags in
7556 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7557 case $cf_add_cflags in
7559 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7561 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7562 && test -z "${cf_tst_cflags}" \
7563 && cf_fix_cppflags=yes
7565 if test $cf_fix_cppflags = yes ; then
7567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7571 elif test "${cf_tst_cflags}" = "\"'" ; then
7573 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7574 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7584 case $cf_add_cflags in
7586 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7588 CPPFLAGS=`echo "$CPPFLAGS" | \
7589 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7590 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7595 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7596 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7603 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7604 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7614 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7617 && test -z "${cf_tst_cflags}" \
7618 && cf_fix_cppflags=no
7623 if test -n "$cf_new_cflags" ; then
7625 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7626 CFLAGS="${CFLAGS}$cf_new_cflags"
7630 if test -n "$cf_new_cppflags" ; then
7632 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7633 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7637 if test -n "$cf_new_extra_cppflags" ; then
7639 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7640 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7644 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7645 # Filter out duplicates - this happens with badly-designed ".pc" files...
7646 for cf_add_1lib in $LIBS
7648 for cf_add_2lib in $cf_add_libs
7650 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7656 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7660 cat >conftest.$ac_ext <<_ACEOF
7661 #line 7661 "configure"
7662 #include "confdefs.h"
7663 #include <${cf_cv_ncurses_header:-curses.h}>
7667 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7672 rm -f conftest.$ac_objext conftest$ac_exeext
7673 if { (eval echo "$as_me:7673: \"$ac_link\"") >&5
7674 (eval $ac_link) 2>&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit $ac_status); } &&
7678 { ac_try='test -s conftest$ac_exeext'
7679 { (eval echo "$as_me:7679: \"$ac_try\"") >&5
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit $ac_status); }; }; then
7684 if test "$cross_compiling" = yes; then
7685 cf_have_ncuconfig=maybe
7687 cat >conftest.$ac_ext <<_ACEOF
7688 #line 7688 "configure"
7689 #include "confdefs.h"
7690 #include <${cf_cv_ncurses_header:-curses.h}>
7692 { char *xx = curses_version(); return (xx == 0); }
7694 rm -f conftest$ac_exeext
7695 if { (eval echo "$as_me:7695: \"$ac_link\"") >&5
7696 (eval $ac_link) 2>&5
7698 echo "$as_me:7698: \$? = $ac_status" >&5
7699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7700 { (eval echo "$as_me:7700: \"$ac_try\"") >&5
7703 echo "$as_me:7703: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7705 cf_have_ncuconfig=yes
7707 echo "$as_me: program exited with status $ac_status" >&5
7708 echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 cf_have_ncuconfig=no
7712 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7715 echo "$as_me: failed program was:" >&5
7716 cat conftest.$ac_ext >&5
7717 cf_have_ncuconfig=no
7719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7720 echo "$as_me:7720: result: $cf_have_ncuconfig" >&5
7721 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7722 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7723 if test "$cf_have_ncuconfig" != "yes"
7725 CPPFLAGS="$cf_save_CPPFLAGS"
7726 LIBS="$cf_save_LIBS"
7727 NCURSES_CONFIG_PKG=none
7730 cat >>confdefs.h <<\EOF
7734 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7736 echo "$as_me:7736: checking for terminfo header" >&5
7737 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7738 if test "${cf_cv_term_header+set}" = set; then
7739 echo $ECHO_N "(cached) $ECHO_C" >&6
7742 case ${cf_cv_ncurses_header} in
7743 (*/ncurses.h|*/ncursesw.h)
7744 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7747 cf_term_header=term.h
7751 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7753 cat >conftest.$ac_ext <<_ACEOF
7754 #line 7754 "configure"
7755 #include "confdefs.h"
7757 #include <${cf_cv_ncurses_header:-curses.h}>
7763 int x = auto_left_margin
7768 rm -f conftest.$ac_objext
7769 if { (eval echo "$as_me:7769: \"$ac_compile\"") >&5
7770 (eval $ac_compile) 2>&5
7772 echo "$as_me:7772: \$? = $ac_status" >&5
7773 (exit $ac_status); } &&
7774 { ac_try='test -s conftest.$ac_objext'
7775 { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); }; }; then
7781 cf_cv_term_header="$cf_test"
7783 echo "$as_me: failed program was:" >&5
7784 cat conftest.$ac_ext >&5
7786 cf_cv_term_header=unknown
7789 rm -f conftest.$ac_objext conftest.$ac_ext
7790 test "$cf_cv_term_header" != unknown && break
7794 echo "$as_me:7794: result: $cf_cv_term_header" >&5
7795 echo "${ECHO_T}$cf_cv_term_header" >&6
7797 # Set definitions to allow ifdef'ing to accommodate subdirectories
7799 case $cf_cv_term_header in
7802 cat >>confdefs.h <<\EOF
7803 #define HAVE_TERM_H 1
7809 case $cf_cv_term_header in
7812 cat >>confdefs.h <<\EOF
7813 #define HAVE_NCURSES_TERM_H 1
7819 cat >>confdefs.h <<\EOF
7820 #define HAVE_NCURSESW_TERM_H 1
7829 echo "$as_me:7829: result: no" >&5
7830 echo "${ECHO_T}no" >&6
7831 NCURSES_CONFIG_PKG=none
7834 NCURSES_CONFIG_PKG=none
7837 if test "x$cf_have_ncuconfig" = "xno"; then
7838 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7840 if test -n "$ac_tool_prefix"; then
7841 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7843 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7844 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7845 echo "$as_me:7845: checking for $ac_word" >&5
7846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7847 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7848 echo $ECHO_N "(cached) $ECHO_C" >&6
7850 if test -n "$NCURSES_CONFIG"; then
7851 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7853 ac_save_IFS=$IFS; IFS=$ac_path_separator
7855 for ac_dir in $ac_dummy; do
7857 test -z "$ac_dir" && ac_dir=.
7858 $as_executable_p "$ac_dir/$ac_word" || continue
7859 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7860 echo "$as_me:7860: found $ac_dir/$ac_word" >&5
7866 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7867 if test -n "$NCURSES_CONFIG"; then
7868 echo "$as_me:7868: result: $NCURSES_CONFIG" >&5
7869 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7871 echo "$as_me:7871: result: no" >&5
7872 echo "${ECHO_T}no" >&6
7875 test -n "$NCURSES_CONFIG" && break
7878 if test -z "$NCURSES_CONFIG"; then
7879 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7880 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7882 # Extract the first word of "$ac_prog", so it can be a program name with args.
7883 set dummy $ac_prog; ac_word=$2
7884 echo "$as_me:7884: checking for $ac_word" >&5
7885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7886 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7887 echo $ECHO_N "(cached) $ECHO_C" >&6
7889 if test -n "$ac_ct_NCURSES_CONFIG"; then
7890 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7892 ac_save_IFS=$IFS; IFS=$ac_path_separator
7894 for ac_dir in $ac_dummy; do
7896 test -z "$ac_dir" && ac_dir=.
7897 $as_executable_p "$ac_dir/$ac_word" || continue
7898 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7899 echo "$as_me:7899: found $ac_dir/$ac_word" >&5
7905 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7906 if test -n "$ac_ct_NCURSES_CONFIG"; then
7907 echo "$as_me:7907: result: $ac_ct_NCURSES_CONFIG" >&5
7908 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7910 echo "$as_me:7910: result: no" >&5
7911 echo "${ECHO_T}no" >&6
7914 test -n "$ac_ct_NCURSES_CONFIG" && break
7916 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7918 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7921 if test "$NCURSES_CONFIG" != none ; then
7926 cf_new_extra_cppflags=
7928 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7930 case $cf_fix_cppflags in
7932 case $cf_add_cflags in
7933 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7934 case $cf_add_cflags in
7936 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7938 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7939 && test -z "${cf_tst_cflags}" \
7940 && cf_fix_cppflags=yes
7942 if test $cf_fix_cppflags = yes ; then
7944 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7945 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7948 elif test "${cf_tst_cflags}" = "\"'" ; then
7950 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7951 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7961 case $cf_add_cflags in
7963 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7965 CPPFLAGS=`echo "$CPPFLAGS" | \
7966 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7967 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7972 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7973 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7980 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7981 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7988 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7989 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7991 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7993 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7994 && test -z "${cf_tst_cflags}" \
7995 && cf_fix_cppflags=no
8000 if test -n "$cf_new_cflags" ; then
8002 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8003 CFLAGS="${CFLAGS}$cf_new_cflags"
8007 if test -n "$cf_new_cppflags" ; then
8009 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8010 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8014 if test -n "$cf_new_extra_cppflags" ; then
8016 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8017 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8021 cf_add_libs="`$NCURSES_CONFIG --libs`"
8022 # Filter out duplicates - this happens with badly-designed ".pc" files...
8023 for cf_add_1lib in $LIBS
8025 for cf_add_2lib in $cf_add_libs
8027 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8033 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8037 # even with config script, some packages use no-override for curses.h
8039 echo "$as_me:8039: checking if we have identified curses headers" >&5
8040 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8041 if test "${cf_cv_ncurses_header+set}" = set; then
8042 echo $ECHO_N "(cached) $ECHO_C" >&6
8045 cf_cv_ncurses_header=none
8047 ncurses.h $cf_cv_screen/ncurses.h \
8048 curses.h $cf_cv_screen/curses.h
8050 cat >conftest.$ac_ext <<_ACEOF
8051 #line 8051 "configure"
8052 #include "confdefs.h"
8053 #include <${cf_header}>
8057 initscr(); tgoto("?", 0,0)
8062 rm -f conftest.$ac_objext
8063 if { (eval echo "$as_me:8063: \"$ac_compile\"") >&5
8064 (eval $ac_compile) 2>&5
8066 echo "$as_me:8066: \$? = $ac_status" >&5
8067 (exit $ac_status); } &&
8068 { ac_try='test -s conftest.$ac_objext'
8069 { (eval echo "$as_me:8069: \"$ac_try\"") >&5
8072 echo "$as_me:8072: \$? = $ac_status" >&5
8073 (exit $ac_status); }; }; then
8074 cf_cv_ncurses_header=$cf_header; break
8076 echo "$as_me: failed program was:" >&5
8077 cat conftest.$ac_ext >&5
8079 rm -f conftest.$ac_objext conftest.$ac_ext
8083 echo "$as_me:8083: result: $cf_cv_ncurses_header" >&5
8084 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8086 if test "$cf_cv_ncurses_header" = none ; then
8087 { { echo "$as_me:8087: error: No curses header-files found" >&5
8088 echo "$as_me: error: No curses header-files found" >&2;}
8089 { (exit 1); exit 1; }; }
8092 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8094 for ac_header in $cf_cv_ncurses_header
8096 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8097 echo "$as_me:8097: checking for $ac_header" >&5
8098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8100 echo $ECHO_N "(cached) $ECHO_C" >&6
8102 cat >conftest.$ac_ext <<_ACEOF
8103 #line 8103 "configure"
8104 #include "confdefs.h"
8105 #include <$ac_header>
8107 if { (eval echo "$as_me:8107: \"$ac_cpp conftest.$ac_ext\"") >&5
8108 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8110 egrep -v '^ *\+' conftest.er1 >conftest.err
8112 cat conftest.err >&5
8113 echo "$as_me:8113: \$? = $ac_status" >&5
8114 (exit $ac_status); } >/dev/null; then
8115 if test -s conftest.err; then
8116 ac_cpp_err=$ac_c_preproc_warn_flag
8123 if test -z "$ac_cpp_err"; then
8124 eval "$as_ac_Header=yes"
8126 echo "$as_me: failed program was:" >&5
8127 cat conftest.$ac_ext >&5
8128 eval "$as_ac_Header=no"
8130 rm -f conftest.err conftest.$ac_ext
8132 echo "$as_me:8132: result: `eval echo '${'$as_ac_Header'}'`" >&5
8133 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8134 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8135 cat >>confdefs.h <<EOF
8136 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8142 cat >>confdefs.h <<\EOF
8146 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8148 cat >>confdefs.h <<EOF
8149 #define $cf_nculib_ROOT 1
8152 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8156 cf_ncuhdr_root=$cf_cv_screen
8158 test -n "$cf_cv_curses_dir" && \
8159 test "$cf_cv_curses_dir" != "no" && { \
8161 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8162 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8164 while test $cf_add_incdir != /usr/include
8166 if test -d $cf_add_incdir
8169 if test -n "$CFLAGS$CPPFLAGS" ; then
8170 # a loop is needed to ensure we can add subdirs of existing dirs
8171 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8172 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8173 cf_have_incdir=yes; break
8178 if test "$cf_have_incdir" = no ; then
8179 if test "$cf_add_incdir" = /usr/local/include ; then
8180 if test "$GCC" = yes
8182 cf_save_CPPFLAGS=$CPPFLAGS
8184 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8185 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8187 cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8199 rm -f conftest.$ac_objext
8200 if { (eval echo "$as_me:8200: \"$ac_compile\"") >&5
8201 (eval $ac_compile) 2>&5
8203 echo "$as_me:8203: \$? = $ac_status" >&5
8204 (exit $ac_status); } &&
8205 { ac_try='test -s conftest.$ac_objext'
8206 { (eval echo "$as_me:8206: \"$ac_try\"") >&5
8209 echo "$as_me:8209: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8213 echo "$as_me: failed program was:" >&5
8214 cat conftest.$ac_ext >&5
8217 rm -f conftest.$ac_objext conftest.$ac_ext
8218 CPPFLAGS=$cf_save_CPPFLAGS
8223 if test "$cf_have_incdir" = no ; then
8224 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8226 echo "${as_me:-configure}:8226: testing adding $cf_add_incdir to include-path ..." 1>&5
8228 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8230 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8231 test "$cf_top_incdir" = "$cf_add_incdir" && break
8232 cf_add_incdir="$cf_top_incdir"
8245 echo "$as_me:8245: checking for $cf_ncuhdr_root header in include-path" >&5
8246 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8247 if test "${cf_cv_ncurses_h+set}" = set; then
8248 echo $ECHO_N "(cached) $ECHO_C" >&6
8251 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8252 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8253 for cf_header in $cf_header_list
8256 cat >conftest.$ac_ext <<_ACEOF
8257 #line 8257 "configure"
8258 #include "confdefs.h"
8260 #include <$cf_header>
8265 #ifdef NCURSES_VERSION
8267 printf("%s\n", NCURSES_VERSION);
8280 rm -f conftest.$ac_objext
8281 if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
8282 (eval $ac_compile) 2>&5
8284 echo "$as_me:8284: \$? = $ac_status" >&5
8285 (exit $ac_status); } &&
8286 { ac_try='test -s conftest.$ac_objext'
8287 { (eval echo "$as_me:8287: \"$ac_try\"") >&5
8290 echo "$as_me:8290: \$? = $ac_status" >&5
8291 (exit $ac_status); }; }; then
8292 cf_cv_ncurses_h=$cf_header
8295 echo "$as_me: failed program was:" >&5
8296 cat conftest.$ac_ext >&5
8299 rm -f conftest.$ac_objext conftest.$ac_ext
8301 test "$cf_cv_ncurses_h" != no && break
8305 echo "$as_me:8305: result: $cf_cv_ncurses_h" >&5
8306 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8308 if test "$cf_cv_ncurses_h" != no ; then
8309 cf_cv_ncurses_header=$cf_cv_ncurses_h
8312 echo "$as_me:8312: checking for $cf_ncuhdr_root include-path" >&5
8313 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8314 if test "${cf_cv_ncurses_h2+set}" = set; then
8315 echo $ECHO_N "(cached) $ECHO_C" >&6
8318 test -n "$verbose" && echo
8322 # collect the current set of include-directories from compiler flags
8323 cf_header_path_list=""
8324 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8325 for cf_header_path in $CPPFLAGS $CFLAGS
8327 case $cf_header_path in
8329 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8331 test "x$cf_header_path" != "xNONE" && \
8332 test -d "$cf_header_path" && \
8334 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8335 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8336 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8337 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8338 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8339 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"
8342 cf_header_path_list="$cf_header_path_list $cf_search"
8348 # add the variations for the package we are looking for
8352 test "x$prefix" != "xNONE" && \
8353 test -d "$prefix" && \
8355 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8356 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8357 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8358 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8359 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8360 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8363 for cf_subdir_prefix in \
8372 test "x$cf_subdir_prefix" != "x$prefix" && \
8373 test -d "$cf_subdir_prefix" && \
8374 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8375 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8376 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8377 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8378 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8379 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8380 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"
8385 test "$includedir" != NONE && \
8386 test "$includedir" != "/usr/include" && \
8387 test -d "$includedir" && {
8388 test -d $includedir && cf_search="$cf_search $includedir"
8389 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8392 test "$oldincludedir" != NONE && \
8393 test "$oldincludedir" != "/usr/include" && \
8394 test -d "$oldincludedir" && {
8395 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8396 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8399 cf_search="$cf_search $cf_header_path_list"
8401 test -n "$verbose" && echo search path $cf_search
8402 cf_save2_CPPFLAGS="$CPPFLAGS"
8403 for cf_incdir in $cf_search
8406 if test -n "$cf_incdir" ; then
8407 for cf_add_incdir in $cf_incdir
8409 while test $cf_add_incdir != /usr/include
8411 if test -d $cf_add_incdir
8414 if test -n "$CFLAGS$CPPFLAGS" ; then
8415 # a loop is needed to ensure we can add subdirs of existing dirs
8416 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8417 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8418 cf_have_incdir=yes; break
8423 if test "$cf_have_incdir" = no ; then
8424 if test "$cf_add_incdir" = /usr/local/include ; then
8425 if test "$GCC" = yes
8427 cf_save_CPPFLAGS=$CPPFLAGS
8429 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8430 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8432 cat >conftest.$ac_ext <<_ACEOF
8433 #line 8433 "configure"
8434 #include "confdefs.h"
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:8445: \"$ac_compile\"") >&5
8446 (eval $ac_compile) 2>&5
8448 echo "$as_me:8448: \$? = $ac_status" >&5
8449 (exit $ac_status); } &&
8450 { ac_try='test -s conftest.$ac_objext'
8451 { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8454 echo "$as_me:8454: \$? = $ac_status" >&5
8455 (exit $ac_status); }; }; then
8458 echo "$as_me: failed program was:" >&5
8459 cat conftest.$ac_ext >&5
8462 rm -f conftest.$ac_objext conftest.$ac_ext
8463 CPPFLAGS=$cf_save_CPPFLAGS
8468 if test "$cf_have_incdir" = no ; then
8469 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8471 echo "${as_me:-configure}:8471: testing adding $cf_add_incdir to include-path ..." 1>&5
8473 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8475 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8476 test "$cf_top_incdir" = "$cf_add_incdir" && break
8477 cf_add_incdir="$cf_top_incdir"
8493 cat >conftest.$ac_ext <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8497 #include <$cf_header>
8502 #ifdef NCURSES_VERSION
8504 printf("%s\n", NCURSES_VERSION);
8517 rm -f conftest.$ac_objext
8518 if { (eval echo "$as_me:8518: \"$ac_compile\"") >&5
8519 (eval $ac_compile) 2>&5
8521 echo "$as_me:8521: \$? = $ac_status" >&5
8522 (exit $ac_status); } &&
8523 { ac_try='test -s conftest.$ac_objext'
8524 { (eval echo "$as_me:8524: \"$ac_try\"") >&5
8527 echo "$as_me:8527: \$? = $ac_status" >&5
8528 (exit $ac_status); }; }; then
8529 cf_cv_ncurses_h2=$cf_header
8532 echo "$as_me: failed program was:" >&5
8533 cat conftest.$ac_ext >&5
8536 rm -f conftest.$ac_objext conftest.$ac_ext
8538 if test "$cf_cv_ncurses_h2" != no ; then
8539 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8540 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8543 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8545 CPPFLAGS="$cf_save2_CPPFLAGS"
8546 test "$cf_cv_ncurses_h2" != no && break
8548 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8548: error: not found" >&5
8549 echo "$as_me: error: not found" >&2;}
8550 { (exit 1); exit 1; }; }
8553 echo "$as_me:8553: result: $cf_cv_ncurses_h2" >&5
8554 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8556 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8557 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8558 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8559 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8562 if test -n "$cf_1st_incdir" ; then
8563 for cf_add_incdir in $cf_1st_incdir
8565 while test $cf_add_incdir != /usr/include
8567 if test -d $cf_add_incdir
8570 if test -n "$CFLAGS$CPPFLAGS" ; then
8571 # a loop is needed to ensure we can add subdirs of existing dirs
8572 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8573 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8574 cf_have_incdir=yes; break
8579 if test "$cf_have_incdir" = no ; then
8580 if test "$cf_add_incdir" = /usr/local/include ; then
8581 if test "$GCC" = yes
8583 cf_save_CPPFLAGS=$CPPFLAGS
8585 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8586 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8588 cat >conftest.$ac_ext <<_ACEOF
8589 #line 8589 "configure"
8590 #include "confdefs.h"
8600 rm -f conftest.$ac_objext
8601 if { (eval echo "$as_me:8601: \"$ac_compile\"") >&5
8602 (eval $ac_compile) 2>&5
8604 echo "$as_me:8604: \$? = $ac_status" >&5
8605 (exit $ac_status); } &&
8606 { ac_try='test -s conftest.$ac_objext'
8607 { (eval echo "$as_me:8607: \"$ac_try\"") >&5
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit $ac_status); }; }; then
8614 echo "$as_me: failed program was:" >&5
8615 cat conftest.$ac_ext >&5
8618 rm -f conftest.$ac_objext conftest.$ac_ext
8619 CPPFLAGS=$cf_save_CPPFLAGS
8624 if test "$cf_have_incdir" = no ; then
8625 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8627 echo "${as_me:-configure}:8627: testing adding $cf_add_incdir to include-path ..." 1>&5
8629 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8631 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8632 test "$cf_top_incdir" = "$cf_add_incdir" && break
8633 cf_add_incdir="$cf_top_incdir"
8646 # Set definitions to allow ifdef'ing for ncurses.h
8648 case $cf_cv_ncurses_header in
8651 cat >>confdefs.h <<\EOF
8652 #define HAVE_NCURSES_H 1
8658 case $cf_cv_ncurses_header in
8659 (ncurses/curses.h|ncurses/ncurses.h)
8661 cat >>confdefs.h <<\EOF
8662 #define HAVE_NCURSES_NCURSES_H 1
8666 (ncursesw/curses.h|ncursesw/ncurses.h)
8668 cat >>confdefs.h <<\EOF
8669 #define HAVE_NCURSESW_NCURSES_H 1
8675 echo "$as_me:8675: checking for terminfo header" >&5
8676 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8677 if test "${cf_cv_term_header+set}" = set; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
8681 case ${cf_cv_ncurses_header} in
8682 (*/ncurses.h|*/ncursesw.h)
8683 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8686 cf_term_header=term.h
8690 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8692 cat >conftest.$ac_ext <<_ACEOF
8693 #line 8693 "configure"
8694 #include "confdefs.h"
8696 #include <${cf_cv_ncurses_header:-curses.h}>
8702 int x = auto_left_margin
8707 rm -f conftest.$ac_objext
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709 (eval $ac_compile) 2>&5
8711 echo "$as_me:8711: \$? = $ac_status" >&5
8712 (exit $ac_status); } &&
8713 { ac_try='test -s conftest.$ac_objext'
8714 { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8717 echo "$as_me:8717: \$? = $ac_status" >&5
8718 (exit $ac_status); }; }; then
8720 cf_cv_term_header="$cf_test"
8722 echo "$as_me: failed program was:" >&5
8723 cat conftest.$ac_ext >&5
8725 cf_cv_term_header=unknown
8728 rm -f conftest.$ac_objext conftest.$ac_ext
8729 test "$cf_cv_term_header" != unknown && break
8733 echo "$as_me:8733: result: $cf_cv_term_header" >&5
8734 echo "${ECHO_T}$cf_cv_term_header" >&6
8736 # Set definitions to allow ifdef'ing to accommodate subdirectories
8738 case $cf_cv_term_header in
8741 cat >>confdefs.h <<\EOF
8742 #define HAVE_TERM_H 1
8748 case $cf_cv_term_header in
8751 cat >>confdefs.h <<\EOF
8752 #define HAVE_NCURSES_TERM_H 1
8758 cat >>confdefs.h <<\EOF
8759 #define HAVE_NCURSESW_TERM_H 1
8765 # some applications need this, but should check for NCURSES_VERSION
8767 cat >>confdefs.h <<\EOF
8771 echo "$as_me:8771: checking for ncurses version" >&5
8772 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8773 if test "${cf_cv_ncurses_version+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
8777 cf_cv_ncurses_version=no
8780 if test "$cross_compiling" = yes; then
8782 # This will not work if the preprocessor splits the line after the
8783 # Autoconf token. The 'unproto' program does that.
8784 cat > conftest.$ac_ext <<EOF
8785 #include <${cf_cv_ncurses_header:-curses.h}>
8787 #ifdef NCURSES_VERSION
8788 Autoconf NCURSES_VERSION
8796 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8797 { (eval echo "$as_me:8797: \"$cf_try\"") >&5
8800 echo "$as_me:8800: \$? = $ac_status" >&5
8801 (exit $ac_status); }
8802 if test -f conftest.out ; then
8803 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8804 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8809 cat >conftest.$ac_ext <<_ACEOF
8810 #line 8810 "configure"
8811 #include "confdefs.h"
8813 #include <${cf_cv_ncurses_header:-curses.h}>
8817 FILE *fp = fopen("$cf_tempfile", "w");
8818 #ifdef NCURSES_VERSION
8819 # ifdef NCURSES_VERSION_PATCH
8820 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8822 fprintf(fp, "%s\n", NCURSES_VERSION);
8826 fprintf(fp, "old\n");
8831 ${cf_cv_main_return:-return}(0);
8834 rm -f conftest$ac_exeext
8835 if { (eval echo "$as_me:8835: \"$ac_link\"") >&5
8836 (eval $ac_link) 2>&5
8838 echo "$as_me:8838: \$? = $ac_status" >&5
8839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8840 { (eval echo "$as_me:8840: \"$ac_try\"") >&5
8843 echo "$as_me:8843: \$? = $ac_status" >&5
8844 (exit $ac_status); }; }; then
8846 cf_cv_ncurses_version=`cat $cf_tempfile`
8848 echo "$as_me: program exited with status $ac_status" >&5
8849 echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8852 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8857 echo "$as_me:8857: result: $cf_cv_ncurses_version" >&5
8858 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8859 test "$cf_cv_ncurses_version" = no ||
8860 cat >>confdefs.h <<\EOF
8864 cf_nculib_root=$cf_cv_screen
8865 # This works, except for the special case where we find gpm, but
8866 # ncurses is in a nonstandard location via $LIBS, and we really want
8869 cf_ncurses_SAVE="$LIBS"
8870 echo "$as_me:8870: checking for Gpm_Open in -lgpm" >&5
8871 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8872 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8873 echo $ECHO_N "(cached) $ECHO_C" >&6
8875 ac_check_lib_save_LIBS=$LIBS
8877 cat >conftest.$ac_ext <<_ACEOF
8878 #line 8878 "configure"
8879 #include "confdefs.h"
8881 /* Override any gcc2 internal prototype to avoid an error. */
8885 /* We use char because int might match the return type of a gcc2
8886 builtin and then its argument prototype would still apply. */
8896 rm -f conftest.$ac_objext conftest$ac_exeext
8897 if { (eval echo "$as_me:8897: \"$ac_link\"") >&5
8898 (eval $ac_link) 2>&5
8900 echo "$as_me:8900: \$? = $ac_status" >&5
8901 (exit $ac_status); } &&
8902 { ac_try='test -s conftest$ac_exeext'
8903 { (eval echo "$as_me:8903: \"$ac_try\"") >&5
8906 echo "$as_me:8906: \$? = $ac_status" >&5
8907 (exit $ac_status); }; }; then
8908 ac_cv_lib_gpm_Gpm_Open=yes
8910 echo "$as_me: failed program was:" >&5
8911 cat conftest.$ac_ext >&5
8912 ac_cv_lib_gpm_Gpm_Open=no
8914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8915 LIBS=$ac_check_lib_save_LIBS
8917 echo "$as_me:8917: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8918 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8919 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8920 echo "$as_me:8920: checking for initscr in -lgpm" >&5
8921 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8922 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8923 echo $ECHO_N "(cached) $ECHO_C" >&6
8925 ac_check_lib_save_LIBS=$LIBS
8927 cat >conftest.$ac_ext <<_ACEOF
8928 #line 8928 "configure"
8929 #include "confdefs.h"
8931 /* Override any gcc2 internal prototype to avoid an error. */
8935 /* We use char because int might match the return type of a gcc2
8936 builtin and then its argument prototype would still apply. */
8946 rm -f conftest.$ac_objext conftest$ac_exeext
8947 if { (eval echo "$as_me:8947: \"$ac_link\"") >&5
8948 (eval $ac_link) 2>&5
8950 echo "$as_me:8950: \$? = $ac_status" >&5
8951 (exit $ac_status); } &&
8952 { ac_try='test -s conftest$ac_exeext'
8953 { (eval echo "$as_me:8953: \"$ac_try\"") >&5
8956 echo "$as_me:8956: \$? = $ac_status" >&5
8957 (exit $ac_status); }; }; then
8958 ac_cv_lib_gpm_initscr=yes
8960 echo "$as_me: failed program was:" >&5
8961 cat conftest.$ac_ext >&5
8962 ac_cv_lib_gpm_initscr=no
8964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8965 LIBS=$ac_check_lib_save_LIBS
8967 echo "$as_me:8967: result: $ac_cv_lib_gpm_initscr" >&5
8968 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8969 if test $ac_cv_lib_gpm_initscr = yes; then
8970 LIBS="$cf_ncurses_SAVE"
8972 cf_ncurses_LIBS="-lgpm"
8979 # This is only necessary if you are linking against an obsolete
8980 # version of ncurses (but it should do no harm, since it's static).
8981 if test "$cf_nculib_root" = ncurses ; then
8982 echo "$as_me:8982: checking for tgoto in -lmytinfo" >&5
8983 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8984 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8985 echo $ECHO_N "(cached) $ECHO_C" >&6
8987 ac_check_lib_save_LIBS=$LIBS
8988 LIBS="-lmytinfo $LIBS"
8989 cat >conftest.$ac_ext <<_ACEOF
8990 #line 8990 "configure"
8991 #include "confdefs.h"
8993 /* Override any gcc2 internal prototype to avoid an error. */
8997 /* We use char because int might match the return type of a gcc2
8998 builtin and then its argument prototype would still apply. */
9008 rm -f conftest.$ac_objext conftest$ac_exeext
9009 if { (eval echo "$as_me:9009: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>&5
9012 echo "$as_me:9012: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
9014 { ac_try='test -s conftest$ac_exeext'
9015 { (eval echo "$as_me:9015: \"$ac_try\"") >&5
9018 echo "$as_me:9018: \$? = $ac_status" >&5
9019 (exit $ac_status); }; }; then
9020 ac_cv_lib_mytinfo_tgoto=yes
9022 echo "$as_me: failed program was:" >&5
9023 cat conftest.$ac_ext >&5
9024 ac_cv_lib_mytinfo_tgoto=no
9026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9027 LIBS=$ac_check_lib_save_LIBS
9029 echo "$as_me:9029: result: $ac_cv_lib_mytinfo_tgoto" >&5
9030 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9031 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9032 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9039 cf_add_libs="$cf_ncurses_LIBS"
9040 # Filter out duplicates - this happens with badly-designed ".pc" files...
9041 for cf_add_1lib in $LIBS
9043 for cf_add_2lib in $cf_add_libs
9045 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9055 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9058 cf_add_libs="-l$cf_nculib_root"
9059 # Filter out duplicates - this happens with badly-designed ".pc" files...
9060 for cf_add_1lib in $LIBS
9062 for cf_add_2lib in $cf_add_libs
9064 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9070 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9076 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9078 echo "$as_me:9078: checking for initscr" >&5
9079 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9080 if test "${ac_cv_func_initscr+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
9083 cat >conftest.$ac_ext <<_ACEOF
9084 #line 9084 "configure"
9085 #include "confdefs.h"
9086 #define initscr autoconf_temporary
9087 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9094 /* We use char because int might match the return type of a gcc2
9095 builtin and then its argument prototype would still apply. */
9096 char initscr (void);
9102 /* The GNU C library defines stubs for functions which it implements
9103 to always fail with ENOSYS. Some functions are actually named
9104 something starting with __ and the normal name is an alias. */
9105 #if defined (__stub_initscr) || defined (__stub___initscr)
9106 #error found stub for initscr
9114 rm -f conftest.$ac_objext conftest$ac_exeext
9115 if { (eval echo "$as_me:9115: \"$ac_link\"") >&5
9116 (eval $ac_link) 2>&5
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit $ac_status); } &&
9120 { ac_try='test -s conftest$ac_exeext'
9121 { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9124 echo "$as_me:9124: \$? = $ac_status" >&5
9125 (exit $ac_status); }; }; then
9126 ac_cv_func_initscr=yes
9128 echo "$as_me: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 ac_cv_func_initscr=no
9132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9134 echo "$as_me:9134: result: $ac_cv_func_initscr" >&5
9135 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9136 if test $ac_cv_func_initscr = yes; then
9137 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9140 cf_save_LIBS="$LIBS"
9141 echo "$as_me:9141: checking for initscr in -l$cf_nculib_root" >&5
9142 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9143 LIBS="-l$cf_nculib_root $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
9179 cf_library_path_list=""
9180 if test -n "${LDFLAGS}${LIBS}" ; then
9181 for cf_library_path in $LDFLAGS $LIBS
9183 case $cf_library_path in
9185 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9187 test "x$cf_library_path" != "xNONE" && \
9188 test -d "$cf_library_path" && \
9190 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9191 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9192 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9193 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9194 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9195 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"
9198 cf_library_path_list="$cf_library_path_list $cf_search"
9206 test "x$prefix" != "xNONE" && \
9207 test -d "$prefix" && \
9209 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9210 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9211 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9212 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9213 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9214 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9217 for cf_subdir_prefix in \
9226 test "x$cf_subdir_prefix" != "x$prefix" && \
9227 test -d "$cf_subdir_prefix" && \
9228 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9229 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9230 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9231 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9232 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9233 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9234 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"
9239 cf_search="$cf_library_path_list $cf_search"
9241 for cf_libdir in $cf_search
9243 echo "$as_me:9243: checking for -l$cf_nculib_root in $cf_libdir" >&5
9244 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9245 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9246 cat >conftest.$ac_ext <<_ACEOF
9247 #line 9247 "configure"
9248 #include "confdefs.h"
9249 #include <${cf_cv_ncurses_header:-curses.h}>
9258 rm -f conftest.$ac_objext conftest$ac_exeext
9259 if { (eval echo "$as_me:9259: \"$ac_link\"") >&5
9260 (eval $ac_link) 2>&5
9262 echo "$as_me:9262: \$? = $ac_status" >&5
9263 (exit $ac_status); } &&
9264 { ac_try='test -s conftest$ac_exeext'
9265 { (eval echo "$as_me:9265: \"$ac_try\"") >&5
9268 echo "$as_me:9268: \$? = $ac_status" >&5
9269 (exit $ac_status); }; }; then
9270 echo "$as_me:9270: result: yes" >&5
9271 echo "${ECHO_T}yes" >&6
9272 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9275 echo "$as_me: failed program was:" >&5
9276 cat conftest.$ac_ext >&5
9277 echo "$as_me:9277: result: no" >&5
9278 echo "${ECHO_T}no" >&6
9279 LIBS="$cf_save_LIBS"
9281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9289 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9291 if test $cf_found_library = no ; then
9292 { { echo "$as_me:9292: error: Cannot link $cf_nculib_root library" >&5
9293 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9294 { (exit 1); exit 1; }; }
9299 if test -n "$cf_ncurses_LIBS" ; then
9300 echo "$as_me:9300: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9301 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9302 cf_ncurses_SAVE="$LIBS"
9303 for p in $cf_ncurses_LIBS ; do
9304 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9305 if test "$q" != "$LIBS" ; then
9309 cat >conftest.$ac_ext <<_ACEOF
9310 #line 9310 "configure"
9311 #include "confdefs.h"
9312 #include <${cf_cv_ncurses_header:-curses.h}>
9316 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9321 rm -f conftest.$ac_objext conftest$ac_exeext
9322 if { (eval echo "$as_me:9322: \"$ac_link\"") >&5
9323 (eval $ac_link) 2>&5
9325 echo "$as_me:9325: \$? = $ac_status" >&5
9326 (exit $ac_status); } &&
9327 { ac_try='test -s conftest$ac_exeext'
9328 { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9331 echo "$as_me:9331: \$? = $ac_status" >&5
9332 (exit $ac_status); }; }; then
9333 echo "$as_me:9333: result: yes" >&5
9334 echo "${ECHO_T}yes" >&6
9336 echo "$as_me: failed program was:" >&5
9337 cat conftest.$ac_ext >&5
9338 echo "$as_me:9338: result: no" >&5
9339 echo "${ECHO_T}no" >&6
9340 LIBS="$cf_ncurses_SAVE"
9342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9345 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9347 cat >>confdefs.h <<EOF
9348 #define $cf_nculib_ROOT 1
9359 cf_ncuconfig_root=$cf_cv_screen
9360 cf_have_ncuconfig=no
9362 if test "x${PKG_CONFIG:=none}" != xnone; then
9363 echo "$as_me:9363: checking pkg-config for $cf_ncuconfig_root" >&5
9364 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9365 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9366 echo "$as_me:9366: result: yes" >&5
9367 echo "${ECHO_T}yes" >&6
9369 echo "$as_me:9369: checking if the $cf_ncuconfig_root package files work" >&5
9370 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9371 cf_have_ncuconfig=unknown
9373 cf_save_CPPFLAGS="$CPPFLAGS"
9374 cf_save_LIBS="$LIBS"
9379 cf_new_extra_cppflags=
9381 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9383 case $cf_fix_cppflags in
9385 case $cf_add_cflags in
9386 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9387 case $cf_add_cflags in
9389 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9392 && test -z "${cf_tst_cflags}" \
9393 && cf_fix_cppflags=yes
9395 if test $cf_fix_cppflags = yes ; then
9397 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9398 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9401 elif test "${cf_tst_cflags}" = "\"'" ; then
9403 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9404 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9414 case $cf_add_cflags in
9416 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9418 CPPFLAGS=`echo "$CPPFLAGS" | \
9419 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9420 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9425 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9426 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9433 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9434 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9444 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9447 && test -z "${cf_tst_cflags}" \
9448 && cf_fix_cppflags=no
9453 if test -n "$cf_new_cflags" ; then
9455 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9456 CFLAGS="${CFLAGS}$cf_new_cflags"
9460 if test -n "$cf_new_cppflags" ; then
9462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9463 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9467 if test -n "$cf_new_extra_cppflags" ; then
9469 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9470 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9474 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9475 # Filter out duplicates - this happens with badly-designed ".pc" files...
9476 for cf_add_1lib in $LIBS
9478 for cf_add_2lib in $cf_add_libs
9480 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9486 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9490 cat >conftest.$ac_ext <<_ACEOF
9491 #line 9491 "configure"
9492 #include "confdefs.h"
9493 #include <${cf_cv_ncurses_header:-curses.h}>
9497 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9502 rm -f conftest.$ac_objext conftest$ac_exeext
9503 if { (eval echo "$as_me:9503: \"$ac_link\"") >&5
9504 (eval $ac_link) 2>&5
9506 echo "$as_me:9506: \$? = $ac_status" >&5
9507 (exit $ac_status); } &&
9508 { ac_try='test -s conftest$ac_exeext'
9509 { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9512 echo "$as_me:9512: \$? = $ac_status" >&5
9513 (exit $ac_status); }; }; then
9514 if test "$cross_compiling" = yes; then
9515 cf_have_ncuconfig=maybe
9517 cat >conftest.$ac_ext <<_ACEOF
9518 #line 9518 "configure"
9519 #include "confdefs.h"
9520 #include <${cf_cv_ncurses_header:-curses.h}>
9522 { char *xx = curses_version(); return (xx == 0); }
9524 rm -f conftest$ac_exeext
9525 if { (eval echo "$as_me:9525: \"$ac_link\"") >&5
9526 (eval $ac_link) 2>&5
9528 echo "$as_me:9528: \$? = $ac_status" >&5
9529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9530 { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9533 echo "$as_me:9533: \$? = $ac_status" >&5
9534 (exit $ac_status); }; }; then
9535 cf_have_ncuconfig=yes
9537 echo "$as_me: program exited with status $ac_status" >&5
9538 echo "$as_me: failed program was:" >&5
9539 cat conftest.$ac_ext >&5
9540 cf_have_ncuconfig=no
9542 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9545 echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547 cf_have_ncuconfig=no
9549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9550 echo "$as_me:9550: result: $cf_have_ncuconfig" >&5
9551 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9552 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9553 if test "$cf_have_ncuconfig" != "yes"
9555 CPPFLAGS="$cf_save_CPPFLAGS"
9556 LIBS="$cf_save_LIBS"
9557 NCURSES_CONFIG_PKG=none
9560 cat >>confdefs.h <<\EOF
9564 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9566 echo "$as_me:9566: checking for terminfo header" >&5
9567 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9568 if test "${cf_cv_term_header+set}" = set; then
9569 echo $ECHO_N "(cached) $ECHO_C" >&6
9572 case ${cf_cv_ncurses_header} in
9573 (*/ncurses.h|*/ncursesw.h)
9574 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9577 cf_term_header=term.h
9581 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9583 cat >conftest.$ac_ext <<_ACEOF
9584 #line 9584 "configure"
9585 #include "confdefs.h"
9587 #include <${cf_cv_ncurses_header:-curses.h}>
9593 int x = auto_left_margin
9598 rm -f conftest.$ac_objext
9599 if { (eval echo "$as_me:9599: \"$ac_compile\"") >&5
9600 (eval $ac_compile) 2>&5
9602 echo "$as_me:9602: \$? = $ac_status" >&5
9603 (exit $ac_status); } &&
9604 { ac_try='test -s conftest.$ac_objext'
9605 { (eval echo "$as_me:9605: \"$ac_try\"") >&5
9608 echo "$as_me:9608: \$? = $ac_status" >&5
9609 (exit $ac_status); }; }; then
9611 cf_cv_term_header="$cf_test"
9613 echo "$as_me: failed program was:" >&5
9614 cat conftest.$ac_ext >&5
9616 cf_cv_term_header=unknown
9619 rm -f conftest.$ac_objext conftest.$ac_ext
9620 test "$cf_cv_term_header" != unknown && break
9624 echo "$as_me:9624: result: $cf_cv_term_header" >&5
9625 echo "${ECHO_T}$cf_cv_term_header" >&6
9627 # Set definitions to allow ifdef'ing to accommodate subdirectories
9629 case $cf_cv_term_header in
9632 cat >>confdefs.h <<\EOF
9633 #define HAVE_TERM_H 1
9639 case $cf_cv_term_header in
9642 cat >>confdefs.h <<\EOF
9643 #define HAVE_NCURSES_TERM_H 1
9649 cat >>confdefs.h <<\EOF
9650 #define HAVE_NCURSESW_TERM_H 1
9659 echo "$as_me:9659: result: no" >&5
9660 echo "${ECHO_T}no" >&6
9661 NCURSES_CONFIG_PKG=none
9664 NCURSES_CONFIG_PKG=none
9667 if test "x$cf_have_ncuconfig" = "xno"; then
9668 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9670 if test -n "$ac_tool_prefix"; then
9671 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9673 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9674 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9675 echo "$as_me:9675: checking for $ac_word" >&5
9676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9677 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9678 echo $ECHO_N "(cached) $ECHO_C" >&6
9680 if test -n "$NCURSES_CONFIG"; then
9681 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9683 ac_save_IFS=$IFS; IFS=$ac_path_separator
9685 for ac_dir in $ac_dummy; do
9687 test -z "$ac_dir" && ac_dir=.
9688 $as_executable_p "$ac_dir/$ac_word" || continue
9689 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9690 echo "$as_me:9690: found $ac_dir/$ac_word" >&5
9696 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9697 if test -n "$NCURSES_CONFIG"; then
9698 echo "$as_me:9698: result: $NCURSES_CONFIG" >&5
9699 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9701 echo "$as_me:9701: result: no" >&5
9702 echo "${ECHO_T}no" >&6
9705 test -n "$NCURSES_CONFIG" && break
9708 if test -z "$NCURSES_CONFIG"; then
9709 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9710 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9712 # Extract the first word of "$ac_prog", so it can be a program name with args.
9713 set dummy $ac_prog; ac_word=$2
9714 echo "$as_me:9714: checking for $ac_word" >&5
9715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9716 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9717 echo $ECHO_N "(cached) $ECHO_C" >&6
9719 if test -n "$ac_ct_NCURSES_CONFIG"; then
9720 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9722 ac_save_IFS=$IFS; IFS=$ac_path_separator
9724 for ac_dir in $ac_dummy; do
9726 test -z "$ac_dir" && ac_dir=.
9727 $as_executable_p "$ac_dir/$ac_word" || continue
9728 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9729 echo "$as_me:9729: found $ac_dir/$ac_word" >&5
9735 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9736 if test -n "$ac_ct_NCURSES_CONFIG"; then
9737 echo "$as_me:9737: result: $ac_ct_NCURSES_CONFIG" >&5
9738 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9740 echo "$as_me:9740: result: no" >&5
9741 echo "${ECHO_T}no" >&6
9744 test -n "$ac_ct_NCURSES_CONFIG" && break
9746 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9748 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9751 if test "$NCURSES_CONFIG" != none ; then
9756 cf_new_extra_cppflags=
9758 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9760 case $cf_fix_cppflags in
9762 case $cf_add_cflags in
9763 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9764 case $cf_add_cflags in
9766 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9768 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9769 && test -z "${cf_tst_cflags}" \
9770 && cf_fix_cppflags=yes
9772 if test $cf_fix_cppflags = yes ; then
9774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9778 elif test "${cf_tst_cflags}" = "\"'" ; then
9780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9791 case $cf_add_cflags in
9793 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9795 CPPFLAGS=`echo "$CPPFLAGS" | \
9796 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9797 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9802 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9803 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9810 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9811 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9821 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9823 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9824 && test -z "${cf_tst_cflags}" \
9825 && cf_fix_cppflags=no
9830 if test -n "$cf_new_cflags" ; then
9832 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9833 CFLAGS="${CFLAGS}$cf_new_cflags"
9837 if test -n "$cf_new_cppflags" ; then
9839 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9840 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9844 if test -n "$cf_new_extra_cppflags" ; then
9846 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9847 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9851 cf_add_libs="`$NCURSES_CONFIG --libs`"
9852 # Filter out duplicates - this happens with badly-designed ".pc" files...
9853 for cf_add_1lib in $LIBS
9855 for cf_add_2lib in $cf_add_libs
9857 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9863 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9867 # even with config script, some packages use no-override for curses.h
9869 echo "$as_me:9869: checking if we have identified curses headers" >&5
9870 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9871 if test "${cf_cv_ncurses_header+set}" = set; then
9872 echo $ECHO_N "(cached) $ECHO_C" >&6
9875 cf_cv_ncurses_header=none
9877 ncurses.h $cf_cv_screen/ncurses.h \
9878 curses.h $cf_cv_screen/curses.h
9880 cat >conftest.$ac_ext <<_ACEOF
9881 #line 9881 "configure"
9882 #include "confdefs.h"
9883 #include <${cf_header}>
9887 initscr(); tgoto("?", 0,0)
9892 rm -f conftest.$ac_objext
9893 if { (eval echo "$as_me:9893: \"$ac_compile\"") >&5
9894 (eval $ac_compile) 2>&5
9896 echo "$as_me:9896: \$? = $ac_status" >&5
9897 (exit $ac_status); } &&
9898 { ac_try='test -s conftest.$ac_objext'
9899 { (eval echo "$as_me:9899: \"$ac_try\"") >&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
9904 cf_cv_ncurses_header=$cf_header; break
9906 echo "$as_me: failed program was:" >&5
9907 cat conftest.$ac_ext >&5
9909 rm -f conftest.$ac_objext conftest.$ac_ext
9913 echo "$as_me:9913: result: $cf_cv_ncurses_header" >&5
9914 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9916 if test "$cf_cv_ncurses_header" = none ; then
9917 { { echo "$as_me:9917: error: No curses header-files found" >&5
9918 echo "$as_me: error: No curses header-files found" >&2;}
9919 { (exit 1); exit 1; }; }
9922 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9924 for ac_header in $cf_cv_ncurses_header
9926 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9927 echo "$as_me:9927: checking for $ac_header" >&5
9928 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9929 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9930 echo $ECHO_N "(cached) $ECHO_C" >&6
9932 cat >conftest.$ac_ext <<_ACEOF
9933 #line 9933 "configure"
9934 #include "confdefs.h"
9935 #include <$ac_header>
9937 if { (eval echo "$as_me:9937: \"$ac_cpp conftest.$ac_ext\"") >&5
9938 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9940 egrep -v '^ *\+' conftest.er1 >conftest.err
9942 cat conftest.err >&5
9943 echo "$as_me:9943: \$? = $ac_status" >&5
9944 (exit $ac_status); } >/dev/null; then
9945 if test -s conftest.err; then
9946 ac_cpp_err=$ac_c_preproc_warn_flag
9953 if test -z "$ac_cpp_err"; then
9954 eval "$as_ac_Header=yes"
9956 echo "$as_me: failed program was:" >&5
9957 cat conftest.$ac_ext >&5
9958 eval "$as_ac_Header=no"
9960 rm -f conftest.err conftest.$ac_ext
9962 echo "$as_me:9962: result: `eval echo '${'$as_ac_Header'}'`" >&5
9963 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9964 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9965 cat >>confdefs.h <<EOF
9966 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9972 cat >>confdefs.h <<\EOF
9976 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9978 cat >>confdefs.h <<EOF
9979 #define $cf_nculib_ROOT 1
9982 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9986 cf_ncuhdr_root=$cf_cv_screen
9988 test -n "$cf_cv_curses_dir" && \
9989 test "$cf_cv_curses_dir" != "no" && { \
9991 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9992 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9994 while test $cf_add_incdir != /usr/include
9996 if test -d $cf_add_incdir
9999 if test -n "$CFLAGS$CPPFLAGS" ; then
10000 # a loop is needed to ensure we can add subdirs of existing dirs
10001 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10002 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10003 cf_have_incdir=yes; break
10008 if test "$cf_have_incdir" = no ; then
10009 if test "$cf_add_incdir" = /usr/local/include ; then
10010 if test "$GCC" = yes
10012 cf_save_CPPFLAGS=$CPPFLAGS
10014 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10015 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10017 cat >conftest.$ac_ext <<_ACEOF
10018 #line 10018 "configure"
10019 #include "confdefs.h"
10029 rm -f conftest.$ac_objext
10030 if { (eval echo "$as_me:10030: \"$ac_compile\"") >&5
10031 (eval $ac_compile) 2>&5
10033 echo "$as_me:10033: \$? = $ac_status" >&5
10034 (exit $ac_status); } &&
10035 { ac_try='test -s conftest.$ac_objext'
10036 { (eval echo "$as_me:10036: \"$ac_try\"") >&5
10037 (eval $ac_try) 2>&5
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit $ac_status); }; }; then
10043 echo "$as_me: failed program was:" >&5
10044 cat conftest.$ac_ext >&5
10047 rm -f conftest.$ac_objext conftest.$ac_ext
10048 CPPFLAGS=$cf_save_CPPFLAGS
10053 if test "$cf_have_incdir" = no ; then
10054 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10056 echo "${as_me:-configure}:10056: testing adding $cf_add_incdir to include-path ..." 1>&5
10058 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10060 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10061 test "$cf_top_incdir" = "$cf_add_incdir" && break
10062 cf_add_incdir="$cf_top_incdir"
10075 echo "$as_me:10075: checking for $cf_ncuhdr_root header in include-path" >&5
10076 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10077 if test "${cf_cv_ncurses_h+set}" = set; then
10078 echo $ECHO_N "(cached) $ECHO_C" >&6
10081 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10082 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10083 for cf_header in $cf_header_list
10086 cat >conftest.$ac_ext <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10090 #include <$cf_header>
10095 #ifdef NCURSES_VERSION
10097 printf("%s\n", NCURSES_VERSION);
10110 rm -f conftest.$ac_objext
10111 if { (eval echo "$as_me:10111: \"$ac_compile\"") >&5
10112 (eval $ac_compile) 2>&5
10114 echo "$as_me:10114: \$? = $ac_status" >&5
10115 (exit $ac_status); } &&
10116 { ac_try='test -s conftest.$ac_objext'
10117 { (eval echo "$as_me:10117: \"$ac_try\"") >&5
10118 (eval $ac_try) 2>&5
10120 echo "$as_me:10120: \$? = $ac_status" >&5
10121 (exit $ac_status); }; }; then
10122 cf_cv_ncurses_h=$cf_header
10125 echo "$as_me: failed program was:" >&5
10126 cat conftest.$ac_ext >&5
10129 rm -f conftest.$ac_objext conftest.$ac_ext
10131 test "$cf_cv_ncurses_h" != no && break
10135 echo "$as_me:10135: result: $cf_cv_ncurses_h" >&5
10136 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10138 if test "$cf_cv_ncurses_h" != no ; then
10139 cf_cv_ncurses_header=$cf_cv_ncurses_h
10142 echo "$as_me:10142: checking for $cf_ncuhdr_root include-path" >&5
10143 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10144 if test "${cf_cv_ncurses_h2+set}" = set; then
10145 echo $ECHO_N "(cached) $ECHO_C" >&6
10148 test -n "$verbose" && echo
10152 # collect the current set of include-directories from compiler flags
10153 cf_header_path_list=""
10154 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10155 for cf_header_path in $CPPFLAGS $CFLAGS
10157 case $cf_header_path in
10159 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10161 test "x$cf_header_path" != "xNONE" && \
10162 test -d "$cf_header_path" && \
10164 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10165 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10166 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10167 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10168 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10169 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"
10172 cf_header_path_list="$cf_header_path_list $cf_search"
10178 # add the variations for the package we are looking for
10182 test "x$prefix" != "xNONE" && \
10183 test -d "$prefix" && \
10185 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10186 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10187 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10188 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10189 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10190 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10193 for cf_subdir_prefix in \
10202 test "x$cf_subdir_prefix" != "x$prefix" && \
10203 test -d "$cf_subdir_prefix" && \
10204 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10205 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10206 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10207 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10208 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10209 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10210 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"
10215 test "$includedir" != NONE && \
10216 test "$includedir" != "/usr/include" && \
10217 test -d "$includedir" && {
10218 test -d $includedir && cf_search="$cf_search $includedir"
10219 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10222 test "$oldincludedir" != NONE && \
10223 test "$oldincludedir" != "/usr/include" && \
10224 test -d "$oldincludedir" && {
10225 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10226 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10229 cf_search="$cf_search $cf_header_path_list"
10231 test -n "$verbose" && echo search path $cf_search
10232 cf_save2_CPPFLAGS="$CPPFLAGS"
10233 for cf_incdir in $cf_search
10236 if test -n "$cf_incdir" ; then
10237 for cf_add_incdir in $cf_incdir
10239 while test $cf_add_incdir != /usr/include
10241 if test -d $cf_add_incdir
10244 if test -n "$CFLAGS$CPPFLAGS" ; then
10245 # a loop is needed to ensure we can add subdirs of existing dirs
10246 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10247 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10248 cf_have_incdir=yes; break
10253 if test "$cf_have_incdir" = no ; then
10254 if test "$cf_add_incdir" = /usr/local/include ; then
10255 if test "$GCC" = yes
10257 cf_save_CPPFLAGS=$CPPFLAGS
10259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10260 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10262 cat >conftest.$ac_ext <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10274 rm -f conftest.$ac_objext
10275 if { (eval echo "$as_me:10275: \"$ac_compile\"") >&5
10276 (eval $ac_compile) 2>&5
10278 echo "$as_me:10278: \$? = $ac_status" >&5
10279 (exit $ac_status); } &&
10280 { ac_try='test -s conftest.$ac_objext'
10281 { (eval echo "$as_me:10281: \"$ac_try\"") >&5
10282 (eval $ac_try) 2>&5
10284 echo "$as_me:10284: \$? = $ac_status" >&5
10285 (exit $ac_status); }; }; then
10288 echo "$as_me: failed program was:" >&5
10289 cat conftest.$ac_ext >&5
10292 rm -f conftest.$ac_objext conftest.$ac_ext
10293 CPPFLAGS=$cf_save_CPPFLAGS
10298 if test "$cf_have_incdir" = no ; then
10299 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10301 echo "${as_me:-configure}:10301: testing adding $cf_add_incdir to include-path ..." 1>&5
10303 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10305 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10306 test "$cf_top_incdir" = "$cf_add_incdir" && break
10307 cf_add_incdir="$cf_top_incdir"
10323 cat >conftest.$ac_ext <<_ACEOF
10324 #line 10324 "configure"
10325 #include "confdefs.h"
10327 #include <$cf_header>
10332 #ifdef NCURSES_VERSION
10334 printf("%s\n", NCURSES_VERSION);
10347 rm -f conftest.$ac_objext
10348 if { (eval echo "$as_me:10348: \"$ac_compile\"") >&5
10349 (eval $ac_compile) 2>&5
10351 echo "$as_me:10351: \$? = $ac_status" >&5
10352 (exit $ac_status); } &&
10353 { ac_try='test -s conftest.$ac_objext'
10354 { (eval echo "$as_me:10354: \"$ac_try\"") >&5
10355 (eval $ac_try) 2>&5
10357 echo "$as_me:10357: \$? = $ac_status" >&5
10358 (exit $ac_status); }; }; then
10359 cf_cv_ncurses_h2=$cf_header
10362 echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_cv_ncurses_h2=no
10366 rm -f conftest.$ac_objext conftest.$ac_ext
10368 if test "$cf_cv_ncurses_h2" != no ; then
10369 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10370 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10373 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10375 CPPFLAGS="$cf_save2_CPPFLAGS"
10376 test "$cf_cv_ncurses_h2" != no && break
10378 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10378: error: not found" >&5
10379 echo "$as_me: error: not found" >&2;}
10380 { (exit 1); exit 1; }; }
10383 echo "$as_me:10383: result: $cf_cv_ncurses_h2" >&5
10384 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10386 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10387 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10388 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10389 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10392 if test -n "$cf_1st_incdir" ; then
10393 for cf_add_incdir in $cf_1st_incdir
10395 while test $cf_add_incdir != /usr/include
10397 if test -d $cf_add_incdir
10400 if test -n "$CFLAGS$CPPFLAGS" ; then
10401 # a loop is needed to ensure we can add subdirs of existing dirs
10402 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10403 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10404 cf_have_incdir=yes; break
10409 if test "$cf_have_incdir" = no ; then
10410 if test "$cf_add_incdir" = /usr/local/include ; then
10411 if test "$GCC" = yes
10413 cf_save_CPPFLAGS=$CPPFLAGS
10415 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10416 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10418 cat >conftest.$ac_ext <<_ACEOF
10419 #line 10419 "configure"
10420 #include "confdefs.h"
10430 rm -f conftest.$ac_objext
10431 if { (eval echo "$as_me:10431: \"$ac_compile\"") >&5
10432 (eval $ac_compile) 2>&5
10434 echo "$as_me:10434: \$? = $ac_status" >&5
10435 (exit $ac_status); } &&
10436 { ac_try='test -s conftest.$ac_objext'
10437 { (eval echo "$as_me:10437: \"$ac_try\"") >&5
10438 (eval $ac_try) 2>&5
10440 echo "$as_me:10440: \$? = $ac_status" >&5
10441 (exit $ac_status); }; }; then
10444 echo "$as_me: failed program was:" >&5
10445 cat conftest.$ac_ext >&5
10448 rm -f conftest.$ac_objext conftest.$ac_ext
10449 CPPFLAGS=$cf_save_CPPFLAGS
10454 if test "$cf_have_incdir" = no ; then
10455 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10457 echo "${as_me:-configure}:10457: testing adding $cf_add_incdir to include-path ..." 1>&5
10459 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10461 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10462 test "$cf_top_incdir" = "$cf_add_incdir" && break
10463 cf_add_incdir="$cf_top_incdir"
10476 # Set definitions to allow ifdef'ing for ncurses.h
10478 case $cf_cv_ncurses_header in
10481 cat >>confdefs.h <<\EOF
10482 #define HAVE_NCURSES_H 1
10488 case $cf_cv_ncurses_header in
10489 (ncurses/curses.h|ncurses/ncurses.h)
10491 cat >>confdefs.h <<\EOF
10492 #define HAVE_NCURSES_NCURSES_H 1
10496 (ncursesw/curses.h|ncursesw/ncurses.h)
10498 cat >>confdefs.h <<\EOF
10499 #define HAVE_NCURSESW_NCURSES_H 1
10505 echo "$as_me:10505: checking for terminfo header" >&5
10506 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10507 if test "${cf_cv_term_header+set}" = set; then
10508 echo $ECHO_N "(cached) $ECHO_C" >&6
10511 case ${cf_cv_ncurses_header} in
10512 (*/ncurses.h|*/ncursesw.h)
10513 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10516 cf_term_header=term.h
10520 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10522 cat >conftest.$ac_ext <<_ACEOF
10523 #line 10523 "configure"
10524 #include "confdefs.h"
10526 #include <${cf_cv_ncurses_header:-curses.h}>
10527 #include <$cf_test>
10532 int x = auto_left_margin
10537 rm -f conftest.$ac_objext
10538 if { (eval echo "$as_me:10538: \"$ac_compile\"") >&5
10539 (eval $ac_compile) 2>&5
10541 echo "$as_me:10541: \$? = $ac_status" >&5
10542 (exit $ac_status); } &&
10543 { ac_try='test -s conftest.$ac_objext'
10544 { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545 (eval $ac_try) 2>&5
10547 echo "$as_me:10547: \$? = $ac_status" >&5
10548 (exit $ac_status); }; }; then
10550 cf_cv_term_header="$cf_test"
10552 echo "$as_me: failed program was:" >&5
10553 cat conftest.$ac_ext >&5
10555 cf_cv_term_header=unknown
10558 rm -f conftest.$ac_objext conftest.$ac_ext
10559 test "$cf_cv_term_header" != unknown && break
10563 echo "$as_me:10563: result: $cf_cv_term_header" >&5
10564 echo "${ECHO_T}$cf_cv_term_header" >&6
10566 # Set definitions to allow ifdef'ing to accommodate subdirectories
10568 case $cf_cv_term_header in
10571 cat >>confdefs.h <<\EOF
10572 #define HAVE_TERM_H 1
10578 case $cf_cv_term_header in
10581 cat >>confdefs.h <<\EOF
10582 #define HAVE_NCURSES_TERM_H 1
10588 cat >>confdefs.h <<\EOF
10589 #define HAVE_NCURSESW_TERM_H 1
10595 # some applications need this, but should check for NCURSES_VERSION
10597 cat >>confdefs.h <<\EOF
10601 echo "$as_me:10601: checking for ncurses version" >&5
10602 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10603 if test "${cf_cv_ncurses_version+set}" = set; then
10604 echo $ECHO_N "(cached) $ECHO_C" >&6
10607 cf_cv_ncurses_version=no
10610 if test "$cross_compiling" = yes; then
10612 # This will not work if the preprocessor splits the line after the
10613 # Autoconf token. The 'unproto' program does that.
10614 cat > conftest.$ac_ext <<EOF
10615 #include <${cf_cv_ncurses_header:-curses.h}>
10617 #ifdef NCURSES_VERSION
10618 Autoconf NCURSES_VERSION
10626 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10627 { (eval echo "$as_me:10627: \"$cf_try\"") >&5
10628 (eval $cf_try) 2>&5
10630 echo "$as_me:10630: \$? = $ac_status" >&5
10631 (exit $ac_status); }
10632 if test -f conftest.out ; then
10633 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10634 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10639 cat >conftest.$ac_ext <<_ACEOF
10640 #line 10640 "configure"
10641 #include "confdefs.h"
10643 #include <${cf_cv_ncurses_header:-curses.h}>
10647 FILE *fp = fopen("$cf_tempfile", "w");
10648 #ifdef NCURSES_VERSION
10649 # ifdef NCURSES_VERSION_PATCH
10650 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10652 fprintf(fp, "%s\n", NCURSES_VERSION);
10655 # ifdef __NCURSES_H
10656 fprintf(fp, "old\n");
10661 ${cf_cv_main_return:-return}(0);
10664 rm -f conftest$ac_exeext
10665 if { (eval echo "$as_me:10665: \"$ac_link\"") >&5
10666 (eval $ac_link) 2>&5
10668 echo "$as_me:10668: \$? = $ac_status" >&5
10669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10670 { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671 (eval $ac_try) 2>&5
10673 echo "$as_me:10673: \$? = $ac_status" >&5
10674 (exit $ac_status); }; }; then
10676 cf_cv_ncurses_version=`cat $cf_tempfile`
10678 echo "$as_me: program exited with status $ac_status" >&5
10679 echo "$as_me: failed program was:" >&5
10680 cat conftest.$ac_ext >&5
10682 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10687 echo "$as_me:10687: result: $cf_cv_ncurses_version" >&5
10688 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10689 test "$cf_cv_ncurses_version" = no ||
10690 cat >>confdefs.h <<\EOF
10694 cf_nculib_root=$cf_cv_screen
10695 # This works, except for the special case where we find gpm, but
10696 # ncurses is in a nonstandard location via $LIBS, and we really want
10699 cf_ncurses_SAVE="$LIBS"
10700 echo "$as_me:10700: checking for Gpm_Open in -lgpm" >&5
10701 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10702 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10703 echo $ECHO_N "(cached) $ECHO_C" >&6
10705 ac_check_lib_save_LIBS=$LIBS
10707 cat >conftest.$ac_ext <<_ACEOF
10708 #line 10708 "configure"
10709 #include "confdefs.h"
10711 /* Override any gcc2 internal prototype to avoid an error. */
10715 /* We use char because int might match the return type of a gcc2
10716 builtin and then its argument prototype would still apply. */
10726 rm -f conftest.$ac_objext conftest$ac_exeext
10727 if { (eval echo "$as_me:10727: \"$ac_link\"") >&5
10728 (eval $ac_link) 2>&5
10730 echo "$as_me:10730: \$? = $ac_status" >&5
10731 (exit $ac_status); } &&
10732 { ac_try='test -s conftest$ac_exeext'
10733 { (eval echo "$as_me:10733: \"$ac_try\"") >&5
10734 (eval $ac_try) 2>&5
10736 echo "$as_me:10736: \$? = $ac_status" >&5
10737 (exit $ac_status); }; }; then
10738 ac_cv_lib_gpm_Gpm_Open=yes
10740 echo "$as_me: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 ac_cv_lib_gpm_Gpm_Open=no
10744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10745 LIBS=$ac_check_lib_save_LIBS
10747 echo "$as_me:10747: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10748 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10749 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10750 echo "$as_me:10750: checking for initscr in -lgpm" >&5
10751 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10752 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10753 echo $ECHO_N "(cached) $ECHO_C" >&6
10755 ac_check_lib_save_LIBS=$LIBS
10757 cat >conftest.$ac_ext <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10761 /* Override any gcc2 internal prototype to avoid an error. */
10765 /* We use char because int might match the return type of a gcc2
10766 builtin and then its argument prototype would still apply. */
10776 rm -f conftest.$ac_objext conftest$ac_exeext
10777 if { (eval echo "$as_me:10777: \"$ac_link\"") >&5
10778 (eval $ac_link) 2>&5
10780 echo "$as_me:10780: \$? = $ac_status" >&5
10781 (exit $ac_status); } &&
10782 { ac_try='test -s conftest$ac_exeext'
10783 { (eval echo "$as_me:10783: \"$ac_try\"") >&5
10784 (eval $ac_try) 2>&5
10786 echo "$as_me:10786: \$? = $ac_status" >&5
10787 (exit $ac_status); }; }; then
10788 ac_cv_lib_gpm_initscr=yes
10790 echo "$as_me: failed program was:" >&5
10791 cat conftest.$ac_ext >&5
10792 ac_cv_lib_gpm_initscr=no
10794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10795 LIBS=$ac_check_lib_save_LIBS
10797 echo "$as_me:10797: result: $ac_cv_lib_gpm_initscr" >&5
10798 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10799 if test $ac_cv_lib_gpm_initscr = yes; then
10800 LIBS="$cf_ncurses_SAVE"
10802 cf_ncurses_LIBS="-lgpm"
10809 # This is only necessary if you are linking against an obsolete
10810 # version of ncurses (but it should do no harm, since it's static).
10811 if test "$cf_nculib_root" = ncurses ; then
10812 echo "$as_me:10812: checking for tgoto in -lmytinfo" >&5
10813 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10814 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10815 echo $ECHO_N "(cached) $ECHO_C" >&6
10817 ac_check_lib_save_LIBS=$LIBS
10818 LIBS="-lmytinfo $LIBS"
10819 cat >conftest.$ac_ext <<_ACEOF
10820 #line 10820 "configure"
10821 #include "confdefs.h"
10823 /* Override any gcc2 internal prototype to avoid an error. */
10827 /* We use char because int might match the return type of a gcc2
10828 builtin and then its argument prototype would still apply. */
10838 rm -f conftest.$ac_objext conftest$ac_exeext
10839 if { (eval echo "$as_me:10839: \"$ac_link\"") >&5
10840 (eval $ac_link) 2>&5
10842 echo "$as_me:10842: \$? = $ac_status" >&5
10843 (exit $ac_status); } &&
10844 { ac_try='test -s conftest$ac_exeext'
10845 { (eval echo "$as_me:10845: \"$ac_try\"") >&5
10846 (eval $ac_try) 2>&5
10848 echo "$as_me:10848: \$? = $ac_status" >&5
10849 (exit $ac_status); }; }; then
10850 ac_cv_lib_mytinfo_tgoto=yes
10852 echo "$as_me: failed program was:" >&5
10853 cat conftest.$ac_ext >&5
10854 ac_cv_lib_mytinfo_tgoto=no
10856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10857 LIBS=$ac_check_lib_save_LIBS
10859 echo "$as_me:10859: result: $ac_cv_lib_mytinfo_tgoto" >&5
10860 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10861 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10862 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10869 cf_add_libs="$cf_ncurses_LIBS"
10870 # Filter out duplicates - this happens with badly-designed ".pc" files...
10871 for cf_add_1lib in $LIBS
10873 for cf_add_2lib in $cf_add_libs
10875 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10881 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10883 LIBS="$cf_add_libs"
10885 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10888 cf_add_libs="-l$cf_nculib_root"
10889 # Filter out duplicates - this happens with badly-designed ".pc" files...
10890 for cf_add_1lib in $LIBS
10892 for cf_add_2lib in $cf_add_libs
10894 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10900 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10902 LIBS="$cf_add_libs"
10906 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10908 echo "$as_me:10908: checking for initscr" >&5
10909 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10910 if test "${ac_cv_func_initscr+set}" = set; then
10911 echo $ECHO_N "(cached) $ECHO_C" >&6
10913 cat >conftest.$ac_ext <<_ACEOF
10914 #line 10914 "configure"
10915 #include "confdefs.h"
10916 #define initscr autoconf_temporary
10917 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10924 /* We use char because int might match the return type of a gcc2
10925 builtin and then its argument prototype would still apply. */
10926 char initscr (void);
10932 /* The GNU C library defines stubs for functions which it implements
10933 to always fail with ENOSYS. Some functions are actually named
10934 something starting with __ and the normal name is an alias. */
10935 #if defined (__stub_initscr) || defined (__stub___initscr)
10936 #error found stub for initscr
10944 rm -f conftest.$ac_objext conftest$ac_exeext
10945 if { (eval echo "$as_me:10945: \"$ac_link\"") >&5
10946 (eval $ac_link) 2>&5
10948 echo "$as_me:10948: \$? = $ac_status" >&5
10949 (exit $ac_status); } &&
10950 { ac_try='test -s conftest$ac_exeext'
10951 { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952 (eval $ac_try) 2>&5
10954 echo "$as_me:10954: \$? = $ac_status" >&5
10955 (exit $ac_status); }; }; then
10956 ac_cv_func_initscr=yes
10958 echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 ac_cv_func_initscr=no
10962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10964 echo "$as_me:10964: result: $ac_cv_func_initscr" >&5
10965 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10966 if test $ac_cv_func_initscr = yes; then
10967 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10970 cf_save_LIBS="$LIBS"
10971 echo "$as_me:10971: checking for initscr in -l$cf_nculib_root" >&5
10972 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10973 LIBS="-l$cf_nculib_root $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
11009 cf_library_path_list=""
11010 if test -n "${LDFLAGS}${LIBS}" ; then
11011 for cf_library_path in $LDFLAGS $LIBS
11013 case $cf_library_path in
11015 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11017 test "x$cf_library_path" != "xNONE" && \
11018 test -d "$cf_library_path" && \
11020 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11021 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
11022 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11023 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11024 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11025 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"
11028 cf_library_path_list="$cf_library_path_list $cf_search"
11036 test "x$prefix" != "xNONE" && \
11037 test -d "$prefix" && \
11039 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11040 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
11041 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11042 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11043 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11044 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11047 for cf_subdir_prefix in \
11056 test "x$cf_subdir_prefix" != "x$prefix" && \
11057 test -d "$cf_subdir_prefix" && \
11058 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11059 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11060 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
11061 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11062 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11063 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11064 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"
11069 cf_search="$cf_library_path_list $cf_search"
11071 for cf_libdir in $cf_search
11073 echo "$as_me:11073: checking for -l$cf_nculib_root in $cf_libdir" >&5
11074 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11075 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11076 cat >conftest.$ac_ext <<_ACEOF
11077 #line 11077 "configure"
11078 #include "confdefs.h"
11079 #include <${cf_cv_ncurses_header:-curses.h}>
11088 rm -f conftest.$ac_objext conftest$ac_exeext
11089 if { (eval echo "$as_me:11089: \"$ac_link\"") >&5
11090 (eval $ac_link) 2>&5
11092 echo "$as_me:11092: \$? = $ac_status" >&5
11093 (exit $ac_status); } &&
11094 { ac_try='test -s conftest$ac_exeext'
11095 { (eval echo "$as_me:11095: \"$ac_try\"") >&5
11096 (eval $ac_try) 2>&5
11098 echo "$as_me:11098: \$? = $ac_status" >&5
11099 (exit $ac_status); }; }; then
11100 echo "$as_me:11100: result: yes" >&5
11101 echo "${ECHO_T}yes" >&6
11102 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11105 echo "$as_me: failed program was:" >&5
11106 cat conftest.$ac_ext >&5
11107 echo "$as_me:11107: result: no" >&5
11108 echo "${ECHO_T}no" >&6
11109 LIBS="$cf_save_LIBS"
11111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11119 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11121 if test $cf_found_library = no ; then
11122 { { echo "$as_me:11122: error: Cannot link $cf_nculib_root library" >&5
11123 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11124 { (exit 1); exit 1; }; }
11129 if test -n "$cf_ncurses_LIBS" ; then
11130 echo "$as_me:11130: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11131 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11132 cf_ncurses_SAVE="$LIBS"
11133 for p in $cf_ncurses_LIBS ; do
11134 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11135 if test "$q" != "$LIBS" ; then
11139 cat >conftest.$ac_ext <<_ACEOF
11140 #line 11140 "configure"
11141 #include "confdefs.h"
11142 #include <${cf_cv_ncurses_header:-curses.h}>
11146 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11151 rm -f conftest.$ac_objext conftest$ac_exeext
11152 if { (eval echo "$as_me:11152: \"$ac_link\"") >&5
11153 (eval $ac_link) 2>&5
11155 echo "$as_me:11155: \$? = $ac_status" >&5
11156 (exit $ac_status); } &&
11157 { ac_try='test -s conftest$ac_exeext'
11158 { (eval echo "$as_me:11158: \"$ac_try\"") >&5
11159 (eval $ac_try) 2>&5
11161 echo "$as_me:11161: \$? = $ac_status" >&5
11162 (exit $ac_status); }; }; then
11163 echo "$as_me:11163: result: yes" >&5
11164 echo "${ECHO_T}yes" >&6
11166 echo "$as_me: failed program was:" >&5
11167 cat conftest.$ac_ext >&5
11168 echo "$as_me:11168: result: no" >&5
11169 echo "${ECHO_T}no" >&6
11170 LIBS="$cf_ncurses_SAVE"
11172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11175 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11177 cat >>confdefs.h <<EOF
11178 #define $cf_nculib_ROOT 1
11183 NCURSES_CONFIG=none
11188 echo "$as_me:11188: checking for X" >&5
11189 echo $ECHO_N "checking for X... $ECHO_C" >&6
11191 # Check whether --with-x or --without-x was given.
11192 if test "${with_x+set}" = set; then
11196 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11197 if test "x$with_x" = xno; then
11198 # The user explicitly disabled X.
11201 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11202 # Both variables are already set.
11205 if test "${ac_cv_have_x+set}" = set; then
11206 echo $ECHO_N "(cached) $ECHO_C" >&6
11208 # One or both of the vars are not set, and there is no cached value.
11209 ac_x_includes=no ac_x_libraries=no
11210 rm -fr conftest.dir
11211 if mkdir conftest.dir; then
11213 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11214 cat >Imakefile <<'EOF'
11216 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11218 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11219 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11220 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11221 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11222 for ac_extension in a so sl dylib dll; do
11223 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11224 test -f $ac_im_libdir/libX11.$ac_extension; then
11225 ac_im_usrlibdir=$ac_im_libdir; break
11228 # Screen out bogus values from the imake configuration. They are
11229 # bogus both because they are the default anyway, and because
11230 # using them would break gcc on systems where it needs fixed includes.
11231 case $ac_im_incroot in
11233 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11235 case $ac_im_usrlibdir in
11236 /usr/lib | /lib) ;;
11237 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11241 rm -fr conftest.dir
11244 # Standard set of common directories for X headers.
11245 # Check X11 before X11Rn because it is often a symlink to the current release.
11259 /usr/local/X11/include
11260 /usr/local/X11R7/include
11261 /usr/local/X11R6/include
11262 /usr/local/X11R5/include
11263 /usr/local/X11R4/include
11265 /usr/local/include/X11
11266 /usr/local/include/X11R7
11267 /usr/local/include/X11R6
11268 /usr/local/include/X11R5
11269 /usr/local/include/X11R4
11273 /usr/XFree86/include/X11
11277 /usr/unsupported/include
11278 /usr/athena/include
11279 /usr/local/x11r5/include
11280 /usr/lpp/Xamples/include
11282 /usr/openwin/include
11283 /usr/openwin/share/include'
11285 if test "$ac_x_includes" = no; then
11286 # Guess where to find include files, by looking for Intrinsic.h.
11287 # First, try using that file with no special directory specified.
11288 cat >conftest.$ac_ext <<_ACEOF
11289 #line 11289 "configure"
11290 #include "confdefs.h"
11291 #include <X11/Intrinsic.h>
11293 if { (eval echo "$as_me:11293: \"$ac_cpp conftest.$ac_ext\"") >&5
11294 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11296 egrep -v '^ *\+' conftest.er1 >conftest.err
11298 cat conftest.err >&5
11299 echo "$as_me:11299: \$? = $ac_status" >&5
11300 (exit $ac_status); } >/dev/null; then
11301 if test -s conftest.err; then
11302 ac_cpp_err=$ac_c_preproc_warn_flag
11309 if test -z "$ac_cpp_err"; then
11310 # We can compile using X headers with no special include directory.
11313 echo "$as_me: failed program was:" >&5
11314 cat conftest.$ac_ext >&5
11315 for ac_dir in $ac_x_header_dirs; do
11316 if test -r "$ac_dir/X11/Intrinsic.h"; then
11317 ac_x_includes=$ac_dir
11322 rm -f conftest.err conftest.$ac_ext
11323 fi # $ac_x_includes = no
11325 if test "$ac_x_libraries" = no; then
11326 # Check for the libraries.
11327 # See if we find them without any special options.
11328 # Don't add to $LIBS permanently.
11331 cat >conftest.$ac_ext <<_ACEOF
11332 #line 11332 "configure"
11333 #include "confdefs.h"
11334 #include <X11/Intrinsic.h>
11343 rm -f conftest.$ac_objext conftest$ac_exeext
11344 if { (eval echo "$as_me:11344: \"$ac_link\"") >&5
11345 (eval $ac_link) 2>&5
11347 echo "$as_me:11347: \$? = $ac_status" >&5
11348 (exit $ac_status); } &&
11349 { ac_try='test -s conftest$ac_exeext'
11350 { (eval echo "$as_me:11350: \"$ac_try\"") >&5
11351 (eval $ac_try) 2>&5
11353 echo "$as_me:11353: \$? = $ac_status" >&5
11354 (exit $ac_status); }; }; then
11356 # We can link X programs with no special library path.
11359 echo "$as_me: failed program was:" >&5
11360 cat conftest.$ac_ext >&5
11362 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11364 # Don't even attempt the hair of trying to link an X program!
11365 for ac_extension in a so sl dylib dll; do
11366 if test -r $ac_dir/libXt.$ac_extension; then
11367 ac_x_libraries=$ac_dir
11373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11374 fi # $ac_x_libraries = no
11376 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11377 # Didn't find X anywhere. Cache the known absence of X.
11378 ac_cv_have_x="have_x=no"
11380 # Record where we found X for the cache.
11381 ac_cv_have_x="have_x=yes \
11382 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11387 eval "$ac_cv_have_x"
11390 if test "$have_x" != yes; then
11391 echo "$as_me:11391: result: $have_x" >&5
11392 echo "${ECHO_T}$have_x" >&6
11395 # If each of the values was on the command line, it overrides each guess.
11396 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11397 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11398 # Update the cache value to reflect the command line values.
11399 ac_cv_have_x="have_x=yes \
11400 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11401 echo "$as_me:11401: result: libraries $x_libraries, headers $x_includes" >&5
11402 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11405 if test "$no_x" = yes; then
11406 # Not all programs may use this symbol, but it does not hurt to define it.
11408 cat >>confdefs.h <<\EOF
11409 #define X_DISPLAY_MISSING 1
11412 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11414 if test -n "$x_includes"; then
11415 X_CFLAGS="$X_CFLAGS -I$x_includes"
11418 # It would also be nice to do this for all -L options, not just this one.
11419 if test -n "$x_libraries"; then
11420 X_LIBS="$X_LIBS -L$x_libraries"
11421 # For Solaris; some versions of Sun CC require a space after -R and
11422 # others require no space. Words are not sufficient . . . .
11423 case `(uname -sr) 2>/dev/null` in
11425 echo "$as_me:11425: checking whether -R must be followed by a space" >&5
11426 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11427 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11428 cat >conftest.$ac_ext <<_ACEOF
11429 #line 11429 "configure"
11430 #include "confdefs.h"
11440 rm -f conftest.$ac_objext conftest$ac_exeext
11441 if { (eval echo "$as_me:11441: \"$ac_link\"") >&5
11442 (eval $ac_link) 2>&5
11444 echo "$as_me:11444: \$? = $ac_status" >&5
11445 (exit $ac_status); } &&
11446 { ac_try='test -s conftest$ac_exeext'
11447 { (eval echo "$as_me:11447: \"$ac_try\"") >&5
11448 (eval $ac_try) 2>&5
11450 echo "$as_me:11450: \$? = $ac_status" >&5
11451 (exit $ac_status); }; }; then
11454 echo "$as_me: failed program was:" >&5
11455 cat conftest.$ac_ext >&5
11458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11459 if test $ac_R_nospace = yes; then
11460 echo "$as_me:11460: result: no" >&5
11461 echo "${ECHO_T}no" >&6
11462 X_LIBS="$X_LIBS -R$x_libraries"
11464 LIBS="$ac_xsave_LIBS -R $x_libraries"
11465 cat >conftest.$ac_ext <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11477 rm -f conftest.$ac_objext conftest$ac_exeext
11478 if { (eval echo "$as_me:11478: \"$ac_link\"") >&5
11479 (eval $ac_link) 2>&5
11481 echo "$as_me:11481: \$? = $ac_status" >&5
11482 (exit $ac_status); } &&
11483 { ac_try='test -s conftest$ac_exeext'
11484 { (eval echo "$as_me:11484: \"$ac_try\"") >&5
11485 (eval $ac_try) 2>&5
11487 echo "$as_me:11487: \$? = $ac_status" >&5
11488 (exit $ac_status); }; }; then
11491 echo "$as_me: failed program was:" >&5
11492 cat conftest.$ac_ext >&5
11495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496 if test $ac_R_space = yes; then
11497 echo "$as_me:11497: result: yes" >&5
11498 echo "${ECHO_T}yes" >&6
11499 X_LIBS="$X_LIBS -R $x_libraries"
11501 echo "$as_me:11501: result: neither works" >&5
11502 echo "${ECHO_T}neither works" >&6
11505 LIBS=$ac_xsave_LIBS
11509 # Check for system-dependent libraries X programs must link with.
11510 # Do this before checking for the system-independent R6 libraries
11511 # (-lICE), since we may need -lsocket or whatever for X linking.
11513 if test "$ISC" = yes; then
11514 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11516 # Martyn Johnson says this is needed for Ultrix, if the X
11517 # libraries were built with DECnet support. And Karl Berry says
11518 # the Alpha needs dnet_stub (dnet does not exist).
11519 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11520 cat >conftest.$ac_ext <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11524 /* Override any gcc2 internal prototype to avoid an error. */
11528 /* We use char because int might match the return type of a gcc2
11529 builtin and then its argument prototype would still apply. */
11530 char XOpenDisplay ();
11539 rm -f conftest.$ac_objext conftest$ac_exeext
11540 if { (eval echo "$as_me:11540: \"$ac_link\"") >&5
11541 (eval $ac_link) 2>&5
11543 echo "$as_me:11543: \$? = $ac_status" >&5
11544 (exit $ac_status); } &&
11545 { ac_try='test -s conftest$ac_exeext'
11546 { (eval echo "$as_me:11546: \"$ac_try\"") >&5
11547 (eval $ac_try) 2>&5
11549 echo "$as_me:11549: \$? = $ac_status" >&5
11550 (exit $ac_status); }; }; then
11553 echo "$as_me: failed program was:" >&5
11554 cat conftest.$ac_ext >&5
11555 echo "$as_me:11555: checking for dnet_ntoa in -ldnet" >&5
11556 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11557 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11558 echo $ECHO_N "(cached) $ECHO_C" >&6
11560 ac_check_lib_save_LIBS=$LIBS
11561 LIBS="-ldnet $LIBS"
11562 cat >conftest.$ac_ext <<_ACEOF
11563 #line 11563 "configure"
11564 #include "confdefs.h"
11566 /* Override any gcc2 internal prototype to avoid an error. */
11570 /* We use char because int might match the return type of a gcc2
11571 builtin and then its argument prototype would still apply. */
11581 rm -f conftest.$ac_objext conftest$ac_exeext
11582 if { (eval echo "$as_me:11582: \"$ac_link\"") >&5
11583 (eval $ac_link) 2>&5
11585 echo "$as_me:11585: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
11587 { ac_try='test -s conftest$ac_exeext'
11588 { (eval echo "$as_me:11588: \"$ac_try\"") >&5
11589 (eval $ac_try) 2>&5
11591 echo "$as_me:11591: \$? = $ac_status" >&5
11592 (exit $ac_status); }; }; then
11593 ac_cv_lib_dnet_dnet_ntoa=yes
11595 echo "$as_me: failed program was:" >&5
11596 cat conftest.$ac_ext >&5
11597 ac_cv_lib_dnet_dnet_ntoa=no
11599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11600 LIBS=$ac_check_lib_save_LIBS
11602 echo "$as_me:11602: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11603 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11604 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11605 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11608 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11609 echo "$as_me:11609: checking for dnet_ntoa in -ldnet_stub" >&5
11610 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11611 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11612 echo $ECHO_N "(cached) $ECHO_C" >&6
11614 ac_check_lib_save_LIBS=$LIBS
11615 LIBS="-ldnet_stub $LIBS"
11616 cat >conftest.$ac_ext <<_ACEOF
11617 #line 11617 "configure"
11618 #include "confdefs.h"
11620 /* Override any gcc2 internal prototype to avoid an error. */
11624 /* We use char because int might match the return type of a gcc2
11625 builtin and then its argument prototype would still apply. */
11635 rm -f conftest.$ac_objext conftest$ac_exeext
11636 if { (eval echo "$as_me:11636: \"$ac_link\"") >&5
11637 (eval $ac_link) 2>&5
11639 echo "$as_me:11639: \$? = $ac_status" >&5
11640 (exit $ac_status); } &&
11641 { ac_try='test -s conftest$ac_exeext'
11642 { (eval echo "$as_me:11642: \"$ac_try\"") >&5
11643 (eval $ac_try) 2>&5
11645 echo "$as_me:11645: \$? = $ac_status" >&5
11646 (exit $ac_status); }; }; then
11647 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11649 echo "$as_me: failed program was:" >&5
11650 cat conftest.$ac_ext >&5
11651 ac_cv_lib_dnet_stub_dnet_ntoa=no
11653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11654 LIBS=$ac_check_lib_save_LIBS
11656 echo "$as_me:11656: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11657 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11658 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11659 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11665 LIBS="$ac_xsave_LIBS"
11667 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11668 # to get the SysV transport functions.
11669 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11671 # The nsl library prevents programs from opening the X display
11672 # on Irix 5.2, according to T.E. Dickey.
11673 # The functions gethostbyname, getservbyname, and inet_addr are
11674 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11675 echo "$as_me:11675: checking for gethostbyname" >&5
11676 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11677 if test "${ac_cv_func_gethostbyname+set}" = set; then
11678 echo $ECHO_N "(cached) $ECHO_C" >&6
11680 cat >conftest.$ac_ext <<_ACEOF
11681 #line 11681 "configure"
11682 #include "confdefs.h"
11683 #define gethostbyname autoconf_temporary
11684 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11685 #undef gethostbyname
11691 /* We use char because int might match the return type of a gcc2
11692 builtin and then its argument prototype would still apply. */
11693 char gethostbyname (void);
11699 /* The GNU C library defines stubs for functions which it implements
11700 to always fail with ENOSYS. Some functions are actually named
11701 something starting with __ and the normal name is an alias. */
11702 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11703 #error found stub for gethostbyname
11706 return gethostbyname ();
11711 rm -f conftest.$ac_objext conftest$ac_exeext
11712 if { (eval echo "$as_me:11712: \"$ac_link\"") >&5
11713 (eval $ac_link) 2>&5
11715 echo "$as_me:11715: \$? = $ac_status" >&5
11716 (exit $ac_status); } &&
11717 { ac_try='test -s conftest$ac_exeext'
11718 { (eval echo "$as_me:11718: \"$ac_try\"") >&5
11719 (eval $ac_try) 2>&5
11721 echo "$as_me:11721: \$? = $ac_status" >&5
11722 (exit $ac_status); }; }; then
11723 ac_cv_func_gethostbyname=yes
11725 echo "$as_me: failed program was:" >&5
11726 cat conftest.$ac_ext >&5
11727 ac_cv_func_gethostbyname=no
11729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11731 echo "$as_me:11731: result: $ac_cv_func_gethostbyname" >&5
11732 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11734 if test $ac_cv_func_gethostbyname = no; then
11735 echo "$as_me:11735: checking for gethostbyname in -lnsl" >&5
11736 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11737 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11738 echo $ECHO_N "(cached) $ECHO_C" >&6
11740 ac_check_lib_save_LIBS=$LIBS
11742 cat >conftest.$ac_ext <<_ACEOF
11743 #line 11743 "configure"
11744 #include "confdefs.h"
11746 /* Override any gcc2 internal prototype to avoid an error. */
11750 /* We use char because int might match the return type of a gcc2
11751 builtin and then its argument prototype would still apply. */
11752 char gethostbyname ();
11761 rm -f conftest.$ac_objext conftest$ac_exeext
11762 if { (eval echo "$as_me:11762: \"$ac_link\"") >&5
11763 (eval $ac_link) 2>&5
11765 echo "$as_me:11765: \$? = $ac_status" >&5
11766 (exit $ac_status); } &&
11767 { ac_try='test -s conftest$ac_exeext'
11768 { (eval echo "$as_me:11768: \"$ac_try\"") >&5
11769 (eval $ac_try) 2>&5
11771 echo "$as_me:11771: \$? = $ac_status" >&5
11772 (exit $ac_status); }; }; then
11773 ac_cv_lib_nsl_gethostbyname=yes
11775 echo "$as_me: failed program was:" >&5
11776 cat conftest.$ac_ext >&5
11777 ac_cv_lib_nsl_gethostbyname=no
11779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11780 LIBS=$ac_check_lib_save_LIBS
11782 echo "$as_me:11782: result: $ac_cv_lib_nsl_gethostbyname" >&5
11783 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11784 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11785 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11788 if test $ac_cv_lib_nsl_gethostbyname = no; then
11789 echo "$as_me:11789: checking for gethostbyname in -lbsd" >&5
11790 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11791 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11792 echo $ECHO_N "(cached) $ECHO_C" >&6
11794 ac_check_lib_save_LIBS=$LIBS
11796 cat >conftest.$ac_ext <<_ACEOF
11797 #line 11797 "configure"
11798 #include "confdefs.h"
11800 /* Override any gcc2 internal prototype to avoid an error. */
11804 /* We use char because int might match the return type of a gcc2
11805 builtin and then its argument prototype would still apply. */
11806 char gethostbyname ();
11815 rm -f conftest.$ac_objext conftest$ac_exeext
11816 if { (eval echo "$as_me:11816: \"$ac_link\"") >&5
11817 (eval $ac_link) 2>&5
11819 echo "$as_me:11819: \$? = $ac_status" >&5
11820 (exit $ac_status); } &&
11821 { ac_try='test -s conftest$ac_exeext'
11822 { (eval echo "$as_me:11822: \"$ac_try\"") >&5
11823 (eval $ac_try) 2>&5
11825 echo "$as_me:11825: \$? = $ac_status" >&5
11826 (exit $ac_status); }; }; then
11827 ac_cv_lib_bsd_gethostbyname=yes
11829 echo "$as_me: failed program was:" >&5
11830 cat conftest.$ac_ext >&5
11831 ac_cv_lib_bsd_gethostbyname=no
11833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11834 LIBS=$ac_check_lib_save_LIBS
11836 echo "$as_me:11836: result: $ac_cv_lib_bsd_gethostbyname" >&5
11837 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11838 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11839 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11845 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11846 # socket/setsockopt and other routines are undefined under SCO ODT
11847 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11848 # on later versions), says Simon Leinen: it contains gethostby*
11849 # variants that don't use the nameserver (or something). -lsocket
11850 # must be given before -lnsl if both are needed. We assume that
11851 # if connect needs -lnsl, so does gethostbyname.
11852 echo "$as_me:11852: checking for connect" >&5
11853 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11854 if test "${ac_cv_func_connect+set}" = set; then
11855 echo $ECHO_N "(cached) $ECHO_C" >&6
11857 cat >conftest.$ac_ext <<_ACEOF
11858 #line 11858 "configure"
11859 #include "confdefs.h"
11860 #define connect autoconf_temporary
11861 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11868 /* We use char because int might match the return type of a gcc2
11869 builtin and then its argument prototype would still apply. */
11870 char connect (void);
11876 /* The GNU C library defines stubs for functions which it implements
11877 to always fail with ENOSYS. Some functions are actually named
11878 something starting with __ and the normal name is an alias. */
11879 #if defined (__stub_connect) || defined (__stub___connect)
11880 #error found stub for connect
11888 rm -f conftest.$ac_objext conftest$ac_exeext
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890 (eval $ac_link) 2>&5
11892 echo "$as_me:11892: \$? = $ac_status" >&5
11893 (exit $ac_status); } &&
11894 { ac_try='test -s conftest$ac_exeext'
11895 { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896 (eval $ac_try) 2>&5
11898 echo "$as_me:11898: \$? = $ac_status" >&5
11899 (exit $ac_status); }; }; then
11900 ac_cv_func_connect=yes
11902 echo "$as_me: failed program was:" >&5
11903 cat conftest.$ac_ext >&5
11904 ac_cv_func_connect=no
11906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11908 echo "$as_me:11908: result: $ac_cv_func_connect" >&5
11909 echo "${ECHO_T}$ac_cv_func_connect" >&6
11911 if test $ac_cv_func_connect = no; then
11912 echo "$as_me:11912: checking for connect in -lsocket" >&5
11913 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11914 if test "${ac_cv_lib_socket_connect+set}" = set; then
11915 echo $ECHO_N "(cached) $ECHO_C" >&6
11917 ac_check_lib_save_LIBS=$LIBS
11918 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11919 cat >conftest.$ac_ext <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11923 /* Override any gcc2 internal prototype to avoid an error. */
11927 /* We use char because int might match the return type of a gcc2
11928 builtin and then its argument prototype would still apply. */
11938 rm -f conftest.$ac_objext conftest$ac_exeext
11939 if { (eval echo "$as_me:11939: \"$ac_link\"") >&5
11940 (eval $ac_link) 2>&5
11942 echo "$as_me:11942: \$? = $ac_status" >&5
11943 (exit $ac_status); } &&
11944 { ac_try='test -s conftest$ac_exeext'
11945 { (eval echo "$as_me:11945: \"$ac_try\"") >&5
11946 (eval $ac_try) 2>&5
11948 echo "$as_me:11948: \$? = $ac_status" >&5
11949 (exit $ac_status); }; }; then
11950 ac_cv_lib_socket_connect=yes
11952 echo "$as_me: failed program was:" >&5
11953 cat conftest.$ac_ext >&5
11954 ac_cv_lib_socket_connect=no
11956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11957 LIBS=$ac_check_lib_save_LIBS
11959 echo "$as_me:11959: result: $ac_cv_lib_socket_connect" >&5
11960 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11961 if test $ac_cv_lib_socket_connect = yes; then
11962 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11967 # Guillermo Gomez says -lposix is necessary on A/UX.
11968 echo "$as_me:11968: checking for remove" >&5
11969 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11970 if test "${ac_cv_func_remove+set}" = set; then
11971 echo $ECHO_N "(cached) $ECHO_C" >&6
11973 cat >conftest.$ac_ext <<_ACEOF
11974 #line 11974 "configure"
11975 #include "confdefs.h"
11976 #define remove autoconf_temporary
11977 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11984 /* We use char because int might match the return type of a gcc2
11985 builtin and then its argument prototype would still apply. */
11986 char remove (void);
11992 /* The GNU C library defines stubs for functions which it implements
11993 to always fail with ENOSYS. Some functions are actually named
11994 something starting with __ and the normal name is an alias. */
11995 #if defined (__stub_remove) || defined (__stub___remove)
11996 #error found stub for remove
12004 rm -f conftest.$ac_objext conftest$ac_exeext
12005 if { (eval echo "$as_me:12005: \"$ac_link\"") >&5
12006 (eval $ac_link) 2>&5
12008 echo "$as_me:12008: \$? = $ac_status" >&5
12009 (exit $ac_status); } &&
12010 { ac_try='test -s conftest$ac_exeext'
12011 { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12014 echo "$as_me:12014: \$? = $ac_status" >&5
12015 (exit $ac_status); }; }; then
12016 ac_cv_func_remove=yes
12018 echo "$as_me: failed program was:" >&5
12019 cat conftest.$ac_ext >&5
12020 ac_cv_func_remove=no
12022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12024 echo "$as_me:12024: result: $ac_cv_func_remove" >&5
12025 echo "${ECHO_T}$ac_cv_func_remove" >&6
12027 if test $ac_cv_func_remove = no; then
12028 echo "$as_me:12028: checking for remove in -lposix" >&5
12029 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12030 if test "${ac_cv_lib_posix_remove+set}" = set; then
12031 echo $ECHO_N "(cached) $ECHO_C" >&6
12033 ac_check_lib_save_LIBS=$LIBS
12034 LIBS="-lposix $LIBS"
12035 cat >conftest.$ac_ext <<_ACEOF
12036 #line 12036 "configure"
12037 #include "confdefs.h"
12039 /* Override any gcc2 internal prototype to avoid an error. */
12043 /* We use char because int might match the return type of a gcc2
12044 builtin and then its argument prototype would still apply. */
12054 rm -f conftest.$ac_objext conftest$ac_exeext
12055 if { (eval echo "$as_me:12055: \"$ac_link\"") >&5
12056 (eval $ac_link) 2>&5
12058 echo "$as_me:12058: \$? = $ac_status" >&5
12059 (exit $ac_status); } &&
12060 { ac_try='test -s conftest$ac_exeext'
12061 { (eval echo "$as_me:12061: \"$ac_try\"") >&5
12062 (eval $ac_try) 2>&5
12064 echo "$as_me:12064: \$? = $ac_status" >&5
12065 (exit $ac_status); }; }; then
12066 ac_cv_lib_posix_remove=yes
12068 echo "$as_me: failed program was:" >&5
12069 cat conftest.$ac_ext >&5
12070 ac_cv_lib_posix_remove=no
12072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12073 LIBS=$ac_check_lib_save_LIBS
12075 echo "$as_me:12075: result: $ac_cv_lib_posix_remove" >&5
12076 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12077 if test $ac_cv_lib_posix_remove = yes; then
12078 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12083 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12084 echo "$as_me:12084: checking for shmat" >&5
12085 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12086 if test "${ac_cv_func_shmat+set}" = set; then
12087 echo $ECHO_N "(cached) $ECHO_C" >&6
12089 cat >conftest.$ac_ext <<_ACEOF
12090 #line 12090 "configure"
12091 #include "confdefs.h"
12092 #define shmat autoconf_temporary
12093 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12100 /* We use char because int might match the return type of a gcc2
12101 builtin and then its argument prototype would still apply. */
12108 /* The GNU C library defines stubs for functions which it implements
12109 to always fail with ENOSYS. Some functions are actually named
12110 something starting with __ and the normal name is an alias. */
12111 #if defined (__stub_shmat) || defined (__stub___shmat)
12112 #error found stub for shmat
12120 rm -f conftest.$ac_objext conftest$ac_exeext
12121 if { (eval echo "$as_me:12121: \"$ac_link\"") >&5
12122 (eval $ac_link) 2>&5
12124 echo "$as_me:12124: \$? = $ac_status" >&5
12125 (exit $ac_status); } &&
12126 { ac_try='test -s conftest$ac_exeext'
12127 { (eval echo "$as_me:12127: \"$ac_try\"") >&5
12128 (eval $ac_try) 2>&5
12130 echo "$as_me:12130: \$? = $ac_status" >&5
12131 (exit $ac_status); }; }; then
12132 ac_cv_func_shmat=yes
12134 echo "$as_me: failed program was:" >&5
12135 cat conftest.$ac_ext >&5
12136 ac_cv_func_shmat=no
12138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12140 echo "$as_me:12140: result: $ac_cv_func_shmat" >&5
12141 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12143 if test $ac_cv_func_shmat = no; then
12144 echo "$as_me:12144: checking for shmat in -lipc" >&5
12145 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12146 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12147 echo $ECHO_N "(cached) $ECHO_C" >&6
12149 ac_check_lib_save_LIBS=$LIBS
12151 cat >conftest.$ac_ext <<_ACEOF
12152 #line 12152 "configure"
12153 #include "confdefs.h"
12155 /* Override any gcc2 internal prototype to avoid an error. */
12159 /* We use char because int might match the return type of a gcc2
12160 builtin and then its argument prototype would still apply. */
12170 rm -f conftest.$ac_objext conftest$ac_exeext
12171 if { (eval echo "$as_me:12171: \"$ac_link\"") >&5
12172 (eval $ac_link) 2>&5
12174 echo "$as_me:12174: \$? = $ac_status" >&5
12175 (exit $ac_status); } &&
12176 { ac_try='test -s conftest$ac_exeext'
12177 { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178 (eval $ac_try) 2>&5
12180 echo "$as_me:12180: \$? = $ac_status" >&5
12181 (exit $ac_status); }; }; then
12182 ac_cv_lib_ipc_shmat=yes
12184 echo "$as_me: failed program was:" >&5
12185 cat conftest.$ac_ext >&5
12186 ac_cv_lib_ipc_shmat=no
12188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12189 LIBS=$ac_check_lib_save_LIBS
12191 echo "$as_me:12191: result: $ac_cv_lib_ipc_shmat" >&5
12192 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12193 if test $ac_cv_lib_ipc_shmat = yes; then
12194 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12200 # Check for libraries that X11R6 Xt/Xaw programs need.
12201 ac_save_LDFLAGS=$LDFLAGS
12202 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12203 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12204 # check for ICE first), but we must link in the order -lSM -lICE or
12205 # we get undefined symbols. So assume we have SM if we have ICE.
12206 # These have to be linked with before -lX11, unlike the other
12207 # libraries we check for below, so use a different variable.
12208 # John Interrante, Karl Berry
12209 echo "$as_me:12209: checking for IceConnectionNumber in -lICE" >&5
12210 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12211 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12212 echo $ECHO_N "(cached) $ECHO_C" >&6
12214 ac_check_lib_save_LIBS=$LIBS
12215 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12216 cat >conftest.$ac_ext <<_ACEOF
12217 #line 12217 "configure"
12218 #include "confdefs.h"
12220 /* Override any gcc2 internal prototype to avoid an error. */
12224 /* We use char because int might match the return type of a gcc2
12225 builtin and then its argument prototype would still apply. */
12226 char IceConnectionNumber ();
12230 IceConnectionNumber ();
12235 rm -f conftest.$ac_objext conftest$ac_exeext
12236 if { (eval echo "$as_me:12236: \"$ac_link\"") >&5
12237 (eval $ac_link) 2>&5
12239 echo "$as_me:12239: \$? = $ac_status" >&5
12240 (exit $ac_status); } &&
12241 { ac_try='test -s conftest$ac_exeext'
12242 { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243 (eval $ac_try) 2>&5
12245 echo "$as_me:12245: \$? = $ac_status" >&5
12246 (exit $ac_status); }; }; then
12247 ac_cv_lib_ICE_IceConnectionNumber=yes
12249 echo "$as_me: failed program was:" >&5
12250 cat conftest.$ac_ext >&5
12251 ac_cv_lib_ICE_IceConnectionNumber=no
12253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12254 LIBS=$ac_check_lib_save_LIBS
12256 echo "$as_me:12256: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12257 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12258 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12259 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12262 LDFLAGS=$ac_save_LDFLAGS
12266 cf_x_athena=${cf_x_athena:-Xaw}
12268 echo "$as_me:12268: checking if you want to link with Xaw 3d library" >&5
12269 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12272 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12273 if test "${with_Xaw3d+set}" = set; then
12274 withval="$with_Xaw3d"
12277 if test "$withval" = yes ; then
12279 echo "$as_me:12279: result: yes" >&5
12280 echo "${ECHO_T}yes" >&6
12282 echo "$as_me:12282: result: no" >&5
12283 echo "${ECHO_T}no" >&6
12286 echo "$as_me:12286: checking if you want to link with Xaw 3d xft library" >&5
12287 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12290 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12291 if test "${with_Xaw3dxft+set}" = set; then
12292 withval="$with_Xaw3dxft"
12295 if test "$withval" = yes ; then
12296 cf_x_athena=Xaw3dxft
12297 echo "$as_me:12297: result: yes" >&5
12298 echo "${ECHO_T}yes" >&6
12300 echo "$as_me:12300: result: no" >&5
12301 echo "${ECHO_T}no" >&6
12304 echo "$as_me:12304: checking if you want to link with neXT Athena library" >&5
12305 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12308 # Check whether --with-neXtaw or --without-neXtaw was given.
12309 if test "${with_neXtaw+set}" = set; then
12310 withval="$with_neXtaw"
12313 if test "$withval" = yes ; then
12315 echo "$as_me:12315: result: yes" >&5
12316 echo "${ECHO_T}yes" >&6
12318 echo "$as_me:12318: result: no" >&5
12319 echo "${ECHO_T}no" >&6
12322 echo "$as_me:12322: checking if you want to link with Athena-Plus library" >&5
12323 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12326 # Check whether --with-XawPlus or --without-XawPlus was given.
12327 if test "${with_XawPlus+set}" = set; then
12328 withval="$with_XawPlus"
12331 if test "$withval" = yes ; then
12332 cf_x_athena=XawPlus
12333 echo "$as_me:12333: result: yes" >&5
12334 echo "${ECHO_T}yes" >&6
12336 echo "$as_me:12336: result: no" >&5
12337 echo "${ECHO_T}no" >&6
12342 if test "$PKG_CONFIG" != none ; then
12344 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12345 for cf_athena_pkg in \
12348 ${cf_x_athena}-devel \
12349 lib${cf_x_athena} \
12350 lib${cf_x_athena}-devel
12353 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12354 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12356 echo "${as_me:-configure}:12356: testing found package $cf_athena_pkg ..." 1>&5
12358 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12359 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12360 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12362 echo "${as_me:-configure}:12362: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12364 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12366 echo "${as_me:-configure}:12366: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12371 cf_new_extra_cppflags=
12373 for cf_add_cflags in $cf_pkgconfig_incs
12375 case $cf_fix_cppflags in
12377 case $cf_add_cflags in
12378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12379 case $cf_add_cflags in
12381 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12384 && test -z "${cf_tst_cflags}" \
12385 && cf_fix_cppflags=yes
12387 if test $cf_fix_cppflags = yes ; then
12389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12393 elif test "${cf_tst_cflags}" = "\"'" ; then
12395 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12396 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12402 case "$CPPFLAGS" in
12406 case $cf_add_cflags in
12408 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12410 CPPFLAGS=`echo "$CPPFLAGS" | \
12411 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12412 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12417 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12418 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12425 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12426 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12433 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12434 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12436 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12438 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12439 && test -z "${cf_tst_cflags}" \
12440 && cf_fix_cppflags=no
12445 if test -n "$cf_new_cflags" ; then
12447 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12448 CFLAGS="${CFLAGS}$cf_new_cflags"
12452 if test -n "$cf_new_cppflags" ; then
12454 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12455 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12459 if test -n "$cf_new_extra_cppflags" ; then
12461 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12462 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12466 cf_add_libs="$cf_pkgconfig_libs"
12467 # Filter out duplicates - this happens with badly-designed ".pc" files...
12468 for cf_add_1lib in $LIBS
12470 for cf_add_2lib in $cf_add_libs
12472 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12478 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12480 LIBS="$cf_add_libs"
12482 cf_x_athena_lib="$cf_pkgconfig_libs"
12484 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12486 cat >>confdefs.h <<EOF
12487 #define $cf_x_athena_LIBS 1
12490 for cf_trim_lib in Xmu Xt X11
12493 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12494 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12495 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12497 echo "${as_me:-configure}:12497: testing ..trimmed $LIBS ..." 1>&5
12503 echo "$as_me:12503: checking for usable $cf_x_athena/Xmu package" >&5
12504 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12505 if test "${cf_cv_xaw_compat+set}" = set; then
12506 echo $ECHO_N "(cached) $ECHO_C" >&6
12509 cat >conftest.$ac_ext <<_ACEOF
12510 #line 12510 "configure"
12511 #include "confdefs.h"
12513 #include <X11/Xmu/CharSet.h>
12519 int check = XmuCompareISOLatin1("big", "small")
12525 rm -f conftest.$ac_objext conftest$ac_exeext
12526 if { (eval echo "$as_me:12526: \"$ac_link\"") >&5
12527 (eval $ac_link) 2>&5
12529 echo "$as_me:12529: \$? = $ac_status" >&5
12530 (exit $ac_status); } &&
12531 { ac_try='test -s conftest$ac_exeext'
12532 { (eval echo "$as_me:12532: \"$ac_try\"") >&5
12533 (eval $ac_try) 2>&5
12535 echo "$as_me:12535: \$? = $ac_status" >&5
12536 (exit $ac_status); }; }; then
12537 cf_cv_xaw_compat=yes
12539 echo "$as_me: failed program was:" >&5
12540 cat conftest.$ac_ext >&5
12541 cf_cv_xaw_compat=no
12543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12545 echo "$as_me:12545: result: $cf_cv_xaw_compat" >&5
12546 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12548 if test "$cf_cv_xaw_compat" = no
12550 # workaround for broken ".pc" files...
12551 case "$cf_x_athena_lib" in
12555 test -n "$verbose" && echo " work around broken package" 1>&6
12557 echo "${as_me:-configure}:12557: testing work around broken package ..." 1>&5
12559 cf_save_xmu="$LIBS"
12560 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12562 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12563 test -n "$verbose" && echo " found package xmu" 1>&6
12565 echo "${as_me:-configure}:12565: testing found package xmu ..." 1>&5
12567 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12568 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12569 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12571 echo "${as_me:-configure}:12571: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12573 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12575 echo "${as_me:-configure}:12575: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12580 cf_new_extra_cppflags=
12582 for cf_add_cflags in $cf_pkgconfig_incs
12584 case $cf_fix_cppflags in
12586 case $cf_add_cflags in
12587 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12588 case $cf_add_cflags in
12590 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12592 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12593 && test -z "${cf_tst_cflags}" \
12594 && cf_fix_cppflags=yes
12596 if test $cf_fix_cppflags = yes ; then
12598 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12599 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12602 elif test "${cf_tst_cflags}" = "\"'" ; then
12604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12611 case "$CPPFLAGS" in
12615 case $cf_add_cflags in
12617 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12619 CPPFLAGS=`echo "$CPPFLAGS" | \
12620 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12621 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12626 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12627 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12634 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12635 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12645 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12647 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12648 && test -z "${cf_tst_cflags}" \
12649 && cf_fix_cppflags=no
12654 if test -n "$cf_new_cflags" ; then
12656 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12657 CFLAGS="${CFLAGS}$cf_new_cflags"
12661 if test -n "$cf_new_cppflags" ; then
12663 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12664 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12668 if test -n "$cf_new_extra_cppflags" ; then
12670 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12671 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12675 cf_add_libs="$cf_pkgconfig_libs"
12676 # Filter out duplicates - this happens with badly-designed ".pc" files...
12677 for cf_add_1lib in $LIBS
12679 for cf_add_2lib in $cf_add_libs
12681 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12687 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12689 LIBS="$cf_add_libs"
12691 LIBS="$cf_save_xmu"
12693 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12695 echo "${as_me:-configure}:12695: testing ...before $LIBS ..." 1>&5
12697 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12698 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12700 echo "${as_me:-configure}:12700: testing ...after $LIBS ..." 1>&5
12706 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12708 echo "${as_me:-configure}:12708: testing ...before $LIBS ..." 1>&5
12710 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12711 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12713 echo "${as_me:-configure}:12713: testing ...after $LIBS ..." 1>&5
12717 for cf_trim_lib in Xmu Xt X11
12720 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12721 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12722 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12724 echo "${as_me:-configure}:12724: testing ..trimmed $LIBS ..." 1>&5
12744 if test -z "$cf_x_athena_lib" ; then
12746 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12747 test -n "$verbose" && echo " found package Xext" 1>&6
12749 echo "${as_me:-configure}:12749: testing found package Xext ..." 1>&5
12751 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12752 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12753 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12755 echo "${as_me:-configure}:12755: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12757 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12759 echo "${as_me:-configure}:12759: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12764 cf_new_extra_cppflags=
12766 for cf_add_cflags in $cf_pkgconfig_incs
12768 case $cf_fix_cppflags in
12770 case $cf_add_cflags in
12771 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12772 case $cf_add_cflags in
12774 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12776 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12777 && test -z "${cf_tst_cflags}" \
12778 && cf_fix_cppflags=yes
12780 if test $cf_fix_cppflags = yes ; then
12782 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12783 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12786 elif test "${cf_tst_cflags}" = "\"'" ; then
12788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12795 case "$CPPFLAGS" in
12799 case $cf_add_cflags in
12801 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12803 CPPFLAGS=`echo "$CPPFLAGS" | \
12804 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12805 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12810 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12811 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12818 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12819 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12826 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12827 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12829 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12831 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12832 && test -z "${cf_tst_cflags}" \
12833 && cf_fix_cppflags=no
12838 if test -n "$cf_new_cflags" ; then
12840 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12841 CFLAGS="${CFLAGS}$cf_new_cflags"
12845 if test -n "$cf_new_cppflags" ; then
12847 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12848 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12852 if test -n "$cf_new_extra_cppflags" ; then
12854 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12855 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12859 cf_add_libs="$cf_pkgconfig_libs"
12860 # Filter out duplicates - this happens with badly-designed ".pc" files...
12861 for cf_add_1lib in $LIBS
12863 for cf_add_2lib in $cf_add_libs
12865 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12871 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12873 LIBS="$cf_add_libs"
12880 echo "$as_me:12880: checking for XextCreateExtension in -lXext" >&5
12881 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12882 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12883 echo $ECHO_N "(cached) $ECHO_C" >&6
12885 ac_check_lib_save_LIBS=$LIBS
12886 LIBS="-lXext $LIBS"
12887 cat >conftest.$ac_ext <<_ACEOF
12888 #line 12888 "configure"
12889 #include "confdefs.h"
12891 /* Override any gcc2 internal prototype to avoid an error. */
12895 /* We use char because int might match the return type of a gcc2
12896 builtin and then its argument prototype would still apply. */
12897 char XextCreateExtension ();
12901 XextCreateExtension ();
12906 rm -f conftest.$ac_objext conftest$ac_exeext
12907 if { (eval echo "$as_me:12907: \"$ac_link\"") >&5
12908 (eval $ac_link) 2>&5
12910 echo "$as_me:12910: \$? = $ac_status" >&5
12911 (exit $ac_status); } &&
12912 { ac_try='test -s conftest$ac_exeext'
12913 { (eval echo "$as_me:12913: \"$ac_try\"") >&5
12914 (eval $ac_try) 2>&5
12916 echo "$as_me:12916: \$? = $ac_status" >&5
12917 (exit $ac_status); }; }; then
12918 ac_cv_lib_Xext_XextCreateExtension=yes
12920 echo "$as_me: failed program was:" >&5
12921 cat conftest.$ac_ext >&5
12922 ac_cv_lib_Xext_XextCreateExtension=no
12924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12925 LIBS=$ac_check_lib_save_LIBS
12927 echo "$as_me:12927: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12928 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12929 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12931 cf_add_libs="-lXext"
12932 # Filter out duplicates - this happens with badly-designed ".pc" files...
12933 for cf_add_1lib in $LIBS
12935 for cf_add_2lib in $cf_add_libs
12937 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12943 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12945 LIBS="$cf_add_libs"
12951 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
12952 # in some cases has installed dummy files in the former, other cases replaced
12953 # it with a link to the new location). This complicates the configure script.
12954 # Check for that pitfall, and recover using pkg-config
12956 # If none of these are set, the configuration is almost certainly broken.
12957 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12960 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12961 test -n "$verbose" && echo " found package x11" 1>&6
12963 echo "${as_me:-configure}:12963: testing found package x11 ..." 1>&5
12965 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12966 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12967 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12969 echo "${as_me:-configure}:12969: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12971 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12973 echo "${as_me:-configure}:12973: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12978 cf_new_extra_cppflags=
12980 for cf_add_cflags in $cf_pkgconfig_incs
12982 case $cf_fix_cppflags in
12984 case $cf_add_cflags in
12985 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12986 case $cf_add_cflags in
12988 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12990 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12991 && test -z "${cf_tst_cflags}" \
12992 && cf_fix_cppflags=yes
12994 if test $cf_fix_cppflags = yes ; then
12996 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12997 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13000 elif test "${cf_tst_cflags}" = "\"'" ; then
13002 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13003 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13009 case "$CPPFLAGS" in
13013 case $cf_add_cflags in
13015 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13017 CPPFLAGS=`echo "$CPPFLAGS" | \
13018 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13019 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13024 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13025 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13032 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13033 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13040 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13041 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13043 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13045 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13046 && test -z "${cf_tst_cflags}" \
13047 && cf_fix_cppflags=no
13052 if test -n "$cf_new_cflags" ; then
13054 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13055 CFLAGS="${CFLAGS}$cf_new_cflags"
13059 if test -n "$cf_new_cppflags" ; then
13061 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13062 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13066 if test -n "$cf_new_extra_cppflags" ; then
13068 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13069 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13073 cf_add_libs="$cf_pkgconfig_libs"
13074 # Filter out duplicates - this happens with badly-designed ".pc" files...
13075 for cf_add_1lib in $LIBS
13077 for cf_add_2lib in $cf_add_libs
13079 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13085 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13087 LIBS="$cf_add_libs"
13093 { echo "$as_me:13093: WARNING: unable to find X11 library" >&5
13094 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13097 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13098 test -n "$verbose" && echo " found package ice" 1>&6
13100 echo "${as_me:-configure}:13100: testing found package ice ..." 1>&5
13102 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13103 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13104 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13106 echo "${as_me:-configure}:13106: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13108 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13110 echo "${as_me:-configure}:13110: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13115 cf_new_extra_cppflags=
13117 for cf_add_cflags in $cf_pkgconfig_incs
13119 case $cf_fix_cppflags in
13121 case $cf_add_cflags in
13122 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13123 case $cf_add_cflags in
13125 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13128 && test -z "${cf_tst_cflags}" \
13129 && cf_fix_cppflags=yes
13131 if test $cf_fix_cppflags = yes ; then
13133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13137 elif test "${cf_tst_cflags}" = "\"'" ; then
13139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13146 case "$CPPFLAGS" in
13150 case $cf_add_cflags in
13152 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13154 CPPFLAGS=`echo "$CPPFLAGS" | \
13155 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13156 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13161 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13162 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13169 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13170 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13180 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13183 && test -z "${cf_tst_cflags}" \
13184 && cf_fix_cppflags=no
13189 if test -n "$cf_new_cflags" ; then
13191 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13192 CFLAGS="${CFLAGS}$cf_new_cflags"
13196 if test -n "$cf_new_cppflags" ; then
13198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13199 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13203 if test -n "$cf_new_extra_cppflags" ; then
13205 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13206 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13210 cf_add_libs="$cf_pkgconfig_libs"
13211 # Filter out duplicates - this happens with badly-designed ".pc" files...
13212 for cf_add_1lib in $LIBS
13214 for cf_add_2lib in $cf_add_libs
13216 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13224 LIBS="$cf_add_libs"
13230 { echo "$as_me:13230: WARNING: unable to find ICE library" >&5
13231 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13234 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13235 test -n "$verbose" && echo " found package sm" 1>&6
13237 echo "${as_me:-configure}:13237: testing found package sm ..." 1>&5
13239 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13240 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13241 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13243 echo "${as_me:-configure}:13243: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13245 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13247 echo "${as_me:-configure}:13247: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13252 cf_new_extra_cppflags=
13254 for cf_add_cflags in $cf_pkgconfig_incs
13256 case $cf_fix_cppflags in
13258 case $cf_add_cflags in
13259 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13260 case $cf_add_cflags in
13262 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13264 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13265 && test -z "${cf_tst_cflags}" \
13266 && cf_fix_cppflags=yes
13268 if test $cf_fix_cppflags = yes ; then
13270 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13271 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13274 elif test "${cf_tst_cflags}" = "\"'" ; then
13276 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13277 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13283 case "$CPPFLAGS" in
13287 case $cf_add_cflags in
13289 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13291 CPPFLAGS=`echo "$CPPFLAGS" | \
13292 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13293 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13298 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13299 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13306 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13307 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13314 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13315 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13317 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13319 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13320 && test -z "${cf_tst_cflags}" \
13321 && cf_fix_cppflags=no
13326 if test -n "$cf_new_cflags" ; then
13328 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13329 CFLAGS="${CFLAGS}$cf_new_cflags"
13333 if test -n "$cf_new_cppflags" ; then
13335 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13336 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13340 if test -n "$cf_new_extra_cppflags" ; then
13342 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13343 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13347 cf_add_libs="$cf_pkgconfig_libs"
13348 # Filter out duplicates - this happens with badly-designed ".pc" files...
13349 for cf_add_1lib in $LIBS
13351 for cf_add_2lib in $cf_add_libs
13353 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13359 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13361 LIBS="$cf_add_libs"
13367 { echo "$as_me:13367: WARNING: unable to find SM library" >&5
13368 echo "$as_me: WARNING: unable to find SM library" >&2;}
13371 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13372 test -n "$verbose" && echo " found package xt" 1>&6
13374 echo "${as_me:-configure}:13374: testing found package xt ..." 1>&5
13376 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13377 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13378 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13380 echo "${as_me:-configure}:13380: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13382 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13384 echo "${as_me:-configure}:13384: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13389 cf_new_extra_cppflags=
13391 for cf_add_cflags in $cf_pkgconfig_incs
13393 case $cf_fix_cppflags in
13395 case $cf_add_cflags in
13396 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13397 case $cf_add_cflags in
13399 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13401 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13402 && test -z "${cf_tst_cflags}" \
13403 && cf_fix_cppflags=yes
13405 if test $cf_fix_cppflags = yes ; then
13407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13411 elif test "${cf_tst_cflags}" = "\"'" ; then
13413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13420 case "$CPPFLAGS" in
13424 case $cf_add_cflags in
13426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13428 CPPFLAGS=`echo "$CPPFLAGS" | \
13429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13435 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13436 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13443 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13444 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13454 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13456 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13457 && test -z "${cf_tst_cflags}" \
13458 && cf_fix_cppflags=no
13463 if test -n "$cf_new_cflags" ; then
13465 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13466 CFLAGS="${CFLAGS}$cf_new_cflags"
13470 if test -n "$cf_new_cppflags" ; then
13472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13473 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13477 if test -n "$cf_new_extra_cppflags" ; then
13479 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13480 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13484 cf_add_libs="$cf_pkgconfig_libs"
13485 # Filter out duplicates - this happens with badly-designed ".pc" files...
13486 for cf_add_1lib in $LIBS
13488 for cf_add_2lib in $cf_add_libs
13490 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13496 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13498 LIBS="$cf_add_libs"
13504 { echo "$as_me:13504: WARNING: unable to find Xt library" >&5
13505 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13512 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13513 test -n "$verbose" && echo " found package xt" 1>&6
13515 echo "${as_me:-configure}:13515: testing found package xt ..." 1>&5
13517 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13518 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13519 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13521 echo "${as_me:-configure}:13521: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13523 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13525 echo "${as_me:-configure}:13525: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13530 cf_new_extra_cppflags=
13532 for cf_add_cflags in $cf_pkgconfig_incs
13534 case $cf_fix_cppflags in
13536 case $cf_add_cflags in
13537 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13538 case $cf_add_cflags in
13540 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13543 && test -z "${cf_tst_cflags}" \
13544 && cf_fix_cppflags=yes
13546 if test $cf_fix_cppflags = yes ; then
13548 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13549 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13552 elif test "${cf_tst_cflags}" = "\"'" ; then
13554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13561 case "$CPPFLAGS" in
13565 case $cf_add_cflags in
13567 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13569 CPPFLAGS=`echo "$CPPFLAGS" | \
13570 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13571 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13576 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13577 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13584 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13585 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13595 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13598 && test -z "${cf_tst_cflags}" \
13599 && cf_fix_cppflags=no
13604 if test -n "$cf_new_cflags" ; then
13606 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13607 CFLAGS="${CFLAGS}$cf_new_cflags"
13611 if test -n "$cf_new_cppflags" ; then
13613 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13614 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13618 if test -n "$cf_new_extra_cppflags" ; then
13620 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13621 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13625 cf_add_libs="$cf_pkgconfig_libs"
13626 # Filter out duplicates - this happens with badly-designed ".pc" files...
13627 for cf_add_1lib in $LIBS
13629 for cf_add_2lib in $cf_add_libs
13631 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13637 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13639 LIBS="$cf_add_libs"
13645 # we have an "xt" package, but it may omit Xt's dependency on X11
13646 echo "$as_me:13646: checking for usable X dependency" >&5
13647 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13648 if test "${cf_cv_xt_x11_compat+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
13652 cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13656 #include <X11/Xlib.h>
13662 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13663 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13664 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13665 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13671 rm -f conftest.$ac_objext conftest$ac_exeext
13672 if { (eval echo "$as_me:13672: \"$ac_link\"") >&5
13673 (eval $ac_link) 2>&5
13675 echo "$as_me:13675: \$? = $ac_status" >&5
13676 (exit $ac_status); } &&
13677 { ac_try='test -s conftest$ac_exeext'
13678 { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679 (eval $ac_try) 2>&5
13681 echo "$as_me:13681: \$? = $ac_status" >&5
13682 (exit $ac_status); }; }; then
13683 cf_cv_xt_x11_compat=yes
13685 echo "$as_me: failed program was:" >&5
13686 cat conftest.$ac_ext >&5
13687 cf_cv_xt_x11_compat=no
13689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13691 echo "$as_me:13691: result: $cf_cv_xt_x11_compat" >&5
13692 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13693 if test "$cf_cv_xt_x11_compat" = no
13695 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13697 echo "${as_me:-configure}:13697: testing work around broken X11 dependency ..." 1>&5
13699 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13701 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13702 test -n "$verbose" && echo " found package x11" 1>&6
13704 echo "${as_me:-configure}:13704: testing found package x11 ..." 1>&5
13706 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13707 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13708 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13710 echo "${as_me:-configure}:13710: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13712 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13714 echo "${as_me:-configure}:13714: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13719 cf_new_extra_cppflags=
13721 for cf_add_cflags in $cf_pkgconfig_incs
13723 case $cf_fix_cppflags in
13725 case $cf_add_cflags in
13726 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13727 case $cf_add_cflags in
13729 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13731 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13732 && test -z "${cf_tst_cflags}" \
13733 && cf_fix_cppflags=yes
13735 if test $cf_fix_cppflags = yes ; then
13737 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13738 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13741 elif test "${cf_tst_cflags}" = "\"'" ; then
13743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13750 case "$CPPFLAGS" in
13754 case $cf_add_cflags in
13756 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13758 CPPFLAGS=`echo "$CPPFLAGS" | \
13759 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13760 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13765 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13766 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13773 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13774 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13781 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13782 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13784 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13786 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13787 && test -z "${cf_tst_cflags}" \
13788 && cf_fix_cppflags=no
13793 if test -n "$cf_new_cflags" ; then
13795 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13796 CFLAGS="${CFLAGS}$cf_new_cflags"
13800 if test -n "$cf_new_cppflags" ; then
13802 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13803 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13807 if test -n "$cf_new_extra_cppflags" ; then
13809 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13810 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13814 cf_add_libs="$cf_pkgconfig_libs"
13815 # Filter out duplicates - this happens with badly-designed ".pc" files...
13816 for cf_add_1lib in $LIBS
13818 for cf_add_2lib in $cf_add_libs
13820 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13826 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13828 LIBS="$cf_add_libs"
13835 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13837 echo "${as_me:-configure}:13837: testing ...before $LIBS ..." 1>&5
13839 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13840 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13842 echo "${as_me:-configure}:13842: testing ...after $LIBS ..." 1>&5
13850 echo "$as_me:13850: checking for usable X Toolkit package" >&5
13851 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13852 if test "${cf_cv_xt_ice_compat+set}" = set; then
13853 echo $ECHO_N "(cached) $ECHO_C" >&6
13856 cat >conftest.$ac_ext <<_ACEOF
13857 #line 13857 "configure"
13858 #include "confdefs.h"
13860 #include <X11/Shell.h>
13865 int num = IceConnectionNumber(0)
13871 rm -f conftest.$ac_objext conftest$ac_exeext
13872 if { (eval echo "$as_me:13872: \"$ac_link\"") >&5
13873 (eval $ac_link) 2>&5
13875 echo "$as_me:13875: \$? = $ac_status" >&5
13876 (exit $ac_status); } &&
13877 { ac_try='test -s conftest$ac_exeext'
13878 { (eval echo "$as_me:13878: \"$ac_try\"") >&5
13879 (eval $ac_try) 2>&5
13881 echo "$as_me:13881: \$? = $ac_status" >&5
13882 (exit $ac_status); }; }; then
13883 cf_cv_xt_ice_compat=yes
13885 echo "$as_me: failed program was:" >&5
13886 cat conftest.$ac_ext >&5
13887 cf_cv_xt_ice_compat=no
13889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13891 echo "$as_me:13891: result: $cf_cv_xt_ice_compat" >&5
13892 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13894 if test "$cf_cv_xt_ice_compat" = no
13896 # workaround for broken ".pc" files used for X Toolkit.
13897 case "x$X_PRE_LIBS" in
13903 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13905 echo "${as_me:-configure}:13905: testing work around broken ICE dependency ..." 1>&5
13907 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13908 test -n "$verbose" && echo " found package ice" 1>&6
13910 echo "${as_me:-configure}:13910: testing found package ice ..." 1>&5
13912 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13913 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13914 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13916 echo "${as_me:-configure}:13916: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13918 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13920 echo "${as_me:-configure}:13920: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13925 cf_new_extra_cppflags=
13927 for cf_add_cflags in $cf_pkgconfig_incs
13929 case $cf_fix_cppflags in
13931 case $cf_add_cflags in
13932 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13933 case $cf_add_cflags in
13935 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13937 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13938 && test -z "${cf_tst_cflags}" \
13939 && cf_fix_cppflags=yes
13941 if test $cf_fix_cppflags = yes ; then
13943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13947 elif test "${cf_tst_cflags}" = "\"'" ; then
13949 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13950 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13956 case "$CPPFLAGS" in
13960 case $cf_add_cflags in
13962 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13964 CPPFLAGS=`echo "$CPPFLAGS" | \
13965 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13966 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13971 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13972 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13979 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13980 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13990 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13992 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13993 && test -z "${cf_tst_cflags}" \
13994 && cf_fix_cppflags=no
13999 if test -n "$cf_new_cflags" ; then
14001 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14002 CFLAGS="${CFLAGS}$cf_new_cflags"
14006 if test -n "$cf_new_cppflags" ; then
14008 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14009 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14013 if test -n "$cf_new_extra_cppflags" ; then
14015 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14016 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14020 cf_add_libs="$cf_pkgconfig_libs"
14021 # Filter out duplicates - this happens with badly-designed ".pc" files...
14022 for cf_add_1lib in $LIBS
14024 for cf_add_2lib in $cf_add_libs
14026 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14034 LIBS="$cf_add_libs"
14036 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
14037 test -n "$verbose" && echo " found package sm" 1>&6
14039 echo "${as_me:-configure}:14039: testing found package sm ..." 1>&5
14041 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
14042 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
14043 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14045 echo "${as_me:-configure}:14045: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14047 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14049 echo "${as_me:-configure}:14049: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14054 cf_new_extra_cppflags=
14056 for cf_add_cflags in $cf_pkgconfig_incs
14058 case $cf_fix_cppflags in
14060 case $cf_add_cflags in
14061 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14062 case $cf_add_cflags in
14064 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14067 && test -z "${cf_tst_cflags}" \
14068 && cf_fix_cppflags=yes
14070 if test $cf_fix_cppflags = yes ; then
14072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14076 elif test "${cf_tst_cflags}" = "\"'" ; then
14078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14085 case "$CPPFLAGS" in
14089 case $cf_add_cflags in
14091 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14093 CPPFLAGS=`echo "$CPPFLAGS" | \
14094 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14095 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14100 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14101 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14108 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14109 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14119 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14122 && test -z "${cf_tst_cflags}" \
14123 && cf_fix_cppflags=no
14128 if test -n "$cf_new_cflags" ; then
14130 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14131 CFLAGS="${CFLAGS}$cf_new_cflags"
14135 if test -n "$cf_new_cppflags" ; then
14137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14138 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14142 if test -n "$cf_new_extra_cppflags" ; then
14144 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14145 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14149 cf_add_libs="$cf_pkgconfig_libs"
14150 # Filter out duplicates - this happens with badly-designed ".pc" files...
14151 for cf_add_1lib in $LIBS
14153 for cf_add_2lib in $cf_add_libs
14155 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14161 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14163 LIBS="$cf_add_libs"
14176 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14178 echo "${as_me:-configure}:14178: testing ...before $LIBS ..." 1>&5
14180 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14181 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14183 echo "${as_me:-configure}:14183: testing ...after $LIBS ..." 1>&5
14199 LDFLAGS="$X_LIBS $LDFLAGS"
14201 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14203 echo "${as_me:-configure}:14203: testing checking additions to CFLAGS ..." 1>&5
14205 cf_check_cflags="$CFLAGS"
14206 cf_check_cppflags="$CPPFLAGS"
14211 cf_new_extra_cppflags=
14213 for cf_add_cflags in $X_CFLAGS
14215 case $cf_fix_cppflags in
14217 case $cf_add_cflags in
14218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14219 case $cf_add_cflags in
14221 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14224 && test -z "${cf_tst_cflags}" \
14225 && cf_fix_cppflags=yes
14227 if test $cf_fix_cppflags = yes ; then
14229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14233 elif test "${cf_tst_cflags}" = "\"'" ; then
14235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14242 case "$CPPFLAGS" in
14246 case $cf_add_cflags in
14248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14250 CPPFLAGS=`echo "$CPPFLAGS" | \
14251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14276 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14279 && test -z "${cf_tst_cflags}" \
14280 && cf_fix_cppflags=no
14285 if test -n "$cf_new_cflags" ; then
14286 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14288 echo "${as_me:-configure}:14288: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14290 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14291 CFLAGS="${CFLAGS}$cf_new_cflags"
14295 if test -n "$cf_new_cppflags" ; then
14296 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14298 echo "${as_me:-configure}:14298: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14300 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14301 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14305 if test -n "$cf_new_extra_cppflags" ; then
14306 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14308 echo "${as_me:-configure}:14308: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14310 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14311 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14315 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14316 cat >conftest.$ac_ext <<_ACEOF
14317 #line 14317 "configure"
14318 #include "confdefs.h"
14323 printf("Hello world");
14328 rm -f conftest.$ac_objext conftest$ac_exeext
14329 if { (eval echo "$as_me:14329: \"$ac_link\"") >&5
14330 (eval $ac_link) 2>&5
14332 echo "$as_me:14332: \$? = $ac_status" >&5
14333 (exit $ac_status); } &&
14334 { ac_try='test -s conftest$ac_exeext'
14335 { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336 (eval $ac_try) 2>&5
14338 echo "$as_me:14338: \$? = $ac_status" >&5
14339 (exit $ac_status); }; }; then
14342 echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14344 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14346 echo "${as_me:-configure}:14346: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14348 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14349 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14351 echo "${as_me:-configure}:14351: testing but keeping change to \$CPPFLAGS ..." 1>&5
14354 CFLAGS="$cf_check_flags"
14356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14359 echo "$as_me:14359: checking for XOpenDisplay" >&5
14360 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14361 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14362 echo $ECHO_N "(cached) $ECHO_C" >&6
14364 cat >conftest.$ac_ext <<_ACEOF
14365 #line 14365 "configure"
14366 #include "confdefs.h"
14367 #define XOpenDisplay autoconf_temporary
14368 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14369 #undef XOpenDisplay
14375 /* We use char because int might match the return type of a gcc2
14376 builtin and then its argument prototype would still apply. */
14377 char XOpenDisplay (void);
14383 /* The GNU C library defines stubs for functions which it implements
14384 to always fail with ENOSYS. Some functions are actually named
14385 something starting with __ and the normal name is an alias. */
14386 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14387 #error found stub for XOpenDisplay
14390 return XOpenDisplay ();
14395 rm -f conftest.$ac_objext conftest$ac_exeext
14396 if { (eval echo "$as_me:14396: \"$ac_link\"") >&5
14397 (eval $ac_link) 2>&5
14399 echo "$as_me:14399: \$? = $ac_status" >&5
14400 (exit $ac_status); } &&
14401 { ac_try='test -s conftest$ac_exeext'
14402 { (eval echo "$as_me:14402: \"$ac_try\"") >&5
14403 (eval $ac_try) 2>&5
14405 echo "$as_me:14405: \$? = $ac_status" >&5
14406 (exit $ac_status); }; }; then
14407 ac_cv_func_XOpenDisplay=yes
14409 echo "$as_me: failed program was:" >&5
14410 cat conftest.$ac_ext >&5
14411 ac_cv_func_XOpenDisplay=no
14413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14415 echo "$as_me:14415: result: $ac_cv_func_XOpenDisplay" >&5
14416 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14417 if test $ac_cv_func_XOpenDisplay = yes; then
14421 echo "$as_me:14421: checking for XOpenDisplay in -lX11" >&5
14422 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14423 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14424 echo $ECHO_N "(cached) $ECHO_C" >&6
14426 ac_check_lib_save_LIBS=$LIBS
14427 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14428 cat >conftest.$ac_ext <<_ACEOF
14429 #line 14429 "configure"
14430 #include "confdefs.h"
14432 /* Override any gcc2 internal prototype to avoid an error. */
14436 /* We use char because int might match the return type of a gcc2
14437 builtin and then its argument prototype would still apply. */
14438 char XOpenDisplay ();
14447 rm -f conftest.$ac_objext conftest$ac_exeext
14448 if { (eval echo "$as_me:14448: \"$ac_link\"") >&5
14449 (eval $ac_link) 2>&5
14451 echo "$as_me:14451: \$? = $ac_status" >&5
14452 (exit $ac_status); } &&
14453 { ac_try='test -s conftest$ac_exeext'
14454 { (eval echo "$as_me:14454: \"$ac_try\"") >&5
14455 (eval $ac_try) 2>&5
14457 echo "$as_me:14457: \$? = $ac_status" >&5
14458 (exit $ac_status); }; }; then
14459 ac_cv_lib_X11_XOpenDisplay=yes
14461 echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14463 ac_cv_lib_X11_XOpenDisplay=no
14465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14466 LIBS=$ac_check_lib_save_LIBS
14468 echo "$as_me:14468: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14469 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14470 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14472 cf_add_libs="-lX11"
14473 # Filter out duplicates - this happens with badly-designed ".pc" files...
14474 for cf_add_1lib in $LIBS
14476 for cf_add_2lib in $cf_add_libs
14478 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14484 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14486 LIBS="$cf_add_libs"
14492 echo "$as_me:14492: checking for XtAppInitialize" >&5
14493 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14494 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14495 echo $ECHO_N "(cached) $ECHO_C" >&6
14497 cat >conftest.$ac_ext <<_ACEOF
14498 #line 14498 "configure"
14499 #include "confdefs.h"
14500 #define XtAppInitialize autoconf_temporary
14501 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14502 #undef XtAppInitialize
14508 /* We use char because int might match the return type of a gcc2
14509 builtin and then its argument prototype would still apply. */
14510 char XtAppInitialize (void);
14516 /* The GNU C library defines stubs for functions which it implements
14517 to always fail with ENOSYS. Some functions are actually named
14518 something starting with __ and the normal name is an alias. */
14519 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14520 #error found stub for XtAppInitialize
14523 return XtAppInitialize ();
14528 rm -f conftest.$ac_objext conftest$ac_exeext
14529 if { (eval echo "$as_me:14529: \"$ac_link\"") >&5
14530 (eval $ac_link) 2>&5
14532 echo "$as_me:14532: \$? = $ac_status" >&5
14533 (exit $ac_status); } &&
14534 { ac_try='test -s conftest$ac_exeext'
14535 { (eval echo "$as_me:14535: \"$ac_try\"") >&5
14536 (eval $ac_try) 2>&5
14538 echo "$as_me:14538: \$? = $ac_status" >&5
14539 (exit $ac_status); }; }; then
14540 ac_cv_func_XtAppInitialize=yes
14542 echo "$as_me: failed program was:" >&5
14543 cat conftest.$ac_ext >&5
14544 ac_cv_func_XtAppInitialize=no
14546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14548 echo "$as_me:14548: result: $ac_cv_func_XtAppInitialize" >&5
14549 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14550 if test $ac_cv_func_XtAppInitialize = yes; then
14554 echo "$as_me:14554: checking for XtAppInitialize in -lXt" >&5
14555 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14556 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14557 echo $ECHO_N "(cached) $ECHO_C" >&6
14559 ac_check_lib_save_LIBS=$LIBS
14560 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14561 cat >conftest.$ac_ext <<_ACEOF
14562 #line 14562 "configure"
14563 #include "confdefs.h"
14565 /* Override any gcc2 internal prototype to avoid an error. */
14569 /* We use char because int might match the return type of a gcc2
14570 builtin and then its argument prototype would still apply. */
14571 char XtAppInitialize ();
14575 XtAppInitialize ();
14580 rm -f conftest.$ac_objext conftest$ac_exeext
14581 if { (eval echo "$as_me:14581: \"$ac_link\"") >&5
14582 (eval $ac_link) 2>&5
14584 echo "$as_me:14584: \$? = $ac_status" >&5
14585 (exit $ac_status); } &&
14586 { ac_try='test -s conftest$ac_exeext'
14587 { (eval echo "$as_me:14587: \"$ac_try\"") >&5
14588 (eval $ac_try) 2>&5
14590 echo "$as_me:14590: \$? = $ac_status" >&5
14591 (exit $ac_status); }; }; then
14592 ac_cv_lib_Xt_XtAppInitialize=yes
14594 echo "$as_me: failed program was:" >&5
14595 cat conftest.$ac_ext >&5
14596 ac_cv_lib_Xt_XtAppInitialize=no
14598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14599 LIBS=$ac_check_lib_save_LIBS
14601 echo "$as_me:14601: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14602 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14603 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14605 cat >>confdefs.h <<\EOF
14606 #define HAVE_LIBXT 1
14610 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14617 if test $cf_have_X_LIBS = no ; then
14618 { echo "$as_me:14618: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14619 test program. You will have to check and add the proper libraries by hand
14621 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14622 test program. You will have to check and add the proper libraries by hand
14623 to makefile." >&2;}
14626 cf_x_athena_root=$cf_x_athena
14629 for cf_path in default \
14630 /usr/contrib/X11R6 \
14631 /usr/contrib/X11R5 \
14635 if test -z "$cf_x_athena_inc" ; then
14636 cf_save="$CPPFLAGS"
14637 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14638 if test $cf_path != default ; then
14639 CPPFLAGS="$cf_save"
14641 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14642 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14644 echo "$as_me:14644: checking for $cf_test in $cf_path" >&5
14645 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14647 echo "$as_me:14647: checking for $cf_test" >&5
14648 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14650 cat >conftest.$ac_ext <<_ACEOF
14651 #line 14651 "configure"
14652 #include "confdefs.h"
14654 #include <X11/Intrinsic.h>
14655 #include <$cf_test>
14664 rm -f conftest.$ac_objext
14665 if { (eval echo "$as_me:14665: \"$ac_compile\"") >&5
14666 (eval $ac_compile) 2>&5
14668 echo "$as_me:14668: \$? = $ac_status" >&5
14669 (exit $ac_status); } &&
14670 { ac_try='test -s conftest.$ac_objext'
14671 { (eval echo "$as_me:14671: \"$ac_try\"") >&5
14672 (eval $ac_try) 2>&5
14674 echo "$as_me:14674: \$? = $ac_status" >&5
14675 (exit $ac_status); }; }; then
14678 echo "$as_me: failed program was:" >&5
14679 cat conftest.$ac_ext >&5
14682 rm -f conftest.$ac_objext conftest.$ac_ext
14683 echo "$as_me:14683: result: $cf_result" >&5
14684 echo "${ECHO_T}$cf_result" >&6
14685 if test "$cf_result" = yes ; then
14686 cf_x_athena_inc=$cf_path
14689 CPPFLAGS="$cf_save"
14694 if test -z "$cf_x_athena_inc" ; then
14695 { echo "$as_me:14695: WARNING: Unable to successfully find Athena header files with test program" >&5
14696 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14697 elif test "$cf_x_athena_inc" != default ; then
14699 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14700 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14704 cf_x_athena_root=$cf_x_athena
14707 for cf_path in default \
14708 /usr/contrib/X11R6 \
14709 /usr/contrib/X11R5 \
14714 ${cf_x_athena_root} \
14715 ${cf_x_athena_root}7 \
14716 ${cf_x_athena_root}6
14719 "-l$cf_lib -lXmu" \
14720 "-l$cf_lib -lXpm -lXmu" \
14721 "-l${cf_lib}_s -lXmu_s"
14723 if test -z "$cf_x_athena_lib" ; then
14725 cf_test=XawSimpleMenuAddGlobalActions
14726 if test $cf_path != default ; then
14728 cf_add_libs="-L$cf_path/lib $cf_libs"
14729 # Filter out duplicates - this happens with badly-designed ".pc" files...
14730 for cf_add_1lib in $LIBS
14732 for cf_add_2lib in $cf_add_libs
14734 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14740 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14742 LIBS="$cf_add_libs"
14744 echo "$as_me:14744: checking for $cf_libs in $cf_path" >&5
14745 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14748 cf_add_libs="$cf_libs"
14749 # Filter out duplicates - this happens with badly-designed ".pc" files...
14750 for cf_add_1lib in $LIBS
14752 for cf_add_2lib in $cf_add_libs
14754 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14760 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14762 LIBS="$cf_add_libs"
14764 echo "$as_me:14764: checking for $cf_test in $cf_libs" >&5
14765 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14767 cat >conftest.$ac_ext <<_ACEOF
14768 #line 14768 "configure"
14769 #include "confdefs.h"
14771 #include <X11/Intrinsic.h>
14772 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14778 $cf_test((XtAppContext) 0)
14783 rm -f conftest.$ac_objext conftest$ac_exeext
14784 if { (eval echo "$as_me:14784: \"$ac_link\"") >&5
14785 (eval $ac_link) 2>&5
14787 echo "$as_me:14787: \$? = $ac_status" >&5
14788 (exit $ac_status); } &&
14789 { ac_try='test -s conftest$ac_exeext'
14790 { (eval echo "$as_me:14790: \"$ac_try\"") >&5
14791 (eval $ac_try) 2>&5
14793 echo "$as_me:14793: \$? = $ac_status" >&5
14794 (exit $ac_status); }; }; then
14797 echo "$as_me: failed program was:" >&5
14798 cat conftest.$ac_ext >&5
14801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14802 echo "$as_me:14802: result: $cf_result" >&5
14803 echo "${ECHO_T}$cf_result" >&6
14804 if test "$cf_result" = yes ; then
14805 cf_x_athena_lib="$cf_libs"
14811 test -n "$cf_x_athena_lib" && break
14815 if test -z "$cf_x_athena_lib" ; then
14816 { { echo "$as_me:14816: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14817 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14818 { (exit 1); exit 1; }; }
14821 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14823 cat >>confdefs.h <<EOF
14824 #define $cf_x_athena_LIBS 1
14829 if test -n "$ac_tool_prefix"; then
14830 for ac_prog in xcurses-config
14832 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14833 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14834 echo "$as_me:14834: checking for $ac_word" >&5
14835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14836 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14837 echo $ECHO_N "(cached) $ECHO_C" >&6
14839 if test -n "$XCURSES_CONFIG"; then
14840 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14842 ac_save_IFS=$IFS; IFS=$ac_path_separator
14844 for ac_dir in $ac_dummy; do
14846 test -z "$ac_dir" && ac_dir=.
14847 $as_executable_p "$ac_dir/$ac_word" || continue
14848 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14849 echo "$as_me:14849: found $ac_dir/$ac_word" >&5
14855 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14856 if test -n "$XCURSES_CONFIG"; then
14857 echo "$as_me:14857: result: $XCURSES_CONFIG" >&5
14858 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14860 echo "$as_me:14860: result: no" >&5
14861 echo "${ECHO_T}no" >&6
14864 test -n "$XCURSES_CONFIG" && break
14867 if test -z "$XCURSES_CONFIG"; then
14868 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14869 for ac_prog in xcurses-config
14871 # Extract the first word of "$ac_prog", so it can be a program name with args.
14872 set dummy $ac_prog; ac_word=$2
14873 echo "$as_me:14873: checking for $ac_word" >&5
14874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14875 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14876 echo $ECHO_N "(cached) $ECHO_C" >&6
14878 if test -n "$ac_ct_XCURSES_CONFIG"; then
14879 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14881 ac_save_IFS=$IFS; IFS=$ac_path_separator
14883 for ac_dir in $ac_dummy; do
14885 test -z "$ac_dir" && ac_dir=.
14886 $as_executable_p "$ac_dir/$ac_word" || continue
14887 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14888 echo "$as_me:14888: found $ac_dir/$ac_word" >&5
14894 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14895 if test -n "$ac_ct_XCURSES_CONFIG"; then
14896 echo "$as_me:14896: result: $ac_ct_XCURSES_CONFIG" >&5
14897 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14899 echo "$as_me:14899: result: no" >&5
14900 echo "${ECHO_T}no" >&6
14903 test -n "$ac_ct_XCURSES_CONFIG" && break
14905 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14907 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14910 if test "$XCURSES_CONFIG" != none ; then
14915 cf_new_extra_cppflags=
14917 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14919 case $cf_fix_cppflags in
14921 case $cf_add_cflags in
14922 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14923 case $cf_add_cflags in
14925 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14928 && test -z "${cf_tst_cflags}" \
14929 && cf_fix_cppflags=yes
14931 if test $cf_fix_cppflags = yes ; then
14933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14937 elif test "${cf_tst_cflags}" = "\"'" ; then
14939 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14940 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14946 case "$CPPFLAGS" in
14950 case $cf_add_cflags in
14952 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14954 CPPFLAGS=`echo "$CPPFLAGS" | \
14955 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14956 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14961 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14962 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14969 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14970 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14977 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14978 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14980 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14982 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14983 && test -z "${cf_tst_cflags}" \
14984 && cf_fix_cppflags=no
14989 if test -n "$cf_new_cflags" ; then
14991 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14992 CFLAGS="${CFLAGS}$cf_new_cflags"
14996 if test -n "$cf_new_cppflags" ; then
14998 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14999 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15003 if test -n "$cf_new_extra_cppflags" ; then
15005 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15006 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15010 cf_add_libs="`$XCURSES_CONFIG --libs`"
15011 # Filter out duplicates - this happens with badly-designed ".pc" files...
15012 for cf_add_1lib in $LIBS
15014 for cf_add_2lib in $cf_add_libs
15016 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15022 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15024 LIBS="$cf_add_libs"
15026 cf_cv_lib_XCurses=yes
15030 LDFLAGS="$LDFLAGS $X_LIBS"
15032 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15034 echo "${as_me:-configure}:15034: testing checking additions to CFLAGS ..." 1>&5
15036 cf_check_cflags="$CFLAGS"
15037 cf_check_cppflags="$CPPFLAGS"
15042 cf_new_extra_cppflags=
15044 for cf_add_cflags in $X_CFLAGS
15046 case $cf_fix_cppflags in
15048 case $cf_add_cflags in
15049 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15050 case $cf_add_cflags in
15052 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15054 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15055 && test -z "${cf_tst_cflags}" \
15056 && cf_fix_cppflags=yes
15058 if test $cf_fix_cppflags = yes ; then
15060 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15061 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15064 elif test "${cf_tst_cflags}" = "\"'" ; then
15066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15073 case "$CPPFLAGS" in
15077 case $cf_add_cflags in
15079 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15081 CPPFLAGS=`echo "$CPPFLAGS" | \
15082 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15083 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15088 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15089 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15096 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15097 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15104 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15105 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15107 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15109 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15110 && test -z "${cf_tst_cflags}" \
15111 && cf_fix_cppflags=no
15116 if test -n "$cf_new_cflags" ; then
15117 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15119 echo "${as_me:-configure}:15119: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15121 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15122 CFLAGS="${CFLAGS}$cf_new_cflags"
15126 if test -n "$cf_new_cppflags" ; then
15127 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15129 echo "${as_me:-configure}:15129: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15131 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15132 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15136 if test -n "$cf_new_extra_cppflags" ; then
15137 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15139 echo "${as_me:-configure}:15139: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15141 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15142 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15146 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15147 cat >conftest.$ac_ext <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15154 printf("Hello world");
15159 rm -f conftest.$ac_objext conftest$ac_exeext
15160 if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
15161 (eval $ac_link) 2>&5
15163 echo "$as_me:15163: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
15165 { ac_try='test -s conftest$ac_exeext'
15166 { (eval echo "$as_me:15166: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15169 echo "$as_me:15169: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }; then
15173 echo "$as_me: failed program was:" >&5
15174 cat conftest.$ac_ext >&5
15175 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15177 echo "${as_me:-configure}:15177: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15179 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15180 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15182 echo "${as_me:-configure}:15182: testing but keeping change to \$CPPFLAGS ..." 1>&5
15185 CFLAGS="$cf_check_flags"
15187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15190 echo "$as_me:15190: checking for XOpenDisplay in -lX11" >&5
15191 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15192 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15193 echo $ECHO_N "(cached) $ECHO_C" >&6
15195 ac_check_lib_save_LIBS=$LIBS
15196 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15197 cat >conftest.$ac_ext <<_ACEOF
15198 #line 15198 "configure"
15199 #include "confdefs.h"
15201 /* Override any gcc2 internal prototype to avoid an error. */
15205 /* We use char because int might match the return type of a gcc2
15206 builtin and then its argument prototype would still apply. */
15207 char XOpenDisplay ();
15216 rm -f conftest.$ac_objext conftest$ac_exeext
15217 if { (eval echo "$as_me:15217: \"$ac_link\"") >&5
15218 (eval $ac_link) 2>&5
15220 echo "$as_me:15220: \$? = $ac_status" >&5
15221 (exit $ac_status); } &&
15222 { ac_try='test -s conftest$ac_exeext'
15223 { (eval echo "$as_me:15223: \"$ac_try\"") >&5
15224 (eval $ac_try) 2>&5
15226 echo "$as_me:15226: \$? = $ac_status" >&5
15227 (exit $ac_status); }; }; then
15228 ac_cv_lib_X11_XOpenDisplay=yes
15230 echo "$as_me: failed program was:" >&5
15231 cat conftest.$ac_ext >&5
15232 ac_cv_lib_X11_XOpenDisplay=no
15234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15235 LIBS=$ac_check_lib_save_LIBS
15237 echo "$as_me:15237: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15238 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15239 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15241 cf_add_libs="-lX11"
15242 # Filter out duplicates - this happens with badly-designed ".pc" files...
15243 for cf_add_1lib in $LIBS
15245 for cf_add_2lib in $cf_add_libs
15247 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15253 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15255 LIBS="$cf_add_libs"
15259 echo "$as_me:15259: checking for XCurses library" >&5
15260 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15261 if test "${cf_cv_lib_XCurses+set}" = set; then
15262 echo $ECHO_N "(cached) $ECHO_C" >&6
15265 cf_add_libs="-lXCurses"
15266 # Filter out duplicates - this happens with badly-designed ".pc" files...
15267 for cf_add_1lib in $LIBS
15269 for cf_add_2lib in $cf_add_libs
15271 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15277 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15279 LIBS="$cf_add_libs"
15281 cat >conftest.$ac_ext <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15285 #include <xcurses.h>
15286 char *XCursesProgramName = "test";
15296 rm -f conftest.$ac_objext conftest$ac_exeext
15297 if { (eval echo "$as_me:15297: \"$ac_link\"") >&5
15298 (eval $ac_link) 2>&5
15300 echo "$as_me:15300: \$? = $ac_status" >&5
15301 (exit $ac_status); } &&
15302 { ac_try='test -s conftest$ac_exeext'
15303 { (eval echo "$as_me:15303: \"$ac_try\"") >&5
15304 (eval $ac_try) 2>&5
15306 echo "$as_me:15306: \$? = $ac_status" >&5
15307 (exit $ac_status); }; }; then
15308 cf_cv_lib_XCurses=yes
15310 echo "$as_me: failed program was:" >&5
15311 cat conftest.$ac_ext >&5
15312 cf_cv_lib_XCurses=no
15314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15317 echo "$as_me:15317: result: $cf_cv_lib_XCurses" >&5
15318 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15322 if test $cf_cv_lib_XCurses = yes ; then
15324 cat >>confdefs.h <<\EOF
15328 cat >>confdefs.h <<\EOF
15332 echo "$as_me:15332: checking for xcurses.h" >&5
15333 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15334 if test "${ac_cv_header_xcurses_h+set}" = set; then
15335 echo $ECHO_N "(cached) $ECHO_C" >&6
15337 cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340 #include <xcurses.h>
15342 if { (eval echo "$as_me:15342: \"$ac_cpp conftest.$ac_ext\"") >&5
15343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15345 egrep -v '^ *\+' conftest.er1 >conftest.err
15347 cat conftest.err >&5
15348 echo "$as_me:15348: \$? = $ac_status" >&5
15349 (exit $ac_status); } >/dev/null; then
15350 if test -s conftest.err; then
15351 ac_cpp_err=$ac_c_preproc_warn_flag
15358 if test -z "$ac_cpp_err"; then
15359 ac_cv_header_xcurses_h=yes
15361 echo "$as_me: failed program was:" >&5
15362 cat conftest.$ac_ext >&5
15363 ac_cv_header_xcurses_h=no
15365 rm -f conftest.err conftest.$ac_ext
15367 echo "$as_me:15367: result: $ac_cv_header_xcurses_h" >&5
15368 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15369 if test $ac_cv_header_xcurses_h = yes; then
15371 cat >>confdefs.h <<\EOF
15372 #define HAVE_XCURSES 1
15378 { { echo "$as_me:15378: error: Cannot link with XCurses" >&5
15379 echo "$as_me: error: Cannot link with XCurses" >&2;}
15380 { (exit 1); exit 1; }; }
15385 { { echo "$as_me:15385: error: unexpected screen-value: $cf_cv_screen" >&5
15386 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15387 { (exit 1); exit 1; }; }
15391 : ${cf_nculib_root:=$cf_cv_screen}
15392 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15393 echo "$as_me:15393: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15394 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15395 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15396 echo $ECHO_N "(cached) $ECHO_C" >&6
15398 ac_check_lib_save_LIBS=$LIBS
15399 LIBS="-l$cf_nculib_root $LIBS"
15400 cat >conftest.$ac_ext <<_ACEOF
15401 #line 15401 "configure"
15402 #include "confdefs.h"
15404 /* Override any gcc2 internal prototype to avoid an error. */
15408 /* We use char because int might match the return type of a gcc2
15409 builtin and then its argument prototype would still apply. */
15410 char _nc_init_pthreads ();
15414 _nc_init_pthreads ();
15419 rm -f conftest.$ac_objext conftest$ac_exeext
15420 if { (eval echo "$as_me:15420: \"$ac_link\"") >&5
15421 (eval $ac_link) 2>&5
15423 echo "$as_me:15423: \$? = $ac_status" >&5
15424 (exit $ac_status); } &&
15425 { ac_try='test -s conftest$ac_exeext'
15426 { (eval echo "$as_me:15426: \"$ac_try\"") >&5
15427 (eval $ac_try) 2>&5
15429 echo "$as_me:15429: \$? = $ac_status" >&5
15430 (exit $ac_status); }; }; then
15431 eval "$as_ac_Lib=yes"
15433 echo "$as_me: failed program was:" >&5
15434 cat conftest.$ac_ext >&5
15435 eval "$as_ac_Lib=no"
15437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15438 LIBS=$ac_check_lib_save_LIBS
15440 echo "$as_me:15440: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15441 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15442 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15443 cf_cv_ncurses_pthreads=yes
15445 cf_cv_ncurses_pthreads=no
15448 if test "$cf_cv_ncurses_pthreads" = yes
15451 cf_add_libs="-lpthread"
15452 # Filter out duplicates - this happens with badly-designed ".pc" files...
15453 for cf_add_1lib in $LIBS
15455 for cf_add_2lib in $cf_add_libs
15457 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15463 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15465 LIBS="$cf_add_libs"
15469 case $cf_cv_screen in
15471 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15475 echo "$as_me:15475: checking for X11 rgb file" >&5
15476 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15478 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15479 if test "${with_x11_rgb+set}" = set; then
15480 withval="$with_x11_rgb"
15486 if test "x$RGB_PATH" = xauto
15488 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15490 /opt/local/share/X11/rgb.txt \
15491 /opt/X11/share/X11/rgb.txt \
15492 /usr/share/X11/rgb.txt \
15493 /usr/X11/share/X11/rgb.txt \
15494 /usr/X11/lib/X11/rgb.txt \
15495 /usr/lib/X11/rgb.txt \
15497 /usr/pkg/lib/X11/rgb.txt \
15498 /usr/X11R7/lib/X11/rgb.txt \
15499 /usr/X11R6/lib/X11/rgb.txt \
15500 /usr/X11R5/lib/X11/rgb.txt \
15501 /usr/X11R4/lib/X11/rgb.txt \
15502 /usr/local/lib/X11/rgb.txt \
15503 /usr/local/share/X11/rgb.txt \
15504 /usr/lib64/X11/rgb.txt
15506 if test -f "$cf_path" ; then
15507 RGB_PATH="$cf_path"
15514 if test "x$prefix" != xNONE; then
15515 cf_path_syntax="$prefix"
15517 cf_path_syntax="$ac_default_prefix"
15520 case ".$cf_path" in
15521 (.\$\(*\)*|.\'*\'*)
15525 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15527 (.\${*prefix}*|.\${*dir}*)
15528 eval cf_path="$cf_path"
15529 case ".$cf_path" in
15531 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15536 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15539 { { echo "$as_me:15539: error: expected a pathname, not \"$cf_path\"" >&5
15540 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15541 { (exit 1); exit 1; }; }
15547 echo "$as_me:15547: result: $RGB_PATH" >&5
15548 echo "${ECHO_T}$RGB_PATH" >&6
15550 cat >>confdefs.h <<EOF
15551 #define RGB_PATH "$cf_path"
15555 if test "$RGB_PATH" = no
15562 case $cf_cv_screen in
15564 cf_default_panel=no
15567 cf_default_tinfo=no
15569 (xcurses|bsdcurses)
15570 cf_default_panel=no
15573 cf_default_tinfo=yes
15576 cf_default_panel=yes
15577 cf_default_form=yes
15578 cf_default_menu=yes
15579 cf_default_tinfo=yes
15580 case $cf_cv_screen in
15582 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15588 echo "$as_me:15588: checking if you want to check for panel functions" >&5
15589 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15591 # Check whether --enable-panel or --disable-panel was given.
15592 if test "${enable_panel+set}" = set; then
15593 enableval="$enable_panel"
15594 test "$enableval" != no && enableval=yes
15595 if test "$enableval" != "yes" ; then
15598 cf_enable_panel=$cf_default_panel
15602 cf_enable_panel=$cf_default_panel
15605 echo "$as_me:15605: result: $cf_enable_panel" >&5
15606 echo "${ECHO_T}$cf_enable_panel" >&6
15607 if test $cf_enable_panel = yes
15610 cf_have_curses_lib=no
15612 : ${NCURSES_CONFIG_PKG:=none}
15613 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15615 elif test "x${PKG_CONFIG:=none}" != xnone; then
15616 echo "$as_me:15616: checking pkg-config for panel$cf_cv_libtype" >&5
15617 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15618 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15619 echo "$as_me:15619: result: yes" >&5
15620 echo "${ECHO_T}yes" >&6
15622 echo "$as_me:15622: checking if the panel$cf_cv_libtype package files work" >&5
15623 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15625 cf_save_CPPFLAGS="$CPPFLAGS"
15626 cf_save_LIBS="$LIBS"
15631 cf_new_extra_cppflags=
15633 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15635 case $cf_fix_cppflags in
15637 case $cf_add_cflags in
15638 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15639 case $cf_add_cflags in
15641 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15643 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15644 && test -z "${cf_tst_cflags}" \
15645 && cf_fix_cppflags=yes
15647 if test $cf_fix_cppflags = yes ; then
15649 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15650 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15653 elif test "${cf_tst_cflags}" = "\"'" ; then
15655 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15656 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15662 case "$CPPFLAGS" in
15666 case $cf_add_cflags in
15668 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15670 CPPFLAGS=`echo "$CPPFLAGS" | \
15671 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15672 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15677 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15678 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15685 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15686 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15693 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15694 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15696 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15698 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15699 && test -z "${cf_tst_cflags}" \
15700 && cf_fix_cppflags=no
15705 if test -n "$cf_new_cflags" ; then
15707 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15708 CFLAGS="${CFLAGS}$cf_new_cflags"
15712 if test -n "$cf_new_cppflags" ; then
15714 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15715 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15719 if test -n "$cf_new_extra_cppflags" ; then
15721 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15722 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15726 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15727 # Filter out duplicates - this happens with badly-designed ".pc" files...
15728 for cf_add_1lib in $LIBS
15730 for cf_add_2lib in $cf_add_libs
15732 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15740 LIBS="$cf_add_libs"
15742 cat >conftest.$ac_ext <<_ACEOF
15743 #line 15743 "configure"
15744 #include "confdefs.h"
15749 (void) new_panel ( 0 );
15754 rm -f conftest.$ac_objext conftest$ac_exeext
15755 if { (eval echo "$as_me:15755: \"$ac_link\"") >&5
15756 (eval $ac_link) 2>&5
15758 echo "$as_me:15758: \$? = $ac_status" >&5
15759 (exit $ac_status); } &&
15760 { ac_try='test -s conftest$ac_exeext'
15761 { (eval echo "$as_me:15761: \"$ac_try\"") >&5
15762 (eval $ac_try) 2>&5
15764 echo "$as_me:15764: \$? = $ac_status" >&5
15765 (exit $ac_status); }; }; then
15766 if test "$cross_compiling" = yes; then
15767 cf_have_curses_lib=maybe
15769 cat >conftest.$ac_ext <<_ACEOF
15770 #line 15770 "configure"
15771 #include "confdefs.h"
15774 { (void) new_panel ( 0 ); return 0; }
15776 rm -f conftest$ac_exeext
15777 if { (eval echo "$as_me:15777: \"$ac_link\"") >&5
15778 (eval $ac_link) 2>&5
15780 echo "$as_me:15780: \$? = $ac_status" >&5
15781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15782 { (eval echo "$as_me:15782: \"$ac_try\"") >&5
15783 (eval $ac_try) 2>&5
15785 echo "$as_me:15785: \$? = $ac_status" >&5
15786 (exit $ac_status); }; }; then
15787 cf_have_curses_lib=yes
15789 echo "$as_me: program exited with status $ac_status" >&5
15790 echo "$as_me: failed program was:" >&5
15791 cat conftest.$ac_ext >&5
15792 cf_have_curses_lib=no
15794 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15797 echo "$as_me: failed program was:" >&5
15798 cat conftest.$ac_ext >&5
15799 cf_have_curses_lib=no
15801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15802 echo "$as_me:15802: result: $cf_have_curses_lib" >&5
15803 echo "${ECHO_T}$cf_have_curses_lib" >&6
15804 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15805 if test "$cf_have_curses_lib" != "yes"
15807 CPPFLAGS="$cf_save_CPPFLAGS"
15808 LIBS="$cf_save_LIBS"
15811 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15813 cat >>confdefs.h <<EOF
15814 #define $cf_upper 1
15820 if test "$cf_have_curses_lib" = no; then
15821 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15822 echo "$as_me:15822: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15823 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15824 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15825 echo $ECHO_N "(cached) $ECHO_C" >&6
15827 ac_check_lib_save_LIBS=$LIBS
15828 LIBS="-lpanel$cf_cv_libtype $LIBS"
15829 cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15833 /* Override any gcc2 internal prototype to avoid an error. */
15837 /* We use char because int might match the return type of a gcc2
15838 builtin and then its argument prototype would still apply. */
15848 rm -f conftest.$ac_objext conftest$ac_exeext
15849 if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
15850 (eval $ac_link) 2>&5
15852 echo "$as_me:15852: \$? = $ac_status" >&5
15853 (exit $ac_status); } &&
15854 { ac_try='test -s conftest$ac_exeext'
15855 { (eval echo "$as_me:15855: \"$ac_try\"") >&5
15856 (eval $ac_try) 2>&5
15858 echo "$as_me:15858: \$? = $ac_status" >&5
15859 (exit $ac_status); }; }; then
15860 eval "$as_ac_Lib=yes"
15862 echo "$as_me: failed program was:" >&5
15863 cat conftest.$ac_ext >&5
15864 eval "$as_ac_Lib=no"
15866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15867 LIBS=$ac_check_lib_save_LIBS
15869 echo "$as_me:15869: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15870 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15871 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15873 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15875 cf_add_libs="-lpanel$cf_cv_libtype"
15876 # Filter out duplicates - this happens with badly-designed ".pc" files...
15877 for cf_add_1lib in $LIBS
15879 for cf_add_2lib in $cf_add_libs
15881 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15887 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15889 LIBS="$cf_add_libs"
15891 cat >>confdefs.h <<EOF
15892 #define $cf_upper 1
15899 cf_curses_headers="$cf_curses_headers panel.h"
15902 echo "$as_me:15902: checking if you want to check for menu functions" >&5
15903 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15905 # Check whether --enable-menu or --disable-menu was given.
15906 if test "${enable_menu+set}" = set; then
15907 enableval="$enable_menu"
15908 test "$enableval" != no && enableval=yes
15909 if test "$enableval" != "yes" ; then
15912 cf_enable_menu=$cf_default_menu
15916 cf_enable_menu=$cf_default_menu
15919 echo "$as_me:15919: result: $cf_enable_menu" >&5
15920 echo "${ECHO_T}$cf_enable_menu" >&6
15921 if test $cf_enable_menu = yes
15923 case $cf_cv_screen in
15928 echo "$as_me:15928: checking for NetBSD menu.h" >&5
15929 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15930 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15931 echo $ECHO_N "(cached) $ECHO_C" >&6
15934 cat >conftest.$ac_ext <<_ACEOF
15935 #line 15935 "configure"
15936 #include "confdefs.h"
15938 #include <${cf_cv_ncurses_header:-curses.h}>
15946 int y = menu->max_item_width;
15952 rm -f conftest.$ac_objext
15953 if { (eval echo "$as_me:15953: \"$ac_compile\"") >&5
15954 (eval $ac_compile) 2>&5
15956 echo "$as_me:15956: \$? = $ac_status" >&5
15957 (exit $ac_status); } &&
15958 { ac_try='test -s conftest.$ac_objext'
15959 { (eval echo "$as_me:15959: \"$ac_try\"") >&5
15960 (eval $ac_try) 2>&5
15962 echo "$as_me:15962: \$? = $ac_status" >&5
15963 (exit $ac_status); }; }; then
15964 cf_cv_netbsd_menu_h=yes
15967 echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969 cf_cv_netbsd_menu_h=no
15971 rm -f conftest.$ac_objext conftest.$ac_ext
15974 echo "$as_me:15974: result: $cf_cv_netbsd_menu_h" >&5
15975 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15977 test "$cf_cv_netbsd_menu_h" = yes &&
15978 cat >>confdefs.h <<\EOF
15979 #define HAVE_NETBSD_MENU_H 1
15985 cf_have_curses_lib=no
15987 : ${NCURSES_CONFIG_PKG:=none}
15988 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15990 elif test "x${PKG_CONFIG:=none}" != xnone; then
15991 echo "$as_me:15991: checking pkg-config for menu$cf_cv_libtype" >&5
15992 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15993 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15994 echo "$as_me:15994: result: yes" >&5
15995 echo "${ECHO_T}yes" >&6
15997 echo "$as_me:15997: checking if the menu$cf_cv_libtype package files work" >&5
15998 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
16000 cf_save_CPPFLAGS="$CPPFLAGS"
16001 cf_save_LIBS="$LIBS"
16006 cf_new_extra_cppflags=
16008 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
16010 case $cf_fix_cppflags in
16012 case $cf_add_cflags in
16013 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16014 case $cf_add_cflags in
16016 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16019 && test -z "${cf_tst_cflags}" \
16020 && cf_fix_cppflags=yes
16022 if test $cf_fix_cppflags = yes ; then
16024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16028 elif test "${cf_tst_cflags}" = "\"'" ; then
16030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16037 case "$CPPFLAGS" in
16041 case $cf_add_cflags in
16043 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16045 CPPFLAGS=`echo "$CPPFLAGS" | \
16046 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16047 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16052 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16053 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16060 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16061 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16071 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16073 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16074 && test -z "${cf_tst_cflags}" \
16075 && cf_fix_cppflags=no
16080 if test -n "$cf_new_cflags" ; then
16082 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16083 CFLAGS="${CFLAGS}$cf_new_cflags"
16087 if test -n "$cf_new_cppflags" ; then
16089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16090 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16094 if test -n "$cf_new_extra_cppflags" ; then
16096 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16097 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16101 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
16102 # Filter out duplicates - this happens with badly-designed ".pc" files...
16103 for cf_add_1lib in $LIBS
16105 for cf_add_2lib in $cf_add_libs
16107 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16113 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16115 LIBS="$cf_add_libs"
16117 cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16124 (void) menu_driver ( 0,0 );
16129 rm -f conftest.$ac_objext conftest$ac_exeext
16130 if { (eval echo "$as_me:16130: \"$ac_link\"") >&5
16131 (eval $ac_link) 2>&5
16133 echo "$as_me:16133: \$? = $ac_status" >&5
16134 (exit $ac_status); } &&
16135 { ac_try='test -s conftest$ac_exeext'
16136 { (eval echo "$as_me:16136: \"$ac_try\"") >&5
16137 (eval $ac_try) 2>&5
16139 echo "$as_me:16139: \$? = $ac_status" >&5
16140 (exit $ac_status); }; }; then
16141 if test "$cross_compiling" = yes; then
16142 cf_have_curses_lib=maybe
16144 cat >conftest.$ac_ext <<_ACEOF
16145 #line 16145 "configure"
16146 #include "confdefs.h"
16149 { (void) menu_driver ( 0,0 ); return 0; }
16151 rm -f conftest$ac_exeext
16152 if { (eval echo "$as_me:16152: \"$ac_link\"") >&5
16153 (eval $ac_link) 2>&5
16155 echo "$as_me:16155: \$? = $ac_status" >&5
16156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16157 { (eval echo "$as_me:16157: \"$ac_try\"") >&5
16158 (eval $ac_try) 2>&5
16160 echo "$as_me:16160: \$? = $ac_status" >&5
16161 (exit $ac_status); }; }; then
16162 cf_have_curses_lib=yes
16164 echo "$as_me: program exited with status $ac_status" >&5
16165 echo "$as_me: failed program was:" >&5
16166 cat conftest.$ac_ext >&5
16167 cf_have_curses_lib=no
16169 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16172 echo "$as_me: failed program was:" >&5
16173 cat conftest.$ac_ext >&5
16174 cf_have_curses_lib=no
16176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16177 echo "$as_me:16177: result: $cf_have_curses_lib" >&5
16178 echo "${ECHO_T}$cf_have_curses_lib" >&6
16179 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16180 if test "$cf_have_curses_lib" != "yes"
16182 CPPFLAGS="$cf_save_CPPFLAGS"
16183 LIBS="$cf_save_LIBS"
16186 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16188 cat >>confdefs.h <<EOF
16189 #define $cf_upper 1
16195 if test "$cf_have_curses_lib" = no; then
16196 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16197 echo "$as_me:16197: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16198 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16199 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16200 echo $ECHO_N "(cached) $ECHO_C" >&6
16202 ac_check_lib_save_LIBS=$LIBS
16203 LIBS="-lmenu$cf_cv_libtype $LIBS"
16204 cat >conftest.$ac_ext <<_ACEOF
16205 #line 16205 "configure"
16206 #include "confdefs.h"
16208 /* Override any gcc2 internal prototype to avoid an error. */
16212 /* We use char because int might match the return type of a gcc2
16213 builtin and then its argument prototype would still apply. */
16214 char menu_driver ();
16223 rm -f conftest.$ac_objext conftest$ac_exeext
16224 if { (eval echo "$as_me:16224: \"$ac_link\"") >&5
16225 (eval $ac_link) 2>&5
16227 echo "$as_me:16227: \$? = $ac_status" >&5
16228 (exit $ac_status); } &&
16229 { ac_try='test -s conftest$ac_exeext'
16230 { (eval echo "$as_me:16230: \"$ac_try\"") >&5
16231 (eval $ac_try) 2>&5
16233 echo "$as_me:16233: \$? = $ac_status" >&5
16234 (exit $ac_status); }; }; then
16235 eval "$as_ac_Lib=yes"
16237 echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 eval "$as_ac_Lib=no"
16241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16242 LIBS=$ac_check_lib_save_LIBS
16244 echo "$as_me:16244: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16245 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16246 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16248 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16250 cf_add_libs="-lmenu$cf_cv_libtype"
16251 # Filter out duplicates - this happens with badly-designed ".pc" files...
16252 for cf_add_1lib in $LIBS
16254 for cf_add_2lib in $cf_add_libs
16256 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16262 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16264 LIBS="$cf_add_libs"
16266 cat >>confdefs.h <<EOF
16267 #define $cf_upper 1
16274 cf_curses_headers="$cf_curses_headers menu.h"
16277 echo "$as_me:16277: checking if you want to check for form functions" >&5
16278 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16280 # Check whether --enable-form or --disable-form was given.
16281 if test "${enable_form+set}" = set; then
16282 enableval="$enable_form"
16283 test "$enableval" != no && enableval=yes
16284 if test "$enableval" != "yes" ; then
16287 cf_enable_form=$cf_default_form
16291 cf_enable_form=$cf_default_form
16294 echo "$as_me:16294: result: $cf_enable_form" >&5
16295 echo "${ECHO_T}$cf_enable_form" >&6
16296 if test $cf_enable_form = yes
16298 case $cf_cv_screen in
16303 echo "$as_me:16303: checking for NetBSD form.h" >&5
16304 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16305 if test "${cf_cv_netbsd_form_h+set}" = set; then
16306 echo $ECHO_N "(cached) $ECHO_C" >&6
16309 cat >conftest.$ac_ext <<_ACEOF
16310 #line 16310 "configure"
16311 #include "confdefs.h"
16313 #include <${cf_cv_ncurses_header:-curses.h}>
16321 int y = current_field(form)->cursor_ypos;
16322 int x = current_field(form)->cursor_xpos;
16328 rm -f conftest.$ac_objext
16329 if { (eval echo "$as_me:16329: \"$ac_compile\"") >&5
16330 (eval $ac_compile) 2>&5
16332 echo "$as_me:16332: \$? = $ac_status" >&5
16333 (exit $ac_status); } &&
16334 { ac_try='test -s conftest.$ac_objext'
16335 { (eval echo "$as_me:16335: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
16340 cf_cv_netbsd_form_h=yes
16343 echo "$as_me: failed program was:" >&5
16344 cat conftest.$ac_ext >&5
16345 cf_cv_netbsd_form_h=no
16347 rm -f conftest.$ac_objext conftest.$ac_ext
16350 echo "$as_me:16350: result: $cf_cv_netbsd_form_h" >&5
16351 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16353 test "$cf_cv_netbsd_form_h" = yes &&
16354 cat >>confdefs.h <<\EOF
16355 #define HAVE_NETBSD_FORM_H 1
16361 cf_have_curses_lib=no
16363 : ${NCURSES_CONFIG_PKG:=none}
16364 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16366 elif test "x${PKG_CONFIG:=none}" != xnone; then
16367 echo "$as_me:16367: checking pkg-config for form$cf_cv_libtype" >&5
16368 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16369 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16370 echo "$as_me:16370: result: yes" >&5
16371 echo "${ECHO_T}yes" >&6
16373 echo "$as_me:16373: checking if the form$cf_cv_libtype package files work" >&5
16374 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16376 cf_save_CPPFLAGS="$CPPFLAGS"
16377 cf_save_LIBS="$LIBS"
16382 cf_new_extra_cppflags=
16384 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16386 case $cf_fix_cppflags in
16388 case $cf_add_cflags in
16389 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16390 case $cf_add_cflags in
16392 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16395 && test -z "${cf_tst_cflags}" \
16396 && cf_fix_cppflags=yes
16398 if test $cf_fix_cppflags = yes ; then
16400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16404 elif test "${cf_tst_cflags}" = "\"'" ; then
16406 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16407 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16413 case "$CPPFLAGS" in
16417 case $cf_add_cflags in
16419 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16421 CPPFLAGS=`echo "$CPPFLAGS" | \
16422 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16423 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16428 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16429 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16436 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16437 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16447 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16449 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16450 && test -z "${cf_tst_cflags}" \
16451 && cf_fix_cppflags=no
16456 if test -n "$cf_new_cflags" ; then
16458 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16459 CFLAGS="${CFLAGS}$cf_new_cflags"
16463 if test -n "$cf_new_cppflags" ; then
16465 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16466 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16470 if test -n "$cf_new_extra_cppflags" ; then
16472 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16473 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16477 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16478 # Filter out duplicates - this happens with badly-designed ".pc" files...
16479 for cf_add_1lib in $LIBS
16481 for cf_add_2lib in $cf_add_libs
16483 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16489 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16491 LIBS="$cf_add_libs"
16493 cat >conftest.$ac_ext <<_ACEOF
16494 #line 16494 "configure"
16495 #include "confdefs.h"
16500 (void) form_driver ( 0,0 );
16505 rm -f conftest.$ac_objext conftest$ac_exeext
16506 if { (eval echo "$as_me:16506: \"$ac_link\"") >&5
16507 (eval $ac_link) 2>&5
16509 echo "$as_me:16509: \$? = $ac_status" >&5
16510 (exit $ac_status); } &&
16511 { ac_try='test -s conftest$ac_exeext'
16512 { (eval echo "$as_me:16512: \"$ac_try\"") >&5
16513 (eval $ac_try) 2>&5
16515 echo "$as_me:16515: \$? = $ac_status" >&5
16516 (exit $ac_status); }; }; then
16517 if test "$cross_compiling" = yes; then
16518 cf_have_curses_lib=maybe
16520 cat >conftest.$ac_ext <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16525 { (void) form_driver ( 0,0 ); return 0; }
16527 rm -f conftest$ac_exeext
16528 if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529 (eval $ac_link) 2>&5
16531 echo "$as_me:16531: \$? = $ac_status" >&5
16532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16533 { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534 (eval $ac_try) 2>&5
16536 echo "$as_me:16536: \$? = $ac_status" >&5
16537 (exit $ac_status); }; }; then
16538 cf_have_curses_lib=yes
16540 echo "$as_me: program exited with status $ac_status" >&5
16541 echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 cf_have_curses_lib=no
16545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16548 echo "$as_me: failed program was:" >&5
16549 cat conftest.$ac_ext >&5
16550 cf_have_curses_lib=no
16552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16553 echo "$as_me:16553: result: $cf_have_curses_lib" >&5
16554 echo "${ECHO_T}$cf_have_curses_lib" >&6
16555 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16556 if test "$cf_have_curses_lib" != "yes"
16558 CPPFLAGS="$cf_save_CPPFLAGS"
16559 LIBS="$cf_save_LIBS"
16562 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16564 cat >>confdefs.h <<EOF
16565 #define $cf_upper 1
16571 if test "$cf_have_curses_lib" = no; then
16572 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16573 echo "$as_me:16573: checking for form_driver in -lform$cf_cv_libtype" >&5
16574 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16575 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16576 echo $ECHO_N "(cached) $ECHO_C" >&6
16578 ac_check_lib_save_LIBS=$LIBS
16579 LIBS="-lform$cf_cv_libtype $LIBS"
16580 cat >conftest.$ac_ext <<_ACEOF
16581 #line 16581 "configure"
16582 #include "confdefs.h"
16584 /* Override any gcc2 internal prototype to avoid an error. */
16588 /* We use char because int might match the return type of a gcc2
16589 builtin and then its argument prototype would still apply. */
16590 char form_driver ();
16599 rm -f conftest.$ac_objext conftest$ac_exeext
16600 if { (eval echo "$as_me:16600: \"$ac_link\"") >&5
16601 (eval $ac_link) 2>&5
16603 echo "$as_me:16603: \$? = $ac_status" >&5
16604 (exit $ac_status); } &&
16605 { ac_try='test -s conftest$ac_exeext'
16606 { (eval echo "$as_me:16606: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16609 echo "$as_me:16609: \$? = $ac_status" >&5
16610 (exit $ac_status); }; }; then
16611 eval "$as_ac_Lib=yes"
16613 echo "$as_me: failed program was:" >&5
16614 cat conftest.$ac_ext >&5
16615 eval "$as_ac_Lib=no"
16617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16618 LIBS=$ac_check_lib_save_LIBS
16620 echo "$as_me:16620: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16621 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16622 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16624 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16626 cf_add_libs="-lform$cf_cv_libtype"
16627 # Filter out duplicates - this happens with badly-designed ".pc" files...
16628 for cf_add_1lib in $LIBS
16630 for cf_add_2lib in $cf_add_libs
16632 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16638 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16640 LIBS="$cf_add_libs"
16642 cat >>confdefs.h <<EOF
16643 #define $cf_upper 1
16650 cf_curses_headers="$cf_curses_headers form.h"
16653 # look for curses-related headers
16655 for ac_header in $cf_curses_headers
16657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16658 echo "$as_me:16658: checking for $ac_header" >&5
16659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16661 echo $ECHO_N "(cached) $ECHO_C" >&6
16663 cat >conftest.$ac_ext <<_ACEOF
16664 #line 16664 "configure"
16665 #include "confdefs.h"
16666 #include <$ac_header>
16668 if { (eval echo "$as_me:16668: \"$ac_cpp conftest.$ac_ext\"") >&5
16669 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16671 egrep -v '^ *\+' conftest.er1 >conftest.err
16673 cat conftest.err >&5
16674 echo "$as_me:16674: \$? = $ac_status" >&5
16675 (exit $ac_status); } >/dev/null; then
16676 if test -s conftest.err; then
16677 ac_cpp_err=$ac_c_preproc_warn_flag
16684 if test -z "$ac_cpp_err"; then
16685 eval "$as_ac_Header=yes"
16687 echo "$as_me: failed program was:" >&5
16688 cat conftest.$ac_ext >&5
16689 eval "$as_ac_Header=no"
16691 rm -f conftest.err conftest.$ac_ext
16693 echo "$as_me:16693: result: `eval echo '${'$as_ac_Header'}'`" >&5
16694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16696 cat >>confdefs.h <<EOF
16697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16703 echo "$as_me:16703: checking for ANSI C header files" >&5
16704 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16705 if test "${ac_cv_header_stdc+set}" = set; then
16706 echo $ECHO_N "(cached) $ECHO_C" >&6
16708 cat >conftest.$ac_ext <<_ACEOF
16709 #line 16709 "configure"
16710 #include "confdefs.h"
16711 #include <stdlib.h>
16712 #include <stdarg.h>
16713 #include <string.h>
16717 if { (eval echo "$as_me:16717: \"$ac_cpp conftest.$ac_ext\"") >&5
16718 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16720 egrep -v '^ *\+' conftest.er1 >conftest.err
16722 cat conftest.err >&5
16723 echo "$as_me:16723: \$? = $ac_status" >&5
16724 (exit $ac_status); } >/dev/null; then
16725 if test -s conftest.err; then
16726 ac_cpp_err=$ac_c_preproc_warn_flag
16733 if test -z "$ac_cpp_err"; then
16734 ac_cv_header_stdc=yes
16736 echo "$as_me: failed program was:" >&5
16737 cat conftest.$ac_ext >&5
16738 ac_cv_header_stdc=no
16740 rm -f conftest.err conftest.$ac_ext
16742 if test $ac_cv_header_stdc = yes; then
16743 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16744 cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747 #include <string.h>
16750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16751 egrep "memchr" >/dev/null 2>&1; then
16754 ac_cv_header_stdc=no
16760 if test $ac_cv_header_stdc = yes; then
16761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16762 cat >conftest.$ac_ext <<_ACEOF
16763 #line 16763 "configure"
16764 #include "confdefs.h"
16765 #include <stdlib.h>
16768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16769 egrep "free" >/dev/null 2>&1; then
16772 ac_cv_header_stdc=no
16778 if test $ac_cv_header_stdc = yes; then
16779 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16780 if test "$cross_compiling" = yes; then
16783 cat >conftest.$ac_ext <<_ACEOF
16784 #line 16784 "configure"
16785 #include "confdefs.h"
16787 #if ((' ' & 0x0FF) == 0x020)
16788 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16789 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16791 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16792 || ('j' <= (c) && (c) <= 'r') \
16793 || ('s' <= (c) && (c) <= 'z'))
16794 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16797 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16802 for (i = 0; i < 256; i++)
16803 if (XOR (islower (i), ISLOWER (i))
16804 || toupper (i) != TOUPPER (i))
16805 $ac_main_return(2);
16806 $ac_main_return (0);
16809 rm -f conftest$ac_exeext
16810 if { (eval echo "$as_me:16810: \"$ac_link\"") >&5
16811 (eval $ac_link) 2>&5
16813 echo "$as_me:16813: \$? = $ac_status" >&5
16814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16815 { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816 (eval $ac_try) 2>&5
16818 echo "$as_me:16818: \$? = $ac_status" >&5
16819 (exit $ac_status); }; }; then
16822 echo "$as_me: program exited with status $ac_status" >&5
16823 echo "$as_me: failed program was:" >&5
16824 cat conftest.$ac_ext >&5
16825 ac_cv_header_stdc=no
16827 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16831 echo "$as_me:16831: result: $ac_cv_header_stdc" >&5
16832 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16833 if test $ac_cv_header_stdc = yes; then
16835 cat >>confdefs.h <<\EOF
16836 #define STDC_HEADERS 1
16841 echo "$as_me:16841: checking whether time.h and sys/time.h may both be included" >&5
16842 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16843 if test "${ac_cv_header_time+set}" = set; then
16844 echo $ECHO_N "(cached) $ECHO_C" >&6
16846 cat >conftest.$ac_ext <<_ACEOF
16847 #line 16847 "configure"
16848 #include "confdefs.h"
16849 #include <sys/types.h>
16850 #include <sys/time.h>
16856 if ((struct tm *) 0)
16862 rm -f conftest.$ac_objext
16863 if { (eval echo "$as_me:16863: \"$ac_compile\"") >&5
16864 (eval $ac_compile) 2>&5
16866 echo "$as_me:16866: \$? = $ac_status" >&5
16867 (exit $ac_status); } &&
16868 { ac_try='test -s conftest.$ac_objext'
16869 { (eval echo "$as_me:16869: \"$ac_try\"") >&5
16870 (eval $ac_try) 2>&5
16872 echo "$as_me:16872: \$? = $ac_status" >&5
16873 (exit $ac_status); }; }; then
16874 ac_cv_header_time=yes
16876 echo "$as_me: failed program was:" >&5
16877 cat conftest.$ac_ext >&5
16878 ac_cv_header_time=no
16880 rm -f conftest.$ac_objext conftest.$ac_ext
16882 echo "$as_me:16882: result: $ac_cv_header_time" >&5
16883 echo "${ECHO_T}$ac_cv_header_time" >&6
16884 if test $ac_cv_header_time = yes; then
16886 cat >>confdefs.h <<\EOF
16887 #define TIME_WITH_SYS_TIME 1
16905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16906 echo "$as_me:16906: checking for $ac_header" >&5
16907 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16909 echo $ECHO_N "(cached) $ECHO_C" >&6
16911 cat >conftest.$ac_ext <<_ACEOF
16912 #line 16912 "configure"
16913 #include "confdefs.h"
16914 #include <$ac_header>
16916 if { (eval echo "$as_me:16916: \"$ac_cpp conftest.$ac_ext\"") >&5
16917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16919 egrep -v '^ *\+' conftest.er1 >conftest.err
16921 cat conftest.err >&5
16922 echo "$as_me:16922: \$? = $ac_status" >&5
16923 (exit $ac_status); } >/dev/null; then
16924 if test -s conftest.err; then
16925 ac_cpp_err=$ac_c_preproc_warn_flag
16932 if test -z "$ac_cpp_err"; then
16933 eval "$as_ac_Header=yes"
16935 echo "$as_me: failed program was:" >&5
16936 cat conftest.$ac_ext >&5
16937 eval "$as_ac_Header=no"
16939 rm -f conftest.err conftest.$ac_ext
16941 echo "$as_me:16941: result: `eval echo '${'$as_ac_Header'}'`" >&5
16942 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16943 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16944 cat >>confdefs.h <<EOF
16945 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16951 for ac_header in unistd.h getopt.h
16953 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16954 echo "$as_me:16954: checking for $ac_header" >&5
16955 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16957 echo $ECHO_N "(cached) $ECHO_C" >&6
16959 cat >conftest.$ac_ext <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16962 #include <$ac_header>
16964 if { (eval echo "$as_me:16964: \"$ac_cpp conftest.$ac_ext\"") >&5
16965 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16967 egrep -v '^ *\+' conftest.er1 >conftest.err
16969 cat conftest.err >&5
16970 echo "$as_me:16970: \$? = $ac_status" >&5
16971 (exit $ac_status); } >/dev/null; then
16972 if test -s conftest.err; then
16973 ac_cpp_err=$ac_c_preproc_warn_flag
16980 if test -z "$ac_cpp_err"; then
16981 eval "$as_ac_Header=yes"
16983 echo "$as_me: failed program was:" >&5
16984 cat conftest.$ac_ext >&5
16985 eval "$as_ac_Header=no"
16987 rm -f conftest.err conftest.$ac_ext
16989 echo "$as_me:16989: result: `eval echo '${'$as_ac_Header'}'`" >&5
16990 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16991 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16992 cat >>confdefs.h <<EOF
16993 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16999 echo "$as_me:16999: checking for header declaring getopt variables" >&5
17000 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17001 if test "${cf_cv_getopt_header+set}" = set; then
17002 echo $ECHO_N "(cached) $ECHO_C" >&6
17005 cf_cv_getopt_header=none
17006 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17008 cat >conftest.$ac_ext <<_ACEOF
17009 #line 17009 "configure"
17010 #include "confdefs.h"
17012 #include <$cf_header>
17016 int x = optind; char *y = optarg
17021 rm -f conftest.$ac_objext
17022 if { (eval echo "$as_me:17022: \"$ac_compile\"") >&5
17023 (eval $ac_compile) 2>&5
17025 echo "$as_me:17025: \$? = $ac_status" >&5
17026 (exit $ac_status); } &&
17027 { ac_try='test -s conftest.$ac_objext'
17028 { (eval echo "$as_me:17028: \"$ac_try\"") >&5
17029 (eval $ac_try) 2>&5
17031 echo "$as_me:17031: \$? = $ac_status" >&5
17032 (exit $ac_status); }; }; then
17033 cf_cv_getopt_header=$cf_header
17036 echo "$as_me: failed program was:" >&5
17037 cat conftest.$ac_ext >&5
17039 rm -f conftest.$ac_objext conftest.$ac_ext
17043 echo "$as_me:17043: result: $cf_cv_getopt_header" >&5
17044 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17045 if test $cf_cv_getopt_header != none ; then
17047 cat >>confdefs.h <<\EOF
17048 #define HAVE_GETOPT_HEADER 1
17052 if test $cf_cv_getopt_header = getopt.h ; then
17054 cat >>confdefs.h <<\EOF
17055 #define NEED_GETOPT_H 1
17067 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17068 echo "$as_me:17068: checking for $ac_func" >&5
17069 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17070 if eval "test \"\${$as_ac_var+set}\" = set"; then
17071 echo $ECHO_N "(cached) $ECHO_C" >&6
17073 cat >conftest.$ac_ext <<_ACEOF
17074 #line 17074 "configure"
17075 #include "confdefs.h"
17076 #define $ac_func autoconf_temporary
17077 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17084 /* We use char because int might match the return type of a gcc2
17085 builtin and then its argument prototype would still apply. */
17086 char $ac_func (void);
17092 /* The GNU C library defines stubs for functions which it implements
17093 to always fail with ENOSYS. Some functions are actually named
17094 something starting with __ and the normal name is an alias. */
17095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17096 #error found stub for $ac_func
17099 return $ac_func ();
17104 rm -f conftest.$ac_objext conftest$ac_exeext
17105 if { (eval echo "$as_me:17105: \"$ac_link\"") >&5
17106 (eval $ac_link) 2>&5
17108 echo "$as_me:17108: \$? = $ac_status" >&5
17109 (exit $ac_status); } &&
17110 { ac_try='test -s conftest$ac_exeext'
17111 { (eval echo "$as_me:17111: \"$ac_try\"") >&5
17112 (eval $ac_try) 2>&5
17114 echo "$as_me:17114: \$? = $ac_status" >&5
17115 (exit $ac_status); }; }; then
17116 eval "$as_ac_var=yes"
17118 echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 eval "$as_ac_var=no"
17122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17124 echo "$as_me:17124: result: `eval echo '${'$as_ac_var'}'`" >&5
17125 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17126 if test `eval echo '${'$as_ac_var'}'` = yes; then
17127 cat >>confdefs.h <<EOF
17128 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17134 # use a compile-check to work with ncurses*-config and subdirectory includes
17135 echo "$as_me:17135: checking if we can use termcap.h" >&5
17136 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17137 if test "${cf_cv_have_termcap_h+set}" = set; then
17138 echo $ECHO_N "(cached) $ECHO_C" >&6
17141 cat >conftest.$ac_ext <<_ACEOF
17142 #line 17142 "configure"
17143 #include "confdefs.h"
17145 #include <curses.h>
17146 #ifdef NCURSES_VERSION
17147 #undef NCURSES_VERSION
17149 #include <termcap.h>
17150 #ifndef NCURSES_VERSION
17151 #error wrong header
17162 rm -f conftest.$ac_objext
17163 if { (eval echo "$as_me:17163: \"$ac_compile\"") >&5
17164 (eval $ac_compile) 2>&5
17166 echo "$as_me:17166: \$? = $ac_status" >&5
17167 (exit $ac_status); } &&
17168 { ac_try='test -s conftest.$ac_objext'
17169 { (eval echo "$as_me:17169: \"$ac_try\"") >&5
17170 (eval $ac_try) 2>&5
17172 echo "$as_me:17172: \$? = $ac_status" >&5
17173 (exit $ac_status); }; }; then
17174 cf_cv_have_termcap_h=yes
17176 echo "$as_me: failed program was:" >&5
17177 cat conftest.$ac_ext >&5
17178 cf_cv_have_termcap_h=no
17180 rm -f conftest.$ac_objext conftest.$ac_ext
17182 echo "$as_me:17182: result: $cf_cv_have_termcap_h" >&5
17183 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17184 if test "x$cf_cv_have_termcap_h" = xyes
17186 cat >>confdefs.h <<\EOF
17187 #define HAVE_TERMCAP_H 1
17191 echo "$as_me:17191: checking if we can use ncurses/termcap.h" >&5
17192 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17193 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17194 echo $ECHO_N "(cached) $ECHO_C" >&6
17197 cat >conftest.$ac_ext <<_ACEOF
17198 #line 17198 "configure"
17199 #include "confdefs.h"
17201 #include <ncurses/curses.h>
17202 #ifdef NCURSES_VERSION
17203 #undef NCURSES_VERSION
17205 #include <ncurses/termcap.h>
17206 #ifndef NCURSES_VERSION
17207 #error wrong header
17218 rm -f conftest.$ac_objext
17219 if { (eval echo "$as_me:17219: \"$ac_compile\"") >&5
17220 (eval $ac_compile) 2>&5
17222 echo "$as_me:17222: \$? = $ac_status" >&5
17223 (exit $ac_status); } &&
17224 { ac_try='test -s conftest.$ac_objext'
17225 { (eval echo "$as_me:17225: \"$ac_try\"") >&5
17226 (eval $ac_try) 2>&5
17228 echo "$as_me:17228: \$? = $ac_status" >&5
17229 (exit $ac_status); }; }; then
17230 cf_cv_have_ncurses_termcap_h=yes
17232 echo "$as_me: failed program was:" >&5
17233 cat conftest.$ac_ext >&5
17234 cf_cv_have_ncurses_termcap_h=no
17236 rm -f conftest.$ac_objext conftest.$ac_ext
17238 echo "$as_me:17238: result: $cf_cv_have_ncurses_termcap_h" >&5
17239 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17240 test "x$cf_cv_have_ncurses_termcap_h" = xyes && cat >>confdefs.h <<\EOF
17241 #define HAVE_NCURSES_TERMCAP_H 1
17246 if test "x$ac_cv_func_getopt" = xno; then
17247 { { echo "$as_me:17247: error: getopt is required for building programs" >&5
17248 echo "$as_me: error: getopt is required for building programs" >&2;}
17249 { (exit 1); exit 1; }; }
17252 if test "$cf_enable_widec" = yes; then
17265 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17266 echo "$as_me:17266: checking for $ac_func" >&5
17267 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17268 if eval "test \"\${$as_ac_var+set}\" = set"; then
17269 echo $ECHO_N "(cached) $ECHO_C" >&6
17271 cat >conftest.$ac_ext <<_ACEOF
17272 #line 17272 "configure"
17273 #include "confdefs.h"
17274 #define $ac_func autoconf_temporary
17275 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17282 /* We use char because int might match the return type of a gcc2
17283 builtin and then its argument prototype would still apply. */
17284 char $ac_func (void);
17290 /* The GNU C library defines stubs for functions which it implements
17291 to always fail with ENOSYS. Some functions are actually named
17292 something starting with __ and the normal name is an alias. */
17293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17294 #error found stub for $ac_func
17297 return $ac_func ();
17302 rm -f conftest.$ac_objext conftest$ac_exeext
17303 if { (eval echo "$as_me:17303: \"$ac_link\"") >&5
17304 (eval $ac_link) 2>&5
17306 echo "$as_me:17306: \$? = $ac_status" >&5
17307 (exit $ac_status); } &&
17308 { ac_try='test -s conftest$ac_exeext'
17309 { (eval echo "$as_me:17309: \"$ac_try\"") >&5
17310 (eval $ac_try) 2>&5
17312 echo "$as_me:17312: \$? = $ac_status" >&5
17313 (exit $ac_status); }; }; then
17314 eval "$as_ac_var=yes"
17316 echo "$as_me: failed program was:" >&5
17317 cat conftest.$ac_ext >&5
17318 eval "$as_ac_var=no"
17320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17322 echo "$as_me:17322: result: `eval echo '${'$as_ac_var'}'`" >&5
17323 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17324 if test `eval echo '${'$as_ac_var'}'` = yes; then
17325 cat >>confdefs.h <<EOF
17326 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17334 echo "$as_me:17334: checking definition to turn on extended curses functions" >&5
17335 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17336 if test "${cf_cv_need_xopen_extension+set}" = set; then
17337 echo $ECHO_N "(cached) $ECHO_C" >&6
17340 cf_cv_need_xopen_extension=unknown
17341 cat >conftest.$ac_ext <<_ACEOF
17342 #line 17342 "configure"
17343 #include "confdefs.h"
17345 #include <stdlib.h>
17346 #include <${cf_cv_ncurses_header:-curses.h}>
17351 #if defined(NCURSES_VERSION_PATCH)
17352 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17356 #ifdef NCURSES_VERSION
17358 int check2 = curs_set((int)sizeof(check));
17360 long x = winnstr(stdscr, "", 0);
17362 getbegyx(stdscr, y1, x1)
17367 rm -f conftest.$ac_objext conftest$ac_exeext
17368 if { (eval echo "$as_me:17368: \"$ac_link\"") >&5
17369 (eval $ac_link) 2>&5
17371 echo "$as_me:17371: \$? = $ac_status" >&5
17372 (exit $ac_status); } &&
17373 { ac_try='test -s conftest$ac_exeext'
17374 { (eval echo "$as_me:17374: \"$ac_try\"") >&5
17375 (eval $ac_try) 2>&5
17377 echo "$as_me:17377: \$? = $ac_status" >&5
17378 (exit $ac_status); }; }; then
17379 cf_cv_need_xopen_extension=none
17381 echo "$as_me: failed program was:" >&5
17382 cat conftest.$ac_ext >&5
17384 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17386 cat >conftest.$ac_ext <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17390 #define $cf_try_xopen_extension 1
17391 #include <stdlib.h>
17392 #include <${cf_cv_ncurses_header:-curses.h}>
17397 #ifdef NCURSES_VERSION
17399 int check2 = curs_set((int)sizeof(check));
17401 long x = winnstr(stdscr, "", 0);
17403 getbegyx(stdscr, y1, x1)
17408 rm -f conftest.$ac_objext conftest$ac_exeext
17409 if { (eval echo "$as_me:17409: \"$ac_link\"") >&5
17410 (eval $ac_link) 2>&5
17412 echo "$as_me:17412: \$? = $ac_status" >&5
17413 (exit $ac_status); } &&
17414 { ac_try='test -s conftest$ac_exeext'
17415 { (eval echo "$as_me:17415: \"$ac_try\"") >&5
17416 (eval $ac_try) 2>&5
17418 echo "$as_me:17418: \$? = $ac_status" >&5
17419 (exit $ac_status); }; }; then
17420 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17422 echo "$as_me: failed program was:" >&5
17423 cat conftest.$ac_ext >&5
17425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17432 echo "$as_me:17432: result: $cf_cv_need_xopen_extension" >&5
17433 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17435 case $cf_cv_need_xopen_extension in
17438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17439 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17444 echo "$as_me:17444: checking for term.h" >&5
17445 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17446 if test "${cf_cv_term_header+set}" = set; then
17447 echo $ECHO_N "(cached) $ECHO_C" >&6
17450 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17451 # for <term.h> if we do not find the variant.
17453 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17455 case ${cf_cv_ncurses_header:-curses.h} in
17457 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17458 cf_header_list="$cf_header_item $cf_header_list"
17462 for cf_header in $cf_header_list
17464 cat >conftest.$ac_ext <<_ACEOF
17465 #line 17465 "configure"
17466 #include "confdefs.h"
17468 #include <${cf_cv_ncurses_header:-curses.h}>
17469 #include <${cf_header}>
17478 rm -f conftest.$ac_objext
17479 if { (eval echo "$as_me:17479: \"$ac_compile\"") >&5
17480 (eval $ac_compile) 2>&5
17482 echo "$as_me:17482: \$? = $ac_status" >&5
17483 (exit $ac_status); } &&
17484 { ac_try='test -s conftest.$ac_objext'
17485 { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486 (eval $ac_try) 2>&5
17488 echo "$as_me:17488: \$? = $ac_status" >&5
17489 (exit $ac_status); }; }; then
17490 cf_cv_term_header=$cf_header
17493 echo "$as_me: failed program was:" >&5
17494 cat conftest.$ac_ext >&5
17495 cf_cv_term_header=no
17497 rm -f conftest.$ac_objext conftest.$ac_ext
17500 case $cf_cv_term_header in
17502 # If curses is ncurses, some packagers still mess it up by trying to make
17503 # us use GNU termcap. This handles the most common case.
17504 for cf_header in ncurses/term.h ncursesw/term.h
17506 cat >conftest.$ac_ext <<_ACEOF
17507 #line 17507 "configure"
17508 #include "confdefs.h"
17510 #include <${cf_cv_ncurses_header:-curses.h}>
17511 #ifdef NCURSES_VERSION
17512 #include <${cf_header}>
17524 rm -f conftest.$ac_objext
17525 if { (eval echo "$as_me:17525: \"$ac_compile\"") >&5
17526 (eval $ac_compile) 2>&5
17528 echo "$as_me:17528: \$? = $ac_status" >&5
17529 (exit $ac_status); } &&
17530 { ac_try='test -s conftest.$ac_objext'
17531 { (eval echo "$as_me:17531: \"$ac_try\"") >&5
17532 (eval $ac_try) 2>&5
17534 echo "$as_me:17534: \$? = $ac_status" >&5
17535 (exit $ac_status); }; }; then
17536 cf_cv_term_header=$cf_header
17539 echo "$as_me: failed program was:" >&5
17540 cat conftest.$ac_ext >&5
17541 cf_cv_term_header=no
17543 rm -f conftest.$ac_objext conftest.$ac_ext
17549 echo "$as_me:17549: result: $cf_cv_term_header" >&5
17550 echo "${ECHO_T}$cf_cv_term_header" >&6
17552 case $cf_cv_term_header in
17555 cat >>confdefs.h <<\EOF
17556 #define HAVE_TERM_H 1
17562 cat >>confdefs.h <<\EOF
17563 #define HAVE_NCURSES_TERM_H 1
17569 cat >>confdefs.h <<\EOF
17570 #define HAVE_NCURSESW_TERM_H 1
17576 echo "$as_me:17576: checking for unctrl.h" >&5
17577 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17578 if test "${cf_cv_unctrl_header+set}" = set; then
17579 echo $ECHO_N "(cached) $ECHO_C" >&6
17582 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17583 # for <unctrl.h> if we do not find the variant.
17585 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17587 case ${cf_cv_ncurses_header:-curses.h} in
17589 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17590 cf_header_list="$cf_header_item $cf_header_list"
17594 for cf_header in $cf_header_list
17596 cat >conftest.$ac_ext <<_ACEOF
17597 #line 17597 "configure"
17598 #include "confdefs.h"
17600 #include <${cf_cv_ncurses_header:-curses.h}>
17601 #include <${cf_header}>
17610 rm -f conftest.$ac_objext
17611 if { (eval echo "$as_me:17611: \"$ac_compile\"") >&5
17612 (eval $ac_compile) 2>&5
17614 echo "$as_me:17614: \$? = $ac_status" >&5
17615 (exit $ac_status); } &&
17616 { ac_try='test -s conftest.$ac_objext'
17617 { (eval echo "$as_me:17617: \"$ac_try\"") >&5
17618 (eval $ac_try) 2>&5
17620 echo "$as_me:17620: \$? = $ac_status" >&5
17621 (exit $ac_status); }; }; then
17622 cf_cv_unctrl_header=$cf_header
17625 echo "$as_me: failed program was:" >&5
17626 cat conftest.$ac_ext >&5
17627 cf_cv_unctrl_header=no
17629 rm -f conftest.$ac_objext conftest.$ac_ext
17633 echo "$as_me:17633: result: $cf_cv_unctrl_header" >&5
17634 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17636 case $cf_cv_unctrl_header in
17638 { echo "$as_me:17638: WARNING: unctrl.h header not found" >&5
17639 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17643 case $cf_cv_unctrl_header in
17646 cat >>confdefs.h <<\EOF
17647 #define HAVE_UNCTRL_H 1
17653 cat >>confdefs.h <<\EOF
17654 #define HAVE_NCURSES_UNCTRL_H 1
17658 (ncursesw/unctrl.h)
17660 cat >>confdefs.h <<\EOF
17661 #define HAVE_NCURSESW_UNCTRL_H 1
17669 assume_default_colors \
17684 init_extended_color \
17692 reset_color_pairs \
17707 use_default_colors \
17709 use_extended_names \
17725 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17727 echo "$as_me:17727: checking for ${cf_func}" >&5
17728 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17730 echo "${as_me:-configure}:17730: testing ${cf_func} ..." 1>&5
17732 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17733 echo $ECHO_N "(cached) $ECHO_C" >&6
17736 eval cf_result='$ac_cv_func_'$cf_func
17737 if test ".$cf_result" != ".no"; then
17738 cat >conftest.$ac_ext <<_ACEOF
17739 #line 17739 "configure"
17740 #include "confdefs.h"
17742 #ifdef HAVE_XCURSES
17743 #include <xcurses.h>
17744 char * XCursesProgramName = "test";
17746 #include <${cf_cv_ncurses_header:-curses.h}>
17747 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17748 #include <ncursesw/term.h>
17749 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17750 #include <ncurses/term.h>
17751 #elif defined(HAVE_TERM_H)
17761 long foo = (long)(&${cf_func});
17762 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17763 if (foo + 1234L > 5678L)
17764 ${cf_cv_main_return:-return}(foo != 0);
17771 rm -f conftest.$ac_objext conftest$ac_exeext
17772 if { (eval echo "$as_me:17772: \"$ac_link\"") >&5
17773 (eval $ac_link) 2>&5
17775 echo "$as_me:17775: \$? = $ac_status" >&5
17776 (exit $ac_status); } &&
17777 { ac_try='test -s conftest$ac_exeext'
17778 { (eval echo "$as_me:17778: \"$ac_try\"") >&5
17779 (eval $ac_try) 2>&5
17781 echo "$as_me:17781: \$? = $ac_status" >&5
17782 (exit $ac_status); }; }; then
17785 echo "$as_me: failed program was:" >&5
17786 cat conftest.$ac_ext >&5
17789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17791 eval 'cf_cv_func_'$cf_func'=$cf_result'
17795 # use the computed/retrieved cache-value:
17796 eval 'cf_result=$cf_cv_func_'$cf_func
17797 echo "$as_me:17797: result: $cf_result" >&5
17798 echo "${ECHO_T}$cf_result" >&6
17799 if test $cf_result != no; then
17800 cat >>confdefs.h <<EOF
17801 #define HAVE_${cf_tr_func} 1
17807 for cf_func in tputs
17810 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17812 echo "$as_me:17812: checking for ${cf_func}" >&5
17813 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17815 echo "${as_me:-configure}:17815: testing ${cf_func} ..." 1>&5
17817 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17818 echo $ECHO_N "(cached) $ECHO_C" >&6
17821 eval cf_result='$ac_cv_func_'$cf_func
17822 if test ".$cf_result" != ".no"; then
17823 cat >conftest.$ac_ext <<_ACEOF
17824 #line 17824 "configure"
17825 #include "confdefs.h"
17827 #ifdef HAVE_XCURSES
17828 #include <xcurses.h>
17829 char * XCursesProgramName = "test";
17831 #include <${cf_cv_ncurses_header:-curses.h}>
17832 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17833 #include <ncursesw/term.h>
17834 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17835 #include <ncurses/term.h>
17836 #elif defined(HAVE_TERM_H)
17846 long foo = (long)(&${cf_func});
17847 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17848 if (foo + 1234L > 5678L)
17849 ${cf_cv_main_return:-return}(foo != 0);
17856 rm -f conftest.$ac_objext conftest$ac_exeext
17857 if { (eval echo "$as_me:17857: \"$ac_link\"") >&5
17858 (eval $ac_link) 2>&5
17860 echo "$as_me:17860: \$? = $ac_status" >&5
17861 (exit $ac_status); } &&
17862 { ac_try='test -s conftest$ac_exeext'
17863 { (eval echo "$as_me:17863: \"$ac_try\"") >&5
17864 (eval $ac_try) 2>&5
17866 echo "$as_me:17866: \$? = $ac_status" >&5
17867 (exit $ac_status); }; }; then
17870 echo "$as_me: failed program was:" >&5
17871 cat conftest.$ac_ext >&5
17874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17876 eval 'cf_cv_func_'$cf_func'=$cf_result'
17880 # use the computed/retrieved cache-value:
17881 eval 'cf_result=$cf_cv_func_'$cf_func
17882 echo "$as_me:17882: result: $cf_result" >&5
17883 echo "${ECHO_T}$cf_result" >&6
17884 if test $cf_result != no; then
17885 cat >>confdefs.h <<EOF
17886 #define HAVE_${cf_tr_func} 1
17892 if test x$cf_cv_func_tputs = xyes
17895 for cf_arg in int char
17897 for cf_ret in int void
17899 if test $cf_ret = void
17901 cf_return="/* nothing */"
17903 cf_return="return value"
17905 cat >conftest.$ac_ext <<_ACEOF
17906 #line 17906 "configure"
17907 #include "confdefs.h"
17909 #include <${cf_cv_ncurses_header:-curses.h}>
17910 #include <$cf_cv_term_header>
17912 static $cf_ret outc($cf_arg value) { $cf_return; }
17918 tputs("hello", 0, outc);
17919 ${cf_cv_main_return:-return}(0);
17925 rm -f conftest.$ac_objext
17926 if { (eval echo "$as_me:17926: \"$ac_compile\"") >&5
17927 (eval $ac_compile) 2>&5
17929 echo "$as_me:17929: \$? = $ac_status" >&5
17930 (exit $ac_status); } &&
17931 { ac_try='test -s conftest.$ac_objext'
17932 { (eval echo "$as_me:17932: \"$ac_try\"") >&5
17933 (eval $ac_try) 2>&5
17935 echo "$as_me:17935: \$? = $ac_status" >&5
17936 (exit $ac_status); }; }; then
17938 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17940 echo "${as_me:-configure}:17940: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17942 cat >>confdefs.h <<EOF
17943 #define TPUTS_ARG $cf_arg
17944 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17945 #define TPUTS_RETURN(value) $cf_return
17951 echo "$as_me: failed program was:" >&5
17952 cat conftest.$ac_ext >&5
17954 rm -f conftest.$ac_objext conftest.$ac_ext
17956 test $cf_done = yes && break
17960 echo "$as_me:17960: checking for ncurses extended functions" >&5
17961 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17962 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17963 echo $ECHO_N "(cached) $ECHO_C" >&6
17966 cat >conftest.$ac_ext <<_ACEOF
17967 #line 17967 "configure"
17968 #include "confdefs.h"
17970 #include <${cf_cv_ncurses_header:-curses.h}>
17975 int x = NCURSES_EXT_FUNCS
17981 rm -f conftest.$ac_objext
17982 if { (eval echo "$as_me:17982: \"$ac_compile\"") >&5
17983 (eval $ac_compile) 2>&5
17985 echo "$as_me:17985: \$? = $ac_status" >&5
17986 (exit $ac_status); } &&
17987 { ac_try='test -s conftest.$ac_objext'
17988 { (eval echo "$as_me:17988: \"$ac_try\"") >&5
17989 (eval $ac_try) 2>&5
17991 echo "$as_me:17991: \$? = $ac_status" >&5
17992 (exit $ac_status); }; }; then
17993 cf_cv_ncurses_ext_funcs=defined
17995 echo "$as_me: failed program was:" >&5
17996 cat conftest.$ac_ext >&5
17998 cat >conftest.$ac_ext <<_ACEOF
17999 #line 17999 "configure"
18000 #include "confdefs.h"
18002 #include <${cf_cv_ncurses_header:-curses.h}>
18007 (void) assume_default_colors (0, 0);
18008 (void) curses_version ();
18009 (void) define_key (0, 0);
18010 (void) is_term_resized (0, 0);
18011 (void) key_defined (0);
18012 (void) keybound (0, 0);
18013 (void) keyok (0, 0);
18014 (void) resize_term (0, 0);
18015 (void) resizeterm (0, 0);
18016 (void) use_default_colors ();
18017 (void) use_extended_names (0);
18018 (void) wresize (0, 0, 0);
18023 rm -f conftest.$ac_objext conftest$ac_exeext
18024 if { (eval echo "$as_me:18024: \"$ac_link\"") >&5
18025 (eval $ac_link) 2>&5
18027 echo "$as_me:18027: \$? = $ac_status" >&5
18028 (exit $ac_status); } &&
18029 { ac_try='test -s conftest$ac_exeext'
18030 { (eval echo "$as_me:18030: \"$ac_try\"") >&5
18031 (eval $ac_try) 2>&5
18033 echo "$as_me:18033: \$? = $ac_status" >&5
18034 (exit $ac_status); }; }; then
18035 cf_cv_ncurses_ext_funcs=yes
18037 echo "$as_me: failed program was:" >&5
18038 cat conftest.$ac_ext >&5
18039 cf_cv_ncurses_ext_funcs=no
18041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18044 rm -f conftest.$ac_objext conftest.$ac_ext
18047 echo "$as_me:18047: result: $cf_cv_ncurses_ext_funcs" >&5
18048 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18049 test "$cf_cv_ncurses_ext_funcs" = yes &&
18050 cat >>confdefs.h <<\EOF
18051 #define NCURSES_EXT_FUNCS 1
18054 if test "$cf_enable_widec" = yes
18056 # workaround for systems with ncurses before 20111029, due to change of
18057 # feature test macro from _XPG5 to _XOPEN_SOURCE
18058 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18061 echo "$as_me:18061: checking if _XPG5 should be defined to enable wide-characters" >&5
18062 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18064 cat >conftest.$ac_ext <<_ACEOF
18065 #line 18065 "configure"
18066 #include "confdefs.h"
18068 #include <${cf_cv_ncurses_header:-curses.h}>
18077 rm -f conftest.$ac_objext
18078 if { (eval echo "$as_me:18078: \"$ac_compile\"") >&5
18079 (eval $ac_compile) 2>&5
18081 echo "$as_me:18081: \$? = $ac_status" >&5
18082 (exit $ac_status); } &&
18083 { ac_try='test -s conftest.$ac_objext'
18084 { (eval echo "$as_me:18084: \"$ac_try\"") >&5
18085 (eval $ac_try) 2>&5
18087 echo "$as_me:18087: \$? = $ac_status" >&5
18088 (exit $ac_status); }; }; then
18091 echo "$as_me: failed program was:" >&5
18092 cat conftest.$ac_ext >&5
18093 cf_save_cppflags="$CPPFLAGS"
18094 CPPFLAGS="$CPPFLAGS -D_XPG5"
18095 cat >conftest.$ac_ext <<_ACEOF
18096 #line 18096 "configure"
18097 #include "confdefs.h"
18099 #include <${cf_cv_ncurses_header:-curses.h}>
18108 rm -f conftest.$ac_objext
18109 if { (eval echo "$as_me:18109: \"$ac_compile\"") >&5
18110 (eval $ac_compile) 2>&5
18112 echo "$as_me:18112: \$? = $ac_status" >&5
18113 (exit $ac_status); } &&
18114 { ac_try='test -s conftest.$ac_objext'
18115 { (eval echo "$as_me:18115: \"$ac_try\"") >&5
18116 (eval $ac_try) 2>&5
18118 echo "$as_me:18118: \$? = $ac_status" >&5
18119 (exit $ac_status); }; }; then
18122 echo "$as_me: failed program was:" >&5
18123 cat conftest.$ac_ext >&5
18125 rm -f conftest.$ac_objext conftest.$ac_ext
18126 CPPFLAGS="$cf_save_cppflags"
18128 rm -f conftest.$ac_objext conftest.$ac_ext
18129 echo "$as_me:18129: result: $cf_define_xpg5" >&5
18130 echo "${ECHO_T}$cf_define_xpg5" >&6
18132 if test "$cf_define_xpg5" = yes
18134 CPPFLAGS="$CPPFLAGS -D_XPG5"
18138 echo "$as_me:18138: checking for wide-character functions" >&5
18139 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18140 if test "${cf_cv_widechar_funcs+set}" = set; then
18141 echo $ECHO_N "(cached) $ECHO_C" >&6
18144 cat >conftest.$ac_ext <<_ACEOF
18145 #line 18145 "configure"
18146 #include "confdefs.h"
18148 #include <${cf_cv_ncurses_header:-curses.h}>
18153 static wchar_t src_wchar[2];
18154 static cchar_t dst_cchar;
18155 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18161 rm -f conftest.$ac_objext conftest$ac_exeext
18162 if { (eval echo "$as_me:18162: \"$ac_link\"") >&5
18163 (eval $ac_link) 2>&5
18165 echo "$as_me:18165: \$? = $ac_status" >&5
18166 (exit $ac_status); } &&
18167 { ac_try='test -s conftest$ac_exeext'
18168 { (eval echo "$as_me:18168: \"$ac_try\"") >&5
18169 (eval $ac_try) 2>&5
18171 echo "$as_me:18171: \$? = $ac_status" >&5
18172 (exit $ac_status); }; }; then
18173 cf_cv_widechar_funcs=yes
18175 echo "$as_me: failed program was:" >&5
18176 cat conftest.$ac_ext >&5
18177 cf_cv_widechar_funcs=no
18179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18182 echo "$as_me:18182: result: $cf_cv_widechar_funcs" >&5
18183 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18184 if test "$cf_cv_widechar_funcs" != no ; then
18186 cat >>confdefs.h <<\EOF
18187 #define USE_WIDEC_SUPPORT 1
18191 cat >>confdefs.h <<\EOF
18192 #define USE_WIDEC_SUPPORT 0
18197 cat >>confdefs.h <<\EOF
18198 #define USE_WIDEC_SUPPORT 0
18203 echo "$as_me:18203: checking if $cf_cv_screen library uses pthreads" >&5
18204 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18205 if test "${cf_cv_use_pthreads+set}" = set; then
18206 echo $ECHO_N "(cached) $ECHO_C" >&6
18209 cat >conftest.$ac_ext <<_ACEOF
18210 #line 18210 "configure"
18211 #include "confdefs.h"
18213 #include <${cf_cv_ncurses_header:-curses.h}>
18214 extern void _nc_init_pthreads(void);
18221 _nc_init_pthreads();
18227 rm -f conftest.$ac_objext conftest$ac_exeext
18228 if { (eval echo "$as_me:18228: \"$ac_link\"") >&5
18229 (eval $ac_link) 2>&5
18231 echo "$as_me:18231: \$? = $ac_status" >&5
18232 (exit $ac_status); } &&
18233 { ac_try='test -s conftest$ac_exeext'
18234 { (eval echo "$as_me:18234: \"$ac_try\"") >&5
18235 (eval $ac_try) 2>&5
18237 echo "$as_me:18237: \$? = $ac_status" >&5
18238 (exit $ac_status); }; }; then
18239 cf_cv_use_pthreads=yes
18241 echo "$as_me: failed program was:" >&5
18242 cat conftest.$ac_ext >&5
18243 cf_cv_use_pthreads=no
18245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18248 echo "$as_me:18248: result: $cf_cv_use_pthreads" >&5
18249 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18250 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
18251 #define USE_PTHREADS 1
18254 echo "$as_me:18254: checking if sys/time.h works with sys/select.h" >&5
18255 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18256 if test "${cf_cv_sys_time_select+set}" = set; then
18257 echo $ECHO_N "(cached) $ECHO_C" >&6
18260 cat >conftest.$ac_ext <<_ACEOF
18261 #line 18261 "configure"
18262 #include "confdefs.h"
18264 #include <sys/types.h>
18265 #ifdef HAVE_SYS_TIME_H
18266 #include <sys/time.h>
18268 #ifdef HAVE_SYS_SELECT_H
18269 #include <sys/select.h>
18280 rm -f conftest.$ac_objext
18281 if { (eval echo "$as_me:18281: \"$ac_compile\"") >&5
18282 (eval $ac_compile) 2>&5
18284 echo "$as_me:18284: \$? = $ac_status" >&5
18285 (exit $ac_status); } &&
18286 { ac_try='test -s conftest.$ac_objext'
18287 { (eval echo "$as_me:18287: \"$ac_try\"") >&5
18288 (eval $ac_try) 2>&5
18290 echo "$as_me:18290: \$? = $ac_status" >&5
18291 (exit $ac_status); }; }; then
18292 cf_cv_sys_time_select=yes
18294 echo "$as_me: failed program was:" >&5
18295 cat conftest.$ac_ext >&5
18296 cf_cv_sys_time_select=no
18298 rm -f conftest.$ac_objext conftest.$ac_ext
18302 echo "$as_me:18302: result: $cf_cv_sys_time_select" >&5
18303 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18304 test "$cf_cv_sys_time_select" = yes &&
18305 cat >>confdefs.h <<\EOF
18306 #define HAVE_SYS_TIME_SELECT 1
18309 # special check for test/ditto.c
18311 echo "$as_me:18311: checking for openpty in -lutil" >&5
18312 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18313 if test "${ac_cv_lib_util_openpty+set}" = set; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
18316 ac_check_lib_save_LIBS=$LIBS
18317 LIBS="-lutil $LIBS"
18318 cat >conftest.$ac_ext <<_ACEOF
18319 #line 18319 "configure"
18320 #include "confdefs.h"
18322 /* Override any gcc2 internal prototype to avoid an error. */
18326 /* We use char because int might match the return type of a gcc2
18327 builtin and then its argument prototype would still apply. */
18337 rm -f conftest.$ac_objext conftest$ac_exeext
18338 if { (eval echo "$as_me:18338: \"$ac_link\"") >&5
18339 (eval $ac_link) 2>&5
18341 echo "$as_me:18341: \$? = $ac_status" >&5
18342 (exit $ac_status); } &&
18343 { ac_try='test -s conftest$ac_exeext'
18344 { (eval echo "$as_me:18344: \"$ac_try\"") >&5
18345 (eval $ac_try) 2>&5
18347 echo "$as_me:18347: \$? = $ac_status" >&5
18348 (exit $ac_status); }; }; then
18349 ac_cv_lib_util_openpty=yes
18351 echo "$as_me: failed program was:" >&5
18352 cat conftest.$ac_ext >&5
18353 ac_cv_lib_util_openpty=no
18355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18356 LIBS=$ac_check_lib_save_LIBS
18358 echo "$as_me:18358: result: $ac_cv_lib_util_openpty" >&5
18359 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18360 if test $ac_cv_lib_util_openpty = yes; then
18366 echo "$as_me:18366: checking for openpty header" >&5
18367 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18368 if test "${cf_cv_func_openpty+set}" = set; then
18369 echo $ECHO_N "(cached) $ECHO_C" >&6
18372 cf_save_LIBS="$LIBS"
18373 test $cf_cv_lib_util = yes && {
18374 cf_add_libs="-lutil"
18375 # Filter out duplicates - this happens with badly-designed ".pc" files...
18376 for cf_add_1lib in $LIBS
18378 for cf_add_2lib in $cf_add_libs
18380 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18386 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18388 LIBS="$cf_add_libs"
18390 for cf_header in pty.h libutil.h util.h
18392 cat >conftest.$ac_ext <<_ACEOF
18393 #line 18393 "configure"
18394 #include "confdefs.h"
18396 #include <$cf_header>
18402 int x = openpty((int *)0, (int *)0, (char *)0,
18403 (struct termios *)0, (struct winsize *)0);
18409 rm -f conftest.$ac_objext conftest$ac_exeext
18410 if { (eval echo "$as_me:18410: \"$ac_link\"") >&5
18411 (eval $ac_link) 2>&5
18413 echo "$as_me:18413: \$? = $ac_status" >&5
18414 (exit $ac_status); } &&
18415 { ac_try='test -s conftest$ac_exeext'
18416 { (eval echo "$as_me:18416: \"$ac_try\"") >&5
18417 (eval $ac_try) 2>&5
18419 echo "$as_me:18419: \$? = $ac_status" >&5
18420 (exit $ac_status); }; }; then
18422 cf_cv_func_openpty=$cf_header
18426 echo "$as_me: failed program was:" >&5
18427 cat conftest.$ac_ext >&5
18429 cf_cv_func_openpty=no
18432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18434 LIBS="$cf_save_LIBS"
18437 echo "$as_me:18437: result: $cf_cv_func_openpty" >&5
18438 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18440 if test "$cf_cv_func_openpty" != no ; then
18442 cat >>confdefs.h <<EOF
18443 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18446 cat >>confdefs.h <<\EOF
18447 #define USE_XTERM_PTY 1
18450 if test "x$cf_cv_lib_util" = xyes ; then
18452 cf_add_libs="-lutil"
18453 # Filter out duplicates - this happens with badly-designed ".pc" files...
18454 for cf_add_1lib in $TEST_LIBS
18456 for cf_add_2lib in $cf_add_libs
18458 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18464 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18466 TEST_LIBS="$cf_add_libs"
18471 echo "$as_me:18471: checking for function curses_version" >&5
18472 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18473 if test "${cf_cv_func_curses_version+set}" = set; then
18474 echo $ECHO_N "(cached) $ECHO_C" >&6
18477 if test "$cross_compiling" = yes; then
18478 cf_cv_func_curses_version=unknown
18480 cat >conftest.$ac_ext <<_ACEOF
18481 #line 18481 "configure"
18482 #include "confdefs.h"
18484 #include <${cf_cv_ncurses_header:-curses.h}>
18488 sprintf(temp, "%s\n", curses_version());
18489 ${cf_cv_main_return:-return}(0);
18493 rm -f conftest$ac_exeext
18494 if { (eval echo "$as_me:18494: \"$ac_link\"") >&5
18495 (eval $ac_link) 2>&5
18497 echo "$as_me:18497: \$? = $ac_status" >&5
18498 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18499 { (eval echo "$as_me:18499: \"$ac_try\"") >&5
18500 (eval $ac_try) 2>&5
18502 echo "$as_me:18502: \$? = $ac_status" >&5
18503 (exit $ac_status); }; }; then
18504 cf_cv_func_curses_version=yes
18507 echo "$as_me: program exited with status $ac_status" >&5
18508 echo "$as_me: failed program was:" >&5
18509 cat conftest.$ac_ext >&5
18510 cf_cv_func_curses_version=no
18513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18517 echo "$as_me:18517: result: $cf_cv_func_curses_version" >&5
18518 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18519 test "$cf_cv_func_curses_version" = yes &&
18520 cat >>confdefs.h <<\EOF
18521 #define HAVE_CURSES_VERSION 1
18524 echo "$as_me:18524: checking for alternate character set array" >&5
18525 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18526 if test "${cf_cv_curses_acs_map+set}" = set; then
18527 echo $ECHO_N "(cached) $ECHO_C" >&6
18530 cf_cv_curses_acs_map=unknown
18531 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18533 cat >conftest.$ac_ext <<_ACEOF
18534 #line 18534 "configure"
18535 #include "confdefs.h"
18537 #include <${cf_cv_ncurses_header:-curses.h}>
18543 $name['k'] = ACS_PLUS
18549 rm -f conftest.$ac_objext conftest$ac_exeext
18550 if { (eval echo "$as_me:18550: \"$ac_link\"") >&5
18551 (eval $ac_link) 2>&5
18553 echo "$as_me:18553: \$? = $ac_status" >&5
18554 (exit $ac_status); } &&
18555 { ac_try='test -s conftest$ac_exeext'
18556 { (eval echo "$as_me:18556: \"$ac_try\"") >&5
18557 (eval $ac_try) 2>&5
18559 echo "$as_me:18559: \$? = $ac_status" >&5
18560 (exit $ac_status); }; }; then
18561 cf_cv_curses_acs_map=$name; break
18563 echo "$as_me: failed program was:" >&5
18564 cat conftest.$ac_ext >&5
18566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18570 echo "$as_me:18570: result: $cf_cv_curses_acs_map" >&5
18571 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18573 test "$cf_cv_curses_acs_map" != unknown &&
18574 cat >>confdefs.h <<EOF
18575 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18578 if test "$cf_enable_widec" = yes; then
18580 echo "$as_me:18580: checking for wide alternate character set array" >&5
18581 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18582 if test "${cf_cv_curses_wacs_map+set}" = set; then
18583 echo $ECHO_N "(cached) $ECHO_C" >&6
18586 cf_cv_curses_wacs_map=unknown
18587 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18589 cat >conftest.$ac_ext <<_ACEOF
18590 #line 18590 "configure"
18591 #include "confdefs.h"
18593 #ifndef _XOPEN_SOURCE_EXTENDED
18594 #define _XOPEN_SOURCE_EXTENDED
18596 #include <${cf_cv_ncurses_header:-curses.h}>
18600 void *foo = &($name['k'])
18605 rm -f conftest.$ac_objext conftest$ac_exeext
18606 if { (eval echo "$as_me:18606: \"$ac_link\"") >&5
18607 (eval $ac_link) 2>&5
18609 echo "$as_me:18609: \$? = $ac_status" >&5
18610 (exit $ac_status); } &&
18611 { ac_try='test -s conftest$ac_exeext'
18612 { (eval echo "$as_me:18612: \"$ac_try\"") >&5
18613 (eval $ac_try) 2>&5
18615 echo "$as_me:18615: \$? = $ac_status" >&5
18616 (exit $ac_status); }; }; then
18617 cf_cv_curses_wacs_map=$name
18620 echo "$as_me: failed program was:" >&5
18621 cat conftest.$ac_ext >&5
18623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18626 echo "$as_me:18626: result: $cf_cv_curses_wacs_map" >&5
18627 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18629 test "$cf_cv_curses_wacs_map" != unknown &&
18630 cat >>confdefs.h <<EOF
18631 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18634 echo "$as_me:18634: checking for wide alternate character constants" >&5
18635 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18636 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18637 echo $ECHO_N "(cached) $ECHO_C" >&6
18640 cf_cv_curses_wacs_symbols=no
18641 if test "$cf_cv_curses_wacs_map" != unknown
18643 cat >conftest.$ac_ext <<_ACEOF
18644 #line 18644 "configure"
18645 #include "confdefs.h"
18647 #ifndef _XOPEN_SOURCE_EXTENDED
18648 #define _XOPEN_SOURCE_EXTENDED
18650 #include <${cf_cv_ncurses_header:-curses.h}>
18654 cchar_t *foo = WACS_PLUS;
18655 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18660 rm -f conftest.$ac_objext conftest$ac_exeext
18661 if { (eval echo "$as_me:18661: \"$ac_link\"") >&5
18662 (eval $ac_link) 2>&5
18664 echo "$as_me:18664: \$? = $ac_status" >&5
18665 (exit $ac_status); } &&
18666 { ac_try='test -s conftest$ac_exeext'
18667 { (eval echo "$as_me:18667: \"$ac_try\"") >&5
18668 (eval $ac_try) 2>&5
18670 echo "$as_me:18670: \$? = $ac_status" >&5
18671 (exit $ac_status); }; }; then
18672 cf_cv_curses_wacs_symbols=yes
18674 echo "$as_me: failed program was:" >&5
18675 cat conftest.$ac_ext >&5
18677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18679 cat >conftest.$ac_ext <<_ACEOF
18680 #line 18680 "configure"
18681 #include "confdefs.h"
18683 #ifndef _XOPEN_SOURCE_EXTENDED
18684 #define _XOPEN_SOURCE_EXTENDED
18686 #include <${cf_cv_ncurses_header:-curses.h}>
18690 cchar_t *foo = WACS_PLUS
18695 rm -f conftest.$ac_objext conftest$ac_exeext
18696 if { (eval echo "$as_me:18696: \"$ac_link\"") >&5
18697 (eval $ac_link) 2>&5
18699 echo "$as_me:18699: \$? = $ac_status" >&5
18700 (exit $ac_status); } &&
18701 { ac_try='test -s conftest$ac_exeext'
18702 { (eval echo "$as_me:18702: \"$ac_try\"") >&5
18703 (eval $ac_try) 2>&5
18705 echo "$as_me:18705: \$? = $ac_status" >&5
18706 (exit $ac_status); }; }; then
18707 cf_cv_curses_wacs_symbols=yes
18709 echo "$as_me: failed program was:" >&5
18710 cat conftest.$ac_ext >&5
18712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18716 echo "$as_me:18716: result: $cf_cv_curses_wacs_symbols" >&5
18717 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18719 test "$cf_cv_curses_wacs_symbols" != no &&
18720 cat >>confdefs.h <<\EOF
18721 #define CURSES_WACS_SYMBOLS 1
18726 echo "$as_me:18726: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18727 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18728 cat >conftest.$ac_ext <<_ACEOF
18729 #line 18729 "configure"
18730 #include "confdefs.h"
18732 #ifndef _XOPEN_SOURCE_EXTENDED
18733 #define _XOPEN_SOURCE_EXTENDED
18735 #include <${cf_cv_ncurses_header:-curses.h}>
18746 rm -f conftest.$ac_objext
18747 if { (eval echo "$as_me:18747: \"$ac_compile\"") >&5
18748 (eval $ac_compile) 2>&5
18750 echo "$as_me:18750: \$? = $ac_status" >&5
18751 (exit $ac_status); } &&
18752 { ac_try='test -s conftest.$ac_objext'
18753 { (eval echo "$as_me:18753: \"$ac_try\"") >&5
18754 (eval $ac_try) 2>&5
18756 echo "$as_me:18756: \$? = $ac_status" >&5
18757 (exit $ac_status); }; }; then
18760 echo "$as_me: failed program was:" >&5
18761 cat conftest.$ac_ext >&5
18764 rm -f conftest.$ac_objext conftest.$ac_ext
18765 echo "$as_me:18765: result: $cf_result" >&5
18766 echo "${ECHO_T}$cf_result" >&6
18767 if test $cf_result = yes ; then
18769 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18771 cat >>confdefs.h <<EOF
18772 #define $cf_result 1
18777 cat >>confdefs.h <<EOF
18778 #define attr_t long
18783 if test "$cf_enable_widec" = yes; then
18785 # This is needed on Tru64 5.0 to declare mbstate_t
18786 echo "$as_me:18786: checking if we must include wchar.h to declare mbstate_t" >&5
18787 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18788 if test "${cf_cv_mbstate_t+set}" = set; then
18789 echo $ECHO_N "(cached) $ECHO_C" >&6
18792 cat >conftest.$ac_ext <<_ACEOF
18793 #line 18793 "configure"
18794 #include "confdefs.h"
18796 #include <stdlib.h>
18797 #include <stdarg.h>
18799 #ifdef HAVE_LIBUTF8_H
18800 #include <libutf8.h>
18810 rm -f conftest.$ac_objext
18811 if { (eval echo "$as_me:18811: \"$ac_compile\"") >&5
18812 (eval $ac_compile) 2>&5
18814 echo "$as_me:18814: \$? = $ac_status" >&5
18815 (exit $ac_status); } &&
18816 { ac_try='test -s conftest.$ac_objext'
18817 { (eval echo "$as_me:18817: \"$ac_try\"") >&5
18818 (eval $ac_try) 2>&5
18820 echo "$as_me:18820: \$? = $ac_status" >&5
18821 (exit $ac_status); }; }; then
18824 echo "$as_me: failed program was:" >&5
18825 cat conftest.$ac_ext >&5
18826 cat >conftest.$ac_ext <<_ACEOF
18827 #line 18827 "configure"
18828 #include "confdefs.h"
18830 #include <stdlib.h>
18831 #include <stdarg.h>
18834 #ifdef HAVE_LIBUTF8_H
18835 #include <libutf8.h>
18845 rm -f conftest.$ac_objext
18846 if { (eval echo "$as_me:18846: \"$ac_compile\"") >&5
18847 (eval $ac_compile) 2>&5
18849 echo "$as_me:18849: \$? = $ac_status" >&5
18850 (exit $ac_status); } &&
18851 { ac_try='test -s conftest.$ac_objext'
18852 { (eval echo "$as_me:18852: \"$ac_try\"") >&5
18853 (eval $ac_try) 2>&5
18855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit $ac_status); }; }; then
18857 cf_cv_mbstate_t=yes
18859 echo "$as_me: failed program was:" >&5
18860 cat conftest.$ac_ext >&5
18861 cf_cv_mbstate_t=unknown
18863 rm -f conftest.$ac_objext conftest.$ac_ext
18865 rm -f conftest.$ac_objext conftest.$ac_ext
18867 echo "$as_me:18867: result: $cf_cv_mbstate_t" >&5
18868 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18870 if test "$cf_cv_mbstate_t" = yes ; then
18872 cat >>confdefs.h <<\EOF
18873 #define NEED_WCHAR_H 1
18879 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18880 if test "$cf_cv_mbstate_t" = unknown ; then
18881 NCURSES_MBSTATE_T=1
18884 # if we find mbstate_t in either place, use substitution to provide a fallback.
18885 if test "$cf_cv_mbstate_t" != unknown ; then
18886 NCURSES_OK_MBSTATE_T=1
18889 # This is needed on Tru64 5.0 to declare wchar_t
18890 echo "$as_me:18890: checking if we must include wchar.h to declare wchar_t" >&5
18891 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18892 if test "${cf_cv_wchar_t+set}" = set; then
18893 echo $ECHO_N "(cached) $ECHO_C" >&6
18896 cat >conftest.$ac_ext <<_ACEOF
18897 #line 18897 "configure"
18898 #include "confdefs.h"
18900 #include <stdlib.h>
18901 #include <stdarg.h>
18903 #ifdef HAVE_LIBUTF8_H
18904 #include <libutf8.h>
18914 rm -f conftest.$ac_objext
18915 if { (eval echo "$as_me:18915: \"$ac_compile\"") >&5
18916 (eval $ac_compile) 2>&5
18918 echo "$as_me:18918: \$? = $ac_status" >&5
18919 (exit $ac_status); } &&
18920 { ac_try='test -s conftest.$ac_objext'
18921 { (eval echo "$as_me:18921: \"$ac_try\"") >&5
18922 (eval $ac_try) 2>&5
18924 echo "$as_me:18924: \$? = $ac_status" >&5
18925 (exit $ac_status); }; }; then
18928 echo "$as_me: failed program was:" >&5
18929 cat conftest.$ac_ext >&5
18930 cat >conftest.$ac_ext <<_ACEOF
18931 #line 18931 "configure"
18932 #include "confdefs.h"
18934 #include <stdlib.h>
18935 #include <stdarg.h>
18938 #ifdef HAVE_LIBUTF8_H
18939 #include <libutf8.h>
18949 rm -f conftest.$ac_objext
18950 if { (eval echo "$as_me:18950: \"$ac_compile\"") >&5
18951 (eval $ac_compile) 2>&5
18953 echo "$as_me:18953: \$? = $ac_status" >&5
18954 (exit $ac_status); } &&
18955 { ac_try='test -s conftest.$ac_objext'
18956 { (eval echo "$as_me:18956: \"$ac_try\"") >&5
18957 (eval $ac_try) 2>&5
18959 echo "$as_me:18959: \$? = $ac_status" >&5
18960 (exit $ac_status); }; }; then
18963 echo "$as_me: failed program was:" >&5
18964 cat conftest.$ac_ext >&5
18965 cf_cv_wchar_t=unknown
18967 rm -f conftest.$ac_objext conftest.$ac_ext
18969 rm -f conftest.$ac_objext conftest.$ac_ext
18971 echo "$as_me:18971: result: $cf_cv_wchar_t" >&5
18972 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18974 if test "$cf_cv_wchar_t" = yes ; then
18976 cat >>confdefs.h <<\EOF
18977 #define NEED_WCHAR_H 1
18983 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18984 if test "$cf_cv_wchar_t" = unknown ; then
18988 # if we find wchar_t in either place, use substitution to provide a fallback.
18989 if test "$cf_cv_wchar_t" != unknown ; then
18990 NCURSES_OK_WCHAR_T=1
18993 # This is needed on Tru64 5.0 to declare wint_t
18994 echo "$as_me:18994: checking if we must include wchar.h to declare wint_t" >&5
18995 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18996 if test "${cf_cv_wint_t+set}" = set; then
18997 echo $ECHO_N "(cached) $ECHO_C" >&6
19000 cat >conftest.$ac_ext <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19004 #include <stdlib.h>
19005 #include <stdarg.h>
19007 #ifdef HAVE_LIBUTF8_H
19008 #include <libutf8.h>
19018 rm -f conftest.$ac_objext
19019 if { (eval echo "$as_me:19019: \"$ac_compile\"") >&5
19020 (eval $ac_compile) 2>&5
19022 echo "$as_me:19022: \$? = $ac_status" >&5
19023 (exit $ac_status); } &&
19024 { ac_try='test -s conftest.$ac_objext'
19025 { (eval echo "$as_me:19025: \"$ac_try\"") >&5
19026 (eval $ac_try) 2>&5
19028 echo "$as_me:19028: \$? = $ac_status" >&5
19029 (exit $ac_status); }; }; then
19032 echo "$as_me: failed program was:" >&5
19033 cat conftest.$ac_ext >&5
19034 cat >conftest.$ac_ext <<_ACEOF
19035 #line 19035 "configure"
19036 #include "confdefs.h"
19038 #include <stdlib.h>
19039 #include <stdarg.h>
19042 #ifdef HAVE_LIBUTF8_H
19043 #include <libutf8.h>
19053 rm -f conftest.$ac_objext
19054 if { (eval echo "$as_me:19054: \"$ac_compile\"") >&5
19055 (eval $ac_compile) 2>&5
19057 echo "$as_me:19057: \$? = $ac_status" >&5
19058 (exit $ac_status); } &&
19059 { ac_try='test -s conftest.$ac_objext'
19060 { (eval echo "$as_me:19060: \"$ac_try\"") >&5
19061 (eval $ac_try) 2>&5
19063 echo "$as_me:19063: \$? = $ac_status" >&5
19064 (exit $ac_status); }; }; then
19067 echo "$as_me: failed program was:" >&5
19068 cat conftest.$ac_ext >&5
19069 cf_cv_wint_t=unknown
19071 rm -f conftest.$ac_objext conftest.$ac_ext
19073 rm -f conftest.$ac_objext conftest.$ac_ext
19075 echo "$as_me:19075: result: $cf_cv_wint_t" >&5
19076 echo "${ECHO_T}$cf_cv_wint_t" >&6
19078 if test "$cf_cv_wint_t" = yes ; then
19080 cat >>confdefs.h <<\EOF
19081 #define NEED_WCHAR_H 1
19087 # if we do not find wint_t in either place, use substitution to provide a fallback.
19088 if test "$cf_cv_wint_t" = unknown ; then
19092 # if we find wint_t in either place, use substitution to provide a fallback.
19093 if test "$cf_cv_wint_t" != unknown ; then
19094 NCURSES_OK_WINT_T=1
19097 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19099 echo "$as_me:19099: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19100 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19101 cat >conftest.$ac_ext <<_ACEOF
19102 #line 19102 "configure"
19103 #include "confdefs.h"
19105 #ifndef _XOPEN_SOURCE_EXTENDED
19106 #define _XOPEN_SOURCE_EXTENDED
19108 #include <${cf_cv_ncurses_header:-curses.h}>
19119 rm -f conftest.$ac_objext
19120 if { (eval echo "$as_me:19120: \"$ac_compile\"") >&5
19121 (eval $ac_compile) 2>&5
19123 echo "$as_me:19123: \$? = $ac_status" >&5
19124 (exit $ac_status); } &&
19125 { ac_try='test -s conftest.$ac_objext'
19126 { (eval echo "$as_me:19126: \"$ac_try\"") >&5
19127 (eval $ac_try) 2>&5
19129 echo "$as_me:19129: \$? = $ac_status" >&5
19130 (exit $ac_status); }; }; then
19133 echo "$as_me: failed program was:" >&5
19134 cat conftest.$ac_ext >&5
19137 rm -f conftest.$ac_objext conftest.$ac_ext
19138 echo "$as_me:19138: result: $cf_result" >&5
19139 echo "${ECHO_T}$cf_result" >&6
19140 if test $cf_result = yes ; then
19142 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19144 cat >>confdefs.h <<EOF
19145 #define $cf_result 1
19150 cat >>confdefs.h <<EOF
19151 #define mbstate_t long
19158 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19160 echo "$as_me:19160: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19161 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19162 cat >conftest.$ac_ext <<_ACEOF
19163 #line 19163 "configure"
19164 #include "confdefs.h"
19166 #ifndef _XOPEN_SOURCE_EXTENDED
19167 #define _XOPEN_SOURCE_EXTENDED
19169 #include <${cf_cv_ncurses_header:-curses.h}>
19180 rm -f conftest.$ac_objext
19181 if { (eval echo "$as_me:19181: \"$ac_compile\"") >&5
19182 (eval $ac_compile) 2>&5
19184 echo "$as_me:19184: \$? = $ac_status" >&5
19185 (exit $ac_status); } &&
19186 { ac_try='test -s conftest.$ac_objext'
19187 { (eval echo "$as_me:19187: \"$ac_try\"") >&5
19188 (eval $ac_try) 2>&5
19190 echo "$as_me:19190: \$? = $ac_status" >&5
19191 (exit $ac_status); }; }; then
19194 echo "$as_me: failed program was:" >&5
19195 cat conftest.$ac_ext >&5
19198 rm -f conftest.$ac_objext conftest.$ac_ext
19199 echo "$as_me:19199: result: $cf_result" >&5
19200 echo "${ECHO_T}$cf_result" >&6
19201 if test $cf_result = yes ; then
19203 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19205 cat >>confdefs.h <<EOF
19206 #define $cf_result 1
19211 cat >>confdefs.h <<EOF
19212 #define wchar_t long
19219 if test "$NCURSES_OK_WINT_T" = 0 ; then
19221 echo "$as_me:19221: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19222 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19223 cat >conftest.$ac_ext <<_ACEOF
19224 #line 19224 "configure"
19225 #include "confdefs.h"
19227 #ifndef _XOPEN_SOURCE_EXTENDED
19228 #define _XOPEN_SOURCE_EXTENDED
19230 #include <${cf_cv_ncurses_header:-curses.h}>
19241 rm -f conftest.$ac_objext
19242 if { (eval echo "$as_me:19242: \"$ac_compile\"") >&5
19243 (eval $ac_compile) 2>&5
19245 echo "$as_me:19245: \$? = $ac_status" >&5
19246 (exit $ac_status); } &&
19247 { ac_try='test -s conftest.$ac_objext'
19248 { (eval echo "$as_me:19248: \"$ac_try\"") >&5
19249 (eval $ac_try) 2>&5
19251 echo "$as_me:19251: \$? = $ac_status" >&5
19252 (exit $ac_status); }; }; then
19255 echo "$as_me: failed program was:" >&5
19256 cat conftest.$ac_ext >&5
19259 rm -f conftest.$ac_objext conftest.$ac_ext
19260 echo "$as_me:19260: result: $cf_result" >&5
19261 echo "${ECHO_T}$cf_result" >&6
19262 if test $cf_result = yes ; then
19264 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19266 cat >>confdefs.h <<EOF
19267 #define $cf_result 1
19272 cat >>confdefs.h <<EOF
19273 #define wint_t long
19289 echo "$as_me:19289: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19290 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19292 cat >conftest.$ac_ext <<_ACEOF
19293 #line 19293 "configure"
19294 #include "confdefs.h"
19296 #ifdef HAVE_XCURSES
19297 #include <xcurses.h>
19298 char * XCursesProgramName = "test";
19300 #include <${cf_cv_ncurses_header:-curses.h}>
19301 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19302 #include <ncursesw/term.h>
19303 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19304 #include <ncurses/term.h>
19305 #elif defined(HAVE_TERM_H)
19314 void *foo = &($cf_data)
19320 rm -f conftest.$ac_objext
19321 if { (eval echo "$as_me:19321: \"$ac_compile\"") >&5
19322 (eval $ac_compile) 2>&5
19324 echo "$as_me:19324: \$? = $ac_status" >&5
19325 (exit $ac_status); } &&
19326 { ac_try='test -s conftest.$ac_objext'
19327 { (eval echo "$as_me:19327: \"$ac_try\"") >&5
19328 (eval $ac_try) 2>&5
19330 echo "$as_me:19330: \$? = $ac_status" >&5
19331 (exit $ac_status); }; }; then
19335 echo "$as_me: failed program was:" >&5
19336 cat conftest.$ac_ext >&5
19339 rm -f conftest.$ac_objext conftest.$ac_ext
19340 echo "$as_me:19340: result: $cf_result" >&5
19341 echo "${ECHO_T}$cf_result" >&6
19343 if test $cf_result = yes ; then
19345 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19347 cat >>confdefs.h <<EOF
19348 #define $cf_result 1
19352 echo "$as_me:19352: checking for data $cf_data in library" >&5
19353 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19354 # BSD linkers insist on making weak linkage, but resolve at runtime.
19355 if test "$cross_compiling" = yes; then
19358 cat >conftest.$ac_ext <<_ACEOF
19359 #line 19359 "configure"
19360 #include "confdefs.h"
19362 #ifdef HAVE_XCURSES
19363 #include <xcurses.h>
19364 char * XCursesProgramName = "test";
19366 #include <${cf_cv_ncurses_header:-curses.h}>
19367 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19368 #include <ncursesw/term.h>
19369 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19370 #include <ncurses/term.h>
19371 #elif defined(HAVE_TERM_H)
19376 extern char $cf_data;
19382 void *foo = &($cf_data);
19383 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19384 ${cf_cv_main_return:-return}(foo == 0);
19391 rm -f conftest.$ac_objext conftest$ac_exeext
19392 if { (eval echo "$as_me:19392: \"$ac_link\"") >&5
19393 (eval $ac_link) 2>&5
19395 echo "$as_me:19395: \$? = $ac_status" >&5
19396 (exit $ac_status); } &&
19397 { ac_try='test -s conftest$ac_exeext'
19398 { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399 (eval $ac_try) 2>&5
19401 echo "$as_me:19401: \$? = $ac_status" >&5
19402 (exit $ac_status); }; }; then
19405 echo "$as_me: failed program was:" >&5
19406 cat conftest.$ac_ext >&5
19409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19412 cat >conftest.$ac_ext <<_ACEOF
19413 #line 19413 "configure"
19414 #include "confdefs.h"
19416 #ifdef HAVE_XCURSES
19417 #include <xcurses.h>
19418 char * XCursesProgramName = "test";
19420 #include <${cf_cv_ncurses_header:-curses.h}>
19421 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19422 #include <ncursesw/term.h>
19423 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19424 #include <ncurses/term.h>
19425 #elif defined(HAVE_TERM_H)
19430 extern char $cf_data;
19433 void *foo = &($cf_data);
19434 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19435 ${cf_cv_main_return:-return}(foo == 0);
19438 rm -f conftest$ac_exeext
19439 if { (eval echo "$as_me:19439: \"$ac_link\"") >&5
19440 (eval $ac_link) 2>&5
19442 echo "$as_me:19442: \$? = $ac_status" >&5
19443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19444 { (eval echo "$as_me:19444: \"$ac_try\"") >&5
19445 (eval $ac_try) 2>&5
19447 echo "$as_me:19447: \$? = $ac_status" >&5
19448 (exit $ac_status); }; }; then
19452 echo "$as_me: program exited with status $ac_status" >&5
19453 echo "$as_me: failed program was:" >&5
19454 cat conftest.$ac_ext >&5
19457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19459 echo "$as_me:19459: result: $cf_result" >&5
19460 echo "${ECHO_T}$cf_result" >&6
19461 if test $cf_result = yes ; then
19463 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19465 cat >>confdefs.h <<EOF
19466 #define $cf_result 1
19469 # do not exit loop here, since we prefer system's declarations
19474 if ( test "$GCC" = yes || test "$GXX" = yes )
19476 echo "$as_me:19476: checking if you want to turn on gcc warnings" >&5
19477 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19479 # Check whether --enable-warnings or --disable-warnings was given.
19480 if test "${enable_warnings+set}" = set; then
19481 enableval="$enable_warnings"
19482 test "$enableval" != yes && enableval=no
19483 if test "$enableval" != "no" ; then
19493 echo "$as_me:19493: result: $with_warnings" >&5
19494 echo "${ECHO_T}$with_warnings" >&6
19495 if test "$with_warnings" = "yes"
19498 if test "$GCC" = yes
19500 cat > conftest.i <<EOF
19502 #define GCC_PRINTF 0
19505 #define GCC_SCANF 0
19507 #ifndef GCC_NORETURN
19508 #define GCC_NORETURN /* nothing */
19511 #define GCC_UNUSED /* nothing */
19514 if test "$GCC" = yes
19516 { echo "$as_me:19516: checking for $CC __attribute__ directives..." >&5
19517 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19518 cat > conftest.$ac_ext <<EOF
19519 #line 19519 "${as_me:-configure}"
19520 #include "confdefs.h"
19521 #include "conftest.h"
19522 #include "conftest.i"
19524 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19526 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19529 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19531 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19533 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19534 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19535 extern void foo(void) GCC_NORETURN;
19536 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19538 cf_printf_attribute=no
19539 cf_scanf_attribute=no
19540 for cf_attribute in scanf printf unused noreturn
19543 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19545 cf_directive="__attribute__(($cf_attribute))"
19546 echo "checking for $CC $cf_directive" 1>&5
19548 case $cf_attribute in
19550 cf_printf_attribute=yes
19551 cat >conftest.h <<EOF
19552 #define GCC_$cf_ATTRIBUTE 1
19556 cf_scanf_attribute=yes
19557 cat >conftest.h <<EOF
19558 #define GCC_$cf_ATTRIBUTE 1
19562 cat >conftest.h <<EOF
19563 #define GCC_$cf_ATTRIBUTE $cf_directive
19568 if { (eval echo "$as_me:19568: \"$ac_compile\"") >&5
19569 (eval $ac_compile) 2>&5
19571 echo "$as_me:19571: \$? = $ac_status" >&5
19572 (exit $ac_status); }; then
19573 test -n "$verbose" && echo "$as_me:19573: result: ... $cf_attribute" >&5
19574 echo "${ECHO_T}... $cf_attribute" >&6
19575 cat conftest.h >>confdefs.h
19576 case $cf_attribute in
19579 cat >>confdefs.h <<EOF
19580 #define GCC_NORETURN $cf_directive
19585 cf_value='/* nothing */'
19586 if test "$cf_printf_attribute" != no ; then
19587 cf_value='__attribute__((format(printf,fmt,var)))'
19589 cat >>confdefs.h <<\EOF
19590 #define GCC_PRINTF 1
19595 cat >>confdefs.h <<EOF
19596 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19601 cf_value='/* nothing */'
19602 if test "$cf_scanf_attribute" != no ; then
19603 cf_value='__attribute__((format(scanf,fmt,var)))'
19605 cat >>confdefs.h <<\EOF
19606 #define GCC_SCANF 1
19611 cat >>confdefs.h <<EOF
19612 #define GCC_SCANFLIKE(fmt,var) $cf_value
19618 cat >>confdefs.h <<EOF
19619 #define GCC_UNUSED $cf_directive
19627 fgrep define conftest.i >>confdefs.h
19632 if test "x$have_x" = xyes; then
19633 cat >conftest.$ac_ext <<_ACEOF
19634 #line 19634 "configure"
19635 #include "confdefs.h"
19637 #include <stdlib.h>
19638 #include <X11/Intrinsic.h>
19643 String foo = malloc(1)
19648 rm -f conftest.$ac_objext
19649 if { (eval echo "$as_me:19649: \"$ac_compile\"") >&5
19650 (eval $ac_compile) 2>&5
19652 echo "$as_me:19652: \$? = $ac_status" >&5
19653 (exit $ac_status); } &&
19654 { ac_try='test -s conftest.$ac_objext'
19655 { (eval echo "$as_me:19655: \"$ac_try\"") >&5
19656 (eval $ac_try) 2>&5
19658 echo "$as_me:19658: \$? = $ac_status" >&5
19659 (exit $ac_status); }; }; then
19661 echo "$as_me:19661: checking for X11/Xt const-feature" >&5
19662 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
19663 if test "${cf_cv_const_x_string+set}" = set; then
19664 echo $ECHO_N "(cached) $ECHO_C" >&6
19667 cat >conftest.$ac_ext <<_ACEOF
19668 #line 19668 "configure"
19669 #include "confdefs.h"
19671 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
19672 #undef XTSTRINGDEFINES /* X11R5 and later */
19673 #include <stdlib.h>
19674 #include <X11/Intrinsic.h>
19679 String foo = malloc(1); *foo = 0
19684 rm -f conftest.$ac_objext
19685 if { (eval echo "$as_me:19685: \"$ac_compile\"") >&5
19686 (eval $ac_compile) 2>&5
19688 echo "$as_me:19688: \$? = $ac_status" >&5
19689 (exit $ac_status); } &&
19690 { ac_try='test -s conftest.$ac_objext'
19691 { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692 (eval $ac_try) 2>&5
19694 echo "$as_me:19694: \$? = $ac_status" >&5
19695 (exit $ac_status); }; }; then
19697 cf_cv_const_x_string=no
19700 echo "$as_me: failed program was:" >&5
19701 cat conftest.$ac_ext >&5
19703 cf_cv_const_x_string=yes
19706 rm -f conftest.$ac_objext conftest.$ac_ext
19709 echo "$as_me:19709: result: $cf_cv_const_x_string" >&5
19710 echo "${ECHO_T}$cf_cv_const_x_string" >&6
19712 case $cf_cv_const_x_string in
19715 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19716 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19721 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19722 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
19728 echo "$as_me: failed program was:" >&5
19729 cat conftest.$ac_ext >&5
19731 rm -f conftest.$ac_objext conftest.$ac_ext
19733 cat > conftest.$ac_ext <<EOF
19734 #line 19734 "${as_me:-configure}"
19735 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19737 if test "$INTEL_COMPILER" = yes
19739 # The "-wdXXX" options suppress warnings:
19740 # remark #1419: external declaration in primary source file
19741 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19742 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19743 # remark #193: zero used for undefined preprocessing identifier
19744 # remark #593: variable "curs_sb_left_arrow" was set but never used
19745 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19746 # remark #869: parameter "tw" was never referenced
19747 # remark #981: operands are evaluated in unspecified order
19748 # warning #279: controlling expression is constant
19750 { echo "$as_me:19750: checking for $CC warning options..." >&5
19751 echo "$as_me: checking for $CC warning options..." >&6;}
19752 cf_save_CFLAGS="$CFLAGS"
19753 EXTRA_CFLAGS="-Wall"
19765 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19766 if { (eval echo "$as_me:19766: \"$ac_compile\"") >&5
19767 (eval $ac_compile) 2>&5
19769 echo "$as_me:19769: \$? = $ac_status" >&5
19770 (exit $ac_status); }; then
19771 test -n "$verbose" && echo "$as_me:19771: result: ... -$cf_opt" >&5
19772 echo "${ECHO_T}... -$cf_opt" >&6
19773 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19776 CFLAGS="$cf_save_CFLAGS"
19777 elif test "$GCC" = yes
19779 { echo "$as_me:19779: checking for $CC warning options..." >&5
19780 echo "$as_me: checking for $CC warning options..." >&6;}
19781 cf_save_CFLAGS="$CFLAGS"
19784 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19785 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19786 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19787 for cf_opt in W Wall \
19788 Wbad-function-cast \
19791 Wdeclaration-after-statement \
19794 Wmissing-declarations \
19795 Wmissing-prototypes \
19799 Wstrict-prototypes \
19800 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19802 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19803 if { (eval echo "$as_me:19803: \"$ac_compile\"") >&5
19804 (eval $ac_compile) 2>&5
19806 echo "$as_me:19806: \$? = $ac_status" >&5
19807 (exit $ac_status); }; then
19808 test -n "$verbose" && echo "$as_me:19808: result: ... -$cf_opt" >&5
19809 echo "${ECHO_T}... -$cf_opt" >&6
19812 case $GCC_VERSION in
19814 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19816 echo "${as_me:-configure}:19816: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19822 case $GCC_VERSION in
19824 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19826 echo "${as_me:-configure}:19826: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19832 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19835 CFLAGS="$cf_save_CFLAGS"
19842 echo "$as_me:19842: checking if you want to use dmalloc for testing" >&5
19843 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19845 # Check whether --with-dmalloc or --without-dmalloc was given.
19846 if test "${with_dmalloc+set}" = set; then
19847 withval="$with_dmalloc"
19849 cat >>confdefs.h <<EOF
19850 #define USE_DMALLOC 1
19853 : ${with_cflags:=-g}
19854 : ${with_no_leaks:=yes}
19859 echo "$as_me:19859: result: ${with_dmalloc:-no}" >&5
19860 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19862 case .$with_cflags in
19872 cf_new_extra_cppflags=
19874 for cf_add_cflags in -g
19876 case $cf_fix_cppflags in
19878 case $cf_add_cflags in
19879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19880 case $cf_add_cflags in
19882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19885 && test -z "${cf_tst_cflags}" \
19886 && cf_fix_cppflags=yes
19888 if test $cf_fix_cppflags = yes ; then
19890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19894 elif test "${cf_tst_cflags}" = "\"'" ; then
19896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19903 case "$CPPFLAGS" in
19907 case $cf_add_cflags in
19909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19911 CPPFLAGS=`echo "$CPPFLAGS" | \
19912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19940 && test -z "${cf_tst_cflags}" \
19941 && cf_fix_cppflags=no
19946 if test -n "$cf_new_cflags" ; then
19948 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19949 CFLAGS="${CFLAGS}$cf_new_cflags"
19953 if test -n "$cf_new_cppflags" ; then
19955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19956 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19960 if test -n "$cf_new_extra_cppflags" ; then
19962 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19963 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19972 if test "$with_dmalloc" = yes ; then
19973 echo "$as_me:19973: checking for dmalloc.h" >&5
19974 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19975 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19976 echo $ECHO_N "(cached) $ECHO_C" >&6
19978 cat >conftest.$ac_ext <<_ACEOF
19979 #line 19979 "configure"
19980 #include "confdefs.h"
19981 #include <dmalloc.h>
19983 if { (eval echo "$as_me:19983: \"$ac_cpp conftest.$ac_ext\"") >&5
19984 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19986 egrep -v '^ *\+' conftest.er1 >conftest.err
19988 cat conftest.err >&5
19989 echo "$as_me:19989: \$? = $ac_status" >&5
19990 (exit $ac_status); } >/dev/null; then
19991 if test -s conftest.err; then
19992 ac_cpp_err=$ac_c_preproc_warn_flag
19999 if test -z "$ac_cpp_err"; then
20000 ac_cv_header_dmalloc_h=yes
20002 echo "$as_me: failed program was:" >&5
20003 cat conftest.$ac_ext >&5
20004 ac_cv_header_dmalloc_h=no
20006 rm -f conftest.err conftest.$ac_ext
20008 echo "$as_me:20008: result: $ac_cv_header_dmalloc_h" >&5
20009 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
20010 if test $ac_cv_header_dmalloc_h = yes; then
20012 echo "$as_me:20012: checking for dmalloc_debug in -ldmalloc" >&5
20013 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
20014 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
20015 echo $ECHO_N "(cached) $ECHO_C" >&6
20017 ac_check_lib_save_LIBS=$LIBS
20018 LIBS="-ldmalloc $LIBS"
20019 cat >conftest.$ac_ext <<_ACEOF
20020 #line 20020 "configure"
20021 #include "confdefs.h"
20023 /* Override any gcc2 internal prototype to avoid an error. */
20027 /* We use char because int might match the return type of a gcc2
20028 builtin and then its argument prototype would still apply. */
20029 char dmalloc_debug ();
20038 rm -f conftest.$ac_objext conftest$ac_exeext
20039 if { (eval echo "$as_me:20039: \"$ac_link\"") >&5
20040 (eval $ac_link) 2>&5
20042 echo "$as_me:20042: \$? = $ac_status" >&5
20043 (exit $ac_status); } &&
20044 { ac_try='test -s conftest$ac_exeext'
20045 { (eval echo "$as_me:20045: \"$ac_try\"") >&5
20046 (eval $ac_try) 2>&5
20048 echo "$as_me:20048: \$? = $ac_status" >&5
20049 (exit $ac_status); }; }; then
20050 ac_cv_lib_dmalloc_dmalloc_debug=yes
20052 echo "$as_me: failed program was:" >&5
20053 cat conftest.$ac_ext >&5
20054 ac_cv_lib_dmalloc_dmalloc_debug=no
20056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20057 LIBS=$ac_check_lib_save_LIBS
20059 echo "$as_me:20059: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
20060 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
20061 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
20062 cat >>confdefs.h <<EOF
20063 #define HAVE_LIBDMALLOC 1
20066 LIBS="-ldmalloc $LIBS"
20074 echo "$as_me:20074: checking if you want to use dbmalloc for testing" >&5
20075 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
20077 # Check whether --with-dbmalloc or --without-dbmalloc was given.
20078 if test "${with_dbmalloc+set}" = set; then
20079 withval="$with_dbmalloc"
20081 cat >>confdefs.h <<EOF
20082 #define USE_DBMALLOC 1
20085 : ${with_cflags:=-g}
20086 : ${with_no_leaks:=yes}
20091 echo "$as_me:20091: result: ${with_dbmalloc:-no}" >&5
20092 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
20094 case .$with_cflags in
20104 cf_new_extra_cppflags=
20106 for cf_add_cflags in -g
20108 case $cf_fix_cppflags in
20110 case $cf_add_cflags in
20111 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20112 case $cf_add_cflags in
20114 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20116 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20117 && test -z "${cf_tst_cflags}" \
20118 && cf_fix_cppflags=yes
20120 if test $cf_fix_cppflags = yes ; then
20122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20126 elif test "${cf_tst_cflags}" = "\"'" ; then
20128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20135 case "$CPPFLAGS" in
20139 case $cf_add_cflags in
20141 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20143 CPPFLAGS=`echo "$CPPFLAGS" | \
20144 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20145 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20150 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20151 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20158 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20159 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20169 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20172 && test -z "${cf_tst_cflags}" \
20173 && cf_fix_cppflags=no
20178 if test -n "$cf_new_cflags" ; then
20180 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20181 CFLAGS="${CFLAGS}$cf_new_cflags"
20185 if test -n "$cf_new_cppflags" ; then
20187 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20188 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20192 if test -n "$cf_new_extra_cppflags" ; then
20194 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20195 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20204 if test "$with_dbmalloc" = yes ; then
20205 echo "$as_me:20205: checking for dbmalloc.h" >&5
20206 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20207 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20208 echo $ECHO_N "(cached) $ECHO_C" >&6
20210 cat >conftest.$ac_ext <<_ACEOF
20211 #line 20211 "configure"
20212 #include "confdefs.h"
20213 #include <dbmalloc.h>
20215 if { (eval echo "$as_me:20215: \"$ac_cpp conftest.$ac_ext\"") >&5
20216 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20218 egrep -v '^ *\+' conftest.er1 >conftest.err
20220 cat conftest.err >&5
20221 echo "$as_me:20221: \$? = $ac_status" >&5
20222 (exit $ac_status); } >/dev/null; then
20223 if test -s conftest.err; then
20224 ac_cpp_err=$ac_c_preproc_warn_flag
20231 if test -z "$ac_cpp_err"; then
20232 ac_cv_header_dbmalloc_h=yes
20234 echo "$as_me: failed program was:" >&5
20235 cat conftest.$ac_ext >&5
20236 ac_cv_header_dbmalloc_h=no
20238 rm -f conftest.err conftest.$ac_ext
20240 echo "$as_me:20240: result: $ac_cv_header_dbmalloc_h" >&5
20241 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20242 if test $ac_cv_header_dbmalloc_h = yes; then
20244 echo "$as_me:20244: checking for debug_malloc in -ldbmalloc" >&5
20245 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20246 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20247 echo $ECHO_N "(cached) $ECHO_C" >&6
20249 ac_check_lib_save_LIBS=$LIBS
20250 LIBS="-ldbmalloc $LIBS"
20251 cat >conftest.$ac_ext <<_ACEOF
20252 #line 20252 "configure"
20253 #include "confdefs.h"
20255 /* Override any gcc2 internal prototype to avoid an error. */
20259 /* We use char because int might match the return type of a gcc2
20260 builtin and then its argument prototype would still apply. */
20261 char debug_malloc ();
20270 rm -f conftest.$ac_objext conftest$ac_exeext
20271 if { (eval echo "$as_me:20271: \"$ac_link\"") >&5
20272 (eval $ac_link) 2>&5
20274 echo "$as_me:20274: \$? = $ac_status" >&5
20275 (exit $ac_status); } &&
20276 { ac_try='test -s conftest$ac_exeext'
20277 { (eval echo "$as_me:20277: \"$ac_try\"") >&5
20278 (eval $ac_try) 2>&5
20280 echo "$as_me:20280: \$? = $ac_status" >&5
20281 (exit $ac_status); }; }; then
20282 ac_cv_lib_dbmalloc_debug_malloc=yes
20284 echo "$as_me: failed program was:" >&5
20285 cat conftest.$ac_ext >&5
20286 ac_cv_lib_dbmalloc_debug_malloc=no
20288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20289 LIBS=$ac_check_lib_save_LIBS
20291 echo "$as_me:20291: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20292 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20293 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20294 cat >>confdefs.h <<EOF
20295 #define HAVE_LIBDBMALLOC 1
20298 LIBS="-ldbmalloc $LIBS"
20306 echo "$as_me:20306: checking if you want to use valgrind for testing" >&5
20307 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20309 # Check whether --with-valgrind or --without-valgrind was given.
20310 if test "${with_valgrind+set}" = set; then
20311 withval="$with_valgrind"
20313 cat >>confdefs.h <<EOF
20314 #define USE_VALGRIND 1
20317 : ${with_cflags:=-g}
20318 : ${with_no_leaks:=yes}
20323 echo "$as_me:20323: result: ${with_valgrind:-no}" >&5
20324 echo "${ECHO_T}${with_valgrind:-no}" >&6
20326 case .$with_cflags in
20336 cf_new_extra_cppflags=
20338 for cf_add_cflags in -g
20340 case $cf_fix_cppflags in
20342 case $cf_add_cflags in
20343 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20344 case $cf_add_cflags in
20346 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20349 && test -z "${cf_tst_cflags}" \
20350 && cf_fix_cppflags=yes
20352 if test $cf_fix_cppflags = yes ; then
20354 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20355 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20358 elif test "${cf_tst_cflags}" = "\"'" ; then
20360 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20361 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20367 case "$CPPFLAGS" in
20371 case $cf_add_cflags in
20373 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20375 CPPFLAGS=`echo "$CPPFLAGS" | \
20376 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20377 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20382 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20383 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20390 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20391 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20398 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20399 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20401 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20403 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20404 && test -z "${cf_tst_cflags}" \
20405 && cf_fix_cppflags=no
20410 if test -n "$cf_new_cflags" ; then
20412 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20413 CFLAGS="${CFLAGS}$cf_new_cflags"
20417 if test -n "$cf_new_cppflags" ; then
20419 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20420 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20424 if test -n "$cf_new_extra_cppflags" ; then
20426 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20427 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20436 echo "$as_me:20436: checking if you want to perform memory-leak testing" >&5
20437 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20439 # Check whether --enable-leaks or --disable-leaks was given.
20440 if test "${enable_leaks+set}" = set; then
20441 enableval="$enable_leaks"
20442 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20444 : ${with_no_leaks:=no}
20446 echo "$as_me:20446: result: $with_no_leaks" >&5
20447 echo "${ECHO_T}$with_no_leaks" >&6
20449 if test "$with_no_leaks" = yes ; then
20451 cat >>confdefs.h <<\EOF
20455 cat >>confdefs.h <<\EOF
20456 #define YY_NO_LEAKS 1
20462 if test "x$cf_cv_enable_rpath" != xno
20464 echo "$as_me:20464: checking for an rpath option" >&5
20465 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20466 case $cf_cv_system_name in
20468 if test "$GCC" = yes; then
20469 LD_RPATH_OPT="-Wl,-rpath,"
20471 LD_RPATH_OPT="-rpath "
20474 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20475 LD_RPATH_OPT="-Wl,-rpath,"
20477 (openbsd[2-9].*|mirbsd*)
20478 LD_RPATH_OPT="-Wl,-rpath,"
20481 LD_RPATH_OPT="-rpath "
20484 LD_RPATH_OPT="-Wl,-rpath,"
20487 LD_RPATH_OPT="-rpath "
20495 echo "$as_me:20495: result: $LD_RPATH_OPT" >&5
20496 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20498 case "x$LD_RPATH_OPT" in
20500 echo "$as_me:20500: checking if we need a space after rpath option" >&5
20501 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20502 cf_save_LIBS="$LIBS"
20504 cf_add_libs="${LD_RPATH_OPT}$libdir"
20505 # Filter out duplicates - this happens with badly-designed ".pc" files...
20506 for cf_add_1lib in $LIBS
20508 for cf_add_2lib in $cf_add_libs
20510 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20518 LIBS="$cf_add_libs"
20520 cat >conftest.$ac_ext <<_ACEOF
20521 #line 20521 "configure"
20522 #include "confdefs.h"
20532 rm -f conftest.$ac_objext conftest$ac_exeext
20533 if { (eval echo "$as_me:20533: \"$ac_link\"") >&5
20534 (eval $ac_link) 2>&5
20536 echo "$as_me:20536: \$? = $ac_status" >&5
20537 (exit $ac_status); } &&
20538 { ac_try='test -s conftest$ac_exeext'
20539 { (eval echo "$as_me:20539: \"$ac_try\"") >&5
20540 (eval $ac_try) 2>&5
20542 echo "$as_me:20542: \$? = $ac_status" >&5
20543 (exit $ac_status); }; }; then
20546 echo "$as_me: failed program was:" >&5
20547 cat conftest.$ac_ext >&5
20550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20551 LIBS="$cf_save_LIBS"
20552 echo "$as_me:20552: result: $cf_rpath_space" >&5
20553 echo "${ECHO_T}$cf_rpath_space" >&6
20554 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20559 echo "$as_me:20559: checking if rpath-hack should be disabled" >&5
20560 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20562 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20563 if test "${enable_rpath_hack+set}" = set; then
20564 enableval="$enable_rpath_hack"
20565 test "$enableval" != no && enableval=yes
20566 if test "$enableval" != "yes" ; then
20567 cf_disable_rpath_hack=yes
20569 cf_disable_rpath_hack=no
20573 cf_disable_rpath_hack=no
20576 echo "$as_me:20576: result: $cf_disable_rpath_hack" >&5
20577 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20578 if test "$cf_disable_rpath_hack" = no ; then
20580 echo "$as_me:20580: checking for updated LDFLAGS" >&5
20581 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20582 if test -n "$LD_RPATH_OPT" ; then
20583 echo "$as_me:20583: result: maybe" >&5
20584 echo "${ECHO_T}maybe" >&6
20588 # Extract the first word of "$ac_prog", so it can be a program name with args.
20589 set dummy $ac_prog; ac_word=$2
20590 echo "$as_me:20590: checking for $ac_word" >&5
20591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20592 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20593 echo $ECHO_N "(cached) $ECHO_C" >&6
20595 if test -n "$cf_ldd_prog"; then
20596 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20598 ac_save_IFS=$IFS; IFS=$ac_path_separator
20600 for ac_dir in $ac_dummy; do
20602 test -z "$ac_dir" && ac_dir=.
20603 $as_executable_p "$ac_dir/$ac_word" || continue
20604 ac_cv_prog_cf_ldd_prog="$ac_prog"
20605 echo "$as_me:20605: found $ac_dir/$ac_word" >&5
20611 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20612 if test -n "$cf_ldd_prog"; then
20613 echo "$as_me:20613: result: $cf_ldd_prog" >&5
20614 echo "${ECHO_T}$cf_ldd_prog" >&6
20616 echo "$as_me:20616: result: no" >&5
20617 echo "${ECHO_T}no" >&6
20620 test -n "$cf_ldd_prog" && break
20622 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20624 cf_rpath_list="/usr/lib /lib"
20625 if test "$cf_ldd_prog" != no
20629 cat >conftest.$ac_ext <<_ACEOF
20630 #line 20630 "configure"
20631 #include "confdefs.h"
20641 rm -f conftest.$ac_objext conftest$ac_exeext
20642 if { (eval echo "$as_me:20642: \"$ac_link\"") >&5
20643 (eval $ac_link) 2>&5
20645 echo "$as_me:20645: \$? = $ac_status" >&5
20646 (exit $ac_status); } &&
20647 { ac_try='test -s conftest$ac_exeext'
20648 { (eval echo "$as_me:20648: \"$ac_try\"") >&5
20649 (eval $ac_try) 2>&5
20651 echo "$as_me:20651: \$? = $ac_status" >&5
20652 (exit $ac_status); }; }; then
20653 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20654 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20656 echo "$as_me: failed program was:" >&5
20657 cat conftest.$ac_ext >&5
20659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20661 # If we passed the link-test, but get a "not found" on a given library,
20662 # this could be due to inept reconfiguration of gcc to make it only
20663 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20664 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20665 # /usr/local libraries.
20666 if test -n "$cf_rpath_oops"
20668 for cf_rpath_src in $cf_rpath_oops
20670 for cf_rpath_dir in \
20675 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20677 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20679 echo "${as_me:-configure}:20679: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20681 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20689 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20691 echo "${as_me:-configure}:20691: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20693 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20695 echo "${as_me:-configure}:20695: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20698 for cf_rpath_src in $LDFLAGS
20700 case $cf_rpath_src in
20703 # check if this refers to a directory which we will ignore
20705 if test -n "$cf_rpath_list"
20707 for cf_rpath_item in $cf_rpath_list
20709 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20717 if test "$cf_rpath_skip" = no
20719 # transform the option
20720 if test "$LD_RPATH_OPT" = "-R " ; then
20721 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20723 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20726 # if we have not already added this, add it now
20727 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20728 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20730 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20732 echo "${as_me:-configure}:20732: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20734 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20739 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20741 LDFLAGS=$cf_rpath_dst
20743 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20745 echo "${as_me:-configure}:20745: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20747 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20749 echo "${as_me:-configure}:20749: testing ...checking LIBS $LIBS ..." 1>&5
20752 for cf_rpath_src in $LIBS
20754 case $cf_rpath_src in
20757 # check if this refers to a directory which we will ignore
20759 if test -n "$cf_rpath_list"
20761 for cf_rpath_item in $cf_rpath_list
20763 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20771 if test "$cf_rpath_skip" = no
20773 # transform the option
20774 if test "$LD_RPATH_OPT" = "-R " ; then
20775 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20777 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20780 # if we have not already added this, add it now
20781 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20782 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20784 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20786 echo "${as_me:-configure}:20786: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20788 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20793 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20797 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20799 echo "${as_me:-configure}:20799: testing ...checked LIBS $LIBS ..." 1>&5
20801 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20803 echo "${as_me:-configure}:20803: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20806 echo "$as_me:20806: result: no" >&5
20807 echo "${ECHO_T}no" >&6
20815 ac_config_files="$ac_config_files Makefile"
20816 ac_config_commands="$ac_config_commands default"
20817 cat >confcache <<\_ACEOF
20818 # This file is a shell script that caches the results of configure
20819 # tests run on this system so they can be shared between configure
20820 # scripts and configure runs, see configure's option --config-cache.
20821 # It is not useful on other systems. If it contains results you don't
20822 # want to keep, you may remove or edit it.
20824 # config.status only pays attention to the cache file if you give it
20825 # the --recheck option to rerun configure.
20827 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20828 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20829 # following values.
20833 # The following way of writing the cache mishandles newlines in values,
20834 # but we know of no workaround that is simple, portable, and efficient.
20835 # So, don't put newlines in cache variables' values.
20836 # Ultrix sh set writes to stderr and can't be redirected directly,
20837 # and sets the high bit in the cache file unless we assign to the vars.
20840 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20842 # `set' does not quote correctly, so add quotes (double-quote
20843 # substitution turns \\\\ into \\, and sed turns \\ into \).
20846 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20849 # `set' quotes correctly as required by POSIX, so do not add quotes.
20851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20858 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20860 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20862 if cmp -s $cache_file confcache; then :; else
20863 if test -w $cache_file; then
20864 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20865 cat confcache >$cache_file
20867 echo "not updating unwritable cache $cache_file"
20872 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20873 # Let make expand exec_prefix.
20874 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20876 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20877 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20878 # trailing colons and then remove the whole line if VPATH becomes empty
20879 # (actually we leave an empty line to preserve line numbers).
20880 if test "x$srcdir" = x.; then
20881 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20882 s/:*\$(srcdir):*/:/;
20883 s/:*\${srcdir}:*/:/;
20885 s/^\([^=]*=[ ]*\):*/\1/;
20891 DEFS=-DHAVE_CONFIG_H
20893 : ${CONFIG_STATUS=./config.status}
20894 ac_clean_files_save=$ac_clean_files
20895 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20896 { echo "$as_me:20896: creating $CONFIG_STATUS" >&5
20897 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20898 cat >$CONFIG_STATUS <<_ACEOF
20900 # Generated automatically by configure.
20901 # Run this file to recreate the current configuration.
20902 # Compiler output produced by configure, useful for debugging
20903 # configure, is in config.log if it exists.
20906 SHELL=\${CONFIG_SHELL-$SHELL}
20907 ac_cs_invocation="\$0 \$@"
20911 cat >>$CONFIG_STATUS <<\_ACEOF
20912 # Be Bourne compatible
20913 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20916 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20920 # Name of the executable.
20921 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20923 if expr a : '\(a\)' >/dev/null 2>&1; then
20929 rm -f conf$$ conf$$.exe conf$$.file
20931 if ln -s conf$$.file conf$$ 2>/dev/null; then
20932 # We could just check for DJGPP; but this test a) works b) is more generic
20933 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20934 if test -f conf$$.exe; then
20935 # Don't use ln at all; we don't have any links
20940 elif ln conf$$.file conf$$ 2>/dev/null; then
20945 rm -f conf$$ conf$$.exe conf$$.file
20947 as_executable_p="test -f"
20949 # Support unset when possible.
20950 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20957 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20958 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20959 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20960 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20961 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20962 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20963 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20964 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20967 # We need space, tab and new line, in precisely that order.
20973 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20979 # Files that config.status was made for.
20980 if test -n "$ac_config_files"; then
20981 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20984 if test -n "$ac_config_headers"; then
20985 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20988 if test -n "$ac_config_links"; then
20989 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20992 if test -n "$ac_config_commands"; then
20993 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20996 cat >>$CONFIG_STATUS <<\EOF
20999 \`$as_me' instantiates files from templates according to the
21000 current configuration.
21002 Usage: $0 [OPTIONS] [FILE]...
21004 -h, --help print this help, then exit
21005 -V, --version print version number, then exit
21006 -d, --debug don't remove temporary files
21007 --recheck update $as_me by reconfiguring in the same conditions
21008 --file=FILE[:TEMPLATE]
21009 instantiate the configuration file FILE
21010 --header=FILE[:TEMPLATE]
21011 instantiate the configuration header FILE
21013 Configuration files:
21016 Configuration headers:
21019 Configuration commands:
21022 Report bugs to <dickey@invisible-island.net>."
21025 cat >>$CONFIG_STATUS <<EOF
21028 configured by $0, generated by GNU Autoconf 2.52.20190901,
21029 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21031 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21032 Free Software Foundation, Inc.
21033 This config.status script is free software; the Free Software Foundation
21034 gives unlimited permission to copy, distribute and modify it."
21039 cat >>$CONFIG_STATUS <<\EOF
21040 # If no file are specified by the user, then we need to provide default
21041 # value. By we need to know if files were specified by the user.
21047 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21048 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21050 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21054 *) # This is not an option, so the user has probably given explicit
21056 ac_need_defaults=false;;
21060 # Handling of the options.
21062 cat >>$CONFIG_STATUS <<EOF
21063 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21064 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21065 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21067 cat >>$CONFIG_STATUS <<\EOF
21068 --version | --vers* | -V )
21069 echo "$ac_cs_version"; exit 0 ;;
21071 # Conflict between --help and --header
21072 { { echo "$as_me:21072: error: ambiguous option: $1
21073 Try \`$0 --help' for more information." >&5
21074 echo "$as_me: error: ambiguous option: $1
21075 Try \`$0 --help' for more information." >&2;}
21076 { (exit 1); exit 1; }; };;
21077 --help | --hel | -h )
21078 echo "$ac_cs_usage"; exit 0 ;;
21079 --debug | --d* | -d )
21081 --file | --fil | --fi | --f )
21083 CONFIG_FILES="$CONFIG_FILES $1"
21084 ac_need_defaults=false;;
21085 --header | --heade | --head | --hea )
21087 CONFIG_HEADERS="$CONFIG_HEADERS $1"
21088 ac_need_defaults=false;;
21090 # This is an error.
21091 -*) { { echo "$as_me:21091: error: unrecognized option: $1
21092 Try \`$0 --help' for more information." >&5
21093 echo "$as_me: error: unrecognized option: $1
21094 Try \`$0 --help' for more information." >&2;}
21095 { (exit 1); exit 1; }; } ;;
21097 *) ac_config_targets="$ac_config_targets $1" ;;
21106 ## ----------------------- ##
21107 ## Running config.status. ##
21108 ## ----------------------- ##
21110 This file was extended by $as_me 2.52.20190901, executed with
21111 CONFIG_FILES = $CONFIG_FILES
21112 CONFIG_HEADERS = $CONFIG_HEADERS
21113 CONFIG_LINKS = $CONFIG_LINKS
21114 CONFIG_COMMANDS = $CONFIG_COMMANDS
21115 > $ac_cs_invocation
21116 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21121 cat >>$CONFIG_STATUS <<EOF
21123 # INIT-COMMANDS section.
21133 cat >>$CONFIG_STATUS <<\EOF
21134 for ac_config_target in $ac_config_targets
21136 case "$ac_config_target" in
21137 # Handling of arguments.
21138 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21139 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21140 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
21141 *) { { echo "$as_me:21141: error: invalid argument: $ac_config_target" >&5
21142 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21143 { (exit 1); exit 1; }; };;
21147 # If the user did not use the arguments to specify the items to instantiate,
21148 # then the envvar interface is used. Set only those that are not.
21149 # We use the long form for the default assignment because of an extremely
21150 # bizarre bug on SunOS 4.1.3.
21151 if $ac_need_defaults; then
21152 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21153 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21154 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21157 # Create a temporary directory, and hook for its removal unless debugging.
21160 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21161 trap '{ (exit 1); exit 1; }' 1 2 13 15
21164 # Create a (secure) tmp directory for tmp files.
21167 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21168 test -n "$tmp" && test -d "$tmp"
21171 tmp=$TMPDIR/cs$$-$RANDOM
21172 (umask 077 && mkdir $tmp)
21175 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21176 { (exit 1); exit 1; }
21181 cat >>$CONFIG_STATUS <<EOF
21184 # CONFIG_FILES section.
21187 # No need to generate the scripts if there are no CONFIG_FILES.
21188 # This happens for instance when ./config.status config.h
21189 if test -n "\$CONFIG_FILES"; then
21190 # Protect against being on the right side of a sed subst in config.status.
21191 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21192 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21193 s,@SHELL@,$SHELL,;t t
21194 s,@exec_prefix@,$exec_prefix,;t t
21195 s,@prefix@,$prefix,;t t
21196 s,@program_transform_name@,$program_transform_name,;t t
21197 s,@bindir@,$bindir,;t t
21198 s,@sbindir@,$sbindir,;t t
21199 s,@libexecdir@,$libexecdir,;t t
21200 s,@datarootdir@,$datarootdir,;t t
21201 s,@datadir@,$datadir,;t t
21202 s,@sysconfdir@,$sysconfdir,;t t
21203 s,@sharedstatedir@,$sharedstatedir,;t t
21204 s,@localstatedir@,$localstatedir,;t t
21205 s,@runstatedir@,$runstatedir,;t t
21206 s,@libdir@,$libdir,;t t
21207 s,@includedir@,$includedir,;t t
21208 s,@oldincludedir@,$oldincludedir,;t t
21209 s,@infodir@,$infodir,;t t
21210 s,@mandir@,$mandir,;t t
21211 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21212 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21213 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21214 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21215 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21216 s,@build_alias@,$build_alias,;t t
21217 s,@host_alias@,$host_alias,;t t
21218 s,@target_alias@,$target_alias,;t t
21219 s,@ECHO_C@,$ECHO_C,;t t
21220 s,@ECHO_N@,$ECHO_N,;t t
21221 s,@ECHO_T@,$ECHO_T,;t t
21222 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21223 s,@DEFS@,$DEFS,;t t
21224 s,@LIBS@,$LIBS,;t t
21225 s,@build@,$build,;t t
21226 s,@build_cpu@,$build_cpu,;t t
21227 s,@build_vendor@,$build_vendor,;t t
21228 s,@build_os@,$build_os,;t t
21229 s,@host@,$host,;t t
21230 s,@host_cpu@,$host_cpu,;t t
21231 s,@host_vendor@,$host_vendor,;t t
21232 s,@host_os@,$host_os,;t t
21233 s,@SET_MAKE@,$SET_MAKE,;t t
21235 s,@CFLAGS@,$CFLAGS,;t t
21236 s,@LDFLAGS@,$LDFLAGS,;t t
21237 s,@CPPFLAGS@,$CPPFLAGS,;t t
21238 s,@ac_ct_CC@,$ac_ct_CC,;t t
21239 s,@EXEEXT@,$EXEEXT,;t t
21240 s,@OBJEXT@,$OBJEXT,;t t
21241 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21244 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21245 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21246 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21247 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21248 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21249 s,@LINT@,$LINT,;t t
21250 s,@LINT_OPTS@,$LINT_OPTS,;t t
21251 s,@CTAGS@,$CTAGS,;t t
21252 s,@ETAGS@,$ETAGS,;t t
21253 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21254 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21255 s,@MATH_LIB@,$MATH_LIB,;t t
21256 s,@top_builddir@,$top_builddir,;t t
21257 s,@CC_G_OPT@,$CC_G_OPT,;t t
21258 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21259 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21260 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21261 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21263 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21264 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21265 s,@LD_MODEL@,$LD_MODEL,;t t
21266 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21267 s,@LIBTOOL@,$LIBTOOL,;t t
21268 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21269 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21270 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21271 s,@LIB_LINK@,$LIB_LINK,;t t
21272 s,@LINK_TESTS@,$LINK_TESTS,;t t
21273 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21274 s,@PACKAGE@,$PACKAGE,;t t
21275 s,@PTHREAD@,$PTHREAD,;t t
21276 s,@TEST_ARGS@,$TEST_ARGS,;t t
21277 s,@TEST_DEPS@,$TEST_DEPS,;t t
21278 s,@TEST_LIBS@,$TEST_LIBS,;t t
21279 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21280 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21281 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21282 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21283 s,@includesubdir@,$includesubdir,;t t
21284 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21285 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21286 s,@ECHO_LT@,$ECHO_LT,;t t
21287 s,@ECHO_LD@,$ECHO_LD,;t t
21288 s,@RULE_CC@,$RULE_CC,;t t
21289 s,@SHOW_CC@,$SHOW_CC,;t t
21290 s,@ECHO_CC@,$ECHO_CC,;t t
21291 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21292 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21293 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21294 s,@X_CFLAGS@,$X_CFLAGS,;t t
21295 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21296 s,@X_LIBS@,$X_LIBS,;t t
21297 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21298 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21299 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21300 s,@RGB_PATH@,$RGB_PATH,;t t
21301 s,@no_x11_rgb@,$no_x11_rgb,;t t
21302 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21303 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21304 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21309 cat >>$CONFIG_STATUS <<\EOF
21310 # Split the substitutions into bite-sized pieces for seds with
21311 # small command number limits, like on Digital OSF/1 and HP-UX.
21312 ac_max_sed_lines=48
21313 ac_sed_frag=1 # Number of current file.
21314 ac_beg=1 # First line for current file.
21315 ac_end=$ac_max_sed_lines # Line after last line for current file.
21318 while $ac_more_lines; do
21319 if test $ac_beg -gt 1; then
21320 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21322 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21324 if test ! -s $tmp/subs.frag; then
21325 ac_more_lines=false
21327 # The purpose of the label and of the branching condition is to
21328 # speed up the sed processing (if there are no `@' at all, there
21329 # is no need to browse any of the substitutions).
21330 # These are the two extra sed commands mentioned above.
21332 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21333 # It is possible to make a multiline substitution using escaped newlines.
21334 # Ensure that we do not split the substitution between script fragments.
21336 ac_END=`expr $ac_end + $ac_max_sed_lines`
21337 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21338 if test -s $tmp/subs.next; then
21339 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21340 if test ! -s $tmp/subs.edit; then
21341 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21342 if test ! -s $tmp/subs.edit; then
21343 if test $ac_beg -gt 1; then
21344 ac_end=`expr $ac_end - 1`
21351 if test -z "$ac_sed_cmds"; then
21352 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21354 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21356 ac_sed_frag=`expr $ac_sed_frag + 1`
21358 ac_end=`expr $ac_end + $ac_max_sed_lines`
21361 if test -z "$ac_sed_cmds"; then
21364 fi # test -n "$CONFIG_FILES"
21367 cat >>$CONFIG_STATUS <<\EOF
21368 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21369 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21371 - | *:- | *:-:* ) # input from stdin
21373 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21374 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21375 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21376 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21377 * ) ac_file_in=$ac_file.in ;;
21380 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21381 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21382 X"$ac_file" : 'X\(//\)[^/]' \| \
21383 X"$ac_file" : 'X\(//\)$' \| \
21384 X"$ac_file" : 'X\(/\)' \| \
21385 . : '\(.\)' 2>/dev/null ||
21387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21388 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21389 /^X\(\/\/\)$/{ s//\1/; q; }
21390 /^X\(\/\).*/{ s//\1/; q; }
21392 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21393 { case "$ac_dir" in
21394 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21398 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21399 case $as_mkdir_dir in
21400 # Skip DOS drivespec
21401 ?:) as_incr_dir=$as_mkdir_dir ;;
21403 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21404 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21409 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21410 # A "../" for each directory in $ac_dir_suffix.
21411 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21413 ac_dir_suffix= ac_dots=
21418 if test -z "$ac_dots"; then
21421 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21423 [\\/]* | ?:[\\/]* )
21424 ac_srcdir=$srcdir$ac_dir_suffix;
21425 ac_top_srcdir=$srcdir ;;
21426 *) # Relative path.
21427 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21428 ac_top_srcdir=$ac_dots$srcdir ;;
21432 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21433 *) ac_INSTALL=$ac_dots$INSTALL ;;
21436 if test x"$ac_file" != x-; then
21437 { echo "$as_me:21437: creating $ac_file" >&5
21438 echo "$as_me: creating $ac_file" >&6;}
21441 # Let's still pretend it is `configure' which instantiates (i.e., don't
21442 # use $as_me), people would be surprised to read:
21443 # /* config.h. Generated automatically by config.status. */
21444 configure_input="Generated automatically from `echo $ac_file_in |
21445 sed 's,.*/,,'` by configure."
21447 # First look for the input files in the build tree, otherwise in the
21449 ac_file_inputs=`IFS=:
21450 for f in $ac_file_in; do
21452 -) echo $tmp/stdin ;;
21454 # Absolute (can't be DOS-style, as IFS=:)
21455 test -f "$f" || { { echo "$as_me:21455: error: cannot find input file: $f" >&5
21456 echo "$as_me: error: cannot find input file: $f" >&2;}
21457 { (exit 1); exit 1; }; }
21460 if test -f "$f"; then
21463 elif test -f "$srcdir/$f"; then
21468 { { echo "$as_me:21468: error: cannot find input file: $f" >&5
21469 echo "$as_me: error: cannot find input file: $f" >&2;}
21470 { (exit 1); exit 1; }; }
21473 done` || { (exit 1); exit 1; }
21475 cat >>$CONFIG_STATUS <<\EOF
21476 ac_warn_datarootdir=no
21477 if test x"$ac_file" != x-; then
21478 for ac_item in $ac_file_inputs
21480 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21481 if test -n "$ac_seen"; then
21482 ac_used=`grep '@datarootdir@' $ac_item`
21483 if test -z "$ac_used"; then
21484 { echo "$as_me:21484: WARNING: datarootdir was used implicitly but not set:
21486 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21488 ac_warn_datarootdir=yes
21491 ac_seen=`grep '${datarootdir}' $ac_item`
21492 if test -n "$ac_seen"; then
21493 { echo "$as_me:21493: WARNING: datarootdir was used explicitly but not set:
21495 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21497 ac_warn_datarootdir=yes
21502 if test "x$ac_warn_datarootdir" = xyes; then
21503 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21507 cat >>$CONFIG_STATUS <<EOF
21511 cat >>$CONFIG_STATUS <<\EOF
21513 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21514 s,@configure_input@,$configure_input,;t t
21515 s,@srcdir@,$ac_srcdir,;t t
21516 s,@top_srcdir@,$ac_top_srcdir,;t t
21517 s,@INSTALL@,$ac_INSTALL,;t t
21518 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21520 if test x"$ac_file" != x-; then
21521 cp $tmp/out $ac_file
21523 for ac_name in prefix exec_prefix datarootdir
21525 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21526 if test -n "$ac_seen"; then
21527 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21528 if test -z "$ac_init"; then
21529 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21530 { echo "$as_me:21530: WARNING: Variable $ac_name is used but was not set:
21532 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21537 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21538 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21539 if test -s $tmp/out; then
21540 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21541 { echo "$as_me:21541: WARNING: Some variables may not be substituted:
21543 echo "$as_me: WARNING: Some variables may not be substituted:
21553 cat >>$CONFIG_STATUS <<\EOF
21556 # CONFIG_HEADER section.
21559 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21560 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21562 # ac_d sets the value in "#define NAME VALUE" lines.
21563 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21564 ac_dB='[ ].*$,\1#\2'
21567 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21568 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21569 ac_iB='\([ ]\),\1#\2define\3'
21572 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21573 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21574 ac_uB='$,\1#\2define\3'
21578 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21579 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21581 - | *:- | *:-:* ) # input from stdin
21583 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21584 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21585 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21586 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21587 * ) ac_file_in=$ac_file.in ;;
21590 test x"$ac_file" != x- && { echo "$as_me:21590: creating $ac_file" >&5
21591 echo "$as_me: creating $ac_file" >&6;}
21593 # First look for the input files in the build tree, otherwise in the
21595 ac_file_inputs=`IFS=:
21596 for f in $ac_file_in; do
21598 -) echo $tmp/stdin ;;
21600 # Absolute (can't be DOS-style, as IFS=:)
21601 test -f "$f" || { { echo "$as_me:21601: error: cannot find input file: $f" >&5
21602 echo "$as_me: error: cannot find input file: $f" >&2;}
21603 { (exit 1); exit 1; }; }
21606 if test -f "$f"; then
21609 elif test -f "$srcdir/$f"; then
21614 { { echo "$as_me:21614: error: cannot find input file: $f" >&5
21615 echo "$as_me: error: cannot find input file: $f" >&2;}
21616 { (exit 1); exit 1; }; }
21619 done` || { (exit 1); exit 1; }
21620 # Remove the trailing spaces.
21621 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21625 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21626 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21627 # be either 'cat' or 'sort'.
21628 cat confdefs.h | uniq >conftest.vals
21630 # Break up conftest.vals because some shells have a limit on
21631 # the size of here documents, and old seds have small limits too.
21633 rm -f conftest.tail
21634 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21635 while grep . conftest.vals >/dev/null
21637 # Write chunks of a limited-size here document to conftest.frag.
21638 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21639 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21640 echo 'CEOF' >> $CONFIG_STATUS
21641 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21642 rm -f conftest.vals
21643 mv conftest.tail conftest.vals
21645 rm -f conftest.vals
21647 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21649 echo ' cat >> conftest.edit <<CEOF
21650 /@DEFS@/r conftest.frag
21653 sed -f conftest.edit $tmp/in > $tmp/out
21655 mv $tmp/out $tmp/in
21656 rm -f conftest.edit conftest.frag
21657 ' >> $CONFIG_STATUS
21659 cat >>$CONFIG_STATUS <<\EOF
21660 # Let's still pretend it is `configure' which instantiates (i.e., don't
21661 # use $as_me), people would be surprised to read:
21662 # /* config.h. Generated automatically by config.status. */
21663 if test x"$ac_file" = x-; then
21664 echo "/* Generated automatically by configure. */" >$tmp/config.h
21666 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21668 cat $tmp/in >>$tmp/config.h
21670 if test x"$ac_file" != x-; then
21671 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21672 { echo "$as_me:21672: $ac_file is unchanged" >&5
21673 echo "$as_me: $ac_file is unchanged" >&6;}
21675 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21676 X"$ac_file" : 'X\(//\)[^/]' \| \
21677 X"$ac_file" : 'X\(//\)$' \| \
21678 X"$ac_file" : 'X\(/\)' \| \
21679 . : '\(.\)' 2>/dev/null ||
21681 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21682 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21683 /^X\(\/\/\)$/{ s//\1/; q; }
21684 /^X\(\/\).*/{ s//\1/; q; }
21686 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21687 { case "$ac_dir" in
21688 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21692 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21693 case $as_mkdir_dir in
21694 # Skip DOS drivespec
21695 ?:) as_incr_dir=$as_mkdir_dir ;;
21697 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21698 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21705 mv $tmp/config.h $ac_file
21709 rm -f $tmp/config.h
21713 cat >>$CONFIG_STATUS <<\EOF
21715 # CONFIG_COMMANDS section.
21717 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21718 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21719 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21726 if test ! -d $srcdir/$cf_dir; then
21728 elif test -f $srcdir/$cf_dir/programs; then
21729 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21733 cat >>Makefile <<TEST_EOF
21735 # These rules are generated so we do not rely on suffix rules, which do not
21736 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21737 # some, and the '\$x' confuses others).
21740 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21743 cat >>Makefile <<TEST_EOF
21745 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21746 \$(srcdir)/test.priv.h \\
21749 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21753 if test -f ../config.guess && test -f ../config.sub
21755 cat >>Makefile <<TEST_EOF
21757 # if we used CF_INHERIT for getting these files, we can remove them
21759 rm -f config.guess config.sub
21767 cat >>$CONFIG_STATUS <<\EOF
21769 { (exit 0); exit 0; }
21771 chmod +x $CONFIG_STATUS
21772 ac_clean_files=$ac_clean_files_save
21774 # configure is writing to config.log, and then calls config.status.
21775 # config.status does its own redirection, appending to config.log.
21776 # Unfortunately, on DOS this fails, as config.log is still kept open
21777 # by configure, so config.status won't be able to write to it; its
21778 # output is simply discarded. So we exec the FD to /dev/null,
21779 # effectively closing config.log, so it can be properly (re)opened and
21780 # appended to by config.status. When coming back to configure, we
21781 # need to make the FD available again.
21782 if test "$no_create" != yes; then
21785 $SHELL $CONFIG_STATUS || ac_cs_success=false
21787 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21788 # would make configure fail if this is the last instruction.
21789 $ac_cs_success || { (exit 1); exit 1; }