2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20200111.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 runstatedir='${localstatedir}/run'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
149 # Identity of this package.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
168 # Accept the important Cygnus configure options, so we can diagnose typos.
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
190 cache_file=config.cache ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir=$ac_optarg ;;
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212 eval "enable_$ac_feature=no" ;;
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225 eval "enable_$ac_feature='$ac_optarg'" ;;
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
240 -help | --help | --hel | --he | -h)
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
264 -libdir | --libdir | --libdi | --libd)
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
285 -runstatedir | --runstatedir | --runstatedi | --runstated \
286 | --runstate | --runstat | --runsta | --runst \
287 | --runs | --run | --ru)
288 ac_prev=runstatedir ;;
289 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
290 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
291 | --runs=* | --run=* | --ru=*)
292 runstatedir=$ac_optarg ;;
294 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
296 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
300 # Obsolete; use --without-fp.
303 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
307 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
311 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313 | --oldin | --oldi | --old | --ol | --o)
314 ac_prev=oldincludedir ;;
315 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318 oldincludedir=$ac_optarg ;;
320 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
322 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
325 -program-prefix | --program-prefix | --program-prefi | --program-pref \
326 | --program-pre | --program-pr | --program-p)
327 ac_prev=program_prefix ;;
328 -program-prefix=* | --program-prefix=* | --program-prefi=* \
329 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330 program_prefix=$ac_optarg ;;
332 -program-suffix | --program-suffix | --program-suffi | --program-suff \
333 | --program-suf | --program-su | --program-s)
334 ac_prev=program_suffix ;;
335 -program-suffix=* | --program-suffix=* | --program-suffi=* \
336 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337 program_suffix=$ac_optarg ;;
339 -program-transform-name | --program-transform-name \
340 | --program-transform-nam | --program-transform-na \
341 | --program-transform-n | --program-transform- \
342 | --program-transform | --program-transfor \
343 | --program-transfo | --program-transf \
344 | --program-trans | --program-tran \
345 | --progr-tra | --program-tr | --program-t)
346 ac_prev=program_transform_name ;;
347 -program-transform-name=* | --program-transform-name=* \
348 | --program-transform-nam=* | --program-transform-na=* \
349 | --program-transform-n=* | --program-transform-=* \
350 | --program-transform=* | --program-transfor=* \
351 | --program-transfo=* | --program-transf=* \
352 | --program-trans=* | --program-tran=* \
353 | --progr-tra=* | --program-tr=* | --program-t=*)
354 program_transform_name=$ac_optarg ;;
356 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357 | -silent | --silent | --silen | --sile | --sil)
360 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
362 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
364 sbindir=$ac_optarg ;;
366 -sharedstatedir | --sharedstatedir | --sharedstatedi \
367 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368 | --sharedst | --shareds | --shared | --share | --shar \
370 ac_prev=sharedstatedir ;;
371 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
375 sharedstatedir=$ac_optarg ;;
377 -site | --site | --sit)
379 -site=* | --site=* | --sit=*)
382 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
384 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
387 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388 | --syscon | --sysco | --sysc | --sys | --sy)
389 ac_prev=sysconfdir ;;
390 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392 sysconfdir=$ac_optarg ;;
394 -target | --target | --targe | --targ | --tar | --ta | --t)
395 ac_prev=target_alias ;;
396 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397 target_alias=$ac_optarg ;;
399 -v | -verbose | --verbose | --verbos | --verbo | --verb)
402 -version | --version | --versio | --versi | --vers | -V)
406 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
407 # Reject names that are not valid shell variable names.
408 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid package name: $ac_package" >&2
410 { (exit 1); exit 1; }; }
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416 eval "with_$ac_package='$ac_optarg'" ;;
418 -without-* | --without-*)
419 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
420 # Reject names that are not valid shell variable names.
421 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
422 { echo "$as_me: error: invalid package name: $ac_package" >&2
423 { (exit 1); exit 1; }; }
424 ac_package=`echo $ac_package | sed 's/-/_/g'`
425 eval "with_$ac_package=no" ;;
428 # Obsolete; use --with-x.
431 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432 | --x-incl | --x-inc | --x-in | --x-i)
433 ac_prev=x_includes ;;
434 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436 x_includes=$ac_optarg ;;
438 -x-libraries | --x-libraries | --x-librarie | --x-librari \
439 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440 ac_prev=x_libraries ;;
441 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443 x_libraries=$ac_optarg ;;
445 -*) { echo "$as_me: error: unrecognized option: $ac_option
446 Try \`$0 --help' for more information." >&2
447 { (exit 1); exit 1; }; }
451 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
452 # Reject names that are not valid shell variable names.
453 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
454 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
455 { (exit 1); exit 1; }; }
456 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
457 eval "$ac_envvar='$ac_optarg'"
461 # FIXME: should be removed in autoconf 3.0.
462 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
463 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
464 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
465 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
471 if test -n "$ac_prev"; then
472 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
473 { echo "$as_me: error: missing argument to $ac_option" >&2
474 { (exit 1); exit 1; }; }
477 # Be sure to have absolute paths.
478 for ac_var in exec_prefix prefix
480 eval ac_val=$`echo $ac_var`
482 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
483 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
484 { (exit 1); exit 1; }; };;
488 # Be sure to have absolute paths.
489 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
490 localstatedir libdir includedir oldincludedir infodir mandir
492 eval ac_val=$`echo $ac_var`
494 [\\/$]* | ?:[\\/]* ) ;;
495 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
496 { (exit 1); exit 1; }; };;
500 # There might be people who depend on the old broken behavior: `$host'
501 # used to hold the argument of --host etc.
506 # FIXME: should be removed in autoconf 3.0.
507 if test "x$host_alias" != x; then
508 if test "x$build_alias" = x; then
509 cross_compiling=maybe
510 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
511 If a cross compiler is detected then cross compile mode will be used." >&2
512 elif test "x$build_alias" != "x$host_alias"; then
518 test -n "$host_alias" && ac_tool_prefix=$host_alias-
520 test "$silent" = yes && exec 6>/dev/null
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524 ac_srcdir_defaulted=yes
525 # Try the directory containing this script, then its parent.
527 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
528 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530 if test ! -r $srcdir/$ac_unique_file; then
534 ac_srcdir_defaulted=no
536 if test ! -r $srcdir/$ac_unique_file; then
537 if test "$ac_srcdir_defaulted" = yes; then
538 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
539 { (exit 1); exit 1; }; }
541 { echo "$as_me: error: cannot find sources in $srcdir" >&2
542 { (exit 1); exit 1; }; }
545 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
546 ac_env_build_alias_set=${build_alias+set}
547 ac_env_build_alias_value=$build_alias
548 ac_cv_env_build_alias_set=${build_alias+set}
549 ac_cv_env_build_alias_value=$build_alias
550 ac_env_host_alias_set=${host_alias+set}
551 ac_env_host_alias_value=$host_alias
552 ac_cv_env_host_alias_set=${host_alias+set}
553 ac_cv_env_host_alias_value=$host_alias
554 ac_env_target_alias_set=${target_alias+set}
555 ac_env_target_alias_value=$target_alias
556 ac_cv_env_target_alias_set=${target_alias+set}
557 ac_cv_env_target_alias_value=$target_alias
558 ac_env_CC_set=${CC+set}
560 ac_cv_env_CC_set=${CC+set}
561 ac_cv_env_CC_value=$CC
562 ac_env_CFLAGS_set=${CFLAGS+set}
563 ac_env_CFLAGS_value=$CFLAGS
564 ac_cv_env_CFLAGS_set=${CFLAGS+set}
565 ac_cv_env_CFLAGS_value=$CFLAGS
566 ac_env_LDFLAGS_set=${LDFLAGS+set}
567 ac_env_LDFLAGS_value=$LDFLAGS
568 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_cv_env_LDFLAGS_value=$LDFLAGS
570 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
571 ac_env_CPPFLAGS_value=$CPPFLAGS
572 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
574 ac_env_CPP_set=${CPP+set}
575 ac_env_CPP_value=$CPP
576 ac_cv_env_CPP_set=${CPP+set}
577 ac_cv_env_CPP_value=$CPP
580 # Report the --help message.
582 if test "$ac_init_help" = "long"; then
583 # Omit some internal or obsolete options to make the list less imposing.
584 # This message is too long to be a string in the A/UX 3.1 sh.
586 \`configure' configures this package to adapt to many kinds of systems.
588 Usage: $0 [OPTION]... [VAR=VALUE]...
590 To assign environment variables (e.g., CC, CFLAGS...), specify them as
591 VAR=VALUE. See below for descriptions of some of the useful variables.
593 Defaults for the options are specified in brackets.
596 -h, --help display this help and exit
597 --help=short display options specific to this package
598 --help=recursive display the short help of all the included packages
599 -V, --version display version information and exit
600 -q, --quiet, --silent do not print \`checking...' messages
601 --cache-file=FILE cache test results in FILE [disabled]
602 -C, --config-cache alias for \`--cache-file=config.cache'
603 -n, --no-create do not create output files
604 --srcdir=DIR find the sources in DIR [configure dir or \`..']
609 Installation directories:
610 --prefix=PREFIX install architecture-independent files in PREFIX
612 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
615 By default, \`make install' will install all the files in
616 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
617 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
618 for instance \`--prefix=\$HOME'.
620 For better control, use the options below.
622 Fine tuning of the installation directories:
623 --bindir=DIR user executables [EPREFIX/bin]
624 --sbindir=DIR system admin executables [EPREFIX/sbin]
625 --libexecdir=DIR program executables [EPREFIX/libexec]
626 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
627 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
628 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
629 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
630 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
631 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
632 --libdir=DIR object code libraries [EPREFIX/lib]
633 --includedir=DIR C header files [PREFIX/include]
634 --oldincludedir=DIR C header files for non-gcc [/usr/include]
635 --infodir=DIR info documentation [DATAROOTDIR/info]
636 --mandir=DIR man documentation [DATAROOTDIR/man]
642 --program-prefix=PREFIX prepend PREFIX to installed program names
643 --program-suffix=SUFFIX append SUFFIX to installed program names
644 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
647 --x-includes=DIR X include files are in DIR
648 --x-libraries=DIR X library files are in DIR
651 --build=BUILD configure for building on BUILD [guessed]
652 --host=HOST build programs to run on HOST [BUILD]
656 if test -n "$ac_init_help"; then
661 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
662 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
665 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
666 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
669 --disable-stripping do not strip (debug info) installed executables
670 --enable-string-hacks work around bogus compiler/loader warnings
671 --with-pkg-config{=path} enable/disable use of pkg-config
672 --disable-echo do not display "compiling" commands
673 Curses Version-dependent Options:
674 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
675 --disable-widec disable checks for wide-character functions
676 --with-curses-dir=DIR directory in which (n)curses is installed
677 --with-screen=XXX use specified curses-libraries
678 --with-ncursesw use wide ncurses-libraries
679 --with-ncurses use ncurses-libraries
680 --with-pdcurses compile/link with pdcurses X11 library
681 --with-curses-colr compile/link with HPUX 10.x color-curses
682 --with-curses-5lib compile/link with SunOS 5lib curses
683 --with-Xaw3d link with Xaw 3d library
684 --with-Xaw3dxft link with Xaw 3d xft library
685 --with-neXtaw link with neXT Athena library
686 --with-XawPlus link with Athena-Plus library
687 --with-x use the X Window System
688 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
689 --disable-panel disable checks for panel functions
690 --disable-menu disable checks for menu functions
691 --disable-form disable checks for form functions
692 Testing/development Options:
693 --enable-warnings test: turn on gcc compiler warnings
694 --with-dmalloc test: use Gray Watson's dmalloc library
695 --with-dbmalloc test: use Conor Cahill's dbmalloc library
696 --with-valgrind test: use valgrind
697 --disable-leaks test: free permanent memory, analyze leaks
698 --disable-rpath-hack don't add rpath options for additional libraries
700 Some influential environment variables:
701 CC C compiler command
702 CFLAGS C compiler flags
703 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
704 nonstandard directory <lib dir>
705 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
706 headers in a nonstandard directory <include dir>
709 Use these variables to override the choices made by `configure' or to help
710 it to find libraries and programs with nonstandard names/locations.
715 if test "$ac_init_help" = "recursive"; then
716 # If there are subdirs, report their specific --help.
718 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
720 # A "../" for each directory in /$ac_subdir.
721 ac_dots=`echo $ac_subdir |
722 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
725 .) # No --srcdir option. We are building in place.
726 ac_sub_srcdir=$srcdir ;;
727 [\\/]* | ?:[\\/]* ) # Absolute path.
728 ac_sub_srcdir=$srcdir/$ac_subdir ;;
730 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
733 # Check for guested configure; otherwise get Cygnus style configure.
734 if test -f $ac_sub_srcdir/configure.gnu; then
736 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
737 elif test -f $ac_sub_srcdir/configure; then
739 $SHELL $ac_sub_srcdir/configure --help=recursive
740 elif test -f $ac_sub_srcdir/configure.ac ||
741 test -f $ac_sub_srcdir/configure.in; then
745 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
751 test -n "$ac_init_help" && exit 0
752 if $ac_init_version; then
755 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
756 Free Software Foundation, Inc.
757 This configure script is free software; the Free Software Foundation
758 gives unlimited permission to copy, distribute and modify it.
764 This file contains any messages produced by compilers while
765 running configure, to aid debugging if configure makes a mistake.
767 It was created by $as_me, which was
768 generated by GNU Autoconf 2.52.20200111. Invocation command line was
779 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
780 uname -m = `(uname -m) 2>/dev/null || echo unknown`
781 uname -r = `(uname -r) 2>/dev/null || echo unknown`
782 uname -s = `(uname -s) 2>/dev/null || echo unknown`
783 uname -v = `(uname -v) 2>/dev/null || echo unknown`
785 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
786 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
788 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
789 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
790 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
791 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
792 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
793 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
794 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
808 # Keep a trace of the command line.
809 # Strip out --no-create and --no-recursion so they do not pile up.
810 # Also quote any args containing shell meta-characters.
816 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
817 | --no-cr | --no-c) ;;
818 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
819 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
820 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
821 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
822 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
824 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
827 # Get rid of the leading space.
830 # When interrupted or exit'd, cleanup temporary files, and complete
831 # config.log. We remove comments because anyway the quotes in there
832 # would cause problems or look ugly.
834 # Save into config.log some information that might help in debugging.
836 echo "## ----------------- ##" >&5
837 echo "## Cache variables. ##" >&5
838 echo "## ----------------- ##" >&5
840 # The following way of writing the cache mishandles newlines in values,
843 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
846 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
847 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855 sed "/^$/d" confdefs.h >conftest.log
856 if test -s conftest.log; then
858 echo "## ------------ ##" >&5
859 echo "## confdefs.h. ##" >&5
860 echo "## ------------ ##" >&5
865 test "$ac_signal" != 0 &&
866 echo "$as_me: caught signal $ac_signal" >&5
867 echo "$as_me: exit $exit_status" >&5
868 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
871 for ac_signal in 1 2 13 15; do
872 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 # confdefs.h avoids OS command line length limits that DEFS can exceed.
877 rm -rf conftest* confdefs.h
878 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
881 # Let the site file select an alternate cache file if it wants to.
882 # Prefer explicitly selected file to automatically selected ones.
883 if test -z "$CONFIG_SITE"; then
884 if test "x$prefix" != xNONE; then
885 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
887 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
890 for ac_site_file in $CONFIG_SITE; do
891 if test -r "$ac_site_file"; then
892 { echo "$as_me:892: loading site script $ac_site_file" >&5
893 echo "$as_me: loading site script $ac_site_file" >&6;}
894 cat "$ac_site_file" >&5
899 if test -r "$cache_file"; then
900 # Some versions of bash will fail to source /dev/null (special
901 # files actually), so we avoid doing that.
902 if test -f "$cache_file"; then
903 { echo "$as_me:903: loading cache $cache_file" >&5
904 echo "$as_me: loading cache $cache_file" >&6;}
906 [\\/]* | ?:[\\/]* ) . $cache_file;;
911 { echo "$as_me:911: creating cache $cache_file" >&5
912 echo "$as_me: creating cache $cache_file" >&6;}
916 # Check that the precious variables saved in the cache have kept the same
918 ac_cache_corrupted=false
919 for ac_var in `(set) 2>&1 |
920 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
922 eval ac_new_set=\$ac_env_${ac_var}_set
923 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
924 eval ac_new_val="\$ac_env_${ac_var}_value"
925 case $ac_old_set,$ac_new_set in
927 { echo "$as_me:927: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
928 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
929 ac_cache_corrupted=: ;;
931 { echo "$as_me:931: error: \`$ac_var' was not set in the previous run" >&5
932 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
933 ac_cache_corrupted=: ;;
936 if test "x$ac_old_val" != "x$ac_new_val"; then
937 { echo "$as_me:937: error: \`$ac_var' has changed since the previous run:" >&5
938 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
939 { echo "$as_me:939: former value: $ac_old_val" >&5
940 echo "$as_me: former value: $ac_old_val" >&2;}
941 { echo "$as_me:941: current value: $ac_new_val" >&5
942 echo "$as_me: current value: $ac_new_val" >&2;}
946 # Pass precious variables to config.status. It doesn't matter if
947 # we pass some twice (in addition to the command line arguments).
948 if test "$ac_new_set" = set; then
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args '$ac_arg'"
954 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
959 if $ac_cache_corrupted; then
960 { echo "$as_me:960: error: changes in the environment can compromise the build" >&5
961 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
962 { { echo "$as_me:962: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
963 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
964 { (exit 1); exit 1; }; }
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
972 ac_main_return=return
974 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
975 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
977 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
978 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
980 echo "#! $SHELL" >conftest.sh
981 echo "exit 0" >>conftest.sh
983 if { (echo "$as_me:983: PATH=\".;.\"; conftest.sh") >&5
984 (PATH=".;."; conftest.sh) 2>&5
986 echo "$as_me:986: \$? = $ac_status" >&5
987 (exit $ac_status); }; then
988 ac_path_separator=';'
992 PATH_SEPARATOR="$ac_path_separator"
995 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
997 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
999 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1002 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1003 if test -f $ac_dir/install-sh; then
1005 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 elif test -f $ac_dir/install.sh; then
1009 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 elif test -f $ac_dir/shtool; then
1013 ac_install_sh="$ac_aux_dir/shtool install -c"
1017 if test -z "$ac_aux_dir"; then
1018 { { echo "$as_me:1018: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1019 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1020 { (exit 1); exit 1; }; }
1022 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1023 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1024 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026 # Make sure we can run config.sub.
1027 $ac_config_sub sun4 >/dev/null 2>&1 ||
1028 { { echo "$as_me:1028: error: cannot run $ac_config_sub" >&5
1029 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1030 { (exit 1); exit 1; }; }
1032 echo "$as_me:1032: checking build system type" >&5
1033 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1034 if test "${ac_cv_build+set}" = set; then
1035 echo $ECHO_N "(cached) $ECHO_C" >&6
1037 ac_cv_build_alias=$build_alias
1038 test -z "$ac_cv_build_alias" &&
1039 ac_cv_build_alias=`$ac_config_guess`
1040 test -z "$ac_cv_build_alias" &&
1041 { { echo "$as_me:1041: error: cannot guess build type; you must specify one" >&5
1042 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1043 { (exit 1); exit 1; }; }
1044 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1045 { { echo "$as_me:1045: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1046 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1047 { (exit 1); exit 1; }; }
1050 echo "$as_me:1050: result: $ac_cv_build" >&5
1051 echo "${ECHO_T}$ac_cv_build" >&6
1053 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1054 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1055 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 system_name="$host_os"
1081 system_name="`(uname -s -r) 2>/dev/null`"
1082 if test -z "$system_name" ; then
1083 system_name="`(hostname) 2>/dev/null`"
1086 test -n "$system_name" &&
1087 cat >>confdefs.h <<EOF
1088 #define SYSTEM_NAME "$system_name"
1091 if test "${cf_cv_system_name+set}" = set; then
1092 echo $ECHO_N "(cached) $ECHO_C" >&6
1094 cf_cv_system_name="$system_name"
1097 test -z "$system_name" && system_name="$cf_cv_system_name"
1098 test -n "$cf_cv_system_name" && echo "$as_me:1098: result: Configuring for $cf_cv_system_name" >&5
1099 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1101 if test ".$system_name" != ".$cf_cv_system_name" ; then
1102 echo "$as_me:1102: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1103 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1104 { { echo "$as_me:1104: error: \"Please remove config.cache and try again.\"" >&5
1105 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1106 { (exit 1); exit 1; }; }
1109 test "$program_prefix" != NONE &&
1110 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1111 # Use a double $ so make ignores it.
1112 test "$program_suffix" != NONE &&
1113 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1114 # Double any \ or $. echo might interpret backslashes.
1115 # By default was `s,x,x', remove it if useless.
1116 cat <<\_ACEOF >conftest.sed
1117 s/[\\$]/&&/g;s/;s,x,x,$//
1119 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1122 echo "$as_me:1122: checking whether ${MAKE-make} sets \${MAKE}" >&5
1123 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1124 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1125 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1126 echo $ECHO_N "(cached) $ECHO_C" >&6
1128 cat >conftest.make <<\EOF
1130 @echo 'ac_maketemp="${MAKE}"'
1132 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1133 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1134 if test -n "$ac_maketemp"; then
1135 eval ac_cv_prog_make_${ac_make}_set=yes
1137 eval ac_cv_prog_make_${ac_make}_set=no
1141 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1142 echo "$as_me:1142: result: yes" >&5
1143 echo "${ECHO_T}yes" >&6
1146 echo "$as_me:1146: result: no" >&5
1147 echo "${ECHO_T}no" >&6
1148 SET_MAKE="MAKE=${MAKE-make}"
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return=return
1157 if test -n "$ac_tool_prefix"; then
1158 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1159 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1160 echo "$as_me:1160: checking for $ac_word" >&5
1161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1162 if test "${ac_cv_prog_CC+set}" = set; then
1163 echo $ECHO_N "(cached) $ECHO_C" >&6
1165 if test -n "$CC"; then
1166 ac_cv_prog_CC="$CC" # Let the user override the test.
1168 ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 $as_executable_p "$ac_dir/$ac_word" || continue
1174 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1175 echo "$as_me:1175: found $ac_dir/$ac_word" >&5
1182 if test -n "$CC"; then
1183 echo "$as_me:1183: result: $CC" >&5
1184 echo "${ECHO_T}$CC" >&6
1186 echo "$as_me:1186: result: no" >&5
1187 echo "${ECHO_T}no" >&6
1191 if test -z "$ac_cv_prog_CC"; then
1193 # Extract the first word of "gcc", so it can be a program name with args.
1194 set dummy gcc; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1198 echo $ECHO_N "(cached) $ECHO_C" >&6
1200 if test -n "$ac_ct_CC"; then
1201 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1203 ac_save_IFS=$IFS; IFS=$ac_path_separator
1205 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_ac_ct_CC="gcc"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1216 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1217 if test -n "$ac_ct_CC"; then
1218 echo "$as_me:1218: result: $ac_ct_CC" >&5
1219 echo "${ECHO_T}$ac_ct_CC" >&6
1221 echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1230 if test -z "$CC"; then
1231 if test -n "$ac_tool_prefix"; then
1232 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1233 set dummy ${ac_tool_prefix}cc; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_prog_CC+set}" = set; then
1237 echo $ECHO_N "(cached) $ECHO_C" >&6
1239 if test -n "$CC"; then
1240 ac_cv_prog_CC="$CC" # Let the user override the test.
1242 ac_save_IFS=$IFS; IFS=$ac_path_separator
1244 for ac_dir in $ac_dummy; do
1246 test -z "$ac_dir" && ac_dir=.
1247 $as_executable_p "$ac_dir/$ac_word" || continue
1248 ac_cv_prog_CC="${ac_tool_prefix}cc"
1249 echo "$as_me:1249: found $ac_dir/$ac_word" >&5
1256 if test -n "$CC"; then
1257 echo "$as_me:1257: result: $CC" >&5
1258 echo "${ECHO_T}$CC" >&6
1260 echo "$as_me:1260: result: no" >&5
1261 echo "${ECHO_T}no" >&6
1265 if test -z "$ac_cv_prog_CC"; then
1267 # Extract the first word of "cc", so it can be a program name with args.
1268 set dummy cc; ac_word=$2
1269 echo "$as_me:1269: checking for $ac_word" >&5
1270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1272 echo $ECHO_N "(cached) $ECHO_C" >&6
1274 if test -n "$ac_ct_CC"; then
1275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1277 ac_save_IFS=$IFS; IFS=$ac_path_separator
1279 for ac_dir in $ac_dummy; do
1281 test -z "$ac_dir" && ac_dir=.
1282 $as_executable_p "$ac_dir/$ac_word" || continue
1283 ac_cv_prog_ac_ct_CC="cc"
1284 echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1290 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1291 if test -n "$ac_ct_CC"; then
1292 echo "$as_me:1292: result: $ac_ct_CC" >&5
1293 echo "${ECHO_T}$ac_ct_CC" >&6
1295 echo "$as_me:1295: result: no" >&5
1296 echo "${ECHO_T}no" >&6
1305 if test -z "$CC"; then
1306 # Extract the first word of "cc", so it can be a program name with args.
1307 set dummy cc; ac_word=$2
1308 echo "$as_me:1308: checking for $ac_word" >&5
1309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1310 if test "${ac_cv_prog_CC+set}" = set; then
1311 echo $ECHO_N "(cached) $ECHO_C" >&6
1313 if test -n "$CC"; then
1314 ac_cv_prog_CC="$CC" # Let the user override the test.
1317 ac_save_IFS=$IFS; IFS=$ac_path_separator
1319 for ac_dir in $ac_dummy; do
1321 test -z "$ac_dir" && ac_dir=.
1322 $as_executable_p "$ac_dir/$ac_word" || continue
1323 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1324 ac_prog_rejected=yes
1328 echo "$as_me:1328: found $ac_dir/$ac_word" >&5
1332 if test $ac_prog_rejected = yes; then
1333 # We found a bogon in the path, so make sure we never use it.
1334 set dummy $ac_cv_prog_CC
1336 if test $# != 0; then
1337 # We chose a different compiler from the bogus one.
1338 # However, it has the same basename, so the bogon will be chosen
1339 # first if we set CC to just the basename; use the full file name.
1341 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1349 if test -n "$CC"; then
1350 echo "$as_me:1350: result: $CC" >&5
1351 echo "${ECHO_T}$CC" >&6
1353 echo "$as_me:1353: result: no" >&5
1354 echo "${ECHO_T}no" >&6
1358 if test -z "$CC"; then
1359 if test -n "$ac_tool_prefix"; then
1362 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1363 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1364 echo "$as_me:1364: checking for $ac_word" >&5
1365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1366 if test "${ac_cv_prog_CC+set}" = set; then
1367 echo $ECHO_N "(cached) $ECHO_C" >&6
1369 if test -n "$CC"; then
1370 ac_cv_prog_CC="$CC" # Let the user override the test.
1372 ac_save_IFS=$IFS; IFS=$ac_path_separator
1374 for ac_dir in $ac_dummy; do
1376 test -z "$ac_dir" && ac_dir=.
1377 $as_executable_p "$ac_dir/$ac_word" || continue
1378 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1379 echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1386 if test -n "$CC"; then
1387 echo "$as_me:1387: result: $CC" >&5
1388 echo "${ECHO_T}$CC" >&6
1390 echo "$as_me:1390: result: no" >&5
1391 echo "${ECHO_T}no" >&6
1394 test -n "$CC" && break
1397 if test -z "$CC"; then
1401 # Extract the first word of "$ac_prog", so it can be a program name with args.
1402 set dummy $ac_prog; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1406 echo $ECHO_N "(cached) $ECHO_C" >&6
1408 if test -n "$ac_ct_CC"; then
1409 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1411 ac_save_IFS=$IFS; IFS=$ac_path_separator
1413 for ac_dir in $ac_dummy; do
1415 test -z "$ac_dir" && ac_dir=.
1416 $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_ac_ct_CC="$ac_prog"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1424 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1425 if test -n "$ac_ct_CC"; then
1426 echo "$as_me:1426: result: $ac_ct_CC" >&5
1427 echo "${ECHO_T}$ac_ct_CC" >&6
1429 echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1433 test -n "$ac_ct_CC" && break
1441 test -z "$CC" && { { echo "$as_me:1441: error: no acceptable cc found in \$PATH" >&5
1442 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1443 { (exit 1); exit 1; }; }
1445 # Provide some information about the compiler.
1446 echo "$as_me:1446:" \
1447 "checking for C compiler version" >&5
1448 ac_compiler=`set X $ac_compile; echo $2`
1449 { (eval echo "$as_me:1449: \"$ac_compiler --version </dev/null >&5\"") >&5
1450 (eval $ac_compiler --version </dev/null >&5) 2>&5
1452 echo "$as_me:1452: \$? = $ac_status" >&5
1453 (exit $ac_status); }
1454 { (eval echo "$as_me:1454: \"$ac_compiler -v </dev/null >&5\"") >&5
1455 (eval $ac_compiler -v </dev/null >&5) 2>&5
1457 echo "$as_me:1457: \$? = $ac_status" >&5
1458 (exit $ac_status); }
1459 { (eval echo "$as_me:1459: \"$ac_compiler -V </dev/null >&5\"") >&5
1460 (eval $ac_compiler -V </dev/null >&5) 2>&5
1462 echo "$as_me:1462: \$? = $ac_status" >&5
1463 (exit $ac_status); }
1465 cat >conftest.$ac_ext <<_ACEOF
1466 #line 1466 "configure"
1467 #include "confdefs.h"
1477 ac_clean_files_save=$ac_clean_files
1478 ac_clean_files="$ac_clean_files a.out a.exe"
1479 # Try to create an executable without -o first, disregard a.out.
1480 # It will help us diagnose broken compilers, and finding out an intuition
1482 echo "$as_me:1482: checking for C compiler default output" >&5
1483 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1484 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1485 if { (eval echo "$as_me:1485: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1488 echo "$as_me:1488: \$? = $ac_status" >&5
1489 (exit $ac_status); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1494 ls a.out conftest 2>/dev/null;
1495 ls a.* conftest.* 2>/dev/null`; do
1497 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1498 a.out ) # We found the default executable, but exeext='' is most
1501 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1502 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 echo "$as_me: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1511 { { echo "$as_me:1511: error: C compiler cannot create executables" >&5
1512 echo "$as_me: error: C compiler cannot create executables" >&2;}
1513 { (exit 77); exit 77; }; }
1516 ac_exeext=$ac_cv_exeext
1517 echo "$as_me:1517: result: $ac_file" >&5
1518 echo "${ECHO_T}$ac_file" >&6
1520 # Check the compiler produces executables we can run. If not, either
1521 # the compiler is broken, or we cross compile.
1522 echo "$as_me:1522: checking whether the C compiler works" >&5
1523 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1524 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1525 # If not cross compiling, check that we can run a simple program.
1526 if test "$cross_compiling" != yes; then
1527 if { ac_try='./$ac_file'
1528 { (eval echo "$as_me:1528: \"$ac_try\"") >&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; }; then
1535 if test "$cross_compiling" = maybe; then
1538 { { echo "$as_me:1538: error: cannot run C compiled programs.
1539 If you meant to cross compile, use \`--host'." >&5
1540 echo "$as_me: error: cannot run C compiled programs.
1541 If you meant to cross compile, use \`--host'." >&2;}
1542 { (exit 1); exit 1; }; }
1546 echo "$as_me:1546: result: yes" >&5
1547 echo "${ECHO_T}yes" >&6
1549 rm -f a.out a.exe conftest$ac_cv_exeext
1550 ac_clean_files=$ac_clean_files_save
1551 # Check the compiler produces executables we can run. If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether we are cross compiling" >&5
1554 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1555 echo "$as_me:1555: result: $cross_compiling" >&5
1556 echo "${ECHO_T}$cross_compiling" >&6
1558 echo "$as_me:1558: checking for executable suffix" >&5
1559 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1560 if { (eval echo "$as_me:1560: \"$ac_link\"") >&5
1561 (eval $ac_link) 2>&5
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit $ac_status); }; then
1565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1566 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1567 # work properly (i.e., refer to `conftest.exe'), while it won't with
1569 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1571 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1572 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 { { echo "$as_me:1579: error: cannot compute EXEEXT: cannot compile and link" >&5
1580 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1581 { (exit 1); exit 1; }; }
1584 rm -f conftest$ac_cv_exeext
1585 echo "$as_me:1585: result: $ac_cv_exeext" >&5
1586 echo "${ECHO_T}$ac_cv_exeext" >&6
1588 rm -f conftest.$ac_ext
1589 EXEEXT=$ac_cv_exeext
1591 echo "$as_me:1591: checking for object suffix" >&5
1592 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1593 if test "${ac_cv_objext+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
1596 cat >conftest.$ac_ext <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1608 rm -f conftest.o conftest.obj
1609 if { (eval echo "$as_me:1609: \"$ac_compile\"") >&5
1610 (eval $ac_compile) 2>&5
1612 echo "$as_me:1612: \$? = $ac_status" >&5
1613 (exit $ac_status); }; then
1614 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1616 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1617 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1622 echo "$as_me: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 { { echo "$as_me:1624: error: cannot compute OBJEXT: cannot compile" >&5
1625 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1626 { (exit 1); exit 1; }; }
1629 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1631 echo "$as_me:1631: result: $ac_cv_objext" >&5
1632 echo "${ECHO_T}$ac_cv_objext" >&6
1633 OBJEXT=$ac_cv_objext
1635 echo "$as_me:1635: checking whether we are using the GNU C compiler" >&5
1636 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1637 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657 (eval $ac_compile) 2>&5
1659 echo "$as_me:1659: \$? = $ac_status" >&5
1660 (exit $ac_status); } &&
1661 { ac_try='test -s conftest.$ac_objext'
1662 { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1665 echo "$as_me:1665: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1669 echo "$as_me: failed program was:" >&5
1670 cat conftest.$ac_ext >&5
1673 rm -f conftest.$ac_objext conftest.$ac_ext
1674 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1677 echo "$as_me:1677: result: $ac_cv_c_compiler_gnu" >&5
1678 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1679 GCC=`test $ac_compiler_gnu = yes && echo yes`
1680 ac_test_CFLAGS=${CFLAGS+set}
1681 ac_save_CFLAGS=$CFLAGS
1683 echo "$as_me:1683: checking whether $CC accepts -g" >&5
1684 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1685 if test "${ac_cv_prog_cc_g+set}" = set; then
1686 echo $ECHO_N "(cached) $ECHO_C" >&6
1688 cat >conftest.$ac_ext <<_ACEOF
1689 #line 1689 "configure"
1690 #include "confdefs.h"
1700 rm -f conftest.$ac_objext
1701 if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5
1702 (eval $ac_compile) 2>&5
1704 echo "$as_me:1704: \$? = $ac_status" >&5
1705 (exit $ac_status); } &&
1706 { ac_try='test -s conftest.$ac_objext'
1707 { (eval echo "$as_me:1707: \"$ac_try\"") >&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit $ac_status); }; }; then
1714 echo "$as_me: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1718 rm -f conftest.$ac_objext conftest.$ac_ext
1720 echo "$as_me:1720: result: $ac_cv_prog_cc_g" >&5
1721 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1722 if test "$ac_test_CFLAGS" = set; then
1723 CFLAGS=$ac_save_CFLAGS
1724 elif test $ac_cv_prog_cc_g = yes; then
1725 if test "$GCC" = yes; then
1731 if test "$GCC" = yes; then
1737 # Some people use a C++ compiler to compile C. Since we use `exit',
1738 # in C++ we need to declare it. In case someone uses the same compiler
1739 # for both compiling C and C++ we need to have the C++ compiler decide
1740 # the declaration of exit, since it's the most demanding environment.
1741 cat >conftest.$ac_ext <<_ACEOF
1746 rm -f conftest.$ac_objext
1747 if { (eval echo "$as_me:1747: \"$ac_compile\"") >&5
1748 (eval $ac_compile) 2>&5
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit $ac_status); } &&
1752 { ac_try='test -s conftest.$ac_objext'
1753 { (eval echo "$as_me:1753: \"$ac_try\"") >&5
1756 echo "$as_me:1756: \$? = $ac_status" >&5
1757 (exit $ac_status); }; }; then
1758 for ac_declaration in \
1760 '#include <stdlib.h>' \
1761 'extern "C" void std::exit (int) throw (); using std::exit;' \
1762 'extern "C" void std::exit (int); using std::exit;' \
1763 'extern "C" void exit (int) throw ();' \
1764 'extern "C" void exit (int);' \
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1780 rm -f conftest.$ac_objext
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782 (eval $ac_compile) 2>&5
1784 echo "$as_me:1784: \$? = $ac_status" >&5
1785 (exit $ac_status); } &&
1786 { ac_try='test -s conftest.$ac_objext'
1787 { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1790 echo "$as_me:1790: \$? = $ac_status" >&5
1791 (exit $ac_status); }; }; then
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1798 rm -f conftest.$ac_objext conftest.$ac_ext
1799 cat >conftest.$ac_ext <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813 (eval $ac_compile) 2>&5
1815 echo "$as_me:1815: \$? = $ac_status" >&5
1816 (exit $ac_status); } &&
1817 { ac_try='test -s conftest.$ac_objext'
1818 { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1821 echo "$as_me:1821: \$? = $ac_status" >&5
1822 (exit $ac_status); }; }; then
1825 echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1828 rm -f conftest.$ac_objext conftest.$ac_ext
1831 if test -n "$ac_declaration"; then
1832 echo '#ifdef __cplusplus' >>confdefs.h
1833 echo $ac_declaration >>confdefs.h
1834 echo '#endif' >>confdefs.h
1838 echo "$as_me: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1841 rm -f conftest.$ac_objext conftest.$ac_ext
1843 ac_cpp='$CPP $CPPFLAGS'
1844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847 ac_main_return=return
1850 if test "$GCC" = yes ; then
1851 echo "$as_me:1851: checking version of $CC" >&5
1852 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1853 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1854 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1855 echo "$as_me:1855: result: $GCC_VERSION" >&5
1856 echo "${ECHO_T}$GCC_VERSION" >&6
1861 if test "$GCC" = yes ; then
1864 echo "$as_me:1864: checking if this is really Intel C compiler" >&5
1865 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1866 cf_save_CFLAGS="$CFLAGS"
1867 CFLAGS="$CFLAGS -no-gcc"
1868 cat >conftest.$ac_ext <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1876 #ifdef __INTEL_COMPILER
1885 rm -f conftest.$ac_objext
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887 (eval $ac_compile) 2>&5
1889 echo "$as_me:1889: \$? = $ac_status" >&5
1890 (exit $ac_status); } &&
1891 { ac_try='test -s conftest.$ac_objext'
1892 { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1895 echo "$as_me:1895: \$? = $ac_status" >&5
1896 (exit $ac_status); }; }; then
1898 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1901 echo "$as_me: failed program was:" >&5
1902 cat conftest.$ac_ext >&5
1904 rm -f conftest.$ac_objext conftest.$ac_ext
1905 CFLAGS="$cf_save_CFLAGS"
1906 echo "$as_me:1906: result: $INTEL_COMPILER" >&5
1907 echo "${ECHO_T}$INTEL_COMPILER" >&6
1914 if test "$GCC" = yes ; then
1915 echo "$as_me:1915: checking if this is really Clang C compiler" >&5
1916 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1917 cf_save_CFLAGS="$CFLAGS"
1918 CFLAGS="$CFLAGS -Qunused-arguments"
1919 cat >conftest.$ac_ext <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f conftest.$ac_objext
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit $ac_status); } &&
1942 { ac_try='test -s conftest.$ac_objext'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit $ac_status); }; }; then
1949 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
1952 echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 CFLAGS="$cf_save_CFLAGS"
1957 echo "$as_me:1957: result: $CLANG_COMPILER" >&5
1958 echo "${ECHO_T}$CLANG_COMPILER" >&6
1961 echo "$as_me:1961: checking for $CC option to accept ANSI C" >&5
1962 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1963 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1966 ac_cv_prog_cc_stdc=no
1968 cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1973 #include <sys/types.h>
1974 #include <sys/stat.h>
1975 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1976 struct buf { int x; };
1977 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1978 static char *e (p, i)
1984 static char *f (char * (*g) (char **, int), char **p, ...)
1989 s = g (p, va_arg (v,int));
1993 int test (int i, double x);
1994 struct s1 {int (*f) (int a);};
1995 struct s2 {int (*f) (double a);};
1996 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2002 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2007 # Don't try gcc -ansi; that turns off useful extensions and
2008 # breaks some systems' header files.
2009 # AIX -qlanglvl=ansi
2010 # Ultrix and OSF/1 -std1
2011 # HP-UX 10.20 and later -Ae
2012 # HP-UX older versions -Aa -D_HPUX_SOURCE
2013 # SVR4 -Xc -D__EXTENSIONS__
2014 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2016 CC="$ac_save_CC $ac_arg"
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019 (eval $ac_compile) 2>&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } &&
2023 { ac_try='test -s conftest.$ac_objext'
2024 { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2027 echo "$as_me:2027: \$? = $ac_status" >&5
2028 (exit $ac_status); }; }; then
2029 ac_cv_prog_cc_stdc=$ac_arg
2032 echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 rm -f conftest.$ac_objext
2037 rm -f conftest.$ac_ext conftest.$ac_objext
2042 case "x$ac_cv_prog_cc_stdc" in
2044 echo "$as_me:2044: result: none needed" >&5
2045 echo "${ECHO_T}none needed" >&6 ;;
2047 echo "$as_me:2047: result: $ac_cv_prog_cc_stdc" >&5
2048 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2049 CC="$CC $ac_cv_prog_cc_stdc" ;;
2052 # This should have been defined by AC_PROG_CC
2055 echo "$as_me:2055: checking \$CFLAGS variable" >&5
2056 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2059 echo "$as_me:2059: result: broken" >&5
2060 echo "${ECHO_T}broken" >&6
2061 { echo "$as_me:2061: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2062 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2065 for cf_arg in $cf_flags
2071 cf_new_extra_cppflags=
2073 for cf_add_cflags in $cf_arg
2075 case $cf_fix_cppflags in
2077 case $cf_add_cflags in
2078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2079 case $cf_add_cflags in
2081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2084 && test -z "${cf_tst_cflags}" \
2085 && cf_fix_cppflags=yes
2087 if test $cf_fix_cppflags = yes ; then
2089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2093 elif test "${cf_tst_cflags}" = "\"'" ; then
2095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2106 case $cf_add_cflags in
2108 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2110 CPPFLAGS=`echo "$CPPFLAGS" | \
2111 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2112 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2117 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2118 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2125 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2126 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2139 && test -z "${cf_tst_cflags}" \
2140 && cf_fix_cppflags=no
2145 if test -n "$cf_new_cflags" ; then
2147 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2148 CFLAGS="${CFLAGS}$cf_new_cflags"
2152 if test -n "$cf_new_cppflags" ; then
2154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2155 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2159 if test -n "$cf_new_extra_cppflags" ; then
2161 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2162 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2169 echo "$as_me:2169: result: ok" >&5
2170 echo "${ECHO_T}ok" >&6
2174 echo "$as_me:2174: checking \$CC variable" >&5
2175 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2178 echo "$as_me:2178: result: broken" >&5
2179 echo "${ECHO_T}broken" >&6
2180 { echo "$as_me:2180: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2181 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2183 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2184 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2186 for cf_arg in $cf_flags
2194 cf_new_extra_cppflags=
2196 for cf_add_cflags in $cf_arg
2198 case $cf_fix_cppflags in
2200 case $cf_add_cflags in
2201 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2202 case $cf_add_cflags in
2204 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2207 && test -z "${cf_tst_cflags}" \
2208 && cf_fix_cppflags=yes
2210 if test $cf_fix_cppflags = yes ; then
2212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2216 elif test "${cf_tst_cflags}" = "\"'" ; then
2218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2229 case $cf_add_cflags in
2231 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2233 CPPFLAGS=`echo "$CPPFLAGS" | \
2234 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2235 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2240 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2241 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2248 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2249 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2262 && test -z "${cf_tst_cflags}" \
2263 && cf_fix_cppflags=no
2268 if test -n "$cf_new_cflags" ; then
2270 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2271 CFLAGS="${CFLAGS}$cf_new_cflags"
2275 if test -n "$cf_new_cppflags" ; then
2277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2278 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2282 if test -n "$cf_new_extra_cppflags" ; then
2284 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2285 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2295 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2297 echo "${as_me:-configure}:2297: testing resulting CC: '$CC' ..." 1>&5
2299 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2301 echo "${as_me:-configure}:2301: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2303 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2305 echo "${as_me:-configure}:2305: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2309 echo "$as_me:2309: result: ok" >&5
2310 echo "${ECHO_T}ok" >&6
2314 echo "$as_me:2314: checking for inline" >&5
2315 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2316 if test "${ac_cv_c_inline+set}" = set; then
2317 echo $ECHO_N "(cached) $ECHO_C" >&6
2320 for ac_kw in inline __inline__ __inline; do
2321 cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2325 static $ac_kw int static_foo () {return 0; }
2326 $ac_kw int foo () {return 0; }
2330 rm -f conftest.$ac_objext
2331 if { (eval echo "$as_me:2331: \"$ac_compile\"") >&5
2332 (eval $ac_compile) 2>&5
2334 echo "$as_me:2334: \$? = $ac_status" >&5
2335 (exit $ac_status); } &&
2336 { ac_try='test -s conftest.$ac_objext'
2337 { (eval echo "$as_me:2337: \"$ac_try\"") >&5
2340 echo "$as_me:2340: \$? = $ac_status" >&5
2341 (exit $ac_status); }; }; then
2342 ac_cv_c_inline=$ac_kw; break
2344 echo "$as_me: failed program was:" >&5
2345 cat conftest.$ac_ext >&5
2347 rm -f conftest.$ac_objext conftest.$ac_ext
2351 echo "$as_me:2351: result: $ac_cv_c_inline" >&5
2352 echo "${ECHO_T}$ac_cv_c_inline" >&6
2353 case $ac_cv_c_inline in
2356 cat >>confdefs.h <<\EOF
2360 *) cat >>confdefs.h <<EOF
2361 #define inline $ac_cv_c_inline
2367 ac_cpp='$CPP $CPPFLAGS'
2368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2371 ac_main_return=return
2372 echo "$as_me:2372: checking how to run the C preprocessor" >&5
2373 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2374 # On Suns, sometimes $CPP names a directory.
2375 if test -n "$CPP" && test -d "$CPP"; then
2378 if test -z "$CPP"; then
2379 if test "${ac_cv_prog_CPP+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2382 # Double quotes because CPP needs to be expanded
2383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2386 for ac_c_preproc_warn_flag in '' yes
2388 # Use a header file that comes with gcc, so configuring glibc
2389 # with a fresh cross-compiler works.
2390 # On the NeXT, cc -E runs the code through the compiler's parser,
2391 # not just through cpp. "Syntax error" is here to catch this case.
2392 cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2398 if { (eval echo "$as_me:2398: \"$ac_cpp conftest.$ac_ext\"") >&5
2399 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2401 egrep -v '^ *\+' conftest.er1 >conftest.err
2403 cat conftest.err >&5
2404 echo "$as_me:2404: \$? = $ac_status" >&5
2405 (exit $ac_status); } >/dev/null; then
2406 if test -s conftest.err; then
2407 ac_cpp_err=$ac_c_preproc_warn_flag
2414 if test -z "$ac_cpp_err"; then
2417 echo "$as_me: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 # Broken: fails on valid input.
2422 rm -f conftest.err conftest.$ac_ext
2424 # OK, works on sane cases. Now check whether non-existent headers
2425 # can be detected and how.
2426 cat >conftest.$ac_ext <<_ACEOF
2427 #line 2427 "configure"
2428 #include "confdefs.h"
2429 #include <ac_nonexistent.h>
2431 if { (eval echo "$as_me:2431: \"$ac_cpp conftest.$ac_ext\"") >&5
2432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2434 egrep -v '^ *\+' conftest.er1 >conftest.err
2436 cat conftest.err >&5
2437 echo "$as_me:2437: \$? = $ac_status" >&5
2438 (exit $ac_status); } >/dev/null; then
2439 if test -s conftest.err; then
2440 ac_cpp_err=$ac_c_preproc_warn_flag
2447 if test -z "$ac_cpp_err"; then
2448 # Broken: success on invalid input.
2451 echo "$as_me: failed program was:" >&5
2452 cat conftest.$ac_ext >&5
2453 # Passes both tests.
2457 rm -f conftest.err conftest.$ac_ext
2460 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2461 rm -f conftest.err conftest.$ac_ext
2462 if $ac_preproc_ok; then
2474 echo "$as_me:2474: result: $CPP" >&5
2475 echo "${ECHO_T}$CPP" >&6
2477 for ac_c_preproc_warn_flag in '' yes
2479 # Use a header file that comes with gcc, so configuring glibc
2480 # with a fresh cross-compiler works.
2481 # On the NeXT, cc -E runs the code through the compiler's parser,
2482 # not just through cpp. "Syntax error" is here to catch this case.
2483 cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2489 if { (eval echo "$as_me:2489: \"$ac_cpp conftest.$ac_ext\"") >&5
2490 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2492 egrep -v '^ *\+' conftest.er1 >conftest.err
2494 cat conftest.err >&5
2495 echo "$as_me:2495: \$? = $ac_status" >&5
2496 (exit $ac_status); } >/dev/null; then
2497 if test -s conftest.err; then
2498 ac_cpp_err=$ac_c_preproc_warn_flag
2505 if test -z "$ac_cpp_err"; then
2508 echo "$as_me: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 # Broken: fails on valid input.
2513 rm -f conftest.err conftest.$ac_ext
2515 # OK, works on sane cases. Now check whether non-existent headers
2516 # can be detected and how.
2517 cat >conftest.$ac_ext <<_ACEOF
2518 #line 2518 "configure"
2519 #include "confdefs.h"
2520 #include <ac_nonexistent.h>
2522 if { (eval echo "$as_me:2522: \"$ac_cpp conftest.$ac_ext\"") >&5
2523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2525 egrep -v '^ *\+' conftest.er1 >conftest.err
2527 cat conftest.err >&5
2528 echo "$as_me:2528: \$? = $ac_status" >&5
2529 (exit $ac_status); } >/dev/null; then
2530 if test -s conftest.err; then
2531 ac_cpp_err=$ac_c_preproc_warn_flag
2538 if test -z "$ac_cpp_err"; then
2539 # Broken: success on invalid input.
2542 echo "$as_me: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 # Passes both tests.
2548 rm -f conftest.err conftest.$ac_ext
2551 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2552 rm -f conftest.err conftest.$ac_ext
2553 if $ac_preproc_ok; then
2556 { { echo "$as_me:2556: error: C preprocessor \"$CPP\" fails sanity check" >&5
2557 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2558 { (exit 1); exit 1; }; }
2562 ac_cpp='$CPP $CPPFLAGS'
2563 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2564 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2565 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2566 ac_main_return=return
2568 for ac_prog in mawk gawk nawk awk
2570 # Extract the first word of "$ac_prog", so it can be a program name with args.
2571 set dummy $ac_prog; ac_word=$2
2572 echo "$as_me:2572: checking for $ac_word" >&5
2573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2574 if test "${ac_cv_prog_AWK+set}" = set; then
2575 echo $ECHO_N "(cached) $ECHO_C" >&6
2577 if test -n "$AWK"; then
2578 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2580 ac_save_IFS=$IFS; IFS=$ac_path_separator
2582 for ac_dir in $ac_dummy; do
2584 test -z "$ac_dir" && ac_dir=.
2585 $as_executable_p "$ac_dir/$ac_word" || continue
2586 ac_cv_prog_AWK="$ac_prog"
2587 echo "$as_me:2587: found $ac_dir/$ac_word" >&5
2594 if test -n "$AWK"; then
2595 echo "$as_me:2595: result: $AWK" >&5
2596 echo "${ECHO_T}$AWK" >&6
2598 echo "$as_me:2598: result: no" >&5
2599 echo "${ECHO_T}no" >&6
2602 test -n "$AWK" && break
2605 # Find a good install program. We prefer a C program (faster),
2606 # so one script is as good as another. But avoid the broken or
2607 # incompatible versions:
2608 # SysV /etc/install, /usr/sbin/install
2609 # SunOS /usr/etc/install
2610 # IRIX /sbin/install
2612 # AmigaOS /C/install, which installs bootblocks on floppy discs
2613 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2614 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2615 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2616 # ./install, which can be erroneously created by make from ./install.sh.
2617 echo "$as_me:2617: checking for a BSD compatible install" >&5
2618 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2619 if test -z "$INSTALL"; then
2620 if test "${ac_cv_path_install+set}" = set; then
2621 echo $ECHO_N "(cached) $ECHO_C" >&6
2623 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $PATH; do
2626 # Account for people who put trailing slashes in PATH elements.
2628 / | ./ | .// | /cC/* \
2629 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2632 # OSF1 and SCO ODT 3.0 have their own names for install.
2633 # Don't use installbsd from OSF since it installs stuff as root
2635 for ac_prog in ginstall scoinst install; do
2636 if $as_executable_p "$ac_dir/$ac_prog"; then
2637 if test $ac_prog = install &&
2638 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2639 # AIX install. It has an incompatible calling convention.
2641 elif test $ac_prog = install &&
2642 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2643 # program-specific install script used by HP pwplus--don't use.
2646 ac_cv_path_install="$ac_dir/$ac_prog -c"
2656 if test "${ac_cv_path_install+set}" = set; then
2657 INSTALL=$ac_cv_path_install
2659 # As a last resort, use the slow shell script. We don't cache a
2660 # path for INSTALL within a source directory, because that will
2661 # break other packages using the cache if that directory is
2662 # removed, or if the path is relative.
2663 INSTALL=$ac_install_sh
2666 echo "$as_me:2666: result: $INSTALL" >&5
2667 echo "${ECHO_T}$INSTALL" >&6
2669 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2670 # It thinks the first close brace ends the variable substitution.
2671 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2673 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2675 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2681 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2682 test -z "$cf_dir" && cf_dir=.
2683 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2687 echo "$as_me:2687: checking if you want to install stripped executables" >&5
2688 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2690 # Check whether --enable-stripping or --disable-stripping was given.
2691 if test "${enable_stripping+set}" = set; then
2692 enableval="$enable_stripping"
2693 test "$enableval" != no && enableval=yes
2694 if test "$enableval" != "yes" ; then
2704 echo "$as_me:2704: result: $with_stripping" >&5
2705 echo "${ECHO_T}$with_stripping" >&6
2707 if test "$with_stripping" = yes
2714 : ${INSTALL:=install}
2715 echo "$as_me:2715: checking if install accepts -p option" >&5
2716 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2717 if test "${cf_cv_install_p+set}" = set; then
2718 echo $ECHO_N "(cached) $ECHO_C" >&6
2725 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2727 if test -f conftest.out/conftest.in
2729 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2730 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2731 if test -s conftest.err
2746 echo "$as_me:2746: result: $cf_cv_install_p" >&5
2747 echo "${ECHO_T}$cf_cv_install_p" >&6
2749 echo "$as_me:2749: checking if install needs to be told about ownership" >&5
2750 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2751 case `$ac_config_guess` in
2760 echo "$as_me:2760: result: $with_install_o" >&5
2761 echo "${ECHO_T}$with_install_o" >&6
2762 if test "x$with_install_o" = xyes
2764 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2769 for ac_prog in lint cppcheck splint
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_LINT+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2778 if test -n "$LINT"; then
2779 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_LINT="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2794 LINT=$ac_cv_prog_LINT
2795 if test -n "$LINT"; then
2796 echo "$as_me:2796: result: $LINT" >&5
2797 echo "${ECHO_T}$LINT" >&6
2799 echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2803 test -n "$LINT" && break
2807 (xcppcheck|x*/cppcheck)
2808 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2812 echo "$as_me:2812: checking if filesystem supports mixed-case filenames" >&5
2813 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2814 if test "${cf_cv_mixedcase+set}" = set; then
2815 echo $ECHO_N "(cached) $ECHO_C" >&6
2818 if test "$cross_compiling" = yes ; then
2819 case $target_alias in
2820 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2828 rm -f conftest CONFTEST
2830 if test -f CONFTEST ; then
2835 rm -f conftest CONFTEST
2839 echo "$as_me:2839: result: $cf_cv_mixedcase" >&5
2840 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2841 test "$cf_cv_mixedcase" = yes &&
2842 cat >>confdefs.h <<\EOF
2843 #define MIXEDCASE_FILENAMES 1
2846 for ac_prog in exctags ctags
2848 # Extract the first word of "$ac_prog", so it can be a program name with args.
2849 set dummy $ac_prog; ac_word=$2
2850 echo "$as_me:2850: checking for $ac_word" >&5
2851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2852 if test "${ac_cv_prog_CTAGS+set}" = set; then
2853 echo $ECHO_N "(cached) $ECHO_C" >&6
2855 if test -n "$CTAGS"; then
2856 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2858 ac_save_IFS=$IFS; IFS=$ac_path_separator
2860 for ac_dir in $ac_dummy; do
2862 test -z "$ac_dir" && ac_dir=.
2863 $as_executable_p "$ac_dir/$ac_word" || continue
2864 ac_cv_prog_CTAGS="$ac_prog"
2865 echo "$as_me:2865: found $ac_dir/$ac_word" >&5
2871 CTAGS=$ac_cv_prog_CTAGS
2872 if test -n "$CTAGS"; then
2873 echo "$as_me:2873: result: $CTAGS" >&5
2874 echo "${ECHO_T}$CTAGS" >&6
2876 echo "$as_me:2876: result: no" >&5
2877 echo "${ECHO_T}no" >&6
2880 test -n "$CTAGS" && break
2883 for ac_prog in exetags etags
2885 # Extract the first word of "$ac_prog", so it can be a program name with args.
2886 set dummy $ac_prog; ac_word=$2
2887 echo "$as_me:2887: checking for $ac_word" >&5
2888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2889 if test "${ac_cv_prog_ETAGS+set}" = set; then
2890 echo $ECHO_N "(cached) $ECHO_C" >&6
2892 if test -n "$ETAGS"; then
2893 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2895 ac_save_IFS=$IFS; IFS=$ac_path_separator
2897 for ac_dir in $ac_dummy; do
2899 test -z "$ac_dir" && ac_dir=.
2900 $as_executable_p "$ac_dir/$ac_word" || continue
2901 ac_cv_prog_ETAGS="$ac_prog"
2902 echo "$as_me:2902: found $ac_dir/$ac_word" >&5
2908 ETAGS=$ac_cv_prog_ETAGS
2909 if test -n "$ETAGS"; then
2910 echo "$as_me:2910: result: $ETAGS" >&5
2911 echo "${ECHO_T}$ETAGS" >&6
2913 echo "$as_me:2913: result: no" >&5
2914 echo "${ECHO_T}no" >&6
2917 test -n "$ETAGS" && break
2920 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2921 set dummy ${CTAGS:-ctags}; ac_word=$2
2922 echo "$as_me:2922: checking for $ac_word" >&5
2923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2924 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2925 echo $ECHO_N "(cached) $ECHO_C" >&6
2927 if test -n "$MAKE_LOWER_TAGS"; then
2928 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2930 ac_save_IFS=$IFS; IFS=$ac_path_separator
2932 for ac_dir in $ac_dummy; do
2934 test -z "$ac_dir" && ac_dir=.
2935 $as_executable_p "$ac_dir/$ac_word" || continue
2936 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2937 echo "$as_me:2937: found $ac_dir/$ac_word" >&5
2941 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2944 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2945 if test -n "$MAKE_LOWER_TAGS"; then
2946 echo "$as_me:2946: result: $MAKE_LOWER_TAGS" >&5
2947 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2949 echo "$as_me:2949: result: no" >&5
2950 echo "${ECHO_T}no" >&6
2953 if test "$cf_cv_mixedcase" = yes ; then
2954 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2955 set dummy ${ETAGS:-etags}; ac_word=$2
2956 echo "$as_me:2956: checking for $ac_word" >&5
2957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2958 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2961 if test -n "$MAKE_UPPER_TAGS"; then
2962 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2964 ac_save_IFS=$IFS; IFS=$ac_path_separator
2966 for ac_dir in $ac_dummy; do
2968 test -z "$ac_dir" && ac_dir=.
2969 $as_executable_p "$ac_dir/$ac_word" || continue
2970 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2971 echo "$as_me:2971: found $ac_dir/$ac_word" >&5
2975 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2978 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2979 if test -n "$MAKE_UPPER_TAGS"; then
2980 echo "$as_me:2980: result: $MAKE_UPPER_TAGS" >&5
2981 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2983 echo "$as_me:2983: result: no" >&5
2984 echo "${ECHO_T}no" >&6
2991 if test "$MAKE_UPPER_TAGS" = yes ; then
2997 if test "$MAKE_LOWER_TAGS" = yes ; then
3003 echo "$as_me:3003: checking if -lm needed for math functions" >&5
3004 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3005 if test "${cf_cv_need_libm+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3009 cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3020 double x = rand(); printf("result = %g\n", pow(sin(x),x))
3025 rm -f conftest.$ac_objext conftest$ac_exeext
3026 if { (eval echo "$as_me:3026: \"$ac_link\"") >&5
3027 (eval $ac_link) 2>&5
3029 echo "$as_me:3029: \$? = $ac_status" >&5
3030 (exit $ac_status); } &&
3031 { ac_try='test -s conftest$ac_exeext'
3032 { (eval echo "$as_me:3032: \"$ac_try\"") >&5
3035 echo "$as_me:3035: \$? = $ac_status" >&5
3036 (exit $ac_status); }; }; then
3039 echo "$as_me: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3045 echo "$as_me:3045: result: $cf_cv_need_libm" >&5
3046 echo "${ECHO_T}$cf_cv_need_libm" >&6
3047 if test "$cf_cv_need_libm" = yes
3055 CC_SHARED_OPTS=unknown
3056 CPPFLAGS="$CPPFLAGS"
3058 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3059 DFT_UPR_MODEL="NORMAL"
3072 PACKAGE="ncurses-examples"
3078 TINFO_LIBS='$(LIBS_CURSES)'
3079 cf_cv_abi_version=""
3080 cf_cv_rel_version=""
3086 if test "$GCC" = yes
3088 cat > conftest.i <<EOF
3090 #define GCC_PRINTF 0
3095 #ifndef GCC_NORETURN
3096 #define GCC_NORETURN /* nothing */
3099 #define GCC_UNUSED /* nothing */
3102 if test "$GCC" = yes
3104 { echo "$as_me:3104: checking for $CC __attribute__ directives..." >&5
3105 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3107 "${as_me:-configure}"
3108 #include "confdefs.h"
3109 #include "conftest.h"
3110 #include "conftest.i"
3112 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3114 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3117 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3119 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3121 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3122 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3123 extern void foo(void) GCC_NORETURN;
3124 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3126 cf_printf_attribute=no
3127 cf_scanf_attribute=no
3128 for cf_attribute in scanf printf unused noreturn
3131 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3133 cf_directive="__attribute__(($cf_attribute))"
3134 echo "checking for $CC $cf_directive" 1>&5
3136 case $cf_attribute in
3138 cf_printf_attribute=yes
3139 cat >conftest.h <<EOF
3140 #define GCC_$cf_ATTRIBUTE 1
3144 cf_scanf_attribute=yes
3145 cat >conftest.h <<EOF
3146 #define GCC_$cf_ATTRIBUTE 1
3150 cat >conftest.h <<EOF
3151 #define GCC_$cf_ATTRIBUTE $cf_directive
3156 if { (eval echo "$as_me:3156: \"$ac_compile\"") >&5
3157 (eval $ac_compile) 2>&5
3159 echo "$as_me:3159: \$? = $ac_status" >&5
3160 (exit $ac_status); }; then
3161 test -n "$verbose" && echo "$as_me:3161: result: ... $cf_attribute" >&5
3162 echo "${ECHO_T}... $cf_attribute" >&6
3163 cat conftest.h >>confdefs.h
3164 case $cf_attribute in
3167 cat >>confdefs.h <<EOF
3168 #define GCC_NORETURN $cf_directive
3173 cf_value='/* nothing */'
3174 if test "$cf_printf_attribute" != no ; then
3175 cf_value='__attribute__((format(printf,fmt,var)))'
3177 cat >>confdefs.h <<\EOF
3178 #define GCC_PRINTF 1
3183 cat >>confdefs.h <<EOF
3184 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3189 cf_value='/* nothing */'
3190 if test "$cf_scanf_attribute" != no ; then
3191 cf_value='__attribute__((format(scanf,fmt,var)))'
3193 cat >>confdefs.h <<\EOF
3199 cat >>confdefs.h <<EOF
3200 #define GCC_SCANFLIKE(fmt,var) $cf_value
3206 cat >>confdefs.h <<EOF
3207 #define GCC_UNUSED $cf_directive
3215 fgrep define conftest.i >>confdefs.h
3220 echo "$as_me:3220: checking if you want to work around bogus compiler/loader warnings" >&5
3221 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3223 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3224 if test "${enable_string_hacks+set}" = set; then
3225 enableval="$enable_string_hacks"
3226 with_string_hacks=$enableval
3228 with_string_hacks=no
3230 echo "$as_me:3230: result: $with_string_hacks" >&5
3231 echo "${ECHO_T}$with_string_hacks" >&6
3233 if test "x$with_string_hacks" = "xyes"; then
3235 cat >>confdefs.h <<\EOF
3236 #define USE_STRING_HACKS 1
3239 { echo "$as_me:3239: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3240 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3241 echo "$as_me:3241: checking for strlcat" >&5
3242 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3243 if test "${ac_cv_func_strlcat+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3246 cat >conftest.$ac_ext <<_ACEOF
3247 #line 3247 "configure"
3248 #include "confdefs.h"
3249 #define strlcat autoconf_temporary
3250 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3257 /* We use char because int might match the return type of a gcc2
3258 builtin and then its argument prototype would still apply. */
3259 char strlcat (void);
3265 /* The GNU C library defines stubs for functions which it implements
3266 to always fail with ENOSYS. Some functions are actually named
3267 something starting with __ and the normal name is an alias. */
3268 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3269 #error found stub for strlcat
3277 rm -f conftest.$ac_objext conftest$ac_exeext
3278 if { (eval echo "$as_me:3278: \"$ac_link\"") >&5
3279 (eval $ac_link) 2>&5
3281 echo "$as_me:3281: \$? = $ac_status" >&5
3282 (exit $ac_status); } &&
3283 { ac_try='test -s conftest$ac_exeext'
3284 { (eval echo "$as_me:3284: \"$ac_try\"") >&5
3287 echo "$as_me:3287: \$? = $ac_status" >&5
3288 (exit $ac_status); }; }; then
3289 ac_cv_func_strlcat=yes
3291 echo "$as_me: failed program was:" >&5
3292 cat conftest.$ac_ext >&5
3293 ac_cv_func_strlcat=no
3295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3297 echo "$as_me:3297: result: $ac_cv_func_strlcat" >&5
3298 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3299 if test $ac_cv_func_strlcat = yes; then
3301 cat >>confdefs.h <<\EOF
3302 #define HAVE_STRLCAT 1
3307 echo "$as_me:3307: checking for strlcat in -lbsd" >&5
3308 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3309 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
3312 ac_check_lib_save_LIBS=$LIBS
3314 cat >conftest.$ac_ext <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3318 /* Override any gcc2 internal prototype to avoid an error. */
3322 /* We use char because int might match the return type of a gcc2
3323 builtin and then its argument prototype would still apply. */
3333 rm -f conftest.$ac_objext conftest$ac_exeext
3334 if { (eval echo "$as_me:3334: \"$ac_link\"") >&5
3335 (eval $ac_link) 2>&5
3337 echo "$as_me:3337: \$? = $ac_status" >&5
3338 (exit $ac_status); } &&
3339 { ac_try='test -s conftest$ac_exeext'
3340 { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3343 echo "$as_me:3343: \$? = $ac_status" >&5
3344 (exit $ac_status); }; }; then
3345 ac_cv_lib_bsd_strlcat=yes
3347 echo "$as_me: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 ac_cv_lib_bsd_strlcat=no
3351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3352 LIBS=$ac_check_lib_save_LIBS
3354 echo "$as_me:3354: result: $ac_cv_lib_bsd_strlcat" >&5
3355 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3356 if test $ac_cv_lib_bsd_strlcat = yes; then
3361 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3363 for cf_add_1lib in $cf_add_0lib; do
3364 for cf_add_2lib in $cf_add_libs; do
3365 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3370 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3374 for ac_header in bsd/string.h
3376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3377 echo "$as_me:3377: checking for $ac_header" >&5
3378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3380 echo $ECHO_N "(cached) $ECHO_C" >&6
3382 cat >conftest.$ac_ext <<_ACEOF
3383 #line 3383 "configure"
3384 #include "confdefs.h"
3385 #include <$ac_header>
3387 if { (eval echo "$as_me:3387: \"$ac_cpp conftest.$ac_ext\"") >&5
3388 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3390 egrep -v '^ *\+' conftest.er1 >conftest.err
3392 cat conftest.err >&5
3393 echo "$as_me:3393: \$? = $ac_status" >&5
3394 (exit $ac_status); } >/dev/null; then
3395 if test -s conftest.err; then
3396 ac_cpp_err=$ac_c_preproc_warn_flag
3403 if test -z "$ac_cpp_err"; then
3404 eval "$as_ac_Header=yes"
3406 echo "$as_me: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 eval "$as_ac_Header=no"
3410 rm -f conftest.err conftest.$ac_ext
3412 echo "$as_me:3412: result: `eval echo '${'$as_ac_Header'}'`" >&5
3413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3415 cat >>confdefs.h <<EOF
3416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3422 cat >>confdefs.h <<\EOF
3423 #define HAVE_STRLCAT 1
3430 for ac_func in strlcpy snprintf
3432 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3433 echo "$as_me:3433: checking for $ac_func" >&5
3434 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3435 if eval "test \"\${$as_ac_var+set}\" = set"; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3438 cat >conftest.$ac_ext <<_ACEOF
3439 #line 3439 "configure"
3440 #include "confdefs.h"
3441 #define $ac_func autoconf_temporary
3442 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3449 /* We use char because int might match the return type of a gcc2
3450 builtin and then its argument prototype would still apply. */
3451 char $ac_func (void);
3457 /* The GNU C library defines stubs for functions which it implements
3458 to always fail with ENOSYS. Some functions are actually named
3459 something starting with __ and the normal name is an alias. */
3460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3461 #error found stub for $ac_func
3469 rm -f conftest.$ac_objext conftest$ac_exeext
3470 if { (eval echo "$as_me:3470: \"$ac_link\"") >&5
3471 (eval $ac_link) 2>&5
3473 echo "$as_me:3473: \$? = $ac_status" >&5
3474 (exit $ac_status); } &&
3475 { ac_try='test -s conftest$ac_exeext'
3476 { (eval echo "$as_me:3476: \"$ac_try\"") >&5
3479 echo "$as_me:3479: \$? = $ac_status" >&5
3480 (exit $ac_status); }; }; then
3481 eval "$as_ac_var=yes"
3483 echo "$as_me: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3485 eval "$as_ac_var=no"
3487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3489 echo "$as_me:3489: result: `eval echo '${'$as_ac_var'}'`" >&5
3490 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3491 if test `eval echo '${'$as_ac_var'}'` = yes; then
3492 cat >>confdefs.h <<EOF
3493 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3501 echo "$as_me:3501: checking if the POSIX test-macros are already defined" >&5
3502 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3503 if test "${cf_cv_posix_visible+set}" = set; then
3504 echo $ECHO_N "(cached) $ECHO_C" >&6
3507 cat >conftest.$ac_ext <<_ACEOF
3508 #line 3508 "configure"
3509 #include "confdefs.h"
3515 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3516 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3517 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3518 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3519 #error conflicting symbols found
3526 rm -f conftest.$ac_objext
3527 if { (eval echo "$as_me:3527: \"$ac_compile\"") >&5
3528 (eval $ac_compile) 2>&5
3530 echo "$as_me:3530: \$? = $ac_status" >&5
3531 (exit $ac_status); } &&
3532 { ac_try='test -s conftest.$ac_objext'
3533 { (eval echo "$as_me:3533: \"$ac_try\"") >&5
3536 echo "$as_me:3536: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
3538 cf_cv_posix_visible=no
3540 echo "$as_me: failed program was:" >&5
3541 cat conftest.$ac_ext >&5
3542 cf_cv_posix_visible=yes
3544 rm -f conftest.$ac_objext conftest.$ac_ext
3547 echo "$as_me:3547: result: $cf_cv_posix_visible" >&5
3548 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3550 if test "$cf_cv_posix_visible" = no; then
3553 cf_POSIX_C_SOURCE=199506L
3558 cf_xopen_source="-D_ALL_SOURCE"
3564 cf_xopen_source="-D_APPLE_C_SOURCE"
3567 cf_xopen_source="-D_DARWIN_C_SOURCE"
3570 (freebsd*|dragonfly*|midnightbsd*)
3571 # 5.x headers associate
3572 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3573 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3574 cf_POSIX_C_SOURCE=200112L
3576 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3579 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3582 cf_xopen_source="-D_HPUX_SOURCE"
3585 cf_xopen_source="-D_SGI_SOURCE"
3588 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3590 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3592 echo "$as_me:3592: checking if this is the GNU C library" >&5
3593 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3594 if test "${cf_cv_gnu_library+set}" = set; then
3595 echo $ECHO_N "(cached) $ECHO_C" >&6
3598 cat >conftest.$ac_ext <<_ACEOF
3599 #line 3599 "configure"
3600 #include "confdefs.h"
3601 #include <sys/types.h>
3606 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3608 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3611 # error not GNU C library
3617 rm -f conftest.$ac_objext
3618 if { (eval echo "$as_me:3618: \"$ac_compile\"") >&5
3619 (eval $ac_compile) 2>&5
3621 echo "$as_me:3621: \$? = $ac_status" >&5
3622 (exit $ac_status); } &&
3623 { ac_try='test -s conftest.$ac_objext'
3624 { (eval echo "$as_me:3624: \"$ac_try\"") >&5
3627 echo "$as_me:3627: \$? = $ac_status" >&5
3628 (exit $ac_status); }; }; then
3629 cf_cv_gnu_library=yes
3631 echo "$as_me: failed program was:" >&5
3632 cat conftest.$ac_ext >&5
3633 cf_cv_gnu_library=no
3635 rm -f conftest.$ac_objext conftest.$ac_ext
3638 echo "$as_me:3638: result: $cf_cv_gnu_library" >&5
3639 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3641 if test x$cf_cv_gnu_library = xyes; then
3643 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3644 # was changed to help a little. newlib incorporated the change about 4
3646 echo "$as_me:3646: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3647 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3648 if test "${cf_cv_gnu_library_219+set}" = set; then
3649 echo $ECHO_N "(cached) $ECHO_C" >&6
3654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3655 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3657 cat >conftest.$ac_ext <<_ACEOF
3658 #line 3658 "configure"
3659 #include "confdefs.h"
3660 #include <sys/types.h>
3665 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3667 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3670 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3676 rm -f conftest.$ac_objext
3677 if { (eval echo "$as_me:3677: \"$ac_compile\"") >&5
3678 (eval $ac_compile) 2>&5
3680 echo "$as_me:3680: \$? = $ac_status" >&5
3681 (exit $ac_status); } &&
3682 { ac_try='test -s conftest.$ac_objext'
3683 { (eval echo "$as_me:3683: \"$ac_try\"") >&5
3686 echo "$as_me:3686: \$? = $ac_status" >&5
3687 (exit $ac_status); }; }; then
3688 cf_cv_gnu_library_219=yes
3690 echo "$as_me: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 cf_cv_gnu_library_219=no
3694 rm -f conftest.$ac_objext conftest.$ac_ext
3698 echo "$as_me:3698: result: $cf_cv_gnu_library_219" >&5
3699 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3701 if test "x$cf_cv_gnu_library_219" = xyes; then
3703 echo "$as_me:3703: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3704 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3705 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3712 cf_new_extra_cppflags=
3714 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3716 case $cf_fix_cppflags in
3718 case $cf_add_cflags in
3719 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3720 case $cf_add_cflags in
3722 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3724 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3725 && test -z "${cf_tst_cflags}" \
3726 && cf_fix_cppflags=yes
3728 if test $cf_fix_cppflags = yes ; then
3730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3734 elif test "${cf_tst_cflags}" = "\"'" ; then
3736 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3737 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3747 case $cf_add_cflags in
3749 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3751 CPPFLAGS=`echo "$CPPFLAGS" | \
3752 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3753 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3758 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3759 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3766 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3767 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3777 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3779 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3780 && test -z "${cf_tst_cflags}" \
3781 && cf_fix_cppflags=no
3786 if test -n "$cf_new_cflags" ; then
3788 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3789 CFLAGS="${CFLAGS}$cf_new_cflags"
3793 if test -n "$cf_new_cppflags" ; then
3795 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3796 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3800 if test -n "$cf_new_extra_cppflags" ; then
3802 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3803 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3807 cat >conftest.$ac_ext <<_ACEOF
3808 #line 3808 "configure"
3809 #include "confdefs.h"
3812 #include <sys/types.h>
3818 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3821 # error GNU C library is too old
3827 rm -f conftest.$ac_objext
3828 if { (eval echo "$as_me:3828: \"$ac_compile\"") >&5
3829 (eval $ac_compile) 2>&5
3831 echo "$as_me:3831: \$? = $ac_status" >&5
3832 (exit $ac_status); } &&
3833 { ac_try='test -s conftest.$ac_objext'
3834 { (eval echo "$as_me:3834: \"$ac_try\"") >&5
3837 echo "$as_me:3837: \$? = $ac_status" >&5
3838 (exit $ac_status); }; }; then
3839 cf_cv_gnu_dftsrc_219=yes
3841 echo "$as_me: failed program was:" >&5
3842 cat conftest.$ac_ext >&5
3843 cf_cv_gnu_dftsrc_219=no
3845 rm -f conftest.$ac_objext conftest.$ac_ext
3848 echo "$as_me:3848: result: $cf_cv_gnu_dftsrc_219" >&5
3849 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3850 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3852 cf_cv_gnu_dftsrc_219=maybe
3855 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3857 echo "$as_me:3857: checking if we must define _GNU_SOURCE" >&5
3858 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3859 if test "${cf_cv_gnu_source+set}" = set; then
3860 echo $ECHO_N "(cached) $ECHO_C" >&6
3863 cat >conftest.$ac_ext <<_ACEOF
3864 #line 3864 "configure"
3865 #include "confdefs.h"
3866 #include <sys/types.h>
3871 #ifndef _XOPEN_SOURCE
3872 #error expected _XOPEN_SOURCE to be defined
3878 rm -f conftest.$ac_objext
3879 if { (eval echo "$as_me:3879: \"$ac_compile\"") >&5
3880 (eval $ac_compile) 2>&5
3882 echo "$as_me:3882: \$? = $ac_status" >&5
3883 (exit $ac_status); } &&
3884 { ac_try='test -s conftest.$ac_objext'
3885 { (eval echo "$as_me:3885: \"$ac_try\"") >&5
3888 echo "$as_me:3888: \$? = $ac_status" >&5
3889 (exit $ac_status); }; }; then
3892 echo "$as_me: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3899 cf_new_extra_cppflags=
3901 for cf_add_cflags in -D_GNU_SOURCE
3903 case $cf_fix_cppflags in
3905 case $cf_add_cflags in
3906 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3907 case $cf_add_cflags in
3909 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3912 && test -z "${cf_tst_cflags}" \
3913 && cf_fix_cppflags=yes
3915 if test $cf_fix_cppflags = yes ; then
3917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3921 elif test "${cf_tst_cflags}" = "\"'" ; then
3923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3934 case $cf_add_cflags in
3936 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3938 CPPFLAGS=`echo "$CPPFLAGS" | \
3939 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3940 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3945 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3946 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3953 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3954 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3964 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3967 && test -z "${cf_tst_cflags}" \
3968 && cf_fix_cppflags=no
3973 if test -n "$cf_new_cflags" ; then
3975 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3976 CFLAGS="${CFLAGS}$cf_new_cflags"
3980 if test -n "$cf_new_cppflags" ; then
3982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3983 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3987 if test -n "$cf_new_extra_cppflags" ; then
3989 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3990 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3994 cat >conftest.$ac_ext <<_ACEOF
3995 #line 3995 "configure"
3996 #include "confdefs.h"
3997 #include <sys/types.h>
4002 #ifdef _XOPEN_SOURCE
4003 #error expected _XOPEN_SOURCE to be undefined
4009 rm -f conftest.$ac_objext
4010 if { (eval echo "$as_me:4010: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit $ac_status); } &&
4015 { ac_try='test -s conftest.$ac_objext'
4016 { (eval echo "$as_me:4016: \"$ac_try\"") >&5
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit $ac_status); }; }; then
4023 echo "$as_me: failed program was:" >&5
4024 cat conftest.$ac_ext >&5
4025 cf_cv_gnu_source=yes
4027 rm -f conftest.$ac_objext conftest.$ac_ext
4031 rm -f conftest.$ac_objext conftest.$ac_ext
4034 echo "$as_me:4034: result: $cf_cv_gnu_source" >&5
4035 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4037 if test "$cf_cv_gnu_source" = yes
4039 echo "$as_me:4039: checking if we should also define _DEFAULT_SOURCE" >&5
4040 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4041 if test "${cf_cv_default_source+set}" = set; then
4042 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4046 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4048 cat >conftest.$ac_ext <<_ACEOF
4049 #line 4049 "configure"
4050 #include "confdefs.h"
4051 #include <sys/types.h>
4056 #ifdef _DEFAULT_SOURCE
4057 #error expected _DEFAULT_SOURCE to be undefined
4063 rm -f conftest.$ac_objext
4064 if { (eval echo "$as_me:4064: \"$ac_compile\"") >&5
4065 (eval $ac_compile) 2>&5
4067 echo "$as_me:4067: \$? = $ac_status" >&5
4068 (exit $ac_status); } &&
4069 { ac_try='test -s conftest.$ac_objext'
4070 { (eval echo "$as_me:4070: \"$ac_try\"") >&5
4073 echo "$as_me:4073: \$? = $ac_status" >&5
4074 (exit $ac_status); }; }; then
4075 cf_cv_default_source=no
4077 echo "$as_me: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4079 cf_cv_default_source=yes
4081 rm -f conftest.$ac_objext conftest.$ac_ext
4084 echo "$as_me:4084: result: $cf_cv_default_source" >&5
4085 echo "${ECHO_T}$cf_cv_default_source" >&6
4086 if test "$cf_cv_default_source" = yes
4089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4090 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4100 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4103 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4106 if test "$cf_cv_posix_visible" = no; then
4108 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4110 cf_save_CFLAGS="$CFLAGS"
4111 cf_save_CPPFLAGS="$CPPFLAGS"
4113 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4114 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4115 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4117 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4118 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4119 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4121 echo "$as_me:4121: checking if we should define _POSIX_C_SOURCE" >&5
4122 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4123 if test "${cf_cv_posix_c_source+set}" = set; then
4124 echo $ECHO_N "(cached) $ECHO_C" >&6
4127 echo "${as_me:-configure}:4127: testing if the symbol is already defined go no further ..." 1>&5
4129 cat >conftest.$ac_ext <<_ACEOF
4130 #line 4130 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4137 #ifndef _POSIX_C_SOURCE
4144 rm -f conftest.$ac_objext
4145 if { (eval echo "$as_me:4145: \"$ac_compile\"") >&5
4146 (eval $ac_compile) 2>&5
4148 echo "$as_me:4148: \$? = $ac_status" >&5
4149 (exit $ac_status); } &&
4150 { ac_try='test -s conftest.$ac_objext'
4151 { (eval echo "$as_me:4151: \"$ac_try\"") >&5
4154 echo "$as_me:4154: \$? = $ac_status" >&5
4155 (exit $ac_status); }; }; then
4156 cf_cv_posix_c_source=no
4158 echo "$as_me: failed program was:" >&5
4159 cat conftest.$ac_ext >&5
4160 cf_want_posix_source=no
4161 case .$cf_POSIX_C_SOURCE in
4163 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4166 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4167 cf_want_posix_source=yes
4170 cf_want_posix_source=yes
4173 if test "$cf_want_posix_source" = yes ; then
4174 cat >conftest.$ac_ext <<_ACEOF
4175 #line 4175 "configure"
4176 #include "confdefs.h"
4177 #include <sys/types.h>
4182 #ifdef _POSIX_SOURCE
4189 rm -f conftest.$ac_objext
4190 if { (eval echo "$as_me:4190: \"$ac_compile\"") >&5
4191 (eval $ac_compile) 2>&5
4193 echo "$as_me:4193: \$? = $ac_status" >&5
4194 (exit $ac_status); } &&
4195 { ac_try='test -s conftest.$ac_objext'
4196 { (eval echo "$as_me:4196: \"$ac_try\"") >&5
4199 echo "$as_me:4199: \$? = $ac_status" >&5
4200 (exit $ac_status); }; }; then
4203 echo "$as_me: failed program was:" >&5
4204 cat conftest.$ac_ext >&5
4205 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4207 rm -f conftest.$ac_objext conftest.$ac_ext
4210 echo "${as_me:-configure}:4210: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4212 CFLAGS="$cf_trim_CFLAGS"
4213 CPPFLAGS="$cf_trim_CPPFLAGS"
4215 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4216 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4218 echo "${as_me:-configure}:4218: testing if the second compile does not leave our definition intact error ..." 1>&5
4220 cat >conftest.$ac_ext <<_ACEOF
4221 #line 4221 "configure"
4222 #include "confdefs.h"
4223 #include <sys/types.h>
4228 #ifndef _POSIX_C_SOURCE
4235 rm -f conftest.$ac_objext
4236 if { (eval echo "$as_me:4236: \"$ac_compile\"") >&5
4237 (eval $ac_compile) 2>&5
4239 echo "$as_me:4239: \$? = $ac_status" >&5
4240 (exit $ac_status); } &&
4241 { ac_try='test -s conftest.$ac_objext'
4242 { (eval echo "$as_me:4242: \"$ac_try\"") >&5
4245 echo "$as_me:4245: \$? = $ac_status" >&5
4246 (exit $ac_status); }; }; then
4249 echo "$as_me: failed program was:" >&5
4250 cat conftest.$ac_ext >&5
4251 cf_cv_posix_c_source=no
4253 rm -f conftest.$ac_objext conftest.$ac_ext
4254 CFLAGS="$cf_save_CFLAGS"
4255 CPPFLAGS="$cf_save_CPPFLAGS"
4258 rm -f conftest.$ac_objext conftest.$ac_ext
4261 echo "$as_me:4261: result: $cf_cv_posix_c_source" >&5
4262 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4264 if test "$cf_cv_posix_c_source" != no ; then
4265 CFLAGS="$cf_trim_CFLAGS"
4266 CPPFLAGS="$cf_trim_CPPFLAGS"
4271 cf_new_extra_cppflags=
4273 for cf_add_cflags in $cf_cv_posix_c_source
4275 case $cf_fix_cppflags in
4277 case $cf_add_cflags in
4278 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4279 case $cf_add_cflags in
4281 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4283 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4284 && test -z "${cf_tst_cflags}" \
4285 && cf_fix_cppflags=yes
4287 if test $cf_fix_cppflags = yes ; then
4289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4293 elif test "${cf_tst_cflags}" = "\"'" ; then
4295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4306 case $cf_add_cflags in
4308 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4310 CPPFLAGS=`echo "$CPPFLAGS" | \
4311 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4312 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4317 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4318 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4325 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4326 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4333 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4334 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4336 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4339 && test -z "${cf_tst_cflags}" \
4340 && cf_fix_cppflags=no
4345 if test -n "$cf_new_cflags" ; then
4347 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4348 CFLAGS="${CFLAGS}$cf_new_cflags"
4352 if test -n "$cf_new_cppflags" ; then
4354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4359 if test -n "$cf_new_extra_cppflags" ; then
4361 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4362 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4368 fi # cf_cv_posix_visible
4372 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4375 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4376 cf_xopen_source="-D_BSD_SOURCE"
4380 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4383 cf_xopen_source="-D_OSF_SOURCE"
4386 cf_xopen_source="-D_QNX_SOURCE"
4389 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4392 cf_xopen_source="-D__EXTENSIONS__"
4393 cf_cv_xopen_source=broken
4395 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4401 echo "$as_me:4401: checking if we should define _XOPEN_SOURCE" >&5
4402 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4403 if test "${cf_cv_xopen_source+set}" = set; then
4404 echo $ECHO_N "(cached) $ECHO_C" >&6
4407 cat >conftest.$ac_ext <<_ACEOF
4408 #line 4408 "configure"
4409 #include "confdefs.h"
4413 #include <sys/types.h>
4419 #ifndef _XOPEN_SOURCE
4426 rm -f conftest.$ac_objext
4427 if { (eval echo "$as_me:4427: \"$ac_compile\"") >&5
4428 (eval $ac_compile) 2>&5
4430 echo "$as_me:4430: \$? = $ac_status" >&5
4431 (exit $ac_status); } &&
4432 { ac_try='test -s conftest.$ac_objext'
4433 { (eval echo "$as_me:4433: \"$ac_try\"") >&5
4436 echo "$as_me:4436: \$? = $ac_status" >&5
4437 (exit $ac_status); }; }; then
4438 cf_cv_xopen_source=no
4440 echo "$as_me: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4444 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4445 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4447 cat >conftest.$ac_ext <<_ACEOF
4448 #line 4448 "configure"
4449 #include "confdefs.h"
4453 #include <sys/types.h>
4459 #ifdef _XOPEN_SOURCE
4466 rm -f conftest.$ac_objext
4467 if { (eval echo "$as_me:4467: \"$ac_compile\"") >&5
4468 (eval $ac_compile) 2>&5
4470 echo "$as_me:4470: \$? = $ac_status" >&5
4471 (exit $ac_status); } &&
4472 { ac_try='test -s conftest.$ac_objext'
4473 { (eval echo "$as_me:4473: \"$ac_try\"") >&5
4476 echo "$as_me:4476: \$? = $ac_status" >&5
4477 (exit $ac_status); }; }; then
4478 cf_cv_xopen_source=no
4480 echo "$as_me: failed program was:" >&5
4481 cat conftest.$ac_ext >&5
4482 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4484 rm -f conftest.$ac_objext conftest.$ac_ext
4488 rm -f conftest.$ac_objext conftest.$ac_ext
4491 echo "$as_me:4491: result: $cf_cv_xopen_source" >&5
4492 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4494 if test "$cf_cv_xopen_source" != no ; then
4496 CFLAGS=`echo "$CFLAGS" | \
4497 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4498 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4500 CPPFLAGS=`echo "$CPPFLAGS" | \
4501 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4502 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4504 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4509 cf_new_extra_cppflags=
4511 for cf_add_cflags in $cf_temp_xopen_source
4513 case $cf_fix_cppflags in
4515 case $cf_add_cflags in
4516 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4517 case $cf_add_cflags in
4519 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4522 && test -z "${cf_tst_cflags}" \
4523 && cf_fix_cppflags=yes
4525 if test $cf_fix_cppflags = yes ; then
4527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4531 elif test "${cf_tst_cflags}" = "\"'" ; then
4533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4544 case $cf_add_cflags in
4546 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4548 CPPFLAGS=`echo "$CPPFLAGS" | \
4549 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4550 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4555 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4556 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4563 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4564 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4571 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4572 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4574 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4577 && test -z "${cf_tst_cflags}" \
4578 && cf_fix_cppflags=no
4583 if test -n "$cf_new_cflags" ; then
4585 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4586 CFLAGS="${CFLAGS}$cf_new_cflags"
4590 if test -n "$cf_new_cppflags" ; then
4592 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4593 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4597 if test -n "$cf_new_extra_cppflags" ; then
4599 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4600 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4606 if test "$cf_cv_posix_visible" = no; then
4608 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4610 cf_save_CFLAGS="$CFLAGS"
4611 cf_save_CPPFLAGS="$CPPFLAGS"
4613 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4614 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4615 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4617 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4618 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4619 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4621 echo "$as_me:4621: checking if we should define _POSIX_C_SOURCE" >&5
4622 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4623 if test "${cf_cv_posix_c_source+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4627 echo "${as_me:-configure}:4627: testing if the symbol is already defined go no further ..." 1>&5
4629 cat >conftest.$ac_ext <<_ACEOF
4630 #line 4630 "configure"
4631 #include "confdefs.h"
4632 #include <sys/types.h>
4637 #ifndef _POSIX_C_SOURCE
4644 rm -f conftest.$ac_objext
4645 if { (eval echo "$as_me:4645: \"$ac_compile\"") >&5
4646 (eval $ac_compile) 2>&5
4648 echo "$as_me:4648: \$? = $ac_status" >&5
4649 (exit $ac_status); } &&
4650 { ac_try='test -s conftest.$ac_objext'
4651 { (eval echo "$as_me:4651: \"$ac_try\"") >&5
4654 echo "$as_me:4654: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 cf_cv_posix_c_source=no
4658 echo "$as_me: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4660 cf_want_posix_source=no
4661 case .$cf_POSIX_C_SOURCE in
4663 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4666 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4667 cf_want_posix_source=yes
4670 cf_want_posix_source=yes
4673 if test "$cf_want_posix_source" = yes ; then
4674 cat >conftest.$ac_ext <<_ACEOF
4675 #line 4675 "configure"
4676 #include "confdefs.h"
4677 #include <sys/types.h>
4682 #ifdef _POSIX_SOURCE
4689 rm -f conftest.$ac_objext
4690 if { (eval echo "$as_me:4690: \"$ac_compile\"") >&5
4691 (eval $ac_compile) 2>&5
4693 echo "$as_me:4693: \$? = $ac_status" >&5
4694 (exit $ac_status); } &&
4695 { ac_try='test -s conftest.$ac_objext'
4696 { (eval echo "$as_me:4696: \"$ac_try\"") >&5
4699 echo "$as_me:4699: \$? = $ac_status" >&5
4700 (exit $ac_status); }; }; then
4703 echo "$as_me: failed program was:" >&5
4704 cat conftest.$ac_ext >&5
4705 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4707 rm -f conftest.$ac_objext conftest.$ac_ext
4710 echo "${as_me:-configure}:4710: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4712 CFLAGS="$cf_trim_CFLAGS"
4713 CPPFLAGS="$cf_trim_CPPFLAGS"
4715 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4716 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4718 echo "${as_me:-configure}:4718: testing if the second compile does not leave our definition intact error ..." 1>&5
4720 cat >conftest.$ac_ext <<_ACEOF
4721 #line 4721 "configure"
4722 #include "confdefs.h"
4723 #include <sys/types.h>
4728 #ifndef _POSIX_C_SOURCE
4735 rm -f conftest.$ac_objext
4736 if { (eval echo "$as_me:4736: \"$ac_compile\"") >&5
4737 (eval $ac_compile) 2>&5
4739 echo "$as_me:4739: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest.$ac_objext'
4742 { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4745 echo "$as_me:4745: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4749 echo "$as_me: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4751 cf_cv_posix_c_source=no
4753 rm -f conftest.$ac_objext conftest.$ac_ext
4754 CFLAGS="$cf_save_CFLAGS"
4755 CPPFLAGS="$cf_save_CPPFLAGS"
4758 rm -f conftest.$ac_objext conftest.$ac_ext
4761 echo "$as_me:4761: result: $cf_cv_posix_c_source" >&5
4762 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4764 if test "$cf_cv_posix_c_source" != no ; then
4765 CFLAGS="$cf_trim_CFLAGS"
4766 CPPFLAGS="$cf_trim_CPPFLAGS"
4771 cf_new_extra_cppflags=
4773 for cf_add_cflags in $cf_cv_posix_c_source
4775 case $cf_fix_cppflags in
4777 case $cf_add_cflags in
4778 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4779 case $cf_add_cflags in
4781 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4783 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4784 && test -z "${cf_tst_cflags}" \
4785 && cf_fix_cppflags=yes
4787 if test $cf_fix_cppflags = yes ; then
4789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4793 elif test "${cf_tst_cflags}" = "\"'" ; then
4795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4806 case $cf_add_cflags in
4808 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4810 CPPFLAGS=`echo "$CPPFLAGS" | \
4811 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4812 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4817 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4818 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4825 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4826 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4833 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4834 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4836 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4838 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4839 && test -z "${cf_tst_cflags}" \
4840 && cf_fix_cppflags=no
4845 if test -n "$cf_new_cflags" ; then
4847 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4848 CFLAGS="${CFLAGS}$cf_new_cflags"
4852 if test -n "$cf_new_cppflags" ; then
4854 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4855 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4859 if test -n "$cf_new_extra_cppflags" ; then
4861 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4862 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4868 fi # cf_cv_posix_visible
4873 if test -n "$cf_xopen_source" ; then
4878 cf_new_extra_cppflags=
4880 for cf_add_cflags in $cf_xopen_source
4882 case $cf_fix_cppflags in
4884 case $cf_add_cflags in
4885 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4886 case $cf_add_cflags in
4888 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4891 && test -z "${cf_tst_cflags}" \
4892 && cf_fix_cppflags=yes
4894 if test $cf_fix_cppflags = yes ; then
4896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4900 elif test "${cf_tst_cflags}" = "\"'" ; then
4902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4913 case $cf_add_cflags in
4915 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4917 CPPFLAGS=`echo "$CPPFLAGS" | \
4918 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4919 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4924 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4925 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4932 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4933 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4946 && test -z "${cf_tst_cflags}" \
4947 && cf_fix_cppflags=no
4952 if test -n "$cf_new_cflags" ; then
4953 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4955 echo "${as_me:-configure}:4955: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4957 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4958 CFLAGS="${CFLAGS}$cf_new_cflags"
4962 if test -n "$cf_new_cppflags" ; then
4963 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4965 echo "${as_me:-configure}:4965: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4967 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4968 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4972 if test -n "$cf_new_extra_cppflags" ; then
4973 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4975 echo "${as_me:-configure}:4975: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4977 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4978 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4984 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4985 echo "$as_me:4985: checking if _XOPEN_SOURCE really is set" >&5
4986 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4987 cat >conftest.$ac_ext <<_ACEOF
4988 #line 4988 "configure"
4989 #include "confdefs.h"
4995 #ifndef _XOPEN_SOURCE
5002 rm -f conftest.$ac_objext
5003 if { (eval echo "$as_me:5003: \"$ac_compile\"") >&5
5004 (eval $ac_compile) 2>&5
5006 echo "$as_me:5006: \$? = $ac_status" >&5
5007 (exit $ac_status); } &&
5008 { ac_try='test -s conftest.$ac_objext'
5009 { (eval echo "$as_me:5009: \"$ac_try\"") >&5
5012 echo "$as_me:5012: \$? = $ac_status" >&5
5013 (exit $ac_status); }; }; then
5014 cf_XOPEN_SOURCE_set=yes
5016 echo "$as_me: failed program was:" >&5
5017 cat conftest.$ac_ext >&5
5018 cf_XOPEN_SOURCE_set=no
5020 rm -f conftest.$ac_objext conftest.$ac_ext
5021 echo "$as_me:5021: result: $cf_XOPEN_SOURCE_set" >&5
5022 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5023 if test $cf_XOPEN_SOURCE_set = yes
5025 cat >conftest.$ac_ext <<_ACEOF
5026 #line 5026 "configure"
5027 #include "confdefs.h"
5033 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5040 rm -f conftest.$ac_objext
5041 if { (eval echo "$as_me:5041: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5044 echo "$as_me:5044: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:5047: \"$ac_try\"") >&5
5050 echo "$as_me:5050: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 cf_XOPEN_SOURCE_set_ok=yes
5054 echo "$as_me: failed program was:" >&5
5055 cat conftest.$ac_ext >&5
5056 cf_XOPEN_SOURCE_set_ok=no
5058 rm -f conftest.$ac_objext conftest.$ac_ext
5059 if test $cf_XOPEN_SOURCE_set_ok = no
5061 { echo "$as_me:5061: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5062 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5066 echo "$as_me:5066: checking if we should define _XOPEN_SOURCE" >&5
5067 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5068 if test "${cf_cv_xopen_source+set}" = set; then
5069 echo $ECHO_N "(cached) $ECHO_C" >&6
5072 cat >conftest.$ac_ext <<_ACEOF
5073 #line 5073 "configure"
5074 #include "confdefs.h"
5078 #include <sys/types.h>
5084 #ifndef _XOPEN_SOURCE
5091 rm -f conftest.$ac_objext
5092 if { (eval echo "$as_me:5092: \"$ac_compile\"") >&5
5093 (eval $ac_compile) 2>&5
5095 echo "$as_me:5095: \$? = $ac_status" >&5
5096 (exit $ac_status); } &&
5097 { ac_try='test -s conftest.$ac_objext'
5098 { (eval echo "$as_me:5098: \"$ac_try\"") >&5
5101 echo "$as_me:5101: \$? = $ac_status" >&5
5102 (exit $ac_status); }; }; then
5103 cf_cv_xopen_source=no
5105 echo "$as_me: failed program was:" >&5
5106 cat conftest.$ac_ext >&5
5109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5110 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5112 cat >conftest.$ac_ext <<_ACEOF
5113 #line 5113 "configure"
5114 #include "confdefs.h"
5118 #include <sys/types.h>
5124 #ifdef _XOPEN_SOURCE
5131 rm -f conftest.$ac_objext
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133 (eval $ac_compile) 2>&5
5135 echo "$as_me:5135: \$? = $ac_status" >&5
5136 (exit $ac_status); } &&
5137 { ac_try='test -s conftest.$ac_objext'
5138 { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5141 echo "$as_me:5141: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 cf_cv_xopen_source=no
5145 echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5149 rm -f conftest.$ac_objext conftest.$ac_ext
5153 rm -f conftest.$ac_objext conftest.$ac_ext
5156 echo "$as_me:5156: result: $cf_cv_xopen_source" >&5
5157 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5159 if test "$cf_cv_xopen_source" != no ; then
5161 CFLAGS=`echo "$CFLAGS" | \
5162 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5163 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5165 CPPFLAGS=`echo "$CPPFLAGS" | \
5166 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5167 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5169 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5174 cf_new_extra_cppflags=
5176 for cf_add_cflags in $cf_temp_xopen_source
5178 case $cf_fix_cppflags in
5180 case $cf_add_cflags in
5181 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5182 case $cf_add_cflags in
5184 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5186 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5187 && test -z "${cf_tst_cflags}" \
5188 && cf_fix_cppflags=yes
5190 if test $cf_fix_cppflags = yes ; then
5192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5196 elif test "${cf_tst_cflags}" = "\"'" ; then
5198 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5199 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5209 case $cf_add_cflags in
5211 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5213 CPPFLAGS=`echo "$CPPFLAGS" | \
5214 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5215 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5220 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5221 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5228 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5229 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5239 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5241 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5242 && test -z "${cf_tst_cflags}" \
5243 && cf_fix_cppflags=no
5248 if test -n "$cf_new_cflags" ; then
5250 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5251 CFLAGS="${CFLAGS}$cf_new_cflags"
5255 if test -n "$cf_new_cppflags" ; then
5257 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5258 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5262 if test -n "$cf_new_extra_cppflags" ; then
5264 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5265 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5273 fi # cf_cv_posix_visible
5275 echo "$as_me:5275: checking for signal global datatype" >&5
5276 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5277 if test "${cf_cv_sig_atomic_t+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5282 "volatile sig_atomic_t" \
5286 cat >conftest.$ac_ext <<_ACEOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5290 #include <sys/types.h>
5296 static void handler(int sig)
5303 signal(SIGINT, handler);
5309 rm -f conftest.$ac_objext
5310 if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311 (eval $ac_compile) 2>&5
5313 echo "$as_me:5313: \$? = $ac_status" >&5
5314 (exit $ac_status); } &&
5315 { ac_try='test -s conftest.$ac_objext'
5316 { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5319 echo "$as_me:5319: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
5321 cf_cv_sig_atomic_t=$cf_type
5323 echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 cf_cv_sig_atomic_t=no
5327 rm -f conftest.$ac_objext conftest.$ac_ext
5328 test "$cf_cv_sig_atomic_t" != no && break
5333 echo "$as_me:5333: result: $cf_cv_sig_atomic_t" >&5
5334 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5335 test "$cf_cv_sig_atomic_t" != no &&
5336 cat >>confdefs.h <<EOF
5337 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5340 # Work around breakage on OS X
5342 echo "$as_me:5342: checking if SIGWINCH is defined" >&5
5343 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5344 if test "${cf_cv_define_sigwinch+set}" = set; then
5345 echo $ECHO_N "(cached) $ECHO_C" >&6
5348 cat >conftest.$ac_ext <<_ACEOF
5349 #line 5349 "configure"
5350 #include "confdefs.h"
5352 #include <sys/types.h>
5353 #include <sys/signal.h>
5363 rm -f conftest.$ac_objext
5364 if { (eval echo "$as_me:5364: \"$ac_compile\"") >&5
5365 (eval $ac_compile) 2>&5
5367 echo "$as_me:5367: \$? = $ac_status" >&5
5368 (exit $ac_status); } &&
5369 { ac_try='test -s conftest.$ac_objext'
5370 { (eval echo "$as_me:5370: \"$ac_try\"") >&5
5373 echo "$as_me:5373: \$? = $ac_status" >&5
5374 (exit $ac_status); }; }; then
5375 cf_cv_define_sigwinch=yes
5377 echo "$as_me: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
5379 cat >conftest.$ac_ext <<_ACEOF
5380 #line 5380 "configure"
5381 #include "confdefs.h"
5383 #undef _XOPEN_SOURCE
5384 #undef _POSIX_SOURCE
5385 #undef _POSIX_C_SOURCE
5386 #include <sys/types.h>
5387 #include <sys/signal.h>
5397 rm -f conftest.$ac_objext
5398 if { (eval echo "$as_me:5398: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>&5
5401 echo "$as_me:5401: \$? = $ac_status" >&5
5402 (exit $ac_status); } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5407 echo "$as_me:5407: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
5409 cf_cv_define_sigwinch=maybe
5411 echo "$as_me: failed program was:" >&5
5412 cat conftest.$ac_ext >&5
5413 cf_cv_define_sigwinch=no
5415 rm -f conftest.$ac_objext conftest.$ac_ext
5418 rm -f conftest.$ac_objext conftest.$ac_ext
5421 echo "$as_me:5421: result: $cf_cv_define_sigwinch" >&5
5422 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5424 if test "$cf_cv_define_sigwinch" = maybe ; then
5425 echo "$as_me:5425: checking for actual SIGWINCH definition" >&5
5426 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5427 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5431 cf_cv_fixup_sigwinch=unknown
5433 while test $cf_sigwinch != 1
5435 cat >conftest.$ac_ext <<_ACEOF
5436 #line 5436 "configure"
5437 #include "confdefs.h"
5439 #undef _XOPEN_SOURCE
5440 #undef _POSIX_SOURCE
5441 #undef _POSIX_C_SOURCE
5442 #include <sys/types.h>
5443 #include <sys/signal.h>
5449 #if SIGWINCH != $cf_sigwinch
5457 rm -f conftest.$ac_objext
5458 if { (eval echo "$as_me:5458: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5461 echo "$as_me:5461: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:5464: \"$ac_try\"") >&5
5467 echo "$as_me:5467: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 cf_cv_fixup_sigwinch=$cf_sigwinch
5472 echo "$as_me: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
5475 rm -f conftest.$ac_objext conftest.$ac_ext
5477 cf_sigwinch=`expr $cf_sigwinch - 1`
5481 echo "$as_me:5481: result: $cf_cv_fixup_sigwinch" >&5
5482 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5484 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5485 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5489 # Checks for CODESET support.
5491 echo "$as_me:5491: checking for nl_langinfo and CODESET" >&5
5492 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5493 if test "${am_cv_langinfo_codeset+set}" = set; then
5494 echo $ECHO_N "(cached) $ECHO_C" >&6
5496 cat >conftest.$ac_ext <<_ACEOF
5497 #line 5497 "configure"
5498 #include "confdefs.h"
5499 #include <langinfo.h>
5503 char* cs = nl_langinfo(CODESET);
5508 rm -f conftest.$ac_objext conftest$ac_exeext
5509 if { (eval echo "$as_me:5509: \"$ac_link\"") >&5
5510 (eval $ac_link) 2>&5
5512 echo "$as_me:5512: \$? = $ac_status" >&5
5513 (exit $ac_status); } &&
5514 { ac_try='test -s conftest$ac_exeext'
5515 { (eval echo "$as_me:5515: \"$ac_try\"") >&5
5518 echo "$as_me:5518: \$? = $ac_status" >&5
5519 (exit $ac_status); }; }; then
5520 am_cv_langinfo_codeset=yes
5522 echo "$as_me: failed program was:" >&5
5523 cat conftest.$ac_ext >&5
5524 am_cv_langinfo_codeset=no
5526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5529 echo "$as_me:5529: result: $am_cv_langinfo_codeset" >&5
5530 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5531 if test $am_cv_langinfo_codeset = yes; then
5533 cat >>confdefs.h <<\EOF
5534 #define HAVE_LANGINFO_CODESET 1
5539 echo "$as_me:5539: checking if you want to use pkg-config" >&5
5540 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5542 # Check whether --with-pkg-config or --without-pkg-config was given.
5543 if test "${with_pkg_config+set}" = set; then
5544 withval="$with_pkg_config"
5545 cf_pkg_config=$withval
5549 echo "$as_me:5549: result: $cf_pkg_config" >&5
5550 echo "${ECHO_T}$cf_pkg_config" >&6
5552 case $cf_pkg_config in
5558 if test -n "$ac_tool_prefix"; then
5559 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5560 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5561 echo "$as_me:5561: checking for $ac_word" >&5
5562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5563 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5564 echo $ECHO_N "(cached) $ECHO_C" >&6
5568 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5571 ac_save_IFS=$IFS; IFS=$ac_path_separator
5573 for ac_dir in $ac_dummy; do
5575 test -z "$ac_dir" && ac_dir=.
5576 if $as_executable_p "$ac_dir/$ac_word"; then
5577 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5578 echo "$as_me:5578: found $ac_dir/$ac_word" >&5
5586 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5588 if test -n "$PKG_CONFIG"; then
5589 echo "$as_me:5589: result: $PKG_CONFIG" >&5
5590 echo "${ECHO_T}$PKG_CONFIG" >&6
5592 echo "$as_me:5592: result: no" >&5
5593 echo "${ECHO_T}no" >&6
5597 if test -z "$ac_cv_path_PKG_CONFIG"; then
5598 ac_pt_PKG_CONFIG=$PKG_CONFIG
5599 # Extract the first word of "pkg-config", so it can be a program name with args.
5600 set dummy pkg-config; ac_word=$2
5601 echo "$as_me:5601: checking for $ac_word" >&5
5602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5603 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5606 case $ac_pt_PKG_CONFIG in
5608 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5611 ac_save_IFS=$IFS; IFS=$ac_path_separator
5613 for ac_dir in $ac_dummy; do
5615 test -z "$ac_dir" && ac_dir=.
5616 if $as_executable_p "$ac_dir/$ac_word"; then
5617 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5618 echo "$as_me:5618: found $ac_dir/$ac_word" >&5
5623 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5627 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5629 if test -n "$ac_pt_PKG_CONFIG"; then
5630 echo "$as_me:5630: result: $ac_pt_PKG_CONFIG" >&5
5631 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5633 echo "$as_me:5633: result: no" >&5
5634 echo "${ECHO_T}no" >&6
5637 PKG_CONFIG=$ac_pt_PKG_CONFIG
5639 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5648 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5649 if test "$PKG_CONFIG" != none ; then
5651 if test "x$prefix" != xNONE; then
5652 cf_path_syntax="$prefix"
5654 cf_path_syntax="$ac_default_prefix"
5657 case ".$PKG_CONFIG" in
5662 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5664 (.\${*prefix}*|.\${*dir}*)
5665 eval PKG_CONFIG="$PKG_CONFIG"
5666 case ".$PKG_CONFIG" in
5668 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5673 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5676 { { echo "$as_me:5676: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5677 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5678 { (exit 1); exit 1; }; }
5682 elif test "x$cf_pkg_config" != xno ; then
5683 { echo "$as_me:5683: WARNING: pkg-config is not installed" >&5
5684 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5687 echo "$as_me:5687: checking if you want to see long compiling messages" >&5
5688 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5690 # Check whether --enable-echo or --disable-echo was given.
5691 if test "${enable_echo+set}" = set; then
5692 enableval="$enable_echo"
5693 test "$enableval" != no && enableval=yes
5694 if test "$enableval" != "yes" ; then
5697 ECHO_LD='@echo linking $@;'
5698 RULE_CC='@echo compiling $<'
5699 SHOW_CC='@echo compiling $@'
5721 echo "$as_me:5721: result: $enableval" >&5
5722 echo "${ECHO_T}$enableval" >&6
5724 echo "$as_me:5724: checking for ncurses wrap-prefix" >&5
5725 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5727 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5728 if test "${with_ncurses_wrap_prefix+set}" = set; then
5729 withval="$with_ncurses_wrap_prefix"
5730 NCURSES_WRAP_PREFIX=$withval
5732 NCURSES_WRAP_PREFIX=_nc_
5734 echo "$as_me:5734: result: $NCURSES_WRAP_PREFIX" >&5
5735 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5737 echo "$as_me:5737: checking if you want to check for wide-character functions" >&5
5738 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5740 # Check whether --enable-widec or --disable-widec was given.
5741 if test "${enable_widec+set}" = set; then
5742 enableval="$enable_widec"
5743 test "$enableval" != no && enableval=yes
5744 if test "$enableval" != "yes" ; then
5754 echo "$as_me:5754: result: $cf_enable_widec" >&5
5755 echo "${ECHO_T}$cf_enable_widec" >&6
5757 echo "$as_me:5757: checking for specific curses-directory" >&5
5758 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5760 # Check whether --with-curses-dir or --without-curses-dir was given.
5761 if test "${with_curses_dir+set}" = set; then
5762 withval="$with_curses_dir"
5763 cf_cv_curses_dir=$withval
5767 echo "$as_me:5767: result: $cf_cv_curses_dir" >&5
5768 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5770 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5773 if test "x$prefix" != xNONE; then
5774 cf_path_syntax="$prefix"
5776 cf_path_syntax="$ac_default_prefix"
5784 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5786 (.\${*prefix}*|.\${*dir}*)
5787 eval withval="$withval"
5790 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5795 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5798 { { echo "$as_me:5798: error: expected a pathname, not \"$withval\"" >&5
5799 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5800 { (exit 1); exit 1; }; }
5804 if test -d "$cf_cv_curses_dir"
5807 if test -n "$cf_cv_curses_dir/include" ; then
5808 for cf_add_incdir in $cf_cv_curses_dir/include
5810 while test $cf_add_incdir != /usr/include
5812 if test -d $cf_add_incdir
5815 if test -n "$CFLAGS$CPPFLAGS" ; then
5816 # a loop is needed to ensure we can add subdirs of existing dirs
5817 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5818 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5819 cf_have_incdir=yes; break
5824 if test "$cf_have_incdir" = no ; then
5825 if test "$cf_add_incdir" = /usr/local/include ; then
5826 if test "$GCC" = yes
5828 cf_save_CPPFLAGS=$CPPFLAGS
5830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5831 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5833 cat >conftest.$ac_ext <<_ACEOF
5834 #line 5834 "configure"
5835 #include "confdefs.h"
5845 rm -f conftest.$ac_objext
5846 if { (eval echo "$as_me:5846: \"$ac_compile\"") >&5
5847 (eval $ac_compile) 2>&5
5849 echo "$as_me:5849: \$? = $ac_status" >&5
5850 (exit $ac_status); } &&
5851 { ac_try='test -s conftest.$ac_objext'
5852 { (eval echo "$as_me:5852: \"$ac_try\"") >&5
5855 echo "$as_me:5855: \$? = $ac_status" >&5
5856 (exit $ac_status); }; }; then
5859 echo "$as_me: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5863 rm -f conftest.$ac_objext conftest.$ac_ext
5864 CPPFLAGS=$cf_save_CPPFLAGS
5869 if test "$cf_have_incdir" = no ; then
5870 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5872 echo "${as_me:-configure}:5872: testing adding $cf_add_incdir to include-path ..." 1>&5
5874 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5876 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5877 test "$cf_top_incdir" = "$cf_add_incdir" && break
5878 cf_add_incdir="$cf_top_incdir"
5889 if test -n "$cf_cv_curses_dir/lib" ; then
5890 for cf_add_libdir in $cf_cv_curses_dir/lib
5892 if test $cf_add_libdir = /usr/lib ; then
5894 elif test -d $cf_add_libdir
5897 if test -n "$LDFLAGS$LIBS" ; then
5898 # a loop is needed to ensure we can add subdirs of existing dirs
5899 for cf_test_libdir in $LDFLAGS $LIBS ; do
5900 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5901 cf_have_libdir=yes; break
5905 if test "$cf_have_libdir" = no ; then
5906 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5908 echo "${as_me:-configure}:5908: testing adding $cf_add_libdir to library-path ..." 1>&5
5910 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5921 echo "$as_me:5921: checking for specified curses library type" >&5
5922 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5924 # Check whether --with-screen or --without-screen was given.
5925 if test "${with_screen+set}" = set; then
5926 withval="$with_screen"
5927 cf_cv_screen=$withval
5930 # Check whether --with-ncursesw or --without-ncursesw was given.
5931 if test "${with_ncursesw+set}" = set; then
5932 withval="$with_ncursesw"
5933 cf_cv_screen=ncursesw
5936 # Check whether --with-ncurses or --without-ncurses was given.
5937 if test "${with_ncurses+set}" = set; then
5938 withval="$with_ncurses"
5939 cf_cv_screen=ncurses
5942 # Check whether --with-pdcurses or --without-pdcurses was given.
5943 if test "${with_pdcurses+set}" = set; then
5944 withval="$with_pdcurses"
5945 cf_cv_screen=pdcurses
5948 # Check whether --with-curses-colr or --without-curses-colr was given.
5949 if test "${with_curses_colr+set}" = set; then
5950 withval="$with_curses_colr"
5951 cf_cv_screen=curses_colr
5954 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5955 if test "${with_curses_5lib+set}" = set; then
5956 withval="$with_curses_5lib"
5957 cf_cv_screen=curses_5lib
5965 echo "$as_me:5965: result: $cf_cv_screen" >&5
5966 echo "${ECHO_T}$cf_cv_screen" >&6
5968 case $cf_cv_screen in
5971 echo "$as_me:5971: checking for extra include directories" >&5
5972 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5973 if test "${cf_cv_curses_incdir+set}" = set; then
5974 echo $ECHO_N "(cached) $ECHO_C" >&6
5977 cf_cv_curses_incdir=no
5980 if test "x$cf_cv_screen" = "xcurses_colr"
5982 test -d /usr/include/curses_colr && \
5983 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5987 if test "x$cf_cv_screen" = "xcurses_5lib"
5989 test -d /usr/5lib && \
5990 test -d /usr/5include && \
5991 cf_cv_curses_incdir="-I/usr/5include"
5997 echo "$as_me:5997: result: $cf_cv_curses_incdir" >&5
5998 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5999 if test "$cf_cv_curses_incdir" != no
6002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6003 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6007 echo "$as_me:6007: checking if we have identified curses headers" >&5
6008 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6009 if test "${cf_cv_ncurses_header+set}" = set; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 cf_cv_ncurses_header=none
6016 curses.h ncurses/ncurses.h ncurses/curses.h
6018 cat >conftest.$ac_ext <<_ACEOF
6019 #line 6019 "configure"
6020 #include "confdefs.h"
6021 #include <${cf_header}>
6025 initscr(); tgoto("?", 0,0)
6030 rm -f conftest.$ac_objext
6031 if { (eval echo "$as_me:6031: \"$ac_compile\"") >&5
6032 (eval $ac_compile) 2>&5
6034 echo "$as_me:6034: \$? = $ac_status" >&5
6035 (exit $ac_status); } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:6037: \"$ac_try\"") >&5
6040 echo "$as_me:6040: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
6042 cf_cv_ncurses_header=$cf_header; break
6044 echo "$as_me: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6047 rm -f conftest.$ac_objext conftest.$ac_ext
6051 echo "$as_me:6051: result: $cf_cv_ncurses_header" >&5
6052 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6054 if test "$cf_cv_ncurses_header" = none ; then
6055 { { echo "$as_me:6055: error: No curses header-files found" >&5
6056 echo "$as_me: error: No curses header-files found" >&2;}
6057 { (exit 1); exit 1; }; }
6060 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6062 for ac_header in $cf_cv_ncurses_header
6064 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6065 echo "$as_me:6065: checking for $ac_header" >&5
6066 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6067 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6068 echo $ECHO_N "(cached) $ECHO_C" >&6
6070 cat >conftest.$ac_ext <<_ACEOF
6071 #line 6071 "configure"
6072 #include "confdefs.h"
6073 #include <$ac_header>
6075 if { (eval echo "$as_me:6075: \"$ac_cpp conftest.$ac_ext\"") >&5
6076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6078 egrep -v '^ *\+' conftest.er1 >conftest.err
6080 cat conftest.err >&5
6081 echo "$as_me:6081: \$? = $ac_status" >&5
6082 (exit $ac_status); } >/dev/null; then
6083 if test -s conftest.err; then
6084 ac_cpp_err=$ac_c_preproc_warn_flag
6091 if test -z "$ac_cpp_err"; then
6092 eval "$as_ac_Header=yes"
6094 echo "$as_me: failed program was:" >&5
6095 cat conftest.$ac_ext >&5
6096 eval "$as_ac_Header=no"
6098 rm -f conftest.err conftest.$ac_ext
6100 echo "$as_me:6100: result: `eval echo '${'$as_ac_Header'}'`" >&5
6101 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6103 cat >>confdefs.h <<EOF
6104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6110 echo "$as_me:6110: checking for terminfo header" >&5
6111 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6112 if test "${cf_cv_term_header+set}" = set; then
6113 echo $ECHO_N "(cached) $ECHO_C" >&6
6116 case ${cf_cv_ncurses_header} in
6117 (*/ncurses.h|*/ncursesw.h)
6118 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6121 cf_term_header=term.h
6125 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6127 cat >conftest.$ac_ext <<_ACEOF
6128 #line 6128 "configure"
6129 #include "confdefs.h"
6131 #include <${cf_cv_ncurses_header:-curses.h}>
6137 int x = auto_left_margin
6142 rm -f conftest.$ac_objext
6143 if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5
6144 (eval $ac_compile) 2>&5
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
6148 { ac_try='test -s conftest.$ac_objext'
6149 { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6152 echo "$as_me:6152: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6155 cf_cv_term_header="$cf_test"
6157 echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6160 cf_cv_term_header=unknown
6163 rm -f conftest.$ac_objext conftest.$ac_ext
6164 test "$cf_cv_term_header" != unknown && break
6168 echo "$as_me:6168: result: $cf_cv_term_header" >&5
6169 echo "${ECHO_T}$cf_cv_term_header" >&6
6171 # Set definitions to allow ifdef'ing to accommodate subdirectories
6173 case $cf_cv_term_header in
6176 cat >>confdefs.h <<\EOF
6177 #define HAVE_TERM_H 1
6183 case $cf_cv_term_header in
6186 cat >>confdefs.h <<\EOF
6187 #define HAVE_NCURSES_TERM_H 1
6193 cat >>confdefs.h <<\EOF
6194 #define HAVE_NCURSESW_TERM_H 1
6200 echo "$as_me:6200: checking for ncurses version" >&5
6201 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6202 if test "${cf_cv_ncurses_version+set}" = set; then
6203 echo $ECHO_N "(cached) $ECHO_C" >&6
6206 cf_cv_ncurses_version=no
6209 if test "$cross_compiling" = yes; then
6211 # This will not work if the preprocessor splits the line after the
6212 # Autoconf token. The 'unproto' program does that.
6213 cat > conftest.$ac_ext <<EOF
6214 #include <${cf_cv_ncurses_header:-curses.h}>
6216 #ifdef NCURSES_VERSION
6217 Autoconf NCURSES_VERSION
6225 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6226 { (eval echo "$as_me:6226: \"$cf_try\"") >&5
6229 echo "$as_me:6229: \$? = $ac_status" >&5
6230 (exit $ac_status); }
6231 if test -f conftest.out ; then
6232 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6233 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6238 cat >conftest.$ac_ext <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6242 #include <${cf_cv_ncurses_header:-curses.h}>
6246 FILE *fp = fopen("$cf_tempfile", "w");
6247 #ifdef NCURSES_VERSION
6248 # ifdef NCURSES_VERSION_PATCH
6249 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6251 fprintf(fp, "%s\n", NCURSES_VERSION);
6255 fprintf(fp, "old\n");
6260 ${cf_cv_main_return:-return}(0);
6263 rm -f conftest$ac_exeext
6264 if { (eval echo "$as_me:6264: \"$ac_link\"") >&5
6265 (eval $ac_link) 2>&5
6267 echo "$as_me:6267: \$? = $ac_status" >&5
6268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6269 { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6272 echo "$as_me:6272: \$? = $ac_status" >&5
6273 (exit $ac_status); }; }; then
6275 cf_cv_ncurses_version=`cat $cf_tempfile`
6277 echo "$as_me: program exited with status $ac_status" >&5
6278 echo "$as_me: failed program was:" >&5
6279 cat conftest.$ac_ext >&5
6281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6286 echo "$as_me:6286: result: $cf_cv_ncurses_version" >&5
6287 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6288 test "$cf_cv_ncurses_version" = no ||
6289 cat >>confdefs.h <<\EOF
6293 echo "$as_me:6293: checking if we have identified curses libraries" >&5
6294 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6295 cat >conftest.$ac_ext <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298 #include <${cf_cv_ncurses_header:-curses.h}>
6302 initscr(); tgoto("?", 0,0)
6307 rm -f conftest.$ac_objext conftest$ac_exeext
6308 if { (eval echo "$as_me:6308: \"$ac_link\"") >&5
6309 (eval $ac_link) 2>&5
6311 echo "$as_me:6311: \$? = $ac_status" >&5
6312 (exit $ac_status); } &&
6313 { ac_try='test -s conftest$ac_exeext'
6314 { (eval echo "$as_me:6314: \"$ac_try\"") >&5
6317 echo "$as_me:6317: \$? = $ac_status" >&5
6318 (exit $ac_status); }; }; then
6321 echo "$as_me: failed program was:" >&5
6322 cat conftest.$ac_ext >&5
6325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6326 echo "$as_me:6326: result: $cf_result" >&5
6327 echo "${ECHO_T}$cf_result" >&6
6329 if test "$cf_result" = no ; then
6332 echo "$as_me:6332: checking for tgoto in -lmytinfo" >&5
6333 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6334 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6335 echo $ECHO_N "(cached) $ECHO_C" >&6
6337 ac_check_lib_save_LIBS=$LIBS
6338 LIBS="-lmytinfo $LIBS"
6339 cat >conftest.$ac_ext <<_ACEOF
6340 #line 6340 "configure"
6341 #include "confdefs.h"
6343 /* Override any gcc2 internal prototype to avoid an error. */
6347 /* We use char because int might match the return type of a gcc2
6348 builtin and then its argument prototype would still apply. */
6358 rm -f conftest.$ac_objext conftest$ac_exeext
6359 if { (eval echo "$as_me:6359: \"$ac_link\"") >&5
6360 (eval $ac_link) 2>&5
6362 echo "$as_me:6362: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest$ac_exeext'
6365 { (eval echo "$as_me:6365: \"$ac_try\"") >&5
6368 echo "$as_me:6368: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_cv_lib_mytinfo_tgoto=yes
6372 echo "$as_me: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 ac_cv_lib_mytinfo_tgoto=no
6376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6377 LIBS=$ac_check_lib_save_LIBS
6379 echo "$as_me:6379: result: $ac_cv_lib_mytinfo_tgoto" >&5
6380 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6381 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6386 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6388 for cf_add_1lib in $cf_add_0lib; do
6389 for cf_add_2lib in $cf_add_libs; do
6390 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6395 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6403 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6404 # next (1998), and xcurses "newer" (2000). There is no header file for
6405 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6406 # term.h) for cur_colr
6407 if test "x$cf_cv_screen" = "xcurses_colr"
6409 echo "$as_me:6409: checking for initscr in -lcur_colr" >&5
6410 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6411 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6412 echo $ECHO_N "(cached) $ECHO_C" >&6
6414 ac_check_lib_save_LIBS=$LIBS
6415 LIBS="-lcur_colr $LIBS"
6416 cat >conftest.$ac_ext <<_ACEOF
6417 #line 6417 "configure"
6418 #include "confdefs.h"
6420 /* Override any gcc2 internal prototype to avoid an error. */
6424 /* We use char because int might match the return type of a gcc2
6425 builtin and then its argument prototype would still apply. */
6435 rm -f conftest.$ac_objext conftest$ac_exeext
6436 if { (eval echo "$as_me:6436: \"$ac_link\"") >&5
6437 (eval $ac_link) 2>&5
6439 echo "$as_me:6439: \$? = $ac_status" >&5
6440 (exit $ac_status); } &&
6441 { ac_try='test -s conftest$ac_exeext'
6442 { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6445 echo "$as_me:6445: \$? = $ac_status" >&5
6446 (exit $ac_status); }; }; then
6447 ac_cv_lib_cur_colr_initscr=yes
6449 echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 ac_cv_lib_cur_colr_initscr=no
6453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6454 LIBS=$ac_check_lib_save_LIBS
6456 echo "$as_me:6456: result: $ac_cv_lib_cur_colr_initscr" >&5
6457 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6458 if test $ac_cv_lib_cur_colr_initscr = yes; then
6463 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6465 for cf_add_1lib in $cf_add_0lib; do
6466 for cf_add_2lib in $cf_add_libs; do
6467 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6472 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6476 ac_cv_func_initscr=yes
6480 echo "$as_me:6480: checking for initscr in -lHcurses" >&5
6481 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6482 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6485 ac_check_lib_save_LIBS=$LIBS
6486 LIBS="-lHcurses $LIBS"
6487 cat >conftest.$ac_ext <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6491 /* Override any gcc2 internal prototype to avoid an error. */
6495 /* We use char because int might match the return type of a gcc2
6496 builtin and then its argument prototype would still apply. */
6506 rm -f conftest.$ac_objext conftest$ac_exeext
6507 if { (eval echo "$as_me:6507: \"$ac_link\"") >&5
6508 (eval $ac_link) 2>&5
6510 echo "$as_me:6510: \$? = $ac_status" >&5
6511 (exit $ac_status); } &&
6512 { ac_try='test -s conftest$ac_exeext'
6513 { (eval echo "$as_me:6513: \"$ac_try\"") >&5
6516 echo "$as_me:6516: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_lib_Hcurses_initscr=yes
6520 echo "$as_me: failed program was:" >&5
6521 cat conftest.$ac_ext >&5
6522 ac_cv_lib_Hcurses_initscr=no
6524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6525 LIBS=$ac_check_lib_save_LIBS
6527 echo "$as_me:6527: result: $ac_cv_lib_Hcurses_initscr" >&5
6528 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6529 if test $ac_cv_lib_Hcurses_initscr = yes; then
6531 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6536 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6538 for cf_add_1lib in $cf_add_0lib; do
6539 for cf_add_2lib in $cf_add_libs; do
6540 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6545 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6549 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6550 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6552 ac_cv_func_initscr=yes
6561 case `arch 2>/dev/null` in
6566 if test -n "/lib64" ; then
6567 for cf_add_libdir in /lib64
6569 if test $cf_add_libdir = /usr/lib ; then
6571 elif test -d $cf_add_libdir
6574 if test -n "$LDFLAGS$LIBS" ; then
6575 # a loop is needed to ensure we can add subdirs of existing dirs
6576 for cf_test_libdir in $LDFLAGS $LIBS ; do
6577 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6578 cf_have_libdir=yes; break
6582 if test "$cf_have_libdir" = no ; then
6583 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6585 echo "${as_me:-configure}:6585: testing adding $cf_add_libdir to library-path ..." 1>&5
6587 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6595 if test -n "/lib" ; then
6596 for cf_add_libdir in /lib
6598 if test $cf_add_libdir = /usr/lib ; then
6600 elif test -d $cf_add_libdir
6603 if test -n "$LDFLAGS$LIBS" ; then
6604 # a loop is needed to ensure we can add subdirs of existing dirs
6605 for cf_test_libdir in $LDFLAGS $LIBS ; do
6606 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6607 cf_have_libdir=yes; break
6611 if test "$cf_have_libdir" = no ; then
6612 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6614 echo "${as_me:-configure}:6614: testing adding $cf_add_libdir to library-path ..." 1>&5
6616 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6626 if test -n "/lib" ; then
6627 for cf_add_libdir in /lib
6629 if test $cf_add_libdir = /usr/lib ; then
6631 elif test -d $cf_add_libdir
6634 if test -n "$LDFLAGS$LIBS" ; then
6635 # a loop is needed to ensure we can add subdirs of existing dirs
6636 for cf_test_libdir in $LDFLAGS $LIBS ; do
6637 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6638 cf_have_libdir=yes; break
6642 if test "$cf_have_libdir" = no ; then
6643 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6645 echo "${as_me:-configure}:6645: testing adding $cf_add_libdir to library-path ..." 1>&5
6647 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6657 if test "x$cf_cv_screen" = "xcurses_5lib"
6659 if test -d /usr/5lib ; then
6661 if test -n "/usr/5lib" ; then
6662 for cf_add_libdir in /usr/5lib
6664 if test $cf_add_libdir = /usr/lib ; then
6666 elif test -d $cf_add_libdir
6669 if test -n "$LDFLAGS$LIBS" ; then
6670 # a loop is needed to ensure we can add subdirs of existing dirs
6671 for cf_test_libdir in $LDFLAGS $LIBS ; do
6672 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6673 cf_have_libdir=yes; break
6677 if test "$cf_have_libdir" = no ; then
6678 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6680 echo "${as_me:-configure}:6680: testing adding $cf_add_libdir to library-path ..." 1>&5
6682 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6691 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6693 for cf_add_1lib in $cf_add_0lib; do
6694 for cf_add_2lib in $cf_add_libs; do
6695 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6700 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6706 ac_cv_func_initscr=yes
6710 if test ".$ac_cv_func_initscr" != .yes ; then
6711 cf_save_LIBS="$LIBS"
6713 if test ".${cf_cv_ncurses_version:-no}" != .no
6715 cf_check_list="ncurses curses cursesX"
6717 cf_check_list="cursesX curses ncurses"
6720 # Check for library containing tgoto. Do this before curses library
6721 # because it may be needed to link the test-case for initscr.
6722 if test "x$cf_term_lib" = x
6724 echo "$as_me:6724: checking for tgoto" >&5
6725 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6726 if test "${ac_cv_func_tgoto+set}" = set; then
6727 echo $ECHO_N "(cached) $ECHO_C" >&6
6729 cat >conftest.$ac_ext <<_ACEOF
6730 #line 6730 "configure"
6731 #include "confdefs.h"
6732 #define tgoto autoconf_temporary
6733 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6740 /* We use char because int might match the return type of a gcc2
6741 builtin and then its argument prototype would still apply. */
6748 /* The GNU C library defines stubs for functions which it implements
6749 to always fail with ENOSYS. Some functions are actually named
6750 something starting with __ and the normal name is an alias. */
6751 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6752 #error found stub for tgoto
6760 rm -f conftest.$ac_objext conftest$ac_exeext
6761 if { (eval echo "$as_me:6761: \"$ac_link\"") >&5
6762 (eval $ac_link) 2>&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit $ac_status); } &&
6766 { ac_try='test -s conftest$ac_exeext'
6767 { (eval echo "$as_me:6767: \"$ac_try\"") >&5
6770 echo "$as_me:6770: \$? = $ac_status" >&5
6771 (exit $ac_status); }; }; then
6772 ac_cv_func_tgoto=yes
6774 echo "$as_me: failed program was:" >&5
6775 cat conftest.$ac_ext >&5
6778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6780 echo "$as_me:6780: result: $ac_cv_func_tgoto" >&5
6781 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6782 if test $ac_cv_func_tgoto = yes; then
6783 cf_term_lib=predefined
6786 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6788 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6789 echo "$as_me:6789: checking for tgoto in -l$cf_term_lib" >&5
6790 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6791 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6792 echo $ECHO_N "(cached) $ECHO_C" >&6
6794 ac_check_lib_save_LIBS=$LIBS
6795 LIBS="-l$cf_term_lib $LIBS"
6796 cat >conftest.$ac_ext <<_ACEOF
6797 #line 6797 "configure"
6798 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error. */
6804 /* We use char because int might match the return type of a gcc2
6805 builtin and then its argument prototype would still apply. */
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817 (eval $ac_link) 2>&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit $ac_status); } &&
6821 { ac_try='test -s conftest$ac_exeext'
6822 { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit $ac_status); }; }; then
6827 eval "$as_ac_Lib=yes"
6829 echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 eval "$as_ac_Lib=no"
6833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834 LIBS=$ac_check_lib_save_LIBS
6836 echo "$as_me:6836: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6837 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6838 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6840 : ${cf_nculib_root:=$cf_term_lib}
6851 # Check for library containing initscr
6852 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6853 if test "x$cf_curs_lib" = x
6855 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6857 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6858 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6859 echo "$as_me:6859: checking if we can link with $cf_curs_lib library" >&5
6860 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6861 cat >conftest.$ac_ext <<_ACEOF
6862 #line 6862 "configure"
6863 #include "confdefs.h"
6864 #include <${cf_cv_ncurses_header:-curses.h}>
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:6874: \"$ac_link\"") >&5
6875 (eval $ac_link) 2>&5
6877 echo "$as_me:6877: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest$ac_exeext'
6880 { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6883 echo "$as_me:6883: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6887 echo "$as_me: failed program was:" >&5
6888 cat conftest.$ac_ext >&5
6891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6892 echo "$as_me:6892: result: $cf_result" >&5
6893 echo "${ECHO_T}$cf_result" >&6
6894 test $cf_result = yes && break
6895 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6897 elif test "$cf_term_lib" != predefined ; then
6898 echo "$as_me:6898: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6899 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6900 cat >conftest.$ac_ext <<_ACEOF
6901 #line 6901 "configure"
6902 #include "confdefs.h"
6903 #include <${cf_cv_ncurses_header:-curses.h}>
6907 initscr(); tgoto((char *)0, 0, 0);
6912 rm -f conftest.$ac_objext conftest$ac_exeext
6913 if { (eval echo "$as_me:6913: \"$ac_link\"") >&5
6914 (eval $ac_link) 2>&5
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit $ac_status); } &&
6918 { ac_try='test -s conftest$ac_exeext'
6919 { (eval echo "$as_me:6919: \"$ac_try\"") >&5
6922 echo "$as_me:6922: \$? = $ac_status" >&5
6923 (exit $ac_status); }; }; then
6926 echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6929 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6930 cat >conftest.$ac_ext <<_ACEOF
6931 #line 6931 "configure"
6932 #include "confdefs.h"
6933 #include <${cf_cv_ncurses_header:-curses.h}>
6942 rm -f conftest.$ac_objext conftest$ac_exeext
6943 if { (eval echo "$as_me:6943: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); } &&
6948 { ac_try='test -s conftest$ac_exeext'
6949 { (eval echo "$as_me:6949: \"$ac_try\"") >&5
6952 echo "$as_me:6952: \$? = $ac_status" >&5
6953 (exit $ac_status); }; }; then
6956 echo "$as_me: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964 echo "$as_me:6964: result: $cf_result" >&5
6965 echo "${ECHO_T}$cf_result" >&6
6966 test $cf_result != error && break
6970 test $cf_curs_lib = unknown && { { echo "$as_me:6970: error: no curses library found" >&5
6971 echo "$as_me: error: no curses library found" >&2;}
6972 { (exit 1); exit 1; }; }
6979 echo "$as_me:6979: checking for multibyte character support" >&5
6980 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6981 if test "${cf_cv_utf8_lib+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6985 cf_save_LIBS="$LIBS"
6986 cat >conftest.$ac_ext <<_ACEOF
6987 #line 6987 "configure"
6988 #include "confdefs.h"
6999 rm -f conftest.$ac_objext conftest$ac_exeext
7000 if { (eval echo "$as_me:7000: \"$ac_link\"") >&5
7001 (eval $ac_link) 2>&5
7003 echo "$as_me:7003: \$? = $ac_status" >&5
7004 (exit $ac_status); } &&
7005 { ac_try='test -s conftest$ac_exeext'
7006 { (eval echo "$as_me:7006: \"$ac_try\"") >&5
7009 echo "$as_me:7009: \$? = $ac_status" >&5
7010 (exit $ac_status); }; }; then
7013 echo "$as_me: failed program was:" >&5
7014 cat conftest.$ac_ext >&5
7016 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7017 # will be set on completion of the AC_TRY_LINK below.
7018 cf_cv_header_path_utf8=
7019 cf_cv_library_path_utf8=
7021 echo "${as_me:-configure}:7021: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7023 cf_save_LIBS="$LIBS"
7025 cat >conftest.$ac_ext <<_ACEOF
7026 #line 7026 "configure"
7027 #include "confdefs.h"
7029 #include <libutf8.h>
7038 rm -f conftest.$ac_objext conftest$ac_exeext
7039 if { (eval echo "$as_me:7039: \"$ac_link\"") >&5
7040 (eval $ac_link) 2>&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); } &&
7044 { ac_try='test -s conftest$ac_exeext'
7045 { (eval echo "$as_me:7045: \"$ac_try\"") >&5
7048 echo "$as_me:7048: \$? = $ac_status" >&5
7049 (exit $ac_status); }; }; then
7051 cf_cv_find_linkage_utf8=yes
7052 cf_cv_header_path_utf8=/usr/include
7053 cf_cv_library_path_utf8=/usr/lib
7056 echo "$as_me: failed program was:" >&5
7057 cat conftest.$ac_ext >&5
7059 LIBS="-lutf8 $cf_save_LIBS"
7061 cat >conftest.$ac_ext <<_ACEOF
7062 #line 7062 "configure"
7063 #include "confdefs.h"
7065 #include <libutf8.h>
7074 rm -f conftest.$ac_objext conftest$ac_exeext
7075 if { (eval echo "$as_me:7075: \"$ac_link\"") >&5
7076 (eval $ac_link) 2>&5
7078 echo "$as_me:7078: \$? = $ac_status" >&5
7079 (exit $ac_status); } &&
7080 { ac_try='test -s conftest$ac_exeext'
7081 { (eval echo "$as_me:7081: \"$ac_try\"") >&5
7084 echo "$as_me:7084: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7087 cf_cv_find_linkage_utf8=yes
7088 cf_cv_header_path_utf8=/usr/include
7089 cf_cv_library_path_utf8=/usr/lib
7090 cf_cv_library_file_utf8="-lutf8"
7093 echo "$as_me: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7096 cf_cv_find_linkage_utf8=no
7097 LIBS="$cf_save_LIBS"
7099 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7101 echo "${as_me:-configure}:7101: testing find linkage for utf8 library ..." 1>&5
7103 echo "${as_me:-configure}:7103: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7105 cf_save_CPPFLAGS="$CPPFLAGS"
7106 cf_test_CPPFLAGS="$CPPFLAGS"
7110 # collect the current set of include-directories from compiler flags
7111 cf_header_path_list=""
7112 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7113 for cf_header_path in $CPPFLAGS $CFLAGS
7115 case $cf_header_path in
7117 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7119 test "x$cf_header_path" != "xNONE" && \
7120 test -d "$cf_header_path" && \
7122 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7123 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7124 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7125 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7126 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7127 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7130 cf_header_path_list="$cf_header_path_list $cf_search"
7136 # add the variations for the package we are looking for
7140 test "x$prefix" != "xNONE" && \
7141 test -d "$prefix" && \
7143 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7144 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7145 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7146 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7147 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7148 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7151 for cf_subdir_prefix in \
7160 test "x$cf_subdir_prefix" != "x$prefix" && \
7161 test -d "$cf_subdir_prefix" && \
7162 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7163 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7164 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7165 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7166 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7167 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7168 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7173 test "$includedir" != NONE && \
7174 test "$includedir" != "/usr/include" && \
7175 test -d "$includedir" && {
7176 test -d $includedir && cf_search="$cf_search $includedir"
7177 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7180 test "$oldincludedir" != NONE && \
7181 test "$oldincludedir" != "/usr/include" && \
7182 test -d "$oldincludedir" && {
7183 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7184 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7187 cf_search="$cf_search $cf_header_path_list"
7189 for cf_cv_header_path_utf8 in $cf_search
7191 if test -d $cf_cv_header_path_utf8 ; then
7192 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7194 echo "${as_me:-configure}:7194: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7196 CPPFLAGS="$cf_save_CPPFLAGS"
7198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7199 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7201 cat >conftest.$ac_ext <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7205 #include <libutf8.h>
7214 rm -f conftest.$ac_objext
7215 if { (eval echo "$as_me:7215: \"$ac_compile\"") >&5
7216 (eval $ac_compile) 2>&5
7218 echo "$as_me:7218: \$? = $ac_status" >&5
7219 (exit $ac_status); } &&
7220 { ac_try='test -s conftest.$ac_objext'
7221 { (eval echo "$as_me:7221: \"$ac_try\"") >&5
7224 echo "$as_me:7224: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7227 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7229 echo "${as_me:-configure}:7229: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7231 cf_cv_find_linkage_utf8=maybe
7232 cf_test_CPPFLAGS="$CPPFLAGS"
7235 echo "$as_me: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7238 CPPFLAGS="$cf_save_CPPFLAGS"
7241 rm -f conftest.$ac_objext conftest.$ac_ext
7245 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7247 echo "${as_me:-configure}:7247: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7249 cf_save_LIBS="$LIBS"
7250 cf_save_LDFLAGS="$LDFLAGS"
7252 if test "$cf_cv_find_linkage_utf8" != yes ; then
7255 cf_library_path_list=""
7256 if test -n "${LDFLAGS}${LIBS}" ; then
7257 for cf_library_path in $LDFLAGS $LIBS
7259 case $cf_library_path in
7261 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7263 test "x$cf_library_path" != "xNONE" && \
7264 test -d "$cf_library_path" && \
7266 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7267 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7268 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7269 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7270 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7271 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7274 cf_library_path_list="$cf_library_path_list $cf_search"
7282 test "x$prefix" != "xNONE" && \
7283 test -d "$prefix" && \
7285 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7286 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7287 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7288 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7289 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7290 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7293 for cf_subdir_prefix in \
7302 test "x$cf_subdir_prefix" != "x$prefix" && \
7303 test -d "$cf_subdir_prefix" && \
7304 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7305 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7306 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7307 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7308 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7309 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7310 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7315 cf_search="$cf_library_path_list $cf_search"
7317 for cf_cv_library_path_utf8 in $cf_search
7319 if test -d $cf_cv_library_path_utf8 ; then
7320 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7322 echo "${as_me:-configure}:7322: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7324 CPPFLAGS="$cf_test_CPPFLAGS"
7325 LIBS="-lutf8 $cf_save_LIBS"
7326 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7327 cat >conftest.$ac_ext <<_ACEOF
7328 #line 7328 "configure"
7329 #include "confdefs.h"
7331 #include <libutf8.h>
7340 rm -f conftest.$ac_objext conftest$ac_exeext
7341 if { (eval echo "$as_me:7341: \"$ac_link\"") >&5
7342 (eval $ac_link) 2>&5
7344 echo "$as_me:7344: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest$ac_exeext'
7347 { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7353 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7355 echo "${as_me:-configure}:7355: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7357 cf_cv_find_linkage_utf8=yes
7358 cf_cv_library_file_utf8="-lutf8"
7361 echo "$as_me: failed program was:" >&5
7362 cat conftest.$ac_ext >&5
7364 CPPFLAGS="$cf_save_CPPFLAGS"
7365 LIBS="$cf_save_LIBS"
7366 LDFLAGS="$cf_save_LDFLAGS"
7369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7372 CPPFLAGS="$cf_save_CPPFLAGS"
7373 LDFLAGS="$cf_save_LDFLAGS"
7377 cf_cv_find_linkage_utf8=no
7381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7386 LIBS="$cf_save_LIBS"
7388 if test "$cf_cv_find_linkage_utf8" = yes ; then
7389 cf_cv_utf8_lib=add-on
7395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7397 echo "$as_me:7397: result: $cf_cv_utf8_lib" >&5
7398 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7400 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7402 if test "$cf_cv_utf8_lib" = "add-on" ; then
7404 cat >>confdefs.h <<\EOF
7405 #define HAVE_LIBUTF8_H 1
7408 if test -n "$cf_cv_header_path_utf8" ; then
7409 for cf_add_incdir in $cf_cv_header_path_utf8
7411 while test $cf_add_incdir != /usr/include
7413 if test -d $cf_add_incdir
7416 if test -n "$CFLAGS$CPPFLAGS" ; then
7417 # a loop is needed to ensure we can add subdirs of existing dirs
7418 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7419 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7420 cf_have_incdir=yes; break
7425 if test "$cf_have_incdir" = no ; then
7426 if test "$cf_add_incdir" = /usr/local/include ; then
7427 if test "$GCC" = yes
7429 cf_save_CPPFLAGS=$CPPFLAGS
7431 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7432 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7434 cat >conftest.$ac_ext <<_ACEOF
7435 #line 7435 "configure"
7436 #include "confdefs.h"
7446 rm -f conftest.$ac_objext
7447 if { (eval echo "$as_me:7447: \"$ac_compile\"") >&5
7448 (eval $ac_compile) 2>&5
7450 echo "$as_me:7450: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:7453: \"$ac_try\"") >&5
7456 echo "$as_me:7456: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7460 echo "$as_me: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7464 rm -f conftest.$ac_objext conftest.$ac_ext
7465 CPPFLAGS=$cf_save_CPPFLAGS
7470 if test "$cf_have_incdir" = no ; then
7471 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7473 echo "${as_me:-configure}:7473: testing adding $cf_add_incdir to include-path ..." 1>&5
7475 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7477 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7478 test "$cf_top_incdir" = "$cf_add_incdir" && break
7479 cf_add_incdir="$cf_top_incdir"
7490 if test -n "$cf_cv_library_path_utf8" ; then
7491 for cf_add_libdir in $cf_cv_library_path_utf8
7493 if test $cf_add_libdir = /usr/lib ; then
7495 elif test -d $cf_add_libdir
7498 if test -n "$LDFLAGS$LIBS" ; then
7499 # a loop is needed to ensure we can add subdirs of existing dirs
7500 for cf_test_libdir in $LDFLAGS $LIBS ; do
7501 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7502 cf_have_libdir=yes; break
7506 if test "$cf_have_libdir" = no ; then
7507 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7509 echo "${as_me:-configure}:7509: testing adding $cf_add_libdir to library-path ..." 1>&5
7511 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7520 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7522 for cf_add_1lib in $cf_add_0lib; do
7523 for cf_add_2lib in $cf_add_libs; do
7524 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7529 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7535 cf_ncuconfig_root=$cf_cv_screen
7536 cf_have_ncuconfig=no
7538 if test "x${PKG_CONFIG:=none}" != xnone; then
7539 echo "$as_me:7539: checking pkg-config for $cf_ncuconfig_root" >&5
7540 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7541 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7542 echo "$as_me:7542: result: yes" >&5
7543 echo "${ECHO_T}yes" >&6
7545 echo "$as_me:7545: checking if the $cf_ncuconfig_root package files work" >&5
7546 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7547 cf_have_ncuconfig=unknown
7549 cf_save_CPPFLAGS="$CPPFLAGS"
7550 cf_save_LIBS="$LIBS"
7555 cf_new_extra_cppflags=
7557 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7559 case $cf_fix_cppflags in
7561 case $cf_add_cflags in
7562 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7563 case $cf_add_cflags in
7565 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7567 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7568 && test -z "${cf_tst_cflags}" \
7569 && cf_fix_cppflags=yes
7571 if test $cf_fix_cppflags = yes ; 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"
7577 elif test "${cf_tst_cflags}" = "\"'" ; then
7579 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7580 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7590 case $cf_add_cflags in
7592 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7594 CPPFLAGS=`echo "$CPPFLAGS" | \
7595 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7596 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7601 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7602 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7609 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7610 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7617 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7618 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7620 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7622 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7623 && test -z "${cf_tst_cflags}" \
7624 && cf_fix_cppflags=no
7629 if test -n "$cf_new_cflags" ; then
7631 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7632 CFLAGS="${CFLAGS}$cf_new_cflags"
7636 if test -n "$cf_new_cppflags" ; then
7638 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7639 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7643 if test -n "$cf_new_extra_cppflags" ; then
7645 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7646 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7653 for cf_add_1lib in `$PKG_CONFIG --libs $cf_ncuconfig_root`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7655 for cf_add_1lib in $cf_add_0lib; do
7656 for cf_add_2lib in $cf_add_libs; do
7657 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7662 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7666 cat >conftest.$ac_ext <<_ACEOF
7667 #line 7667 "configure"
7668 #include "confdefs.h"
7669 #include <${cf_cv_ncurses_header:-curses.h}>
7673 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7678 rm -f conftest.$ac_objext conftest$ac_exeext
7679 if { (eval echo "$as_me:7679: \"$ac_link\"") >&5
7680 (eval $ac_link) 2>&5
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit $ac_status); } &&
7684 { ac_try='test -s conftest$ac_exeext'
7685 { (eval echo "$as_me:7685: \"$ac_try\"") >&5
7688 echo "$as_me:7688: \$? = $ac_status" >&5
7689 (exit $ac_status); }; }; then
7690 if test "$cross_compiling" = yes; then
7691 cf_have_ncuconfig=maybe
7693 cat >conftest.$ac_ext <<_ACEOF
7694 #line 7694 "configure"
7695 #include "confdefs.h"
7696 #include <${cf_cv_ncurses_header:-curses.h}>
7698 { char *xx = curses_version(); return (xx == 0); }
7700 rm -f conftest$ac_exeext
7701 if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
7702 (eval $ac_link) 2>&5
7704 echo "$as_me:7704: \$? = $ac_status" >&5
7705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7706 { (eval echo "$as_me:7706: \"$ac_try\"") >&5
7709 echo "$as_me:7709: \$? = $ac_status" >&5
7710 (exit $ac_status); }; }; then
7711 cf_have_ncuconfig=yes
7713 echo "$as_me: program exited with status $ac_status" >&5
7714 echo "$as_me: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7716 cf_have_ncuconfig=no
7718 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7721 echo "$as_me: failed program was:" >&5
7722 cat conftest.$ac_ext >&5
7723 cf_have_ncuconfig=no
7725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7726 echo "$as_me:7726: result: $cf_have_ncuconfig" >&5
7727 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7728 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7729 if test "$cf_have_ncuconfig" != "yes"
7731 CPPFLAGS="$cf_save_CPPFLAGS"
7732 LIBS="$cf_save_LIBS"
7733 NCURSES_CONFIG_PKG=none
7736 cat >>confdefs.h <<\EOF
7740 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7742 echo "$as_me:7742: checking for terminfo header" >&5
7743 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7744 if test "${cf_cv_term_header+set}" = set; then
7745 echo $ECHO_N "(cached) $ECHO_C" >&6
7748 case ${cf_cv_ncurses_header} in
7749 (*/ncurses.h|*/ncursesw.h)
7750 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7753 cf_term_header=term.h
7757 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7759 cat >conftest.$ac_ext <<_ACEOF
7760 #line 7760 "configure"
7761 #include "confdefs.h"
7763 #include <${cf_cv_ncurses_header:-curses.h}>
7769 int x = auto_left_margin
7774 rm -f conftest.$ac_objext
7775 if { (eval echo "$as_me:7775: \"$ac_compile\"") >&5
7776 (eval $ac_compile) 2>&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); } &&
7780 { ac_try='test -s conftest.$ac_objext'
7781 { (eval echo "$as_me:7781: \"$ac_try\"") >&5
7784 echo "$as_me:7784: \$? = $ac_status" >&5
7785 (exit $ac_status); }; }; then
7787 cf_cv_term_header="$cf_test"
7789 echo "$as_me: failed program was:" >&5
7790 cat conftest.$ac_ext >&5
7792 cf_cv_term_header=unknown
7795 rm -f conftest.$ac_objext conftest.$ac_ext
7796 test "$cf_cv_term_header" != unknown && break
7800 echo "$as_me:7800: result: $cf_cv_term_header" >&5
7801 echo "${ECHO_T}$cf_cv_term_header" >&6
7803 # Set definitions to allow ifdef'ing to accommodate subdirectories
7805 case $cf_cv_term_header in
7808 cat >>confdefs.h <<\EOF
7809 #define HAVE_TERM_H 1
7815 case $cf_cv_term_header in
7818 cat >>confdefs.h <<\EOF
7819 #define HAVE_NCURSES_TERM_H 1
7825 cat >>confdefs.h <<\EOF
7826 #define HAVE_NCURSESW_TERM_H 1
7835 echo "$as_me:7835: result: no" >&5
7836 echo "${ECHO_T}no" >&6
7837 NCURSES_CONFIG_PKG=none
7840 NCURSES_CONFIG_PKG=none
7843 if test "x$cf_have_ncuconfig" = "xno"; then
7844 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7846 if test -n "$ac_tool_prefix"; then
7847 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7849 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7850 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7851 echo "$as_me:7851: checking for $ac_word" >&5
7852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7853 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7854 echo $ECHO_N "(cached) $ECHO_C" >&6
7856 if test -n "$NCURSES_CONFIG"; then
7857 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7859 ac_save_IFS=$IFS; IFS=$ac_path_separator
7861 for ac_dir in $ac_dummy; do
7863 test -z "$ac_dir" && ac_dir=.
7864 $as_executable_p "$ac_dir/$ac_word" || continue
7865 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7866 echo "$as_me:7866: found $ac_dir/$ac_word" >&5
7872 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7873 if test -n "$NCURSES_CONFIG"; then
7874 echo "$as_me:7874: result: $NCURSES_CONFIG" >&5
7875 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7877 echo "$as_me:7877: result: no" >&5
7878 echo "${ECHO_T}no" >&6
7881 test -n "$NCURSES_CONFIG" && break
7884 if test -z "$NCURSES_CONFIG"; then
7885 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7886 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7888 # Extract the first word of "$ac_prog", so it can be a program name with args.
7889 set dummy $ac_prog; ac_word=$2
7890 echo "$as_me:7890: checking for $ac_word" >&5
7891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7892 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7893 echo $ECHO_N "(cached) $ECHO_C" >&6
7895 if test -n "$ac_ct_NCURSES_CONFIG"; then
7896 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7898 ac_save_IFS=$IFS; IFS=$ac_path_separator
7900 for ac_dir in $ac_dummy; do
7902 test -z "$ac_dir" && ac_dir=.
7903 $as_executable_p "$ac_dir/$ac_word" || continue
7904 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7905 echo "$as_me:7905: found $ac_dir/$ac_word" >&5
7911 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7912 if test -n "$ac_ct_NCURSES_CONFIG"; then
7913 echo "$as_me:7913: result: $ac_ct_NCURSES_CONFIG" >&5
7914 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7916 echo "$as_me:7916: result: no" >&5
7917 echo "${ECHO_T}no" >&6
7920 test -n "$ac_ct_NCURSES_CONFIG" && break
7922 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7924 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7927 if test "$NCURSES_CONFIG" != none ; then
7932 cf_new_extra_cppflags=
7934 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7936 case $cf_fix_cppflags in
7938 case $cf_add_cflags in
7939 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7940 case $cf_add_cflags in
7942 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7944 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7945 && test -z "${cf_tst_cflags}" \
7946 && cf_fix_cppflags=yes
7948 if test $cf_fix_cppflags = yes ; 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"
7954 elif test "${cf_tst_cflags}" = "\"'" ; then
7956 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7957 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7967 case $cf_add_cflags in
7969 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7971 CPPFLAGS=`echo "$CPPFLAGS" | \
7972 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7973 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7978 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7979 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7986 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7987 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7994 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7995 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7997 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7999 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8000 && test -z "${cf_tst_cflags}" \
8001 && cf_fix_cppflags=no
8006 if test -n "$cf_new_cflags" ; then
8008 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8009 CFLAGS="${CFLAGS}$cf_new_cflags"
8013 if test -n "$cf_new_cppflags" ; then
8015 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8016 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8020 if test -n "$cf_new_extra_cppflags" ; then
8022 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8023 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8030 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8032 for cf_add_1lib in $cf_add_0lib; do
8033 for cf_add_2lib in $cf_add_libs; do
8034 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8039 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8043 # even with config script, some packages use no-override for curses.h
8045 echo "$as_me:8045: checking if we have identified curses headers" >&5
8046 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8047 if test "${cf_cv_ncurses_header+set}" = set; then
8048 echo $ECHO_N "(cached) $ECHO_C" >&6
8051 cf_cv_ncurses_header=none
8053 ncurses.h $cf_cv_screen/ncurses.h \
8054 curses.h $cf_cv_screen/curses.h
8056 cat >conftest.$ac_ext <<_ACEOF
8057 #line 8057 "configure"
8058 #include "confdefs.h"
8059 #include <${cf_header}>
8063 initscr(); tgoto("?", 0,0)
8068 rm -f conftest.$ac_objext
8069 if { (eval echo "$as_me:8069: \"$ac_compile\"") >&5
8070 (eval $ac_compile) 2>&5
8072 echo "$as_me:8072: \$? = $ac_status" >&5
8073 (exit $ac_status); } &&
8074 { ac_try='test -s conftest.$ac_objext'
8075 { (eval echo "$as_me:8075: \"$ac_try\"") >&5
8078 echo "$as_me:8078: \$? = $ac_status" >&5
8079 (exit $ac_status); }; }; then
8080 cf_cv_ncurses_header=$cf_header; break
8082 echo "$as_me: failed program was:" >&5
8083 cat conftest.$ac_ext >&5
8085 rm -f conftest.$ac_objext conftest.$ac_ext
8089 echo "$as_me:8089: result: $cf_cv_ncurses_header" >&5
8090 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8092 if test "$cf_cv_ncurses_header" = none ; then
8093 { { echo "$as_me:8093: error: No curses header-files found" >&5
8094 echo "$as_me: error: No curses header-files found" >&2;}
8095 { (exit 1); exit 1; }; }
8098 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8100 for ac_header in $cf_cv_ncurses_header
8102 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8103 echo "$as_me:8103: checking for $ac_header" >&5
8104 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8105 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8106 echo $ECHO_N "(cached) $ECHO_C" >&6
8108 cat >conftest.$ac_ext <<_ACEOF
8109 #line 8109 "configure"
8110 #include "confdefs.h"
8111 #include <$ac_header>
8113 if { (eval echo "$as_me:8113: \"$ac_cpp conftest.$ac_ext\"") >&5
8114 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8116 egrep -v '^ *\+' conftest.er1 >conftest.err
8118 cat conftest.err >&5
8119 echo "$as_me:8119: \$? = $ac_status" >&5
8120 (exit $ac_status); } >/dev/null; then
8121 if test -s conftest.err; then
8122 ac_cpp_err=$ac_c_preproc_warn_flag
8129 if test -z "$ac_cpp_err"; then
8130 eval "$as_ac_Header=yes"
8132 echo "$as_me: failed program was:" >&5
8133 cat conftest.$ac_ext >&5
8134 eval "$as_ac_Header=no"
8136 rm -f conftest.err conftest.$ac_ext
8138 echo "$as_me:8138: result: `eval echo '${'$as_ac_Header'}'`" >&5
8139 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8140 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8141 cat >>confdefs.h <<EOF
8142 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8148 cat >>confdefs.h <<\EOF
8152 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8154 cat >>confdefs.h <<EOF
8155 #define $cf_nculib_ROOT 1
8158 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8162 cf_ncuhdr_root=$cf_cv_screen
8164 test -n "$cf_cv_curses_dir" && \
8165 test "$cf_cv_curses_dir" != "no" && { \
8167 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8168 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8170 while test $cf_add_incdir != /usr/include
8172 if test -d $cf_add_incdir
8175 if test -n "$CFLAGS$CPPFLAGS" ; then
8176 # a loop is needed to ensure we can add subdirs of existing dirs
8177 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8178 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8179 cf_have_incdir=yes; break
8184 if test "$cf_have_incdir" = no ; then
8185 if test "$cf_add_incdir" = /usr/local/include ; then
8186 if test "$GCC" = yes
8188 cf_save_CPPFLAGS=$CPPFLAGS
8190 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8191 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8193 cat >conftest.$ac_ext <<_ACEOF
8194 #line 8194 "configure"
8195 #include "confdefs.h"
8205 rm -f conftest.$ac_objext
8206 if { (eval echo "$as_me:8206: \"$ac_compile\"") >&5
8207 (eval $ac_compile) 2>&5
8209 echo "$as_me:8209: \$? = $ac_status" >&5
8210 (exit $ac_status); } &&
8211 { ac_try='test -s conftest.$ac_objext'
8212 { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8215 echo "$as_me:8215: \$? = $ac_status" >&5
8216 (exit $ac_status); }; }; then
8219 echo "$as_me: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8223 rm -f conftest.$ac_objext conftest.$ac_ext
8224 CPPFLAGS=$cf_save_CPPFLAGS
8229 if test "$cf_have_incdir" = no ; then
8230 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8232 echo "${as_me:-configure}:8232: testing adding $cf_add_incdir to include-path ..." 1>&5
8234 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8236 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8237 test "$cf_top_incdir" = "$cf_add_incdir" && break
8238 cf_add_incdir="$cf_top_incdir"
8251 echo "$as_me:8251: checking for $cf_ncuhdr_root header in include-path" >&5
8252 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8253 if test "${cf_cv_ncurses_h+set}" = set; then
8254 echo $ECHO_N "(cached) $ECHO_C" >&6
8257 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8258 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8259 for cf_header in $cf_header_list
8262 cat >conftest.$ac_ext <<_ACEOF
8263 #line 8263 "configure"
8264 #include "confdefs.h"
8266 #include <$cf_header>
8271 #ifdef NCURSES_VERSION
8273 printf("%s\n", NCURSES_VERSION);
8286 rm -f conftest.$ac_objext
8287 if { (eval echo "$as_me:8287: \"$ac_compile\"") >&5
8288 (eval $ac_compile) 2>&5
8290 echo "$as_me:8290: \$? = $ac_status" >&5
8291 (exit $ac_status); } &&
8292 { ac_try='test -s conftest.$ac_objext'
8293 { (eval echo "$as_me:8293: \"$ac_try\"") >&5
8296 echo "$as_me:8296: \$? = $ac_status" >&5
8297 (exit $ac_status); }; }; then
8298 cf_cv_ncurses_h=$cf_header
8301 echo "$as_me: failed program was:" >&5
8302 cat conftest.$ac_ext >&5
8305 rm -f conftest.$ac_objext conftest.$ac_ext
8307 test "$cf_cv_ncurses_h" != no && break
8311 echo "$as_me:8311: result: $cf_cv_ncurses_h" >&5
8312 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8314 if test "$cf_cv_ncurses_h" != no ; then
8315 cf_cv_ncurses_header=$cf_cv_ncurses_h
8318 echo "$as_me:8318: checking for $cf_ncuhdr_root include-path" >&5
8319 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8320 if test "${cf_cv_ncurses_h2+set}" = set; then
8321 echo $ECHO_N "(cached) $ECHO_C" >&6
8324 test -n "$verbose" && echo
8328 # collect the current set of include-directories from compiler flags
8329 cf_header_path_list=""
8330 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8331 for cf_header_path in $CPPFLAGS $CFLAGS
8333 case $cf_header_path in
8335 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8337 test "x$cf_header_path" != "xNONE" && \
8338 test -d "$cf_header_path" && \
8340 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8341 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8342 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8343 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8344 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8345 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"
8348 cf_header_path_list="$cf_header_path_list $cf_search"
8354 # add the variations for the package we are looking for
8358 test "x$prefix" != "xNONE" && \
8359 test -d "$prefix" && \
8361 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8362 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8363 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8364 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8365 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8366 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8369 for cf_subdir_prefix in \
8378 test "x$cf_subdir_prefix" != "x$prefix" && \
8379 test -d "$cf_subdir_prefix" && \
8380 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8381 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8382 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8383 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8384 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8385 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8386 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"
8391 test "$includedir" != NONE && \
8392 test "$includedir" != "/usr/include" && \
8393 test -d "$includedir" && {
8394 test -d $includedir && cf_search="$cf_search $includedir"
8395 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8398 test "$oldincludedir" != NONE && \
8399 test "$oldincludedir" != "/usr/include" && \
8400 test -d "$oldincludedir" && {
8401 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8402 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8405 cf_search="$cf_search $cf_header_path_list"
8407 test -n "$verbose" && echo search path $cf_search
8408 cf_save2_CPPFLAGS="$CPPFLAGS"
8409 for cf_incdir in $cf_search
8412 if test -n "$cf_incdir" ; then
8413 for cf_add_incdir in $cf_incdir
8415 while test $cf_add_incdir != /usr/include
8417 if test -d $cf_add_incdir
8420 if test -n "$CFLAGS$CPPFLAGS" ; then
8421 # a loop is needed to ensure we can add subdirs of existing dirs
8422 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8423 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8424 cf_have_incdir=yes; break
8429 if test "$cf_have_incdir" = no ; then
8430 if test "$cf_add_incdir" = /usr/local/include ; then
8431 if test "$GCC" = yes
8433 cf_save_CPPFLAGS=$CPPFLAGS
8435 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8436 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8438 cat >conftest.$ac_ext <<_ACEOF
8439 #line 8439 "configure"
8440 #include "confdefs.h"
8450 rm -f conftest.$ac_objext
8451 if { (eval echo "$as_me:8451: \"$ac_compile\"") >&5
8452 (eval $ac_compile) 2>&5
8454 echo "$as_me:8454: \$? = $ac_status" >&5
8455 (exit $ac_status); } &&
8456 { ac_try='test -s conftest.$ac_objext'
8457 { (eval echo "$as_me:8457: \"$ac_try\"") >&5
8460 echo "$as_me:8460: \$? = $ac_status" >&5
8461 (exit $ac_status); }; }; then
8464 echo "$as_me: failed program was:" >&5
8465 cat conftest.$ac_ext >&5
8468 rm -f conftest.$ac_objext conftest.$ac_ext
8469 CPPFLAGS=$cf_save_CPPFLAGS
8474 if test "$cf_have_incdir" = no ; then
8475 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8477 echo "${as_me:-configure}:8477: testing adding $cf_add_incdir to include-path ..." 1>&5
8479 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8481 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8482 test "$cf_top_incdir" = "$cf_add_incdir" && break
8483 cf_add_incdir="$cf_top_incdir"
8499 cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8503 #include <$cf_header>
8508 #ifdef NCURSES_VERSION
8510 printf("%s\n", NCURSES_VERSION);
8523 rm -f conftest.$ac_objext
8524 if { (eval echo "$as_me:8524: \"$ac_compile\"") >&5
8525 (eval $ac_compile) 2>&5
8527 echo "$as_me:8527: \$? = $ac_status" >&5
8528 (exit $ac_status); } &&
8529 { ac_try='test -s conftest.$ac_objext'
8530 { (eval echo "$as_me:8530: \"$ac_try\"") >&5
8533 echo "$as_me:8533: \$? = $ac_status" >&5
8534 (exit $ac_status); }; }; then
8535 cf_cv_ncurses_h2=$cf_header
8538 echo "$as_me: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8542 rm -f conftest.$ac_objext conftest.$ac_ext
8544 if test "$cf_cv_ncurses_h2" != no ; then
8545 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8546 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8549 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8551 CPPFLAGS="$cf_save2_CPPFLAGS"
8552 test "$cf_cv_ncurses_h2" != no && break
8554 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8554: error: not found" >&5
8555 echo "$as_me: error: not found" >&2;}
8556 { (exit 1); exit 1; }; }
8559 echo "$as_me:8559: result: $cf_cv_ncurses_h2" >&5
8560 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8562 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8563 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8564 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8565 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8568 if test -n "$cf_1st_incdir" ; then
8569 for cf_add_incdir in $cf_1st_incdir
8571 while test $cf_add_incdir != /usr/include
8573 if test -d $cf_add_incdir
8576 if test -n "$CFLAGS$CPPFLAGS" ; then
8577 # a loop is needed to ensure we can add subdirs of existing dirs
8578 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8579 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8580 cf_have_incdir=yes; break
8585 if test "$cf_have_incdir" = no ; then
8586 if test "$cf_add_incdir" = /usr/local/include ; then
8587 if test "$GCC" = yes
8589 cf_save_CPPFLAGS=$CPPFLAGS
8591 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8592 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8594 cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8606 rm -f conftest.$ac_objext
8607 if { (eval echo "$as_me:8607: \"$ac_compile\"") >&5
8608 (eval $ac_compile) 2>&5
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit $ac_status); } &&
8612 { ac_try='test -s conftest.$ac_objext'
8613 { (eval echo "$as_me:8613: \"$ac_try\"") >&5
8616 echo "$as_me:8616: \$? = $ac_status" >&5
8617 (exit $ac_status); }; }; then
8620 echo "$as_me: failed program was:" >&5
8621 cat conftest.$ac_ext >&5
8624 rm -f conftest.$ac_objext conftest.$ac_ext
8625 CPPFLAGS=$cf_save_CPPFLAGS
8630 if test "$cf_have_incdir" = no ; then
8631 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8633 echo "${as_me:-configure}:8633: testing adding $cf_add_incdir to include-path ..." 1>&5
8635 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8637 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8638 test "$cf_top_incdir" = "$cf_add_incdir" && break
8639 cf_add_incdir="$cf_top_incdir"
8652 # Set definitions to allow ifdef'ing for ncurses.h
8654 case $cf_cv_ncurses_header in
8657 cat >>confdefs.h <<\EOF
8658 #define HAVE_NCURSES_H 1
8664 case $cf_cv_ncurses_header in
8665 (ncurses/curses.h|ncurses/ncurses.h)
8667 cat >>confdefs.h <<\EOF
8668 #define HAVE_NCURSES_NCURSES_H 1
8672 (ncursesw/curses.h|ncursesw/ncurses.h)
8674 cat >>confdefs.h <<\EOF
8675 #define HAVE_NCURSESW_NCURSES_H 1
8681 echo "$as_me:8681: checking for terminfo header" >&5
8682 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8683 if test "${cf_cv_term_header+set}" = set; then
8684 echo $ECHO_N "(cached) $ECHO_C" >&6
8687 case ${cf_cv_ncurses_header} in
8688 (*/ncurses.h|*/ncursesw.h)
8689 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8692 cf_term_header=term.h
8696 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8698 cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8702 #include <${cf_cv_ncurses_header:-curses.h}>
8708 int x = auto_left_margin
8713 rm -f conftest.$ac_objext
8714 if { (eval echo "$as_me:8714: \"$ac_compile\"") >&5
8715 (eval $ac_compile) 2>&5
8717 echo "$as_me:8717: \$? = $ac_status" >&5
8718 (exit $ac_status); } &&
8719 { ac_try='test -s conftest.$ac_objext'
8720 { (eval echo "$as_me:8720: \"$ac_try\"") >&5
8723 echo "$as_me:8723: \$? = $ac_status" >&5
8724 (exit $ac_status); }; }; then
8726 cf_cv_term_header="$cf_test"
8728 echo "$as_me: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8731 cf_cv_term_header=unknown
8734 rm -f conftest.$ac_objext conftest.$ac_ext
8735 test "$cf_cv_term_header" != unknown && break
8739 echo "$as_me:8739: result: $cf_cv_term_header" >&5
8740 echo "${ECHO_T}$cf_cv_term_header" >&6
8742 # Set definitions to allow ifdef'ing to accommodate subdirectories
8744 case $cf_cv_term_header in
8747 cat >>confdefs.h <<\EOF
8748 #define HAVE_TERM_H 1
8754 case $cf_cv_term_header in
8757 cat >>confdefs.h <<\EOF
8758 #define HAVE_NCURSES_TERM_H 1
8764 cat >>confdefs.h <<\EOF
8765 #define HAVE_NCURSESW_TERM_H 1
8771 # some applications need this, but should check for NCURSES_VERSION
8773 cat >>confdefs.h <<\EOF
8777 echo "$as_me:8777: checking for ncurses version" >&5
8778 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8779 if test "${cf_cv_ncurses_version+set}" = set; then
8780 echo $ECHO_N "(cached) $ECHO_C" >&6
8783 cf_cv_ncurses_version=no
8786 if test "$cross_compiling" = yes; then
8788 # This will not work if the preprocessor splits the line after the
8789 # Autoconf token. The 'unproto' program does that.
8790 cat > conftest.$ac_ext <<EOF
8791 #include <${cf_cv_ncurses_header:-curses.h}>
8793 #ifdef NCURSES_VERSION
8794 Autoconf NCURSES_VERSION
8802 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8803 { (eval echo "$as_me:8803: \"$cf_try\"") >&5
8806 echo "$as_me:8806: \$? = $ac_status" >&5
8807 (exit $ac_status); }
8808 if test -f conftest.out ; then
8809 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8810 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8815 cat >conftest.$ac_ext <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8819 #include <${cf_cv_ncurses_header:-curses.h}>
8823 FILE *fp = fopen("$cf_tempfile", "w");
8824 #ifdef NCURSES_VERSION
8825 # ifdef NCURSES_VERSION_PATCH
8826 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8828 fprintf(fp, "%s\n", NCURSES_VERSION);
8832 fprintf(fp, "old\n");
8837 ${cf_cv_main_return:-return}(0);
8840 rm -f conftest$ac_exeext
8841 if { (eval echo "$as_me:8841: \"$ac_link\"") >&5
8842 (eval $ac_link) 2>&5
8844 echo "$as_me:8844: \$? = $ac_status" >&5
8845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8846 { (eval echo "$as_me:8846: \"$ac_try\"") >&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit $ac_status); }; }; then
8852 cf_cv_ncurses_version=`cat $cf_tempfile`
8854 echo "$as_me: program exited with status $ac_status" >&5
8855 echo "$as_me: failed program was:" >&5
8856 cat conftest.$ac_ext >&5
8858 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8863 echo "$as_me:8863: result: $cf_cv_ncurses_version" >&5
8864 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8865 test "$cf_cv_ncurses_version" = no ||
8866 cat >>confdefs.h <<\EOF
8870 cf_nculib_root=$cf_cv_screen
8871 # This works, except for the special case where we find gpm, but
8872 # ncurses is in a nonstandard location via $LIBS, and we really want
8875 cf_ncurses_SAVE="$LIBS"
8876 echo "$as_me:8876: checking for Gpm_Open in -lgpm" >&5
8877 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8878 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8879 echo $ECHO_N "(cached) $ECHO_C" >&6
8881 ac_check_lib_save_LIBS=$LIBS
8883 cat >conftest.$ac_ext <<_ACEOF
8884 #line 8884 "configure"
8885 #include "confdefs.h"
8887 /* Override any gcc2 internal prototype to avoid an error. */
8891 /* We use char because int might match the return type of a gcc2
8892 builtin and then its argument prototype would still apply. */
8902 rm -f conftest.$ac_objext conftest$ac_exeext
8903 if { (eval echo "$as_me:8903: \"$ac_link\"") >&5
8904 (eval $ac_link) 2>&5
8906 echo "$as_me:8906: \$? = $ac_status" >&5
8907 (exit $ac_status); } &&
8908 { ac_try='test -s conftest$ac_exeext'
8909 { (eval echo "$as_me:8909: \"$ac_try\"") >&5
8912 echo "$as_me:8912: \$? = $ac_status" >&5
8913 (exit $ac_status); }; }; then
8914 ac_cv_lib_gpm_Gpm_Open=yes
8916 echo "$as_me: failed program was:" >&5
8917 cat conftest.$ac_ext >&5
8918 ac_cv_lib_gpm_Gpm_Open=no
8920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8921 LIBS=$ac_check_lib_save_LIBS
8923 echo "$as_me:8923: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8924 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8925 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8926 echo "$as_me:8926: checking for initscr in -lgpm" >&5
8927 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8928 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8929 echo $ECHO_N "(cached) $ECHO_C" >&6
8931 ac_check_lib_save_LIBS=$LIBS
8933 cat >conftest.$ac_ext <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8937 /* Override any gcc2 internal prototype to avoid an error. */
8941 /* We use char because int might match the return type of a gcc2
8942 builtin and then its argument prototype would still apply. */
8952 rm -f conftest.$ac_objext conftest$ac_exeext
8953 if { (eval echo "$as_me:8953: \"$ac_link\"") >&5
8954 (eval $ac_link) 2>&5
8956 echo "$as_me:8956: \$? = $ac_status" >&5
8957 (exit $ac_status); } &&
8958 { ac_try='test -s conftest$ac_exeext'
8959 { (eval echo "$as_me:8959: \"$ac_try\"") >&5
8962 echo "$as_me:8962: \$? = $ac_status" >&5
8963 (exit $ac_status); }; }; then
8964 ac_cv_lib_gpm_initscr=yes
8966 echo "$as_me: failed program was:" >&5
8967 cat conftest.$ac_ext >&5
8968 ac_cv_lib_gpm_initscr=no
8970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8971 LIBS=$ac_check_lib_save_LIBS
8973 echo "$as_me:8973: result: $ac_cv_lib_gpm_initscr" >&5
8974 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8975 if test $ac_cv_lib_gpm_initscr = yes; then
8976 LIBS="$cf_ncurses_SAVE"
8978 cf_ncurses_LIBS="-lgpm"
8985 # This is only necessary if you are linking against an obsolete
8986 # version of ncurses (but it should do no harm, since it's static).
8987 if test "$cf_nculib_root" = ncurses ; then
8988 echo "$as_me:8988: checking for tgoto in -lmytinfo" >&5
8989 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8990 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8991 echo $ECHO_N "(cached) $ECHO_C" >&6
8993 ac_check_lib_save_LIBS=$LIBS
8994 LIBS="-lmytinfo $LIBS"
8995 cat >conftest.$ac_ext <<_ACEOF
8996 #line 8996 "configure"
8997 #include "confdefs.h"
8999 /* Override any gcc2 internal prototype to avoid an error. */
9003 /* We use char because int might match the return type of a gcc2
9004 builtin and then its argument prototype would still apply. */
9014 rm -f conftest.$ac_objext conftest$ac_exeext
9015 if { (eval echo "$as_me:9015: \"$ac_link\"") >&5
9016 (eval $ac_link) 2>&5
9018 echo "$as_me:9018: \$? = $ac_status" >&5
9019 (exit $ac_status); } &&
9020 { ac_try='test -s conftest$ac_exeext'
9021 { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9024 echo "$as_me:9024: \$? = $ac_status" >&5
9025 (exit $ac_status); }; }; then
9026 ac_cv_lib_mytinfo_tgoto=yes
9028 echo "$as_me: failed program was:" >&5
9029 cat conftest.$ac_ext >&5
9030 ac_cv_lib_mytinfo_tgoto=no
9032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9033 LIBS=$ac_check_lib_save_LIBS
9035 echo "$as_me:9035: result: $ac_cv_lib_mytinfo_tgoto" >&5
9036 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9037 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9038 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9048 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9050 for cf_add_1lib in $cf_add_0lib; do
9051 for cf_add_2lib in $cf_add_libs; do
9052 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9061 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9067 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9069 for cf_add_1lib in $cf_add_0lib; do
9070 for cf_add_2lib in $cf_add_libs; do
9071 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9076 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9082 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9084 echo "$as_me:9084: checking for initscr" >&5
9085 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9086 if test "${ac_cv_func_initscr+set}" = set; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
9089 cat >conftest.$ac_ext <<_ACEOF
9090 #line 9090 "configure"
9091 #include "confdefs.h"
9092 #define initscr autoconf_temporary
9093 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9100 /* We use char because int might match the return type of a gcc2
9101 builtin and then its argument prototype would still apply. */
9102 char initscr (void);
9108 /* The GNU C library defines stubs for functions which it implements
9109 to always fail with ENOSYS. Some functions are actually named
9110 something starting with __ and the normal name is an alias. */
9111 #if defined (__stub_initscr) || defined (__stub___initscr)
9112 #error found stub for initscr
9120 rm -f conftest.$ac_objext conftest$ac_exeext
9121 if { (eval echo "$as_me:9121: \"$ac_link\"") >&5
9122 (eval $ac_link) 2>&5
9124 echo "$as_me:9124: \$? = $ac_status" >&5
9125 (exit $ac_status); } &&
9126 { ac_try='test -s conftest$ac_exeext'
9127 { (eval echo "$as_me:9127: \"$ac_try\"") >&5
9130 echo "$as_me:9130: \$? = $ac_status" >&5
9131 (exit $ac_status); }; }; then
9132 ac_cv_func_initscr=yes
9134 echo "$as_me: failed program was:" >&5
9135 cat conftest.$ac_ext >&5
9136 ac_cv_func_initscr=no
9138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9140 echo "$as_me:9140: result: $ac_cv_func_initscr" >&5
9141 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9142 if test $ac_cv_func_initscr = yes; then
9143 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9146 cf_save_LIBS="$LIBS"
9147 echo "$as_me:9147: checking for initscr in -l$cf_nculib_root" >&5
9148 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9149 LIBS="-l$cf_nculib_root $LIBS"
9150 cat >conftest.$ac_ext <<_ACEOF
9151 #line 9151 "configure"
9152 #include "confdefs.h"
9153 #include <${cf_cv_ncurses_header:-curses.h}>
9162 rm -f conftest.$ac_objext conftest$ac_exeext
9163 if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164 (eval $ac_link) 2>&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit $ac_status); } &&
9168 { ac_try='test -s conftest$ac_exeext'
9169 { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9172 echo "$as_me:9172: \$? = $ac_status" >&5
9173 (exit $ac_status); }; }; then
9174 echo "$as_me:9174: result: yes" >&5
9175 echo "${ECHO_T}yes" >&6
9176 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9179 echo "$as_me: failed program was:" >&5
9180 cat conftest.$ac_ext >&5
9181 echo "$as_me:9181: result: no" >&5
9182 echo "${ECHO_T}no" >&6
9185 cf_library_path_list=""
9186 if test -n "${LDFLAGS}${LIBS}" ; then
9187 for cf_library_path in $LDFLAGS $LIBS
9189 case $cf_library_path in
9191 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9193 test "x$cf_library_path" != "xNONE" && \
9194 test -d "$cf_library_path" && \
9196 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9197 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9198 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9199 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9200 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9201 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"
9204 cf_library_path_list="$cf_library_path_list $cf_search"
9212 test "x$prefix" != "xNONE" && \
9213 test -d "$prefix" && \
9215 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9216 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9217 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9218 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9219 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9220 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9223 for cf_subdir_prefix in \
9232 test "x$cf_subdir_prefix" != "x$prefix" && \
9233 test -d "$cf_subdir_prefix" && \
9234 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9235 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9236 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9237 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9238 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9239 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9240 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"
9245 cf_search="$cf_library_path_list $cf_search"
9247 for cf_libdir in $cf_search
9249 echo "$as_me:9249: checking for -l$cf_nculib_root in $cf_libdir" >&5
9250 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9251 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9252 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <${cf_cv_ncurses_header:-curses.h}>
9264 rm -f conftest.$ac_objext conftest$ac_exeext
9265 if { (eval echo "$as_me:9265: \"$ac_link\"") >&5
9266 (eval $ac_link) 2>&5
9268 echo "$as_me:9268: \$? = $ac_status" >&5
9269 (exit $ac_status); } &&
9270 { ac_try='test -s conftest$ac_exeext'
9271 { (eval echo "$as_me:9271: \"$ac_try\"") >&5
9274 echo "$as_me:9274: \$? = $ac_status" >&5
9275 (exit $ac_status); }; }; then
9276 echo "$as_me:9276: result: yes" >&5
9277 echo "${ECHO_T}yes" >&6
9278 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9281 echo "$as_me: failed program was:" >&5
9282 cat conftest.$ac_ext >&5
9283 echo "$as_me:9283: result: no" >&5
9284 echo "${ECHO_T}no" >&6
9285 LIBS="$cf_save_LIBS"
9287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9295 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9297 if test $cf_found_library = no ; then
9298 { { echo "$as_me:9298: error: Cannot link $cf_nculib_root library" >&5
9299 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9300 { (exit 1); exit 1; }; }
9305 if test -n "$cf_ncurses_LIBS" ; then
9306 echo "$as_me:9306: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9307 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9308 cf_ncurses_SAVE="$LIBS"
9309 for p in $cf_ncurses_LIBS ; do
9310 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9311 if test "$q" != "$LIBS" ; then
9315 cat >conftest.$ac_ext <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318 #include <${cf_cv_ncurses_header:-curses.h}>
9322 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9327 rm -f conftest.$ac_objext conftest$ac_exeext
9328 if { (eval echo "$as_me:9328: \"$ac_link\"") >&5
9329 (eval $ac_link) 2>&5
9331 echo "$as_me:9331: \$? = $ac_status" >&5
9332 (exit $ac_status); } &&
9333 { ac_try='test -s conftest$ac_exeext'
9334 { (eval echo "$as_me:9334: \"$ac_try\"") >&5
9337 echo "$as_me:9337: \$? = $ac_status" >&5
9338 (exit $ac_status); }; }; then
9339 echo "$as_me:9339: result: yes" >&5
9340 echo "${ECHO_T}yes" >&6
9342 echo "$as_me: failed program was:" >&5
9343 cat conftest.$ac_ext >&5
9344 echo "$as_me:9344: result: no" >&5
9345 echo "${ECHO_T}no" >&6
9346 LIBS="$cf_ncurses_SAVE"
9348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9351 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9353 cat >>confdefs.h <<EOF
9354 #define $cf_nculib_ROOT 1
9365 cf_ncuconfig_root=$cf_cv_screen
9366 cf_have_ncuconfig=no
9368 if test "x${PKG_CONFIG:=none}" != xnone; then
9369 echo "$as_me:9369: checking pkg-config for $cf_ncuconfig_root" >&5
9370 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9371 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9372 echo "$as_me:9372: result: yes" >&5
9373 echo "${ECHO_T}yes" >&6
9375 echo "$as_me:9375: checking if the $cf_ncuconfig_root package files work" >&5
9376 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9377 cf_have_ncuconfig=unknown
9379 cf_save_CPPFLAGS="$CPPFLAGS"
9380 cf_save_LIBS="$LIBS"
9385 cf_new_extra_cppflags=
9387 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9389 case $cf_fix_cppflags in
9391 case $cf_add_cflags in
9392 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9393 case $cf_add_cflags in
9395 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9397 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9398 && test -z "${cf_tst_cflags}" \
9399 && cf_fix_cppflags=yes
9401 if test $cf_fix_cppflags = yes ; 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"
9407 elif test "${cf_tst_cflags}" = "\"'" ; then
9409 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9410 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9420 case $cf_add_cflags in
9422 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9424 CPPFLAGS=`echo "$CPPFLAGS" | \
9425 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9426 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9431 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9432 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9439 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9440 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9450 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9452 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9453 && test -z "${cf_tst_cflags}" \
9454 && cf_fix_cppflags=no
9459 if test -n "$cf_new_cflags" ; then
9461 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9462 CFLAGS="${CFLAGS}$cf_new_cflags"
9466 if test -n "$cf_new_cppflags" ; then
9468 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9469 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9473 if test -n "$cf_new_extra_cppflags" ; then
9475 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9476 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9483 for cf_add_1lib in `$PKG_CONFIG --libs $cf_ncuconfig_root`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9485 for cf_add_1lib in $cf_add_0lib; do
9486 for cf_add_2lib in $cf_add_libs; do
9487 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9492 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9496 cat >conftest.$ac_ext <<_ACEOF
9497 #line 9497 "configure"
9498 #include "confdefs.h"
9499 #include <${cf_cv_ncurses_header:-curses.h}>
9503 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9508 rm -f conftest.$ac_objext conftest$ac_exeext
9509 if { (eval echo "$as_me:9509: \"$ac_link\"") >&5
9510 (eval $ac_link) 2>&5
9512 echo "$as_me:9512: \$? = $ac_status" >&5
9513 (exit $ac_status); } &&
9514 { ac_try='test -s conftest$ac_exeext'
9515 { (eval echo "$as_me:9515: \"$ac_try\"") >&5
9518 echo "$as_me:9518: \$? = $ac_status" >&5
9519 (exit $ac_status); }; }; then
9520 if test "$cross_compiling" = yes; then
9521 cf_have_ncuconfig=maybe
9523 cat >conftest.$ac_ext <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526 #include <${cf_cv_ncurses_header:-curses.h}>
9528 { char *xx = curses_version(); return (xx == 0); }
9530 rm -f conftest$ac_exeext
9531 if { (eval echo "$as_me:9531: \"$ac_link\"") >&5
9532 (eval $ac_link) 2>&5
9534 echo "$as_me:9534: \$? = $ac_status" >&5
9535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9536 { (eval echo "$as_me:9536: \"$ac_try\"") >&5
9539 echo "$as_me:9539: \$? = $ac_status" >&5
9540 (exit $ac_status); }; }; then
9541 cf_have_ncuconfig=yes
9543 echo "$as_me: program exited with status $ac_status" >&5
9544 echo "$as_me: failed program was:" >&5
9545 cat conftest.$ac_ext >&5
9546 cf_have_ncuconfig=no
9548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9551 echo "$as_me: failed program was:" >&5
9552 cat conftest.$ac_ext >&5
9553 cf_have_ncuconfig=no
9555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9556 echo "$as_me:9556: result: $cf_have_ncuconfig" >&5
9557 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9558 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9559 if test "$cf_have_ncuconfig" != "yes"
9561 CPPFLAGS="$cf_save_CPPFLAGS"
9562 LIBS="$cf_save_LIBS"
9563 NCURSES_CONFIG_PKG=none
9566 cat >>confdefs.h <<\EOF
9570 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9572 echo "$as_me:9572: checking for terminfo header" >&5
9573 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9574 if test "${cf_cv_term_header+set}" = set; then
9575 echo $ECHO_N "(cached) $ECHO_C" >&6
9578 case ${cf_cv_ncurses_header} in
9579 (*/ncurses.h|*/ncursesw.h)
9580 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9583 cf_term_header=term.h
9587 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9589 cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9593 #include <${cf_cv_ncurses_header:-curses.h}>
9599 int x = auto_left_margin
9604 rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:9605: \"$ac_compile\"") >&5
9606 (eval $ac_compile) 2>&5
9608 echo "$as_me:9608: \$? = $ac_status" >&5
9609 (exit $ac_status); } &&
9610 { ac_try='test -s conftest.$ac_objext'
9611 { (eval echo "$as_me:9611: \"$ac_try\"") >&5
9614 echo "$as_me:9614: \$? = $ac_status" >&5
9615 (exit $ac_status); }; }; then
9617 cf_cv_term_header="$cf_test"
9619 echo "$as_me: failed program was:" >&5
9620 cat conftest.$ac_ext >&5
9622 cf_cv_term_header=unknown
9625 rm -f conftest.$ac_objext conftest.$ac_ext
9626 test "$cf_cv_term_header" != unknown && break
9630 echo "$as_me:9630: result: $cf_cv_term_header" >&5
9631 echo "${ECHO_T}$cf_cv_term_header" >&6
9633 # Set definitions to allow ifdef'ing to accommodate subdirectories
9635 case $cf_cv_term_header in
9638 cat >>confdefs.h <<\EOF
9639 #define HAVE_TERM_H 1
9645 case $cf_cv_term_header in
9648 cat >>confdefs.h <<\EOF
9649 #define HAVE_NCURSES_TERM_H 1
9655 cat >>confdefs.h <<\EOF
9656 #define HAVE_NCURSESW_TERM_H 1
9665 echo "$as_me:9665: result: no" >&5
9666 echo "${ECHO_T}no" >&6
9667 NCURSES_CONFIG_PKG=none
9670 NCURSES_CONFIG_PKG=none
9673 if test "x$cf_have_ncuconfig" = "xno"; then
9674 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9676 if test -n "$ac_tool_prefix"; then
9677 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9679 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9681 echo "$as_me:9681: checking for $ac_word" >&5
9682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9683 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9684 echo $ECHO_N "(cached) $ECHO_C" >&6
9686 if test -n "$NCURSES_CONFIG"; then
9687 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9689 ac_save_IFS=$IFS; IFS=$ac_path_separator
9691 for ac_dir in $ac_dummy; do
9693 test -z "$ac_dir" && ac_dir=.
9694 $as_executable_p "$ac_dir/$ac_word" || continue
9695 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9696 echo "$as_me:9696: found $ac_dir/$ac_word" >&5
9702 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9703 if test -n "$NCURSES_CONFIG"; then
9704 echo "$as_me:9704: result: $NCURSES_CONFIG" >&5
9705 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9707 echo "$as_me:9707: result: no" >&5
9708 echo "${ECHO_T}no" >&6
9711 test -n "$NCURSES_CONFIG" && break
9714 if test -z "$NCURSES_CONFIG"; then
9715 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9716 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9718 # Extract the first word of "$ac_prog", so it can be a program name with args.
9719 set dummy $ac_prog; ac_word=$2
9720 echo "$as_me:9720: checking for $ac_word" >&5
9721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9722 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
9725 if test -n "$ac_ct_NCURSES_CONFIG"; then
9726 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9728 ac_save_IFS=$IFS; IFS=$ac_path_separator
9730 for ac_dir in $ac_dummy; do
9732 test -z "$ac_dir" && ac_dir=.
9733 $as_executable_p "$ac_dir/$ac_word" || continue
9734 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9735 echo "$as_me:9735: found $ac_dir/$ac_word" >&5
9741 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9742 if test -n "$ac_ct_NCURSES_CONFIG"; then
9743 echo "$as_me:9743: result: $ac_ct_NCURSES_CONFIG" >&5
9744 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9746 echo "$as_me:9746: result: no" >&5
9747 echo "${ECHO_T}no" >&6
9750 test -n "$ac_ct_NCURSES_CONFIG" && break
9752 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9754 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9757 if test "$NCURSES_CONFIG" != none ; then
9762 cf_new_extra_cppflags=
9764 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9766 case $cf_fix_cppflags in
9768 case $cf_add_cflags in
9769 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9770 case $cf_add_cflags in
9772 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9774 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9775 && test -z "${cf_tst_cflags}" \
9776 && cf_fix_cppflags=yes
9778 if test $cf_fix_cppflags = yes ; 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"
9784 elif test "${cf_tst_cflags}" = "\"'" ; then
9786 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9787 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9797 case $cf_add_cflags in
9799 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9801 CPPFLAGS=`echo "$CPPFLAGS" | \
9802 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9803 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9808 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9809 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9816 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9817 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9827 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9830 && test -z "${cf_tst_cflags}" \
9831 && cf_fix_cppflags=no
9836 if test -n "$cf_new_cflags" ; then
9838 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9839 CFLAGS="${CFLAGS}$cf_new_cflags"
9843 if test -n "$cf_new_cppflags" ; then
9845 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9846 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9850 if test -n "$cf_new_extra_cppflags" ; then
9852 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9853 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9860 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9862 for cf_add_1lib in $cf_add_0lib; do
9863 for cf_add_2lib in $cf_add_libs; do
9864 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9869 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9873 # even with config script, some packages use no-override for curses.h
9875 echo "$as_me:9875: checking if we have identified curses headers" >&5
9876 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9877 if test "${cf_cv_ncurses_header+set}" = set; then
9878 echo $ECHO_N "(cached) $ECHO_C" >&6
9881 cf_cv_ncurses_header=none
9883 ncurses.h $cf_cv_screen/ncurses.h \
9884 curses.h $cf_cv_screen/curses.h
9886 cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <${cf_header}>
9893 initscr(); tgoto("?", 0,0)
9898 rm -f conftest.$ac_objext
9899 if { (eval echo "$as_me:9899: \"$ac_compile\"") >&5
9900 (eval $ac_compile) 2>&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); } &&
9904 { ac_try='test -s conftest.$ac_objext'
9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
9908 echo "$as_me:9908: \$? = $ac_status" >&5
9909 (exit $ac_status); }; }; then
9910 cf_cv_ncurses_header=$cf_header; break
9912 echo "$as_me: failed program was:" >&5
9913 cat conftest.$ac_ext >&5
9915 rm -f conftest.$ac_objext conftest.$ac_ext
9919 echo "$as_me:9919: result: $cf_cv_ncurses_header" >&5
9920 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9922 if test "$cf_cv_ncurses_header" = none ; then
9923 { { echo "$as_me:9923: error: No curses header-files found" >&5
9924 echo "$as_me: error: No curses header-files found" >&2;}
9925 { (exit 1); exit 1; }; }
9928 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9930 for ac_header in $cf_cv_ncurses_header
9932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9933 echo "$as_me:9933: checking for $ac_header" >&5
9934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9936 echo $ECHO_N "(cached) $ECHO_C" >&6
9938 cat >conftest.$ac_ext <<_ACEOF
9939 #line 9939 "configure"
9940 #include "confdefs.h"
9941 #include <$ac_header>
9943 if { (eval echo "$as_me:9943: \"$ac_cpp conftest.$ac_ext\"") >&5
9944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9946 egrep -v '^ *\+' conftest.er1 >conftest.err
9948 cat conftest.err >&5
9949 echo "$as_me:9949: \$? = $ac_status" >&5
9950 (exit $ac_status); } >/dev/null; then
9951 if test -s conftest.err; then
9952 ac_cpp_err=$ac_c_preproc_warn_flag
9959 if test -z "$ac_cpp_err"; then
9960 eval "$as_ac_Header=yes"
9962 echo "$as_me: failed program was:" >&5
9963 cat conftest.$ac_ext >&5
9964 eval "$as_ac_Header=no"
9966 rm -f conftest.err conftest.$ac_ext
9968 echo "$as_me:9968: result: `eval echo '${'$as_ac_Header'}'`" >&5
9969 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9970 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9971 cat >>confdefs.h <<EOF
9972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9978 cat >>confdefs.h <<\EOF
9982 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9984 cat >>confdefs.h <<EOF
9985 #define $cf_nculib_ROOT 1
9988 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9992 cf_ncuhdr_root=$cf_cv_screen
9994 test -n "$cf_cv_curses_dir" && \
9995 test "$cf_cv_curses_dir" != "no" && { \
9997 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9998 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10000 while test $cf_add_incdir != /usr/include
10002 if test -d $cf_add_incdir
10005 if test -n "$CFLAGS$CPPFLAGS" ; then
10006 # a loop is needed to ensure we can add subdirs of existing dirs
10007 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10008 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10009 cf_have_incdir=yes; break
10014 if test "$cf_have_incdir" = no ; then
10015 if test "$cf_add_incdir" = /usr/local/include ; then
10016 if test "$GCC" = yes
10018 cf_save_CPPFLAGS=$CPPFLAGS
10020 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10021 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10023 cat >conftest.$ac_ext <<_ACEOF
10024 #line 10024 "configure"
10025 #include "confdefs.h"
10035 rm -f conftest.$ac_objext
10036 if { (eval echo "$as_me:10036: \"$ac_compile\"") >&5
10037 (eval $ac_compile) 2>&5
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit $ac_status); } &&
10041 { ac_try='test -s conftest.$ac_objext'
10042 { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043 (eval $ac_try) 2>&5
10045 echo "$as_me:10045: \$? = $ac_status" >&5
10046 (exit $ac_status); }; }; then
10049 echo "$as_me: failed program was:" >&5
10050 cat conftest.$ac_ext >&5
10053 rm -f conftest.$ac_objext conftest.$ac_ext
10054 CPPFLAGS=$cf_save_CPPFLAGS
10059 if test "$cf_have_incdir" = no ; then
10060 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10062 echo "${as_me:-configure}:10062: testing adding $cf_add_incdir to include-path ..." 1>&5
10064 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10066 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10067 test "$cf_top_incdir" = "$cf_add_incdir" && break
10068 cf_add_incdir="$cf_top_incdir"
10081 echo "$as_me:10081: checking for $cf_ncuhdr_root header in include-path" >&5
10082 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10083 if test "${cf_cv_ncurses_h+set}" = set; then
10084 echo $ECHO_N "(cached) $ECHO_C" >&6
10087 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10088 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10089 for cf_header in $cf_header_list
10092 cat >conftest.$ac_ext <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10096 #include <$cf_header>
10101 #ifdef NCURSES_VERSION
10103 printf("%s\n", NCURSES_VERSION);
10116 rm -f conftest.$ac_objext
10117 if { (eval echo "$as_me:10117: \"$ac_compile\"") >&5
10118 (eval $ac_compile) 2>&5
10120 echo "$as_me:10120: \$? = $ac_status" >&5
10121 (exit $ac_status); } &&
10122 { ac_try='test -s conftest.$ac_objext'
10123 { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124 (eval $ac_try) 2>&5
10126 echo "$as_me:10126: \$? = $ac_status" >&5
10127 (exit $ac_status); }; }; then
10128 cf_cv_ncurses_h=$cf_header
10131 echo "$as_me: failed program was:" >&5
10132 cat conftest.$ac_ext >&5
10135 rm -f conftest.$ac_objext conftest.$ac_ext
10137 test "$cf_cv_ncurses_h" != no && break
10141 echo "$as_me:10141: result: $cf_cv_ncurses_h" >&5
10142 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10144 if test "$cf_cv_ncurses_h" != no ; then
10145 cf_cv_ncurses_header=$cf_cv_ncurses_h
10148 echo "$as_me:10148: checking for $cf_ncuhdr_root include-path" >&5
10149 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10150 if test "${cf_cv_ncurses_h2+set}" = set; then
10151 echo $ECHO_N "(cached) $ECHO_C" >&6
10154 test -n "$verbose" && echo
10158 # collect the current set of include-directories from compiler flags
10159 cf_header_path_list=""
10160 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10161 for cf_header_path in $CPPFLAGS $CFLAGS
10163 case $cf_header_path in
10165 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10167 test "x$cf_header_path" != "xNONE" && \
10168 test -d "$cf_header_path" && \
10170 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10171 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10172 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10173 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10174 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10175 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"
10178 cf_header_path_list="$cf_header_path_list $cf_search"
10184 # add the variations for the package we are looking for
10188 test "x$prefix" != "xNONE" && \
10189 test -d "$prefix" && \
10191 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10192 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10193 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10194 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10195 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10196 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10199 for cf_subdir_prefix in \
10208 test "x$cf_subdir_prefix" != "x$prefix" && \
10209 test -d "$cf_subdir_prefix" && \
10210 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10211 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10212 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10213 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10214 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10215 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10216 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"
10221 test "$includedir" != NONE && \
10222 test "$includedir" != "/usr/include" && \
10223 test -d "$includedir" && {
10224 test -d $includedir && cf_search="$cf_search $includedir"
10225 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10228 test "$oldincludedir" != NONE && \
10229 test "$oldincludedir" != "/usr/include" && \
10230 test -d "$oldincludedir" && {
10231 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10232 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10235 cf_search="$cf_search $cf_header_path_list"
10237 test -n "$verbose" && echo search path $cf_search
10238 cf_save2_CPPFLAGS="$CPPFLAGS"
10239 for cf_incdir in $cf_search
10242 if test -n "$cf_incdir" ; then
10243 for cf_add_incdir in $cf_incdir
10245 while test $cf_add_incdir != /usr/include
10247 if test -d $cf_add_incdir
10250 if test -n "$CFLAGS$CPPFLAGS" ; then
10251 # a loop is needed to ensure we can add subdirs of existing dirs
10252 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10253 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10254 cf_have_incdir=yes; break
10259 if test "$cf_have_incdir" = no ; then
10260 if test "$cf_add_incdir" = /usr/local/include ; then
10261 if test "$GCC" = yes
10263 cf_save_CPPFLAGS=$CPPFLAGS
10265 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10266 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10268 cat >conftest.$ac_ext <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10280 rm -f conftest.$ac_objext
10281 if { (eval echo "$as_me:10281: \"$ac_compile\"") >&5
10282 (eval $ac_compile) 2>&5
10284 echo "$as_me:10284: \$? = $ac_status" >&5
10285 (exit $ac_status); } &&
10286 { ac_try='test -s conftest.$ac_objext'
10287 { (eval echo "$as_me:10287: \"$ac_try\"") >&5
10288 (eval $ac_try) 2>&5
10290 echo "$as_me:10290: \$? = $ac_status" >&5
10291 (exit $ac_status); }; }; then
10294 echo "$as_me: failed program was:" >&5
10295 cat conftest.$ac_ext >&5
10298 rm -f conftest.$ac_objext conftest.$ac_ext
10299 CPPFLAGS=$cf_save_CPPFLAGS
10304 if test "$cf_have_incdir" = no ; then
10305 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10307 echo "${as_me:-configure}:10307: testing adding $cf_add_incdir to include-path ..." 1>&5
10309 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10311 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10312 test "$cf_top_incdir" = "$cf_add_incdir" && break
10313 cf_add_incdir="$cf_top_incdir"
10329 cat >conftest.$ac_ext <<_ACEOF
10330 #line 10330 "configure"
10331 #include "confdefs.h"
10333 #include <$cf_header>
10338 #ifdef NCURSES_VERSION
10340 printf("%s\n", NCURSES_VERSION);
10353 rm -f conftest.$ac_objext
10354 if { (eval echo "$as_me:10354: \"$ac_compile\"") >&5
10355 (eval $ac_compile) 2>&5
10357 echo "$as_me:10357: \$? = $ac_status" >&5
10358 (exit $ac_status); } &&
10359 { ac_try='test -s conftest.$ac_objext'
10360 { (eval echo "$as_me:10360: \"$ac_try\"") >&5
10361 (eval $ac_try) 2>&5
10363 echo "$as_me:10363: \$? = $ac_status" >&5
10364 (exit $ac_status); }; }; then
10365 cf_cv_ncurses_h2=$cf_header
10368 echo "$as_me: failed program was:" >&5
10369 cat conftest.$ac_ext >&5
10370 cf_cv_ncurses_h2=no
10372 rm -f conftest.$ac_objext conftest.$ac_ext
10374 if test "$cf_cv_ncurses_h2" != no ; then
10375 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10376 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10379 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10381 CPPFLAGS="$cf_save2_CPPFLAGS"
10382 test "$cf_cv_ncurses_h2" != no && break
10384 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10384: error: not found" >&5
10385 echo "$as_me: error: not found" >&2;}
10386 { (exit 1); exit 1; }; }
10389 echo "$as_me:10389: result: $cf_cv_ncurses_h2" >&5
10390 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10392 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10393 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10394 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10395 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10398 if test -n "$cf_1st_incdir" ; then
10399 for cf_add_incdir in $cf_1st_incdir
10401 while test $cf_add_incdir != /usr/include
10403 if test -d $cf_add_incdir
10406 if test -n "$CFLAGS$CPPFLAGS" ; then
10407 # a loop is needed to ensure we can add subdirs of existing dirs
10408 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10409 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10410 cf_have_incdir=yes; break
10415 if test "$cf_have_incdir" = no ; then
10416 if test "$cf_add_incdir" = /usr/local/include ; then
10417 if test "$GCC" = yes
10419 cf_save_CPPFLAGS=$CPPFLAGS
10421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10422 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10424 cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10436 rm -f conftest.$ac_objext
10437 if { (eval echo "$as_me:10437: \"$ac_compile\"") >&5
10438 (eval $ac_compile) 2>&5
10440 echo "$as_me:10440: \$? = $ac_status" >&5
10441 (exit $ac_status); } &&
10442 { ac_try='test -s conftest.$ac_objext'
10443 { (eval echo "$as_me:10443: \"$ac_try\"") >&5
10444 (eval $ac_try) 2>&5
10446 echo "$as_me:10446: \$? = $ac_status" >&5
10447 (exit $ac_status); }; }; then
10450 echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10454 rm -f conftest.$ac_objext conftest.$ac_ext
10455 CPPFLAGS=$cf_save_CPPFLAGS
10460 if test "$cf_have_incdir" = no ; then
10461 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10463 echo "${as_me:-configure}:10463: testing adding $cf_add_incdir to include-path ..." 1>&5
10465 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10467 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10468 test "$cf_top_incdir" = "$cf_add_incdir" && break
10469 cf_add_incdir="$cf_top_incdir"
10482 # Set definitions to allow ifdef'ing for ncurses.h
10484 case $cf_cv_ncurses_header in
10487 cat >>confdefs.h <<\EOF
10488 #define HAVE_NCURSES_H 1
10494 case $cf_cv_ncurses_header in
10495 (ncurses/curses.h|ncurses/ncurses.h)
10497 cat >>confdefs.h <<\EOF
10498 #define HAVE_NCURSES_NCURSES_H 1
10502 (ncursesw/curses.h|ncursesw/ncurses.h)
10504 cat >>confdefs.h <<\EOF
10505 #define HAVE_NCURSESW_NCURSES_H 1
10511 echo "$as_me:10511: checking for terminfo header" >&5
10512 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10513 if test "${cf_cv_term_header+set}" = set; then
10514 echo $ECHO_N "(cached) $ECHO_C" >&6
10517 case ${cf_cv_ncurses_header} in
10518 (*/ncurses.h|*/ncursesw.h)
10519 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10522 cf_term_header=term.h
10526 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10528 cat >conftest.$ac_ext <<_ACEOF
10529 #line 10529 "configure"
10530 #include "confdefs.h"
10532 #include <${cf_cv_ncurses_header:-curses.h}>
10533 #include <$cf_test>
10538 int x = auto_left_margin
10543 rm -f conftest.$ac_objext
10544 if { (eval echo "$as_me:10544: \"$ac_compile\"") >&5
10545 (eval $ac_compile) 2>&5
10547 echo "$as_me:10547: \$? = $ac_status" >&5
10548 (exit $ac_status); } &&
10549 { ac_try='test -s conftest.$ac_objext'
10550 { (eval echo "$as_me:10550: \"$ac_try\"") >&5
10551 (eval $ac_try) 2>&5
10553 echo "$as_me:10553: \$? = $ac_status" >&5
10554 (exit $ac_status); }; }; then
10556 cf_cv_term_header="$cf_test"
10558 echo "$as_me: failed program was:" >&5
10559 cat conftest.$ac_ext >&5
10561 cf_cv_term_header=unknown
10564 rm -f conftest.$ac_objext conftest.$ac_ext
10565 test "$cf_cv_term_header" != unknown && break
10569 echo "$as_me:10569: result: $cf_cv_term_header" >&5
10570 echo "${ECHO_T}$cf_cv_term_header" >&6
10572 # Set definitions to allow ifdef'ing to accommodate subdirectories
10574 case $cf_cv_term_header in
10577 cat >>confdefs.h <<\EOF
10578 #define HAVE_TERM_H 1
10584 case $cf_cv_term_header in
10587 cat >>confdefs.h <<\EOF
10588 #define HAVE_NCURSES_TERM_H 1
10594 cat >>confdefs.h <<\EOF
10595 #define HAVE_NCURSESW_TERM_H 1
10601 # some applications need this, but should check for NCURSES_VERSION
10603 cat >>confdefs.h <<\EOF
10607 echo "$as_me:10607: checking for ncurses version" >&5
10608 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10609 if test "${cf_cv_ncurses_version+set}" = set; then
10610 echo $ECHO_N "(cached) $ECHO_C" >&6
10613 cf_cv_ncurses_version=no
10616 if test "$cross_compiling" = yes; then
10618 # This will not work if the preprocessor splits the line after the
10619 # Autoconf token. The 'unproto' program does that.
10620 cat > conftest.$ac_ext <<EOF
10621 #include <${cf_cv_ncurses_header:-curses.h}>
10623 #ifdef NCURSES_VERSION
10624 Autoconf NCURSES_VERSION
10632 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10633 { (eval echo "$as_me:10633: \"$cf_try\"") >&5
10634 (eval $cf_try) 2>&5
10636 echo "$as_me:10636: \$? = $ac_status" >&5
10637 (exit $ac_status); }
10638 if test -f conftest.out ; then
10639 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10640 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10645 cat >conftest.$ac_ext <<_ACEOF
10646 #line 10646 "configure"
10647 #include "confdefs.h"
10649 #include <${cf_cv_ncurses_header:-curses.h}>
10653 FILE *fp = fopen("$cf_tempfile", "w");
10654 #ifdef NCURSES_VERSION
10655 # ifdef NCURSES_VERSION_PATCH
10656 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10658 fprintf(fp, "%s\n", NCURSES_VERSION);
10661 # ifdef __NCURSES_H
10662 fprintf(fp, "old\n");
10667 ${cf_cv_main_return:-return}(0);
10670 rm -f conftest$ac_exeext
10671 if { (eval echo "$as_me:10671: \"$ac_link\"") >&5
10672 (eval $ac_link) 2>&5
10674 echo "$as_me:10674: \$? = $ac_status" >&5
10675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10676 { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10679 echo "$as_me:10679: \$? = $ac_status" >&5
10680 (exit $ac_status); }; }; then
10682 cf_cv_ncurses_version=`cat $cf_tempfile`
10684 echo "$as_me: program exited with status $ac_status" >&5
10685 echo "$as_me: failed program was:" >&5
10686 cat conftest.$ac_ext >&5
10688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10693 echo "$as_me:10693: result: $cf_cv_ncurses_version" >&5
10694 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10695 test "$cf_cv_ncurses_version" = no ||
10696 cat >>confdefs.h <<\EOF
10700 cf_nculib_root=$cf_cv_screen
10701 # This works, except for the special case where we find gpm, but
10702 # ncurses is in a nonstandard location via $LIBS, and we really want
10705 cf_ncurses_SAVE="$LIBS"
10706 echo "$as_me:10706: checking for Gpm_Open in -lgpm" >&5
10707 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10708 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10709 echo $ECHO_N "(cached) $ECHO_C" >&6
10711 ac_check_lib_save_LIBS=$LIBS
10713 cat >conftest.$ac_ext <<_ACEOF
10714 #line 10714 "configure"
10715 #include "confdefs.h"
10717 /* Override any gcc2 internal prototype to avoid an error. */
10721 /* We use char because int might match the return type of a gcc2
10722 builtin and then its argument prototype would still apply. */
10732 rm -f conftest.$ac_objext conftest$ac_exeext
10733 if { (eval echo "$as_me:10733: \"$ac_link\"") >&5
10734 (eval $ac_link) 2>&5
10736 echo "$as_me:10736: \$? = $ac_status" >&5
10737 (exit $ac_status); } &&
10738 { ac_try='test -s conftest$ac_exeext'
10739 { (eval echo "$as_me:10739: \"$ac_try\"") >&5
10740 (eval $ac_try) 2>&5
10742 echo "$as_me:10742: \$? = $ac_status" >&5
10743 (exit $ac_status); }; }; then
10744 ac_cv_lib_gpm_Gpm_Open=yes
10746 echo "$as_me: failed program was:" >&5
10747 cat conftest.$ac_ext >&5
10748 ac_cv_lib_gpm_Gpm_Open=no
10750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10751 LIBS=$ac_check_lib_save_LIBS
10753 echo "$as_me:10753: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10754 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10755 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10756 echo "$as_me:10756: checking for initscr in -lgpm" >&5
10757 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10758 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10759 echo $ECHO_N "(cached) $ECHO_C" >&6
10761 ac_check_lib_save_LIBS=$LIBS
10763 cat >conftest.$ac_ext <<_ACEOF
10764 #line 10764 "configure"
10765 #include "confdefs.h"
10767 /* Override any gcc2 internal prototype to avoid an error. */
10771 /* We use char because int might match the return type of a gcc2
10772 builtin and then its argument prototype would still apply. */
10782 rm -f conftest.$ac_objext conftest$ac_exeext
10783 if { (eval echo "$as_me:10783: \"$ac_link\"") >&5
10784 (eval $ac_link) 2>&5
10786 echo "$as_me:10786: \$? = $ac_status" >&5
10787 (exit $ac_status); } &&
10788 { ac_try='test -s conftest$ac_exeext'
10789 { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790 (eval $ac_try) 2>&5
10792 echo "$as_me:10792: \$? = $ac_status" >&5
10793 (exit $ac_status); }; }; then
10794 ac_cv_lib_gpm_initscr=yes
10796 echo "$as_me: failed program was:" >&5
10797 cat conftest.$ac_ext >&5
10798 ac_cv_lib_gpm_initscr=no
10800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10801 LIBS=$ac_check_lib_save_LIBS
10803 echo "$as_me:10803: result: $ac_cv_lib_gpm_initscr" >&5
10804 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10805 if test $ac_cv_lib_gpm_initscr = yes; then
10806 LIBS="$cf_ncurses_SAVE"
10808 cf_ncurses_LIBS="-lgpm"
10815 # This is only necessary if you are linking against an obsolete
10816 # version of ncurses (but it should do no harm, since it's static).
10817 if test "$cf_nculib_root" = ncurses ; then
10818 echo "$as_me:10818: checking for tgoto in -lmytinfo" >&5
10819 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10820 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10821 echo $ECHO_N "(cached) $ECHO_C" >&6
10823 ac_check_lib_save_LIBS=$LIBS
10824 LIBS="-lmytinfo $LIBS"
10825 cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10829 /* Override any gcc2 internal prototype to avoid an error. */
10833 /* We use char because int might match the return type of a gcc2
10834 builtin and then its argument prototype would still apply. */
10844 rm -f conftest.$ac_objext conftest$ac_exeext
10845 if { (eval echo "$as_me:10845: \"$ac_link\"") >&5
10846 (eval $ac_link) 2>&5
10848 echo "$as_me:10848: \$? = $ac_status" >&5
10849 (exit $ac_status); } &&
10850 { ac_try='test -s conftest$ac_exeext'
10851 { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10854 echo "$as_me:10854: \$? = $ac_status" >&5
10855 (exit $ac_status); }; }; then
10856 ac_cv_lib_mytinfo_tgoto=yes
10858 echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 ac_cv_lib_mytinfo_tgoto=no
10862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10863 LIBS=$ac_check_lib_save_LIBS
10865 echo "$as_me:10865: result: $ac_cv_lib_mytinfo_tgoto" >&5
10866 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10867 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10868 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10875 cf_add_libs="$LIBS"
10878 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10879 # filter duplicates
10880 for cf_add_1lib in $cf_add_0lib; do
10881 for cf_add_2lib in $cf_add_libs; do
10882 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10887 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10889 LIBS="$cf_add_libs"
10891 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10894 cf_add_libs="$LIBS"
10897 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10898 # filter duplicates
10899 for cf_add_1lib in $cf_add_0lib; do
10900 for cf_add_2lib in $cf_add_libs; do
10901 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10906 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10908 LIBS="$cf_add_libs"
10912 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10914 echo "$as_me:10914: checking for initscr" >&5
10915 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10916 if test "${ac_cv_func_initscr+set}" = set; then
10917 echo $ECHO_N "(cached) $ECHO_C" >&6
10919 cat >conftest.$ac_ext <<_ACEOF
10920 #line 10920 "configure"
10921 #include "confdefs.h"
10922 #define initscr autoconf_temporary
10923 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10930 /* We use char because int might match the return type of a gcc2
10931 builtin and then its argument prototype would still apply. */
10932 char initscr (void);
10938 /* The GNU C library defines stubs for functions which it implements
10939 to always fail with ENOSYS. Some functions are actually named
10940 something starting with __ and the normal name is an alias. */
10941 #if defined (__stub_initscr) || defined (__stub___initscr)
10942 #error found stub for initscr
10950 rm -f conftest.$ac_objext conftest$ac_exeext
10951 if { (eval echo "$as_me:10951: \"$ac_link\"") >&5
10952 (eval $ac_link) 2>&5
10954 echo "$as_me:10954: \$? = $ac_status" >&5
10955 (exit $ac_status); } &&
10956 { ac_try='test -s conftest$ac_exeext'
10957 { (eval echo "$as_me:10957: \"$ac_try\"") >&5
10958 (eval $ac_try) 2>&5
10960 echo "$as_me:10960: \$? = $ac_status" >&5
10961 (exit $ac_status); }; }; then
10962 ac_cv_func_initscr=yes
10964 echo "$as_me: failed program was:" >&5
10965 cat conftest.$ac_ext >&5
10966 ac_cv_func_initscr=no
10968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10970 echo "$as_me:10970: result: $ac_cv_func_initscr" >&5
10971 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10972 if test $ac_cv_func_initscr = yes; then
10973 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10976 cf_save_LIBS="$LIBS"
10977 echo "$as_me:10977: checking for initscr in -l$cf_nculib_root" >&5
10978 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10979 LIBS="-l$cf_nculib_root $LIBS"
10980 cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983 #include <${cf_cv_ncurses_header:-curses.h}>
10992 rm -f conftest.$ac_objext conftest$ac_exeext
10993 if { (eval echo "$as_me:10993: \"$ac_link\"") >&5
10994 (eval $ac_link) 2>&5
10996 echo "$as_me:10996: \$? = $ac_status" >&5
10997 (exit $ac_status); } &&
10998 { ac_try='test -s conftest$ac_exeext'
10999 { (eval echo "$as_me:10999: \"$ac_try\"") >&5
11000 (eval $ac_try) 2>&5
11002 echo "$as_me:11002: \$? = $ac_status" >&5
11003 (exit $ac_status); }; }; then
11004 echo "$as_me:11004: result: yes" >&5
11005 echo "${ECHO_T}yes" >&6
11006 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11009 echo "$as_me: failed program was:" >&5
11010 cat conftest.$ac_ext >&5
11011 echo "$as_me:11011: result: no" >&5
11012 echo "${ECHO_T}no" >&6
11015 cf_library_path_list=""
11016 if test -n "${LDFLAGS}${LIBS}" ; then
11017 for cf_library_path in $LDFLAGS $LIBS
11019 case $cf_library_path in
11021 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11023 test "x$cf_library_path" != "xNONE" && \
11024 test -d "$cf_library_path" && \
11026 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11027 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
11028 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11029 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11030 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11031 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"
11034 cf_library_path_list="$cf_library_path_list $cf_search"
11042 test "x$prefix" != "xNONE" && \
11043 test -d "$prefix" && \
11045 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11046 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
11047 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11048 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11049 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11050 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11053 for cf_subdir_prefix in \
11062 test "x$cf_subdir_prefix" != "x$prefix" && \
11063 test -d "$cf_subdir_prefix" && \
11064 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11065 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11066 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
11067 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11068 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11069 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11070 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"
11075 cf_search="$cf_library_path_list $cf_search"
11077 for cf_libdir in $cf_search
11079 echo "$as_me:11079: checking for -l$cf_nculib_root in $cf_libdir" >&5
11080 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11081 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11082 cat >conftest.$ac_ext <<_ACEOF
11083 #line 11083 "configure"
11084 #include "confdefs.h"
11085 #include <${cf_cv_ncurses_header:-curses.h}>
11094 rm -f conftest.$ac_objext conftest$ac_exeext
11095 if { (eval echo "$as_me:11095: \"$ac_link\"") >&5
11096 (eval $ac_link) 2>&5
11098 echo "$as_me:11098: \$? = $ac_status" >&5
11099 (exit $ac_status); } &&
11100 { ac_try='test -s conftest$ac_exeext'
11101 { (eval echo "$as_me:11101: \"$ac_try\"") >&5
11102 (eval $ac_try) 2>&5
11104 echo "$as_me:11104: \$? = $ac_status" >&5
11105 (exit $ac_status); }; }; then
11106 echo "$as_me:11106: result: yes" >&5
11107 echo "${ECHO_T}yes" >&6
11108 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11111 echo "$as_me: failed program was:" >&5
11112 cat conftest.$ac_ext >&5
11113 echo "$as_me:11113: result: no" >&5
11114 echo "${ECHO_T}no" >&6
11115 LIBS="$cf_save_LIBS"
11117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11125 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11127 if test $cf_found_library = no ; then
11128 { { echo "$as_me:11128: error: Cannot link $cf_nculib_root library" >&5
11129 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11130 { (exit 1); exit 1; }; }
11135 if test -n "$cf_ncurses_LIBS" ; then
11136 echo "$as_me:11136: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11137 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11138 cf_ncurses_SAVE="$LIBS"
11139 for p in $cf_ncurses_LIBS ; do
11140 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11141 if test "$q" != "$LIBS" ; then
11145 cat >conftest.$ac_ext <<_ACEOF
11146 #line 11146 "configure"
11147 #include "confdefs.h"
11148 #include <${cf_cv_ncurses_header:-curses.h}>
11152 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11157 rm -f conftest.$ac_objext conftest$ac_exeext
11158 if { (eval echo "$as_me:11158: \"$ac_link\"") >&5
11159 (eval $ac_link) 2>&5
11161 echo "$as_me:11161: \$? = $ac_status" >&5
11162 (exit $ac_status); } &&
11163 { ac_try='test -s conftest$ac_exeext'
11164 { (eval echo "$as_me:11164: \"$ac_try\"") >&5
11165 (eval $ac_try) 2>&5
11167 echo "$as_me:11167: \$? = $ac_status" >&5
11168 (exit $ac_status); }; }; then
11169 echo "$as_me:11169: result: yes" >&5
11170 echo "${ECHO_T}yes" >&6
11172 echo "$as_me: failed program was:" >&5
11173 cat conftest.$ac_ext >&5
11174 echo "$as_me:11174: result: no" >&5
11175 echo "${ECHO_T}no" >&6
11176 LIBS="$cf_ncurses_SAVE"
11178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11181 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11183 cat >>confdefs.h <<EOF
11184 #define $cf_nculib_ROOT 1
11189 NCURSES_CONFIG=none
11194 echo "$as_me:11194: checking for X" >&5
11195 echo $ECHO_N "checking for X... $ECHO_C" >&6
11197 # Check whether --with-x or --without-x was given.
11198 if test "${with_x+set}" = set; then
11202 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11203 if test "x$with_x" = xno; then
11204 # The user explicitly disabled X.
11207 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11208 # Both variables are already set.
11211 if test "${ac_cv_have_x+set}" = set; then
11212 echo $ECHO_N "(cached) $ECHO_C" >&6
11214 # One or both of the vars are not set, and there is no cached value.
11215 ac_x_includes=no ac_x_libraries=no
11216 rm -fr conftest.dir
11217 if mkdir conftest.dir; then
11219 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11220 cat >Imakefile <<'EOF'
11222 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11224 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11225 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11226 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11227 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11228 for ac_extension in a so sl dylib dll; do
11229 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11230 test -f $ac_im_libdir/libX11.$ac_extension; then
11231 ac_im_usrlibdir=$ac_im_libdir; break
11234 # Screen out bogus values from the imake configuration. They are
11235 # bogus both because they are the default anyway, and because
11236 # using them would break gcc on systems where it needs fixed includes.
11237 case $ac_im_incroot in
11239 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11241 case $ac_im_usrlibdir in
11242 /usr/lib | /lib) ;;
11243 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11247 rm -fr conftest.dir
11250 # Standard set of common directories for X headers.
11251 # Check X11 before X11Rn because it is often a symlink to the current release.
11268 /usr/local/X11/include
11269 /usr/local/X11R7/include
11270 /usr/local/X11R6/include
11271 /usr/local/X11R5/include
11272 /usr/local/X11R4/include
11274 /usr/local/include/X11
11275 /usr/local/include/X11R7
11276 /usr/local/include/X11R6
11277 /usr/local/include/X11R5
11278 /usr/local/include/X11R4
11282 /usr/XFree86/include/X11
11286 /usr/unsupported/include
11287 /usr/athena/include
11288 /usr/local/x11r5/include
11289 /usr/lpp/Xamples/include
11291 /usr/openwin/include
11292 /usr/openwin/share/include'
11294 if test "$ac_x_includes" = no; then
11295 # Guess where to find include files, by looking for Intrinsic.h.
11296 # First, try using that file with no special directory specified.
11297 cat >conftest.$ac_ext <<_ACEOF
11298 #line 11298 "configure"
11299 #include "confdefs.h"
11300 #include <X11/Intrinsic.h>
11302 if { (eval echo "$as_me:11302: \"$ac_cpp conftest.$ac_ext\"") >&5
11303 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11305 egrep -v '^ *\+' conftest.er1 >conftest.err
11307 cat conftest.err >&5
11308 echo "$as_me:11308: \$? = $ac_status" >&5
11309 (exit $ac_status); } >/dev/null; then
11310 if test -s conftest.err; then
11311 ac_cpp_err=$ac_c_preproc_warn_flag
11318 if test -z "$ac_cpp_err"; then
11319 # We can compile using X headers with no special include directory.
11322 echo "$as_me: failed program was:" >&5
11323 cat conftest.$ac_ext >&5
11324 for ac_dir in $ac_x_header_dirs; do
11325 if test -r "$ac_dir/X11/Intrinsic.h"; then
11326 ac_x_includes=$ac_dir
11331 rm -f conftest.err conftest.$ac_ext
11332 fi # $ac_x_includes = no
11334 if test "$ac_x_libraries" = no; then
11335 # Check for the libraries.
11336 # See if we find them without any special options.
11337 # Don't add to $LIBS permanently.
11340 cat >conftest.$ac_ext <<_ACEOF
11341 #line 11341 "configure"
11342 #include "confdefs.h"
11343 #include <X11/Intrinsic.h>
11352 rm -f conftest.$ac_objext conftest$ac_exeext
11353 if { (eval echo "$as_me:11353: \"$ac_link\"") >&5
11354 (eval $ac_link) 2>&5
11356 echo "$as_me:11356: \$? = $ac_status" >&5
11357 (exit $ac_status); } &&
11358 { ac_try='test -s conftest$ac_exeext'
11359 { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360 (eval $ac_try) 2>&5
11362 echo "$as_me:11362: \$? = $ac_status" >&5
11363 (exit $ac_status); }; }; then
11365 # We can link X programs with no special library path.
11368 echo "$as_me: failed program was:" >&5
11369 cat conftest.$ac_ext >&5
11371 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11373 # Don't even attempt the hair of trying to link an X program!
11374 for ac_extension in a so sl dylib dll; do
11375 if test -r $ac_dir/libXt.$ac_extension; then
11376 ac_x_libraries=$ac_dir
11382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11383 fi # $ac_x_libraries = no
11385 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11386 # Didn't find X anywhere. Cache the known absence of X.
11387 ac_cv_have_x="have_x=no"
11389 # Record where we found X for the cache.
11390 ac_cv_have_x="have_x=yes \
11391 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11396 eval "$ac_cv_have_x"
11399 if test "$have_x" != yes; then
11400 echo "$as_me:11400: result: $have_x" >&5
11401 echo "${ECHO_T}$have_x" >&6
11404 # If each of the values was on the command line, it overrides each guess.
11405 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11406 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11407 # Update the cache value to reflect the command line values.
11408 ac_cv_have_x="have_x=yes \
11409 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11410 echo "$as_me:11410: result: libraries $x_libraries, headers $x_includes" >&5
11411 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11414 if test "$no_x" = yes; then
11415 # Not all programs may use this symbol, but it does not hurt to define it.
11417 cat >>confdefs.h <<\EOF
11418 #define X_DISPLAY_MISSING 1
11421 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11423 if test -n "$x_includes"; then
11424 X_CFLAGS="$X_CFLAGS -I$x_includes"
11427 # It would also be nice to do this for all -L options, not just this one.
11428 if test -n "$x_libraries"; then
11429 X_LIBS="$X_LIBS -L$x_libraries"
11430 # For Solaris; some versions of Sun CC require a space after -R and
11431 # others require no space. Words are not sufficient . . . .
11432 case `(uname -sr) 2>/dev/null` in
11434 echo "$as_me:11434: checking whether -R must be followed by a space" >&5
11435 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11436 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11437 cat >conftest.$ac_ext <<_ACEOF
11438 #line 11438 "configure"
11439 #include "confdefs.h"
11449 rm -f conftest.$ac_objext conftest$ac_exeext
11450 if { (eval echo "$as_me:11450: \"$ac_link\"") >&5
11451 (eval $ac_link) 2>&5
11453 echo "$as_me:11453: \$? = $ac_status" >&5
11454 (exit $ac_status); } &&
11455 { ac_try='test -s conftest$ac_exeext'
11456 { (eval echo "$as_me:11456: \"$ac_try\"") >&5
11457 (eval $ac_try) 2>&5
11459 echo "$as_me:11459: \$? = $ac_status" >&5
11460 (exit $ac_status); }; }; then
11463 echo "$as_me: failed program was:" >&5
11464 cat conftest.$ac_ext >&5
11467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11468 if test $ac_R_nospace = yes; then
11469 echo "$as_me:11469: result: no" >&5
11470 echo "${ECHO_T}no" >&6
11471 X_LIBS="$X_LIBS -R$x_libraries"
11473 LIBS="$ac_xsave_LIBS -R $x_libraries"
11474 cat >conftest.$ac_ext <<_ACEOF
11475 #line 11475 "configure"
11476 #include "confdefs.h"
11486 rm -f conftest.$ac_objext conftest$ac_exeext
11487 if { (eval echo "$as_me:11487: \"$ac_link\"") >&5
11488 (eval $ac_link) 2>&5
11490 echo "$as_me:11490: \$? = $ac_status" >&5
11491 (exit $ac_status); } &&
11492 { ac_try='test -s conftest$ac_exeext'
11493 { (eval echo "$as_me:11493: \"$ac_try\"") >&5
11494 (eval $ac_try) 2>&5
11496 echo "$as_me:11496: \$? = $ac_status" >&5
11497 (exit $ac_status); }; }; then
11500 echo "$as_me: failed program was:" >&5
11501 cat conftest.$ac_ext >&5
11504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11505 if test $ac_R_space = yes; then
11506 echo "$as_me:11506: result: yes" >&5
11507 echo "${ECHO_T}yes" >&6
11508 X_LIBS="$X_LIBS -R $x_libraries"
11510 echo "$as_me:11510: result: neither works" >&5
11511 echo "${ECHO_T}neither works" >&6
11514 LIBS=$ac_xsave_LIBS
11518 # Check for system-dependent libraries X programs must link with.
11519 # Do this before checking for the system-independent R6 libraries
11520 # (-lICE), since we may need -lsocket or whatever for X linking.
11522 if test "$ISC" = yes; then
11523 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11525 # Martyn Johnson says this is needed for Ultrix, if the X
11526 # libraries were built with DECnet support. And Karl Berry says
11527 # the Alpha needs dnet_stub (dnet does not exist).
11528 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11529 cat >conftest.$ac_ext <<_ACEOF
11530 #line 11530 "configure"
11531 #include "confdefs.h"
11533 /* Override any gcc2 internal prototype to avoid an error. */
11537 /* We use char because int might match the return type of a gcc2
11538 builtin and then its argument prototype would still apply. */
11539 char XOpenDisplay ();
11548 rm -f conftest.$ac_objext conftest$ac_exeext
11549 if { (eval echo "$as_me:11549: \"$ac_link\"") >&5
11550 (eval $ac_link) 2>&5
11552 echo "$as_me:11552: \$? = $ac_status" >&5
11553 (exit $ac_status); } &&
11554 { ac_try='test -s conftest$ac_exeext'
11555 { (eval echo "$as_me:11555: \"$ac_try\"") >&5
11556 (eval $ac_try) 2>&5
11558 echo "$as_me:11558: \$? = $ac_status" >&5
11559 (exit $ac_status); }; }; then
11562 echo "$as_me: failed program was:" >&5
11563 cat conftest.$ac_ext >&5
11564 echo "$as_me:11564: checking for dnet_ntoa in -ldnet" >&5
11565 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11566 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11567 echo $ECHO_N "(cached) $ECHO_C" >&6
11569 ac_check_lib_save_LIBS=$LIBS
11570 LIBS="-ldnet $LIBS"
11571 cat >conftest.$ac_ext <<_ACEOF
11572 #line 11572 "configure"
11573 #include "confdefs.h"
11575 /* Override any gcc2 internal prototype to avoid an error. */
11579 /* We use char because int might match the return type of a gcc2
11580 builtin and then its argument prototype would still apply. */
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592 (eval $ac_link) 2>&5
11594 echo "$as_me:11594: \$? = $ac_status" >&5
11595 (exit $ac_status); } &&
11596 { ac_try='test -s conftest$ac_exeext'
11597 { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598 (eval $ac_try) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit $ac_status); }; }; then
11602 ac_cv_lib_dnet_dnet_ntoa=yes
11604 echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 ac_cv_lib_dnet_dnet_ntoa=no
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 LIBS=$ac_check_lib_save_LIBS
11611 echo "$as_me:11611: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11612 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11613 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11614 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11617 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11618 echo "$as_me:11618: checking for dnet_ntoa in -ldnet_stub" >&5
11619 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11620 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11621 echo $ECHO_N "(cached) $ECHO_C" >&6
11623 ac_check_lib_save_LIBS=$LIBS
11624 LIBS="-ldnet_stub $LIBS"
11625 cat >conftest.$ac_ext <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11629 /* Override any gcc2 internal prototype to avoid an error. */
11633 /* We use char because int might match the return type of a gcc2
11634 builtin and then its argument prototype would still apply. */
11644 rm -f conftest.$ac_objext conftest$ac_exeext
11645 if { (eval echo "$as_me:11645: \"$ac_link\"") >&5
11646 (eval $ac_link) 2>&5
11648 echo "$as_me:11648: \$? = $ac_status" >&5
11649 (exit $ac_status); } &&
11650 { ac_try='test -s conftest$ac_exeext'
11651 { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11654 echo "$as_me:11654: \$? = $ac_status" >&5
11655 (exit $ac_status); }; }; then
11656 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11658 echo "$as_me: failed program was:" >&5
11659 cat conftest.$ac_ext >&5
11660 ac_cv_lib_dnet_stub_dnet_ntoa=no
11662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11663 LIBS=$ac_check_lib_save_LIBS
11665 echo "$as_me:11665: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11666 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11667 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11668 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11674 LIBS="$ac_xsave_LIBS"
11676 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11677 # to get the SysV transport functions.
11678 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11680 # The nsl library prevents programs from opening the X display
11681 # on Irix 5.2, according to T.E. Dickey.
11682 # The functions gethostbyname, getservbyname, and inet_addr are
11683 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11684 echo "$as_me:11684: checking for gethostbyname" >&5
11685 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11686 if test "${ac_cv_func_gethostbyname+set}" = set; then
11687 echo $ECHO_N "(cached) $ECHO_C" >&6
11689 cat >conftest.$ac_ext <<_ACEOF
11690 #line 11690 "configure"
11691 #include "confdefs.h"
11692 #define gethostbyname autoconf_temporary
11693 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11694 #undef gethostbyname
11700 /* We use char because int might match the return type of a gcc2
11701 builtin and then its argument prototype would still apply. */
11702 char gethostbyname (void);
11708 /* The GNU C library defines stubs for functions which it implements
11709 to always fail with ENOSYS. Some functions are actually named
11710 something starting with __ and the normal name is an alias. */
11711 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11712 #error found stub for gethostbyname
11715 return gethostbyname ();
11720 rm -f conftest.$ac_objext conftest$ac_exeext
11721 if { (eval echo "$as_me:11721: \"$ac_link\"") >&5
11722 (eval $ac_link) 2>&5
11724 echo "$as_me:11724: \$? = $ac_status" >&5
11725 (exit $ac_status); } &&
11726 { ac_try='test -s conftest$ac_exeext'
11727 { (eval echo "$as_me:11727: \"$ac_try\"") >&5
11728 (eval $ac_try) 2>&5
11730 echo "$as_me:11730: \$? = $ac_status" >&5
11731 (exit $ac_status); }; }; then
11732 ac_cv_func_gethostbyname=yes
11734 echo "$as_me: failed program was:" >&5
11735 cat conftest.$ac_ext >&5
11736 ac_cv_func_gethostbyname=no
11738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11740 echo "$as_me:11740: result: $ac_cv_func_gethostbyname" >&5
11741 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11743 if test $ac_cv_func_gethostbyname = no; then
11744 echo "$as_me:11744: checking for gethostbyname in -lnsl" >&5
11745 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11746 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11747 echo $ECHO_N "(cached) $ECHO_C" >&6
11749 ac_check_lib_save_LIBS=$LIBS
11751 cat >conftest.$ac_ext <<_ACEOF
11752 #line 11752 "configure"
11753 #include "confdefs.h"
11755 /* Override any gcc2 internal prototype to avoid an error. */
11759 /* We use char because int might match the return type of a gcc2
11760 builtin and then its argument prototype would still apply. */
11761 char gethostbyname ();
11770 rm -f conftest.$ac_objext conftest$ac_exeext
11771 if { (eval echo "$as_me:11771: \"$ac_link\"") >&5
11772 (eval $ac_link) 2>&5
11774 echo "$as_me:11774: \$? = $ac_status" >&5
11775 (exit $ac_status); } &&
11776 { ac_try='test -s conftest$ac_exeext'
11777 { (eval echo "$as_me:11777: \"$ac_try\"") >&5
11778 (eval $ac_try) 2>&5
11780 echo "$as_me:11780: \$? = $ac_status" >&5
11781 (exit $ac_status); }; }; then
11782 ac_cv_lib_nsl_gethostbyname=yes
11784 echo "$as_me: failed program was:" >&5
11785 cat conftest.$ac_ext >&5
11786 ac_cv_lib_nsl_gethostbyname=no
11788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11789 LIBS=$ac_check_lib_save_LIBS
11791 echo "$as_me:11791: result: $ac_cv_lib_nsl_gethostbyname" >&5
11792 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11793 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11794 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11797 if test $ac_cv_lib_nsl_gethostbyname = no; then
11798 echo "$as_me:11798: checking for gethostbyname in -lbsd" >&5
11799 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11800 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11801 echo $ECHO_N "(cached) $ECHO_C" >&6
11803 ac_check_lib_save_LIBS=$LIBS
11805 cat >conftest.$ac_ext <<_ACEOF
11806 #line 11806 "configure"
11807 #include "confdefs.h"
11809 /* Override any gcc2 internal prototype to avoid an error. */
11813 /* We use char because int might match the return type of a gcc2
11814 builtin and then its argument prototype would still apply. */
11815 char gethostbyname ();
11824 rm -f conftest.$ac_objext conftest$ac_exeext
11825 if { (eval echo "$as_me:11825: \"$ac_link\"") >&5
11826 (eval $ac_link) 2>&5
11828 echo "$as_me:11828: \$? = $ac_status" >&5
11829 (exit $ac_status); } &&
11830 { ac_try='test -s conftest$ac_exeext'
11831 { (eval echo "$as_me:11831: \"$ac_try\"") >&5
11832 (eval $ac_try) 2>&5
11834 echo "$as_me:11834: \$? = $ac_status" >&5
11835 (exit $ac_status); }; }; then
11836 ac_cv_lib_bsd_gethostbyname=yes
11838 echo "$as_me: failed program was:" >&5
11839 cat conftest.$ac_ext >&5
11840 ac_cv_lib_bsd_gethostbyname=no
11842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11843 LIBS=$ac_check_lib_save_LIBS
11845 echo "$as_me:11845: result: $ac_cv_lib_bsd_gethostbyname" >&5
11846 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11847 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11848 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11854 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11855 # socket/setsockopt and other routines are undefined under SCO ODT
11856 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11857 # on later versions), says Simon Leinen: it contains gethostby*
11858 # variants that don't use the nameserver (or something). -lsocket
11859 # must be given before -lnsl if both are needed. We assume that
11860 # if connect needs -lnsl, so does gethostbyname.
11861 echo "$as_me:11861: checking for connect" >&5
11862 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11863 if test "${ac_cv_func_connect+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6
11866 cat >conftest.$ac_ext <<_ACEOF
11867 #line 11867 "configure"
11868 #include "confdefs.h"
11869 #define connect autoconf_temporary
11870 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11877 /* We use char because int might match the return type of a gcc2
11878 builtin and then its argument prototype would still apply. */
11879 char connect (void);
11885 /* The GNU C library defines stubs for functions which it implements
11886 to always fail with ENOSYS. Some functions are actually named
11887 something starting with __ and the normal name is an alias. */
11888 #if defined (__stub_connect) || defined (__stub___connect)
11889 #error found stub for connect
11897 rm -f conftest.$ac_objext conftest$ac_exeext
11898 if { (eval echo "$as_me:11898: \"$ac_link\"") >&5
11899 (eval $ac_link) 2>&5
11901 echo "$as_me:11901: \$? = $ac_status" >&5
11902 (exit $ac_status); } &&
11903 { ac_try='test -s conftest$ac_exeext'
11904 { (eval echo "$as_me:11904: \"$ac_try\"") >&5
11905 (eval $ac_try) 2>&5
11907 echo "$as_me:11907: \$? = $ac_status" >&5
11908 (exit $ac_status); }; }; then
11909 ac_cv_func_connect=yes
11911 echo "$as_me: failed program was:" >&5
11912 cat conftest.$ac_ext >&5
11913 ac_cv_func_connect=no
11915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11917 echo "$as_me:11917: result: $ac_cv_func_connect" >&5
11918 echo "${ECHO_T}$ac_cv_func_connect" >&6
11920 if test $ac_cv_func_connect = no; then
11921 echo "$as_me:11921: checking for connect in -lsocket" >&5
11922 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11923 if test "${ac_cv_lib_socket_connect+set}" = set; then
11924 echo $ECHO_N "(cached) $ECHO_C" >&6
11926 ac_check_lib_save_LIBS=$LIBS
11927 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11928 cat >conftest.$ac_ext <<_ACEOF
11929 #line 11929 "configure"
11930 #include "confdefs.h"
11932 /* Override any gcc2 internal prototype to avoid an error. */
11936 /* We use char because int might match the return type of a gcc2
11937 builtin and then its argument prototype would still apply. */
11947 rm -f conftest.$ac_objext conftest$ac_exeext
11948 if { (eval echo "$as_me:11948: \"$ac_link\"") >&5
11949 (eval $ac_link) 2>&5
11951 echo "$as_me:11951: \$? = $ac_status" >&5
11952 (exit $ac_status); } &&
11953 { ac_try='test -s conftest$ac_exeext'
11954 { (eval echo "$as_me:11954: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11957 echo "$as_me:11957: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
11959 ac_cv_lib_socket_connect=yes
11961 echo "$as_me: failed program was:" >&5
11962 cat conftest.$ac_ext >&5
11963 ac_cv_lib_socket_connect=no
11965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11966 LIBS=$ac_check_lib_save_LIBS
11968 echo "$as_me:11968: result: $ac_cv_lib_socket_connect" >&5
11969 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11970 if test $ac_cv_lib_socket_connect = yes; then
11971 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11976 # Guillermo Gomez says -lposix is necessary on A/UX.
11977 echo "$as_me:11977: checking for remove" >&5
11978 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11979 if test "${ac_cv_func_remove+set}" = set; then
11980 echo $ECHO_N "(cached) $ECHO_C" >&6
11982 cat >conftest.$ac_ext <<_ACEOF
11983 #line 11983 "configure"
11984 #include "confdefs.h"
11985 #define remove autoconf_temporary
11986 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11993 /* We use char because int might match the return type of a gcc2
11994 builtin and then its argument prototype would still apply. */
11995 char remove (void);
12001 /* The GNU C library defines stubs for functions which it implements
12002 to always fail with ENOSYS. Some functions are actually named
12003 something starting with __ and the normal name is an alias. */
12004 #if defined (__stub_remove) || defined (__stub___remove)
12005 #error found stub for remove
12013 rm -f conftest.$ac_objext conftest$ac_exeext
12014 if { (eval echo "$as_me:12014: \"$ac_link\"") >&5
12015 (eval $ac_link) 2>&5
12017 echo "$as_me:12017: \$? = $ac_status" >&5
12018 (exit $ac_status); } &&
12019 { ac_try='test -s conftest$ac_exeext'
12020 { (eval echo "$as_me:12020: \"$ac_try\"") >&5
12021 (eval $ac_try) 2>&5
12023 echo "$as_me:12023: \$? = $ac_status" >&5
12024 (exit $ac_status); }; }; then
12025 ac_cv_func_remove=yes
12027 echo "$as_me: failed program was:" >&5
12028 cat conftest.$ac_ext >&5
12029 ac_cv_func_remove=no
12031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12033 echo "$as_me:12033: result: $ac_cv_func_remove" >&5
12034 echo "${ECHO_T}$ac_cv_func_remove" >&6
12036 if test $ac_cv_func_remove = no; then
12037 echo "$as_me:12037: checking for remove in -lposix" >&5
12038 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12039 if test "${ac_cv_lib_posix_remove+set}" = set; then
12040 echo $ECHO_N "(cached) $ECHO_C" >&6
12042 ac_check_lib_save_LIBS=$LIBS
12043 LIBS="-lposix $LIBS"
12044 cat >conftest.$ac_ext <<_ACEOF
12045 #line 12045 "configure"
12046 #include "confdefs.h"
12048 /* Override any gcc2 internal prototype to avoid an error. */
12052 /* We use char because int might match the return type of a gcc2
12053 builtin and then its argument prototype would still apply. */
12063 rm -f conftest.$ac_objext conftest$ac_exeext
12064 if { (eval echo "$as_me:12064: \"$ac_link\"") >&5
12065 (eval $ac_link) 2>&5
12067 echo "$as_me:12067: \$? = $ac_status" >&5
12068 (exit $ac_status); } &&
12069 { ac_try='test -s conftest$ac_exeext'
12070 { (eval echo "$as_me:12070: \"$ac_try\"") >&5
12071 (eval $ac_try) 2>&5
12073 echo "$as_me:12073: \$? = $ac_status" >&5
12074 (exit $ac_status); }; }; then
12075 ac_cv_lib_posix_remove=yes
12077 echo "$as_me: failed program was:" >&5
12078 cat conftest.$ac_ext >&5
12079 ac_cv_lib_posix_remove=no
12081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12082 LIBS=$ac_check_lib_save_LIBS
12084 echo "$as_me:12084: result: $ac_cv_lib_posix_remove" >&5
12085 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12086 if test $ac_cv_lib_posix_remove = yes; then
12087 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12092 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12093 echo "$as_me:12093: checking for shmat" >&5
12094 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12095 if test "${ac_cv_func_shmat+set}" = set; then
12096 echo $ECHO_N "(cached) $ECHO_C" >&6
12098 cat >conftest.$ac_ext <<_ACEOF
12099 #line 12099 "configure"
12100 #include "confdefs.h"
12101 #define shmat autoconf_temporary
12102 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12109 /* We use char because int might match the return type of a gcc2
12110 builtin and then its argument prototype would still apply. */
12117 /* The GNU C library defines stubs for functions which it implements
12118 to always fail with ENOSYS. Some functions are actually named
12119 something starting with __ and the normal name is an alias. */
12120 #if defined (__stub_shmat) || defined (__stub___shmat)
12121 #error found stub for shmat
12129 rm -f conftest.$ac_objext conftest$ac_exeext
12130 if { (eval echo "$as_me:12130: \"$ac_link\"") >&5
12131 (eval $ac_link) 2>&5
12133 echo "$as_me:12133: \$? = $ac_status" >&5
12134 (exit $ac_status); } &&
12135 { ac_try='test -s conftest$ac_exeext'
12136 { (eval echo "$as_me:12136: \"$ac_try\"") >&5
12137 (eval $ac_try) 2>&5
12139 echo "$as_me:12139: \$? = $ac_status" >&5
12140 (exit $ac_status); }; }; then
12141 ac_cv_func_shmat=yes
12143 echo "$as_me: failed program was:" >&5
12144 cat conftest.$ac_ext >&5
12145 ac_cv_func_shmat=no
12147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12149 echo "$as_me:12149: result: $ac_cv_func_shmat" >&5
12150 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12152 if test $ac_cv_func_shmat = no; then
12153 echo "$as_me:12153: checking for shmat in -lipc" >&5
12154 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12155 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12156 echo $ECHO_N "(cached) $ECHO_C" >&6
12158 ac_check_lib_save_LIBS=$LIBS
12160 cat >conftest.$ac_ext <<_ACEOF
12161 #line 12161 "configure"
12162 #include "confdefs.h"
12164 /* Override any gcc2 internal prototype to avoid an error. */
12168 /* We use char because int might match the return type of a gcc2
12169 builtin and then its argument prototype would still apply. */
12179 rm -f conftest.$ac_objext conftest$ac_exeext
12180 if { (eval echo "$as_me:12180: \"$ac_link\"") >&5
12181 (eval $ac_link) 2>&5
12183 echo "$as_me:12183: \$? = $ac_status" >&5
12184 (exit $ac_status); } &&
12185 { ac_try='test -s conftest$ac_exeext'
12186 { (eval echo "$as_me:12186: \"$ac_try\"") >&5
12187 (eval $ac_try) 2>&5
12189 echo "$as_me:12189: \$? = $ac_status" >&5
12190 (exit $ac_status); }; }; then
12191 ac_cv_lib_ipc_shmat=yes
12193 echo "$as_me: failed program was:" >&5
12194 cat conftest.$ac_ext >&5
12195 ac_cv_lib_ipc_shmat=no
12197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12198 LIBS=$ac_check_lib_save_LIBS
12200 echo "$as_me:12200: result: $ac_cv_lib_ipc_shmat" >&5
12201 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12202 if test $ac_cv_lib_ipc_shmat = yes; then
12203 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12209 # Check for libraries that X11R6 Xt/Xaw programs need.
12210 ac_save_LDFLAGS=$LDFLAGS
12211 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12212 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12213 # check for ICE first), but we must link in the order -lSM -lICE or
12214 # we get undefined symbols. So assume we have SM if we have ICE.
12215 # These have to be linked with before -lX11, unlike the other
12216 # libraries we check for below, so use a different variable.
12217 # John Interrante, Karl Berry
12218 echo "$as_me:12218: checking for IceConnectionNumber in -lICE" >&5
12219 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12220 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
12223 ac_check_lib_save_LIBS=$LIBS
12224 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12225 cat >conftest.$ac_ext <<_ACEOF
12226 #line 12226 "configure"
12227 #include "confdefs.h"
12229 /* Override any gcc2 internal prototype to avoid an error. */
12233 /* We use char because int might match the return type of a gcc2
12234 builtin and then its argument prototype would still apply. */
12235 char IceConnectionNumber ();
12239 IceConnectionNumber ();
12244 rm -f conftest.$ac_objext conftest$ac_exeext
12245 if { (eval echo "$as_me:12245: \"$ac_link\"") >&5
12246 (eval $ac_link) 2>&5
12248 echo "$as_me:12248: \$? = $ac_status" >&5
12249 (exit $ac_status); } &&
12250 { ac_try='test -s conftest$ac_exeext'
12251 { (eval echo "$as_me:12251: \"$ac_try\"") >&5
12252 (eval $ac_try) 2>&5
12254 echo "$as_me:12254: \$? = $ac_status" >&5
12255 (exit $ac_status); }; }; then
12256 ac_cv_lib_ICE_IceConnectionNumber=yes
12258 echo "$as_me: failed program was:" >&5
12259 cat conftest.$ac_ext >&5
12260 ac_cv_lib_ICE_IceConnectionNumber=no
12262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12263 LIBS=$ac_check_lib_save_LIBS
12265 echo "$as_me:12265: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12266 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12267 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12268 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12271 LDFLAGS=$ac_save_LDFLAGS
12275 cf_x_athena=${cf_x_athena:-Xaw}
12277 echo "$as_me:12277: checking if you want to link with Xaw 3d library" >&5
12278 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12281 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12282 if test "${with_Xaw3d+set}" = set; then
12283 withval="$with_Xaw3d"
12286 if test "$withval" = yes ; then
12288 echo "$as_me:12288: result: yes" >&5
12289 echo "${ECHO_T}yes" >&6
12291 echo "$as_me:12291: result: no" >&5
12292 echo "${ECHO_T}no" >&6
12295 echo "$as_me:12295: checking if you want to link with Xaw 3d xft library" >&5
12296 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12299 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12300 if test "${with_Xaw3dxft+set}" = set; then
12301 withval="$with_Xaw3dxft"
12304 if test "$withval" = yes ; then
12305 cf_x_athena=Xaw3dxft
12306 echo "$as_me:12306: result: yes" >&5
12307 echo "${ECHO_T}yes" >&6
12309 echo "$as_me:12309: result: no" >&5
12310 echo "${ECHO_T}no" >&6
12313 echo "$as_me:12313: checking if you want to link with neXT Athena library" >&5
12314 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12317 # Check whether --with-neXtaw or --without-neXtaw was given.
12318 if test "${with_neXtaw+set}" = set; then
12319 withval="$with_neXtaw"
12322 if test "$withval" = yes ; then
12324 echo "$as_me:12324: result: yes" >&5
12325 echo "${ECHO_T}yes" >&6
12327 echo "$as_me:12327: result: no" >&5
12328 echo "${ECHO_T}no" >&6
12331 echo "$as_me:12331: checking if you want to link with Athena-Plus library" >&5
12332 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12335 # Check whether --with-XawPlus or --without-XawPlus was given.
12336 if test "${with_XawPlus+set}" = set; then
12337 withval="$with_XawPlus"
12340 if test "$withval" = yes ; then
12341 cf_x_athena=XawPlus
12342 echo "$as_me:12342: result: yes" >&5
12343 echo "${ECHO_T}yes" >&6
12345 echo "$as_me:12345: result: no" >&5
12346 echo "${ECHO_T}no" >&6
12351 if test "$PKG_CONFIG" != none ; then
12353 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12354 for cf_athena_pkg in \
12357 ${cf_x_athena}-devel \
12358 lib${cf_x_athena} \
12359 lib${cf_x_athena}-devel
12362 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12363 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12365 echo "${as_me:-configure}:12365: testing found package $cf_athena_pkg ..." 1>&5
12367 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12368 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12369 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12371 echo "${as_me:-configure}:12371: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12373 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12375 echo "${as_me:-configure}:12375: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12380 cf_new_extra_cppflags=
12382 for cf_add_cflags in $cf_pkgconfig_incs
12384 case $cf_fix_cppflags in
12386 case $cf_add_cflags in
12387 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12388 case $cf_add_cflags in
12390 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12392 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12393 && test -z "${cf_tst_cflags}" \
12394 && cf_fix_cppflags=yes
12396 if test $cf_fix_cppflags = yes ; then
12398 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12399 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12402 elif test "${cf_tst_cflags}" = "\"'" ; then
12404 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12405 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12411 case "$CPPFLAGS" in
12415 case $cf_add_cflags in
12417 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12419 CPPFLAGS=`echo "$CPPFLAGS" | \
12420 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12421 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12426 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12427 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12434 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12435 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12445 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12447 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12448 && test -z "${cf_tst_cflags}" \
12449 && cf_fix_cppflags=no
12454 if test -n "$cf_new_cflags" ; then
12456 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12457 CFLAGS="${CFLAGS}$cf_new_cflags"
12461 if test -n "$cf_new_cppflags" ; then
12463 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12464 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12468 if test -n "$cf_new_extra_cppflags" ; then
12470 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12471 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12475 cf_add_libs="$LIBS"
12478 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12479 # filter duplicates
12480 for cf_add_1lib in $cf_add_0lib; do
12481 for cf_add_2lib in $cf_add_libs; do
12482 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12487 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12489 LIBS="$cf_add_libs"
12491 cf_x_athena_lib="$cf_pkgconfig_libs"
12493 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12495 cat >>confdefs.h <<EOF
12496 #define $cf_x_athena_LIBS 1
12499 for cf_trim_lib in Xmu Xt X11
12502 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12503 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12504 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12506 echo "${as_me:-configure}:12506: testing ..trimmed $LIBS ..." 1>&5
12512 echo "$as_me:12512: checking for usable $cf_x_athena/Xmu package" >&5
12513 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12514 if test "${cf_cv_xaw_compat+set}" = set; then
12515 echo $ECHO_N "(cached) $ECHO_C" >&6
12518 cat >conftest.$ac_ext <<_ACEOF
12519 #line 12519 "configure"
12520 #include "confdefs.h"
12522 #include <X11/Xmu/CharSet.h>
12528 int check = XmuCompareISOLatin1("big", "small")
12534 rm -f conftest.$ac_objext conftest$ac_exeext
12535 if { (eval echo "$as_me:12535: \"$ac_link\"") >&5
12536 (eval $ac_link) 2>&5
12538 echo "$as_me:12538: \$? = $ac_status" >&5
12539 (exit $ac_status); } &&
12540 { ac_try='test -s conftest$ac_exeext'
12541 { (eval echo "$as_me:12541: \"$ac_try\"") >&5
12542 (eval $ac_try) 2>&5
12544 echo "$as_me:12544: \$? = $ac_status" >&5
12545 (exit $ac_status); }; }; then
12546 cf_cv_xaw_compat=yes
12548 echo "$as_me: failed program was:" >&5
12549 cat conftest.$ac_ext >&5
12550 cf_cv_xaw_compat=no
12552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12554 echo "$as_me:12554: result: $cf_cv_xaw_compat" >&5
12555 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12557 if test "$cf_cv_xaw_compat" = no
12559 # workaround for broken ".pc" files...
12560 case "$cf_x_athena_lib" in
12564 test -n "$verbose" && echo " work around broken package" 1>&6
12566 echo "${as_me:-configure}:12566: testing work around broken package ..." 1>&5
12568 cf_save_xmu="$LIBS"
12569 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12571 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12572 test -n "$verbose" && echo " found package xmu" 1>&6
12574 echo "${as_me:-configure}:12574: testing found package xmu ..." 1>&5
12576 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12577 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12578 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12580 echo "${as_me:-configure}:12580: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12582 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12584 echo "${as_me:-configure}:12584: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12589 cf_new_extra_cppflags=
12591 for cf_add_cflags in $cf_pkgconfig_incs
12593 case $cf_fix_cppflags in
12595 case $cf_add_cflags in
12596 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12597 case $cf_add_cflags in
12599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12602 && test -z "${cf_tst_cflags}" \
12603 && cf_fix_cppflags=yes
12605 if test $cf_fix_cppflags = yes ; then
12607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12611 elif test "${cf_tst_cflags}" = "\"'" ; then
12613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12620 case "$CPPFLAGS" in
12624 case $cf_add_cflags in
12626 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12628 CPPFLAGS=`echo "$CPPFLAGS" | \
12629 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12630 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12635 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12636 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12643 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12644 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12654 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12656 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12657 && test -z "${cf_tst_cflags}" \
12658 && cf_fix_cppflags=no
12663 if test -n "$cf_new_cflags" ; then
12665 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12666 CFLAGS="${CFLAGS}$cf_new_cflags"
12670 if test -n "$cf_new_cppflags" ; then
12672 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12673 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12677 if test -n "$cf_new_extra_cppflags" ; then
12679 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12680 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12684 cf_add_libs="$LIBS"
12687 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12688 # filter duplicates
12689 for cf_add_1lib in $cf_add_0lib; do
12690 for cf_add_2lib in $cf_add_libs; do
12691 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12696 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12698 LIBS="$cf_add_libs"
12700 LIBS="$cf_save_xmu"
12702 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12704 echo "${as_me:-configure}:12704: testing ...before $LIBS ..." 1>&5
12706 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12707 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12709 echo "${as_me:-configure}:12709: testing ...after $LIBS ..." 1>&5
12715 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12717 echo "${as_me:-configure}:12717: testing ...before $LIBS ..." 1>&5
12719 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12720 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12722 echo "${as_me:-configure}:12722: testing ...after $LIBS ..." 1>&5
12726 for cf_trim_lib in Xmu Xt X11
12729 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12730 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12731 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12733 echo "${as_me:-configure}:12733: testing ..trimmed $LIBS ..." 1>&5
12753 if test -z "$cf_x_athena_lib" ; then
12755 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12756 test -n "$verbose" && echo " found package Xext" 1>&6
12758 echo "${as_me:-configure}:12758: testing found package Xext ..." 1>&5
12760 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12761 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12762 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12764 echo "${as_me:-configure}:12764: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12766 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12768 echo "${as_me:-configure}:12768: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12773 cf_new_extra_cppflags=
12775 for cf_add_cflags in $cf_pkgconfig_incs
12777 case $cf_fix_cppflags in
12779 case $cf_add_cflags in
12780 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12781 case $cf_add_cflags in
12783 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12786 && test -z "${cf_tst_cflags}" \
12787 && cf_fix_cppflags=yes
12789 if test $cf_fix_cppflags = yes ; then
12791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12795 elif test "${cf_tst_cflags}" = "\"'" ; then
12797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12804 case "$CPPFLAGS" in
12808 case $cf_add_cflags in
12810 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12812 CPPFLAGS=`echo "$CPPFLAGS" | \
12813 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12814 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12819 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12820 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12827 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12828 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12838 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12841 && test -z "${cf_tst_cflags}" \
12842 && cf_fix_cppflags=no
12847 if test -n "$cf_new_cflags" ; then
12849 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12850 CFLAGS="${CFLAGS}$cf_new_cflags"
12854 if test -n "$cf_new_cppflags" ; then
12856 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12857 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12861 if test -n "$cf_new_extra_cppflags" ; then
12863 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12864 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12868 cf_add_libs="$LIBS"
12871 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12872 # filter duplicates
12873 for cf_add_1lib in $cf_add_0lib; do
12874 for cf_add_2lib in $cf_add_libs; do
12875 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12880 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12882 LIBS="$cf_add_libs"
12889 echo "$as_me:12889: checking for XextCreateExtension in -lXext" >&5
12890 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12891 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12892 echo $ECHO_N "(cached) $ECHO_C" >&6
12894 ac_check_lib_save_LIBS=$LIBS
12895 LIBS="-lXext $LIBS"
12896 cat >conftest.$ac_ext <<_ACEOF
12897 #line 12897 "configure"
12898 #include "confdefs.h"
12900 /* Override any gcc2 internal prototype to avoid an error. */
12904 /* We use char because int might match the return type of a gcc2
12905 builtin and then its argument prototype would still apply. */
12906 char XextCreateExtension ();
12910 XextCreateExtension ();
12915 rm -f conftest.$ac_objext conftest$ac_exeext
12916 if { (eval echo "$as_me:12916: \"$ac_link\"") >&5
12917 (eval $ac_link) 2>&5
12919 echo "$as_me:12919: \$? = $ac_status" >&5
12920 (exit $ac_status); } &&
12921 { ac_try='test -s conftest$ac_exeext'
12922 { (eval echo "$as_me:12922: \"$ac_try\"") >&5
12923 (eval $ac_try) 2>&5
12925 echo "$as_me:12925: \$? = $ac_status" >&5
12926 (exit $ac_status); }; }; then
12927 ac_cv_lib_Xext_XextCreateExtension=yes
12929 echo "$as_me: failed program was:" >&5
12930 cat conftest.$ac_ext >&5
12931 ac_cv_lib_Xext_XextCreateExtension=no
12933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12934 LIBS=$ac_check_lib_save_LIBS
12936 echo "$as_me:12936: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12937 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12938 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12940 cf_add_libs="$LIBS"
12943 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12944 # filter duplicates
12945 for cf_add_1lib in $cf_add_0lib; do
12946 for cf_add_2lib in $cf_add_libs; do
12947 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12952 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12954 LIBS="$cf_add_libs"
12960 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
12961 # in some cases has installed dummy files in the former, other cases replaced
12962 # it with a link to the new location). This complicates the configure script.
12963 # Check for that pitfall, and recover using pkg-config
12965 # If none of these are set, the configuration is almost certainly broken.
12966 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12969 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12970 test -n "$verbose" && echo " found package x11" 1>&6
12972 echo "${as_me:-configure}:12972: testing found package x11 ..." 1>&5
12974 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12975 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12976 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12978 echo "${as_me:-configure}:12978: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12980 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12982 echo "${as_me:-configure}:12982: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12987 cf_new_extra_cppflags=
12989 for cf_add_cflags in $cf_pkgconfig_incs
12991 case $cf_fix_cppflags in
12993 case $cf_add_cflags in
12994 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12995 case $cf_add_cflags in
12997 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12999 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13000 && test -z "${cf_tst_cflags}" \
13001 && cf_fix_cppflags=yes
13003 if test $cf_fix_cppflags = yes ; then
13005 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13006 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13009 elif test "${cf_tst_cflags}" = "\"'" ; then
13011 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13012 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13018 case "$CPPFLAGS" in
13022 case $cf_add_cflags in
13024 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13026 CPPFLAGS=`echo "$CPPFLAGS" | \
13027 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13028 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13033 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13034 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13041 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13042 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13052 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13054 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13055 && test -z "${cf_tst_cflags}" \
13056 && cf_fix_cppflags=no
13061 if test -n "$cf_new_cflags" ; then
13063 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13064 CFLAGS="${CFLAGS}$cf_new_cflags"
13068 if test -n "$cf_new_cppflags" ; then
13070 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13071 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13075 if test -n "$cf_new_extra_cppflags" ; then
13077 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13078 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13082 cf_add_libs="$LIBS"
13085 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13086 # filter duplicates
13087 for cf_add_1lib in $cf_add_0lib; do
13088 for cf_add_2lib in $cf_add_libs; do
13089 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13094 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13096 LIBS="$cf_add_libs"
13102 { echo "$as_me:13102: WARNING: unable to find X11 library" >&5
13103 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13106 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13107 test -n "$verbose" && echo " found package ice" 1>&6
13109 echo "${as_me:-configure}:13109: testing found package ice ..." 1>&5
13111 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13112 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13113 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13115 echo "${as_me:-configure}:13115: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13117 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13119 echo "${as_me:-configure}:13119: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13124 cf_new_extra_cppflags=
13126 for cf_add_cflags in $cf_pkgconfig_incs
13128 case $cf_fix_cppflags in
13130 case $cf_add_cflags in
13131 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13132 case $cf_add_cflags in
13134 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13136 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13137 && test -z "${cf_tst_cflags}" \
13138 && cf_fix_cppflags=yes
13140 if test $cf_fix_cppflags = yes ; then
13142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13146 elif test "${cf_tst_cflags}" = "\"'" ; then
13148 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13149 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13155 case "$CPPFLAGS" in
13159 case $cf_add_cflags in
13161 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13163 CPPFLAGS=`echo "$CPPFLAGS" | \
13164 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13165 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13170 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13171 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13178 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13179 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13189 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13191 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13192 && test -z "${cf_tst_cflags}" \
13193 && cf_fix_cppflags=no
13198 if test -n "$cf_new_cflags" ; then
13200 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13201 CFLAGS="${CFLAGS}$cf_new_cflags"
13205 if test -n "$cf_new_cppflags" ; then
13207 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13208 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13212 if test -n "$cf_new_extra_cppflags" ; then
13214 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13215 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13219 cf_add_libs="$LIBS"
13222 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13223 # filter duplicates
13224 for cf_add_1lib in $cf_add_0lib; do
13225 for cf_add_2lib in $cf_add_libs; do
13226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13233 LIBS="$cf_add_libs"
13239 { echo "$as_me:13239: WARNING: unable to find ICE library" >&5
13240 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13243 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13244 test -n "$verbose" && echo " found package sm" 1>&6
13246 echo "${as_me:-configure}:13246: testing found package sm ..." 1>&5
13248 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13249 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13250 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13252 echo "${as_me:-configure}:13252: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13254 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13256 echo "${as_me:-configure}:13256: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13261 cf_new_extra_cppflags=
13263 for cf_add_cflags in $cf_pkgconfig_incs
13265 case $cf_fix_cppflags in
13267 case $cf_add_cflags in
13268 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13269 case $cf_add_cflags in
13271 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13273 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13274 && test -z "${cf_tst_cflags}" \
13275 && cf_fix_cppflags=yes
13277 if test $cf_fix_cppflags = yes ; then
13279 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13280 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13283 elif test "${cf_tst_cflags}" = "\"'" ; then
13285 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13286 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13292 case "$CPPFLAGS" in
13296 case $cf_add_cflags in
13298 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13300 CPPFLAGS=`echo "$CPPFLAGS" | \
13301 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13302 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13307 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13308 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13315 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13316 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13323 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13324 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13326 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13328 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13329 && test -z "${cf_tst_cflags}" \
13330 && cf_fix_cppflags=no
13335 if test -n "$cf_new_cflags" ; then
13337 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13338 CFLAGS="${CFLAGS}$cf_new_cflags"
13342 if test -n "$cf_new_cppflags" ; then
13344 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13345 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13349 if test -n "$cf_new_extra_cppflags" ; then
13351 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13352 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13356 cf_add_libs="$LIBS"
13359 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13360 # filter duplicates
13361 for cf_add_1lib in $cf_add_0lib; do
13362 for cf_add_2lib in $cf_add_libs; do
13363 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13368 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13370 LIBS="$cf_add_libs"
13376 { echo "$as_me:13376: WARNING: unable to find SM library" >&5
13377 echo "$as_me: WARNING: unable to find SM library" >&2;}
13380 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13381 test -n "$verbose" && echo " found package xt" 1>&6
13383 echo "${as_me:-configure}:13383: testing found package xt ..." 1>&5
13385 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13386 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13387 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13389 echo "${as_me:-configure}:13389: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13391 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13393 echo "${as_me:-configure}:13393: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13398 cf_new_extra_cppflags=
13400 for cf_add_cflags in $cf_pkgconfig_incs
13402 case $cf_fix_cppflags in
13404 case $cf_add_cflags in
13405 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13406 case $cf_add_cflags in
13408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13410 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13411 && test -z "${cf_tst_cflags}" \
13412 && cf_fix_cppflags=yes
13414 if test $cf_fix_cppflags = yes ; then
13416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13420 elif test "${cf_tst_cflags}" = "\"'" ; then
13422 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13423 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13429 case "$CPPFLAGS" in
13433 case $cf_add_cflags in
13435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13437 CPPFLAGS=`echo "$CPPFLAGS" | \
13438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13444 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13445 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13452 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13453 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13463 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13465 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13466 && test -z "${cf_tst_cflags}" \
13467 && cf_fix_cppflags=no
13472 if test -n "$cf_new_cflags" ; then
13474 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13475 CFLAGS="${CFLAGS}$cf_new_cflags"
13479 if test -n "$cf_new_cppflags" ; then
13481 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13482 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13486 if test -n "$cf_new_extra_cppflags" ; then
13488 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13489 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13493 cf_add_libs="$LIBS"
13496 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13497 # filter duplicates
13498 for cf_add_1lib in $cf_add_0lib; do
13499 for cf_add_2lib in $cf_add_libs; do
13500 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13505 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13507 LIBS="$cf_add_libs"
13513 { echo "$as_me:13513: WARNING: unable to find Xt library" >&5
13514 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13521 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13522 test -n "$verbose" && echo " found package xt" 1>&6
13524 echo "${as_me:-configure}:13524: testing found package xt ..." 1>&5
13526 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13527 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13528 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13530 echo "${as_me:-configure}:13530: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13532 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13534 echo "${as_me:-configure}:13534: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13539 cf_new_extra_cppflags=
13541 for cf_add_cflags in $cf_pkgconfig_incs
13543 case $cf_fix_cppflags in
13545 case $cf_add_cflags in
13546 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13547 case $cf_add_cflags in
13549 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13551 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13552 && test -z "${cf_tst_cflags}" \
13553 && cf_fix_cppflags=yes
13555 if test $cf_fix_cppflags = yes ; then
13557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13561 elif test "${cf_tst_cflags}" = "\"'" ; then
13563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13570 case "$CPPFLAGS" in
13574 case $cf_add_cflags in
13576 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13578 CPPFLAGS=`echo "$CPPFLAGS" | \
13579 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13580 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13585 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13586 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13593 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13594 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13604 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13607 && test -z "${cf_tst_cflags}" \
13608 && cf_fix_cppflags=no
13613 if test -n "$cf_new_cflags" ; then
13615 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13616 CFLAGS="${CFLAGS}$cf_new_cflags"
13620 if test -n "$cf_new_cppflags" ; then
13622 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13623 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13627 if test -n "$cf_new_extra_cppflags" ; then
13629 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13630 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13634 cf_add_libs="$LIBS"
13637 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13638 # filter duplicates
13639 for cf_add_1lib in $cf_add_0lib; do
13640 for cf_add_2lib in $cf_add_libs; do
13641 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13646 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13648 LIBS="$cf_add_libs"
13654 # we have an "xt" package, but it may omit Xt's dependency on X11
13655 echo "$as_me:13655: checking for usable X dependency" >&5
13656 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13657 if test "${cf_cv_xt_x11_compat+set}" = set; then
13658 echo $ECHO_N "(cached) $ECHO_C" >&6
13661 cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13665 #include <X11/Xlib.h>
13671 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13672 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13673 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13674 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13680 rm -f conftest.$ac_objext conftest$ac_exeext
13681 if { (eval echo "$as_me:13681: \"$ac_link\"") >&5
13682 (eval $ac_link) 2>&5
13684 echo "$as_me:13684: \$? = $ac_status" >&5
13685 (exit $ac_status); } &&
13686 { ac_try='test -s conftest$ac_exeext'
13687 { (eval echo "$as_me:13687: \"$ac_try\"") >&5
13688 (eval $ac_try) 2>&5
13690 echo "$as_me:13690: \$? = $ac_status" >&5
13691 (exit $ac_status); }; }; then
13692 cf_cv_xt_x11_compat=yes
13694 echo "$as_me: failed program was:" >&5
13695 cat conftest.$ac_ext >&5
13696 cf_cv_xt_x11_compat=no
13698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13700 echo "$as_me:13700: result: $cf_cv_xt_x11_compat" >&5
13701 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13702 if test "$cf_cv_xt_x11_compat" = no
13704 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13706 echo "${as_me:-configure}:13706: testing work around broken X11 dependency ..." 1>&5
13708 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13710 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13711 test -n "$verbose" && echo " found package x11" 1>&6
13713 echo "${as_me:-configure}:13713: testing found package x11 ..." 1>&5
13715 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13716 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13717 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13719 echo "${as_me:-configure}:13719: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13721 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13723 echo "${as_me:-configure}:13723: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13728 cf_new_extra_cppflags=
13730 for cf_add_cflags in $cf_pkgconfig_incs
13732 case $cf_fix_cppflags in
13734 case $cf_add_cflags in
13735 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13736 case $cf_add_cflags in
13738 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13740 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13741 && test -z "${cf_tst_cflags}" \
13742 && cf_fix_cppflags=yes
13744 if test $cf_fix_cppflags = yes ; then
13746 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13747 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13750 elif test "${cf_tst_cflags}" = "\"'" ; then
13752 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13753 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13759 case "$CPPFLAGS" in
13763 case $cf_add_cflags in
13765 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13767 CPPFLAGS=`echo "$CPPFLAGS" | \
13768 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13769 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13774 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13775 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13782 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13783 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13790 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13791 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13793 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13795 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13796 && test -z "${cf_tst_cflags}" \
13797 && cf_fix_cppflags=no
13802 if test -n "$cf_new_cflags" ; then
13804 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13805 CFLAGS="${CFLAGS}$cf_new_cflags"
13809 if test -n "$cf_new_cppflags" ; then
13811 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13812 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13816 if test -n "$cf_new_extra_cppflags" ; then
13818 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13819 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13823 cf_add_libs="$LIBS"
13826 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13827 # filter duplicates
13828 for cf_add_1lib in $cf_add_0lib; do
13829 for cf_add_2lib in $cf_add_libs; do
13830 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13835 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13837 LIBS="$cf_add_libs"
13844 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13846 echo "${as_me:-configure}:13846: testing ...before $LIBS ..." 1>&5
13848 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13849 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13851 echo "${as_me:-configure}:13851: testing ...after $LIBS ..." 1>&5
13859 echo "$as_me:13859: checking for usable X Toolkit package" >&5
13860 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13861 if test "${cf_cv_xt_ice_compat+set}" = set; then
13862 echo $ECHO_N "(cached) $ECHO_C" >&6
13865 cat >conftest.$ac_ext <<_ACEOF
13866 #line 13866 "configure"
13867 #include "confdefs.h"
13869 #include <X11/Shell.h>
13874 int num = IceConnectionNumber(0)
13880 rm -f conftest.$ac_objext conftest$ac_exeext
13881 if { (eval echo "$as_me:13881: \"$ac_link\"") >&5
13882 (eval $ac_link) 2>&5
13884 echo "$as_me:13884: \$? = $ac_status" >&5
13885 (exit $ac_status); } &&
13886 { ac_try='test -s conftest$ac_exeext'
13887 { (eval echo "$as_me:13887: \"$ac_try\"") >&5
13888 (eval $ac_try) 2>&5
13890 echo "$as_me:13890: \$? = $ac_status" >&5
13891 (exit $ac_status); }; }; then
13892 cf_cv_xt_ice_compat=yes
13894 echo "$as_me: failed program was:" >&5
13895 cat conftest.$ac_ext >&5
13896 cf_cv_xt_ice_compat=no
13898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13900 echo "$as_me:13900: result: $cf_cv_xt_ice_compat" >&5
13901 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13903 if test "$cf_cv_xt_ice_compat" = no
13905 # workaround for broken ".pc" files used for X Toolkit.
13906 case "x$X_PRE_LIBS" in
13912 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13914 echo "${as_me:-configure}:13914: testing work around broken ICE dependency ..." 1>&5
13916 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13917 test -n "$verbose" && echo " found package ice" 1>&6
13919 echo "${as_me:-configure}:13919: testing found package ice ..." 1>&5
13921 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13922 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13923 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13925 echo "${as_me:-configure}:13925: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13927 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13929 echo "${as_me:-configure}:13929: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13934 cf_new_extra_cppflags=
13936 for cf_add_cflags in $cf_pkgconfig_incs
13938 case $cf_fix_cppflags in
13940 case $cf_add_cflags in
13941 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13942 case $cf_add_cflags in
13944 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13946 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13947 && test -z "${cf_tst_cflags}" \
13948 && cf_fix_cppflags=yes
13950 if test $cf_fix_cppflags = yes ; then
13952 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13953 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13956 elif test "${cf_tst_cflags}" = "\"'" ; then
13958 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13959 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13965 case "$CPPFLAGS" in
13969 case $cf_add_cflags in
13971 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13973 CPPFLAGS=`echo "$CPPFLAGS" | \
13974 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13975 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13980 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13981 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13988 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13989 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13996 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13997 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13999 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14001 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14002 && test -z "${cf_tst_cflags}" \
14003 && cf_fix_cppflags=no
14008 if test -n "$cf_new_cflags" ; then
14010 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14011 CFLAGS="${CFLAGS}$cf_new_cflags"
14015 if test -n "$cf_new_cppflags" ; then
14017 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14018 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14022 if test -n "$cf_new_extra_cppflags" ; then
14024 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14025 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14029 cf_add_libs="$LIBS"
14032 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14033 # filter duplicates
14034 for cf_add_1lib in $cf_add_0lib; do
14035 for cf_add_2lib in $cf_add_libs; do
14036 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14041 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14043 LIBS="$cf_add_libs"
14045 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
14046 test -n "$verbose" && echo " found package sm" 1>&6
14048 echo "${as_me:-configure}:14048: testing found package sm ..." 1>&5
14050 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
14051 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
14052 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14054 echo "${as_me:-configure}:14054: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14056 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14058 echo "${as_me:-configure}:14058: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14063 cf_new_extra_cppflags=
14065 for cf_add_cflags in $cf_pkgconfig_incs
14067 case $cf_fix_cppflags in
14069 case $cf_add_cflags in
14070 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14071 case $cf_add_cflags in
14073 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14075 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14076 && test -z "${cf_tst_cflags}" \
14077 && cf_fix_cppflags=yes
14079 if test $cf_fix_cppflags = yes ; then
14081 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14082 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14085 elif test "${cf_tst_cflags}" = "\"'" ; then
14087 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14088 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14094 case "$CPPFLAGS" in
14098 case $cf_add_cflags in
14100 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14102 CPPFLAGS=`echo "$CPPFLAGS" | \
14103 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14104 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14109 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14110 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14117 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14118 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14125 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14126 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14128 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14130 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14131 && test -z "${cf_tst_cflags}" \
14132 && cf_fix_cppflags=no
14137 if test -n "$cf_new_cflags" ; then
14139 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14140 CFLAGS="${CFLAGS}$cf_new_cflags"
14144 if test -n "$cf_new_cppflags" ; then
14146 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14147 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14151 if test -n "$cf_new_extra_cppflags" ; then
14153 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14154 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14158 cf_add_libs="$LIBS"
14161 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14162 # filter duplicates
14163 for cf_add_1lib in $cf_add_0lib; do
14164 for cf_add_2lib in $cf_add_libs; do
14165 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14170 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14172 LIBS="$cf_add_libs"
14185 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14187 echo "${as_me:-configure}:14187: testing ...before $LIBS ..." 1>&5
14189 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14190 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14192 echo "${as_me:-configure}:14192: testing ...after $LIBS ..." 1>&5
14208 LDFLAGS="$X_LIBS $LDFLAGS"
14210 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14212 echo "${as_me:-configure}:14212: testing checking additions to CFLAGS ..." 1>&5
14214 cf_check_cflags="$CFLAGS"
14215 cf_check_cppflags="$CPPFLAGS"
14220 cf_new_extra_cppflags=
14222 for cf_add_cflags in $X_CFLAGS
14224 case $cf_fix_cppflags in
14226 case $cf_add_cflags in
14227 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14228 case $cf_add_cflags in
14230 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14232 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14233 && test -z "${cf_tst_cflags}" \
14234 && cf_fix_cppflags=yes
14236 if test $cf_fix_cppflags = yes ; then
14238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14242 elif test "${cf_tst_cflags}" = "\"'" ; then
14244 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14245 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14251 case "$CPPFLAGS" in
14255 case $cf_add_cflags in
14257 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14259 CPPFLAGS=`echo "$CPPFLAGS" | \
14260 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14261 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14266 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14267 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14274 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14275 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14282 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14283 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14285 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14287 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14288 && test -z "${cf_tst_cflags}" \
14289 && cf_fix_cppflags=no
14294 if test -n "$cf_new_cflags" ; then
14295 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14297 echo "${as_me:-configure}:14297: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14299 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14300 CFLAGS="${CFLAGS}$cf_new_cflags"
14304 if test -n "$cf_new_cppflags" ; then
14305 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14307 echo "${as_me:-configure}:14307: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14309 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14310 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14314 if test -n "$cf_new_extra_cppflags" ; then
14315 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14317 echo "${as_me:-configure}:14317: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14319 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14320 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14324 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14325 cat >conftest.$ac_ext <<_ACEOF
14326 #line 14326 "configure"
14327 #include "confdefs.h"
14332 printf("Hello world");
14337 rm -f conftest.$ac_objext conftest$ac_exeext
14338 if { (eval echo "$as_me:14338: \"$ac_link\"") >&5
14339 (eval $ac_link) 2>&5
14341 echo "$as_me:14341: \$? = $ac_status" >&5
14342 (exit $ac_status); } &&
14343 { ac_try='test -s conftest$ac_exeext'
14344 { (eval echo "$as_me:14344: \"$ac_try\"") >&5
14345 (eval $ac_try) 2>&5
14347 echo "$as_me:14347: \$? = $ac_status" >&5
14348 (exit $ac_status); }; }; then
14351 echo "$as_me: failed program was:" >&5
14352 cat conftest.$ac_ext >&5
14353 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14355 echo "${as_me:-configure}:14355: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14357 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14358 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14360 echo "${as_me:-configure}:14360: testing but keeping change to \$CPPFLAGS ..." 1>&5
14363 CFLAGS="$cf_check_flags"
14365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14368 echo "$as_me:14368: checking for XOpenDisplay" >&5
14369 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14370 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14371 echo $ECHO_N "(cached) $ECHO_C" >&6
14373 cat >conftest.$ac_ext <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376 #define XOpenDisplay autoconf_temporary
14377 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14378 #undef XOpenDisplay
14384 /* We use char because int might match the return type of a gcc2
14385 builtin and then its argument prototype would still apply. */
14386 char XOpenDisplay (void);
14392 /* The GNU C library defines stubs for functions which it implements
14393 to always fail with ENOSYS. Some functions are actually named
14394 something starting with __ and the normal name is an alias. */
14395 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14396 #error found stub for XOpenDisplay
14399 return XOpenDisplay ();
14404 rm -f conftest.$ac_objext conftest$ac_exeext
14405 if { (eval echo "$as_me:14405: \"$ac_link\"") >&5
14406 (eval $ac_link) 2>&5
14408 echo "$as_me:14408: \$? = $ac_status" >&5
14409 (exit $ac_status); } &&
14410 { ac_try='test -s conftest$ac_exeext'
14411 { (eval echo "$as_me:14411: \"$ac_try\"") >&5
14412 (eval $ac_try) 2>&5
14414 echo "$as_me:14414: \$? = $ac_status" >&5
14415 (exit $ac_status); }; }; then
14416 ac_cv_func_XOpenDisplay=yes
14418 echo "$as_me: failed program was:" >&5
14419 cat conftest.$ac_ext >&5
14420 ac_cv_func_XOpenDisplay=no
14422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14424 echo "$as_me:14424: result: $ac_cv_func_XOpenDisplay" >&5
14425 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14426 if test $ac_cv_func_XOpenDisplay = yes; then
14430 echo "$as_me:14430: checking for XOpenDisplay in -lX11" >&5
14431 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14432 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14433 echo $ECHO_N "(cached) $ECHO_C" >&6
14435 ac_check_lib_save_LIBS=$LIBS
14436 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14437 cat >conftest.$ac_ext <<_ACEOF
14438 #line 14438 "configure"
14439 #include "confdefs.h"
14441 /* Override any gcc2 internal prototype to avoid an error. */
14445 /* We use char because int might match the return type of a gcc2
14446 builtin and then its argument prototype would still apply. */
14447 char XOpenDisplay ();
14456 rm -f conftest.$ac_objext conftest$ac_exeext
14457 if { (eval echo "$as_me:14457: \"$ac_link\"") >&5
14458 (eval $ac_link) 2>&5
14460 echo "$as_me:14460: \$? = $ac_status" >&5
14461 (exit $ac_status); } &&
14462 { ac_try='test -s conftest$ac_exeext'
14463 { (eval echo "$as_me:14463: \"$ac_try\"") >&5
14464 (eval $ac_try) 2>&5
14466 echo "$as_me:14466: \$? = $ac_status" >&5
14467 (exit $ac_status); }; }; then
14468 ac_cv_lib_X11_XOpenDisplay=yes
14470 echo "$as_me: failed program was:" >&5
14471 cat conftest.$ac_ext >&5
14472 ac_cv_lib_X11_XOpenDisplay=no
14474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14475 LIBS=$ac_check_lib_save_LIBS
14477 echo "$as_me:14477: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14478 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14479 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14481 cf_add_libs="$LIBS"
14484 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14485 # filter duplicates
14486 for cf_add_1lib in $cf_add_0lib; do
14487 for cf_add_2lib in $cf_add_libs; do
14488 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14493 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14495 LIBS="$cf_add_libs"
14501 echo "$as_me:14501: checking for XtAppInitialize" >&5
14502 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14503 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
14506 cat >conftest.$ac_ext <<_ACEOF
14507 #line 14507 "configure"
14508 #include "confdefs.h"
14509 #define XtAppInitialize autoconf_temporary
14510 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14511 #undef XtAppInitialize
14517 /* We use char because int might match the return type of a gcc2
14518 builtin and then its argument prototype would still apply. */
14519 char XtAppInitialize (void);
14525 /* The GNU C library defines stubs for functions which it implements
14526 to always fail with ENOSYS. Some functions are actually named
14527 something starting with __ and the normal name is an alias. */
14528 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14529 #error found stub for XtAppInitialize
14532 return XtAppInitialize ();
14537 rm -f conftest.$ac_objext conftest$ac_exeext
14538 if { (eval echo "$as_me:14538: \"$ac_link\"") >&5
14539 (eval $ac_link) 2>&5
14541 echo "$as_me:14541: \$? = $ac_status" >&5
14542 (exit $ac_status); } &&
14543 { ac_try='test -s conftest$ac_exeext'
14544 { (eval echo "$as_me:14544: \"$ac_try\"") >&5
14545 (eval $ac_try) 2>&5
14547 echo "$as_me:14547: \$? = $ac_status" >&5
14548 (exit $ac_status); }; }; then
14549 ac_cv_func_XtAppInitialize=yes
14551 echo "$as_me: failed program was:" >&5
14552 cat conftest.$ac_ext >&5
14553 ac_cv_func_XtAppInitialize=no
14555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14557 echo "$as_me:14557: result: $ac_cv_func_XtAppInitialize" >&5
14558 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14559 if test $ac_cv_func_XtAppInitialize = yes; then
14563 echo "$as_me:14563: checking for XtAppInitialize in -lXt" >&5
14564 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14565 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14566 echo $ECHO_N "(cached) $ECHO_C" >&6
14568 ac_check_lib_save_LIBS=$LIBS
14569 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14570 cat >conftest.$ac_ext <<_ACEOF
14571 #line 14571 "configure"
14572 #include "confdefs.h"
14574 /* Override any gcc2 internal prototype to avoid an error. */
14578 /* We use char because int might match the return type of a gcc2
14579 builtin and then its argument prototype would still apply. */
14580 char XtAppInitialize ();
14584 XtAppInitialize ();
14589 rm -f conftest.$ac_objext conftest$ac_exeext
14590 if { (eval echo "$as_me:14590: \"$ac_link\"") >&5
14591 (eval $ac_link) 2>&5
14593 echo "$as_me:14593: \$? = $ac_status" >&5
14594 (exit $ac_status); } &&
14595 { ac_try='test -s conftest$ac_exeext'
14596 { (eval echo "$as_me:14596: \"$ac_try\"") >&5
14597 (eval $ac_try) 2>&5
14599 echo "$as_me:14599: \$? = $ac_status" >&5
14600 (exit $ac_status); }; }; then
14601 ac_cv_lib_Xt_XtAppInitialize=yes
14603 echo "$as_me: failed program was:" >&5
14604 cat conftest.$ac_ext >&5
14605 ac_cv_lib_Xt_XtAppInitialize=no
14607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14608 LIBS=$ac_check_lib_save_LIBS
14610 echo "$as_me:14610: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14611 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14612 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14614 cat >>confdefs.h <<\EOF
14615 #define HAVE_LIBXT 1
14619 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14626 if test $cf_have_X_LIBS = no ; then
14627 { echo "$as_me:14627: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14628 test program. You will have to check and add the proper libraries by hand
14630 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14631 test program. You will have to check and add the proper libraries by hand
14632 to makefile." >&2;}
14635 cf_x_athena_root=$cf_x_athena
14638 for cf_path in default \
14639 /usr/contrib/X11R6 \
14640 /usr/contrib/X11R5 \
14644 if test -z "$cf_x_athena_inc" ; then
14646 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
14647 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
14648 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
14649 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14650 for cf_X_CFLAGS in $X_CFLAGS
14652 case "x$cf_X_CFLAGS" in
14654 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14657 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14662 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14663 if test $cf_path != default ; then
14665 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14666 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14668 echo "$as_me:14668: checking for $cf_test in $cf_path" >&5
14669 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14671 echo "$as_me:14671: checking for $cf_test" >&5
14672 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14674 cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14678 #include <X11/Intrinsic.h>
14679 #include <$cf_test>
14688 rm -f conftest.$ac_objext
14689 if { (eval echo "$as_me:14689: \"$ac_compile\"") >&5
14690 (eval $ac_compile) 2>&5
14692 echo "$as_me:14692: \$? = $ac_status" >&5
14693 (exit $ac_status); } &&
14694 { ac_try='test -s conftest.$ac_objext'
14695 { (eval echo "$as_me:14695: \"$ac_try\"") >&5
14696 (eval $ac_try) 2>&5
14698 echo "$as_me:14698: \$? = $ac_status" >&5
14699 (exit $ac_status); }; }; then
14702 echo "$as_me: failed program was:" >&5
14703 cat conftest.$ac_ext >&5
14706 rm -f conftest.$ac_objext conftest.$ac_ext
14707 echo "$as_me:14707: result: $cf_result" >&5
14708 echo "${ECHO_T}$cf_result" >&6
14710 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
14711 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
14712 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
14714 if test "$cf_result" = yes ; then
14715 test "$cf_path" = default && cf_x_athena_inc=default
14716 test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
14722 if test -z "$cf_x_athena_inc" ; then
14723 { echo "$as_me:14723: WARNING: Unable to find Athena header files" >&5
14724 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
14725 elif test "$cf_x_athena_inc" != default ; then
14727 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14728 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14732 cf_x_athena_root=$cf_x_athena
14735 for cf_path in default \
14736 /usr/contrib/X11R6 \
14737 /usr/contrib/X11R5 \
14742 ${cf_x_athena_root} \
14743 ${cf_x_athena_root}7 \
14744 ${cf_x_athena_root}6
14747 "-l$cf_lib -lXmu" \
14748 "-l$cf_lib -lXpm -lXmu" \
14749 "-l${cf_lib}_s -lXmu_s"
14751 test -n "$cf_x_athena_lib" && break
14753 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
14754 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
14755 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
14756 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14757 for cf_X_CFLAGS in $X_CFLAGS
14759 case "x$cf_X_CFLAGS" in
14761 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14764 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14769 cf_test=XawSimpleMenuAddGlobalActions
14770 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
14772 cf_add_libs="$LIBS"
14775 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14776 # filter duplicates
14777 for cf_add_1lib in $cf_add_0lib; do
14778 for cf_add_2lib in $cf_add_libs; do
14779 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14784 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14786 LIBS="$cf_add_libs"
14788 echo "$as_me:14788: checking for $cf_test in $cf_libs" >&5
14789 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14790 cat >conftest.$ac_ext <<_ACEOF
14791 #line 14791 "configure"
14792 #include "confdefs.h"
14794 #include <X11/Intrinsic.h>
14795 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14801 $cf_test((XtAppContext) 0)
14806 rm -f conftest.$ac_objext conftest$ac_exeext
14807 if { (eval echo "$as_me:14807: \"$ac_link\"") >&5
14808 (eval $ac_link) 2>&5
14810 echo "$as_me:14810: \$? = $ac_status" >&5
14811 (exit $ac_status); } &&
14812 { ac_try='test -s conftest$ac_exeext'
14813 { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814 (eval $ac_try) 2>&5
14816 echo "$as_me:14816: \$? = $ac_status" >&5
14817 (exit $ac_status); }; }; then
14820 echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14825 echo "$as_me:14825: result: $cf_result" >&5
14826 echo "${ECHO_T}$cf_result" >&6
14828 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
14829 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
14830 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
14832 if test "$cf_result" = yes ; then
14833 cf_x_athena_lib="$cf_libs"
14837 test -n "$cf_x_athena_lib" && break
14841 if test -z "$cf_x_athena_lib" ; then
14842 { { echo "$as_me:14842: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14843 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14844 { (exit 1); exit 1; }; }
14847 cf_add_libs="$LIBS"
14850 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14851 # filter duplicates
14852 for cf_add_1lib in $cf_add_0lib; do
14853 for cf_add_2lib in $cf_add_libs; do
14854 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14859 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14861 LIBS="$cf_add_libs"
14863 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14865 cat >>confdefs.h <<EOF
14866 #define $cf_x_athena_LIBS 1
14871 if test -n "$ac_tool_prefix"; then
14872 for ac_prog in xcurses-config
14874 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14876 echo "$as_me:14876: checking for $ac_word" >&5
14877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14878 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14879 echo $ECHO_N "(cached) $ECHO_C" >&6
14881 if test -n "$XCURSES_CONFIG"; then
14882 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14884 ac_save_IFS=$IFS; IFS=$ac_path_separator
14886 for ac_dir in $ac_dummy; do
14888 test -z "$ac_dir" && ac_dir=.
14889 $as_executable_p "$ac_dir/$ac_word" || continue
14890 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14891 echo "$as_me:14891: found $ac_dir/$ac_word" >&5
14897 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14898 if test -n "$XCURSES_CONFIG"; then
14899 echo "$as_me:14899: result: $XCURSES_CONFIG" >&5
14900 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14902 echo "$as_me:14902: result: no" >&5
14903 echo "${ECHO_T}no" >&6
14906 test -n "$XCURSES_CONFIG" && break
14909 if test -z "$XCURSES_CONFIG"; then
14910 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14911 for ac_prog in xcurses-config
14913 # Extract the first word of "$ac_prog", so it can be a program name with args.
14914 set dummy $ac_prog; ac_word=$2
14915 echo "$as_me:14915: checking for $ac_word" >&5
14916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14917 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14918 echo $ECHO_N "(cached) $ECHO_C" >&6
14920 if test -n "$ac_ct_XCURSES_CONFIG"; then
14921 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14923 ac_save_IFS=$IFS; IFS=$ac_path_separator
14925 for ac_dir in $ac_dummy; do
14927 test -z "$ac_dir" && ac_dir=.
14928 $as_executable_p "$ac_dir/$ac_word" || continue
14929 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14930 echo "$as_me:14930: found $ac_dir/$ac_word" >&5
14936 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14937 if test -n "$ac_ct_XCURSES_CONFIG"; then
14938 echo "$as_me:14938: result: $ac_ct_XCURSES_CONFIG" >&5
14939 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14941 echo "$as_me:14941: result: no" >&5
14942 echo "${ECHO_T}no" >&6
14945 test -n "$ac_ct_XCURSES_CONFIG" && break
14947 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14949 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14952 if test "$XCURSES_CONFIG" != none ; then
14957 cf_new_extra_cppflags=
14959 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14961 case $cf_fix_cppflags in
14963 case $cf_add_cflags in
14964 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14965 case $cf_add_cflags in
14967 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14970 && test -z "${cf_tst_cflags}" \
14971 && cf_fix_cppflags=yes
14973 if test $cf_fix_cppflags = yes ; then
14975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14979 elif test "${cf_tst_cflags}" = "\"'" ; then
14981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14988 case "$CPPFLAGS" in
14992 case $cf_add_cflags in
14994 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14996 CPPFLAGS=`echo "$CPPFLAGS" | \
14997 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14998 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15003 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15004 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15011 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15012 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15022 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15025 && test -z "${cf_tst_cflags}" \
15026 && cf_fix_cppflags=no
15031 if test -n "$cf_new_cflags" ; then
15033 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15034 CFLAGS="${CFLAGS}$cf_new_cflags"
15038 if test -n "$cf_new_cppflags" ; then
15040 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15041 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15045 if test -n "$cf_new_extra_cppflags" ; then
15047 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15048 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15052 cf_add_libs="$LIBS"
15055 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15056 # filter duplicates
15057 for cf_add_1lib in $cf_add_0lib; do
15058 for cf_add_2lib in $cf_add_libs; do
15059 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15064 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15066 LIBS="$cf_add_libs"
15068 cf_cv_lib_XCurses=yes
15072 LDFLAGS="$LDFLAGS $X_LIBS"
15074 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15076 echo "${as_me:-configure}:15076: testing checking additions to CFLAGS ..." 1>&5
15078 cf_check_cflags="$CFLAGS"
15079 cf_check_cppflags="$CPPFLAGS"
15084 cf_new_extra_cppflags=
15086 for cf_add_cflags in $X_CFLAGS
15088 case $cf_fix_cppflags in
15090 case $cf_add_cflags in
15091 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15092 case $cf_add_cflags in
15094 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15097 && test -z "${cf_tst_cflags}" \
15098 && cf_fix_cppflags=yes
15100 if test $cf_fix_cppflags = yes ; then
15102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15106 elif test "${cf_tst_cflags}" = "\"'" ; then
15108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15115 case "$CPPFLAGS" in
15119 case $cf_add_cflags in
15121 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15123 CPPFLAGS=`echo "$CPPFLAGS" | \
15124 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15125 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15130 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15131 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15138 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15139 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15146 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15147 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15149 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15151 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15152 && test -z "${cf_tst_cflags}" \
15153 && cf_fix_cppflags=no
15158 if test -n "$cf_new_cflags" ; then
15159 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15161 echo "${as_me:-configure}:15161: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15163 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15164 CFLAGS="${CFLAGS}$cf_new_cflags"
15168 if test -n "$cf_new_cppflags" ; then
15169 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15171 echo "${as_me:-configure}:15171: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15173 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15174 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15178 if test -n "$cf_new_extra_cppflags" ; then
15179 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15181 echo "${as_me:-configure}:15181: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15183 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15184 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15188 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15189 cat >conftest.$ac_ext <<_ACEOF
15190 #line 15190 "configure"
15191 #include "confdefs.h"
15196 printf("Hello world");
15201 rm -f conftest.$ac_objext conftest$ac_exeext
15202 if { (eval echo "$as_me:15202: \"$ac_link\"") >&5
15203 (eval $ac_link) 2>&5
15205 echo "$as_me:15205: \$? = $ac_status" >&5
15206 (exit $ac_status); } &&
15207 { ac_try='test -s conftest$ac_exeext'
15208 { (eval echo "$as_me:15208: \"$ac_try\"") >&5
15209 (eval $ac_try) 2>&5
15211 echo "$as_me:15211: \$? = $ac_status" >&5
15212 (exit $ac_status); }; }; then
15215 echo "$as_me: failed program was:" >&5
15216 cat conftest.$ac_ext >&5
15217 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15219 echo "${as_me:-configure}:15219: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15221 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15222 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15224 echo "${as_me:-configure}:15224: testing but keeping change to \$CPPFLAGS ..." 1>&5
15227 CFLAGS="$cf_check_flags"
15229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15232 echo "$as_me:15232: checking for XOpenDisplay in -lX11" >&5
15233 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15234 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15235 echo $ECHO_N "(cached) $ECHO_C" >&6
15237 ac_check_lib_save_LIBS=$LIBS
15238 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15239 cat >conftest.$ac_ext <<_ACEOF
15240 #line 15240 "configure"
15241 #include "confdefs.h"
15243 /* Override any gcc2 internal prototype to avoid an error. */
15247 /* We use char because int might match the return type of a gcc2
15248 builtin and then its argument prototype would still apply. */
15249 char XOpenDisplay ();
15258 rm -f conftest.$ac_objext conftest$ac_exeext
15259 if { (eval echo "$as_me:15259: \"$ac_link\"") >&5
15260 (eval $ac_link) 2>&5
15262 echo "$as_me:15262: \$? = $ac_status" >&5
15263 (exit $ac_status); } &&
15264 { ac_try='test -s conftest$ac_exeext'
15265 { (eval echo "$as_me:15265: \"$ac_try\"") >&5
15266 (eval $ac_try) 2>&5
15268 echo "$as_me:15268: \$? = $ac_status" >&5
15269 (exit $ac_status); }; }; then
15270 ac_cv_lib_X11_XOpenDisplay=yes
15272 echo "$as_me: failed program was:" >&5
15273 cat conftest.$ac_ext >&5
15274 ac_cv_lib_X11_XOpenDisplay=no
15276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15277 LIBS=$ac_check_lib_save_LIBS
15279 echo "$as_me:15279: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15280 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15281 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15283 cf_add_libs="$LIBS"
15286 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15287 # filter duplicates
15288 for cf_add_1lib in $cf_add_0lib; do
15289 for cf_add_2lib in $cf_add_libs; do
15290 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15295 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15297 LIBS="$cf_add_libs"
15301 echo "$as_me:15301: checking for XCurses library" >&5
15302 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15303 if test "${cf_cv_lib_XCurses+set}" = set; then
15304 echo $ECHO_N "(cached) $ECHO_C" >&6
15307 cf_add_libs="$LIBS"
15310 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15311 # filter duplicates
15312 for cf_add_1lib in $cf_add_0lib; do
15313 for cf_add_2lib in $cf_add_libs; do
15314 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15319 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15321 LIBS="$cf_add_libs"
15323 cat >conftest.$ac_ext <<_ACEOF
15324 #line 15324 "configure"
15325 #include "confdefs.h"
15327 #include <xcurses.h>
15328 char *XCursesProgramName = "test";
15338 rm -f conftest.$ac_objext conftest$ac_exeext
15339 if { (eval echo "$as_me:15339: \"$ac_link\"") >&5
15340 (eval $ac_link) 2>&5
15342 echo "$as_me:15342: \$? = $ac_status" >&5
15343 (exit $ac_status); } &&
15344 { ac_try='test -s conftest$ac_exeext'
15345 { (eval echo "$as_me:15345: \"$ac_try\"") >&5
15346 (eval $ac_try) 2>&5
15348 echo "$as_me:15348: \$? = $ac_status" >&5
15349 (exit $ac_status); }; }; then
15350 cf_cv_lib_XCurses=yes
15352 echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 cf_cv_lib_XCurses=no
15356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15359 echo "$as_me:15359: result: $cf_cv_lib_XCurses" >&5
15360 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15364 if test $cf_cv_lib_XCurses = yes ; then
15366 cat >>confdefs.h <<\EOF
15370 cat >>confdefs.h <<\EOF
15374 echo "$as_me:15374: checking for xcurses.h" >&5
15375 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15376 if test "${ac_cv_header_xcurses_h+set}" = set; then
15377 echo $ECHO_N "(cached) $ECHO_C" >&6
15379 cat >conftest.$ac_ext <<_ACEOF
15380 #line 15380 "configure"
15381 #include "confdefs.h"
15382 #include <xcurses.h>
15384 if { (eval echo "$as_me:15384: \"$ac_cpp conftest.$ac_ext\"") >&5
15385 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15387 egrep -v '^ *\+' conftest.er1 >conftest.err
15389 cat conftest.err >&5
15390 echo "$as_me:15390: \$? = $ac_status" >&5
15391 (exit $ac_status); } >/dev/null; then
15392 if test -s conftest.err; then
15393 ac_cpp_err=$ac_c_preproc_warn_flag
15400 if test -z "$ac_cpp_err"; then
15401 ac_cv_header_xcurses_h=yes
15403 echo "$as_me: failed program was:" >&5
15404 cat conftest.$ac_ext >&5
15405 ac_cv_header_xcurses_h=no
15407 rm -f conftest.err conftest.$ac_ext
15409 echo "$as_me:15409: result: $ac_cv_header_xcurses_h" >&5
15410 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15411 if test $ac_cv_header_xcurses_h = yes; then
15413 cat >>confdefs.h <<\EOF
15414 #define HAVE_XCURSES 1
15420 { { echo "$as_me:15420: error: Cannot link with XCurses" >&5
15421 echo "$as_me: error: Cannot link with XCurses" >&2;}
15422 { (exit 1); exit 1; }; }
15427 { { echo "$as_me:15427: error: unexpected screen-value: $cf_cv_screen" >&5
15428 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15429 { (exit 1); exit 1; }; }
15433 : ${cf_nculib_root:=$cf_cv_screen}
15434 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15435 echo "$as_me:15435: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15436 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15437 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15438 echo $ECHO_N "(cached) $ECHO_C" >&6
15440 ac_check_lib_save_LIBS=$LIBS
15441 LIBS="-l$cf_nculib_root $LIBS"
15442 cat >conftest.$ac_ext <<_ACEOF
15443 #line 15443 "configure"
15444 #include "confdefs.h"
15446 /* Override any gcc2 internal prototype to avoid an error. */
15450 /* We use char because int might match the return type of a gcc2
15451 builtin and then its argument prototype would still apply. */
15452 char _nc_init_pthreads ();
15456 _nc_init_pthreads ();
15461 rm -f conftest.$ac_objext conftest$ac_exeext
15462 if { (eval echo "$as_me:15462: \"$ac_link\"") >&5
15463 (eval $ac_link) 2>&5
15465 echo "$as_me:15465: \$? = $ac_status" >&5
15466 (exit $ac_status); } &&
15467 { ac_try='test -s conftest$ac_exeext'
15468 { (eval echo "$as_me:15468: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15471 echo "$as_me:15471: \$? = $ac_status" >&5
15472 (exit $ac_status); }; }; then
15473 eval "$as_ac_Lib=yes"
15475 echo "$as_me: failed program was:" >&5
15476 cat conftest.$ac_ext >&5
15477 eval "$as_ac_Lib=no"
15479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15480 LIBS=$ac_check_lib_save_LIBS
15482 echo "$as_me:15482: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15483 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15484 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15485 cf_cv_ncurses_pthreads=yes
15487 cf_cv_ncurses_pthreads=no
15490 if test "$cf_cv_ncurses_pthreads" = yes
15493 cf_add_libs="$LIBS"
15496 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15497 # filter duplicates
15498 for cf_add_1lib in $cf_add_0lib; do
15499 for cf_add_2lib in $cf_add_libs; do
15500 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15505 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15507 LIBS="$cf_add_libs"
15511 case $cf_cv_screen in
15513 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15517 echo "$as_me:15517: checking for X11 rgb file" >&5
15518 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15520 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15521 if test "${with_x11_rgb+set}" = set; then
15522 withval="$with_x11_rgb"
15528 if test "x$RGB_PATH" = xauto
15530 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15532 /opt/local/share/X11/rgb.txt \
15533 /opt/X11/share/X11/rgb.txt \
15534 /usr/share/X11/rgb.txt \
15535 /usr/X11/share/X11/rgb.txt \
15536 /usr/X11/lib/X11/rgb.txt \
15537 /usr/lib/X11/rgb.txt \
15539 /usr/pkg/lib/X11/rgb.txt \
15540 /usr/X11R7/lib/X11/rgb.txt \
15541 /usr/X11R6/lib/X11/rgb.txt \
15542 /usr/X11R5/lib/X11/rgb.txt \
15543 /usr/X11R4/lib/X11/rgb.txt \
15544 /usr/local/lib/X11/rgb.txt \
15545 /usr/local/share/X11/rgb.txt \
15546 /usr/lib64/X11/rgb.txt
15548 if test -f "$cf_path" ; then
15549 RGB_PATH="$cf_path"
15556 if test "x$prefix" != xNONE; then
15557 cf_path_syntax="$prefix"
15559 cf_path_syntax="$ac_default_prefix"
15562 case ".$cf_path" in
15563 (.\$\(*\)*|.\'*\'*)
15567 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15569 (.\${*prefix}*|.\${*dir}*)
15570 eval cf_path="$cf_path"
15571 case ".$cf_path" in
15573 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15578 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15581 { { echo "$as_me:15581: error: expected a pathname, not \"$cf_path\"" >&5
15582 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15583 { (exit 1); exit 1; }; }
15589 echo "$as_me:15589: result: $RGB_PATH" >&5
15590 echo "${ECHO_T}$RGB_PATH" >&6
15592 cat >>confdefs.h <<EOF
15593 #define RGB_PATH "$cf_path"
15597 if test "$RGB_PATH" = no
15604 case $cf_cv_screen in
15606 cf_default_panel=no
15609 cf_default_tinfo=no
15611 (xcurses|bsdcurses)
15612 cf_default_panel=no
15615 cf_default_tinfo=yes
15618 cf_default_panel=yes
15619 cf_default_form=yes
15620 cf_default_menu=yes
15621 cf_default_tinfo=yes
15622 case $cf_cv_screen in
15624 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15630 echo "$as_me:15630: checking if you want to check for panel functions" >&5
15631 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15633 # Check whether --enable-panel or --disable-panel was given.
15634 if test "${enable_panel+set}" = set; then
15635 enableval="$enable_panel"
15636 test "$enableval" != no && enableval=yes
15637 if test "$enableval" != "yes" ; then
15640 cf_enable_panel=$cf_default_panel
15644 cf_enable_panel=$cf_default_panel
15647 echo "$as_me:15647: result: $cf_enable_panel" >&5
15648 echo "${ECHO_T}$cf_enable_panel" >&6
15649 if test $cf_enable_panel = yes
15652 cf_have_curses_lib=no
15654 : ${NCURSES_CONFIG_PKG:=none}
15655 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15657 elif test "x${PKG_CONFIG:=none}" != xnone; then
15658 echo "$as_me:15658: checking pkg-config for panel$cf_cv_libtype" >&5
15659 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15660 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15661 echo "$as_me:15661: result: yes" >&5
15662 echo "${ECHO_T}yes" >&6
15664 echo "$as_me:15664: checking if the panel$cf_cv_libtype package files work" >&5
15665 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15667 cf_save_CPPFLAGS="$CPPFLAGS"
15668 cf_save_LIBS="$LIBS"
15673 cf_new_extra_cppflags=
15675 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15677 case $cf_fix_cppflags in
15679 case $cf_add_cflags in
15680 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15681 case $cf_add_cflags in
15683 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15686 && test -z "${cf_tst_cflags}" \
15687 && cf_fix_cppflags=yes
15689 if test $cf_fix_cppflags = yes ; then
15691 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15692 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15695 elif test "${cf_tst_cflags}" = "\"'" ; then
15697 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15698 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15704 case "$CPPFLAGS" in
15708 case $cf_add_cflags in
15710 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15712 CPPFLAGS=`echo "$CPPFLAGS" | \
15713 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15714 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15719 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15720 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15727 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15728 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15735 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15736 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15738 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15740 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15741 && test -z "${cf_tst_cflags}" \
15742 && cf_fix_cppflags=no
15747 if test -n "$cf_new_cflags" ; then
15749 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15750 CFLAGS="${CFLAGS}$cf_new_cflags"
15754 if test -n "$cf_new_cppflags" ; then
15756 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15757 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15761 if test -n "$cf_new_extra_cppflags" ; then
15763 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15764 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15768 cf_add_libs="$LIBS"
15771 for cf_add_1lib in `$PKG_CONFIG --libs panel$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15772 # filter duplicates
15773 for cf_add_1lib in $cf_add_0lib; do
15774 for cf_add_2lib in $cf_add_libs; do
15775 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15780 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15782 LIBS="$cf_add_libs"
15784 cat >conftest.$ac_ext <<_ACEOF
15785 #line 15785 "configure"
15786 #include "confdefs.h"
15791 (void) new_panel ( 0 );
15796 rm -f conftest.$ac_objext conftest$ac_exeext
15797 if { (eval echo "$as_me:15797: \"$ac_link\"") >&5
15798 (eval $ac_link) 2>&5
15800 echo "$as_me:15800: \$? = $ac_status" >&5
15801 (exit $ac_status); } &&
15802 { ac_try='test -s conftest$ac_exeext'
15803 { (eval echo "$as_me:15803: \"$ac_try\"") >&5
15804 (eval $ac_try) 2>&5
15806 echo "$as_me:15806: \$? = $ac_status" >&5
15807 (exit $ac_status); }; }; then
15808 if test "$cross_compiling" = yes; then
15809 cf_have_curses_lib=maybe
15811 cat >conftest.$ac_ext <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15816 { (void) new_panel ( 0 ); return 0; }
15818 rm -f conftest$ac_exeext
15819 if { (eval echo "$as_me:15819: \"$ac_link\"") >&5
15820 (eval $ac_link) 2>&5
15822 echo "$as_me:15822: \$? = $ac_status" >&5
15823 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15824 { (eval echo "$as_me:15824: \"$ac_try\"") >&5
15825 (eval $ac_try) 2>&5
15827 echo "$as_me:15827: \$? = $ac_status" >&5
15828 (exit $ac_status); }; }; then
15829 cf_have_curses_lib=yes
15831 echo "$as_me: program exited with status $ac_status" >&5
15832 echo "$as_me: failed program was:" >&5
15833 cat conftest.$ac_ext >&5
15834 cf_have_curses_lib=no
15836 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15839 echo "$as_me: failed program was:" >&5
15840 cat conftest.$ac_ext >&5
15841 cf_have_curses_lib=no
15843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15844 echo "$as_me:15844: result: $cf_have_curses_lib" >&5
15845 echo "${ECHO_T}$cf_have_curses_lib" >&6
15846 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15847 if test "$cf_have_curses_lib" != "yes"
15849 CPPFLAGS="$cf_save_CPPFLAGS"
15850 LIBS="$cf_save_LIBS"
15853 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15855 cat >>confdefs.h <<EOF
15856 #define $cf_upper 1
15862 if test "$cf_have_curses_lib" = no; then
15863 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15864 echo "$as_me:15864: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15865 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15866 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
15869 ac_check_lib_save_LIBS=$LIBS
15870 LIBS="-lpanel$cf_cv_libtype $LIBS"
15871 cat >conftest.$ac_ext <<_ACEOF
15872 #line 15872 "configure"
15873 #include "confdefs.h"
15875 /* Override any gcc2 internal prototype to avoid an error. */
15879 /* We use char because int might match the return type of a gcc2
15880 builtin and then its argument prototype would still apply. */
15890 rm -f conftest.$ac_objext conftest$ac_exeext
15891 if { (eval echo "$as_me:15891: \"$ac_link\"") >&5
15892 (eval $ac_link) 2>&5
15894 echo "$as_me:15894: \$? = $ac_status" >&5
15895 (exit $ac_status); } &&
15896 { ac_try='test -s conftest$ac_exeext'
15897 { (eval echo "$as_me:15897: \"$ac_try\"") >&5
15898 (eval $ac_try) 2>&5
15900 echo "$as_me:15900: \$? = $ac_status" >&5
15901 (exit $ac_status); }; }; then
15902 eval "$as_ac_Lib=yes"
15904 echo "$as_me: failed program was:" >&5
15905 cat conftest.$ac_ext >&5
15906 eval "$as_ac_Lib=no"
15908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15909 LIBS=$ac_check_lib_save_LIBS
15911 echo "$as_me:15911: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15912 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15913 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15915 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15917 cf_add_libs="$LIBS"
15920 for cf_add_1lib in -lpanel$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15921 # filter duplicates
15922 for cf_add_1lib in $cf_add_0lib; do
15923 for cf_add_2lib in $cf_add_libs; do
15924 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15929 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15931 LIBS="$cf_add_libs"
15933 cat >>confdefs.h <<EOF
15934 #define $cf_upper 1
15941 cf_curses_headers="$cf_curses_headers panel.h"
15944 echo "$as_me:15944: checking if you want to check for menu functions" >&5
15945 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15947 # Check whether --enable-menu or --disable-menu was given.
15948 if test "${enable_menu+set}" = set; then
15949 enableval="$enable_menu"
15950 test "$enableval" != no && enableval=yes
15951 if test "$enableval" != "yes" ; then
15954 cf_enable_menu=$cf_default_menu
15958 cf_enable_menu=$cf_default_menu
15961 echo "$as_me:15961: result: $cf_enable_menu" >&5
15962 echo "${ECHO_T}$cf_enable_menu" >&6
15963 if test $cf_enable_menu = yes
15965 case $cf_cv_screen in
15970 echo "$as_me:15970: checking for NetBSD menu.h" >&5
15971 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15972 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15973 echo $ECHO_N "(cached) $ECHO_C" >&6
15976 cat >conftest.$ac_ext <<_ACEOF
15977 #line 15977 "configure"
15978 #include "confdefs.h"
15980 #include <${cf_cv_ncurses_header:-curses.h}>
15988 int y = menu->max_item_width;
15994 rm -f conftest.$ac_objext
15995 if { (eval echo "$as_me:15995: \"$ac_compile\"") >&5
15996 (eval $ac_compile) 2>&5
15998 echo "$as_me:15998: \$? = $ac_status" >&5
15999 (exit $ac_status); } &&
16000 { ac_try='test -s conftest.$ac_objext'
16001 { (eval echo "$as_me:16001: \"$ac_try\"") >&5
16002 (eval $ac_try) 2>&5
16004 echo "$as_me:16004: \$? = $ac_status" >&5
16005 (exit $ac_status); }; }; then
16006 cf_cv_netbsd_menu_h=yes
16009 echo "$as_me: failed program was:" >&5
16010 cat conftest.$ac_ext >&5
16011 cf_cv_netbsd_menu_h=no
16013 rm -f conftest.$ac_objext conftest.$ac_ext
16016 echo "$as_me:16016: result: $cf_cv_netbsd_menu_h" >&5
16017 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16019 test "$cf_cv_netbsd_menu_h" = yes &&
16020 cat >>confdefs.h <<\EOF
16021 #define HAVE_NETBSD_MENU_H 1
16027 cf_have_curses_lib=no
16029 : ${NCURSES_CONFIG_PKG:=none}
16030 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16032 elif test "x${PKG_CONFIG:=none}" != xnone; then
16033 echo "$as_me:16033: checking pkg-config for menu$cf_cv_libtype" >&5
16034 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
16035 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
16036 echo "$as_me:16036: result: yes" >&5
16037 echo "${ECHO_T}yes" >&6
16039 echo "$as_me:16039: checking if the menu$cf_cv_libtype package files work" >&5
16040 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
16042 cf_save_CPPFLAGS="$CPPFLAGS"
16043 cf_save_LIBS="$LIBS"
16048 cf_new_extra_cppflags=
16050 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
16052 case $cf_fix_cppflags in
16054 case $cf_add_cflags in
16055 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16056 case $cf_add_cflags in
16058 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16060 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16061 && test -z "${cf_tst_cflags}" \
16062 && cf_fix_cppflags=yes
16064 if test $cf_fix_cppflags = yes ; then
16066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16070 elif test "${cf_tst_cflags}" = "\"'" ; then
16072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16079 case "$CPPFLAGS" in
16083 case $cf_add_cflags in
16085 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16087 CPPFLAGS=`echo "$CPPFLAGS" | \
16088 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16089 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16094 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16095 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16102 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16103 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16113 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16115 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16116 && test -z "${cf_tst_cflags}" \
16117 && cf_fix_cppflags=no
16122 if test -n "$cf_new_cflags" ; then
16124 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16125 CFLAGS="${CFLAGS}$cf_new_cflags"
16129 if test -n "$cf_new_cppflags" ; then
16131 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16132 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16136 if test -n "$cf_new_extra_cppflags" ; then
16138 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16139 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16143 cf_add_libs="$LIBS"
16146 for cf_add_1lib in `$PKG_CONFIG --libs menu$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16147 # filter duplicates
16148 for cf_add_1lib in $cf_add_0lib; do
16149 for cf_add_2lib in $cf_add_libs; do
16150 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16155 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16157 LIBS="$cf_add_libs"
16159 cat >conftest.$ac_ext <<_ACEOF
16160 #line 16160 "configure"
16161 #include "confdefs.h"
16166 (void) menu_driver ( 0,0 );
16171 rm -f conftest.$ac_objext conftest$ac_exeext
16172 if { (eval echo "$as_me:16172: \"$ac_link\"") >&5
16173 (eval $ac_link) 2>&5
16175 echo "$as_me:16175: \$? = $ac_status" >&5
16176 (exit $ac_status); } &&
16177 { ac_try='test -s conftest$ac_exeext'
16178 { (eval echo "$as_me:16178: \"$ac_try\"") >&5
16179 (eval $ac_try) 2>&5
16181 echo "$as_me:16181: \$? = $ac_status" >&5
16182 (exit $ac_status); }; }; then
16183 if test "$cross_compiling" = yes; then
16184 cf_have_curses_lib=maybe
16186 cat >conftest.$ac_ext <<_ACEOF
16187 #line 16187 "configure"
16188 #include "confdefs.h"
16191 { (void) menu_driver ( 0,0 ); return 0; }
16193 rm -f conftest$ac_exeext
16194 if { (eval echo "$as_me:16194: \"$ac_link\"") >&5
16195 (eval $ac_link) 2>&5
16197 echo "$as_me:16197: \$? = $ac_status" >&5
16198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16199 { (eval echo "$as_me:16199: \"$ac_try\"") >&5
16200 (eval $ac_try) 2>&5
16202 echo "$as_me:16202: \$? = $ac_status" >&5
16203 (exit $ac_status); }; }; then
16204 cf_have_curses_lib=yes
16206 echo "$as_me: program exited with status $ac_status" >&5
16207 echo "$as_me: failed program was:" >&5
16208 cat conftest.$ac_ext >&5
16209 cf_have_curses_lib=no
16211 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16214 echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 cf_have_curses_lib=no
16218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16219 echo "$as_me:16219: result: $cf_have_curses_lib" >&5
16220 echo "${ECHO_T}$cf_have_curses_lib" >&6
16221 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16222 if test "$cf_have_curses_lib" != "yes"
16224 CPPFLAGS="$cf_save_CPPFLAGS"
16225 LIBS="$cf_save_LIBS"
16228 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16230 cat >>confdefs.h <<EOF
16231 #define $cf_upper 1
16237 if test "$cf_have_curses_lib" = no; then
16238 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16239 echo "$as_me:16239: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16240 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16241 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16242 echo $ECHO_N "(cached) $ECHO_C" >&6
16244 ac_check_lib_save_LIBS=$LIBS
16245 LIBS="-lmenu$cf_cv_libtype $LIBS"
16246 cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16250 /* Override any gcc2 internal prototype to avoid an error. */
16254 /* We use char because int might match the return type of a gcc2
16255 builtin and then its argument prototype would still apply. */
16256 char menu_driver ();
16265 rm -f conftest.$ac_objext conftest$ac_exeext
16266 if { (eval echo "$as_me:16266: \"$ac_link\"") >&5
16267 (eval $ac_link) 2>&5
16269 echo "$as_me:16269: \$? = $ac_status" >&5
16270 (exit $ac_status); } &&
16271 { ac_try='test -s conftest$ac_exeext'
16272 { (eval echo "$as_me:16272: \"$ac_try\"") >&5
16273 (eval $ac_try) 2>&5
16275 echo "$as_me:16275: \$? = $ac_status" >&5
16276 (exit $ac_status); }; }; then
16277 eval "$as_ac_Lib=yes"
16279 echo "$as_me: failed program was:" >&5
16280 cat conftest.$ac_ext >&5
16281 eval "$as_ac_Lib=no"
16283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16284 LIBS=$ac_check_lib_save_LIBS
16286 echo "$as_me:16286: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16287 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16288 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16290 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16292 cf_add_libs="$LIBS"
16295 for cf_add_1lib in -lmenu$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16296 # filter duplicates
16297 for cf_add_1lib in $cf_add_0lib; do
16298 for cf_add_2lib in $cf_add_libs; do
16299 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16304 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16306 LIBS="$cf_add_libs"
16308 cat >>confdefs.h <<EOF
16309 #define $cf_upper 1
16316 cf_curses_headers="$cf_curses_headers menu.h"
16319 echo "$as_me:16319: checking if you want to check for form functions" >&5
16320 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16322 # Check whether --enable-form or --disable-form was given.
16323 if test "${enable_form+set}" = set; then
16324 enableval="$enable_form"
16325 test "$enableval" != no && enableval=yes
16326 if test "$enableval" != "yes" ; then
16329 cf_enable_form=$cf_default_form
16333 cf_enable_form=$cf_default_form
16336 echo "$as_me:16336: result: $cf_enable_form" >&5
16337 echo "${ECHO_T}$cf_enable_form" >&6
16338 if test $cf_enable_form = yes
16340 case $cf_cv_screen in
16345 echo "$as_me:16345: checking for NetBSD form.h" >&5
16346 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16347 if test "${cf_cv_netbsd_form_h+set}" = set; then
16348 echo $ECHO_N "(cached) $ECHO_C" >&6
16351 cat >conftest.$ac_ext <<_ACEOF
16352 #line 16352 "configure"
16353 #include "confdefs.h"
16355 #include <${cf_cv_ncurses_header:-curses.h}>
16363 int y = current_field(form)->cursor_ypos;
16364 int x = current_field(form)->cursor_xpos;
16370 rm -f conftest.$ac_objext
16371 if { (eval echo "$as_me:16371: \"$ac_compile\"") >&5
16372 (eval $ac_compile) 2>&5
16374 echo "$as_me:16374: \$? = $ac_status" >&5
16375 (exit $ac_status); } &&
16376 { ac_try='test -s conftest.$ac_objext'
16377 { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378 (eval $ac_try) 2>&5
16380 echo "$as_me:16380: \$? = $ac_status" >&5
16381 (exit $ac_status); }; }; then
16382 cf_cv_netbsd_form_h=yes
16385 echo "$as_me: failed program was:" >&5
16386 cat conftest.$ac_ext >&5
16387 cf_cv_netbsd_form_h=no
16389 rm -f conftest.$ac_objext conftest.$ac_ext
16392 echo "$as_me:16392: result: $cf_cv_netbsd_form_h" >&5
16393 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16395 test "$cf_cv_netbsd_form_h" = yes &&
16396 cat >>confdefs.h <<\EOF
16397 #define HAVE_NETBSD_FORM_H 1
16403 cf_have_curses_lib=no
16405 : ${NCURSES_CONFIG_PKG:=none}
16406 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16408 elif test "x${PKG_CONFIG:=none}" != xnone; then
16409 echo "$as_me:16409: checking pkg-config for form$cf_cv_libtype" >&5
16410 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16411 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16412 echo "$as_me:16412: result: yes" >&5
16413 echo "${ECHO_T}yes" >&6
16415 echo "$as_me:16415: checking if the form$cf_cv_libtype package files work" >&5
16416 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16418 cf_save_CPPFLAGS="$CPPFLAGS"
16419 cf_save_LIBS="$LIBS"
16424 cf_new_extra_cppflags=
16426 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16428 case $cf_fix_cppflags in
16430 case $cf_add_cflags in
16431 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16432 case $cf_add_cflags in
16434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16437 && test -z "${cf_tst_cflags}" \
16438 && cf_fix_cppflags=yes
16440 if test $cf_fix_cppflags = yes ; then
16442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16446 elif test "${cf_tst_cflags}" = "\"'" ; then
16448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16455 case "$CPPFLAGS" in
16459 case $cf_add_cflags in
16461 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16463 CPPFLAGS=`echo "$CPPFLAGS" | \
16464 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16465 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16470 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16471 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16478 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16479 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16492 && test -z "${cf_tst_cflags}" \
16493 && cf_fix_cppflags=no
16498 if test -n "$cf_new_cflags" ; then
16500 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16501 CFLAGS="${CFLAGS}$cf_new_cflags"
16505 if test -n "$cf_new_cppflags" ; then
16507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16508 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16512 if test -n "$cf_new_extra_cppflags" ; then
16514 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16515 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16519 cf_add_libs="$LIBS"
16522 for cf_add_1lib in `$PKG_CONFIG --libs form$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16523 # filter duplicates
16524 for cf_add_1lib in $cf_add_0lib; do
16525 for cf_add_2lib in $cf_add_libs; do
16526 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16531 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16533 LIBS="$cf_add_libs"
16535 cat >conftest.$ac_ext <<_ACEOF
16536 #line 16536 "configure"
16537 #include "confdefs.h"
16542 (void) form_driver ( 0,0 );
16547 rm -f conftest.$ac_objext conftest$ac_exeext
16548 if { (eval echo "$as_me:16548: \"$ac_link\"") >&5
16549 (eval $ac_link) 2>&5
16551 echo "$as_me:16551: \$? = $ac_status" >&5
16552 (exit $ac_status); } &&
16553 { ac_try='test -s conftest$ac_exeext'
16554 { (eval echo "$as_me:16554: \"$ac_try\"") >&5
16555 (eval $ac_try) 2>&5
16557 echo "$as_me:16557: \$? = $ac_status" >&5
16558 (exit $ac_status); }; }; then
16559 if test "$cross_compiling" = yes; then
16560 cf_have_curses_lib=maybe
16562 cat >conftest.$ac_ext <<_ACEOF
16563 #line 16563 "configure"
16564 #include "confdefs.h"
16567 { (void) form_driver ( 0,0 ); return 0; }
16569 rm -f conftest$ac_exeext
16570 if { (eval echo "$as_me:16570: \"$ac_link\"") >&5
16571 (eval $ac_link) 2>&5
16573 echo "$as_me:16573: \$? = $ac_status" >&5
16574 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16575 { (eval echo "$as_me:16575: \"$ac_try\"") >&5
16576 (eval $ac_try) 2>&5
16578 echo "$as_me:16578: \$? = $ac_status" >&5
16579 (exit $ac_status); }; }; then
16580 cf_have_curses_lib=yes
16582 echo "$as_me: program exited with status $ac_status" >&5
16583 echo "$as_me: failed program was:" >&5
16584 cat conftest.$ac_ext >&5
16585 cf_have_curses_lib=no
16587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16590 echo "$as_me: failed program was:" >&5
16591 cat conftest.$ac_ext >&5
16592 cf_have_curses_lib=no
16594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16595 echo "$as_me:16595: result: $cf_have_curses_lib" >&5
16596 echo "${ECHO_T}$cf_have_curses_lib" >&6
16597 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16598 if test "$cf_have_curses_lib" != "yes"
16600 CPPFLAGS="$cf_save_CPPFLAGS"
16601 LIBS="$cf_save_LIBS"
16604 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16606 cat >>confdefs.h <<EOF
16607 #define $cf_upper 1
16613 if test "$cf_have_curses_lib" = no; then
16614 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16615 echo "$as_me:16615: checking for form_driver in -lform$cf_cv_libtype" >&5
16616 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16617 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16618 echo $ECHO_N "(cached) $ECHO_C" >&6
16620 ac_check_lib_save_LIBS=$LIBS
16621 LIBS="-lform$cf_cv_libtype $LIBS"
16622 cat >conftest.$ac_ext <<_ACEOF
16623 #line 16623 "configure"
16624 #include "confdefs.h"
16626 /* Override any gcc2 internal prototype to avoid an error. */
16630 /* We use char because int might match the return type of a gcc2
16631 builtin and then its argument prototype would still apply. */
16632 char form_driver ();
16641 rm -f conftest.$ac_objext conftest$ac_exeext
16642 if { (eval echo "$as_me:16642: \"$ac_link\"") >&5
16643 (eval $ac_link) 2>&5
16645 echo "$as_me:16645: \$? = $ac_status" >&5
16646 (exit $ac_status); } &&
16647 { ac_try='test -s conftest$ac_exeext'
16648 { (eval echo "$as_me:16648: \"$ac_try\"") >&5
16649 (eval $ac_try) 2>&5
16651 echo "$as_me:16651: \$? = $ac_status" >&5
16652 (exit $ac_status); }; }; then
16653 eval "$as_ac_Lib=yes"
16655 echo "$as_me: failed program was:" >&5
16656 cat conftest.$ac_ext >&5
16657 eval "$as_ac_Lib=no"
16659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16660 LIBS=$ac_check_lib_save_LIBS
16662 echo "$as_me:16662: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16663 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16664 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16666 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16668 cf_add_libs="$LIBS"
16671 for cf_add_1lib in -lform$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16672 # filter duplicates
16673 for cf_add_1lib in $cf_add_0lib; do
16674 for cf_add_2lib in $cf_add_libs; do
16675 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16680 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16682 LIBS="$cf_add_libs"
16684 cat >>confdefs.h <<EOF
16685 #define $cf_upper 1
16692 cf_curses_headers="$cf_curses_headers form.h"
16695 # look for curses-related headers
16697 for ac_header in $cf_curses_headers
16699 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16700 echo "$as_me:16700: checking for $ac_header" >&5
16701 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16703 echo $ECHO_N "(cached) $ECHO_C" >&6
16705 cat >conftest.$ac_ext <<_ACEOF
16706 #line 16706 "configure"
16707 #include "confdefs.h"
16708 #include <$ac_header>
16710 if { (eval echo "$as_me:16710: \"$ac_cpp conftest.$ac_ext\"") >&5
16711 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16713 egrep -v '^ *\+' conftest.er1 >conftest.err
16715 cat conftest.err >&5
16716 echo "$as_me:16716: \$? = $ac_status" >&5
16717 (exit $ac_status); } >/dev/null; then
16718 if test -s conftest.err; then
16719 ac_cpp_err=$ac_c_preproc_warn_flag
16726 if test -z "$ac_cpp_err"; then
16727 eval "$as_ac_Header=yes"
16729 echo "$as_me: failed program was:" >&5
16730 cat conftest.$ac_ext >&5
16731 eval "$as_ac_Header=no"
16733 rm -f conftest.err conftest.$ac_ext
16735 echo "$as_me:16735: result: `eval echo '${'$as_ac_Header'}'`" >&5
16736 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16737 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16738 cat >>confdefs.h <<EOF
16739 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16745 echo "$as_me:16745: checking for ANSI C header files" >&5
16746 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16747 if test "${ac_cv_header_stdc+set}" = set; then
16748 echo $ECHO_N "(cached) $ECHO_C" >&6
16750 cat >conftest.$ac_ext <<_ACEOF
16751 #line 16751 "configure"
16752 #include "confdefs.h"
16753 #include <stdlib.h>
16754 #include <stdarg.h>
16755 #include <string.h>
16759 if { (eval echo "$as_me:16759: \"$ac_cpp conftest.$ac_ext\"") >&5
16760 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16762 egrep -v '^ *\+' conftest.er1 >conftest.err
16764 cat conftest.err >&5
16765 echo "$as_me:16765: \$? = $ac_status" >&5
16766 (exit $ac_status); } >/dev/null; then
16767 if test -s conftest.err; then
16768 ac_cpp_err=$ac_c_preproc_warn_flag
16775 if test -z "$ac_cpp_err"; then
16776 ac_cv_header_stdc=yes
16778 echo "$as_me: failed program was:" >&5
16779 cat conftest.$ac_ext >&5
16780 ac_cv_header_stdc=no
16782 rm -f conftest.err conftest.$ac_ext
16784 if test $ac_cv_header_stdc = yes; then
16785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16786 cat >conftest.$ac_ext <<_ACEOF
16787 #line 16787 "configure"
16788 #include "confdefs.h"
16789 #include <string.h>
16792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16793 egrep "memchr" >/dev/null 2>&1; then
16796 ac_cv_header_stdc=no
16802 if test $ac_cv_header_stdc = yes; then
16803 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16804 cat >conftest.$ac_ext <<_ACEOF
16805 #line 16805 "configure"
16806 #include "confdefs.h"
16807 #include <stdlib.h>
16810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16811 egrep "free" >/dev/null 2>&1; then
16814 ac_cv_header_stdc=no
16820 if test $ac_cv_header_stdc = yes; then
16821 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16822 if test "$cross_compiling" = yes; then
16825 cat >conftest.$ac_ext <<_ACEOF
16826 #line 16826 "configure"
16827 #include "confdefs.h"
16829 #if ((' ' & 0x0FF) == 0x020)
16830 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16831 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16833 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16834 || ('j' <= (c) && (c) <= 'r') \
16835 || ('s' <= (c) && (c) <= 'z'))
16836 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16839 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16844 for (i = 0; i < 256; i++)
16845 if (XOR (islower (i), ISLOWER (i))
16846 || toupper (i) != TOUPPER (i))
16847 $ac_main_return(2);
16848 $ac_main_return (0);
16851 rm -f conftest$ac_exeext
16852 if { (eval echo "$as_me:16852: \"$ac_link\"") >&5
16853 (eval $ac_link) 2>&5
16855 echo "$as_me:16855: \$? = $ac_status" >&5
16856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16857 { (eval echo "$as_me:16857: \"$ac_try\"") >&5
16858 (eval $ac_try) 2>&5
16860 echo "$as_me:16860: \$? = $ac_status" >&5
16861 (exit $ac_status); }; }; then
16864 echo "$as_me: program exited with status $ac_status" >&5
16865 echo "$as_me: failed program was:" >&5
16866 cat conftest.$ac_ext >&5
16867 ac_cv_header_stdc=no
16869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16873 echo "$as_me:16873: result: $ac_cv_header_stdc" >&5
16874 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16875 if test $ac_cv_header_stdc = yes; then
16877 cat >>confdefs.h <<\EOF
16878 #define STDC_HEADERS 1
16883 echo "$as_me:16883: checking whether time.h and sys/time.h may both be included" >&5
16884 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16885 if test "${ac_cv_header_time+set}" = set; then
16886 echo $ECHO_N "(cached) $ECHO_C" >&6
16888 cat >conftest.$ac_ext <<_ACEOF
16889 #line 16889 "configure"
16890 #include "confdefs.h"
16891 #include <sys/types.h>
16892 #include <sys/time.h>
16898 if ((struct tm *) 0)
16904 rm -f conftest.$ac_objext
16905 if { (eval echo "$as_me:16905: \"$ac_compile\"") >&5
16906 (eval $ac_compile) 2>&5
16908 echo "$as_me:16908: \$? = $ac_status" >&5
16909 (exit $ac_status); } &&
16910 { ac_try='test -s conftest.$ac_objext'
16911 { (eval echo "$as_me:16911: \"$ac_try\"") >&5
16912 (eval $ac_try) 2>&5
16914 echo "$as_me:16914: \$? = $ac_status" >&5
16915 (exit $ac_status); }; }; then
16916 ac_cv_header_time=yes
16918 echo "$as_me: failed program was:" >&5
16919 cat conftest.$ac_ext >&5
16920 ac_cv_header_time=no
16922 rm -f conftest.$ac_objext conftest.$ac_ext
16924 echo "$as_me:16924: result: $ac_cv_header_time" >&5
16925 echo "${ECHO_T}$ac_cv_header_time" >&6
16926 if test $ac_cv_header_time = yes; then
16928 cat >>confdefs.h <<\EOF
16929 #define TIME_WITH_SYS_TIME 1
16947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16948 echo "$as_me:16948: checking for $ac_header" >&5
16949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16951 echo $ECHO_N "(cached) $ECHO_C" >&6
16953 cat >conftest.$ac_ext <<_ACEOF
16954 #line 16954 "configure"
16955 #include "confdefs.h"
16956 #include <$ac_header>
16958 if { (eval echo "$as_me:16958: \"$ac_cpp conftest.$ac_ext\"") >&5
16959 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16961 egrep -v '^ *\+' conftest.er1 >conftest.err
16963 cat conftest.err >&5
16964 echo "$as_me:16964: \$? = $ac_status" >&5
16965 (exit $ac_status); } >/dev/null; then
16966 if test -s conftest.err; then
16967 ac_cpp_err=$ac_c_preproc_warn_flag
16974 if test -z "$ac_cpp_err"; then
16975 eval "$as_ac_Header=yes"
16977 echo "$as_me: failed program was:" >&5
16978 cat conftest.$ac_ext >&5
16979 eval "$as_ac_Header=no"
16981 rm -f conftest.err conftest.$ac_ext
16983 echo "$as_me:16983: result: `eval echo '${'$as_ac_Header'}'`" >&5
16984 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16985 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16986 cat >>confdefs.h <<EOF
16987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16993 for ac_header in unistd.h getopt.h
16995 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16996 echo "$as_me:16996: checking for $ac_header" >&5
16997 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16998 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16999 echo $ECHO_N "(cached) $ECHO_C" >&6
17001 cat >conftest.$ac_ext <<_ACEOF
17002 #line 17002 "configure"
17003 #include "confdefs.h"
17004 #include <$ac_header>
17006 if { (eval echo "$as_me:17006: \"$ac_cpp conftest.$ac_ext\"") >&5
17007 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17009 egrep -v '^ *\+' conftest.er1 >conftest.err
17011 cat conftest.err >&5
17012 echo "$as_me:17012: \$? = $ac_status" >&5
17013 (exit $ac_status); } >/dev/null; then
17014 if test -s conftest.err; then
17015 ac_cpp_err=$ac_c_preproc_warn_flag
17022 if test -z "$ac_cpp_err"; then
17023 eval "$as_ac_Header=yes"
17025 echo "$as_me: failed program was:" >&5
17026 cat conftest.$ac_ext >&5
17027 eval "$as_ac_Header=no"
17029 rm -f conftest.err conftest.$ac_ext
17031 echo "$as_me:17031: result: `eval echo '${'$as_ac_Header'}'`" >&5
17032 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17033 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17034 cat >>confdefs.h <<EOF
17035 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17041 echo "$as_me:17041: checking for header declaring getopt variables" >&5
17042 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17043 if test "${cf_cv_getopt_header+set}" = set; then
17044 echo $ECHO_N "(cached) $ECHO_C" >&6
17047 cf_cv_getopt_header=none
17048 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17050 cat >conftest.$ac_ext <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17054 #include <$cf_header>
17058 int x = optind; char *y = optarg
17063 rm -f conftest.$ac_objext
17064 if { (eval echo "$as_me:17064: \"$ac_compile\"") >&5
17065 (eval $ac_compile) 2>&5
17067 echo "$as_me:17067: \$? = $ac_status" >&5
17068 (exit $ac_status); } &&
17069 { ac_try='test -s conftest.$ac_objext'
17070 { (eval echo "$as_me:17070: \"$ac_try\"") >&5
17071 (eval $ac_try) 2>&5
17073 echo "$as_me:17073: \$? = $ac_status" >&5
17074 (exit $ac_status); }; }; then
17075 cf_cv_getopt_header=$cf_header
17078 echo "$as_me: failed program was:" >&5
17079 cat conftest.$ac_ext >&5
17081 rm -f conftest.$ac_objext conftest.$ac_ext
17085 echo "$as_me:17085: result: $cf_cv_getopt_header" >&5
17086 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17087 if test $cf_cv_getopt_header != none ; then
17089 cat >>confdefs.h <<\EOF
17090 #define HAVE_GETOPT_HEADER 1
17094 if test $cf_cv_getopt_header = getopt.h ; then
17096 cat >>confdefs.h <<\EOF
17097 #define NEED_GETOPT_H 1
17109 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17110 echo "$as_me:17110: checking for $ac_func" >&5
17111 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17112 if eval "test \"\${$as_ac_var+set}\" = set"; then
17113 echo $ECHO_N "(cached) $ECHO_C" >&6
17115 cat >conftest.$ac_ext <<_ACEOF
17116 #line 17116 "configure"
17117 #include "confdefs.h"
17118 #define $ac_func autoconf_temporary
17119 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17126 /* We use char because int might match the return type of a gcc2
17127 builtin and then its argument prototype would still apply. */
17128 char $ac_func (void);
17134 /* The GNU C library defines stubs for functions which it implements
17135 to always fail with ENOSYS. Some functions are actually named
17136 something starting with __ and the normal name is an alias. */
17137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17138 #error found stub for $ac_func
17141 return $ac_func ();
17146 rm -f conftest.$ac_objext conftest$ac_exeext
17147 if { (eval echo "$as_me:17147: \"$ac_link\"") >&5
17148 (eval $ac_link) 2>&5
17150 echo "$as_me:17150: \$? = $ac_status" >&5
17151 (exit $ac_status); } &&
17152 { ac_try='test -s conftest$ac_exeext'
17153 { (eval echo "$as_me:17153: \"$ac_try\"") >&5
17154 (eval $ac_try) 2>&5
17156 echo "$as_me:17156: \$? = $ac_status" >&5
17157 (exit $ac_status); }; }; then
17158 eval "$as_ac_var=yes"
17160 echo "$as_me: failed program was:" >&5
17161 cat conftest.$ac_ext >&5
17162 eval "$as_ac_var=no"
17164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17166 echo "$as_me:17166: result: `eval echo '${'$as_ac_var'}'`" >&5
17167 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17168 if test `eval echo '${'$as_ac_var'}'` = yes; then
17169 cat >>confdefs.h <<EOF
17170 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17176 # use a compile-check to work with ncurses*-config and subdirectory includes
17177 echo "$as_me:17177: checking if we can use termcap.h" >&5
17178 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17179 if test "${cf_cv_have_termcap_h+set}" = set; then
17180 echo $ECHO_N "(cached) $ECHO_C" >&6
17183 cat >conftest.$ac_ext <<_ACEOF
17184 #line 17184 "configure"
17185 #include "confdefs.h"
17187 #include <curses.h>
17188 #ifdef NCURSES_VERSION
17189 #undef NCURSES_VERSION
17191 #include <termcap.h>
17192 #ifndef NCURSES_VERSION
17193 #error wrong header
17204 rm -f conftest.$ac_objext
17205 if { (eval echo "$as_me:17205: \"$ac_compile\"") >&5
17206 (eval $ac_compile) 2>&5
17208 echo "$as_me:17208: \$? = $ac_status" >&5
17209 (exit $ac_status); } &&
17210 { ac_try='test -s conftest.$ac_objext'
17211 { (eval echo "$as_me:17211: \"$ac_try\"") >&5
17212 (eval $ac_try) 2>&5
17214 echo "$as_me:17214: \$? = $ac_status" >&5
17215 (exit $ac_status); }; }; then
17216 cf_cv_have_termcap_h=yes
17218 echo "$as_me: failed program was:" >&5
17219 cat conftest.$ac_ext >&5
17220 cf_cv_have_termcap_h=no
17222 rm -f conftest.$ac_objext conftest.$ac_ext
17224 echo "$as_me:17224: result: $cf_cv_have_termcap_h" >&5
17225 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17226 if test "x$cf_cv_have_termcap_h" = xyes
17229 cat >>confdefs.h <<\EOF
17230 #define HAVE_TERMCAP_H 1
17234 echo "$as_me:17234: checking if we can use ncurses/termcap.h" >&5
17235 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17236 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17237 echo $ECHO_N "(cached) $ECHO_C" >&6
17240 cat >conftest.$ac_ext <<_ACEOF
17241 #line 17241 "configure"
17242 #include "confdefs.h"
17244 #include <ncurses/curses.h>
17245 #ifdef NCURSES_VERSION
17246 #undef NCURSES_VERSION
17248 #include <ncurses/termcap.h>
17249 #ifndef NCURSES_VERSION
17250 #error wrong header
17261 rm -f conftest.$ac_objext
17262 if { (eval echo "$as_me:17262: \"$ac_compile\"") >&5
17263 (eval $ac_compile) 2>&5
17265 echo "$as_me:17265: \$? = $ac_status" >&5
17266 (exit $ac_status); } &&
17267 { ac_try='test -s conftest.$ac_objext'
17268 { (eval echo "$as_me:17268: \"$ac_try\"") >&5
17269 (eval $ac_try) 2>&5
17271 echo "$as_me:17271: \$? = $ac_status" >&5
17272 (exit $ac_status); }; }; then
17273 cf_cv_have_ncurses_termcap_h=yes
17275 echo "$as_me: failed program was:" >&5
17276 cat conftest.$ac_ext >&5
17277 cf_cv_have_ncurses_termcap_h=no
17279 rm -f conftest.$ac_objext conftest.$ac_ext
17281 echo "$as_me:17281: result: $cf_cv_have_ncurses_termcap_h" >&5
17282 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17283 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
17284 cat >>confdefs.h <<\EOF
17285 #define HAVE_NCURSES_TERMCAP_H 1
17290 if test "x$ac_cv_func_getopt" = xno; then
17291 { { echo "$as_me:17291: error: getopt is required for building programs" >&5
17292 echo "$as_me: error: getopt is required for building programs" >&2;}
17293 { (exit 1); exit 1; }; }
17296 if test "$cf_enable_widec" = yes; then
17309 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17310 echo "$as_me:17310: checking for $ac_func" >&5
17311 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17312 if eval "test \"\${$as_ac_var+set}\" = set"; then
17313 echo $ECHO_N "(cached) $ECHO_C" >&6
17315 cat >conftest.$ac_ext <<_ACEOF
17316 #line 17316 "configure"
17317 #include "confdefs.h"
17318 #define $ac_func autoconf_temporary
17319 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17326 /* We use char because int might match the return type of a gcc2
17327 builtin and then its argument prototype would still apply. */
17328 char $ac_func (void);
17334 /* The GNU C library defines stubs for functions which it implements
17335 to always fail with ENOSYS. Some functions are actually named
17336 something starting with __ and the normal name is an alias. */
17337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17338 #error found stub for $ac_func
17341 return $ac_func ();
17346 rm -f conftest.$ac_objext conftest$ac_exeext
17347 if { (eval echo "$as_me:17347: \"$ac_link\"") >&5
17348 (eval $ac_link) 2>&5
17350 echo "$as_me:17350: \$? = $ac_status" >&5
17351 (exit $ac_status); } &&
17352 { ac_try='test -s conftest$ac_exeext'
17353 { (eval echo "$as_me:17353: \"$ac_try\"") >&5
17354 (eval $ac_try) 2>&5
17356 echo "$as_me:17356: \$? = $ac_status" >&5
17357 (exit $ac_status); }; }; then
17358 eval "$as_ac_var=yes"
17360 echo "$as_me: failed program was:" >&5
17361 cat conftest.$ac_ext >&5
17362 eval "$as_ac_var=no"
17364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17366 echo "$as_me:17366: result: `eval echo '${'$as_ac_var'}'`" >&5
17367 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17368 if test `eval echo '${'$as_ac_var'}'` = yes; then
17369 cat >>confdefs.h <<EOF
17370 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17378 echo "$as_me:17378: checking definition to turn on extended curses functions" >&5
17379 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17380 if test "${cf_cv_need_xopen_extension+set}" = set; then
17381 echo $ECHO_N "(cached) $ECHO_C" >&6
17384 cf_cv_need_xopen_extension=unknown
17385 cat >conftest.$ac_ext <<_ACEOF
17386 #line 17386 "configure"
17387 #include "confdefs.h"
17389 #include <stdlib.h>
17390 #include <${cf_cv_ncurses_header:-curses.h}>
17395 #if defined(NCURSES_VERSION_PATCH)
17396 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17400 #ifdef NCURSES_VERSION
17402 int check2 = curs_set((int)sizeof(check));
17404 long x = winnstr(stdscr, "", 0);
17406 getbegyx(stdscr, y1, x1)
17411 rm -f conftest.$ac_objext conftest$ac_exeext
17412 if { (eval echo "$as_me:17412: \"$ac_link\"") >&5
17413 (eval $ac_link) 2>&5
17415 echo "$as_me:17415: \$? = $ac_status" >&5
17416 (exit $ac_status); } &&
17417 { ac_try='test -s conftest$ac_exeext'
17418 { (eval echo "$as_me:17418: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17421 echo "$as_me:17421: \$? = $ac_status" >&5
17422 (exit $ac_status); }; }; then
17423 cf_cv_need_xopen_extension=none
17425 echo "$as_me: failed program was:" >&5
17426 cat conftest.$ac_ext >&5
17428 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17430 cat >conftest.$ac_ext <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17434 #define $cf_try_xopen_extension 1
17435 #include <stdlib.h>
17436 #include <${cf_cv_ncurses_header:-curses.h}>
17441 #ifdef NCURSES_VERSION
17443 int check2 = curs_set((int)sizeof(check));
17445 long x = winnstr(stdscr, "", 0);
17447 getbegyx(stdscr, y1, x1)
17452 rm -f conftest.$ac_objext conftest$ac_exeext
17453 if { (eval echo "$as_me:17453: \"$ac_link\"") >&5
17454 (eval $ac_link) 2>&5
17456 echo "$as_me:17456: \$? = $ac_status" >&5
17457 (exit $ac_status); } &&
17458 { ac_try='test -s conftest$ac_exeext'
17459 { (eval echo "$as_me:17459: \"$ac_try\"") >&5
17460 (eval $ac_try) 2>&5
17462 echo "$as_me:17462: \$? = $ac_status" >&5
17463 (exit $ac_status); }; }; then
17464 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17466 echo "$as_me: failed program was:" >&5
17467 cat conftest.$ac_ext >&5
17469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17476 echo "$as_me:17476: result: $cf_cv_need_xopen_extension" >&5
17477 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17479 case $cf_cv_need_xopen_extension in
17482 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17483 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17488 echo "$as_me:17488: checking for term.h" >&5
17489 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17490 if test "${cf_cv_term_header+set}" = set; then
17491 echo $ECHO_N "(cached) $ECHO_C" >&6
17494 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17495 # for <term.h> if we do not find the variant.
17497 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17499 case ${cf_cv_ncurses_header:-curses.h} in
17501 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17502 cf_header_list="$cf_header_item $cf_header_list"
17506 for cf_header in $cf_header_list
17508 cat >conftest.$ac_ext <<_ACEOF
17509 #line 17509 "configure"
17510 #include "confdefs.h"
17512 #include <${cf_cv_ncurses_header:-curses.h}>
17513 #include <${cf_header}>
17522 rm -f conftest.$ac_objext
17523 if { (eval echo "$as_me:17523: \"$ac_compile\"") >&5
17524 (eval $ac_compile) 2>&5
17526 echo "$as_me:17526: \$? = $ac_status" >&5
17527 (exit $ac_status); } &&
17528 { ac_try='test -s conftest.$ac_objext'
17529 { (eval echo "$as_me:17529: \"$ac_try\"") >&5
17530 (eval $ac_try) 2>&5
17532 echo "$as_me:17532: \$? = $ac_status" >&5
17533 (exit $ac_status); }; }; then
17534 cf_cv_term_header=$cf_header
17537 echo "$as_me: failed program was:" >&5
17538 cat conftest.$ac_ext >&5
17539 cf_cv_term_header=no
17541 rm -f conftest.$ac_objext conftest.$ac_ext
17544 case $cf_cv_term_header in
17546 # If curses is ncurses, some packagers still mess it up by trying to make
17547 # us use GNU termcap. This handles the most common case.
17548 for cf_header in ncurses/term.h ncursesw/term.h
17550 cat >conftest.$ac_ext <<_ACEOF
17551 #line 17551 "configure"
17552 #include "confdefs.h"
17554 #include <${cf_cv_ncurses_header:-curses.h}>
17555 #ifdef NCURSES_VERSION
17556 #include <${cf_header}>
17568 rm -f conftest.$ac_objext
17569 if { (eval echo "$as_me:17569: \"$ac_compile\"") >&5
17570 (eval $ac_compile) 2>&5
17572 echo "$as_me:17572: \$? = $ac_status" >&5
17573 (exit $ac_status); } &&
17574 { ac_try='test -s conftest.$ac_objext'
17575 { (eval echo "$as_me:17575: \"$ac_try\"") >&5
17576 (eval $ac_try) 2>&5
17578 echo "$as_me:17578: \$? = $ac_status" >&5
17579 (exit $ac_status); }; }; then
17580 cf_cv_term_header=$cf_header
17583 echo "$as_me: failed program was:" >&5
17584 cat conftest.$ac_ext >&5
17585 cf_cv_term_header=no
17587 rm -f conftest.$ac_objext conftest.$ac_ext
17593 echo "$as_me:17593: result: $cf_cv_term_header" >&5
17594 echo "${ECHO_T}$cf_cv_term_header" >&6
17596 case $cf_cv_term_header in
17599 cat >>confdefs.h <<\EOF
17600 #define HAVE_TERM_H 1
17606 cat >>confdefs.h <<\EOF
17607 #define HAVE_NCURSES_TERM_H 1
17613 cat >>confdefs.h <<\EOF
17614 #define HAVE_NCURSESW_TERM_H 1
17620 echo "$as_me:17620: checking for unctrl.h" >&5
17621 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17622 if test "${cf_cv_unctrl_header+set}" = set; then
17623 echo $ECHO_N "(cached) $ECHO_C" >&6
17626 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17627 # for <unctrl.h> if we do not find the variant.
17629 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17631 case ${cf_cv_ncurses_header:-curses.h} in
17633 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17634 cf_header_list="$cf_header_item $cf_header_list"
17638 for cf_header in $cf_header_list
17640 cat >conftest.$ac_ext <<_ACEOF
17641 #line 17641 "configure"
17642 #include "confdefs.h"
17644 #include <${cf_cv_ncurses_header:-curses.h}>
17645 #include <${cf_header}>
17654 rm -f conftest.$ac_objext
17655 if { (eval echo "$as_me:17655: \"$ac_compile\"") >&5
17656 (eval $ac_compile) 2>&5
17658 echo "$as_me:17658: \$? = $ac_status" >&5
17659 (exit $ac_status); } &&
17660 { ac_try='test -s conftest.$ac_objext'
17661 { (eval echo "$as_me:17661: \"$ac_try\"") >&5
17662 (eval $ac_try) 2>&5
17664 echo "$as_me:17664: \$? = $ac_status" >&5
17665 (exit $ac_status); }; }; then
17666 cf_cv_unctrl_header=$cf_header
17669 echo "$as_me: failed program was:" >&5
17670 cat conftest.$ac_ext >&5
17671 cf_cv_unctrl_header=no
17673 rm -f conftest.$ac_objext conftest.$ac_ext
17677 echo "$as_me:17677: result: $cf_cv_unctrl_header" >&5
17678 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17680 case $cf_cv_unctrl_header in
17682 { echo "$as_me:17682: WARNING: unctrl.h header not found" >&5
17683 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17687 case $cf_cv_unctrl_header in
17690 cat >>confdefs.h <<\EOF
17691 #define HAVE_UNCTRL_H 1
17697 cat >>confdefs.h <<\EOF
17698 #define HAVE_NCURSES_UNCTRL_H 1
17702 (ncursesw/unctrl.h)
17704 cat >>confdefs.h <<\EOF
17705 #define HAVE_NCURSESW_UNCTRL_H 1
17713 assume_default_colors \
17728 init_extended_color \
17736 reset_color_pairs \
17751 use_default_colors \
17753 use_extended_names \
17769 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17771 echo "$as_me:17771: checking for ${cf_func}" >&5
17772 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17774 echo "${as_me:-configure}:17774: testing ${cf_func} ..." 1>&5
17776 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17777 echo $ECHO_N "(cached) $ECHO_C" >&6
17780 eval cf_result='$ac_cv_func_'$cf_func
17781 if test ".$cf_result" != ".no"; then
17782 cat >conftest.$ac_ext <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17786 #ifdef HAVE_XCURSES
17787 #include <xcurses.h>
17788 char * XCursesProgramName = "test";
17790 #include <${cf_cv_ncurses_header:-curses.h}>
17791 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17792 #include <ncursesw/term.h>
17793 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17794 #include <ncurses/term.h>
17795 #elif defined(HAVE_TERM_H)
17805 long foo = (long)(&${cf_func});
17806 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17807 if (foo + 1234L > 5678L)
17808 ${cf_cv_main_return:-return}(foo != 0);
17815 rm -f conftest.$ac_objext conftest$ac_exeext
17816 if { (eval echo "$as_me:17816: \"$ac_link\"") >&5
17817 (eval $ac_link) 2>&5
17819 echo "$as_me:17819: \$? = $ac_status" >&5
17820 (exit $ac_status); } &&
17821 { ac_try='test -s conftest$ac_exeext'
17822 { (eval echo "$as_me:17822: \"$ac_try\"") >&5
17823 (eval $ac_try) 2>&5
17825 echo "$as_me:17825: \$? = $ac_status" >&5
17826 (exit $ac_status); }; }; then
17829 echo "$as_me: failed program was:" >&5
17830 cat conftest.$ac_ext >&5
17833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17835 eval 'cf_cv_func_'$cf_func'=$cf_result'
17839 # use the computed/retrieved cache-value:
17840 eval 'cf_result=$cf_cv_func_'$cf_func
17841 echo "$as_me:17841: result: $cf_result" >&5
17842 echo "${ECHO_T}$cf_result" >&6
17843 if test $cf_result != no; then
17844 cat >>confdefs.h <<EOF
17845 #define HAVE_${cf_tr_func} 1
17851 for cf_func in tputs
17854 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17856 echo "$as_me:17856: checking for ${cf_func}" >&5
17857 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17859 echo "${as_me:-configure}:17859: testing ${cf_func} ..." 1>&5
17861 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17862 echo $ECHO_N "(cached) $ECHO_C" >&6
17865 eval cf_result='$ac_cv_func_'$cf_func
17866 if test ".$cf_result" != ".no"; then
17867 cat >conftest.$ac_ext <<_ACEOF
17868 #line 17868 "configure"
17869 #include "confdefs.h"
17871 #ifdef HAVE_XCURSES
17872 #include <xcurses.h>
17873 char * XCursesProgramName = "test";
17875 #include <${cf_cv_ncurses_header:-curses.h}>
17876 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17877 #include <ncursesw/term.h>
17878 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17879 #include <ncurses/term.h>
17880 #elif defined(HAVE_TERM_H)
17890 long foo = (long)(&${cf_func});
17891 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17892 if (foo + 1234L > 5678L)
17893 ${cf_cv_main_return:-return}(foo != 0);
17900 rm -f conftest.$ac_objext conftest$ac_exeext
17901 if { (eval echo "$as_me:17901: \"$ac_link\"") >&5
17902 (eval $ac_link) 2>&5
17904 echo "$as_me:17904: \$? = $ac_status" >&5
17905 (exit $ac_status); } &&
17906 { ac_try='test -s conftest$ac_exeext'
17907 { (eval echo "$as_me:17907: \"$ac_try\"") >&5
17908 (eval $ac_try) 2>&5
17910 echo "$as_me:17910: \$? = $ac_status" >&5
17911 (exit $ac_status); }; }; then
17914 echo "$as_me: failed program was:" >&5
17915 cat conftest.$ac_ext >&5
17918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17920 eval 'cf_cv_func_'$cf_func'=$cf_result'
17924 # use the computed/retrieved cache-value:
17925 eval 'cf_result=$cf_cv_func_'$cf_func
17926 echo "$as_me:17926: result: $cf_result" >&5
17927 echo "${ECHO_T}$cf_result" >&6
17928 if test $cf_result != no; then
17929 cat >>confdefs.h <<EOF
17930 #define HAVE_${cf_tr_func} 1
17936 if test x$cf_cv_func_tputs = xyes
17939 for cf_arg in int char
17941 for cf_ret in int void
17943 if test $cf_ret = void
17945 cf_return="/* nothing */"
17947 cf_return="return value"
17949 cat >conftest.$ac_ext <<_ACEOF
17950 #line 17950 "configure"
17951 #include "confdefs.h"
17953 #include <${cf_cv_ncurses_header:-curses.h}>
17954 #include <$cf_cv_term_header>
17956 static $cf_ret outc($cf_arg value) { $cf_return; }
17962 tputs("hello", 0, outc);
17963 ${cf_cv_main_return:-return}(0);
17969 rm -f conftest.$ac_objext
17970 if { (eval echo "$as_me:17970: \"$ac_compile\"") >&5
17971 (eval $ac_compile) 2>&5
17973 echo "$as_me:17973: \$? = $ac_status" >&5
17974 (exit $ac_status); } &&
17975 { ac_try='test -s conftest.$ac_objext'
17976 { (eval echo "$as_me:17976: \"$ac_try\"") >&5
17977 (eval $ac_try) 2>&5
17979 echo "$as_me:17979: \$? = $ac_status" >&5
17980 (exit $ac_status); }; }; then
17982 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17984 echo "${as_me:-configure}:17984: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17986 cat >>confdefs.h <<EOF
17987 #define TPUTS_ARG $cf_arg
17988 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17989 #define TPUTS_RETURN(value) $cf_return
17995 echo "$as_me: failed program was:" >&5
17996 cat conftest.$ac_ext >&5
17998 rm -f conftest.$ac_objext conftest.$ac_ext
18000 test $cf_done = yes && break
18004 echo "$as_me:18004: checking for ncurses extended functions" >&5
18005 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18006 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18007 echo $ECHO_N "(cached) $ECHO_C" >&6
18010 cat >conftest.$ac_ext <<_ACEOF
18011 #line 18011 "configure"
18012 #include "confdefs.h"
18014 #include <${cf_cv_ncurses_header:-curses.h}>
18019 int x = NCURSES_EXT_FUNCS
18025 rm -f conftest.$ac_objext
18026 if { (eval echo "$as_me:18026: \"$ac_compile\"") >&5
18027 (eval $ac_compile) 2>&5
18029 echo "$as_me:18029: \$? = $ac_status" >&5
18030 (exit $ac_status); } &&
18031 { ac_try='test -s conftest.$ac_objext'
18032 { (eval echo "$as_me:18032: \"$ac_try\"") >&5
18033 (eval $ac_try) 2>&5
18035 echo "$as_me:18035: \$? = $ac_status" >&5
18036 (exit $ac_status); }; }; then
18037 cf_cv_ncurses_ext_funcs=defined
18039 echo "$as_me: failed program was:" >&5
18040 cat conftest.$ac_ext >&5
18042 cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18046 #include <${cf_cv_ncurses_header:-curses.h}>
18051 (void) assume_default_colors (0, 0);
18052 (void) curses_version ();
18053 (void) define_key (0, 0);
18054 (void) is_term_resized (0, 0);
18055 (void) key_defined (0);
18056 (void) keybound (0, 0);
18057 (void) keyok (0, 0);
18058 (void) resize_term (0, 0);
18059 (void) resizeterm (0, 0);
18060 (void) use_default_colors ();
18061 (void) use_extended_names (0);
18062 (void) wresize (0, 0, 0);
18067 rm -f conftest.$ac_objext conftest$ac_exeext
18068 if { (eval echo "$as_me:18068: \"$ac_link\"") >&5
18069 (eval $ac_link) 2>&5
18071 echo "$as_me:18071: \$? = $ac_status" >&5
18072 (exit $ac_status); } &&
18073 { ac_try='test -s conftest$ac_exeext'
18074 { (eval echo "$as_me:18074: \"$ac_try\"") >&5
18075 (eval $ac_try) 2>&5
18077 echo "$as_me:18077: \$? = $ac_status" >&5
18078 (exit $ac_status); }; }; then
18079 cf_cv_ncurses_ext_funcs=yes
18081 echo "$as_me: failed program was:" >&5
18082 cat conftest.$ac_ext >&5
18083 cf_cv_ncurses_ext_funcs=no
18085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18088 rm -f conftest.$ac_objext conftest.$ac_ext
18091 echo "$as_me:18091: result: $cf_cv_ncurses_ext_funcs" >&5
18092 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18093 test "$cf_cv_ncurses_ext_funcs" = yes &&
18094 cat >>confdefs.h <<\EOF
18095 #define NCURSES_EXT_FUNCS 1
18098 if test "$cf_enable_widec" = yes
18100 # workaround for systems with ncurses before 20111029, due to change of
18101 # feature test macro from _XPG5 to _XOPEN_SOURCE
18102 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18105 echo "$as_me:18105: checking if _XPG5 should be defined to enable wide-characters" >&5
18106 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18108 cat >conftest.$ac_ext <<_ACEOF
18109 #line 18109 "configure"
18110 #include "confdefs.h"
18112 #include <${cf_cv_ncurses_header:-curses.h}>
18121 rm -f conftest.$ac_objext
18122 if { (eval echo "$as_me:18122: \"$ac_compile\"") >&5
18123 (eval $ac_compile) 2>&5
18125 echo "$as_me:18125: \$? = $ac_status" >&5
18126 (exit $ac_status); } &&
18127 { ac_try='test -s conftest.$ac_objext'
18128 { (eval echo "$as_me:18128: \"$ac_try\"") >&5
18129 (eval $ac_try) 2>&5
18131 echo "$as_me:18131: \$? = $ac_status" >&5
18132 (exit $ac_status); }; }; then
18135 echo "$as_me: failed program was:" >&5
18136 cat conftest.$ac_ext >&5
18137 cf_save_cppflags="$CPPFLAGS"
18138 CPPFLAGS="$CPPFLAGS -D_XPG5"
18139 cat >conftest.$ac_ext <<_ACEOF
18140 #line 18140 "configure"
18141 #include "confdefs.h"
18143 #include <${cf_cv_ncurses_header:-curses.h}>
18152 rm -f conftest.$ac_objext
18153 if { (eval echo "$as_me:18153: \"$ac_compile\"") >&5
18154 (eval $ac_compile) 2>&5
18156 echo "$as_me:18156: \$? = $ac_status" >&5
18157 (exit $ac_status); } &&
18158 { ac_try='test -s conftest.$ac_objext'
18159 { (eval echo "$as_me:18159: \"$ac_try\"") >&5
18160 (eval $ac_try) 2>&5
18162 echo "$as_me:18162: \$? = $ac_status" >&5
18163 (exit $ac_status); }; }; then
18166 echo "$as_me: failed program was:" >&5
18167 cat conftest.$ac_ext >&5
18169 rm -f conftest.$ac_objext conftest.$ac_ext
18170 CPPFLAGS="$cf_save_cppflags"
18172 rm -f conftest.$ac_objext conftest.$ac_ext
18173 echo "$as_me:18173: result: $cf_define_xpg5" >&5
18174 echo "${ECHO_T}$cf_define_xpg5" >&6
18176 if test "$cf_define_xpg5" = yes
18178 CPPFLAGS="$CPPFLAGS -D_XPG5"
18182 echo "$as_me:18182: checking for wide-character functions" >&5
18183 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18184 if test "${cf_cv_widechar_funcs+set}" = set; then
18185 echo $ECHO_N "(cached) $ECHO_C" >&6
18188 cat >conftest.$ac_ext <<_ACEOF
18189 #line 18189 "configure"
18190 #include "confdefs.h"
18192 #include <${cf_cv_ncurses_header:-curses.h}>
18197 static wchar_t src_wchar[2];
18198 static cchar_t dst_cchar;
18199 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18205 rm -f conftest.$ac_objext conftest$ac_exeext
18206 if { (eval echo "$as_me:18206: \"$ac_link\"") >&5
18207 (eval $ac_link) 2>&5
18209 echo "$as_me:18209: \$? = $ac_status" >&5
18210 (exit $ac_status); } &&
18211 { ac_try='test -s conftest$ac_exeext'
18212 { (eval echo "$as_me:18212: \"$ac_try\"") >&5
18213 (eval $ac_try) 2>&5
18215 echo "$as_me:18215: \$? = $ac_status" >&5
18216 (exit $ac_status); }; }; then
18217 cf_cv_widechar_funcs=yes
18219 echo "$as_me: failed program was:" >&5
18220 cat conftest.$ac_ext >&5
18221 cf_cv_widechar_funcs=no
18223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18226 echo "$as_me:18226: result: $cf_cv_widechar_funcs" >&5
18227 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18228 if test "$cf_cv_widechar_funcs" != no ; then
18230 cat >>confdefs.h <<\EOF
18231 #define USE_WIDEC_SUPPORT 1
18235 cat >>confdefs.h <<\EOF
18236 #define USE_WIDEC_SUPPORT 0
18241 cat >>confdefs.h <<\EOF
18242 #define USE_WIDEC_SUPPORT 0
18247 echo "$as_me:18247: checking if $cf_cv_screen library uses pthreads" >&5
18248 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18249 if test "${cf_cv_use_pthreads+set}" = set; then
18250 echo $ECHO_N "(cached) $ECHO_C" >&6
18253 cat >conftest.$ac_ext <<_ACEOF
18254 #line 18254 "configure"
18255 #include "confdefs.h"
18257 #include <${cf_cv_ncurses_header:-curses.h}>
18258 extern void _nc_init_pthreads(void);
18265 _nc_init_pthreads();
18271 rm -f conftest.$ac_objext conftest$ac_exeext
18272 if { (eval echo "$as_me:18272: \"$ac_link\"") >&5
18273 (eval $ac_link) 2>&5
18275 echo "$as_me:18275: \$? = $ac_status" >&5
18276 (exit $ac_status); } &&
18277 { ac_try='test -s conftest$ac_exeext'
18278 { (eval echo "$as_me:18278: \"$ac_try\"") >&5
18279 (eval $ac_try) 2>&5
18281 echo "$as_me:18281: \$? = $ac_status" >&5
18282 (exit $ac_status); }; }; then
18283 cf_cv_use_pthreads=yes
18285 echo "$as_me: failed program was:" >&5
18286 cat conftest.$ac_ext >&5
18287 cf_cv_use_pthreads=no
18289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18292 echo "$as_me:18292: result: $cf_cv_use_pthreads" >&5
18293 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18294 test $cf_cv_use_pthreads = yes &&
18295 cat >>confdefs.h <<\EOF
18296 #define USE_PTHREADS 1
18299 echo "$as_me:18299: checking if sys/time.h works with sys/select.h" >&5
18300 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18301 if test "${cf_cv_sys_time_select+set}" = set; then
18302 echo $ECHO_N "(cached) $ECHO_C" >&6
18305 cat >conftest.$ac_ext <<_ACEOF
18306 #line 18306 "configure"
18307 #include "confdefs.h"
18309 #include <sys/types.h>
18310 #ifdef HAVE_SYS_TIME_H
18311 #include <sys/time.h>
18313 #ifdef HAVE_SYS_SELECT_H
18314 #include <sys/select.h>
18325 rm -f conftest.$ac_objext
18326 if { (eval echo "$as_me:18326: \"$ac_compile\"") >&5
18327 (eval $ac_compile) 2>&5
18329 echo "$as_me:18329: \$? = $ac_status" >&5
18330 (exit $ac_status); } &&
18331 { ac_try='test -s conftest.$ac_objext'
18332 { (eval echo "$as_me:18332: \"$ac_try\"") >&5
18333 (eval $ac_try) 2>&5
18335 echo "$as_me:18335: \$? = $ac_status" >&5
18336 (exit $ac_status); }; }; then
18337 cf_cv_sys_time_select=yes
18339 echo "$as_me: failed program was:" >&5
18340 cat conftest.$ac_ext >&5
18341 cf_cv_sys_time_select=no
18343 rm -f conftest.$ac_objext conftest.$ac_ext
18347 echo "$as_me:18347: result: $cf_cv_sys_time_select" >&5
18348 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18349 test "$cf_cv_sys_time_select" = yes &&
18350 cat >>confdefs.h <<\EOF
18351 #define HAVE_SYS_TIME_SELECT 1
18354 # special check for test/ditto.c
18356 echo "$as_me:18356: checking for openpty in -lutil" >&5
18357 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18358 if test "${ac_cv_lib_util_openpty+set}" = set; then
18359 echo $ECHO_N "(cached) $ECHO_C" >&6
18361 ac_check_lib_save_LIBS=$LIBS
18362 LIBS="-lutil $LIBS"
18363 cat >conftest.$ac_ext <<_ACEOF
18364 #line 18364 "configure"
18365 #include "confdefs.h"
18367 /* Override any gcc2 internal prototype to avoid an error. */
18371 /* We use char because int might match the return type of a gcc2
18372 builtin and then its argument prototype would still apply. */
18382 rm -f conftest.$ac_objext conftest$ac_exeext
18383 if { (eval echo "$as_me:18383: \"$ac_link\"") >&5
18384 (eval $ac_link) 2>&5
18386 echo "$as_me:18386: \$? = $ac_status" >&5
18387 (exit $ac_status); } &&
18388 { ac_try='test -s conftest$ac_exeext'
18389 { (eval echo "$as_me:18389: \"$ac_try\"") >&5
18390 (eval $ac_try) 2>&5
18392 echo "$as_me:18392: \$? = $ac_status" >&5
18393 (exit $ac_status); }; }; then
18394 ac_cv_lib_util_openpty=yes
18396 echo "$as_me: failed program was:" >&5
18397 cat conftest.$ac_ext >&5
18398 ac_cv_lib_util_openpty=no
18400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18401 LIBS=$ac_check_lib_save_LIBS
18403 echo "$as_me:18403: result: $ac_cv_lib_util_openpty" >&5
18404 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18405 if test $ac_cv_lib_util_openpty = yes; then
18411 echo "$as_me:18411: checking for openpty header" >&5
18412 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18413 if test "${cf_cv_func_openpty+set}" = set; then
18414 echo $ECHO_N "(cached) $ECHO_C" >&6
18417 cf_save_LIBS="$LIBS"
18418 test $cf_cv_lib_util = yes && {
18419 cf_add_libs="$LIBS"
18422 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18423 # filter duplicates
18424 for cf_add_1lib in $cf_add_0lib; do
18425 for cf_add_2lib in $cf_add_libs; do
18426 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18431 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18433 LIBS="$cf_add_libs"
18435 for cf_header in pty.h libutil.h util.h
18437 cat >conftest.$ac_ext <<_ACEOF
18438 #line 18438 "configure"
18439 #include "confdefs.h"
18441 #include <$cf_header>
18447 int x = openpty((int *)0, (int *)0, (char *)0,
18448 (struct termios *)0, (struct winsize *)0);
18454 rm -f conftest.$ac_objext conftest$ac_exeext
18455 if { (eval echo "$as_me:18455: \"$ac_link\"") >&5
18456 (eval $ac_link) 2>&5
18458 echo "$as_me:18458: \$? = $ac_status" >&5
18459 (exit $ac_status); } &&
18460 { ac_try='test -s conftest$ac_exeext'
18461 { (eval echo "$as_me:18461: \"$ac_try\"") >&5
18462 (eval $ac_try) 2>&5
18464 echo "$as_me:18464: \$? = $ac_status" >&5
18465 (exit $ac_status); }; }; then
18467 cf_cv_func_openpty=$cf_header
18471 echo "$as_me: failed program was:" >&5
18472 cat conftest.$ac_ext >&5
18474 cf_cv_func_openpty=no
18477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18479 LIBS="$cf_save_LIBS"
18482 echo "$as_me:18482: result: $cf_cv_func_openpty" >&5
18483 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18485 if test "$cf_cv_func_openpty" != no ; then
18487 cat >>confdefs.h <<EOF
18488 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18491 cat >>confdefs.h <<\EOF
18492 #define USE_XTERM_PTY 1
18495 if test "x$cf_cv_lib_util" = xyes ; then
18497 cf_add_libs="$TEST_LIBS"
18500 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18501 # filter duplicates
18502 for cf_add_1lib in $cf_add_0lib; do
18503 for cf_add_2lib in $cf_add_libs; do
18504 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18509 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18511 TEST_LIBS="$cf_add_libs"
18516 echo "$as_me:18516: checking for function curses_version" >&5
18517 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18518 if test "${cf_cv_func_curses_version+set}" = set; then
18519 echo $ECHO_N "(cached) $ECHO_C" >&6
18522 if test "$cross_compiling" = yes; then
18523 cf_cv_func_curses_version=unknown
18525 cat >conftest.$ac_ext <<_ACEOF
18526 #line 18526 "configure"
18527 #include "confdefs.h"
18529 #include <${cf_cv_ncurses_header:-curses.h}>
18533 sprintf(temp, "%s\n", curses_version());
18534 ${cf_cv_main_return:-return}(0);
18538 rm -f conftest$ac_exeext
18539 if { (eval echo "$as_me:18539: \"$ac_link\"") >&5
18540 (eval $ac_link) 2>&5
18542 echo "$as_me:18542: \$? = $ac_status" >&5
18543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18544 { (eval echo "$as_me:18544: \"$ac_try\"") >&5
18545 (eval $ac_try) 2>&5
18547 echo "$as_me:18547: \$? = $ac_status" >&5
18548 (exit $ac_status); }; }; then
18549 cf_cv_func_curses_version=yes
18552 echo "$as_me: program exited with status $ac_status" >&5
18553 echo "$as_me: failed program was:" >&5
18554 cat conftest.$ac_ext >&5
18555 cf_cv_func_curses_version=no
18558 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18562 echo "$as_me:18562: result: $cf_cv_func_curses_version" >&5
18563 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18564 test "$cf_cv_func_curses_version" = yes &&
18565 cat >>confdefs.h <<\EOF
18566 #define HAVE_CURSES_VERSION 1
18569 echo "$as_me:18569: checking for alternate character set array" >&5
18570 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18571 if test "${cf_cv_curses_acs_map+set}" = set; then
18572 echo $ECHO_N "(cached) $ECHO_C" >&6
18575 cf_cv_curses_acs_map=unknown
18576 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18578 cat >conftest.$ac_ext <<_ACEOF
18579 #line 18579 "configure"
18580 #include "confdefs.h"
18582 #include <${cf_cv_ncurses_header:-curses.h}>
18588 $name['k'] = ACS_PLUS
18594 rm -f conftest.$ac_objext conftest$ac_exeext
18595 if { (eval echo "$as_me:18595: \"$ac_link\"") >&5
18596 (eval $ac_link) 2>&5
18598 echo "$as_me:18598: \$? = $ac_status" >&5
18599 (exit $ac_status); } &&
18600 { ac_try='test -s conftest$ac_exeext'
18601 { (eval echo "$as_me:18601: \"$ac_try\"") >&5
18602 (eval $ac_try) 2>&5
18604 echo "$as_me:18604: \$? = $ac_status" >&5
18605 (exit $ac_status); }; }; then
18606 cf_cv_curses_acs_map=$name; break
18608 echo "$as_me: failed program was:" >&5
18609 cat conftest.$ac_ext >&5
18611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18615 echo "$as_me:18615: result: $cf_cv_curses_acs_map" >&5
18616 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18618 test "$cf_cv_curses_acs_map" != unknown &&
18619 cat >>confdefs.h <<EOF
18620 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18623 if test "$cf_enable_widec" = yes; then
18625 echo "$as_me:18625: checking for wide alternate character set array" >&5
18626 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18627 if test "${cf_cv_curses_wacs_map+set}" = set; then
18628 echo $ECHO_N "(cached) $ECHO_C" >&6
18631 cf_cv_curses_wacs_map=unknown
18632 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18634 cat >conftest.$ac_ext <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18638 #ifndef _XOPEN_SOURCE_EXTENDED
18639 #define _XOPEN_SOURCE_EXTENDED
18641 #include <${cf_cv_ncurses_header:-curses.h}>
18645 void *foo = &($name['k'])
18650 rm -f conftest.$ac_objext conftest$ac_exeext
18651 if { (eval echo "$as_me:18651: \"$ac_link\"") >&5
18652 (eval $ac_link) 2>&5
18654 echo "$as_me:18654: \$? = $ac_status" >&5
18655 (exit $ac_status); } &&
18656 { ac_try='test -s conftest$ac_exeext'
18657 { (eval echo "$as_me:18657: \"$ac_try\"") >&5
18658 (eval $ac_try) 2>&5
18660 echo "$as_me:18660: \$? = $ac_status" >&5
18661 (exit $ac_status); }; }; then
18662 cf_cv_curses_wacs_map=$name
18665 echo "$as_me: failed program was:" >&5
18666 cat conftest.$ac_ext >&5
18668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18671 echo "$as_me:18671: result: $cf_cv_curses_wacs_map" >&5
18672 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18674 test "$cf_cv_curses_wacs_map" != unknown &&
18675 cat >>confdefs.h <<EOF
18676 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18679 echo "$as_me:18679: checking for wide alternate character constants" >&5
18680 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18681 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18682 echo $ECHO_N "(cached) $ECHO_C" >&6
18685 cf_cv_curses_wacs_symbols=no
18686 if test "$cf_cv_curses_wacs_map" != unknown
18688 cat >conftest.$ac_ext <<_ACEOF
18689 #line 18689 "configure"
18690 #include "confdefs.h"
18692 #ifndef _XOPEN_SOURCE_EXTENDED
18693 #define _XOPEN_SOURCE_EXTENDED
18695 #include <${cf_cv_ncurses_header:-curses.h}>
18699 cchar_t *foo = WACS_PLUS;
18700 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18705 rm -f conftest.$ac_objext conftest$ac_exeext
18706 if { (eval echo "$as_me:18706: \"$ac_link\"") >&5
18707 (eval $ac_link) 2>&5
18709 echo "$as_me:18709: \$? = $ac_status" >&5
18710 (exit $ac_status); } &&
18711 { ac_try='test -s conftest$ac_exeext'
18712 { (eval echo "$as_me:18712: \"$ac_try\"") >&5
18713 (eval $ac_try) 2>&5
18715 echo "$as_me:18715: \$? = $ac_status" >&5
18716 (exit $ac_status); }; }; then
18717 cf_cv_curses_wacs_symbols=yes
18719 echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18724 cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18728 #ifndef _XOPEN_SOURCE_EXTENDED
18729 #define _XOPEN_SOURCE_EXTENDED
18731 #include <${cf_cv_ncurses_header:-curses.h}>
18735 cchar_t *foo = WACS_PLUS
18740 rm -f conftest.$ac_objext conftest$ac_exeext
18741 if { (eval echo "$as_me:18741: \"$ac_link\"") >&5
18742 (eval $ac_link) 2>&5
18744 echo "$as_me:18744: \$? = $ac_status" >&5
18745 (exit $ac_status); } &&
18746 { ac_try='test -s conftest$ac_exeext'
18747 { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748 (eval $ac_try) 2>&5
18750 echo "$as_me:18750: \$? = $ac_status" >&5
18751 (exit $ac_status); }; }; then
18752 cf_cv_curses_wacs_symbols=yes
18754 echo "$as_me: failed program was:" >&5
18755 cat conftest.$ac_ext >&5
18757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18761 echo "$as_me:18761: result: $cf_cv_curses_wacs_symbols" >&5
18762 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18764 test "$cf_cv_curses_wacs_symbols" != no &&
18765 cat >>confdefs.h <<\EOF
18766 #define CURSES_WACS_SYMBOLS 1
18771 echo "$as_me:18771: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18772 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18773 cat >conftest.$ac_ext <<_ACEOF
18774 #line 18774 "configure"
18775 #include "confdefs.h"
18777 #ifndef _XOPEN_SOURCE_EXTENDED
18778 #define _XOPEN_SOURCE_EXTENDED
18780 #include <${cf_cv_ncurses_header:-curses.h}>
18791 rm -f conftest.$ac_objext
18792 if { (eval echo "$as_me:18792: \"$ac_compile\"") >&5
18793 (eval $ac_compile) 2>&5
18795 echo "$as_me:18795: \$? = $ac_status" >&5
18796 (exit $ac_status); } &&
18797 { ac_try='test -s conftest.$ac_objext'
18798 { (eval echo "$as_me:18798: \"$ac_try\"") >&5
18799 (eval $ac_try) 2>&5
18801 echo "$as_me:18801: \$? = $ac_status" >&5
18802 (exit $ac_status); }; }; then
18805 echo "$as_me: failed program was:" >&5
18806 cat conftest.$ac_ext >&5
18809 rm -f conftest.$ac_objext conftest.$ac_ext
18810 echo "$as_me:18810: result: $cf_result" >&5
18811 echo "${ECHO_T}$cf_result" >&6
18812 if test $cf_result = yes ; then
18814 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18816 cat >>confdefs.h <<EOF
18817 #define $cf_result 1
18822 cat >>confdefs.h <<EOF
18823 #define attr_t long
18828 if test "$cf_enable_widec" = yes; then
18830 # This is needed on Tru64 5.0 to declare mbstate_t
18831 echo "$as_me:18831: checking if we must include wchar.h to declare mbstate_t" >&5
18832 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18833 if test "${cf_cv_mbstate_t+set}" = set; then
18834 echo $ECHO_N "(cached) $ECHO_C" >&6
18837 cat >conftest.$ac_ext <<_ACEOF
18838 #line 18838 "configure"
18839 #include "confdefs.h"
18841 #include <stdlib.h>
18842 #include <stdarg.h>
18844 #ifdef HAVE_LIBUTF8_H
18845 #include <libutf8.h>
18855 rm -f conftest.$ac_objext
18856 if { (eval echo "$as_me:18856: \"$ac_compile\"") >&5
18857 (eval $ac_compile) 2>&5
18859 echo "$as_me:18859: \$? = $ac_status" >&5
18860 (exit $ac_status); } &&
18861 { ac_try='test -s conftest.$ac_objext'
18862 { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863 (eval $ac_try) 2>&5
18865 echo "$as_me:18865: \$? = $ac_status" >&5
18866 (exit $ac_status); }; }; then
18869 echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 cat >conftest.$ac_ext <<_ACEOF
18872 #line 18872 "configure"
18873 #include "confdefs.h"
18875 #include <stdlib.h>
18876 #include <stdarg.h>
18879 #ifdef HAVE_LIBUTF8_H
18880 #include <libutf8.h>
18890 rm -f conftest.$ac_objext
18891 if { (eval echo "$as_me:18891: \"$ac_compile\"") >&5
18892 (eval $ac_compile) 2>&5
18894 echo "$as_me:18894: \$? = $ac_status" >&5
18895 (exit $ac_status); } &&
18896 { ac_try='test -s conftest.$ac_objext'
18897 { (eval echo "$as_me:18897: \"$ac_try\"") >&5
18898 (eval $ac_try) 2>&5
18900 echo "$as_me:18900: \$? = $ac_status" >&5
18901 (exit $ac_status); }; }; then
18902 cf_cv_mbstate_t=yes
18904 echo "$as_me: failed program was:" >&5
18905 cat conftest.$ac_ext >&5
18906 cf_cv_mbstate_t=unknown
18908 rm -f conftest.$ac_objext conftest.$ac_ext
18910 rm -f conftest.$ac_objext conftest.$ac_ext
18912 echo "$as_me:18912: result: $cf_cv_mbstate_t" >&5
18913 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18915 if test "$cf_cv_mbstate_t" = yes ; then
18917 cat >>confdefs.h <<\EOF
18918 #define NEED_WCHAR_H 1
18924 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18925 if test "$cf_cv_mbstate_t" = unknown ; then
18926 NCURSES_MBSTATE_T=1
18929 # if we find mbstate_t in either place, use substitution to provide a fallback.
18930 if test "$cf_cv_mbstate_t" != unknown ; then
18931 NCURSES_OK_MBSTATE_T=1
18934 # This is needed on Tru64 5.0 to declare wchar_t
18935 echo "$as_me:18935: checking if we must include wchar.h to declare wchar_t" >&5
18936 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18937 if test "${cf_cv_wchar_t+set}" = set; then
18938 echo $ECHO_N "(cached) $ECHO_C" >&6
18941 cat >conftest.$ac_ext <<_ACEOF
18942 #line 18942 "configure"
18943 #include "confdefs.h"
18945 #include <stdlib.h>
18946 #include <stdarg.h>
18948 #ifdef HAVE_LIBUTF8_H
18949 #include <libutf8.h>
18959 rm -f conftest.$ac_objext
18960 if { (eval echo "$as_me:18960: \"$ac_compile\"") >&5
18961 (eval $ac_compile) 2>&5
18963 echo "$as_me:18963: \$? = $ac_status" >&5
18964 (exit $ac_status); } &&
18965 { ac_try='test -s conftest.$ac_objext'
18966 { (eval echo "$as_me:18966: \"$ac_try\"") >&5
18967 (eval $ac_try) 2>&5
18969 echo "$as_me:18969: \$? = $ac_status" >&5
18970 (exit $ac_status); }; }; then
18973 echo "$as_me: failed program was:" >&5
18974 cat conftest.$ac_ext >&5
18975 cat >conftest.$ac_ext <<_ACEOF
18976 #line 18976 "configure"
18977 #include "confdefs.h"
18979 #include <stdlib.h>
18980 #include <stdarg.h>
18983 #ifdef HAVE_LIBUTF8_H
18984 #include <libutf8.h>
18994 rm -f conftest.$ac_objext
18995 if { (eval echo "$as_me:18995: \"$ac_compile\"") >&5
18996 (eval $ac_compile) 2>&5
18998 echo "$as_me:18998: \$? = $ac_status" >&5
18999 (exit $ac_status); } &&
19000 { ac_try='test -s conftest.$ac_objext'
19001 { (eval echo "$as_me:19001: \"$ac_try\"") >&5
19002 (eval $ac_try) 2>&5
19004 echo "$as_me:19004: \$? = $ac_status" >&5
19005 (exit $ac_status); }; }; then
19008 echo "$as_me: failed program was:" >&5
19009 cat conftest.$ac_ext >&5
19010 cf_cv_wchar_t=unknown
19012 rm -f conftest.$ac_objext conftest.$ac_ext
19014 rm -f conftest.$ac_objext conftest.$ac_ext
19016 echo "$as_me:19016: result: $cf_cv_wchar_t" >&5
19017 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19019 if test "$cf_cv_wchar_t" = yes ; then
19021 cat >>confdefs.h <<\EOF
19022 #define NEED_WCHAR_H 1
19028 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19029 if test "$cf_cv_wchar_t" = unknown ; then
19033 # if we find wchar_t in either place, use substitution to provide a fallback.
19034 if test "$cf_cv_wchar_t" != unknown ; then
19035 NCURSES_OK_WCHAR_T=1
19038 # This is needed on Tru64 5.0 to declare wint_t
19039 echo "$as_me:19039: checking if we must include wchar.h to declare wint_t" >&5
19040 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19041 if test "${cf_cv_wint_t+set}" = set; then
19042 echo $ECHO_N "(cached) $ECHO_C" >&6
19045 cat >conftest.$ac_ext <<_ACEOF
19046 #line 19046 "configure"
19047 #include "confdefs.h"
19049 #include <stdlib.h>
19050 #include <stdarg.h>
19052 #ifdef HAVE_LIBUTF8_H
19053 #include <libutf8.h>
19063 rm -f conftest.$ac_objext
19064 if { (eval echo "$as_me:19064: \"$ac_compile\"") >&5
19065 (eval $ac_compile) 2>&5
19067 echo "$as_me:19067: \$? = $ac_status" >&5
19068 (exit $ac_status); } &&
19069 { ac_try='test -s conftest.$ac_objext'
19070 { (eval echo "$as_me:19070: \"$ac_try\"") >&5
19071 (eval $ac_try) 2>&5
19073 echo "$as_me:19073: \$? = $ac_status" >&5
19074 (exit $ac_status); }; }; then
19077 echo "$as_me: failed program was:" >&5
19078 cat conftest.$ac_ext >&5
19079 cat >conftest.$ac_ext <<_ACEOF
19080 #line 19080 "configure"
19081 #include "confdefs.h"
19083 #include <stdlib.h>
19084 #include <stdarg.h>
19087 #ifdef HAVE_LIBUTF8_H
19088 #include <libutf8.h>
19098 rm -f conftest.$ac_objext
19099 if { (eval echo "$as_me:19099: \"$ac_compile\"") >&5
19100 (eval $ac_compile) 2>&5
19102 echo "$as_me:19102: \$? = $ac_status" >&5
19103 (exit $ac_status); } &&
19104 { ac_try='test -s conftest.$ac_objext'
19105 { (eval echo "$as_me:19105: \"$ac_try\"") >&5
19106 (eval $ac_try) 2>&5
19108 echo "$as_me:19108: \$? = $ac_status" >&5
19109 (exit $ac_status); }; }; then
19112 echo "$as_me: failed program was:" >&5
19113 cat conftest.$ac_ext >&5
19114 cf_cv_wint_t=unknown
19116 rm -f conftest.$ac_objext conftest.$ac_ext
19118 rm -f conftest.$ac_objext conftest.$ac_ext
19120 echo "$as_me:19120: result: $cf_cv_wint_t" >&5
19121 echo "${ECHO_T}$cf_cv_wint_t" >&6
19123 if test "$cf_cv_wint_t" = yes ; then
19125 cat >>confdefs.h <<\EOF
19126 #define NEED_WCHAR_H 1
19132 # if we do not find wint_t in either place, use substitution to provide a fallback.
19133 if test "$cf_cv_wint_t" = unknown ; then
19137 # if we find wint_t in either place, use substitution to provide a fallback.
19138 if test "$cf_cv_wint_t" != unknown ; then
19139 NCURSES_OK_WINT_T=1
19142 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19144 echo "$as_me:19144: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19145 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19146 cat >conftest.$ac_ext <<_ACEOF
19147 #line 19147 "configure"
19148 #include "confdefs.h"
19150 #ifndef _XOPEN_SOURCE_EXTENDED
19151 #define _XOPEN_SOURCE_EXTENDED
19153 #include <${cf_cv_ncurses_header:-curses.h}>
19164 rm -f conftest.$ac_objext
19165 if { (eval echo "$as_me:19165: \"$ac_compile\"") >&5
19166 (eval $ac_compile) 2>&5
19168 echo "$as_me:19168: \$? = $ac_status" >&5
19169 (exit $ac_status); } &&
19170 { ac_try='test -s conftest.$ac_objext'
19171 { (eval echo "$as_me:19171: \"$ac_try\"") >&5
19172 (eval $ac_try) 2>&5
19174 echo "$as_me:19174: \$? = $ac_status" >&5
19175 (exit $ac_status); }; }; then
19178 echo "$as_me: failed program was:" >&5
19179 cat conftest.$ac_ext >&5
19182 rm -f conftest.$ac_objext conftest.$ac_ext
19183 echo "$as_me:19183: result: $cf_result" >&5
19184 echo "${ECHO_T}$cf_result" >&6
19185 if test $cf_result = yes ; then
19187 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19189 cat >>confdefs.h <<EOF
19190 #define $cf_result 1
19195 cat >>confdefs.h <<EOF
19196 #define mbstate_t long
19203 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19205 echo "$as_me:19205: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19206 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19207 cat >conftest.$ac_ext <<_ACEOF
19208 #line 19208 "configure"
19209 #include "confdefs.h"
19211 #ifndef _XOPEN_SOURCE_EXTENDED
19212 #define _XOPEN_SOURCE_EXTENDED
19214 #include <${cf_cv_ncurses_header:-curses.h}>
19225 rm -f conftest.$ac_objext
19226 if { (eval echo "$as_me:19226: \"$ac_compile\"") >&5
19227 (eval $ac_compile) 2>&5
19229 echo "$as_me:19229: \$? = $ac_status" >&5
19230 (exit $ac_status); } &&
19231 { ac_try='test -s conftest.$ac_objext'
19232 { (eval echo "$as_me:19232: \"$ac_try\"") >&5
19233 (eval $ac_try) 2>&5
19235 echo "$as_me:19235: \$? = $ac_status" >&5
19236 (exit $ac_status); }; }; then
19239 echo "$as_me: failed program was:" >&5
19240 cat conftest.$ac_ext >&5
19243 rm -f conftest.$ac_objext conftest.$ac_ext
19244 echo "$as_me:19244: result: $cf_result" >&5
19245 echo "${ECHO_T}$cf_result" >&6
19246 if test $cf_result = yes ; then
19248 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19250 cat >>confdefs.h <<EOF
19251 #define $cf_result 1
19256 cat >>confdefs.h <<EOF
19257 #define wchar_t long
19264 if test "$NCURSES_OK_WINT_T" = 0 ; then
19266 echo "$as_me:19266: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19267 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19268 cat >conftest.$ac_ext <<_ACEOF
19269 #line 19269 "configure"
19270 #include "confdefs.h"
19272 #ifndef _XOPEN_SOURCE_EXTENDED
19273 #define _XOPEN_SOURCE_EXTENDED
19275 #include <${cf_cv_ncurses_header:-curses.h}>
19286 rm -f conftest.$ac_objext
19287 if { (eval echo "$as_me:19287: \"$ac_compile\"") >&5
19288 (eval $ac_compile) 2>&5
19290 echo "$as_me:19290: \$? = $ac_status" >&5
19291 (exit $ac_status); } &&
19292 { ac_try='test -s conftest.$ac_objext'
19293 { (eval echo "$as_me:19293: \"$ac_try\"") >&5
19294 (eval $ac_try) 2>&5
19296 echo "$as_me:19296: \$? = $ac_status" >&5
19297 (exit $ac_status); }; }; then
19300 echo "$as_me: failed program was:" >&5
19301 cat conftest.$ac_ext >&5
19304 rm -f conftest.$ac_objext conftest.$ac_ext
19305 echo "$as_me:19305: result: $cf_result" >&5
19306 echo "${ECHO_T}$cf_result" >&6
19307 if test $cf_result = yes ; then
19309 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19311 cat >>confdefs.h <<EOF
19312 #define $cf_result 1
19317 cat >>confdefs.h <<EOF
19318 #define wint_t long
19334 echo "$as_me:19334: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19335 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19337 cat >conftest.$ac_ext <<_ACEOF
19338 #line 19338 "configure"
19339 #include "confdefs.h"
19341 #ifdef HAVE_XCURSES
19342 #include <xcurses.h>
19343 char * XCursesProgramName = "test";
19345 #include <${cf_cv_ncurses_header:-curses.h}>
19346 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19347 #include <ncursesw/term.h>
19348 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19349 #include <ncurses/term.h>
19350 #elif defined(HAVE_TERM_H)
19359 void *foo = &($cf_data)
19365 rm -f conftest.$ac_objext
19366 if { (eval echo "$as_me:19366: \"$ac_compile\"") >&5
19367 (eval $ac_compile) 2>&5
19369 echo "$as_me:19369: \$? = $ac_status" >&5
19370 (exit $ac_status); } &&
19371 { ac_try='test -s conftest.$ac_objext'
19372 { (eval echo "$as_me:19372: \"$ac_try\"") >&5
19373 (eval $ac_try) 2>&5
19375 echo "$as_me:19375: \$? = $ac_status" >&5
19376 (exit $ac_status); }; }; then
19380 echo "$as_me: failed program was:" >&5
19381 cat conftest.$ac_ext >&5
19384 rm -f conftest.$ac_objext conftest.$ac_ext
19385 echo "$as_me:19385: result: $cf_result" >&5
19386 echo "${ECHO_T}$cf_result" >&6
19388 if test $cf_result = yes ; then
19390 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19392 cat >>confdefs.h <<EOF
19393 #define $cf_result 1
19397 echo "$as_me:19397: checking for data $cf_data in library" >&5
19398 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19399 # BSD linkers insist on making weak linkage, but resolve at runtime.
19400 if test "$cross_compiling" = yes; then
19403 cat >conftest.$ac_ext <<_ACEOF
19404 #line 19404 "configure"
19405 #include "confdefs.h"
19407 #ifdef HAVE_XCURSES
19408 #include <xcurses.h>
19409 char * XCursesProgramName = "test";
19411 #include <${cf_cv_ncurses_header:-curses.h}>
19412 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19413 #include <ncursesw/term.h>
19414 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19415 #include <ncurses/term.h>
19416 #elif defined(HAVE_TERM_H)
19421 extern char $cf_data;
19427 void *foo = &($cf_data);
19428 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19429 ${cf_cv_main_return:-return}(foo == 0);
19436 rm -f conftest.$ac_objext conftest$ac_exeext
19437 if { (eval echo "$as_me:19437: \"$ac_link\"") >&5
19438 (eval $ac_link) 2>&5
19440 echo "$as_me:19440: \$? = $ac_status" >&5
19441 (exit $ac_status); } &&
19442 { ac_try='test -s conftest$ac_exeext'
19443 { (eval echo "$as_me:19443: \"$ac_try\"") >&5
19444 (eval $ac_try) 2>&5
19446 echo "$as_me:19446: \$? = $ac_status" >&5
19447 (exit $ac_status); }; }; then
19450 echo "$as_me: failed program was:" >&5
19451 cat conftest.$ac_ext >&5
19454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19457 cat >conftest.$ac_ext <<_ACEOF
19458 #line 19458 "configure"
19459 #include "confdefs.h"
19461 #ifdef HAVE_XCURSES
19462 #include <xcurses.h>
19463 char * XCursesProgramName = "test";
19465 #include <${cf_cv_ncurses_header:-curses.h}>
19466 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19467 #include <ncursesw/term.h>
19468 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19469 #include <ncurses/term.h>
19470 #elif defined(HAVE_TERM_H)
19475 extern char $cf_data;
19478 void *foo = &($cf_data);
19479 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19480 ${cf_cv_main_return:-return}(foo == 0);
19483 rm -f conftest$ac_exeext
19484 if { (eval echo "$as_me:19484: \"$ac_link\"") >&5
19485 (eval $ac_link) 2>&5
19487 echo "$as_me:19487: \$? = $ac_status" >&5
19488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19489 { (eval echo "$as_me:19489: \"$ac_try\"") >&5
19490 (eval $ac_try) 2>&5
19492 echo "$as_me:19492: \$? = $ac_status" >&5
19493 (exit $ac_status); }; }; then
19497 echo "$as_me: program exited with status $ac_status" >&5
19498 echo "$as_me: failed program was:" >&5
19499 cat conftest.$ac_ext >&5
19502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19504 echo "$as_me:19504: result: $cf_result" >&5
19505 echo "${ECHO_T}$cf_result" >&6
19506 if test $cf_result = yes ; then
19508 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19510 cat >>confdefs.h <<EOF
19511 #define $cf_result 1
19514 # do not exit loop here, since we prefer system's declarations
19519 if ( test "$GCC" = yes || test "$GXX" = yes )
19521 echo "$as_me:19521: checking if you want to turn on gcc warnings" >&5
19522 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19524 # Check whether --enable-warnings or --disable-warnings was given.
19525 if test "${enable_warnings+set}" = set; then
19526 enableval="$enable_warnings"
19527 test "$enableval" != yes && enableval=no
19528 if test "$enableval" != "no" ; then
19538 echo "$as_me:19538: result: $with_warnings" >&5
19539 echo "${ECHO_T}$with_warnings" >&6
19540 if test "$with_warnings" = "yes"
19543 if test "$GCC" = yes
19545 cat > conftest.i <<EOF
19547 #define GCC_PRINTF 0
19550 #define GCC_SCANF 0
19552 #ifndef GCC_NORETURN
19553 #define GCC_NORETURN /* nothing */
19556 #define GCC_UNUSED /* nothing */
19559 if test "$GCC" = yes
19561 { echo "$as_me:19561: checking for $CC __attribute__ directives..." >&5
19562 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19563 cat > conftest.$ac_ext <<EOF
19564 #line 19564 "${as_me:-configure}"
19565 #include "confdefs.h"
19566 #include "conftest.h"
19567 #include "conftest.i"
19569 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19571 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19574 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19576 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19578 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19579 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19580 extern void foo(void) GCC_NORETURN;
19581 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19583 cf_printf_attribute=no
19584 cf_scanf_attribute=no
19585 for cf_attribute in scanf printf unused noreturn
19588 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19590 cf_directive="__attribute__(($cf_attribute))"
19591 echo "checking for $CC $cf_directive" 1>&5
19593 case $cf_attribute in
19595 cf_printf_attribute=yes
19596 cat >conftest.h <<EOF
19597 #define GCC_$cf_ATTRIBUTE 1
19601 cf_scanf_attribute=yes
19602 cat >conftest.h <<EOF
19603 #define GCC_$cf_ATTRIBUTE 1
19607 cat >conftest.h <<EOF
19608 #define GCC_$cf_ATTRIBUTE $cf_directive
19613 if { (eval echo "$as_me:19613: \"$ac_compile\"") >&5
19614 (eval $ac_compile) 2>&5
19616 echo "$as_me:19616: \$? = $ac_status" >&5
19617 (exit $ac_status); }; then
19618 test -n "$verbose" && echo "$as_me:19618: result: ... $cf_attribute" >&5
19619 echo "${ECHO_T}... $cf_attribute" >&6
19620 cat conftest.h >>confdefs.h
19621 case $cf_attribute in
19624 cat >>confdefs.h <<EOF
19625 #define GCC_NORETURN $cf_directive
19630 cf_value='/* nothing */'
19631 if test "$cf_printf_attribute" != no ; then
19632 cf_value='__attribute__((format(printf,fmt,var)))'
19634 cat >>confdefs.h <<\EOF
19635 #define GCC_PRINTF 1
19640 cat >>confdefs.h <<EOF
19641 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19646 cf_value='/* nothing */'
19647 if test "$cf_scanf_attribute" != no ; then
19648 cf_value='__attribute__((format(scanf,fmt,var)))'
19650 cat >>confdefs.h <<\EOF
19651 #define GCC_SCANF 1
19656 cat >>confdefs.h <<EOF
19657 #define GCC_SCANFLIKE(fmt,var) $cf_value
19663 cat >>confdefs.h <<EOF
19664 #define GCC_UNUSED $cf_directive
19672 fgrep define conftest.i >>confdefs.h
19677 if test "x$have_x" = xyes; then
19679 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
19680 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
19681 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
19682 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
19683 for cf_X_CFLAGS in $X_CFLAGS
19685 case "x$cf_X_CFLAGS" in
19687 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
19690 CFLAGS="$CFLAGS $cf_X_CFLAGS"
19695 cat >conftest.$ac_ext <<_ACEOF
19696 #line 19696 "configure"
19697 #include "confdefs.h"
19699 #include <stdlib.h>
19700 #include <X11/Intrinsic.h>
19705 String foo = malloc(1)
19710 rm -f conftest.$ac_objext
19711 if { (eval echo "$as_me:19711: \"$ac_compile\"") >&5
19712 (eval $ac_compile) 2>&5
19714 echo "$as_me:19714: \$? = $ac_status" >&5
19715 (exit $ac_status); } &&
19716 { ac_try='test -s conftest.$ac_objext'
19717 { (eval echo "$as_me:19717: \"$ac_try\"") >&5
19718 (eval $ac_try) 2>&5
19720 echo "$as_me:19720: \$? = $ac_status" >&5
19721 (exit $ac_status); }; }; then
19723 echo "$as_me:19723: checking for X11/Xt const-feature" >&5
19724 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
19725 if test "${cf_cv_const_x_string+set}" = set; then
19726 echo $ECHO_N "(cached) $ECHO_C" >&6
19729 cat >conftest.$ac_ext <<_ACEOF
19730 #line 19730 "configure"
19731 #include "confdefs.h"
19733 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
19734 #undef XTSTRINGDEFINES /* X11R5 and later */
19735 #include <stdlib.h>
19736 #include <X11/Intrinsic.h>
19741 String foo = malloc(1); *foo = 0
19746 rm -f conftest.$ac_objext
19747 if { (eval echo "$as_me:19747: \"$ac_compile\"") >&5
19748 (eval $ac_compile) 2>&5
19750 echo "$as_me:19750: \$? = $ac_status" >&5
19751 (exit $ac_status); } &&
19752 { ac_try='test -s conftest.$ac_objext'
19753 { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754 (eval $ac_try) 2>&5
19756 echo "$as_me:19756: \$? = $ac_status" >&5
19757 (exit $ac_status); }; }; then
19759 cf_cv_const_x_string=no
19762 echo "$as_me: failed program was:" >&5
19763 cat conftest.$ac_ext >&5
19765 cf_cv_const_x_string=yes
19768 rm -f conftest.$ac_objext conftest.$ac_ext
19771 echo "$as_me:19771: result: $cf_cv_const_x_string" >&5
19772 echo "${ECHO_T}$cf_cv_const_x_string" >&6
19774 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
19775 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
19776 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
19778 case $cf_cv_const_x_string in
19781 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19782 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19787 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19788 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
19794 echo "$as_me: failed program was:" >&5
19795 cat conftest.$ac_ext >&5
19797 rm -f conftest.$ac_objext conftest.$ac_ext
19799 cat > conftest.$ac_ext <<EOF
19800 #line 19800 "${as_me:-configure}"
19801 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19803 if test "$INTEL_COMPILER" = yes
19805 # The "-wdXXX" options suppress warnings:
19806 # remark #1419: external declaration in primary source file
19807 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19808 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19809 # remark #193: zero used for undefined preprocessing identifier
19810 # remark #593: variable "curs_sb_left_arrow" was set but never used
19811 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19812 # remark #869: parameter "tw" was never referenced
19813 # remark #981: operands are evaluated in unspecified order
19814 # warning #279: controlling expression is constant
19816 { echo "$as_me:19816: checking for $CC warning options..." >&5
19817 echo "$as_me: checking for $CC warning options..." >&6;}
19818 cf_save_CFLAGS="$CFLAGS"
19819 EXTRA_CFLAGS="-Wall"
19831 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19832 if { (eval echo "$as_me:19832: \"$ac_compile\"") >&5
19833 (eval $ac_compile) 2>&5
19835 echo "$as_me:19835: \$? = $ac_status" >&5
19836 (exit $ac_status); }; then
19837 test -n "$verbose" && echo "$as_me:19837: result: ... -$cf_opt" >&5
19838 echo "${ECHO_T}... -$cf_opt" >&6
19839 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19842 CFLAGS="$cf_save_CFLAGS"
19843 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
19845 { echo "$as_me:19845: checking for $CC warning options..." >&5
19846 echo "$as_me: checking for $CC warning options..." >&6;}
19847 cf_save_CFLAGS="$CFLAGS"
19850 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19851 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19852 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19853 for cf_opt in W Wall \
19854 Wbad-function-cast \
19857 Wdeclaration-after-statement \
19860 Wmissing-declarations \
19861 Wmissing-prototypes \
19865 Wstrict-prototypes \
19866 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19868 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19869 if { (eval echo "$as_me:19869: \"$ac_compile\"") >&5
19870 (eval $ac_compile) 2>&5
19872 echo "$as_me:19872: \$? = $ac_status" >&5
19873 (exit $ac_status); }; then
19874 test -n "$verbose" && echo "$as_me:19874: result: ... -$cf_opt" >&5
19875 echo "${ECHO_T}... -$cf_opt" >&6
19878 case $GCC_VERSION in
19880 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19882 echo "${as_me:-configure}:19882: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19888 case $GCC_VERSION in
19890 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19892 echo "${as_me:-configure}:19892: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19898 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19901 CFLAGS="$cf_save_CFLAGS"
19908 echo "$as_me:19908: checking if you want to use dmalloc for testing" >&5
19909 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19911 # Check whether --with-dmalloc or --without-dmalloc was given.
19912 if test "${with_dmalloc+set}" = set; then
19913 withval="$with_dmalloc"
19915 cat >>confdefs.h <<EOF
19916 #define USE_DMALLOC 1
19919 : ${with_cflags:=-g}
19920 : ${with_no_leaks:=yes}
19925 echo "$as_me:19925: result: ${with_dmalloc:-no}" >&5
19926 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19928 case .$with_cflags in
19938 cf_new_extra_cppflags=
19940 for cf_add_cflags in -g
19942 case $cf_fix_cppflags in
19944 case $cf_add_cflags in
19945 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19946 case $cf_add_cflags in
19948 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19950 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19951 && test -z "${cf_tst_cflags}" \
19952 && cf_fix_cppflags=yes
19954 if test $cf_fix_cppflags = yes ; then
19956 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19957 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19960 elif test "${cf_tst_cflags}" = "\"'" ; then
19962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19969 case "$CPPFLAGS" in
19973 case $cf_add_cflags in
19975 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19977 CPPFLAGS=`echo "$CPPFLAGS" | \
19978 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19979 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19984 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19985 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19992 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19993 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20000 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20001 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20003 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20005 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20006 && test -z "${cf_tst_cflags}" \
20007 && cf_fix_cppflags=no
20012 if test -n "$cf_new_cflags" ; then
20014 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20015 CFLAGS="${CFLAGS}$cf_new_cflags"
20019 if test -n "$cf_new_cppflags" ; then
20021 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20022 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20026 if test -n "$cf_new_extra_cppflags" ; then
20028 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20029 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20038 if test "$with_dmalloc" = yes ; then
20039 echo "$as_me:20039: checking for dmalloc.h" >&5
20040 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
20041 if test "${ac_cv_header_dmalloc_h+set}" = set; then
20042 echo $ECHO_N "(cached) $ECHO_C" >&6
20044 cat >conftest.$ac_ext <<_ACEOF
20045 #line 20045 "configure"
20046 #include "confdefs.h"
20047 #include <dmalloc.h>
20049 if { (eval echo "$as_me:20049: \"$ac_cpp conftest.$ac_ext\"") >&5
20050 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20052 egrep -v '^ *\+' conftest.er1 >conftest.err
20054 cat conftest.err >&5
20055 echo "$as_me:20055: \$? = $ac_status" >&5
20056 (exit $ac_status); } >/dev/null; then
20057 if test -s conftest.err; then
20058 ac_cpp_err=$ac_c_preproc_warn_flag
20065 if test -z "$ac_cpp_err"; then
20066 ac_cv_header_dmalloc_h=yes
20068 echo "$as_me: failed program was:" >&5
20069 cat conftest.$ac_ext >&5
20070 ac_cv_header_dmalloc_h=no
20072 rm -f conftest.err conftest.$ac_ext
20074 echo "$as_me:20074: result: $ac_cv_header_dmalloc_h" >&5
20075 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
20076 if test $ac_cv_header_dmalloc_h = yes; then
20078 echo "$as_me:20078: checking for dmalloc_debug in -ldmalloc" >&5
20079 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
20080 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
20081 echo $ECHO_N "(cached) $ECHO_C" >&6
20083 ac_check_lib_save_LIBS=$LIBS
20084 LIBS="-ldmalloc $LIBS"
20085 cat >conftest.$ac_ext <<_ACEOF
20086 #line 20086 "configure"
20087 #include "confdefs.h"
20089 /* Override any gcc2 internal prototype to avoid an error. */
20093 /* We use char because int might match the return type of a gcc2
20094 builtin and then its argument prototype would still apply. */
20095 char dmalloc_debug ();
20104 rm -f conftest.$ac_objext conftest$ac_exeext
20105 if { (eval echo "$as_me:20105: \"$ac_link\"") >&5
20106 (eval $ac_link) 2>&5
20108 echo "$as_me:20108: \$? = $ac_status" >&5
20109 (exit $ac_status); } &&
20110 { ac_try='test -s conftest$ac_exeext'
20111 { (eval echo "$as_me:20111: \"$ac_try\"") >&5
20112 (eval $ac_try) 2>&5
20114 echo "$as_me:20114: \$? = $ac_status" >&5
20115 (exit $ac_status); }; }; then
20116 ac_cv_lib_dmalloc_dmalloc_debug=yes
20118 echo "$as_me: failed program was:" >&5
20119 cat conftest.$ac_ext >&5
20120 ac_cv_lib_dmalloc_dmalloc_debug=no
20122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20123 LIBS=$ac_check_lib_save_LIBS
20125 echo "$as_me:20125: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
20126 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
20127 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
20128 cat >>confdefs.h <<EOF
20129 #define HAVE_LIBDMALLOC 1
20132 LIBS="-ldmalloc $LIBS"
20140 echo "$as_me:20140: checking if you want to use dbmalloc for testing" >&5
20141 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
20143 # Check whether --with-dbmalloc or --without-dbmalloc was given.
20144 if test "${with_dbmalloc+set}" = set; then
20145 withval="$with_dbmalloc"
20147 cat >>confdefs.h <<EOF
20148 #define USE_DBMALLOC 1
20151 : ${with_cflags:=-g}
20152 : ${with_no_leaks:=yes}
20157 echo "$as_me:20157: result: ${with_dbmalloc:-no}" >&5
20158 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
20160 case .$with_cflags in
20170 cf_new_extra_cppflags=
20172 for cf_add_cflags in -g
20174 case $cf_fix_cppflags in
20176 case $cf_add_cflags in
20177 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20178 case $cf_add_cflags in
20180 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20183 && test -z "${cf_tst_cflags}" \
20184 && cf_fix_cppflags=yes
20186 if test $cf_fix_cppflags = yes ; then
20188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20192 elif test "${cf_tst_cflags}" = "\"'" ; then
20194 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20195 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20201 case "$CPPFLAGS" in
20205 case $cf_add_cflags in
20207 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20209 CPPFLAGS=`echo "$CPPFLAGS" | \
20210 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20211 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20216 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20217 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20224 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20225 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20232 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20233 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20235 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20237 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20238 && test -z "${cf_tst_cflags}" \
20239 && cf_fix_cppflags=no
20244 if test -n "$cf_new_cflags" ; then
20246 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20247 CFLAGS="${CFLAGS}$cf_new_cflags"
20251 if test -n "$cf_new_cppflags" ; then
20253 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20254 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20258 if test -n "$cf_new_extra_cppflags" ; then
20260 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20261 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20270 if test "$with_dbmalloc" = yes ; then
20271 echo "$as_me:20271: checking for dbmalloc.h" >&5
20272 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20273 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20274 echo $ECHO_N "(cached) $ECHO_C" >&6
20276 cat >conftest.$ac_ext <<_ACEOF
20277 #line 20277 "configure"
20278 #include "confdefs.h"
20279 #include <dbmalloc.h>
20281 if { (eval echo "$as_me:20281: \"$ac_cpp conftest.$ac_ext\"") >&5
20282 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20284 egrep -v '^ *\+' conftest.er1 >conftest.err
20286 cat conftest.err >&5
20287 echo "$as_me:20287: \$? = $ac_status" >&5
20288 (exit $ac_status); } >/dev/null; then
20289 if test -s conftest.err; then
20290 ac_cpp_err=$ac_c_preproc_warn_flag
20297 if test -z "$ac_cpp_err"; then
20298 ac_cv_header_dbmalloc_h=yes
20300 echo "$as_me: failed program was:" >&5
20301 cat conftest.$ac_ext >&5
20302 ac_cv_header_dbmalloc_h=no
20304 rm -f conftest.err conftest.$ac_ext
20306 echo "$as_me:20306: result: $ac_cv_header_dbmalloc_h" >&5
20307 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20308 if test $ac_cv_header_dbmalloc_h = yes; then
20310 echo "$as_me:20310: checking for debug_malloc in -ldbmalloc" >&5
20311 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20312 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20313 echo $ECHO_N "(cached) $ECHO_C" >&6
20315 ac_check_lib_save_LIBS=$LIBS
20316 LIBS="-ldbmalloc $LIBS"
20317 cat >conftest.$ac_ext <<_ACEOF
20318 #line 20318 "configure"
20319 #include "confdefs.h"
20321 /* Override any gcc2 internal prototype to avoid an error. */
20325 /* We use char because int might match the return type of a gcc2
20326 builtin and then its argument prototype would still apply. */
20327 char debug_malloc ();
20336 rm -f conftest.$ac_objext conftest$ac_exeext
20337 if { (eval echo "$as_me:20337: \"$ac_link\"") >&5
20338 (eval $ac_link) 2>&5
20340 echo "$as_me:20340: \$? = $ac_status" >&5
20341 (exit $ac_status); } &&
20342 { ac_try='test -s conftest$ac_exeext'
20343 { (eval echo "$as_me:20343: \"$ac_try\"") >&5
20344 (eval $ac_try) 2>&5
20346 echo "$as_me:20346: \$? = $ac_status" >&5
20347 (exit $ac_status); }; }; then
20348 ac_cv_lib_dbmalloc_debug_malloc=yes
20350 echo "$as_me: failed program was:" >&5
20351 cat conftest.$ac_ext >&5
20352 ac_cv_lib_dbmalloc_debug_malloc=no
20354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20355 LIBS=$ac_check_lib_save_LIBS
20357 echo "$as_me:20357: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20358 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20359 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20360 cat >>confdefs.h <<EOF
20361 #define HAVE_LIBDBMALLOC 1
20364 LIBS="-ldbmalloc $LIBS"
20372 echo "$as_me:20372: checking if you want to use valgrind for testing" >&5
20373 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20375 # Check whether --with-valgrind or --without-valgrind was given.
20376 if test "${with_valgrind+set}" = set; then
20377 withval="$with_valgrind"
20379 cat >>confdefs.h <<EOF
20380 #define USE_VALGRIND 1
20383 : ${with_cflags:=-g}
20384 : ${with_no_leaks:=yes}
20389 echo "$as_me:20389: result: ${with_valgrind:-no}" >&5
20390 echo "${ECHO_T}${with_valgrind:-no}" >&6
20392 case .$with_cflags in
20402 cf_new_extra_cppflags=
20404 for cf_add_cflags in -g
20406 case $cf_fix_cppflags in
20408 case $cf_add_cflags in
20409 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20410 case $cf_add_cflags in
20412 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20414 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20415 && test -z "${cf_tst_cflags}" \
20416 && cf_fix_cppflags=yes
20418 if test $cf_fix_cppflags = yes ; then
20420 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20421 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20424 elif test "${cf_tst_cflags}" = "\"'" ; then
20426 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20427 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20433 case "$CPPFLAGS" in
20437 case $cf_add_cflags in
20439 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20441 CPPFLAGS=`echo "$CPPFLAGS" | \
20442 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20443 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20448 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20449 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20456 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20457 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20467 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20469 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20470 && test -z "${cf_tst_cflags}" \
20471 && cf_fix_cppflags=no
20476 if test -n "$cf_new_cflags" ; then
20478 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20479 CFLAGS="${CFLAGS}$cf_new_cflags"
20483 if test -n "$cf_new_cppflags" ; then
20485 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20486 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20490 if test -n "$cf_new_extra_cppflags" ; then
20492 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20493 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20502 echo "$as_me:20502: checking if you want to perform memory-leak testing" >&5
20503 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20505 # Check whether --enable-leaks or --disable-leaks was given.
20506 if test "${enable_leaks+set}" = set; then
20507 enableval="$enable_leaks"
20508 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20510 : ${with_no_leaks:=no}
20512 echo "$as_me:20512: result: $with_no_leaks" >&5
20513 echo "${ECHO_T}$with_no_leaks" >&6
20515 if test "$with_no_leaks" = yes ; then
20517 cat >>confdefs.h <<\EOF
20521 cat >>confdefs.h <<\EOF
20522 #define YY_NO_LEAKS 1
20528 if test "x$cf_cv_enable_rpath" != xno
20530 echo "$as_me:20530: checking for an rpath option" >&5
20531 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20532 case $cf_cv_system_name in
20534 if test "$GCC" = yes; then
20535 LD_RPATH_OPT="-Wl,-rpath,"
20537 LD_RPATH_OPT="-rpath "
20540 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20541 LD_RPATH_OPT="-Wl,-rpath,"
20543 (openbsd[2-9].*|mirbsd*)
20544 LD_RPATH_OPT="-Wl,-rpath,"
20547 LD_RPATH_OPT="-rpath "
20550 LD_RPATH_OPT="-Wl,-rpath,"
20553 LD_RPATH_OPT="-rpath "
20561 echo "$as_me:20561: result: $LD_RPATH_OPT" >&5
20562 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20564 case "x$LD_RPATH_OPT" in
20566 echo "$as_me:20566: checking if we need a space after rpath option" >&5
20567 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20568 cf_save_LIBS="$LIBS"
20570 cf_add_libs="$LIBS"
20573 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20574 # filter duplicates
20575 for cf_add_1lib in $cf_add_0lib; do
20576 for cf_add_2lib in $cf_add_libs; do
20577 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20582 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20584 LIBS="$cf_add_libs"
20586 cat >conftest.$ac_ext <<_ACEOF
20587 #line 20587 "configure"
20588 #include "confdefs.h"
20598 rm -f conftest.$ac_objext conftest$ac_exeext
20599 if { (eval echo "$as_me:20599: \"$ac_link\"") >&5
20600 (eval $ac_link) 2>&5
20602 echo "$as_me:20602: \$? = $ac_status" >&5
20603 (exit $ac_status); } &&
20604 { ac_try='test -s conftest$ac_exeext'
20605 { (eval echo "$as_me:20605: \"$ac_try\"") >&5
20606 (eval $ac_try) 2>&5
20608 echo "$as_me:20608: \$? = $ac_status" >&5
20609 (exit $ac_status); }; }; then
20612 echo "$as_me: failed program was:" >&5
20613 cat conftest.$ac_ext >&5
20616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20617 LIBS="$cf_save_LIBS"
20618 echo "$as_me:20618: result: $cf_rpath_space" >&5
20619 echo "${ECHO_T}$cf_rpath_space" >&6
20620 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20625 echo "$as_me:20625: checking if rpath-hack should be disabled" >&5
20626 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20628 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20629 if test "${enable_rpath_hack+set}" = set; then
20630 enableval="$enable_rpath_hack"
20631 test "$enableval" != no && enableval=yes
20632 if test "$enableval" != "yes" ; then
20633 cf_disable_rpath_hack=yes
20635 cf_disable_rpath_hack=no
20639 cf_disable_rpath_hack=no
20642 echo "$as_me:20642: result: $cf_disable_rpath_hack" >&5
20643 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20644 if test "$cf_disable_rpath_hack" = no ; then
20646 echo "$as_me:20646: checking for updated LDFLAGS" >&5
20647 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20648 if test -n "$LD_RPATH_OPT" ; then
20649 echo "$as_me:20649: result: maybe" >&5
20650 echo "${ECHO_T}maybe" >&6
20654 # Extract the first word of "$ac_prog", so it can be a program name with args.
20655 set dummy $ac_prog; ac_word=$2
20656 echo "$as_me:20656: checking for $ac_word" >&5
20657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20658 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20659 echo $ECHO_N "(cached) $ECHO_C" >&6
20661 if test -n "$cf_ldd_prog"; then
20662 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20664 ac_save_IFS=$IFS; IFS=$ac_path_separator
20666 for ac_dir in $ac_dummy; do
20668 test -z "$ac_dir" && ac_dir=.
20669 $as_executable_p "$ac_dir/$ac_word" || continue
20670 ac_cv_prog_cf_ldd_prog="$ac_prog"
20671 echo "$as_me:20671: found $ac_dir/$ac_word" >&5
20677 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20678 if test -n "$cf_ldd_prog"; then
20679 echo "$as_me:20679: result: $cf_ldd_prog" >&5
20680 echo "${ECHO_T}$cf_ldd_prog" >&6
20682 echo "$as_me:20682: result: no" >&5
20683 echo "${ECHO_T}no" >&6
20686 test -n "$cf_ldd_prog" && break
20688 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20690 cf_rpath_list="/usr/lib /lib"
20691 if test "$cf_ldd_prog" != no
20695 cat >conftest.$ac_ext <<_ACEOF
20696 #line 20696 "configure"
20697 #include "confdefs.h"
20707 rm -f conftest.$ac_objext conftest$ac_exeext
20708 if { (eval echo "$as_me:20708: \"$ac_link\"") >&5
20709 (eval $ac_link) 2>&5
20711 echo "$as_me:20711: \$? = $ac_status" >&5
20712 (exit $ac_status); } &&
20713 { ac_try='test -s conftest$ac_exeext'
20714 { (eval echo "$as_me:20714: \"$ac_try\"") >&5
20715 (eval $ac_try) 2>&5
20717 echo "$as_me:20717: \$? = $ac_status" >&5
20718 (exit $ac_status); }; }; then
20719 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20720 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20722 echo "$as_me: failed program was:" >&5
20723 cat conftest.$ac_ext >&5
20725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20727 # If we passed the link-test, but get a "not found" on a given library,
20728 # this could be due to inept reconfiguration of gcc to make it only
20729 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20730 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20731 # /usr/local libraries.
20732 if test -n "$cf_rpath_oops"
20734 for cf_rpath_src in $cf_rpath_oops
20736 for cf_rpath_dir in \
20741 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20743 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20745 echo "${as_me:-configure}:20745: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20747 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20755 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20757 echo "${as_me:-configure}:20757: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20759 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20761 echo "${as_me:-configure}:20761: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20764 for cf_rpath_src in $LDFLAGS
20766 case $cf_rpath_src in
20769 # check if this refers to a directory which we will ignore
20771 if test -n "$cf_rpath_list"
20773 for cf_rpath_item in $cf_rpath_list
20775 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20783 if test "$cf_rpath_skip" = no
20785 # transform the option
20786 if test "$LD_RPATH_OPT" = "-R " ; then
20787 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20789 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20792 # if we have not already added this, add it now
20793 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20794 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20796 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20798 echo "${as_me:-configure}:20798: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20800 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20805 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20807 LDFLAGS=$cf_rpath_dst
20809 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20811 echo "${as_me:-configure}:20811: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20813 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20815 echo "${as_me:-configure}:20815: testing ...checking LIBS $LIBS ..." 1>&5
20818 for cf_rpath_src in $LIBS
20820 case $cf_rpath_src in
20823 # check if this refers to a directory which we will ignore
20825 if test -n "$cf_rpath_list"
20827 for cf_rpath_item in $cf_rpath_list
20829 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20837 if test "$cf_rpath_skip" = no
20839 # transform the option
20840 if test "$LD_RPATH_OPT" = "-R " ; then
20841 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20843 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20846 # if we have not already added this, add it now
20847 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20848 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20850 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20852 echo "${as_me:-configure}:20852: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20854 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20859 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20863 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20865 echo "${as_me:-configure}:20865: testing ...checked LIBS $LIBS ..." 1>&5
20867 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20869 echo "${as_me:-configure}:20869: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20872 echo "$as_me:20872: result: no" >&5
20873 echo "${ECHO_T}no" >&6
20881 ac_config_files="$ac_config_files Makefile"
20882 ac_config_commands="$ac_config_commands default"
20883 cat >confcache <<\_ACEOF
20884 # This file is a shell script that caches the results of configure
20885 # tests run on this system so they can be shared between configure
20886 # scripts and configure runs, see configure's option --config-cache.
20887 # It is not useful on other systems. If it contains results you don't
20888 # want to keep, you may remove or edit it.
20890 # config.status only pays attention to the cache file if you give it
20891 # the --recheck option to rerun configure.
20893 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20894 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20895 # following values.
20899 # The following way of writing the cache mishandles newlines in values,
20900 # but we know of no workaround that is simple, portable, and efficient.
20901 # So, don't put newlines in cache variables' values.
20902 # Ultrix sh set writes to stderr and can't be redirected directly,
20903 # and sets the high bit in the cache file unless we assign to the vars.
20906 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20908 # `set' does not quote correctly, so add quotes (double-quote
20909 # substitution turns \\\\ into \\, and sed turns \\ into \).
20912 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20915 # `set' quotes correctly as required by POSIX, so do not add quotes.
20917 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20924 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20926 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20928 if cmp -s $cache_file confcache; then :; else
20929 if test -w $cache_file; then
20930 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20931 cat confcache >$cache_file
20933 echo "not updating unwritable cache $cache_file"
20938 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20939 # Let make expand exec_prefix.
20940 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20942 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20943 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20944 # trailing colons and then remove the whole line if VPATH becomes empty
20945 # (actually we leave an empty line to preserve line numbers).
20946 if test "x$srcdir" = x.; then
20947 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20948 s/:*\$(srcdir):*/:/;
20949 s/:*\${srcdir}:*/:/;
20951 s/^\([^=]*=[ ]*\):*/\1/;
20957 DEFS=-DHAVE_CONFIG_H
20959 : ${CONFIG_STATUS=./config.status}
20960 ac_clean_files_save=$ac_clean_files
20961 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20962 { echo "$as_me:20962: creating $CONFIG_STATUS" >&5
20963 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20964 cat >$CONFIG_STATUS <<_ACEOF
20966 # Generated automatically by configure.
20967 # Run this file to recreate the current configuration.
20968 # Compiler output produced by configure, useful for debugging
20969 # configure, is in config.log if it exists.
20972 SHELL=\${CONFIG_SHELL-$SHELL}
20973 ac_cs_invocation="\$0 \$@"
20977 cat >>$CONFIG_STATUS <<\_ACEOF
20978 # Be Bourne compatible
20979 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20982 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20986 # Name of the executable.
20987 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20989 if expr a : '\(a\)' >/dev/null 2>&1; then
20995 rm -f conf$$ conf$$.exe conf$$.file
20997 if ln -s conf$$.file conf$$ 2>/dev/null; then
20998 # We could just check for DJGPP; but this test a) works b) is more generic
20999 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21000 if test -f conf$$.exe; then
21001 # Don't use ln at all; we don't have any links
21006 elif ln conf$$.file conf$$ 2>/dev/null; then
21011 rm -f conf$$ conf$$.exe conf$$.file
21013 as_executable_p="test -f"
21015 # Support unset when possible.
21016 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21023 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21024 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21025 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21026 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21027 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21028 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21029 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21030 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21033 # We need space, tab and new line, in precisely that order.
21039 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21045 # Files that config.status was made for.
21046 if test -n "$ac_config_files"; then
21047 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21050 if test -n "$ac_config_headers"; then
21051 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21054 if test -n "$ac_config_links"; then
21055 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21058 if test -n "$ac_config_commands"; then
21059 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21062 cat >>$CONFIG_STATUS <<\EOF
21065 \`$as_me' instantiates files from templates according to the
21066 current configuration.
21068 Usage: $0 [OPTIONS] [FILE]...
21070 -h, --help print this help, then exit
21071 -V, --version print version number, then exit
21072 -d, --debug don't remove temporary files
21073 --recheck update $as_me by reconfiguring in the same conditions
21074 --file=FILE[:TEMPLATE]
21075 instantiate the configuration file FILE
21076 --header=FILE[:TEMPLATE]
21077 instantiate the configuration header FILE
21079 Configuration files:
21082 Configuration headers:
21085 Configuration commands:
21088 Report bugs to <dickey@invisible-island.net>."
21091 cat >>$CONFIG_STATUS <<EOF
21094 configured by $0, generated by GNU Autoconf 2.52.20200111,
21095 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21097 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21098 Free Software Foundation, Inc.
21099 This config.status script is free software; the Free Software Foundation
21100 gives unlimited permission to copy, distribute and modify it."
21105 cat >>$CONFIG_STATUS <<\EOF
21106 # If no file are specified by the user, then we need to provide default
21107 # value. By we need to know if files were specified by the user.
21113 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21114 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21116 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21120 *) # This is not an option, so the user has probably given explicit
21122 ac_need_defaults=false;;
21126 # Handling of the options.
21128 cat >>$CONFIG_STATUS <<EOF
21129 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21130 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21131 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21133 cat >>$CONFIG_STATUS <<\EOF
21134 --version | --vers* | -V )
21135 echo "$ac_cs_version"; exit 0 ;;
21137 # Conflict between --help and --header
21138 { { echo "$as_me:21138: error: ambiguous option: $1
21139 Try \`$0 --help' for more information." >&5
21140 echo "$as_me: error: ambiguous option: $1
21141 Try \`$0 --help' for more information." >&2;}
21142 { (exit 1); exit 1; }; };;
21143 --help | --hel | -h )
21144 echo "$ac_cs_usage"; exit 0 ;;
21145 --debug | --d* | -d )
21147 --file | --fil | --fi | --f )
21149 CONFIG_FILES="$CONFIG_FILES $1"
21150 ac_need_defaults=false;;
21151 --header | --heade | --head | --hea )
21153 CONFIG_HEADERS="$CONFIG_HEADERS $1"
21154 ac_need_defaults=false;;
21156 # This is an error.
21157 -*) { { echo "$as_me:21157: error: unrecognized option: $1
21158 Try \`$0 --help' for more information." >&5
21159 echo "$as_me: error: unrecognized option: $1
21160 Try \`$0 --help' for more information." >&2;}
21161 { (exit 1); exit 1; }; } ;;
21163 *) ac_config_targets="$ac_config_targets $1" ;;
21172 ## ----------------------- ##
21173 ## Running config.status. ##
21174 ## ----------------------- ##
21176 This file was extended by $as_me 2.52.20200111, executed with
21177 CONFIG_FILES = $CONFIG_FILES
21178 CONFIG_HEADERS = $CONFIG_HEADERS
21179 CONFIG_LINKS = $CONFIG_LINKS
21180 CONFIG_COMMANDS = $CONFIG_COMMANDS
21181 > $ac_cs_invocation
21182 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21187 cat >>$CONFIG_STATUS <<EOF
21189 # INIT-COMMANDS section.
21199 cat >>$CONFIG_STATUS <<\EOF
21200 for ac_config_target in $ac_config_targets
21202 case "$ac_config_target" in
21203 # Handling of arguments.
21204 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21205 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21206 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
21207 *) { { echo "$as_me:21207: error: invalid argument: $ac_config_target" >&5
21208 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21209 { (exit 1); exit 1; }; };;
21213 # If the user did not use the arguments to specify the items to instantiate,
21214 # then the envvar interface is used. Set only those that are not.
21215 # We use the long form for the default assignment because of an extremely
21216 # bizarre bug on SunOS 4.1.3.
21217 if $ac_need_defaults; then
21218 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21219 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21220 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21223 # Create a temporary directory, and hook for its removal unless debugging.
21226 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21227 trap '{ (exit 1); exit 1; }' 1 2 13 15
21230 # Create a (secure) tmp directory for tmp files.
21233 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21234 test -n "$tmp" && test -d "$tmp"
21237 tmp=$TMPDIR/cs$$-$RANDOM
21238 (umask 077 && mkdir $tmp)
21241 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21242 { (exit 1); exit 1; }
21247 cat >>$CONFIG_STATUS <<EOF
21250 # CONFIG_FILES section.
21253 # No need to generate the scripts if there are no CONFIG_FILES.
21254 # This happens for instance when ./config.status config.h
21255 if test -n "\$CONFIG_FILES"; then
21256 # Protect against being on the right side of a sed subst in config.status.
21257 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21258 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21259 s,@SHELL@,$SHELL,;t t
21260 s,@exec_prefix@,$exec_prefix,;t t
21261 s,@prefix@,$prefix,;t t
21262 s,@program_transform_name@,$program_transform_name,;t t
21263 s,@bindir@,$bindir,;t t
21264 s,@sbindir@,$sbindir,;t t
21265 s,@libexecdir@,$libexecdir,;t t
21266 s,@datarootdir@,$datarootdir,;t t
21267 s,@datadir@,$datadir,;t t
21268 s,@sysconfdir@,$sysconfdir,;t t
21269 s,@sharedstatedir@,$sharedstatedir,;t t
21270 s,@localstatedir@,$localstatedir,;t t
21271 s,@runstatedir@,$runstatedir,;t t
21272 s,@libdir@,$libdir,;t t
21273 s,@includedir@,$includedir,;t t
21274 s,@oldincludedir@,$oldincludedir,;t t
21275 s,@infodir@,$infodir,;t t
21276 s,@mandir@,$mandir,;t t
21277 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21278 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21279 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21280 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21281 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21282 s,@build_alias@,$build_alias,;t t
21283 s,@host_alias@,$host_alias,;t t
21284 s,@target_alias@,$target_alias,;t t
21285 s,@ECHO_C@,$ECHO_C,;t t
21286 s,@ECHO_N@,$ECHO_N,;t t
21287 s,@ECHO_T@,$ECHO_T,;t t
21288 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21289 s,@DEFS@,$DEFS,;t t
21290 s,@LIBS@,$LIBS,;t t
21291 s,@build@,$build,;t t
21292 s,@build_cpu@,$build_cpu,;t t
21293 s,@build_vendor@,$build_vendor,;t t
21294 s,@build_os@,$build_os,;t t
21295 s,@host@,$host,;t t
21296 s,@host_cpu@,$host_cpu,;t t
21297 s,@host_vendor@,$host_vendor,;t t
21298 s,@host_os@,$host_os,;t t
21299 s,@SET_MAKE@,$SET_MAKE,;t t
21301 s,@CFLAGS@,$CFLAGS,;t t
21302 s,@LDFLAGS@,$LDFLAGS,;t t
21303 s,@CPPFLAGS@,$CPPFLAGS,;t t
21304 s,@ac_ct_CC@,$ac_ct_CC,;t t
21305 s,@EXEEXT@,$EXEEXT,;t t
21306 s,@OBJEXT@,$OBJEXT,;t t
21307 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21310 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21311 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21312 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21313 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21314 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21315 s,@LINT@,$LINT,;t t
21316 s,@LINT_OPTS@,$LINT_OPTS,;t t
21317 s,@CTAGS@,$CTAGS,;t t
21318 s,@ETAGS@,$ETAGS,;t t
21319 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21320 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21321 s,@MATH_LIB@,$MATH_LIB,;t t
21322 s,@top_builddir@,$top_builddir,;t t
21323 s,@CC_G_OPT@,$CC_G_OPT,;t t
21324 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21325 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21326 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21327 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21329 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21330 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21331 s,@LD_MODEL@,$LD_MODEL,;t t
21332 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21333 s,@LIBTOOL@,$LIBTOOL,;t t
21334 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21335 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21336 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21337 s,@LIB_LINK@,$LIB_LINK,;t t
21338 s,@LINK_TESTS@,$LINK_TESTS,;t t
21339 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21340 s,@PACKAGE@,$PACKAGE,;t t
21341 s,@PTHREAD@,$PTHREAD,;t t
21342 s,@TEST_ARGS@,$TEST_ARGS,;t t
21343 s,@TEST_DEPS@,$TEST_DEPS,;t t
21344 s,@TEST_LIBS@,$TEST_LIBS,;t t
21345 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21346 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21347 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21348 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21349 s,@includesubdir@,$includesubdir,;t t
21350 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21351 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21352 s,@ECHO_LT@,$ECHO_LT,;t t
21353 s,@ECHO_LD@,$ECHO_LD,;t t
21354 s,@RULE_CC@,$RULE_CC,;t t
21355 s,@SHOW_CC@,$SHOW_CC,;t t
21356 s,@ECHO_CC@,$ECHO_CC,;t t
21357 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21358 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21359 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21360 s,@X_CFLAGS@,$X_CFLAGS,;t t
21361 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21362 s,@X_LIBS@,$X_LIBS,;t t
21363 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21364 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21365 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21366 s,@RGB_PATH@,$RGB_PATH,;t t
21367 s,@no_x11_rgb@,$no_x11_rgb,;t t
21368 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21369 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21370 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21375 cat >>$CONFIG_STATUS <<\EOF
21376 # Split the substitutions into bite-sized pieces for seds with
21377 # small command number limits, like on Digital OSF/1 and HP-UX.
21378 ac_max_sed_lines=48
21379 ac_sed_frag=1 # Number of current file.
21380 ac_beg=1 # First line for current file.
21381 ac_end=$ac_max_sed_lines # Line after last line for current file.
21384 while $ac_more_lines; do
21385 if test $ac_beg -gt 1; then
21386 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21388 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21390 if test ! -s $tmp/subs.frag; then
21391 ac_more_lines=false
21393 # The purpose of the label and of the branching condition is to
21394 # speed up the sed processing (if there are no `@' at all, there
21395 # is no need to browse any of the substitutions).
21396 # These are the two extra sed commands mentioned above.
21398 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21399 # It is possible to make a multiline substitution using escaped newlines.
21400 # Ensure that we do not split the substitution between script fragments.
21402 ac_END=`expr $ac_end + $ac_max_sed_lines`
21403 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21404 if test -s $tmp/subs.next; then
21405 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21406 if test ! -s $tmp/subs.edit; then
21407 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21408 if test ! -s $tmp/subs.edit; then
21409 if test $ac_beg -gt 1; then
21410 ac_end=`expr $ac_end - 1`
21417 if test -z "$ac_sed_cmds"; then
21418 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21420 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21422 ac_sed_frag=`expr $ac_sed_frag + 1`
21424 ac_end=`expr $ac_end + $ac_max_sed_lines`
21427 if test -z "$ac_sed_cmds"; then
21430 fi # test -n "$CONFIG_FILES"
21433 cat >>$CONFIG_STATUS <<\EOF
21434 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21435 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21437 - | *:- | *:-:* ) # input from stdin
21439 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21440 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21441 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21442 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21443 * ) ac_file_in=$ac_file.in ;;
21446 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21447 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21448 X"$ac_file" : 'X\(//\)[^/]' \| \
21449 X"$ac_file" : 'X\(//\)$' \| \
21450 X"$ac_file" : 'X\(/\)' \| \
21451 . : '\(.\)' 2>/dev/null ||
21453 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21454 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21455 /^X\(\/\/\)$/{ s//\1/; q; }
21456 /^X\(\/\).*/{ s//\1/; q; }
21458 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21459 { case "$ac_dir" in
21460 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21464 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21465 case $as_mkdir_dir in
21466 # Skip DOS drivespec
21467 ?:) as_incr_dir=$as_mkdir_dir ;;
21469 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21470 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21475 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21476 # A "../" for each directory in $ac_dir_suffix.
21477 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21479 ac_dir_suffix= ac_dots=
21484 if test -z "$ac_dots"; then
21487 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21489 [\\/]* | ?:[\\/]* )
21490 ac_srcdir=$srcdir$ac_dir_suffix;
21491 ac_top_srcdir=$srcdir ;;
21492 *) # Relative path.
21493 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21494 ac_top_srcdir=$ac_dots$srcdir ;;
21498 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21499 *) ac_INSTALL=$ac_dots$INSTALL ;;
21502 if test x"$ac_file" != x-; then
21503 { echo "$as_me:21503: creating $ac_file" >&5
21504 echo "$as_me: creating $ac_file" >&6;}
21507 # Let's still pretend it is `configure' which instantiates (i.e., don't
21508 # use $as_me), people would be surprised to read:
21509 # /* config.h. Generated automatically by config.status. */
21510 configure_input="Generated automatically from `echo $ac_file_in |
21511 sed 's,.*/,,'` by configure."
21513 # First look for the input files in the build tree, otherwise in the
21515 ac_file_inputs=`IFS=:
21516 for f in $ac_file_in; do
21518 -) echo $tmp/stdin ;;
21520 # Absolute (can't be DOS-style, as IFS=:)
21521 test -f "$f" || { { echo "$as_me:21521: error: cannot find input file: $f" >&5
21522 echo "$as_me: error: cannot find input file: $f" >&2;}
21523 { (exit 1); exit 1; }; }
21526 if test -f "$f"; then
21529 elif test -f "$srcdir/$f"; then
21534 { { echo "$as_me:21534: error: cannot find input file: $f" >&5
21535 echo "$as_me: error: cannot find input file: $f" >&2;}
21536 { (exit 1); exit 1; }; }
21539 done` || { (exit 1); exit 1; }
21541 cat >>$CONFIG_STATUS <<\EOF
21542 ac_warn_datarootdir=no
21543 if test x"$ac_file" != x-; then
21544 for ac_item in $ac_file_inputs
21546 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21547 if test -n "$ac_seen"; then
21548 ac_used=`grep '@datarootdir@' $ac_item`
21549 if test -z "$ac_used"; then
21550 { echo "$as_me:21550: WARNING: datarootdir was used implicitly but not set:
21552 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21554 ac_warn_datarootdir=yes
21557 ac_seen=`grep '${datarootdir}' $ac_item`
21558 if test -n "$ac_seen"; then
21559 { echo "$as_me:21559: WARNING: datarootdir was used explicitly but not set:
21561 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21563 ac_warn_datarootdir=yes
21568 if test "x$ac_warn_datarootdir" = xyes; then
21569 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21573 cat >>$CONFIG_STATUS <<EOF
21577 cat >>$CONFIG_STATUS <<\EOF
21579 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21580 s,@configure_input@,$configure_input,;t t
21581 s,@srcdir@,$ac_srcdir,;t t
21582 s,@top_srcdir@,$ac_top_srcdir,;t t
21583 s,@INSTALL@,$ac_INSTALL,;t t
21584 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21586 if test x"$ac_file" != x-; then
21587 cp $tmp/out $ac_file
21589 for ac_name in prefix exec_prefix datarootdir
21591 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21592 if test -n "$ac_seen"; then
21593 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21594 if test -z "$ac_init"; then
21595 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21596 { echo "$as_me:21596: WARNING: Variable $ac_name is used but was not set:
21598 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21603 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21604 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21605 if test -s $tmp/out; then
21606 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21607 { echo "$as_me:21607: WARNING: Some variables may not be substituted:
21609 echo "$as_me: WARNING: Some variables may not be substituted:
21619 cat >>$CONFIG_STATUS <<\EOF
21622 # CONFIG_HEADER section.
21625 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21626 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21628 # ac_d sets the value in "#define NAME VALUE" lines.
21629 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21630 ac_dB='[ ].*$,\1#\2'
21633 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21634 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21635 ac_iB='\([ ]\),\1#\2define\3'
21638 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21639 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21640 ac_uB='$,\1#\2define\3'
21644 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21645 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21647 - | *:- | *:-:* ) # input from stdin
21649 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21650 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21651 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21652 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21653 * ) ac_file_in=$ac_file.in ;;
21656 test x"$ac_file" != x- && { echo "$as_me:21656: creating $ac_file" >&5
21657 echo "$as_me: creating $ac_file" >&6;}
21659 # First look for the input files in the build tree, otherwise in the
21661 ac_file_inputs=`IFS=:
21662 for f in $ac_file_in; do
21664 -) echo $tmp/stdin ;;
21666 # Absolute (can't be DOS-style, as IFS=:)
21667 test -f "$f" || { { echo "$as_me:21667: error: cannot find input file: $f" >&5
21668 echo "$as_me: error: cannot find input file: $f" >&2;}
21669 { (exit 1); exit 1; }; }
21672 if test -f "$f"; then
21675 elif test -f "$srcdir/$f"; then
21680 { { echo "$as_me:21680: error: cannot find input file: $f" >&5
21681 echo "$as_me: error: cannot find input file: $f" >&2;}
21682 { (exit 1); exit 1; }; }
21685 done` || { (exit 1); exit 1; }
21686 # Remove the trailing spaces.
21687 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21691 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21692 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21693 # be either 'cat' or 'sort'.
21694 cat confdefs.h | uniq >conftest.vals
21696 # Break up conftest.vals because some shells have a limit on
21697 # the size of here documents, and old seds have small limits too.
21699 rm -f conftest.tail
21700 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21701 while grep . conftest.vals >/dev/null
21703 # Write chunks of a limited-size here document to conftest.frag.
21704 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21705 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21706 echo 'CEOF' >> $CONFIG_STATUS
21707 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21708 rm -f conftest.vals
21709 mv conftest.tail conftest.vals
21711 rm -f conftest.vals
21713 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21715 echo ' cat >> conftest.edit <<CEOF
21716 /@DEFS@/r conftest.frag
21719 sed -f conftest.edit $tmp/in > $tmp/out
21721 mv $tmp/out $tmp/in
21722 rm -f conftest.edit conftest.frag
21723 ' >> $CONFIG_STATUS
21725 cat >>$CONFIG_STATUS <<\EOF
21726 # Let's still pretend it is `configure' which instantiates (i.e., don't
21727 # use $as_me), people would be surprised to read:
21728 # /* config.h. Generated automatically by config.status. */
21729 if test x"$ac_file" = x-; then
21730 echo "/* Generated automatically by configure. */" >$tmp/config.h
21732 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21734 cat $tmp/in >>$tmp/config.h
21736 if test x"$ac_file" != x-; then
21737 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21738 { echo "$as_me:21738: $ac_file is unchanged" >&5
21739 echo "$as_me: $ac_file is unchanged" >&6;}
21741 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21742 X"$ac_file" : 'X\(//\)[^/]' \| \
21743 X"$ac_file" : 'X\(//\)$' \| \
21744 X"$ac_file" : 'X\(/\)' \| \
21745 . : '\(.\)' 2>/dev/null ||
21747 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21748 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21749 /^X\(\/\/\)$/{ s//\1/; q; }
21750 /^X\(\/\).*/{ s//\1/; q; }
21752 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21753 { case "$ac_dir" in
21754 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21758 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21759 case $as_mkdir_dir in
21760 # Skip DOS drivespec
21761 ?:) as_incr_dir=$as_mkdir_dir ;;
21763 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21764 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21771 mv $tmp/config.h $ac_file
21775 rm -f $tmp/config.h
21779 cat >>$CONFIG_STATUS <<\EOF
21781 # CONFIG_COMMANDS section.
21783 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21784 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21785 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21792 if test ! -d $srcdir/$cf_dir; then
21794 elif test -f $srcdir/$cf_dir/programs; then
21795 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21799 cat >>Makefile <<TEST_EOF
21801 # These rules are generated so we do not rely on suffix rules, which do not
21802 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21803 # some, and the '\$x' confuses others).
21806 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21809 cat >>Makefile <<TEST_EOF
21811 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21812 \$(srcdir)/test.priv.h \\
21815 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21819 if test -f ../config.guess && test -f ../config.sub
21821 cat >>Makefile <<TEST_EOF
21823 # if we used CF_INHERIT for getting these files, we can remove them
21825 rm -f config.guess config.sub
21833 cat >>$CONFIG_STATUS <<\EOF
21835 { (exit 0); exit 0; }
21837 chmod +x $CONFIG_STATUS
21838 ac_clean_files=$ac_clean_files_save
21840 # configure is writing to config.log, and then calls config.status.
21841 # config.status does its own redirection, appending to config.log.
21842 # Unfortunately, on DOS this fails, as config.log is still kept open
21843 # by configure, so config.status won't be able to write to it; its
21844 # output is simply discarded. So we exec the FD to /dev/null,
21845 # effectively closing config.log, so it can be properly (re)opened and
21846 # appended to by config.status. When coming back to configure, we
21847 # need to make the FD available again.
21848 if test "$no_create" != yes; then
21851 $SHELL $CONFIG_STATUS || ac_cs_success=false
21853 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21854 # would make configure fail if this is the last instruction.
21855 $ac_cs_success || { (exit 1); exit 1; }